text:
Q: Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build) I am trying to compile Tizen source code. The compilation tools uses the rpm build environment. While compiling specific package I'm getting an rpm build issue "Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)"
Here is my build log
Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_PushUrlRequestListener.cpp.o
[    8s] [ 69%] Building CXX object CMakeFiles/osp-messaging.dir src/FMsg_WapPushManagerImpl.cpp.o
[    8s] [ 71%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_WapPushMessageImpl.cpp.o
[    8s] [ 73%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_ComposerEvent.cpp.o
[    8s] [ 75%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_ComposerEventArg.cpp.o
[    8s] [ 77%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_RecipientListImpl.cpp.o
[    8s] [ 79%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsEvent.cpp.o
[    8s] [ 81%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsEventArg.cpp.o
[    9s] [ 83%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsManagerImpl.cpp.o
[    9s] [ 85%] [ 87%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsMessageImpl.cpp.o
[    9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_CbsChannelImpl.cpp.o
[    9s] [ 89%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_CbsMessageImpl.cpp.o
[    9s] [ 91%] [ 93%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_EtwsPrimaryNotificationImpl.cpp.o
[    9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MsgUtil.cpp.o
[    9s] [ 95%] [ 97%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_SmsMmsCallbackHandler.cpp.o
[    9s] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MessagingMessageTypes.cpp.o
[    9s] [100%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_MessagingIpcProxy.cpp.o
[   10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingMessageTypes.cpp:24:0:
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:35:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:37:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:38:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:42:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:43:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:45:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc    /FMsg_MessagingMessageTypes.h:46:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:49:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:50:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:51:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:52:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:53:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:54:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:55:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:56:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:61:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:63:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:64:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingMessageTypes.cpp:24:0:
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:65:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] make[2]: *** [CMakeFiles/osp-messaging.dir/src/FMsg_MessagingMessageTypes.cpp.o] Error 1
[   10s] make[2]: *** Waiting for unfinished jobs....
[   10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:31:0:
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:35:1: error: 'MessagingMsgStart' was not declared in this     scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:37:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:38:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:42:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:43:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:45:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:46:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:49:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:50:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:51:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:52:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:53:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:54:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:55:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:56:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:61:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:63:1: error: 'MessagingMsgStart' was not declared in this     scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:64:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] In file included from /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:31:0:
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/inc/FMsg_MessagingMessageTypes.h:65:1: error: 'MessagingMsgStart' was not declared in this scope
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp: In member function 'virtual void Tizen::Messaging::_MessagingProxy::OnIpcResponseReceived(Tizen::Io::_IpcClient&, const IPC::Message&)':
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:122:2: error: duplicate case value
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:123:2: error: duplicate case value
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:124:2: error: duplicate case value
[   10s] /home/abuild/rpmbuild/BUILD/osp-messaging-1.2.2.0/src/FMsg_MessagingIpcProxy.cpp:121:2: error: previously used here
[   10s] make[2]: *** [CMakeFiles/osp-messaging.dir/src/FMsg_MessagingIpcProxy.cpp.o] Error 1
[   11s] make[1]: *** [CMakeFiles/osp-messaging.dir/all] Error 2
[   11s] make: *** [all] Error 2
[   11s] error: Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)
[   11s]
[   11s]
[   11s] RPM build errors:
[   11s]     Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)

I'm using the following spec file
%define _debug_package %{nil}
%define __strip /bin/true

Name:       osp-messaging
Summary:    osp messaging library
Version:    1.2.2.0
Release:    2
Group:      System/Libraries
License:    Apache License, Version 2.0
Source0:    %{name}-%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  pkgconfig(chromium)
BuildRequires:  pkgconfig(capi-appfw-application)
BuildRequires:  pkgconfig(msg-service)
BuildRequires:  pkgconfig(push)
BuildRequires:  pkgconfig(dbus-1)
BuildRequires:  pkgconfig(dbus-glib-1)
BuildRequires:  pkgconfig(email-service)
BuildRequires:  pkgconfig(pkgmgr)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libwbxml2)
BuildRequires:  pkgconfig(osp-appfw)
BuildRequires:  osp-appfw-internal-devel
BuildRequires:  pkgconfig(osp-net)
BuildRequires:  osp-net-internal-devel
BuildRequires:  pkgconfig(osp-bluetooth)
BuildRequires:  pkgconfig(osp-nfc)
BuildRequires:  pkgconfig(osp-json)
BuildRequires:  pkgconfig(osp-shell)

# runtime requires
Requires: osp-appfw
Requires: osp-bluetooth
Requires: osp-nfc
Requires: osp-json
Requires: osp-shell

%description
osp messaging library

%package devel
Summary:    osp messaging library (Development)
Group:      TO_BE/FILLED_IN
Requires:   %{name} = %{version}-%{release}

%description devel
osp messaging library (DEV)

%package internal-devel
Summary:    osp messaging library (Internal)
Group:      TO_BE/FILLED_IN
Requires:   %{name} = %{version}-%{release}

%description internal-devel
osp messaging library (Internal-DEV)

%package debug
Summary:    osp messaging library (Development)
Group:      TO_BE/FILLED_IN
Requires:   %{name} = %{version}-%{release}

%description debug
osp messaging library (DEV)

%prep
%setup -q

%build
%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="$CXXFLAGS -D_SECURE_LOG"
%endif
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%ifarch %{ix86}
%if 0%{?simulator}
CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake .     -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%else
CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ " cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%endif
%else
%if 0%{?tizen_build_binary_release_type_eng}
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed     -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_SECURE_LOG -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%else
CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed     v-fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%endif
%endif

# Call make instruction with smp support
make %{?jobs:-j%jobs}

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/license
cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}

%make_install

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%manifest osp-messaging.manifest
/usr/share/license/%{name}
%{_libdir}/osp/*.so*

%files devel
%{_includedir}/osp/*.h
%{_libdir}/pkgconfig/osp-messaging.pc

%files internal-devel
%{_includedir}/osp/messaging/*.h

%files debug
%{_libdir}/osp/debug/*.so*

The error is related to rpm build, can anyone help me in solving this rpm error?

A: The above errors are because of linking of files at runtime by the rpm build environment and hence it was showing errors under build section of the spec file
To solve the above errors add the following line at the beginning of the spec file of package
%define __debug_package %{nil}

If there is already a similar code(%define ^_debug_package %{nil}) replace it with the above code
The errors in the osp packages can also be solved by adding the above line to the spec file.
And also make sure that you use the release repo URL for compilation, you can use the following release repo URL
http://download.tizen.org/releases/2.2/tizen-2.2


text:
Q: How can I solve this integer equation with Mathematica? I have to solve this equation, where each variable is an integer from 1-9, but every variable has a different value:
(a/(10 b+c))+(d/(10 e+f))+(g/(10 h+i)) == 1

A: There are 9! == 362880 combinations (because every variable has a different value) so we can check all of them.
p = Permutations @ Range @ 9;

pos = Flatten @
  Position[(#1/(10 #2 + #3) + #4/(10 #5 + #6) + #7/(10 #8 + #9) == 1) & @@@ p, True]

{173225, 173403, 271265, 271325, 322803, 323135}

p[[pos]]

{{5, 3, 4, 7, 6, 8, 9, 1, 2}, {5, 3, 4, 9, 1, 2, 7, 6, 8}, {7, 6, 8,
    5, 3, 4, 9, 1, 2}, {7, 6, 8, 9, 1, 2, 5, 3, 4}, {9, 1, 2, 5, 3, 4,
    7, 6, 8}, {9, 1, 2, 7, 6, 8, 5, 3, 4}}

Hence, there are six solutions as listed above.

More compactly (but requiring about 20% more time):
s = Select[Permutations @ Range @ 9,
       #1/(10 #2 + #3) + #4/(10 #5 + #6) + #7/(10 #8 + #9) & @@ # == 1 &]

p[[pos]] == s

True

ListLinePlot @ s

A: With[{perm = Permutations@Range@9},
 Pick[perm, (#1/(10. #2 + #3) + #4/(10. #5 + #6) + #7/(10. #8 + #9) - 1) &
  @@ Transpose@perm // Unitize, 0]]

redpajama_set_name: RedPajamaStackExchange


text:
Q: What is the corresponding model when I include drift in an SARIMA model with seasonal differences? I fitted the following model, but I am not sure if the drift term is an intercept term or the mean of $y_t-y_{t-4}$ (as it seems in a blog post by Rob Hyndman).
(f<-Arima(leitets, order=c(1, 0, 0), seasonal=list(order=c(0, 1, 2), period=4),
          include.drift=T))
# ARIMA(1,0,0)(0,1,2)[4] with drift
#
# Coefficients:
#          ar1     sma1    sma2     drift
#       0.8600  -1.1350  0.4007  2847.303
# s.e.  0.0687   0.1339  0.1367  1345.671

A: my guess is that it is the implied intercept ....

In response to @gung .. I took a quarterly series of my own choosing (because I didn't ahve the OP's data ) and asked to specify a starting model model and then to present it as a Right-Hand side equation ( i.e. in typical regression format free of often confusing backshift operators

and here

and another view


text:
Q: Training / using OpenAI GPT-3 for translations I'm trying to use OpenAI for translation of my products descriptions from one language to some other languages (EN, DE, CZ, SK, HU, PL, SI...). The translations, especially to SK/CZ/HU/PL languages are (mainly gramatically) quite bad (using text-davinci-003 model). I've got an idea - I already have a few thousands of similar products fully translated into all of these languages by professional translators. Is it possible to use those existing correct translations to train GPT-3 and then use this model to translate new texts? Has anybody already tried something similar?

A: Have you tried using the Edits endpoint? You can fix grammar and spelling with it.
If you run test.py the OpenAI API will return the following completion:

What day of the week is it?

test.py
import openai

openai.api_key = 'sk-xxxxxxxxxxxxxxxxxxxx'

openai.Edit.create(
  model = 'text-davinci-edit-001',
  input = 'What day of the wek is it?',
  instruction = 'Fix the spelling mistakes'
)

content = response['choices'][0]['text']

print(content)


text:
Q: Can't access another http resource from ionic app I am working on Ionic framework , i am trying to access an Restful API using $http service in my Ionic framework i ma getting the following error in console.
XMLHttpRequest cannot load https://apiexample.com/token/ Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. The response had HTTP status code 405.

Anyone know how to access that Rest full API from my Angular Js using $http service ?
Any help will be appreciated, Thanks in advance :D

A: This is a setting that you need to enable on the server side.  Ensure you have the right CORS settings on the server side.


text:
Q: How to connect to Glue catalog from an EMR spark-submit step We use pyspark in an EMR cluster to run queries against our glue database. We use two methods to execute the python scripts namely through a Zeppelin notebook and through EMR steps. Connecting to the glue database works greats in Zeppelin, but not in EMR steps. When we run a query against the glue database, we get the following error:
pyspark.sql.utils.AnalysisException: Database '{glue_database_name}' does not exist.

This is the spark configuration used in the executed .py file:
spark = SparkSession\
.builder\
.appName("dfp.sln.kunderelation.work")\
.config("spark.sql.broadcastTimeout", "36000")\
.config("spark.sql.legacy.parquet.int96RebaseModeInRead", "CORRECTED")\
.config("spark.sql.legacy.parquet.int96RebaseModeInWrite", "CORRECTED")\
.config("spark.sql.legacy.parquet.datetimeRebaseModeInRead", "CORRECTED")\
.config("hive.metastore.client.factory.class", "com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory") \
.enableHiveSupport() \
.getOrCreate()
spark.conf.set("spark.sql.sources.ignoreDataLocality.enabled", "true")

The step is submitted using boto3 with the following configuration:
    response = emr_client.add_job_flow_steps(
        JobFlowId=cluster_id,
        Steps=[
            {   'Name': name,
                'ActionOnFailure': 'CONTINUE',
                'HadoopJarStep': {
                    'Jar': 'command-runner.jar',
                    'Args': ['spark-submit', '--deploy-mode', 'client', '--master', 'yarn', "{path to .py script}"]
                }
            },
        ]
    )

Both types of EC2 users have been given glue and s3 privileges.
What do we need to setup to connect to the glue database?


text:
Q: Compile error on Animation in Windows Phone I am new with Windows Phone animation and using the below code but it give me compile error:
'System.Windows.Controls.Button' does not contain a definition for 'BeginAnimation' and no extension method 'BeginAnimation' accepting a first argument of type 'System.Windows.Controls.Button' could be found (are you missing a using directive or an assembly reference?)
Which reference I am missing?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

    private void button1_Click(object sender, RoutedEventArgs e)
    {
        DoubleAnimation da = new DoubleAnimation();
        da.From = 30;
        da.To = 100;
        da.Duration = new Duration(TimeSpan.FromSeconds(1));
        button1.BeginAnimation(Button.HeightProperty, da);
    }

A: The UIElement.BeginAnimation method does not exist in WP7. Instead, you will need to create a storyboard as follows:
private void button1_Click(object sender, RoutedEventArgs e)
{
  var sb = new Storyboard();
  var db = CreateDoubleAnimation(30, 100,
         button1, Button.HeightProperty, TimeSpan.FromMilliseconds(1000));
  sb.Children.Add(db);
  sb.Begin();
}

private static DoubleAnimation CreateDoubleAnimation(double from, double to,
      DependencyObject target, object propertyPath, TimeSpan duration)
{
  var db = new DoubleAnimation();
  db.To = to;
  db.From = from;
  db.Duration = duration;
  Storyboard.SetTarget(db, target);
  Storyboard.SetTargetProperty(db, new PropertyPath(propertyPath));
  return db;
}


text:
Q: Is it possible to check how long ago was an nfs volume mounted? Is there a way to see how long ago a volume was mounted without using the log files?
Basically, I have a list of mounted volumes over nfs and I need to see if they were mounted today or months ago.

A: Apparently you can cat:
/proc/self/mountstats

And there's a parameter below the mount point called "age" that specified the time in seconds since the nfs volume was mounted.


text:
Q: Mapping n-ary relationships to relational tables What be the correct way to map an n-ary relationship like the one I included?
Would I do something like this?
Store(Store, Address, Phone Number)
Market(Product ID, Product Name, Product Type, Price)
Sales(Order ID, Quantity, Customer Name)
Inventory(Product ID, Quantity)
It is my understanding you take the primary key from each side that has "many" and include the other attributes as foreign keys. So, would you do the manages table like this?
Manages(Order ID, Product ID, Store Name)

A: based on the image ... you can also put INVENTORY_ID , STORE_NAME and PRODUCT_ID inside sales table ...
so sales would become something like this :
Sales(Order ID, Quantity, Customer Name, INVENTORY_ID, PRODUCT_ID, STORE_NAME)
but since it makes the table a bit messy ... we can extract the relation and make a new table for it and would become something like this ...
Manages(Order ID, STORE_NAME, PRODUCT_ID, INVENTORY_ID)
and remember all primary_key of this table is combination of all the columns.


text:
Q: How to execute or run .sql file inside stored procedure in oracle I am trying to create stored procedure to create scheduled task . Which will execute my .sql script daily. My .sql file contains create table and drop table scripts. like this
Drop table a608232_new_62K_master;

create table a608232_new_62K_master as select A.* from
a608232_MRD_DATA_62K_W_Account A inner join a608232_new_mids B
on A.MID = B.MID;

Many more statements like this which updates that table daily. How should I proceed regarding this. I am trying to create procedure so that i can schedule a task to execute that procedure. Or is there some other way to this in oracle.
ps: I have only 1 .sql file which contains all the statements.

A: I would suggest using Oracle Scheduler to execute your scripts with PL/SQL Packages Procs and use execute immediate when required for DDL.
Hope that works out for you.
Regards,
Ted

A: You can put the code in your .sql file, inside a stored procedure.
CREATE PROCEDURE myproc

AS

BEGIN

Drop table a608232_new_62K_master;

create table a608232_new_62K_master as select A.* from
a608232_MRD_DATA_62K_W_Account A inner join a608232_new_mids B
on A.MID = B.MID;`

END

Then You can automate this using a batch file and windows task scheduler.
set MYDB= yourDBname
set MYUSER=youruser
set MYPASSWORD=yourpassword
set MYSERVER=yourservername
sqlcmd -S %MYSERVER% -d %MYDB% -U %MYUSER% -P %MYPASSWORD% -h -1 -s "," -W -Q "exec myproc"

A: Try creating a table like this :
CREATE PROCEDURE myproc

AS

BEGIN

Drop table a608232_new_62K_master;

create table a608232_new_62K_master (col1, col2, col3...) -- Note: Its better to name the columns in the table, same as the columns used by the select query

insert into a608232_new_62K_master (col1, col2, col3...)
select A.col1, A.col2, A.col3 from
a608232_MRD_DATA_62K_W_Account A
inner join a608232_new_mids B
on A.MID = B.MID;`

END


text:
Q: Regular input in ASP.NET Here's an example of a regular standard HTML input for my radiobuttonlist:
<input type="radio" name="rbRSelectionGroup" checked value="0" />None
<asp:Repeater ID="rptRsOptions" runat="server">
<ItemTemplate>

    <input type="radio" name="rbRSelectionGroup" value='<%# ((RItem)Container.DataItem).Id %>' /><%# ((RItem)Container.DataItem).Name %>

</ItemTemplate>
</asp:Repeater>

I removed some stuff for this thread, one being I put an r for some name that I do not want to expose here so just an fyi.
Now, I would assume that this would or should happen:

*

*Page loads the first time, the None radio button is checked / defaulted

*I go and select a different radiobutton in this radiobutton list

*I do an F5 refresh in my browser

*The None radio button is pre-selected again after it has come back from the refresh

but #4 is not happening.  It's retaining the radiobutton that I selected in #2 and I don't know why.  I mean in regular HTML it's stateless.  So what could be holding this value?  I want this to act like a normal input button.
I know the question of "why not use an ASP.NET control" will come up.  Well there are 2 reasons:

*

*The stupid radiobuttonlist bug that everyone knows about

*I just want to brush up more on standard input tags

*We are not moving to MVC so this is as close as I'll get and it's ok, because the rest of the team is on par with having mixed ASP.NET controls with standard HTML controls in our pages

Anyway my main question here is I'm surprised that it's retaining the change in selection after postback.

A: This is a Firefox behavior.
Firefox will persist form values when you reload a webpage.
For example, if you go to StackOverflow's Ask Question page, enter some text, and reload the page, Firefox will remember the text, but IE will not.
If you re-request the page (as opposed to refreshing it) by pressing Enter in the address bar, the form will not be persisted.


text:
Q: Can I have indexing of nodes and relations (normal and fulltext) using http in transactions in neo4j? I am new to Neo4j and have a question:
All I want is to be able to add/update nodes and relationships, have their props immediately indexed, some with fulltext indexing, and everything enclosed in transactions, usable from Python. Is this possible?
I have the following requirements for using Neo4j:

*

*Use it from Python.

*Immediate indexing of nodes and their properties.

*Immediate indexing of relationships and their properties.

*Fulltext indexing of some node/relationships properties.

*Adding and population of new indexes for an existing graph.

*Several separate read and write calls enclosed in one transaction (with a separate commit or rollback command at the end).

Added 2013-07-02: I'd like to integrate Neo4j with the plone cms, which has multiple transactional databases connected. A user can make a call to the cms, which will in return affect multiple databases. So just because Neo4j hasn't returned an error doesn't mean the transaction should commit - an abort can be caused by an error somewhere else, in another database or piece of code.
From the experiments I have done so far (using neo4j-community-2.0.0-M03) it seems to me:

*

*configuring [node|relationship]_auto_index will give me 2,3,4, but not 5. And
there is only one auto_index for nodes/relationships, so either all of the
attributes are fulltext, or none.

*The label/schema indexes would give me a run-time configurable indexes for 2, but not for 3, as they only work for nodes.

*The REST API gives me 1,2,3,4, would allow 5 (because I could add existing
nodes/relationships  and their properties to new indexes). It can't do 6, because
outside of batches its not transactional. So errors that happen after running the batch
could not trigger an abort.

*The transactional endpoint in combination with auto_indexing and labels/schema
gives me 1,2,4,5 (nodes only) and 6, but not 3, because labels/schema only works on
nodes. And Cypher doesn't allow adding e.g. relationships to indexes.
My big hope is that I missed something, and all 6 requirements could be fulfilled. Any hints?

A: As mentioned in the comments you need to go with the (currently experimental) transactional REST endpoint. In combination with labels and declarative indexing this solves requirements 1, 2, 5, 6.
Combining this with auto indexing for relationship properties solves 3 and 4. Rebuilding an relationship auto index can be done with cypher:
start r = rels(*) set r.<prop> = r.<prop>

for all autoindexable properties. For larger datasets consider using limit and skip in order to have control over transaction size while indexing.


text:
Q: change background according to user preference Hi i would like to have like 5 backgrounds to choose from and a user can just click on a box with a thumbnail of each and the site will dynamically change the background.  How would I do this? thanks for any help.

A: It's very simple, maybe you need to learn first about html and javascript.
First of all, you must prepare html structure like this:

A CSS example to make it works :
 .box {
     width: 50px;
     height: 50px;
     border: 1px solid black;
     background-color:blue;
 }

The javascript
 var elements = document.getElementsByClassName("box"); // get all elements
 for(var i in elements) { // loop through them
     elements[i].click(function(e) {  // handle click
          document.getElementsByTagName("body")[0].style.backgroundImage = this.dataset().bg;  //change background
     });
 }


text:
Q: Workflow Send Email If All Subquestions in Survey are Answered I have a form that has rating questions and I want to send an email if all rating subquestions are answered, meaning every listed subquestion under the main question has one radio button selected. How can I achieve this in Designer? Kindly refer to the image below for reference. Thank you!

A: Option 1. If you're building the form in InfoPath, you can check if all the questions are answered and set a column equal to a specific value that a workflow would either check and end the workflow or check and continue into the meat of the workflow. (Status: Begin Process vs Status: Form Closed)
Option 2. In the workflow, check that all columns have values and if they don't, skip into the end of the workflow.
Option 1 is better as you should be checking values at the form level. It's easier to change that than it is the workflow. If the fields are required, throw an error to the user that requires they fill out the form in order for the values to submit.


text:
Q: How to view logs in uboot? I have a linux device running U-Boot and booting Ubuntu Core 18 that is having problems with its serial interface and networking. Because of these problems, I can't configure it via ssh or minicom. I can, however, establish a serial connection via minicom while in the bootloader. I can see logs, but I can't figure out a way to access them.
# ls mmc 0:2 system-data/var/log
<DIR>       4096 .
<DIR>       4096 ..
           28032 wtmp
               0 btmp
               0 lastlog

Is there a way to show these log files from the U-Boot interface?


text:
Q: Import Excel sheet data into SQL Table using SSIS programmatically I am trying to implement a solution for importing Excel sheet data into a SQL table in SSIS programmatically using C#, through Edit Script task.
Unfortunately, i do not find any simple example on how to achieve similar solution online.
Below is the code which i tried in Edit Script window and it is throwing me the below error.
  public void Main()
        {
            ADODB.Connection conn=new ADODB.Connection();

            string strSQL;
            object lngRecsAff;

            conn.Open(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Engagements\QCRT\SSIS\InputFolder\Order.xlsx;Extended Properties=Excel 12.0","","",0);
            strSQL = @"SELECT * INTO [ODBC;Driver={SQL Server};Server=IN45216580W1\SQLEXPRESS;Database=[Northwind]].[dbo].[Order_Test1] FROM [1$]";
            conn.Execute(strSQL,out lngRecsAff,0);

            Dts.TaskResult = (int)ScriptResults.Success;
        }

Error Message:
Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80004005): Could not find installable ISAM.
   at ADODB.ConnectionClass.Open(String ConnectionString, String UserID, String Password, Int32 Options)
   at ST_2d2b7b209a00481087e0c1720214c207.csproj.ScriptMain.Main()
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()
I am very new to SSIS and What am i doing wrong.


text:
Q: IAM security exception when using DynamoDB in a virtual machine I'm using Visual Studio to create a ASP.NET project which uses DynamoDB with the Amazon .NET SDK. I've installed the Amazon Visual Studio toolkit and created a default profile with the secret/key in the .NET Encrypted Store.
When I run the ASP.NET program locally on my development machine inside Visual Studio everything works just fine.
When I deploy the same project to a virtual machine (running on the local LAN) and when IIS tries to execute the code, it throws an exception:
   Amazon.Runtime.AmazonServiceException: Unable to get IAM security credentials from EC2 Instance Metadata Service.
   at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.FetchCredentials()
   at Amazon.Runtime.DefaultInstanceProfileAWSCredentials.GetCredentials()
   at Amazon.Runtime.Internal.Util.SdkCache.CacheKey.Create(AmazonServiceClient client, Object cacheType)
   at Amazon.Runtime.Internal.Util.SdkCache.GetCache[TKey,TValue](AmazonServiceClient client, Object cacheIdentifier, IEqualityComparer`1 keyComparer)
   at Amazon.DynamoDBv2.DocumentModel.Table.LoadTableInfo()
   at Amazon.DynamoDBv2.DataModel.DynamoDBContext.GetUnconfiguredTable(String tableName)
   at Amazon.DynamoDBv2.DataModel.DynamoDBContext.GetTargetTable(ItemStorageConfig storageConfig, DynamoDBFlatConfig flatConfig, DynamoDBConsumer consumer)
   at Amazon.DynamoDBv2.DataModel.DynamoDBContext.ConvertQueryHelper[T](DynamoDBFlatConfig currentConfig, ItemStorageConfig storageConfig, QueryFilter filter, List`1 indexNames)
   at Authentication.Controllers.AuthController.VerifyLicense(Object details)

This is clearly an issue with credentials but I can't figure out why it's behaving differently in the VM vs the local VS IDE. According to the DynamoDB docs, if you're using the default profile it should automatically embed the credentials into the program when you build/deploy it. It doesn't appear to be doing that.
The only code I have within the project related to the DynamoDB initialization is:
            AmazonDynamoDBConfig clientConfig = new AmazonDynamoDBConfig();
            clientConfig.RegionEndpoint = RegionEndpoint.USEast1;
            AmazonDynamoDBClient client = new AmazonDynamoDBClient(clientConfig); // using the "default" profile in Visual Studio which contains the AWS credentials

Is there a special directive to be added to the project or in the code to embed the Secret/Key credentials (which would be insecure) or am I missing something else?
Should I be using Shared Credentials File instead of the .NET Encrypted Store when creating the profile in AWS Explorer in VS? (the documentation is very skimpy on the difference)

A: So I was able to piece together the solution, it depends on your environment.
Apparently AWS SDK doesn't embed the secret and key into the project. It only references the projects to the .NET Encrypted Store and the default profile (which is on the same machine where VS is installed).
If you want to use a DynamoDB project on a different machine (e.g. virtual machine) then you'll need to create a credential file which contains your secret and key and update your project/deployment to reference the locations of the credentials file (super unsecure).
I found examples here:
Amazon.Runtime.AmazonServiceException: Unable to find credentials
https://aws.amazon.com/blogs/developer/referencing-credentials-using-profiles/
Since I'm using SDK.NET, I was able to update the Web.Release.config file to include the following directive which updates the web.config file in the IIS to add the AWSProfilesLocation key which is then used by the project. This is only included in the Release web.config file since while debugging on the local machine VS uses the AWS .NET encrypted store.
<appSettings xdt:Transform="Replace">
    <add key="AWSProfilesLocation" value="C:\HOSTING_FILES\App_Data\credentials" />
  </appSettings>

A little trick I used was to save the credentials file to the App_Data directory in the VS project so when the project is deployed it automatically copies the latest credentials file to the virtual machine. Alternatively you can also create a directive to copy any folders you want while publishing: How do you include additional files using VS2010 web deployment packages?
If you're deploying to an AWS EC2 instance or Lambda then you don't need to include the credentials file since that information is already accessible to the project in the AWS environment:
https://docs.amazonaws.cn/powershell/latest/userguide/specifying-your-aws-credentials.html
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/authentication-and-access-control.html


text:
Q: AXLSX X-Axis Scaling Made an account just for this, because I really can't figure this one out using the AXLSX gem. I have a line chart generated already with labels, but I want to space them out evenly using the MAX value rounded up to the nearest 10,000th for 9 points.
The example I attached has 120,152 as the highest values, so I want to set the MAX as 130,000, and have even intervals for each point leading up to it (0, 12k, 24k, 36k, for example).
How would I be able to customize the labels to follow this scheme using the AXLSX gem?
Picture of my Chart
Thanks!


text:
Q: UploadedFile is null when submit jsf upload request with Tomahawk trying to upload a file on a facelets page using Tomahawk2.0 1.1.11. But I get a null pointer exception and I see in the debugger, the uploadedFile variable is not being set in the bean.  Any ideas why the bean isn't being set?  The t:inputFileUpload component is otherwise rendering and functioning as I would expect.
page:
<h:form enctype="multipart/form-data">
<t:inputFileUpload value="#{Bean.uploadedFile}" />
<h:commandButton type="submit" id="Submit" value="Submit" action="#{Bean.submit}"/>
<h:messages />
</h:form>

bean:
protected UploadedFile uploadedFile;
public UploadedFile getUploadedFile() { return this.uploadedFile; }
public void setUploadedFile(UploadedFile uploadedFile) {
this.uploadedFile = uploadedFile;}

public String submit()  throws IOException {
String fileName = FilenameUtils.getName(uploadedFile.getName()); // exception here!!
String contentType = uploadedFile.getContentType();
byte[] bytes = uploadedFile.getBytes();
FacesContext.getCurrentInstance().addMessage(null,
new FacesMessage(String.format("File '%s' of type '%s' successfully uploaded!",
fileName, contentType)));

return "success";
}

The exception happens on the first line of submit.  In the debugger I see that uploadedFile is null.  The jsf page looks fine and I can use the browse button to choose a file.  After I press submit I see uploadedFile in the bean is null.
Error message:
16:06:59,699 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Framework].[Faces Servlet]] (http--127.0.0.1-8080-2) Servlet.service() for servlet Faces Servlet threw exception: java.lang.NullPointerException
    at net.gui.bean.Bean.submit(Bean.java:118) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_30]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_30]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_30]
    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_30]
    at org.apache.el.parser.AstValue.invoke(AstValue.java:196) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.component.UICommand.broadcast(UICommand.java:315) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:794) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1259) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:81) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:357) [tomahawk20-1.1.11.jar:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at net.gui.filter.HibernateSessionRequestFilter.doFilter(HibernateSessionRequestFilter.java:34) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at net.gui.filter.NAISAuthFilter.doFilter(NAISAuthFilter.java:59) [classes:]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]

web.xml:
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
    <filter-name>NaisAuth</filter-name>
    <filter-class>net.gui.filter.NAISAuthFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>NaisAuth</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter>
<filter-name>HibernateFilter</filter-name>
<filter-class> net.gui.filter.HibernateSessionRequestFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>HibernateFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

A: That can happen when either NAISAuthFilter or HibernateSessionRequestFilter have accessed the request body beforehand by getParameter(), getReader(), etc. This way the request body is already parsed before the ExtensionsFilter ever get chance to do it.
Either fix those filters, or rearrange the mapping of ExtensionsFilter in web.xml to be declared before those filters.
Another possible cause is that you're actually nesting multiple <h:form> compnents in each other. This will result in illegal HTML syntax and the browser behaviour is unspecified as to processing form submits. You need to ensure that you aren't nesting forms (multiple forms in parallel is however perfectly valid).


text:
Q: CSS postion not working as expected. How to resolve? In this code block there is div which represent rating value and count. I used span as attribute and class respectively rating-pill and map-item__rat-overall. Both spans are not in the same row. I want my span attribute work as shown in the image. I tried it but it not working as expected. How can I resolve the issue?

.map-item{
    width: 320px;
    height: 168px;
    padding: 8px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.map-item__close{
  width: 20px;
  height: 20px;
  display: block;
  position: absolute;
  top: 6px;
  opacity: .5;
  right: 5px;
}
.pointer{
  cursor: pointer;
}
.btn--reset{
  padding: 0;
  border: 0;
  background-color: transparent;
}
.icon-ic{
  background-repeat: no-repeat;
  background-position: 50%;
  line-height: 0;
  display: inline-block;
  text-indent: 0;
}
.visuallyhidden{
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width:1px;
  white-space: nowrap;
}
.map-item__gallery{
  cursor: pointer;
  position: relative;
  height: 100px;
  width: 100px;
  float: left;
}
.gm-style img{
  max-width: none;
}
.map-item__image{
  width: 100px;
  height: 100px;
}
.map-item__info{
  width: 196px;
  height: 100px;
  display: inline-block;
  margin-left: 8px;
}
.map-item__name{
  font-size: 13px;
  margin: 2px 0 8px;
  padding-right: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #37454d;
}
.map-item__stars{
  vertical-align: middle;
  margin-right: 6px;
}
.map-item__type{
  vertical-align: middle;
  display: inline-block;
  width: 100px;
  font-size: 12px;
  line-height: 1;
}
.map-item__rat{
  margin-top: 8px;
  height: 26px;
}
@media only screen and (min-width: 980px) {
  .rating-pill{
    -webkit-flex: 0 0 30px;
    flex: 0 0 30px;
  }
}
.rating-pill{
  margin-right: 8px;
  display: inline-block;
  width: 30px;
  height: 18px;
  border-radius: 18px;
}
.rating-pill--color-4{
  background-color: #428500;
}
.rating-pill__value{
  font-size: 12px;
  padding: 2px 0;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  display: block;
}
.map-item__rat-count{
  width: 156px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
  color: #37454d;
}
.map-item__rat-overall{
  font-size: 12px;
  margin-right: 0;
}
.map-item__callout{
  margin-top: 12px;
  width: 100%;
  cursor: pointer;
  display: -webkit-flex !important;
  display: flex !important;
}
.fl-trailing{
  float: right;
}
.map-item__deal{
  height: 40px;
  width: 50%;
}
.fl-leading{
  float: left;
}
.map-item__deal-partner{
  display: block;
  font-size: 12px;
  padding-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-trv-maincolor-04-light{
  color: #697379;
}
.map-item__deal-min{
  font-size: 18px;
  color: #428500;
}
.fw-bold{
  font-weight: 700;
}
.map-btn__deal{
  height: 36px;
  width: 50%;
  padding: 0;
  border-radius: 2px;
  border: 1px solid #316300;
  border-width: 0 0 1px;
  background-color: #428500;
  color: #fff;
  font-size: 12px;
  position: relative;
  outline: none;
}
.label__view{
  margin: 3px 0 1px;
}
.label{
  display: inline-block;
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
}
.map-btn__deal-ic{
  width: 5px;
  height: 9px;
  margin-left: 16px;
}
.inline-block{
  display: inline-block;
}
.icon-ic{
  background-repeat: no-repeat;
  background-position: 50%;
  line-height: 0;
  text-indent: 0;
}
.icon-ic>svg{
  pointer-events: none;
}
svg:not(:root){
  overflow: hidden;
}
svg{
  outline-width: 0;
}

         <button class="map-item__close pointer btn--reset" id="popup-close-btn" data-actions="close">

               <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                  <path class="svg-color--primary" fill="#697379" d="M7.414 6l4.293-4.293C11.903 1.51 12 1.257 12 1s-.097-.512-.293-.707c-.39-.39-1.023-.39-1.414 0L6 4.586 1.707.293c-.39-.39-1.023-.39-1.414 0C.097.488 0 .743 0 1s.097.512.293.707L4.586 6 .293 10.293C.097 10.488 0 10.743 0 11s.097.512.293.707S.743 12 1 12s.512-.097.707-.293L6 7.414l4.293 4.293c.195.195.45.293.707.293s.512-.097.707-.293S12 11.257 12 11s-.097-.512-.293-.707L7.414 6z"></path>
               </svg>

            Close
         </button>

            <button class="map-item__image-ph hidden-phone btn--reset" data-actions="openGallery" type="button">

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="22" height="22" viewBox="0 0 22 22">
                     <g class="svg-color--primary" fill="#FFF">
                        <path d="M21.978 10.69c0-.01 0-.02-.01-.032-.012-.088-.023-.176-.056-.264-.055-.198-.143-.385-.242-.56-.055-.067-.11-.144-.165-.21-.396-.506-1.012-.825-1.705-.825H7.7c-1.21 0-2.2.99-2.2 2.2v8.8c0 .12.01.23.032.34.01.09.02.177.055.265.055.198.143.385.242.56.054.067.11.144.164.21C6.39 21.68 7.006 22 7.7 22h12.1c.132 0 .275-.01.407-.044.11-.01.22-.044.33-.088.01 0 .033-.01.044-.01.122-.045.232-.1.342-.166.066-.033.12-.077.176-.12.01-.012.022-.012.022-.023.44-.33.76-.815.847-1.387.01-.044.022-.088.022-.143.01-.077.01-.143.01-.22V11c0-.11-.01-.21-.022-.31zm-6.58 2.465c.023-.583.507-1.056 1.1-1.056.33 0 .628.142.826.373.176.198.275.45.275.726 0 .604-.496 1.1-1.1 1.1-.606 0-1.1-.496-1.1-1.1v-.045zM20.9 19.8c0 .605-.495 1.1-1.1 1.1H7.7c-.386 0-.727-.198-.925-.506-.11-.176-.176-.374-.176-.594v-1.067l4.377-4.368 4.015 4.004c.21.22.56.22.77 0L20.9 13.23V19.8z"></path>
                        <path d="M6.786 7.83c.286-.087.594-.13.913-.13h5.62l2.244-3.566.803 3.565h1.122l-1.343-5.985C15.883.538 14.695-.21 13.517.055L1.715 2.714C.537 2.99-.21 4.168.054 5.355l1.605 7.108.33 1.474c.02.11.054.198.087.297.143.385.385.704.704.935.44.362 1.024.538 1.618.472V14.52h-.022c-.374.088-.748-.033-1.012-.286-.143-.143-.253-.33-.297-.54l-.242-1.044 3.312-5.225.65.406zm3.97-4.51c.595-.132 1.178.242 1.32.836.133.594-.24 1.177-.835 1.32-.593.132-1.176-.242-1.32-.836-.13-.593.243-1.177.837-1.32z"></path>
                     </g>
                  </svg>

               View full-screen gallery
            </button>

OYO 5054 Sun-N-Step Club

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

8.3

               Very good (838 reviews)

Yatra₹3,045

            <button class="map-btn__deal js_co_link" onclick="window.Clickout.shortClick(this);" data-id="ecc83429" data-co_params="{"group":764,"enc4":"_pVgD-TjdbEgpkCh3Q3E3XDEvIFx7ch-tmUZ2T8HvrP0A6Rr8s-ct.Ntctk-xIgfazJY61rI0WW-pRyEJAlTh7YTKvU7oCe34eEhvQyFJbh2LPPlE8wIFh7TYQRiAuZsY1kmQZ9ivMMXHSsf81-jZeSadW6LNqX9CcokhH39kxRYOnqvX"}" data-bestprice="3045" data-actions="dealClick" data-co_li_lo="1" data-co_ra_at="0" data-co_fr_ca="0">
               View Deal

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="5" height="9" viewBox="0 0 5 9">
                     <path class="svg-color--primary" fill="#FFF" d="M1.444.245c.307.316 3.31 3.643 3.31 3.643.164.17.246.39.246.612 0 .222-.082.443-.246.61 0 0-3.003 3.328-3.31 3.645-.307.316-.86.338-1.188 0-.328-.337-.354-.81 0-1.223L3.01 4.5.257 1.468c-.354-.414-.328-.885 0-1.223.328-.337.88-.316 1.188 0z"></path>
                  </svg>

            </button>

Expectation:

A: Replace below class of CSS from you
   .rating-pill{
      position:absolute;
      margin-right: 8px;
      display: inline-block;
      width: 30px;
      height: 18px;
      border-radius: 18px;
   }

A: use display:table instead of display:inline-blcok and change css as per below

.map-item{
    width: 320px;
    height: 168px;
    padding: 8px;
    background-color: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.map-item__close{
  width: 20px;
  height: 20px;
  display: block;
  position: absolute;
  top: 6px;
  opacity: .5;
  right: 5px;
}
.pointer{
  cursor: pointer;
}
.btn--reset{
  padding: 0;
  border: 0;
  background-color: transparent;
}
.icon-ic{
  background-repeat: no-repeat;
  background-position: 50%;
  line-height: 0;
  display: inline-block;
  text-indent: 0;
}
.visuallyhidden{
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width:1px;
  white-space: nowrap;
}
.map-item__gallery{
  cursor: pointer;
  position: relative;
  height: 100px;
  width: 100px;
  float: left;
}
.gm-style img{
  max-width: none;
}
.map-item__image{
  width: 100px;
  height: 100px;
}
.map-item__info{
  width: 196px;
  height: 100px;
  display: inline-block;
  margin-left: 8px;
}
.map-item__name{
  font-size: 13px;
  margin: 2px 0 8px;
  padding-right: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #37454d;
}
.map-item__stars{
  vertical-align: middle;
  margin-right: 6px;
}
.map-item__type{
  vertical-align: middle;
  display: inline-block;
  width: 100px;
  font-size: 12px;
  line-height: 1;
}
.map-item__rat{
  margin-top: 8px;
  height: auto;
  display:table;
}
@media only screen and (min-width: 980px) {
  .rating-pill{
    -webkit-flex: 0 0 30px;
    flex: 0 0 30px;
  }
}
.rating-pill{
  margin-right: 8px;
  width: 30px;
  height: 18px;
  border-radius: 18px;
  display:table-cell;
}
.rating-pill--color-4{
  background-color: #428500;
}
.rating-pill__value{
  font-size: 12px;
  padding: 2px 0;
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  display: block;
}
.map-item__rat-count{
  width: 156px;
  display: table-cell;
  vertical-align: middle;
  line-height: 1;
  color: #37454d;
  padding-left:5px;
}
.map-item__rat-overall{
  font-size: 12px;
  margin-right: 0;
}
.map-item__callout{
  margin-top: 12px;
  width: 100%;
  cursor: pointer;
  display: -webkit-flex !important;
  display: flex !important;
}
.fl-trailing{
  float: right;
}
.map-item__deal{
  height: 40px;
  width: 50%;
}
.fl-leading{
  float: left;
}
.map-item__deal-partner{
  display: block;
  font-size: 12px;
  padding-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-trv-maincolor-04-light{
  color: #697379;
}
.map-item__deal-min{
  font-size: 18px;
  color: #428500;
}
.fw-bold{
  font-weight: 700;
}
.map-btn__deal{
  height: 36px;
  width: 50%;
  padding: 0;
  border-radius: 2px;
  border: 1px solid #316300;
  border-width: 0 0 1px;
  background-color: #428500;
  color: #fff;
  font-size: 12px;
  position: relative;
  outline: none;
}
.label__view{
  margin: 3px 0 1px;
}
.label{
  display: inline-block;
  max-width: 100%;
  font-size: 14px;
  font-weight: 700;
}
.map-btn__deal-ic{
  width: 5px;
  height: 9px;
  margin-left: 16px;
}
.inline-block{
  display: inline-block;
}
.icon-ic{
  background-repeat: no-repeat;
  background-position: 50%;
  line-height: 0;
  text-indent: 0;
}
.icon-ic>svg{
  pointer-events: none;
}
svg:not(:root){
  overflow: hidden;
}
svg{
  outline-width: 0;
}

         <button class="map-item__close pointer btn--reset" id="popup-close-btn" data-actions="close">

               <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                  <path class="svg-color--primary" fill="#697379" d="M7.414 6l4.293-4.293C11.903 1.51 12 1.257 12 1s-.097-.512-.293-.707c-.39-.39-1.023-.39-1.414 0L6 4.586 1.707.293c-.39-.39-1.023-.39-1.414 0C.097.488 0 .743 0 1s.097.512.293.707L4.586 6 .293 10.293C.097 10.488 0 10.743 0 11s.097.512.293.707S.743 12 1 12s.512-.097.707-.293L6 7.414l4.293 4.293c.195.195.45.293.707.293s.512-.097.707-.293S12 11.257 12 11s-.097-.512-.293-.707L7.414 6z"></path>
               </svg>

            Close
         </button>

            <button class="map-item__image-ph hidden-phone btn--reset" data-actions="openGallery" type="button">

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="22" height="22" viewBox="0 0 22 22">
                     <g class="svg-color--primary" fill="#FFF">
                        <path d="M21.978 10.69c0-.01 0-.02-.01-.032-.012-.088-.023-.176-.056-.264-.055-.198-.143-.385-.242-.56-.055-.067-.11-.144-.165-.21-.396-.506-1.012-.825-1.705-.825H7.7c-1.21 0-2.2.99-2.2 2.2v8.8c0 .12.01.23.032.34.01.09.02.177.055.265.055.198.143.385.242.56.054.067.11.144.164.21C6.39 21.68 7.006 22 7.7 22h12.1c.132 0 .275-.01.407-.044.11-.01.22-.044.33-.088.01 0 .033-.01.044-.01.122-.045.232-.1.342-.166.066-.033.12-.077.176-.12.01-.012.022-.012.022-.023.44-.33.76-.815.847-1.387.01-.044.022-.088.022-.143.01-.077.01-.143.01-.22V11c0-.11-.01-.21-.022-.31zm-6.58 2.465c.023-.583.507-1.056 1.1-1.056.33 0 .628.142.826.373.176.198.275.45.275.726 0 .604-.496 1.1-1.1 1.1-.606 0-1.1-.496-1.1-1.1v-.045zM20.9 19.8c0 .605-.495 1.1-1.1 1.1H7.7c-.386 0-.727-.198-.925-.506-.11-.176-.176-.374-.176-.594v-1.067l4.377-4.368 4.015 4.004c.21.22.56.22.77 0L20.9 13.23V19.8z"></path>
                        <path d="M6.786 7.83c.286-.087.594-.13.913-.13h5.62l2.244-3.566.803 3.565h1.122l-1.343-5.985C15.883.538 14.695-.21 13.517.055L1.715 2.714C.537 2.99-.21 4.168.054 5.355l1.605 7.108.33 1.474c.02.11.054.198.087.297.143.385.385.704.704.935.44.362 1.024.538 1.618.472V14.52h-.022c-.374.088-.748-.033-1.012-.286-.143-.143-.253-.33-.297-.54l-.242-1.044 3.312-5.225.65.406zm3.97-4.51c.595-.132 1.178.242 1.32.836.133.594-.24 1.177-.835 1.32-.593.132-1.176-.242-1.32-.836-.13-.593.243-1.177.837-1.32z"></path>
                     </g>
                  </svg>

               View full-screen gallery
            </button>

OYO 5054 Sun-N-Step Club

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="12" height="12" viewBox="0 0 12 12">
                     <path class="svg-color--primary" fill="#F6AB3F" d="M11.988 5.21c-.052-.275-.27-.488-.545-.534l-3.604-.6L6.63.455C6.542.184 6.287 0 6 0s-.542.184-.632.456L4.16 4.076l-3.603.6c-.275.046-.493.26-.545.533-.052.273.072.55.312.695L3.2 7.63l-1.165 3.493c-.093.28.01.59.25.758.115.08.25.12.382.12.148 0 .295-.05.416-.146L6 9.52l2.917 2.333c.12.098.27.147.416.147.133 0 .267-.04.38-.12.244-.17.346-.478.252-.758L8.8 7.63l2.876-1.725c.24-.144.364-.422.312-.696z"></path>
                  </svg>

8.3

               Very good (838 reviews)

Yatra₹3,045

            <button class="map-btn__deal js_co_link" onclick="window.Clickout.shortClick(this);" data-id="ecc83429" data-co_params="{"group":764,"enc4":"_pVgD-TjdbEgpkCh3Q3E3XDEvIFx7ch-tmUZ2T8HvrP0A6Rr8s-ct.Ntctk-xIgfazJY61rI0WW-pRyEJAlTh7YTKvU7oCe34eEhvQyFJbh2LPPlE8wIFh7TYQRiAuZsY1kmQZ9ivMMXHSsf81-jZeSadW6LNqX9CcokhH39kxRYOnqvX"}" data-bestprice="3045" data-actions="dealClick" data-co_li_lo="1" data-co_ra_at="0" data-co_fr_ca="0">
               View Deal

                  <svg xmlns="http://www.w3.org/2000/svg" focusable="false" tabindex="-1" width="5" height="9" viewBox="0 0 5 9">
                     <path class="svg-color--primary" fill="#FFF" d="M1.444.245c.307.316 3.31 3.643 3.31 3.643.164.17.246.39.246.612 0 .222-.082.443-.246.61 0 0-3.003 3.328-3.31 3.645-.307.316-.86.338-1.188 0-.328-.337-.354-.81 0-1.223L3.01 4.5.257 1.468c-.354-.414-.328-.885 0-1.223.328-.337.88-.316 1.188 0z"></path>
                  </svg>

            </button>

A: adding float:left to these classes rating-pill and map-item__rat-overall the adjust padding for the vertical alignment
will also get you to the result.
.rating-pill {
margin-right: 8px;
display: inline-block;
width: 30px;
height: 18px;
border-radius: 18px;
float: left;

}
.map-item__rat-overall {
font-size: 12px;
margin-right: 0;
float: left;
padding: 3px 0;

}


text:
Q: How to assign symbol to Matrix I want to verify the Cayley-Hamilton theorem in python. To do so, i have to update x to matrix A. How can I do so
** subs function is not working here
from sympy import symbols, Matrix
import numpy as np
x = symbols(['x'])
A = Matrix([[4, 5, 6],
             [7, 8, 9],
             [10, 11,12]])
LL = np.eye(3)*x

DEttt = A - LL

Deter = DEttt.det() #characteristics equation
print(Deter.subs(x,A))


text:
Q: Non trivial example of free action on Half plane I'm learning Riemann surfaces with Donaldson' Riemann surfaces.
In Donaldson, he proved that if $X$ is Riemannian surfaces and $\Gamma$ is subgroup of group of holomorphic automorphism of $X$(that is, $PSL(2,\mathbb{R})$) acts freely on $X$.
I want to find concrete non trivial example of $\Gamma$ but didn't.
For example let $\Gamma = \bigg\langle\begin{pmatrix} 2 & 1 \\ 1 &1\end{pmatrix}\bigg\rangle$,
how I know whether this acts freely or not?
-
In previous example now I see this acts freely since 2+1>2. Just I didn't catch it. But It's too hard to visualize, so is there any 'nice' example?

A: A very straightforward example is the group generated by $T=\pmatrix{1&1\\0&1}$.
This is the map $z\mapsto z+1$, and so has no fixed points. A disc $D$
with Euclidean diameter $<1$ is mapped by the powers of $T$ into a sequence
$(T^n(D))_{n=-\infty}^\infty$
of disjoint discs, which makes it clear that the action is free.


text:
Q: Degenerate eigenvectors don't respect the symmetry of the matrix using SciPy or NumPy libraries We are trying to diagonalize the two following matrices: matrix1 and matrix2
We compared our results with Wolfram Mathematica and in the first matrix we obtained different results when comparing eigenvectors corresponding to degenerate eigenvalues.
Here the code we use in python. In Mathematica we just use the classic function "Eigensystem[]".
As you can see for the first matrix the results from SciPy and Mathematica are really different while for the second one the coincide.
In particular what we observe that for the first matrix the 2nd and 3rd eigenvectors are degenerate in energy. In Mathematica "Eigensystem[]" is able to find two eigenvectors that conserve the translational symmetry of the matrix while Python, in this particular case, is not.
Surprisingly for the second matrix the two results, Mathematica and Python, are the same.
Does anyone has some ideas why this is happening and how to solve it?
Our goal would be to diagonalize large sparse hermitian matrices but we also find the same problem in that case.
import numpy as np
from numpy import linalg
import scipy.linalg

t=-1
matrix1 = np.array([ [0, t, 0, 0, t], [t, 0, t, 0, 0],[0, t, 0, t, 0],[0, 0, t, 0, t],[t, 0, 0, t, 0]])

matrix2 = np.array([[0, t, 0, t, 0],[t, 0, t, 0, t],[0, t, 0, t, 0],[t, 0, t, 0, t],[0, t, 0, t, 0]])

E1,V1   = linalg.eigh(matrix1)
E2,V2 = linalg.eigh(matrix2)

print('.....First Matrix')
print('Matrix')
print(matrix1)
print('Eigenvalues')
print(E1)
print('Eigenvectors')
for i in range(len(V1)):
    print(V1[:,i]

print('')

print('.....Second Matrix')
print('Matrix')
print(matrix2)
print('Eigenvalues')
print(E2)
print('Eigenvectors')
for i in range(len(V2)):
    print(V2[:,i])

Here is the output of python and mathematica for the two matrices.
......First Matrix..............................................................

.....PYTHON.....

Matrix

[[ 0 -1  0  0 -1]

 [-1  0 -1  0  0]

 [ 0 -1  0 -1  0]

 [ 0  0 -1  0 -1]

 [-1  0  0 -1  0]]

Eigenvalues

[-2.    -0.618 -0.618  1.618  1.618]

Eigenvectors

[-0.447 -0.447 -0.447 -0.447 -0.447]

[ 0.103  0.625  0.283 -0.450 -0.561]

[-0.624 -0.094  0.566  0.444 -0.291]

[ 0.632 -0.512  0.195  0.195 -0.512]

[ 0.000  0.371 -0.601  0.601 -0.371]

.....MATHEMATICA.....

Eigenvalues

(-2.,-0.618034,-0.618034,1.61803,1.61803)

Eigenvectors

(-0.44721   -0.44721  -0.447214 -0.447214   -0.447214

  0.60150    0.37174  -0.371748 -0.601501   0.

  0.19544   -0.51166  -0.511667  0.19544    0.632456

 -0.51166    0.19544   0.19544  -0.511667   0.632456

 -0.37174    0.60150  -0.601501  0.371748   0.)

......Second Matrix..............................................................

.....PYTHON.....

Matrix

[[ 0 -1  0 -1  0]

 [-1  0 -1  0 -1]

 [ 0 -1  0 -1  0]

 [-1  0 -1  0 -1]

 [ 0 -1  0 -1  0]]

Eigenvalues

[-2.449 0  0  0  2.449]

Eigenvectors

[ 0.408  0.5    0.408  0.5    0.408]

[ 0.816  0     -0.408  0     -0.408]

[ 0.    -0.707  0.     0.707  0.   ]

[ 0.     0.    -0.707  0.     0.707]

[-0.408  0.5   -0.408  0.5   -0.408]

.....MATHEMATICA.....

Eigenvalues

(-2.44949,0.,0.,3.55271*10^-15,2.44949)

Eigenvectors

(-0.408248  -0.5    -0.408248   -0.5    -0.408248

0   0.707107    0   -0.707107   0

0.707107    0   -0.707107   0   0

-0.408248   0   -0.408248   0   0.816497

-0.408248   0.5 -0.408248   0.5 -0.408248)

A: The basis for the eigenspace associated with an eigenvalue with geometric multiplicity 2 is not unique.  So it is not unexpected that two different libraries would return different bases.
I don't see anything wrong with the results computed by numpy.linalg.eigh for matrix1.  For example,
In [47]: E1, V1 = linalg.eigh(matrix1)

Verify that E1 and V1 satisfy the eigenvalue problem:
In [48]: np.allclose(matrix1 @ V1, V1 @ np.diag(E1))
Out[48]: True

Verify that the vectors in V1 are orthonormal:
In [49]: np.allclose(V1.T @ V1, np.eye(len(matrix1)))
Out[49]: True


text:
Q: Windows keeps making these random "device connect" and "device disconnect" sounds Throughout the day I notice that my computer makes apparently random device-connect and/or device-disconnect ("boink") sounds.
I suppose it is the same sound you hear when connecting or disconnecting a USB device such as a thumb drive.  I've noticed that this happens on each of three computers I work with at home, my wife's computer, and my machine at work.  It happens without any user action at all - i.e. I'll be just sitting there (hands off my mouse and keyboard), and the computer will make the sound.  There is no visual queue or anything.  Just the sound.
I have sometimes gone in pursuit of the sound - running virus scans, examining event logs and such, and observing task manager - but have never had any luck tracking this thing down, but have not had any luck.
I've been noticing this since Windows Vista and now the sounds have followed me through to Windows 7.
Surely someone else out there must be experiencing this and can explain what is happening.

A: Had this problem. It was the monitor going into 'sleep' mode then coming back up - Windows struggled to recognise that it was on after 'sleep' (even though it was displaying just fine). Turned it off & on again, problem went away. Can't say it will work for you, but if you have any peripheral that goes into 'sleep' or 'power saving mode', giving it the off-and-on-again is an easy trick to try before mucking about with settings.

A: I just solved this on my desktop using Nirsoft's USBLogView. It's my mouse.  I only hear the disconnect sound, but there's a reconnect happening immediately after. And the program isn't catching most of them either.  (Hat-Tip to imaximchuk for this.)

A: Check the "Safely Remove Hardware" applet in the Notification area periodically. What's there only some of the time? That device is your problem.

A: Busted wire in the mouse cable was causing mine. Oddly enough, the mouse was fairly functional till the day I noticed a skip.
I pulled the cable tautly, and it totally lost function. Replacing the bad mouse fixed the issue for me.

A: It may be devices that are charging. Consider unplugging things such as phones and observing whether the behavior stops.
In my case, once my phone is at full charge it tends cause the "device disconnected" sound to play (with no corresponding "device connected"), including when it receives a text. If I remove the phone I won't get the periodic sounds.

A: I just had this problem, and the problem turned out to be a problem with the software for a D-Link router. The software allowed the user to connect a USB device to the router, but was constantly trying to disconnect and reconnect from that device.
I think the process was like "Network USB Connection", and there was a similar program in "Add/Remove Programs".

A: Make sure that any USB, Bluetooth, Network devices in Device Manager in the Power Management tab do not have the option Allow the computer to turn off this device to save power checked.

A: I would guess that something is disconnecting do to inactivity.  It could be an external drive or other USB peripheral.  Also, I know that when switch my KVM to another machine it disconnects the mouse/keyboard and reconnects them when I switch back (causing "boinks" both times.)

A: Just so you know, I got that same exact problem this morning over a laptop. I disconnected all USB on it to realize that the problem was the docking station. I changed it for a new one and the sound stopped. It was as simple as that.

A: Thanks to JimB, I have used  Nirsoft's USBLogView and found that one of my Microsoft Hub Ethernet port gets into cycle of connect/disconnect.  When I looked close into my setup, I had a wifi usb adapter aswell connected via (Aukey Multi-function USB Hub - CB-H17).
The sooner I disconect my wifi USB adapter, the annoying noise stopped.


text:
Q: How to invoke a SOAP Web service using Gatling 2.2.0 I am new to Gatling and Scala. How to invoke / test a java SOAP web service using Gatling 2.2.0 ? I had searched google and gatling documentation, but could not find any link for that
code:
    val httpProtocol = http
        .baseURL("http://PUNITP83267L:8081/WebServiceProject/services/MyService")
    val headers_0 = Map(
        "accept-encoding" -> "gzip, deflate",
        "Content-Type" -> "text/xml;charset=UTF-8",
        "SOAPAction" -> "",
        "Content-Length" -> "275",
        "Host" -> "PUNITP83267L:8081",
        "Connection" -> "alive",
        "accept-language" -> "en-US,en;q=0.8",
        "user-agent" -> "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36"
    )

    val scn = scenario("SOAPRecordedSimulation")
        .exec(http("simple Soap Request")
        .post("<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">
              <soapenv:Body><greetMeResponse xmlns=\"http://ws.star.fs.infosys.com\">
              <greetMeReturn>Hello uMESH</greetMeReturn></greetMeResponse>
              </soapenv:Body></soapenv:Envelope>\"\r\n")
        .headers(headers_0))
    setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}

A: Am not sure if there is a recorder available. But, you could make changes to your script as below:
class testSOAP extends Simulation {

val httpProtocol = http
            .baseURL("http://PUNITP83267L:8081/WebServiceProject/services/")

    val header = Map(
    "accept-encoding" -> "gzip, deflate",
    "Content-Type" -> "text/xml;charset=UTF-8",
    "SOAPAction" -> "", "Content-Length" -> "275",
    "Host" -> "PUNITP83267L:8081",
    "Connection" -> "alive",
    "accept-language" -> "en-US,en;q=0.8",
    "user-agent" -> "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36")

    val scn = scenario("SOAPRecordedSimulation")
            .exec(http("simple Soap Request")
            .post("MyService")
            .headers(header)
            .body(StringBody("""<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Body><greetMeResponse xmlns=\"http://ws.star.fs.infosys.com\"><greetMeReturn>Hello uMESH</greetMeReturn></greetMeResponse></soapenv:Body></soapenv:Envelope>\"\r\n""")))
        setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}

A: I think that the SAOP code have to be in a file, and the base url doesn't contain the url context. It's just the base url (localhost:7001). Put the url context in the post function.
Here is the code :
package my.package

import scala.concurrent.duration._

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import io.gatling.jdbc.Predef._

class MyClass extends Simulation {

  val httpProtocol = http
    .baseURL("http://127.0.0.1:7001")
    .inferHtmlResources()
    .acceptEncodingHeader("gzip,deflate")
    .contentTypeHeader("text/xml;charset=UTF-8")
    .userAgentHeader("Apache-HttpClient/4.1.1 (java 1.5)")

  val headers_0 = Map("SOAPAction" -> """""""")

  val uri1 = "http://127.0.0.1:7001/my-project/my-service"

  val scn = scenario("ScenarioName")
    .exec(http("request_0")
      .post("/my-project/my-service")
      .headers(headers_0)
      .body(RawFileBody("MyService_0000_request.txt")))

  setUp(scn.inject(atOnceUsers(1))).protocols(httpProtocol)
}

"MyService_0000_request.txt" is a file in bodies folder and contains the soap request body.


text:
Q: Get the name of the current foreground app I need to do a study of what apps are actually used among a group of test users taking part of an experiment. I would like to know the time each of the random 3rd party apps have been used to do statistics on it. If possible, I plan on distributing an iOS app through TestFlight. My app will gather the app usage statistics and send it to my server.
The overall goal is to get total usage time for each installed app on a daily base from each of the users taking part of the experiment.
What I have:
One of my ideas are to develop an app that will use the VoIP backgrounding profile (or similar) to run in the background and periodically (like every 10 secs) log the name or bundle identifier of the current foreground app (if any).
I have found a method to get the current running processes: Can we retrieve the applications currently running in iPhone and iPad
The method described in the above post gives a struct kinfo_proc that includes other structs with information such the process name, priority and running time (including time spent in the background). I have not been able to identify a flag revealing what process is in the foreground. Also the priority does not seem to be a reliable indictor. Something I'm missing here?
The above method can be used to get the current running time for a process, but as each app can be sleeping in the background for days (or weeks) this is a poor indicator for how much the app has actually been used. If I could kill all the running user installed apps every hour or so I could get an indicator of how often apps are used. The most used apps would be cold-started by the user more often. But that would give an unpleasant experience for the testers as apps are killed randomly. But anyway, is there a way I can kill another process?
Another idea is to traverse through the view hierarchy to probe the label of the leftmost app in the task bar. Any ideas of how this might be possible to hack?
I had another idea of analyzing device logs and gathering app usage statistics that way. However it seems that app background-foreground switching activity is not logged to the system console. Is there some other logs containing this information or can I get it somehow by enabling energy diagnostics logging?
If I had my test users set up to use Apple Mobile Device Management (MDM) would I then be able  to collect the information I am interested in?
Any ideas are very much appreciated.
A few notes:
My test users does not have jailbroken devices, but I can use private APIs as I am not distributing through the App Store.

A: I would use an analytics tool like Flurry Analytics to get the data concerning usage statistics, which you could then download into your app using their API.  They can get you very details stats on how your users are using your app, how frequently, etc.  It's a great tool, plus it's free!


text:
Q: Code to insert image works in HTML but not in JSP I used following code to insert image in jsp page (netbeans):

The class was as shown in the code below:
.split0 {
height: 20%;
width: 100%;
position: fixed;
z-index: 1;
overflow-x: hidden;
padding-top: 20px;

}
.top{
    top: 0;
    left: 0;
    right:0;
    background-color: #488813;
}

This code did not work there and "Missing Picture" was displayed all the time. But when I created simple html page (notepad) with following code, the image was displayed by browser.

What may be the reason behind failure in displaying image in JSP page?

A: Finally, I found the answer of this question. Have a look at following code:
try{
  String imgName="C:\\Users\\pc\\Desktop\\Pictures\\neosphere.png";
  BufferedImage bImage = ImageIO.read(new File(imgName));//give the path of an image
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ImageIO.write( bImage, "png", baos );
    baos.flush();
    byte[] imageInByteArray = baos.toByteArray();
    baos.close();
    String b64 = DatatypeConverter.printBase64Binary(imageInByteArray);
    %>
    <img style="height:90px" align="center" class="img-responsive" src="data:image/jpg;base64, <%=b64%>" alt="Missing Picture"/>
    <%
}catch(IOException e){
  System.out.println("Error: "+e);
}

%>

This code helped me to insert image in JSP page from my local computer png file.


text:
Q: Is it possible to overload the nameof operator in c#? Can I overload the nameof operator in C#?
The C# programming guide is outdated and the C# 6 under the hood doesn't help me.
How can I overload the nameof operator?

A: The nameof operator is evaluated at compile-time.

The nameof expression is a constant. In all cases, nameof(...) is evaluated at compile-time to produce a string. Its argument is not evaluated at runtime, and is considered unreachable code (however it does not emit an "unreachable code" warning).

So, these operator cannot be overloaded.


text:
Q: Bukkit ChatColor Translate Alternate Color Codes So I am making a plugin and in the plugin config file you can put things like &b or &a and I know that there's a bukkit chatColor function for this called ChatColor.translateAlternateColorCodes('&', AString) but I don't understand what to put in AString. Thanks for helping me.

A: AString in CamelCase says "a String".
You should place whatever text has the &colorCodes in it there. For example, if you have the String &7Hello, &aWorld!, and you wanted to get the color from it, you could use:
String myString = "&7Hello, &aWorld!";
String coloredString = ChatColor.translateAlternateColorCodes('&', myString);

Which would make coloredString equal to ChatColor.GRAY + "Hello, " + ChatColor.GREEN + "World!".


text:
Q: Issue with handling cell re-iteration in Swift I have a very interesting case in which I have two UITableViews.  The primary TableView is a UITableViewController.  Each cell is made up of three parts.  The Header which display a title, the Body which acts as an accordion when you select your cell, and finally a UITableView that uses a custom Cell Identifier but uses the same delegate as the UITableViewController or parent.
Now the problem I am having is, when the user scrolls around, all the titles get jumbled up for the parent uitableview and as well as the child uitableview and I know it has to do with my dequeueReusableCellWithIdentifier.

Where the word developer is, that is the parent tableview.  The jumbled text that is a sub uitableview.  I'm looking for some guidance on the best possible solution to solve this problem.  Here is what I am doing:
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        if tableView == self.tableView {
            // #  Adjust profile picture
        //cell.headerView.profileImage.frame = CGRectMake(0,0, 50, 50)
        cell.headerView.profileImage.image = UIImage(named: "avatar-ph.jpg")
        cell.headerView.profileImage.layer.cornerRadius =
             cell.headerView.profileImage.frame.size.width / 2

        cell.headerView.profileImage.clipsToBounds = true

         ... do stuff
            cell.detailView.innertableView.dataSource = self

            // This is needed for dequeueing to succeed:
            cell.detailView.innertableView.registerClass(SingleOrderTableViewCell.self, forCellReuseIdentifier: "SingleOrderTableViewCell");

            cell.detailView.innertableView.reloadData()
        }
        else {
// [B] INNER TABLE VIEW
            let cell = tableView.dequeueReusableCellWithIdentifier("SingleOrderTableViewCell", forIndexPath: indexPath) as! SingleOrderTableViewCell

            // #  Setup our data to display
        // ## Title
        cell.title = UITextField (frame:CGRectMake(75, 5, 300, 20));
        cell.title.font = UIFont(name: "System Light", size: 10);
        cell.title.text = drinkName;

        cell.title.textColor = UIColor(netHex:0x362C6B);
        // ## qty
        cell.qty = UITextField (frame:CGRectMake(75, 22.5, 300, 20));
        cell.qty.font = UIFont(name: "System Light", size: 10);
        cell.qty.text = "Qty: " + qty;
        cell.qty.textColor = UIColor.grayColor();

        // #  Add to subframe
        cell.addSubview(cell.title);
        cell.addSubview(cell.qty);
           return cell
        }
}

The code above show cases how I handle the distinguishing of the two tableviews and set the corresponding cells to their correct tableview.
Now another thing to note that the information that is populated here is based off an object returned from the server.  So my thought was, it is working correctly; but the indexPath.row is off from the actual associated cell.
Any thoughts or suggestions?

A: A couple of observations:

*

*You are dequeueing cells using dequeueReusableCellWithIdentifier(indexPath:), but you are adding subviews in cellForRowAtIndexPath. Unfortunately that means that when a cell is re-used, you're adding a new label each time.
If you're going to use this approach of programmatically created cells, you should move the adding of the subviews into the UITableViewCell subclasses' init or awakeFromNIB methods. Those methods are called only once, and not called again when the cell is reused for another row in the table.

*I might suggesting simplifying this further, cutting the Gordian knot, and not programmatically creating cells at all. Instead, you can add prototype cells right in your storyboard, and then you don't have to call addSubview yourself at all. The process for using cell prototypes is as follows:

*

*Create blank UITableViewCell subclass.

*Add cell prototype to your tableview cell. You do this by dragging a "Table View Cell" from the Interface Builder Object Library onto your table view. (Generally, it gives you a cell prototype and you don't have to do this, though.)

*Set the base class for the cell prototype to be your UITableViewCell subclass on the "Identity Inspector" panel in Interface Builder. Also give that prototype cell a unique storyboard identifier on the "Attributes Inspector" panel.

*Drag whatever controls you want on this cell in Interface Builder at design time, rather than programmatically at run time.

*Add IBOutlet references for the controls you added in Interface Builder to your cell into your custom UITableViewCell subclass.
If you have two different types of cells, repeat this process for each.

*Unrelated to your original question, rather than doing a tableview within a tableview, I'd suggest creating a single tableview with two cell prototypes, one for the the header cell and then one for the detail cell.
Then you can create a separate "section" in your table view for each collapsable group of cells. The numberOfRowsInSection will then determine how many rows there are on the basis of whether the group is collapsed or not. If it's collapsed, just return 1 for the header cell. If it's not collapsed, return 1 plus the number of detail rows in that section.
So, when you want to hide the rows, update some flag in your model to reflect that the section is collapsed and then call deleteRowsAtIndexPaths with the appropriate animation to hide the rows. Or when you want to show the rows, again, update model and then call addRowsAtIndexPaths.
For example, consider the following:
struct Comedian {
    let name: String
}

struct Troupe {
    let name: String
    let items: [Comedian]
    var collapsed = false
}

class ViewController: UITableViewController {

    var comedyTroupes = [
        Troupe(name: "The Three Stooges", collapsed: true, items: [
            Comedian(name: "Mo"),
            Comedian(name: "Larry"),
            Comedian(name: "Curly")]
        ),
        Troupe(name: "The Marx Brothers", collapsed: true, items: [
            Comedian(name: "Chico"),
            Comedian(name: "Harpo"),
            Comedian(name: "Groucho"),
            Comedian(name: "Gummo"),
            Comedian(name: "Zeppo")]
        ),
        Troupe(name: "The Smothers Brothers", collapsed: true, items: [
            Comedian(name: "Richard"),
            Comedian(name: "Thomas")]
        ),
        Troupe(name: "Laurel and Hardy", collapsed: true, items: [
            Comedian(name: "Laurel"),
            Comedian(name: "Hardy")]
        ),
        Troupe(name: "Abbott and Costello", collapsed: true, items: [
            Comedian(name: "Abbott"),
            Comedian(name: "Costello")]
        ),
    ]

    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        return comedyTroupes.count
    }

    // if the section is collapsed, we only have the header cell; otherwise we have header cell and detail cells

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return comedyTroupes[section].collapsed ? 1 : comedyTroupes[section].items.count + 1
    }

    // row 0 will be the name of the comedy troupe; the rest of the rows will be the names of the comedians

    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        if indexPath.row == 0 {
            let cell = tableView.dequeueReusableCellWithIdentifier("HeaderCell", forIndexPath: indexPath) as! HeaderCell
            cell.comedyTroupeLabel.text = comedyTroupes[indexPath.section].name
            return cell
        } else {
            let cell = tableView.dequeueReusableCellWithIdentifier("DetailCell", forIndexPath: indexPath) as! DetailCell
            cell.comedianNameLabel.text = comedyTroupes[indexPath.section].items[indexPath.row - 1].name
            return cell
        }
    }

    // if we select header row, update model and then either call
    // `addRowsAtIndexPaths or `deleteRowsAtIndexPaths` as appropriate.

    override func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
        if indexPath.row == 0 {
            let collapsed = !comedyTroupes[indexPath.section].collapsed
            comedyTroupes[indexPath.section].collapsed = collapsed
            let indexPaths = Array(1 ... comedyTroupes[indexPath.section].items.count).map { NSIndexPath(forRow: $0, inSection: indexPath.section) }
            if collapsed {
                tableView.deleteRowsAtIndexPaths(indexPaths, withRowAnimation: .Middle)
            } else {
                tableView.insertRowsAtIndexPaths(indexPaths, withRowAnimation: .Middle)
            }
        } else {
            // do whatever you want if user selects one of the detail cells
        }
    }
}

That yields:

Now, I happen to be collapsing and expanding the detail rows whenever the header row is selected, but you could use whatever UI you want (e.g., you could add some button on the header row cell to twizzle the detail rows open and closed). Also, if you don't like this "extra header row" model, you can also use proper section header views (but then you have to jump through hoops to add header view to your table view, capture clicks on it, etc.). I think this header cell and detail cell approach is easiest, albeit not as intuitive. But, regardless, I hope this illustrates the idea that you don't need tableviews within tableviews.


text:
Q: Register .json route in global.asax Is there any way to register .json format in Global.asax?
<%@ Application Language="VB" %>
<%@ Import Namespace="System.Web.Routing" %>
<%@ Import Namespace="System.Web.DynamicData" %>
<script runat="server">
     Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
         RegisterRoutes(RouteTable.Routes)
     End Sub

     Shared Sub RegisterRoutes(routes As RouteCollection)

         routes.MapPageRoute("", "Data.json", "~/Data.aspx")

     End Sub
</script>

I tried to use above code, but I doesn't work.


text:
Q: How do I return the column title of a cell, combine it with another value and store it in a new dataframe? I have a dataframe with which if a cell has a value other than "." then I need python to return the cell's column title and the campus number.

The end result should be a new dataframe or list that contains the column title and the campus number. It does not matter what the value inside the cell is, as long as it is not "."
I tried to use the following for loop statement:
df is the original dataframe
df2 is the new dataframe that is supposed to have column name and campus name
for i in df.iterrows():
 if df[i] == ".":
   i = i + 1
 else:
   df2[i] = df[i].value + "" + df.col()
   i = i + 1

A: Reducing the dimensionality of the problem by stacking makes it easier as you can then simply query the index.
temp =  df.set_index('Campus').stack()
result_list = temp.loc[temp!='.'].index.values

A: The simplest way I found was to run
df2 = df.where(df!='.')
df2 = df2.dropna()

The first line copies the whole df over, but replaces all the '.' with NaN, which can be dropped with dropna().

A: Can you try to replace the unwanted values with NaN and then stacking?
df.replace('.', pd.NA).stack().index.to_list()

Example:
# input
   A  B  C
0  .  2  .
1  1  .  .
2  .  3  .

# output
[(0, 'B'), (1, 'A'), (2, 'B')]

To have columns first, use:
df.replace('.', pd.NA).T.stack().index.to_list()
# [('A', 1), ('B', 0), ('B', 2)]

Or, for top-down order:
df.replace('.', pd.NA).stack().swaplevel().index.to_list()
# [('B', 0), ('A', 1), ('B', 2)]


text:
Q: Why is Resharper's default inspection severity for "redundant field initializer" set to "warning" Resharper often complains that I explicitly initialize fields in my classes although it is redundant because without initialization they would have the same (default) value. However, I often prefer the explicit initialization because IMHO the code becomes a bit clearer and I have to think less when reading code.
However, when I just wanted to switch off this inspection, I noticed the default severity is set to "warning". Until now I always thought this was just a hint for on opportunity to remove some characters of code but now I am wondering if there is really a risk involved when using redundant initializers.
Am I missing something? What kinds of bugs can occur with redundant initializers?

A: Microsoft explains why redundant field initialization is, well, redundant, this way:

In most cases, initializing a field to its default value in a constructor is redundant, which degrades performance and adds to maintenance costs.

Performance costs are negligible, if at all present (thanks @lex82 for the find):

We eliminated rule CA1805 because the cases where it fired weren't really interesting or helpful. In a Release build the user's code that is initializing a variable to the type's default value gets optimized away by the compiler. In Debug builds most of the warnings are against generated code which the user can't really do anything about.

Yet mental overhead is something to be considered. When one is accustomed to the default behavior of fields being initialized to default values, seeing redundant initialization is an immediate "WAT?". What is this here for? Are we working around some undocumented behavior or a compiler/runtime/JIT bug? Or is binary serialization messing with fields somehow? Or something else entirely?