text:
Q: 2012 iMac: Stalling on boot (macOS Mojave 10.14.5) External SSD. Display Issue? Adding more detail:
This is late 2012 iMac (13,2) with 128GB original internal NVMe but with new Samsung EVO 860 1TB SSD. I used to be able to talk to it via target disk mode (where I erased drives) but no longer can access vis TDM. I now have tried both 10.13.6 and 10.14.5 ext SSD to boot (or recovery) (or install), every thing hangs on UI process startup. Hope EFI Rom mismatch rather than real hw error. Ran h.Sierra w/ new hw before Mojave upgrade killed it.
Maybe a downgrade from 283.0.0.0.0 EFI Firmware could help but people have said impossible to downgrade.
I can only get to Single User Mode - anything else involves UI Process start then hang in Windows Server - wondering if to do with Ambient Light Sensor - maybe I botched cable hookup.
Here is log:
10:26:32.416886 -0700   Installer Progress  Progress UI App Starting
10:26:32.596156 -0700   com.apple.xpc.launchd   (com.apple.xpc.launchd.domain.system) Service "com.apple.ManagedClient.startup" tried to register for endpoint "com.apple.ManagedClient.agent" already registered by owner: com.apple.ManagedClient
10:26:32.710204 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:32.941178 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:34.382271 -0700   logd    _logd_remote_start_service: listener activated for com.apple.logd.remote-daemon
10:26:35.031124 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:35.995553 -0700   com.apple.xpc.launchd   (com.apple.xpc.launchd.domain.user.202) com.apple.pluginkit.pkd (lint): Service sets EnableTransactions=false and EnablePressuredExit=true, which makes no sense. Enabling Transactions.
10:26:36.541964 -0700   launchd BUG in libdispatch client: mach_recv, monitored resource vanished before the source cancel handler was invoked { 0x7f8a5304f400[source], ident: 161799 / 0x27807, handler: 0x106c7540e }
10:26:36.818377 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:36.995037 -0700   syspolicyd  objc[182]: Class AKELData is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy (0x1095a3ef0) and /usr/libexec/syspolicyd (0x1087a3c40). One of the two will be used. Which one is undefined.
10:26:36.995162 -0700   syspolicyd  objc[182]: Class SPExecutionHistoryItem is implemented in both /System/Library/PrivateFrameworks/SystemPolicy.framework/Versions/A/SystemPolicy (0x1095a3e50) and /usr/libexec/syspolicyd (0x1087a4000). One of the two will be used. Which one is undefined.
10:26:37.731805 -0700   systemstats DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:26:37.863976 -0700   mds objc[63]: Class MDSObjectToken is implemented in both /System/Library/PrivateFrameworks/SpotlightServerKit.framework/Versions/A/SpotlightServerKit (0x10a811de0) and /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds (0x10a5c8f40). One of the two will be used. Which one is undefined.
10:26:37.864163 -0700   mds objc[63]: Class MDSToken is implemented in both /System/Library/PrivateFrameworks/SpotlightServerKit.framework/Versions/A/SpotlightServerKit (0x10a811d90) and /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds (0x10a5c9490). One of the two will be used. Which one is undefined.
10:26:37.864287 -0700   mds objc[63]: Class MDSReadCopyUpdate is implemented in both /System/Library/PrivateFrameworks/SpotlightServerKit.framework/Versions/A/SpotlightServerKit (0x10a811e30) and /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds (0x10a5ca020). One of the two will be used. Which one is undefined.
10:26:37.864496 -0700   mds objc[63]: Class MDSInternalToken is implemented in both /System/Library/PrivateFrameworks/SpotlightServerKit.framework/Versions/A/SpotlightServerKit (0x10a811d40) and /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds (0x10a5cb100). One of the two will be used. Which one is undefined.
10:26:38.271670 -0700   com.apple.xpc.launchd   (com.apple.xpc.launchd.domain.user.89) com.apple.pluginkit.pkd (lint): Service sets EnableTransactions=false and EnablePressuredExit=true, which makes no sense. Enabling Transactions.
10:26:38.452634 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:47.021256 -0700   com.apple.xpc.launchd   (com.apple.dpd[179]) Service exited with abnormal code: 75
10:26:48.382117 -0700   airportd    DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:26:49.321153 -0700   WindowServer    DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:26:49.419191 -0700   com.apple.xpc.launchd   (com.apple.xpc.launchd.domain.user.88) com.apple.pluginkit.pkd (lint): Service sets EnableTransactions=false and EnablePressuredExit=true, which makes no sense. Enabling Transactions.
10:26:52.138252 -0700   nsurlsessiond   DEPRECATED USE in libdispatch client: Setting timer interval to 0 requests a 1ns timer, did you mean FOREVER (a one-shot timer)?; set a breakpoint on _dispatch_bug_deprecated to debug
10:26:52.143428 -0700   xpcproxy    libcoreservices: _dirhelper_userdir: 529: bootstrap_look_up returned (ipc/send) invalid destination port
10:26:52.111251 -0700   timed   settimeofday({0x5ceacc5c,0x19be9}) == 0
10:26:53.483321 -0700   com.apple.xpc.launchd   (com.apple.WindowServer[117]) Service exited due to SIGABRT
10:26:53.548115 -0700   WindowServer    DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:26:53.586312 -0700   com.apple.xpc.launchd   (com.apple.AmbientDisplayAgent) Service only ran for 4 seconds. Pushing respawn out by 6 seconds.
10:26:53.678423 -0700   com.apple.xpc.launchd   (com.apple.WindowServer[211]) Service exited with abnormal code: 1
10:26:53.678478 -0700   com.apple.xpc.launchd   (com.apple.WindowServer) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
10:26:57.021957 -0700   com.apple.xpc.launchd   (com.apple.dpd[206]) Service exited with abnormal code: 75
10:27:03.742655 -0700   WindowServer    DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:27:03.778320 -0700   com.apple.xpc.launchd   (com.apple.AmbientDisplayAgent) Service only ran for 4 seconds. Pushing respawn out by 6 seconds.
10:27:03.870368 -0700   com.apple.xpc.launchd   (com.apple.WindowServer[216]) Service exited with abnormal code: 1
10:27:03.870439 -0700   com.apple.xpc.launchd   (com.apple.WindowServer) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
10:27:07.809317 -0700   com.apple.xpc.launchd   (com.apple.dpd[214]) Service exited with abnormal code: 75
10:27:13.934911 -0700   WindowServer    DEPRECATED USE in libdispatch client: dispatch source activated with no event handler set; set a breakpoint on _dispatch_bug_deprecated to debug
10:27:13.970915 -0700   com.apple.xpc.launchd   (com.apple.AmbientDisplayAgent) Service only ran for 4 seconds. Pushing respawn out by 6 seconds.
10:27:14.062886 -0700   com.apple.xpc.launchd   (com.apple.WindowServer[219]) Service exited with abnormal code: 1

and from WindowServer Crash log:
Process:               WindowServer [183]
Path:                  /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
Identifier:            WindowServer
Version:               600.00 (340.26)
Code Type:             X86-64 (Native)
Parent Process:        launchd [1]
Responsible:           WindowServer [183]
User ID:               88

Date/Time:             2019-05-26 10:20:41.827 -0700
OS Version:            Mac OS X 10.14.5 (18F132)
Report Version:        12
Anonymous UUID:        04ADE721-5882-9162-4D00-6F4A60D95324

Time Awake Since Boot: 54 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
Assertion failed: (false - Driver Error: FB: 0 of 3 opened, succeeded 0 times, failed 1 times; WS: 1st PID 183, is not on installer
AppleIntelFramebuffer = 0
IOFramebufferUserClient = 0
LER:
LER:
LER:
), function CGXMappedDisplayStart, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreDisplay/CoreDisplay-109.19/CoreDisplay/IODisplay/MappedDisplay.cpp, line 5030.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib          0x000000010ead62c6 __pthread_kill + 10
1   libsystem_pthread.dylib         0x000000010eb30bf1 pthread_kill + 284
2   libsystem_c.dylib               0x000000010e8ff6a6 abort + 127
3   libsystem_c.dylib               0x000000010e8c820d __assert_rtn + 324
4   com.apple.CoreDisplay           0x000000010c7f6184 0x10c7eb000 + 45444
5   com.apple.CoreDisplay           0x000000010c86ad33 0x10c7eb000 + 523571
6   com.apple.CoreDisplay           0x000000010c894489 CGXDisplayDriverInitialize + 934
7   com.apple.SkyLight              0x000000010b7a058f WSInitialize + 3065
8   com.apple.SkyLight              0x000000010b83b4ea SLXServer + 1338
9   WindowServer                    0x000000010b5db50d 0x10b5da000 + 5389
10  libdyld.dylib                   0x000000010e7fc3d5 start + 1

Thread 1:: Dispatch queue: com.apple.VirtualDisplayListener
0   libsystem_kernel.dylib          0x000000010ead022a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x000000010ead076c mach_msg + 60
2   libsystem_kernel.dylib          0x000000010ead785c mach_msg_server_once + 284
3   com.apple.CoreDisplay           0x000000010c7f3630 0x10c7eb000 + 34352
4   libdispatch.dylib               0x000000010e7775f8 _dispatch_call_block_and_release + 12
5   libdispatch.dylib               0x000000010e77863d _dispatch_client_callout + 8
6   libdispatch.dylib               0x000000010e77e8e0 _dispatch_lane_serial_drain + 602
7   libdispatch.dylib               0x000000010e77f396 _dispatch_lane_invoke + 385
8   libdispatch.dylib               0x000000010e7876ed _dispatch_workloop_worker_thread + 598
9   libsystem_pthread.dylib         0x000000010eb2d611 _pthread_wqthread + 421
10  libsystem_pthread.dylib         0x000000010eb2d3fd start_wqthread + 13

Thread 2:
0   libsystem_kernel.dylib          0x000000010ead022a mach_msg_trap + 10
1   libsystem_kernel.dylib          0x000000010ead076c mach_msg + 60
2   com.apple.CoreDisplay           0x000000010c80d48f 0x10c7eb000 + 140431
3   com.apple.CoreDisplay           0x000000010c89fc6d 0x10c7eb000 + 740461
4   com.apple.CoreDisplay           0x000000010c89fd0f 0x10c7eb000 + 740623
5   libsystem_pthread.dylib         0x000000010eb2e2eb _pthread_body + 126
6   libsystem_pthread.dylib         0x000000010eb31249 _pthread_start + 66
7   libsystem_pthread.dylib         0x000000010eb2d40d thread_start + 13

Thread 3:
0   libsystem_pthread.dylib         0x000000010eb2d3f0 start_wqthread + 0

Thread 4:
0   libsystem_pthread.dylib         0x000000010eb2d3f0 start_wqthread + 0

Thread 5:
0   libsystem_pthread.dylib         0x000000010eb2d3f0 start_wqthread + 0

Thread 6:
0   libsystem_pthread.dylib         0x000000010eb2d3f0 start_wqthread + 0

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x00000001141445c0  rcx: 0x00007ffee4623f38  rdx: 0x0000000000000000
  rdi: 0x0000000000000307  rsi: 0x0000000000000006  rbp: 0x00007ffee4623f70  rsp: 0x00007ffee4623f38
   r8: 0x00000000000013a6   r9: 0xcccccccccccccccd  r10: 0x0000000000000000  r11: 0x0000000000000202
  r12: 0x0000000000000307  r13: 0x000000010c7e1000  r14: 0x0000000000000006  r15: 0x000000000000002d
  rip: 0x000000010ead62c6  rfl: 0x0000000000000202  cr2: 0x000000010eb302dc

Logical CPU:     0
Error Code:      0x02000148
Trap Number:     133

Binary Images:
       0x10b5da000 -        0x10b5dbfff  WindowServer (600.00 - 340.26) <ECD57D28-FB28-3D90-A231-9B4F085C8B8D> /System/Library/PrivateFrameworks/SkyLight.framework/Resources/WindowServer
       0x10b5e5000 -        0x10b893ffb  com.apple.SkyLight (1.600.0 - 340.26) <CD2A7069-6CEA-3737-9E9D-7AE2FED912AB> /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight
       0x10b97e000 -        0x10b97fffb  libSystem.B.dylib (1252.250.1) <1A13E822-B59C-3A36-A2E4-9968149714F9> /usr/lib/libSystem.B.dylib
       0x10b985000 -        0x10b986ff7  com.apple.AggregateDictionary (1.0 - 1) <A6AF8AC4-1F25-37C4-9157-A02E9C200926> /System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary


text:
Q: Can't read table data in as400 error SQL0204 I'm trying to find data in an AS400 either through Excel with ODBC or through the free DBeaver software. My problem is that of many tables I can read the name and properties but I can't read the data because I get the error "SQL0204 * FIRST in * N" etc.
For example I can read the DTLEG00F table but not the CEGENDS table.
Why?

A: It's complaining that no data member is in the table...
Either, there really isn't a data member, or perhaps the table is a Distributed Data Management (DDM) table.
From a 5250 command line, try the Display File Description (DSPFD) command.
You want to look at two sections, File description Header

and on the second page of Data Base File Attributes, number of members

Lastly, at the very bottom, there's a list of members

redpajama_set_name: RedPajamaStackExchange


text:
Q: Eigen 3 and overloading the new operator depending on template parameter to ensure proper alignment I am using the Eigen 3.1.1 library and MS Visual C++ 2010. I would like to implement a simple concurrent buffer that controls access to an element of a generic type T.
As I am working with Eigen types the new operator of the concurrent buffer must be overloaded if the buffer is instantiated with a fixed-size vectorizable Eigen type. See also:
Structures Having Eigen Members.
#include <boost/thread.hpp>
#include <Eigen/Geometry>   // required for the eigen macro

// abstract base class for all buffers
template <class T>
class ConcurrentBuffer
{
public:
    // virtual destructor to allow subclassing
    virtual ~ConcurrentBuffer(){}

    //virtual void get(T& elem) = 0;
    //virtual void put(const T& elem) = 0;
};

template<class T>
class SingleElementStorage : public ConcurrentBuffer<T>
{
public:
    // For fixed-size vect. Eigen types:
    typedef T Elem_type;
    enum { NeedsToAlign = (sizeof(Elem_type)%16)==0 };
    EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)

    SingleElementStorage() {}
    ~SingleElementStorage() {}

    //void get(T& elem);
    //void put(const T& elem);

private:
    T elem_;
    boost::shared_mutex mutex_;
};

This code compiles fine with MSVC++. My question is if this is the best way to realize such a buffer. Actually this code also compiles if only EIGEN_MAKE_ALIGNED_OPERATOR_NEW is used and the typedef and the enum are removed.
So why should I not simply put EIGEN_MAKE_ALIGNED_OPERATOR_NEW in every struct/class of my project?
Another related question: Is it somehow possible to put the macro into the abstract base class "ConcurrentBuffer" so that all derived classes do not need to add eigen specific implementations?

A: I glanced at the macro definition and it seems, that you don´t need to do the NeedsToAlign part on your side. Eigen is doing it already for you. It is also stated in the Eigen documentation to just use the macro alone (so why would this not be a good solution?).
Regarding your second question: The operator new will be declared without virtual, so I suppose(!) it will not work.


text:
Q: Exporting geodatabase feature class to shapefile changes the attribute table I'm using ArcGIS 10.4.1
DATA
I have several layers. I combined all of them into one layer using union. I saved the result of union in geodatabase based on the suggestion by @GISGe.
You can download the data from this link.
METHOD
I wanted to convert the geodatabase feature class to shapefile.
I did this using Feature Class to Feature Class. It went well without any errors however I found the columns of the attribute table of the shapefile created after using Feature Class to Feature Class messy as shown below.
BEFORE using Feature Class to Feature Class

AFTER using Feature Class to Feature Class

Any suggestions how can I fix this problem?
UPDATE
In response to the comments

*

*I have tried using right-click on the feature class in the geodatabase and export it to shapefile but it didn't work.

*I have tried Copy Features but it gave me the same result.

*I'm exporting the feature class to a different location not to the same geodatabase

A: There is a bug discovered in ArcGIS 10.3, so it probably applies to newer versions since it hasn't been solved:
Bug BUG-000084520 - Field values in a shapefile attribute table are corrupted when viewed in ArcGIS 10.3.
It shouldn't occur in older versions, but I can't test this to confirm, and it's probably not a convenient option for you neither.
Working with geodatabase feature classes instead of shapefiles seems to me to be the most reasonable (and easy) alternative.


text:
Q: Dynamically add css variable color from javascript to Sass Functions I'm trying to add dynamic color through javascript using css variables and then trying to use sass functions for that color, but i'm getting errors as sass is precompiled first. What is the other approach i can follow here? I'm okay to add any plugin or write a code in css for this particular part of code. Can any one please help me with this? I'm adding an example code pen for this particular issue i'm facing. Thanks in advance!
//code for SCSS file:

@import "compass/css3";
$color: var(--primary-color, #ffc53a);
$light: lighten(#{$color},50%);
$dark: darken($color,15%);
$lighter: lighten($color,30%);
$darker: darken($color,30%);

body {
  text-align: center;
  padding-top: 1em;
}

p {
  color: $color;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2em;

  &.light {
    color: $light;
  }
  &.dark {
    color: $dark;
  }
  &.lighter {
    color: $lighter;
  }
  &.darker {
    color: $darker;
  }
}

//code for JS file:
document.documentElement.style.setProperty('--primary-color', '#3cb878' );

Getting the following error:
"$color: "var(--primary-color, #ffc53a)" is not a color for `lighten'"

https://codepen.io/uidev5999/pen/RwKWjBj
Thanks

A: If you are looking for a solution in SASS the fastest answer to help you is:
IT INDEED IS NOT POSSIBLE.
As you described yourself, SASS is a pre processor: It CANNOT work with the values of CSS variables or with dynamic values from JS which are set/changed in the browser process when the work of SASS is over and SASS is not involved anymore. So you get an error if you try to use values of dynamic CSS variables in SASS at all.
THINKING FORWARD -
WHAT IS POSSIBLE: DOING COMPLETE DYNAMIC COLOR MANAGEMENT IN JS
If you indeed need to use dynamic colors by JS, you could implement complete dynamic color management in JS to prepare, manipulate (including lighting/darkening the colors), and set them to the elements in JS itself.
Indeed in your example, you started doing exactly this when you defined a css variable with a color value and assigned it to the :root element with JS: document.documentElement.style.setProperty('--primary-color', '#3cb878' );. In this way you are able to overwrite the colors which are set in SASS by writing them as CSS-Color-Variables.
Following this method, an approach to solve your question could be:

*

*Setup your basic standard colors in css variables and assign all CSS color variables to :root.

*Use these CSS variables for styling your elements.
NOTE: you can still use SASS: even though you cannot use SASS variables with the values of CSS variables, you are able to write CSS variables in SASS instead of using SASS variables!

*Do additional dynamic color management in JS and overwrite the css variables by using your technique.

Here are two links which may help:
Manipulating colors in JS:
https://blog.logrocket.com/how-to-manipulate-css-colors-with-javascript-fb547113a1b8/
Reading CSS variables in JS:
Access CSS variable from javascript

Additional hint / explanation: If you need color manipulation in SASS you can only do it on your known colors ...
// SASS example color manipulation to advise colors to css vars
$color_primary: #0000ff;
$color_primary_light: lighten($color_primary, 0.5);

:root {
    --color-primary: #{$color_primary};
    --color-primary-light: #{$color_primary_light};
}

// alternative: manipulate known color in CSS variable itself
$color_primary: #0000ff;

:root {
    --color-primary: #{$color_primary};
    --color-primary-light: #{lighten($color_primary, 0.5)};
}

// but you are not able to manipulate css variables in SASS
// SO THIS IS IMPOSSIBLE ANYWAY:
:root {
    --color-primary: #{$color_primary};
    --color-primary-light: #{lighten( var(--primary) ), 0.5)};
}


text:
Q: Orbeon's implementation of itemset element not able to traverse elements with namespaces? I am trying to run this code:
<xforms:select1 xmlns:xbl="http://www.w3.org/ns/xbl"
                                            xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                                            xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                                            appearance="xxforms:tree"
                                            bind="retrievalControl-bind"
                                            id="retrievalControl-control-laidOut">
<xforms:label ref="$form-resources/retrievalControl/label"/>
<xforms:help ref="$form-resources/retrievalControl/help"/>
<xforms:itemset nodeset="instance('fr-form-instance')/retrievalSection/retrievalControl/*/*/APP">
    <xforms:label ref="NAME"/>
    <xforms:value />
</xforms:itemset>

where retrievalControl contains this document:
<?xml version="1.0" encoding="utf-8"?><jax-rx:results xmlns:jax-rx="http://jax-rx.sourceforge.net"><jax-rx:result><APP count="1">
        <NAME>ABCD</NAME>
        <ID>12</ID>
    </APP>
</jax-rx:result></jax-rx:results>

But it does not work (no items created for select1).  If I remove / */ */APP, so as to print the whole document as an item label (by modifying label to ref=".", it spews out the data.
Cannot figure out why it can't traverse the elements which have jax-rx specified as ns...any workarounds (the query works fine in XMLSpy)?
Update based on the earliest response (Jan 27) below:
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
        xmlns:ev="http://www.w3.org/2001/xml-events"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
<xhtml:head>
    <xforms:model>
        <xforms:instance>
            <instance>
                <weird/>
            </instance>
        </xforms:instance>
        <xforms:instance id="fr-form-instance">
            <form>
                <retrievalSection>
                    <retrievalControl>
                        <jax-rx:results xmlns:jax-rx="http://jax-rx.sourceforge.net">
                            <jax-rx:result>
                                <APP count="1">
                                    <NAME>ABCD</NAME>
                                    <ID>12</ID>
                                </APP>
                            </jax-rx:result>
                        </jax-rx:results>
                    </retrievalControl>
                </retrievalSection>
            </form>
        </xforms:instance>
        <xforms:bind id="fr-form-binds" nodeset="instance('fr-form-instance')">
            <xforms:bind id="retrievalSection-bind" nodeset="retrievalSection" name="retrievalSection">
                <xforms:bind id="retrievalControl-bind" nodeset="retrievalControl" name="retrievalControl"/>
            </xforms:bind>
        </xforms:bind>
        <xforms:submission resource="http://AURLWhereOurExampleDataFileIsAvailale"
                           method="get"
                           id="getData"
                           replace="text"
                           instance="fr-form-instance"
                           targetref="/instance/weird"
                           serialization="none">
            <xforms:message ev:event="xforms-submit-error" level="modal">A submission error occurred:<xforms:output value="event('error-type')"/>
            </xforms:message>
        </xforms:submission>
        <xforms:send ev:event="xforms-ready" submission="getData"/>
    </xforms:model>
</xhtml:head>
<xhtml:body>
    <xforms:select1 xmlns:xbl="http://www.w3.org/ns/xbl"
                    xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                    xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                    appearance="xxforms:tree"
                    bind="retrievalControl-bind"
                    id="retrievalControl-control-laidOut">
        <xforms:itemset nodeset="instance('fr-form-instance')">
            <!--<xforms:itemset nodeset="instance('fr-form-instance')/retrievalSection/retrievalControl/*/*/APP">-->
            <!--<xforms:itemset nodeset="instance()/*/*/APP">-->
            <xforms:label ref="."/>
            <xforms:value/>
        </xforms:itemset>
    </xforms:select1>
</xhtml:body>

I investigated the problem further based on the 1st response below and the problem seems not with the ability to parse elements with namespaces, but perhaps with how the XForms Submission has been implemented (or my poor understanding, in which case I request be corrected via a response to this question).  The problem with XForms Submission is faulty instance replacement when attempted with replace="text", but probably also affects replace="instance", it appears replacement occurs a) on only the default instance and b) it occurs incorrectly compared to what the spec says, which is (from http://www.w3.org/TR/xforms11/#submit-data-replacement):
If the replace attribute contains the value "text" and the submission response conforms to an XML mediatype (as defined by the content type specifiers in [RFC 3023]) or a text media type (as defined by a content type specifier of text/*), then the response data is encoded as text and replaces the content of the replacement target node.
Okay, this can be proved by populating the whole content of the instance in an item-label in select1, note that the submission ID getData in above is attempting to replace a targetref which does not even exist in the instance ID referenced, but it works (it does not work if I put the targetref correctly for the instance ID referenced; in other words, it works only if the targetref points to a valid node in the 'default' instance (which happens to be the first instance), not the instance ID referenced.
And even when it works, it does not replace the content in the targetref node (and I do not know where exactly it (submission replacement mechanism of Orbeon) places that content, all I know is it places that content somewhere in the default instance, but where - in a newly created text node?)
You will need to modify submission resource to a URL where the example data-file is available, sorry could not make it more self-contained.

A: I suspect that <retrievalControl> does not really contain that <jax-rx:results> as you expect it to. If I create a stand-alone example which puts together the pieces you pasted, everything works as expected (see below). Would you have a complete (and as minimal as possible) example that reproduces this?
<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
            xmlns:xforms="http://www.w3.org/2002/xforms"
            xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
            xmlns:ev="http://www.w3.org/2001/xml-events"
            xmlns:xs="http://www.w3.org/2001/XMLSchema"
            xmlns:fr="http://orbeon.org/oxf/xml/form-runner">
    <xhtml:head>
        <xforms:model>
            <xforms:instance>
                <instance>
                    <select1/>
                    <jax-rx:results xmlns:jax-rx="http://jax-rx.sourceforge.net">
                        <jax-rx:result>
                            <APP count="1">
                                <NAME>ABCD</NAME>
                                <ID>12</ID>
                            </APP>
                        </jax-rx:result>
                    </jax-rx:results>
                </instance>
            </xforms:instance>
        </xforms:model>
    </xhtml:head>
    <xhtml:body>
        <xforms:select1 xmlns:xbl="http://www.w3.org/ns/xbl"
                        xmlns:fb="http://orbeon.org/oxf/xml/form-builder"
                        xmlns:pipeline="java:org.orbeon.oxf.processor.pipeline.PipelineFunctionLibrary"
                        appearance="xxforms:tree"
                        ref="select1"
                        id="retrievalControl-control-laidOut">
            <xforms:itemset nodeset="instance()/*/*/APP">
                <xforms:label ref="NAME"/>
                <xforms:value/>
            </xforms:itemset>
        </xforms:select1>
    </xhtml:body>
</xhtml:html>

A: XForms 1.1 says about targetref:

"The in-scope evaluation context of
  the submission element is used to
  evaluate the expression".

You write in your example:
<xforms:submission resource="http://AURLWhereOurExampleDataFileIsAvailale"
                   method="get"
                   id="getData"
                   replace="text"
                   instance="fr-form-instance"
                   targetref="/instance/weird"
                   serialization="none">

The instance attribute does not modify the in-scope evaluation context (as far as I can read the spec), so here targetref it's not relative to the instance attribute, but to the submission's in-scope evaluation context, which, since you did not specify a ref attribute, is the default (first) instance.
Basically, if you use targetref, don't use instance as things then get confusing.
So remove the instance attribute, and write targetref="instance('fr-form-instance')/weird".
Now if you do this with your updated example above, you will get an xforms-submit-error, as the node doesn't exist in the second instance.
Let's see if this gets you further.


text:
Q: Angular guard with http request i'm trying to make guard, but i cant return value after subscribe
This code returns error TS2366: Function lacks ending return statement and return type does not include 'undefined'.
I checked some solutions and they using map instead of subscribe, but i'm getting this error TS2339: Property 'map' does not exist on type 'Observable '.
guard code
export class AuthGuard implements CanActivate, CanActivateChild {

  constructor(private auth:AuthService, private router:Router) {
  }

  canActivate(route:ActivatedRouteSnapshot, state:RouterStateSnapshot):Observable<boolean>{
    if (!this.auth.isAuth) {
      if (!localStorage.getItem('token')){
        this.router.navigate(['/login'])
        return of(false);
      }

      this.auth.checkAuth().subscribe(
        (data) => {
          if (this.auth.isAuth){
            return of(true)
          } else {
            this.router.navigate(['/login'])
            return of(false)
          }
        }
      )

    }else {
      return of(true);
    }
  }

  canActivateChild(route:ActivatedRouteSnapshot, state:RouterStateSnapshot):Observable<boolean>{
    return this.canActivate(route, state)
  }
}

checkAuth code
checkAuth():Observable<UserDto>{
     return this.http.get<UserDto>(`/api/user/refresh`, {withCredentials:true, observe:'body', responseType:'json'})
        .pipe(
          tap(
            (data) => {
              localStorage.setItem('token', data.accessToken)
              this.setAuth(true)
              this.setUser(data.user)
            },
            (error) => {
              console.log(error)
            }
          )
        )
  }

A: *

*First of all, you code shows wrong usage for the RxJS and angular

*Second, convert you subacribe to map, ie instead

this.auth.checkAuth().subscribe(
    (data) => {
      if (this.auth.isAuth){
        return of(true)
      } else {
        this.router.navigate(['/login'])
        return of(false)
      }
    }
  )

Write (notice return before, that's the reason for your error)
return this.auth.checkAuth().pipe(
        map(data => {
          if (this.auth.isAuth){
            return true;
          } else {
            this.router.navigate(['/login'])
            return false;
          }
        }
      ):


text:
Q: Antonym of "recommend" What's the antonym of recommend? For example:

I recommend that item!

I tried to use unrecommend, but the spell-checker throws an error and it sounds stupid as well!

A: I would suggest "caution against."

A: I would suggest "advise against."

A: M-W dictionary lists no antonyms.
Dictionary.com lists:  disapprove, discourage, dissuade but I don't think those really fit as direct antonyms.
Usually in my experience you'd say recommend against.
---Update to add--- As FumbleFingers mentioned in a comment, advise against is an equally valid alternative (and seemingly more popular in British English, as this NGram would suggest).

A: "I recommended against that item"

A: Strictly speaking, discommend is the antonym, although it doesn't work in all contexts, and has become nearly obsolete.
I agree with @breen that advise against is the modern antonym phrase.

A: Upvote:
I recommend that answer. | That answer is recommended.
Downvote:
I advise against that answer. | That answer is ill-advised.

A: Frankly, I'm surprised that no one has suggested deplore.  While I concur with many of the other answers, I would not encourage, advocate, urge, esteem, or prescribe their use.

A: In technical computer manuals we use the word "deprecate".

A: How about,

*

*I disapprove of this item

*I discourage using this item

*I dissuade using this item

A: discourage fits somewhat, but not by itself.
"I discourage you from using that item."

A: As @breen and others have said, the standard phrasing for the opposite of I recommend is probably I advise against.
But if you're not really interested in specifying who advises against something, you might consider deprecate - to express earnest disapproval of. Saying something is deprecated is standard terminology in the context of software components/methods, but there's no reason why it couldn't be used more widely.
Usage for deprecated was declining before its recent revival in computing, probably because of overlap with depreciate. But for the time being I'd stick with the past particple, and avoid, for example, "I deprecate that course of action".

A: Come on, upvote means recommend while downvote means the opposite!
So please recommend my answer to the OP simply means upvote my answer please!
Just for fun :)

A: Ye who arrived here as I did, hunting antonyms for this word on google, perhaps consider also:

*

*condemn - express complete disapproval of, typically in public

*censure - express severe disapproval of, typically in a formal statement.

*denounce - publicly declare to be wrong or evil.

*decry - publicly denounce [so... denounce, then?]

*criticize - indicate the faults of, in a disapproving way.

*vilify - speak or write about in an abusively disparaging manner.

*deprecate - express disapproval of. [Suggested by others]

*proscribe - 1) forbid, especially by law. 2) denounce or condemn.

*disparage - regard or represent as being of little worth.
(All definitions from Google's define command, with my italics to highlight main differences in usage, and my [comments])

A:
disapprove, discourage, dissuade

Those are the words, now you must know in which situation each should be used.

A: How about simply "recommend against"

I recommend against doing so

A: I would simply negate recommend into do not recommend
eg: I recommend x. I do not reccomend y.


text:
Q: Customize X control on react-native-video Is there any possibility to customise the event on X for react-native-video?
To summarise my problem i have an app when on press play it will trigger a modal with a fullscreen video and starts to play automatically, this is the behavior i was seeking.
Video example
But then my issue is when i close the video it looks like is still playing on background. I tried to pass a onClose prop to close the modal but still facing the same issue.
This is what i tried:
Parent component:
              <Modal
                style={{justifyContent: 'center', alignItems: 'center'}}
                animationType="slide"
                transparent={false}
                visible={modalVisible}
                supportedOrientations={['portrait', 'landscape']}
                onRequestClose={() => {
                  setModalVisible(!modalVisible);
                }}>
                 {modalVisible && <View
                  style={{
                    backgroundColor: colors.background,
                    justifyContent: 'center',
                    alignItems: 'center',
                  }}>
                  <VideoPlayer onClose={() => setModalVisible(!modalVisible)}/>
                </View>}
              </Modal>

Video player:
import React, {
  Component
} from 'react';

import {
  StyleSheet,
  Dimensions,
} from 'react-native';

import Video from 'react-native-video';

// Dimensions
const {width, height} = Dimensions.get('screen');

class VideoPlayer extends Component {
  constructor(props) {
    super(props);

    const isPortrait = () => {
      const dim = Dimensions.get('screen');
      return dim.height >= dim.width;
    };

    this.state = {
      orientation: isPortrait() ? 'portrait' : 'landscape'
    }

     // Event Listener for orientation changes
     Dimensions.addEventListener('change', () => {
      this.setState({
        orientation: isPortrait() ? 'portrait' : 'landscape'
      });
    });
  }

  render() {

    return (
        <Video
        fullscreen={true}
        onFullscreenPlayerWillDismiss={() => this.props.onClose()}
        onEnd={() => this.props.onClose()}
        playWhenInactive={false}
        playInBackground={false}
        ref={p => { this.videoPlayer = p; }}
        source={{uri: 'https://rawgit.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4'}}
        style={{width: this.state.orientation === 'landscape' ? height : width, height: this.state.orientation === 'landscape' ? width : height }}
        controls={true}
        fullscreenOrientation="all"
      />
    )

  }

}

const styles = StyleSheet.create({
  backgroundVideo: {
    position: 'absolute',
    top: 0,
    left: 0,
    bottom: 0,
    right: 0,
  },
});

export default VideoPlayer;

If anyone faced similar issue please let me know.
Thanks in advance.

A: Solved by using the package react-native-video-controls and customise the onBack prop:
<VideoPlayer
        onBack={() => this.props.onClose()}
        fullscreen={true}
        onExitFullscreen={() => this.props.onClose()}
        onEnd={() => this.props.onClose()}
        playWhenInactive={false}
        playInBackground={false}
        source={{uri: 'https://rawgit.com/mediaelement/mediaelement-files/master/big_buck_bunny.mp4'}}
        fullscreenOrientation="all"
      />


text:
Q: List chapters of a book from a public books API? Anyone knows of a web service where I could get either the number of chapters or list the chapter names of a book?
I've checked Google Books API and couldn't find this info.
Thank you.

A: You might want to have a look at the Open Librayr API: https://openlibrary.org/dev/docs/api/books
The jscmd=details query parameter might be of use for you, since it returns a table of contents.


text:
Q: mac 10.8.3 - current recommendations on installing ruby I have postgres, ruby, and rails, rvm, and homebrew installed on an iMac and a macbook.  I  have a new macbook  pro (osx 10.8.3) to setup and want to know what is the current suggested best way to go about it.
there are lots of suggestions out there, many of them old.
There are so many ways to install each of these.... I ended up with 3 installations of postgres on one machine!
Should I install ruby first then postgres or postgres first?
Should I follow these instructions
http://installfest.railsbridge.org/installfest/
Should I use railsinstaller? postgres app?  homebrew?
I'd rather be asking current recommendations on how to install fresh before making any mistakes and then having a bad install.
Thanks!

A: I don't think there really is a one size fits all method. Some things are simply personal preference. For example I love homebrew and I install a lot of things via that. I'm also a big fan of rvm but some people prefer rbenv. Is one better than the other? Of course. But which is better for you, depends on you.
A simple guide that will get you most of the way there can be found here: https://coderwall.com/p/auvm9g. If you don't need MySQL skip that part. For Postgresql I use Postgres.app which you can find here: http://postgresapp.com/
This will get you setup with rvm and homebrew and has served me well. But again, so much of it is just personal preference. You might find homebrew doens't suit you or you would prefer rbenv over rvm.


text:
Q: Adding Bootstrap img-responsive class to Wordpress images fails at gallery thumbs I'm working on a Bootstrap 3 Wordpress theme. To make my images responsive I added Bootstrap's img-responsive class to them with the following code in my functions.php

<?php

   function bootstrap_responsive_images( $html ){
  $classes = 'img-responsive'; // separated by spaces, e.g. 'img image-link'

  // check if there are already classes assigned to the anchor
  if ( preg_match('/<img.*? class="/', $html) ) {
    $html = preg_replace('/(<img.*? class=".*?)(".*?\/>)/', '$1 ' . $classes . ' $2', $html);
  } else {
    $html = preg_replace('/(<img.*?)(\/>)/', '$1 class="' . $classes . '" $2', $html);
  }
  // remove dimensions from images,, does not need it!
  $html = preg_replace( '/(width|height)=\"\d*\"\s/', "", $html );
  return $html;
}
add_filter( 'the_content','bootstrap_responsive_images',10 );
add_filter( 'post_thumbnail_html', 'bootstrap_responsive_images', 10 );

This works pretty well, all  get their class="img-responsive" except the thumbs in galleries. They only hav class="attachment-thumbnail or attachment-medium" depending on te choosen image size.
Any ideas?

A: Just use the same CSS bootstrap uses for .img-responsive and create a selector for your image galleries and apply that CSS to your new selector


text:
Q: Android Lollipop Network API and OkHttp I running into an issue routing network calls using OkHttp. I'm trying to send HTTP requests to a local device (via the device's ip) using an Access Point that has no internet access. Due to some changes in Android 5.0, OkHttp will try to route the request over data instead, which then fails.
In Android 5.0's Network API, I could use the NetworkCapabilities class along with the NetworkRequest.Builder in order to tell the request to only go over Wi-Fi, However, I'm already using OkHttp and I don't want to overhaul my code. Is there anyway to do a similar thing with OkHttp?

A: I came up with a workaround:
final Network currentNetwork = (Network) network;
newClientBuilder.socketFactory(((Network)network).getSocketFactory())
    .dns(new Dns() {
          @Override
          public List<InetAddress> lookup(String hostname) throws UnknownHostException {
                        return Arrays.asList(currentNetwork.getAllByName(hostname));
                    }
                });

A: We'd like to eventually include such functionality directly in OkHttp, and you might be the first volunteer/victim to test things out. What you probably want to do is use OkHttp 2.6's new Dns interface to call through to the network of your choice. If that works, either the IP address will cause OkHttp to do the right thing anyway, or you'll also need to replace the SocketFactory.


text:
Q: Regex to get parameterized URL out of URL received WE can an api with input say "1" and it response it can return any of below values which is again URL:
https://www.example.com/1
https://www.example.com/1.json
https://www.example.com/json1.json
https://www.example.com/233

Idea is to then create URL out of it so we can call above for other values like 1 to 10.
Expected output for above should be:
https://www.example.com/%d
https://www.example.com/%d.json
https://www.example.com/json%d.json
https://www.example.com/%d

I tried regex it worked until recent usecase broke https://www.example.com/0001, was exepecting https://www.example.com/000%d but it came as https://www.example.com/%d so i am thinking how can i build generic solution ?
Code i use currently:
function checkIfUniqueURL(url) {
    console.log(url)
    urlArr = url.split("/");
    var last = urlArr[urlArr.length - 1];
    if (last.includes(".")) {
        var first = last.split(".")[0]
        if (/^\d+$/.test(first)) {
            console.log( url.substr(0, url.lastIndexOf("/") + 1).concat(last.replace(/\d+/g, "%d")))
        }
        else {

            console.log(url.substr(0, url.lastIndexOf("/") + 1).concat(last.replace(/\d+/g, "%d")))
        }
    } else {
        if (/^\d+$/.test(last)) {
            console.log(url.substr(0, url.lastIndexOf("/") + 1).concat(last.replace(/\d+/g, "%d")));
        } else {
            console.log(url)
        }
    }
}

Any assistance ?

A: Code:
function findReplaceableNumberInLastWord(url) {
  console.log('input: ' + url);
  var indexOfFirstNonZeroDigit = url.lastIndexOf("/") + 1;
  var i = indexOfFirstNonZeroDigit;
  var indexOfLastDigit = indexOfFirstNonZeroDigit;
  for (; i < url.length; i++) {
    var c = url.charAt(i);
    if (/^[1-9]$/.test(c)) {
      break;
    } else {
      indexOfFirstNonZeroDigit++;
    }
  }
  indexOfLastDigit = indexOfFirstNonZeroDigit;
  for (; i < url.length; i++) {
    var c = url.charAt(i);
    if (/^[0-9]$/.test(c)) {
      indexOfLastDigit++;
    } else {
      break;
    }
  }
  var output = url.substr(0, indexOfFirstNonZeroDigit) + '%d' + url.substr(indexOfLastDigit);
  console.log('output: ' + output);
  return output;
}

var url = 'https://www.example.com/0001';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/0123';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/1023';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/1';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/1.json';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/json1.json';
findReplaceableNumberInLastWord(url);
url = 'https://www.example.com/233';
findReplaceableNumberInLastWord(url);

Results:
"input: https://www.example.com/0001"
"output: https://www.example.com/000%d"
"input: https://www.example.com/0123"
"output: https://www.example.com/0%d"
"input: https://www.example.com/1023"
"output: https://www.example.com/%d"
"input: https://www.example.com/1"
"output: https://www.example.com/%d"
"input: https://www.example.com/1.json"
"output: https://www.example.com/%d.json"
"input: https://www.example.com/json1.json"
"output: https://www.example.com/json%d.json"
"input: https://www.example.com/233"
"output: https://www.example.com/%d"


text:
Q: How to replace a property in a json file in powershell I'm having a difficult time reading in a JSON file in powershell, replacing a value and writing back to the file or a file.
Given the following:
[Object]$QuickJson = @'
{
    "swagger": "1.0",
    "info": {
        "version": "0.0.1",
        "title": "this is a title",
        "description": "this is a description"
    },
    "basePath": "/test",
    "paths" : {
        "/GetSomething": {
            "get": {
                "name" : "test01"
            }
        },
        "/GetSomethingElse" : {
            "get": {
                "name" : "test02"
            }
        },
        "/GetAnotherThing": {
            "get": {
                "name" : "test03"
            }
        }
    }
}
'@

What I'm interested in here is replacing the values in the "paths" object with something else. I read the file and can access the object however with what I'm trying:
[object]$MyPSJson = ConvertFrom-Json -InputObject $QuickJson

foreach($info in $MyPSJson.paths.PSObject.Properties)
{
    $path = $info.Name
    Write-Host "path: $path"
    $info.Name = "$path?code=fsfsfsfsfsfdfds"

    Write-Host $info.Name
}

I don't know what those "paths" will be, I need to take the existing value and append a code value to it so I need to be able to iterate through all the paths and do this replacement. When I try the above I get an error:

path: /GetSomething
  -- 'Name' is a ReadOnly property. At C:\scripts\test.ps1:44 char:5
  +     $info.Name = "$path?code=fsfsfsfsfsfdfds"
  +     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
      + FullyQualifiedErrorId : PropertyAssignmentException

I've tried several different things and yet to come up with a good, or workable for that matter, solution. Any help or pointing in the right direction is greatly appreciated.

A: You could do something very similar to what you have now, just instead of changing the existing properties you record the initial properties, add new ones with the modifications you want, then set $MyPSJson.paths to itself excluding the old properties, so all it has are the new properties.
#Find initial paths
$Paths=$MyPSJson.paths.psobject.Properties.Name

#Add new paths with the modification to the name, and set the value to the same as the old path
$Paths|%{Add-Member -InputObject $MyPSJson.paths -NotePropertyName "$_`?code=fsfsfsfsfsfdfds" -NotePropertyValue $MyPSJson.paths.$_}

#Set the paths object to itself, excluding the original paths
$MyPSJson.paths = $MyPSJson.paths|Select * -ExcludeProperty $Paths

A: Try the following (PSv3+):
$MyPSJson.paths = $MyPSJson.paths.psobject.properties |
  ForEach-Object { $renamedProps = [ordered] @{} } {
    $renamedProps[$_.Name + '?foo=bar&baz=bam'] = $_.Value
  } { [pscustomobject] $renamedProps }

Of technically necessity, this recreates the .paths object with modified property names.
It does so by enumerating the original properties, adding their values under the modified name to an ordered hashtable, which on completion of the pipeline is converted to a custom object ([pscustomobject]).

As for what you tried:
A given object's properties cannot be renamed - only its properties' values can be changed.
Therefore, you must create a new object with the desired new property names and the same values as the original.
As an aside: an [object] cast is pointless in PowerShell - it is an effective no-op.
By contrast, a [pscustomobject] cast can be used to create [pscustomobject] instances from [ordered] hashtables, which is the technique used above; casting from other types is again a virtual no-op.

A: In addition to the accepted answer which worked for me I also found another way which was initially suggested which was to use a hashtable:
function Convert-JsonFileToHashTable([string]$file) {
    $text = [IO.File]::ReadAllText($file)
    $parser = New-Object Web.Script.Serialization.JavaScriptSerializer
    $parser.MaxJsonLength = $text.length
    $hashtable = $parser.Deserialize($text, @{}.GetType())

    return $hashtable
}

$hashtable = Convert-JsonFileToHashTable (Resolve-Path -Path $DefinitionFile)

$keys = New-Object System.Collections.ArrayList($null)
$keys.AddRange($hashtable["paths"].Keys)
foreach ($key in $keys)
{
    $newPath = $key + "?code=$Code"
    $hashtable["paths"].$newPath = $hashtable["paths"].$key
    $hashtable["paths"].Remove($key) | Out-Null
}

$json = $hashtable | ConvertTo-Json -Depth 20
Write-Output $json | Out-File $newFile -Encoding utf8


text:
Q: How to add specific columns for hover over effect in plotly bar chart I am plotting a bar chart and I want to reflect certain columns when hovering over those. How would I add that?
My dataframe
Date       | Sku1 | Sku2 |...|Total_accounts|Total_purchases
2020-01-01 | 12  | 34    | ..| 33           | 55
2020-03-01 | 122 | 343   | ..| 35           | 35
2020-04-01 | 11  | 12    | ..| 13           | 65

However, when plotting the chart, I want to keep the last two columns for hovering purposes (not plotting) and the only SKUS should be displayed in the bars.  How do I tweak this?
My plotly code is:
fig=px.bar(df.set_index("Date").pipe(lambda d: d.div(d.sum(axis=1), axis=0)).reset_index(),
   x="Date",
   y=[c for c in df.columns if c != "Date"],).update_xaxes(title='Test', visible=True, showticklabels=True).update_yaxes(title='Test', visible=True, showticklabels=False)
fig.show()

A: If you only do the necessary columns of data to be graphed, you will get the intended shape. If you specify the original data frame as the hover data, it will be displayed as hover data.
import plotly.express as px

dff = df[['Date','Sku1','Sku2']].set_index("Date").pipe(lambda d: d.div(d.sum(axis=1), axis=0)).reset_index()
fig = px.bar(dff, x="Date",
             y=[c for c in dff.columns if c != "Date"],
             custom_data=[df['Total_accounts'], df['Total_purchases']],
            )
fig.update_xaxes(title='Test', visible=True, showticklabels=True)
fig.update_yaxes(title='Test', visible=True, showticklabels=False)
fig.update_traces(hovertemplate='Date:%{x}
value:%{value}
Total_accounts:%{customdata[0]}
Total_purchases:%{customdata[1]}')

fig.show()


text:
Q: How to write SQL Function where YEAR() in laravel controller I want to fetch data from database which has booking year is 2022, and the column I have is tanggal_take whose value format is 'Y-m-d', so I want to use SELECT * FROM table_name WHERE YEAR(tanggal_take) = "2022"; How to write it in laravel controller using Eloquent?
here is my code now
$data = Booking::join('users', 'users.id', '=', 'bookings.id_member')
                            ->join('packages', 'packages.kode_paket', '=', 'bookings.kode_paket')
                            ->where( DB::raw('YEAR(bookings.tanggal_take)'), '=', $request->range )
                            ->get(['bookings.*', 'packages.*', 'users.*']);

The result is 0 but in database i have 4 datas with year 2022. I also already change ->where( DB::raw('YEAR(bookings.tanggal_take)'), '=', $request->range ) to ->whereYear('bookings.tanggal_take', '=', $request->range ) but still 0 result. Any hint? I will also looking for documentation by my self rn. Thanks


text:
Q: Tensorflow bazel build failing - not generating bazel-bin directory I'm trying to install Tensorflow from the source using the following configuration:

*

*NVIDIA GTX 1070

*UBUNTU 16.04

*CUDA 8.0

*Cudnn v5.0

I have followed the following steps from here:

*

*installed bazel

*installed dependencies

*installed CUDA support

*./configure with CUDA 8.0 support

*bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
After this step, to my knowledge, there should be a bazel-bin directory, so that I can subsequently execute
$ bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg

# The name of the .whl file will depend on your platform.
$ sudo pip install /tmp/tensorflow_pkg/tensorflow-0.10.0rc0-py2-none-any.whl

However, there is no such directory.
I have a feeling this error message might have something to do with it?
ERROR: /usr/local/lib/python2.7/dist-packages/tensorflow_clone/tensorflow/contrib/rnn/BUILD:45:1: error while parsing .d file: /home/volcart/.cache/bazel/_bazel_volcart/62dff5ffffc63bcd8a9350984645e0be/execroot/tensorflow_clone/bazel-out/local_linux-opt/bin/tensorflow/contrib/rnn/_objs/python/ops/_lstm_ops_gpu/tensorflow/contrib/rnn/kernels/lstm_ops_gpu.cu.pic.d (No such file or directory).
nvcc warning : option '--relaxed-constexpr' has been deprecated and replaced by option '--expt-relaxed-constexpr'.
In file included from third_party/gpus/cuda/include/cuda_runtime.h:78:0,
                 from <command-line>:0:
third_party/gpus/cuda/include/host_config.h:115:2: error: #error -- unsupported GNU version! gcc versions later than 5.3 are not supported!
 #error -- unsupported GNU version! gcc versions later than 5.3 are not supported!

Upon re-executing bazel build ... I found this...
WARNING: /usr/local/lib/python2.7/dist-packages/tensorflow/util/python/BUILD:11:16: in includes attribute of cc_library rule //util/python:python_headers: 'python_include' resolves to 'util/python/python_include' not in 'third_party'. This will be an error in the future.

I should also add this...
$ bazel version
Build label: 0.3.1
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jul 29 09:09:52 2016 (1469783392)
Build timestamp: 1469783392
Build timestamp as int: 1469783392

A: bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
Caused a permissions issue. Added sudo
sudo bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package


text:
Q: Instant search using fulltext instead of LIKE php mysql I want to do an instant search for my website using jquery php and mysql.
Previously i used to take the text from .searchbox on keyup and send request to php via ajax.
PHP
$query="Select from names where concat(fname," ",lname) Like '$search%' "
this would work fine. But i heard Fulltext is tons time faster than LIKE. But its happens to work only if someone writes a full name .
Therefore fails to autocomplete searches. I wonder whether is there any alternative to my above code which is way much faster using fulltext or any other means.

A: If you're looking for a robust search system, then you need to look into Apache Lucene. From what I read in several forums, MySQL FullText is really slow comparing to Apache Lucene. You can also look into Apache Solr (which is based on Apache Lucene).
If you're trying to build an Autocomplete Field, then you need to look into:
 - Twitter's Typeahead
 - jQuery UI
Here you can find a good tutorial for an Autocomplete Field:
http://www.pontikis.net/blog/jquery-ui-autocomplete-step-by-step

A: I suggest
in PHP
$search_name=explode(" ", addslashes($search));
fname =  $search_name[0];
if(!empty($search_name[1])) {
    $lname = $search_name[1];
    $sql_add = "(lname LIKE '$lname%') OR";
} else $sql_add="";

in sql
"Select from names where $sql_add fname LIKE '$fname%'"

It is true that maybe will have a lot of results, but that is better than some of the results are lost because of sql condition.


text:
Q: Why "mouseover".equals(event.getType()) is not recognized in GWT Header? I have a table with a nameColumn.
I want that when user mouseOver the title of nameColumn it will trigger a method
I tried:
Header<String> nameColumnHeader = new Header<String>(new ClickableTextCell()) {
        @Override
        public String getValue() {
            return "Name";
        }

        @Override
        public final void onBrowserEvent(Context context, Element elem, NativeEvent event) {
         if ("mouseover".equals(event.getType())) {
           //
           meaningMessagesPopup.show();
         }
         else if("mouseout".equals(event.getType())){
             meaningMessagesPopup.hide();
         }
        }
    };
table.addColumn(nameColumn, nameColumnHeader);

But seem Gwt did not recognize "mouseover".equals(event.getType())
Do you know how to do the MOUSEOVER event in GWT Header?

A: i found the answer, that is to create a CustomCell that extends AbstractCell
     private class HeaderCell extends AbstractCell<String> {

            private String text;

            public HeaderCell(String text) {
              /*
               * Let the parent class know that our cell responds to click events and
               * keydown events.
               */
              //super("click", "keydown");
                super("mouseover");
                this.text=text;

            }

            @Override
            public void onBrowserEvent(Context context, Element parent, String value,
                NativeEvent event, ValueUpdater<String> valueUpdater) {
              // Check that the value is not null.
              if (value == null) {
                return;
              }

              // Call the super handler, which handlers the enter key.
              super.onBrowserEvent(context, parent, value, event, valueUpdater);

              if ("mouseover".equals(event.getType())) {
                  SafeHtmlBuilder sb=new SafeHtmlBuilder();
                    sb.appendHtmlConstant("");

                    sb.appendHtmlConstant("");
                    sb.appendEscaped(text);
                    sb.appendHtmlConstant("");

                    meaningMessagesPopup.setWidget(new HTML(sb.toSafeHtml()));

                    int left = event.getClientX() -140;
                    int top = event.getClientY() +30;
                    meaningMessagesPopup.setPopupPosition(left, top);

                        // Show the popup
                    meaningMessagesPopup.show();
              }
              else if ("mouseout".equals(event.getType())) {
                  meaningMessagesPopup.hide();
              }
            }

            @Override
            public void render(Context context, String value, SafeHtmlBuilder sb) {
              /*
               * Always do a null check on the value. Cell widgets can pass null to
               * cells if the underlying data contains a null, or if the data arrives
               * out of order.
               */
              if (value == null) {
                return;
              }

              sb.appendEscaped(value);
            }

        }

Then
  Header<String> nameColumnHeader = new Header<String>(new HeaderCell("my Text...")) {
                    @Override
                    public String getValue() {
                        return "Name";
                    }
  };
  table.addColumn(nameColumn, nameColumnHeader);


text:
Q: Convert Python to Haskell / Lambda calculus What is the Python code in Haskell and Lambda calculus?
def f1():
   x = 77
   def f2():
      print x
   f2
f1

My attempt in lambda calculus
\x. 77 (\x.x)

A: In Haskell:
f1 = f2
    where x  = 77
          f2 = print x

Refactoring, since IO just confuses the issue:
f1 = f2
    where x  = 77
          f2 = x

Refactoring:
f1 = x
    where x = 77

Refactoring, since you want the variable?
f1 = (\x -> x) 77

Beta reduce:
f1 = 77

And you have your program in Haskell.
Lambda calculus doesn't have numeric literals (unlike Haskell), so we must use Church numerals.
So compiling "77" to lambda calculus:
f1 = \f.\x. f (f (f (f ( ... ) x)))

And there's your Python program in Lambda Calculus.

A: Haskell:
f1 :: IO ()
f1 = let x = 77
         f2 = print x
     in f2

main :: IO ()
main = f1

Or to be more like your lambda calculus:
f1 :: Int
f1 = let f2 = x
         x = 77
     in f2

main :: IO ()
main = print f1

A: I don't know python, so I could be completely wrong, but this is my Haskell interpretation.
f1 = let x = 77 in show x

Or, since you've got a constant there
f1 = show 77

A: In lambda calculus:
λprint. print 77


text:
Q: php array_values() parameter error What is the mistake in my parameter?
protected function _construct()
{
     $this->_init("sync/queue", "id");
}

My sync/queue ->
I get

Warning: array_values() expects parameter 1 to be array, object given
  in
  C:\xampp\htdocs\magento2x_2\lib\internal\Magento\Framework\Interception\Interceptor.php
  on line 146

A: This error is caused from Plug-in configuration from your custom Module, Not the _construct().
Assume you have used Plug-in and missed some method in your module.
Expected the breaking.
    $pluginMethod = 'around' . $capMethod;
    $result = $pluginInstance->$pluginMethod($this, $next, ...array_values($arguments));
    unset($pluginInstance, $pluginMethod);

Hope this helps.


text:
Q: An $M$-sequence stays an $M$-sequence after localization.
Let $R$ be a Noetherian ring, $M$ a finite $R$-module, and $\bf{x}$ an $M$-sequence.
(a) Suppose that a prime ideal $\mathfrak{p} \in Supp(M)$ contains $\bf{x}$. Then $\bf{x}$ (as a sequence in $R_\mathfrak{p}$) is an $M_\mathfrak{p}$-sequence. (Bruns and Herzog Corollary 1.1.3)

This is proven by noting that localization is flat and by using Nakayama's Lemma. But I'm not really sure why we need $R$ to be Noetherian. Is it really necessary?

A: Localization is always flat, over any ring, and Nakayama lemma deals with finite modules over any ring, so the proof that Bruns and Herzog give makes no use of noetherianity.
The hypothesis on $R$ being noetherian is stated for part (b) of the same Corollary 1.1.3: they use the fact that $\hat{M} \cong M\otimes_R \hat{R}$.


text:
Q: Layout with Scrollview and drawerlayout i have a activity_main.xml
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

<FrameLayout
    android:id="@+id/content_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/sfondomain" />

<ListView
    android:id="@+id/left_drawer"
    android:layout_width="240dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:choiceMode="singleChoice"
    android:divider="@android:color/transparent"
    android:dividerHeight="0dp"
    android:background="@drawable/background" >
    </ListView>

but when i run my app, it crash:
Logcat: http://paste.ubuntu.com/9699157/
MainActivity:
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    final ActionBar actionBar = getActionBar();

    actionBar.hide();

}

If I remove the ScrollView, my layout work fine...
I want put the ScrollView for landscape mode
Thank you.. sorry for my english!

A: I also did the same but when i used linear layout as outer layer, it worked for me.
Means put your scrollview inside a linear layout.

A: This works for me (tried with sdk 25), no need for LinearLayout, simply put the ScrollView inside the DrawerLayout and make sure the layout parts for the drawer come after the scrollView (otherwise clicking on an item in the drawer list will close the drawer just as if you clicked outside the list in the drawer):
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawerLayout"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"

android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.MyApp.MyActivity">

<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/backButtonString"
android:id="@+id/button"
android:textColor="#ffffffff"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"
android:layout_alignParentLeft="true"
android:onClick="tilbageClicked"
android:background="@drawable/mybutton2"
android:layout_marginBottom="5dp"
android:textAllCaps="false"
/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/myTextViewString"
android:id="@+id/myTextView"
android:gravity="center"
android:textSize="20dp"
android:layout_below="@id/button"
android:layout_centerHorizontal="true" />

</RelativeLayout>

</ScrollView>

    <!-- content view -->
<RelativeLayout
    android:id="@+id/theContent"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

<!-- navigation drawer -->
<RelativeLayout
    android:layout_width="60dp"
    android:layout_height="match_parent"
    android:id="@+id/theDrawer"
    android:layout_gravity="start">

    <!-- List of items in drawer -->
    <ListView
        android:id="@+id/theList"
        android:layout_width="60dp"
        android:layout_height="match_parent"
        android:choiceMode="singleChoice"
        android:background="#ffffffff" />

</RelativeLayout>

</android.support.v4.widget.DrawerLayout>

A: you can put ScrollView inside the DrawerLayout
if you're using an AppBarLayout can add android:layout_marginTop="?actionBarSize"
or the height of your AppBarLayout

A: Try this it will work.
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" >
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true" >

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/drawer_layout"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

<FrameLayout
    android:id="@+id/content_frame"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/sfondomain" />

<ListView
    android:id="@+id/left_drawer"
    android:layout_width="240dp"
    android:layout_height="match_parent"
    android:layout_gravity="start"
    android:choiceMode="singleChoice"
    android:divider="@android:color/transparent"
    android:dividerHeight="0dp"
    android:background="@drawable/background" >
    </ListView>

</LinearLayout>


text:
Q: Do Gee collections (libgee) count references to stored data? (Gee and its memory management.) class ABC
{
    public int a;
    public int b;
    public int c;
}

Gee.HashMap<int, ABC> p;

void fn()
{
    p = new Gee.HashMap<int, ABC>();

    var x = new ABC();

    x.a = 3123;
    x.b = 1231;
    x.c = 5154;

    p.set(1, x);
}

Would this code work? Or my hash collection loses its data after the end of x visibility scope, i. e. when fn() returns?
Should I replace reference x by pointer to prevent this?
Should I explicitly delete this pointer after the p.unset(1) method?
Thank you.

A: Your code works. x is kept alive inside p. The Gee containers use reference counting.
The p object is never freed though, because it's a global variable. If you move it to a more local scope (say inside a main function) its data would be freed:
class ABC
{
    public int a;
    public int b;
    public int c;
}

Gee.HashMap<int, ABC> fn()
{
    var p = new Gee.HashMap<int, ABC>();

    var x = new ABC();

    x.a = 3123;
    x.b = 1231;
    x.c = 5154;

    p.set(1, x);
    return p;
}

void main() {
    Gee.HashMap<int, ABC> p = fn();
    stdout.printf("%d\n", p[1].a);
    // p and x are both freed here, because their ref count reaches 0
}

There is usually no need to unset, unless you want to manually remove the value from the HashMap.


text:
Q: awk to parse input and remove text in field Trying to parse a file using awk but not getting the desired output and I can not seem to figure it out.  Thank you :).
input.txt
chr1    955543  955763  AGRN-6|pr=2|gc=75   0   +
chr1    957571  957852  AGRN-7|pr=3|gc=61.2 0   +
chr1    970621  970740  AGRN-8|pr=1|gc=57.1 0   +

current output.txt
chr1    955543  955763  AGRN-6 pr=2 gc=75   0   +

chr1    957571  957852  AGRN-7 pr=3 gc=61.2 0   +

chr1    970621  970740  AGRN-8 pr=1 gc=57.1 0   +

desired output.txt (|pr=2|gc=75    0, and space between lines) removed from output
chr1    955543  955763  AGRN-6  +
chr1    957571  957852  AGRN-7  +
chr1    970621  970740  AGRN-8  +

Here is what I have tried:
awk -F"[*|]" '{print $1, $2, $3, $4, $5, $6,}' input.txt > output.txt

A: You could do this:
awk -F '[[:blank:]]+|\\|' '{print $1, $2, $3, $4, $NF}'

That gives you the fields you want, but it does not keep the spacing. This will:
awk '{sub(/\|[^[:blank:]]+[[:blank:]]+[0-9]+/, ""); print }' <<END
chr1    955543  955763  AGRN-6|pr=2|gc=75   0   +
chr1    957571  957852  AGRN-7|pr=3|gc=61.2 0   +
chr1    970621  970740  AGRN-8|pr=1|gc=57.1 0   +
END

chr1    955543  955763  AGRN-6   +
chr1    957571  957852  AGRN-7   +
chr1    970621  970740  AGRN-8   +

A: Probably the easiest solution:
awk -F"|" '{print $1"   +"}' input.txt > output.txt

In this solution, however, the trailing "+" is added manually. Output:
chr1    955543  955763  AGRN-6   +
chr1    957571  957852  AGRN-7   +
chr1    970621  970740  AGRN-8   +

Otherwise, try
 awk -F"[| ]+" '{print $1, $2, $3, $4, $8}' input.txt > output.txt

which outputs
chr1 955543 955763 AGRN-6 +
chr1 957571 957852 AGRN-7 +
chr1 970621 970740 AGRN-8 +

A: another alternative (if you don't care of the output spacing)
$ awk '{split($4,a,"|"); print $1,$2,$3,a[1],$NF}' file
chr1 955543 955763 AGRN-6 +
chr1 957571 957852 AGRN-7 +
chr1 970621 970740 AGRN-8 +


text:
Q: Background the app programmatically Does anyone know if there is a way to background Windows Phone/Windows Universal app in code?
I know it's possible to close the app from code but I would prefer to send it to background instead.
Thanks!

A: It is impossible to background a Windows store app in code. As well windows doesn't support a foreground App runs background. A universal Windows app only have three statues: Running, Suspended and Not Running. Referring to the official document we may see an app lifecycle:

An app can be activated by the user through a variety of extensions and contracts such as the Share contract.After the app completes activation, it enters the Running state and the splash screen disappears.
When the user moves an app to the background, Windows waits a few seconds to see whether the user will immediately switch back to the app so that the transition will be fast if they do. If the user does not switch back within this time window, Windows suspends the app.
After an app has been closed by the user, it's first suspended and then terminated, and enters the NotRunning state. Generally, users don't need to close apps, they can let Windows manage them. However, users can choose to close an app using the close gesture or by pressing Alt+F4 on Windows or by using the task switcher on Windows Phone.

The official document recommends that apps not close themselves programmatically. For example, If an app detects a memory leak, it will be terminated by system to ensure the security of the user's personal data. When you close an app programmatically, the system treats it as an app crash.


text:
Q: composer require bower-asset/bpmn-io/bpmn-js-in-color How to use composer to install bpmn-io/bpmn-js-in-color.
With bower the command is:
bower install bpmn-io/bpmn-js-in-color

With composer it should be:
composer require bower-asset/bpmn-io/bpmn-js-in-color

But it is not working. Any ideas?


text:
Q: Given n+1 data pairs $(x_0,y_0)...(x_n,y_n)$ for j=0,1,2...,n we have $p_j=\prod_{i\neq j}(x_j-x_i)$ and $\psi(x)=\prod_{i=0}^n(x-x_i)$. Given n+1 data pairs $(x_0,y_0)...(x_n,y_n)$ for j=0,1,2...,n we have
$p_j=\prod_{i\neq j}(x_j-x_i)$ and $\psi(x)=\prod_{i=0}^n(x-x_i)$.
I am having trouble determining what $\psi(x_j)$ is and what $\psi'(x_j)$ would be.
I feel like $\psi(x_j)= 0$ because it would contain the $x_j-x_j$ term... But I feel like I am missing something...

A: You aren't missing something; $\psi(x_j)=0$ and the reason is the one you wrote. As for finding $\psi'(x_j)$ one way is to "differenciate logarithmically";
$$
\log\psi(x)=\sum_{i=0}^n\log(x-x_i);
$$
$$
\frac{d}{dx}\left[\log\psi(x)\right]=\sum_i\frac{d}{dx}\log(x-x_i)=\sum_i\frac{1}{x-x_i}.
$$
Now, in the other hand we know that $\frac{d}{dx}\log\psi(x)=\frac{\psi'(x)}{\psi(x)}$, so
$$
\psi'(x)=\psi(x)\sum_i\frac{1}{x-x_i}=\sum_ip_i(x).
$$
Now plug in $x=x_j$.

A: Hint: $\psi'(x) = \sum_{j=0}^n \left(\prod_{i \ne j} (x-x_i)\right)$ by the product rule.


text:
Q: When I add a new section (by stepper), the content of the cells in a section mixes with content of another section I've a tableView with dynamic cells. Each section has 5 rows. In the first 4 rows for each row there is a text field. Instead in the fifth row there is an imageview (when I click on this row, I can choose a photo from my photo library, and this last will be put in imageView). The number of sections is decided at run-time using a stepper. The section 0 is fixed and contains a stepper. When I click on + button (on stepper) a section will be add. So everything is right but if I wrote before in the rows that contain the textfield, and then add one or more sections, the contents of these textfield are mixed with each other (and also between sections).
//In file.h I've declared @property (nonatomic) int numberOfComponents;

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1 + self.numberOfComponents;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

    if (section == 0) {
        return 1;
    }
    else{
        return 4;
    }
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    if (indexPath.section == 0) {
        NSString *CellIdentifier = @"cellStepper";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
        UILabel *stepperLabel = (UILabel *)[cell viewWithTag:1];
        stepperLabel.text = [NSString stringWithFormat:@"%i",self.numberOfComponents];
        UIStepper *stepper = (UIStepper *)[cell viewWithTag:2];
        stepper.minimumValue = 0;
        stepper.maximumValue = 20;
        stepper.stepValue = 1;
        stepper.autorepeat = YES;
        stepper.continuous = YES;
        return cell;
    }

    if (indexPath.row == 4) {
        NSString *CellIdentifier = @"cellProfileSnap";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

        return cell;
    }

    NSString *CellIdentifier = @"cellDetail";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    UITextField *cellLabelComponent = (UITextField *)[cell viewWithTag:3];
    cellLabelComponent.placeholder = @"detail";
    return cell;
}

- (IBAction)stepperClik:(UIStepper *)stepper{
    if (stepper.value == 0 && self.numberOfComponents == 0) {
        if (stepper.value > self.numberOfComponents) {
            self.numberOfComponents += 1;

        }
        else{
            return;
        }
    }

    if (stepper.value > self.numberOfComponents) {
        self.numberOfComponents += 1;

    }
    else{
        self.numberOfComponents -= 1;

    }

    [self.tableView reloadData];

}

Solved by Greg, but now there's another problem: I have a save button, which should save many arrays into a dictionary (containing the details of each section 5) as the number of sections.
Here the code of save button:
- (IBAction)saveButton:(id)sender{

    NSMutableArray *arrComponents = [[NSMutableArray alloc] init];
for (int i = 0; i < self.numberOfComponents; i++)
{
    NSMutableArray *component = [[NSMutableArray alloc] init];
    for (int j = 0; j < [self.arrDetails count]; j++)
    {
        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:j inSection:i+1];
        UITableViewCell *cell = [self.tableView cellForRowAtIndexPath: indexPath];
        if (j == 4){
            UIImageView *imageComponent = (UIImageView *) [cell viewWithTag:4];
            NSLog(@"%@",imageComponent.image);
            if (imageComponent.image == Nil) {
                [component addObject: nil];
            }
            [component addObject: imageComponent.image];
        }
        else{
            UITextField *detailComponent = (UITextField *) [cell viewWithTag:3];
            NSLog(@"%@",detailComponent.text);
            if ([detailComponent.text isEqualToString:@""]) {
                [component addObject:@""];
            }
            if (detailComponent.text != nil && i != 0)
                [component addObject: detailComponent.text];
        }

    }
    [arrComponents addObject: component];
    NSLog(@"%@",arrComponents);
}

Where it is shown in the code / / ERROR HERE, at the fourth iteration of 5 iterations (number of rows in a section) of the latest iteration (last section read), the application crashes giving this message:

Terminating app due to uncaught exception
  'NSInvalidArgumentException', reason: '*** -[__NSArrayM
  insertObject:atIndex:]: object cannot be nil'

A: It happens because you don't save the cellLabelComponent.text property and when you reloadData tableView reuses cell (which cause this problem).
You should save data you entered to your cellLabelComponent (for example in array, you can use UITextFieldDelegate) and in your cellForRowAtIndexPath: method you should assign saved values to desired field.
//EXTENDED
Conform to <UITextFieldDelegate> protocol in your .h file or class extension.
Add
@property (nonatomic, strong) NSMutableDictionary *textValueDictionary;
to your class extension and allocate it and init in viewDidLoad or init method:
self.textValueDictionary = [[NSMutableDictionary alloc] init];

Add this to cellForRowArIndexPath:
    cellLabelComponent.placeholder = @"detail";
    // Make your class to be delegate for UITextField
    cellLabelComponent.delegate = self;
    // I use NSString (section) as a key in my dictionary. You can use NSNumber if you like
    if (self.textValueDictionary[[NSString stringWithFormat:@"%d", indexPath.section]])
        cellLabelComponent.text = self.textValueDictionary[[NSString stringWithFormat:@"%d", indexPath.section]];
    else
        cellLabelComponent.text = @""; //Your default value

Add your UITextFieldDelegate methods:
- (void)textFieldDidEndEditing:(UITextField *)textField
{
    // Get reference to the cell
    UITableViewCell *cell = (UITableViewCell*)[[[textField superview] superview] superview];
    // Get index path
    NSIndexPath *indexPath = [self.myTableView indexPathForCell:cell];

    // Get section as a string
    NSString *section = [NSString stringWithFormat:@"%d", indexPath.section];
    [self.textValueDictionary setValue:textField.text forKey:section];
}

You can use more delegate if you need.
It should be enough to make it works. It will work just when you have one UITextField in your table section if you have more you should use unique key in your dictionary (NSindexPath will work if you have more that one textfield in section but not more that one in row, just remember to convert it to NSNumber).
Let me know is it work.
//EXTENDED
If you have more that one UITextField per section you have to change the dictionary key. This solution above will work just if you have up to one row per section.
This solution (below) will work if you have many textfields per section but not more that one text field per cell (it will work for one textfield per section as well):
Change line in cellForRowAtIndexPath from:
if (self.textValueDictionary[[NSString stringWithFormat:@"%d", indexPath.section]])
    cellLabelComponent.text = self.textValueDictionary[[NSString stringWithFormat:@"%d", indexPath.section]];

to:
NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
if (self.textValueDictionary[key])
    cellLabelComponent.text = self.textValueDictionary[key];

And change lines in textFieldDidEndEditing: method from:
NSString *section = [NSString stringWithFormat:@"%d", indexPath.section];
[self.textValueDictionary setValue:textField.text forKey:section];

to:
NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
[self.textValueDictionary setValue:textField.text forKey:key];

A: I believe your detailComponent is equal nil and you cannot save nil to the array. Before you call
[component addObject: detailComponent.text]; //ERROR HERE

do check:
if (detailComponent != nil && i != 0)
    [component addObject: detailComponent.text];

It could happen because in your section 0 you haven't got any textfield.
//EDITED
The issue is happened here:
if (imageComponent.image == Nil) {
    [component addObject: nil];
}
[component addObject: imageComponent.image];

Replace it with:
if (imageComponent.image == nil) {
    [component addObject:[NSNull null]];
}
else {
    [component addObject: imageComponent.image];
}

You cannot add nil to array if you want to add nil you should add object NSNull.
And you are missing else statement. Your code try to add nil to the array twice (if the image is nil) first time in your if statement ([component addObject: nil];) and second time just after your if statement: [component addObject: imageComponent.image];
// EDITED
Make the changes as suggested in comments in code below. I use the same dictionary, you should change the name because it suggest that it keeps just textfields values, but now it will store the images as well:
    if (indexPath.row == 4) {
        NSString *CellIdentifier = @"cellProfileSnap";
        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

        //I believe this is where you keep your imageView
        // get your image
        UIImageView *imageComponent = (UIImageView *) [cell viewWithTag:4];
        NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
        if (self.textValueDictionary[key])
            imageComponent.image = self.textValueDictionary[key];
        else
            imageComponent.image = nil; //Your default value (probably you want to set up your plus image)
        return cell;
    }

The next step you need to make is where the user presses the plus image - you have to save the image in the dictionary. Put this code to your method where you get the image from user. This is a pseudo code so you have to adjust it a little bit:
// Get reference to the cell
    UITableViewCell *cell = //have a look on textFieldDidEndEditing  method. You have to work out how to get the cell (I cannot do that because I haven't got access to your code);
    // Get index path
    NSIndexPath *indexPath = [self.myTableView indexPathForCell:cell];

    // Get section as a string
    NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
    UIImage *img = //get your image here;
    //make sure it's not nil before you save it to dictionary
    //save it to dictionary
    [self.textValueDictionary setValue:img forKey:key];

The last bit is saveButton: method there was mistake in my advices from yesterday. You're trying to get text and image directly from cells, and it works fine if the cells are visible. If you cannot see the cell system put it to reusable pool and you get nils.
To fix it you have to get the data from the dictionary:
Don't use:
  UIImageView *imageComponent = (UIImageView *) [cell viewWithTag:4];

instead do:
NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
    UIImage *img = self.textValueDictionary[key];
    // make sure is not nil before you save it. If it's nil add [NSNull nil] to your array as I explained before.

When you read text don't do it like that:
UITextField *detailComponent = (UITextField *) [cell viewWithTag:3];

get text from the dictionary:
     NSString *key = [NSString stringWithFormat:@"sec:%d,row:%d", indexPath.section, indexPath.row];
        NSString *str = self.textValueDictionary[key];

If it complain about data type use cast (UIImage*).
Remember to change your first loop to: for (int i = 1; i < self.numberOfComponents; i++) and when you get NSIndexPath change it to inSection:i instead inSection:i+1.
I haven't run this in Xcode so maybe there are some mistakes but you should be able to find and fix it.
Hope it will work for you.


text:
Q: How do I start Jenkins on port 8000? With Hudson, running java -jar hudson-3.0.0-bundled.war -httpPort=8000 worked. I've tried the same with Jenkins, but it still runs on port 8080:
$ java -jar jenkins.war -httpPort=8000
Running from: /home/user/jenkins/jenkins.war
webroot: $user.home/.jenkins
Sep 25, 2013 12:22:14 PM winstone.Logger logInternal
INFO: Beginning extraction from war file
Jenkins home directory: /home/user/.jenkins found at: $user.home/.jenkins
Sep 25, 2013 12:22:15 PM winstone.Logger logInternal
INFO: HTTP Listener started: port=8080

A: There is a '-' missing in your command line.
From jenkins wiki: "--httpPort=$HTTP_PORT"
So use java -jar jenkins.war --httpPort=8000 instead of java -jar jenkins.war -httpPort=8000

A: Checking my jenkins init file I think you need --httpPort=$JENKINS_PORT. Have you tried with two dashes before httpPort?
Whether port 8000 is a sensible choice is a whole other question!


text:
Q: Console after installing guests with KVM and virt-install I'm trying to install a few virtual machines with KVM onto my Debian Jessie System.
I researched a lot but have not yet found a helping answer to my problem.
I'm connected via ssh to my host machine and try to install a new guest machine by running the following command as root:
virt-install --connect qemu:///system -n vpsName --memory=5000 --vcpus=4 --disk path=/var/lib/libvirt/images/nix.img,size=125 -c /home/localuser/images/debian-8.6.0-amd64-netinst.iso --graphics vnc,listen=0.0.0.0 --noautoconsole --os-type linux --os-variant generic --accelerate --network=bridge:br0 --hvm

After a few seconds, I get the following message:

Domain installation still in progress. You can reconnect to
  the console to complete the installation process.

My precise question is now: How do I get to the installer-console with the standard install-prompts (hostname, country, ...) of the Debian installer?
One method I tried, was VNC on the opened port but I cannot connect. It asks for a password and then freezes after password-entry.
Another thing I tried was to open the ssh connection with the -Y option and then installed by specifying —-graphics none --console pty,target_type=serial. That didn't work either; I'm stuck at a frozen command line.
I'm sure, I'm not the only one who had that issue. Unfortunately I couldn't find a similar post with a helpful answer yet.
Thank you for helping me!
Regards.

A: virsh console DOMAIN is the way to connect. You can get the domain name or number with virsh list --all

A: I finally managed to resolve my issue by using virt-manager in a ssh connection opened with ssh -Y user@host. That works for me, even if it would not work for automation.
Thank you.


text:
Q: svn import to current directory (without file:/// or http:///) I am creating a batch file that create a repository and will import a folder from an existing and fixed directory into that repository.
The repository will be created in the folder in which the batch file is placed in. So for example, if a user decides to place the batch file in the directory called C:/temp and runs the batch file, the repository will be created and placed in C:/temp. If the batch file is placed in C:/foo, the repository will be created and placed in C:/foo.
To do this, the batch file has this command:

svnadmin create ./Module_QWER

In the batch file however, there is a problem when using "svn import". I tried to import a folder from a directory into the repository that was just created by doing this:

svn import "C:/temp/content to import" ./Module_QWER/Sample/Trunk

And an error occurs:

svn: E205000: Try 'svn help import' for more information
svn: E205000: Invalid URL 'Module_QWER/Sample/Trunk'

I understand that if the URL of the repository is in full the import will work, but as said before the URL of the repository will depend on where the user puts the batch file. Is there a way to import the folder into a repository no matter where the repository is placed as long as it is placed together in the same directory as the batch file?

A: When you use svn commands related to a specific repository, you need to have its full path and the protocol you are connecting with.
So the path to the repository should be something like:
file:///d:/full/path/to/repo

In your case it would be:
svn import "C:/temp/content to import" file:///%cd%/Module_QWER/Sample/Trunk -m "log message"

Edit: OK, I just noticed the title of the question is without using the protocol in the path.
I don't think it's possible, but full path to the repository can simply be achieved with using %~dp0% for the batch's current directory or %cd% for the current working directory.


text:
Q: I cannot connect to iTunes and the App Store from my iPad in iOS6 I just updated to iOS6 yesterday. After the update, I cannot connect to the App Store and iTunes on my iPad.
There are no options to click when I'm prompted by this message "Cannot connect to iTunes/App Store".
What should I do?

A: I would suggest taking a look at this:
http://support.apple.com/kb/TS1398
And if that doesn't work, try this (under Troubleshooting on an iPhone, iPad, or iPod touch):
http://support.apple.com/kb/TS1368


text:
Q: To get current row ID from asp grid in code behind from LinkButton I have asp grid like this :
<asp:GridView ID="gvDetails" runat="server" AutoGenerateColumns="false" Width="100%" ShowFooter="false" DataKeyNames="ID" Enabled="false" BorderStyle="solid" BorderWidth="1px" BorderColor="#ACA899" BackColor="#BFD3EE" CellSpacing="1" GridLines="none">
<asp:TemplateField HeaderText="ProductID" Visible="false" HeaderStyle-                  HorizontalAlign="left"  HeaderStyle-CssClass="gvheader" HeaderStyle-Font-Bold="true" ItemStyle-Width="40px" >
    <ItemTemplate>
       <asp:label runat="server" ID="lblProductID" Text='<%#eval("ProductID") %>'/>
    </ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="" HeaderStyle-HorizontalAlign="left" HeaderStyle-CssClass="gvheader" HeaderStyle-Font-Bold="true" ItemStyle-Width="50px">
    <ItemTemplate>
       <asp:LinkButton ID="lnkbtnShowProductDetails" OnClick="lnkbtnShowProductDetails_Click" runat="server"  Enabled="true">Details</asp:LinkButton>
    </ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>

And in code behind i have :
Sub lnkbtnShowProductDetails_Click(ByVal sender As Object, ByVal e As EventArgs)

End Sub

How can i get current row's ID (value of datakeynames), I dont want to use command and command argument here.
Please assist me on this !!

A: You can use below complete solution.
protected void lblTicketNumber_Click(object sender, EventArgs e)
    {
        LinkButton b = (LinkButton)sender;
        GridViewRow row = (GridViewRow)b.NamingContainer;
        if (row != null)
        {
           int rowIndex = row.RowIndex;
           string key = LstViewTicket.DataKeys[rowIndex].Value.ToString();
        }

    }

A: You can use the following code to access the data key names
Sub lnkbtnShowProductDetails_Click(ByVal sender As Object, ByVal e As EventArgs)
   Dim lnkbtnShowProductDetails As LinkButton = DirectCast(sender, LinkButton)
   Dim gridViewRow As GridViewRow = DirectCast(lnkbtnShowProductDetails.NamingContainer, GridViewRow)
   Dim val = gv.DataKeys(gridViewRow.DataItemIndex)
   Dim key = gv.DataKeyNames(gridViewRow.DataItemIndex)
End Sub