text:
Q: Are Back Propagation and Recurrent Neural Networks same? I have searched this topic everywhere, but I couldn't find the exact solution I was looking for. So, I am still quite confused between the two terms Back Propagation and Recurrent Neural Networks. I have read that back propagation is used after the feed-forward neural networks step in order to update weight. Then, where are how are recurring neural networks used?

A: Back-propagation is an algorithm that is used to compute parameter gradients in a neural network. For the purpose of the algorithm, we imagine the computation as a pass through a directed acyclic graph where the leaves are parameters and inputs and inner nodes of the nodes are operation. Applying the chain rule for derivatives then corresponds to a backward pass in such a graph. This algorithm is general can be applied to any neural net (feed-forward, recurrent or convolutional).
Recurrent neural networks are a type of neural network that recurrently applies the same function on its hidden state and a new input in a sequence. Computation of an RNN can also be described as a computation graph and therefore the backpropagation algorithm can be applied to estimate gradients of its parameters too.


text:
Q: A part of my hard drive isn't accessible and doesn't seem to be mounted. It happens if I reduce the size of the I'm using Linux Mint serena on an Intel NUC with an internal Samsung SSD 850 EVO M.2 250 GB hard drive.
Under computer I find my file system and a drive called Samsung SSD 850 EVO M.2 250 GB. This part of the hard drive can't be accessed and as far as I can tell isn't mounted, its about 20 Gb in size.
This is listed as sda3 under drives but I don't see this area listed anywhere else, can I reduce its size or even mount it?
df:
Filesystem     1K-blocks    Used Available  Use% Mounted on
udev             8138676       0   8138676    0% /dev
tmpfs            1632016    9676   1622340    1% /run
/dev/sda2      223315548 6559660 205389080    4% /
tmpfs            8160068     808   8159260    1% /dev/shm
tmpfs               5120       4      5116    1% /run/lock
tmpfs            8160068       0   8160068    0% /sys/fs/cgroup
/dev/sda1         523248    3684    519564    1% /boot/efi
cgmfs                100       0       100    0% /run/cgmanager/fs
tmpfs            1632016      16   1632000    1% /run/user/1000

mount:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=8138676k,nr_inodes=2034669,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=1632016k,mode=755)
/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (rw,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids,release_agent=/run/cgmanager/agents/cgm-release-agent.pids)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb,release_agent=/run/cgmanager/agents/cgm-release-agent.hugetlb)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event,release_agent=/run/cgmanager/agents/cgm-release-agent.perf_event)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,clone_children)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=38,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
cgmfs on /run/cgmanager/fs type tmpfs (rw,relatime,size=100k,mode=755)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1632016k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

Ok,
the output of lsblk -f was:
NAME   FSTYPE LABEL UUID                                 MOUNTPOINT
sda
├─sda1 vfat         C71D-C090                            /boot/efi
├─sda2 ext4         ce782317-5811-44c4-a648-a7ee8f11c483 /
└─sda3 swap         8185f231-2fa6-4127-a5a6-147ec29f4fd7 [SWAP]
Whats happens if I reduce the size  of sda3? And how would I achieve that, with the swapon command? The output of the free command:
              whole       used     free          gemns.  Puffer/Cache available
Memory:    16320136      930864    14159408      203220     1229864    14859036

Outsourced
 memory: ------16664572-----------0----------16664572

A: The partition sda3 is designated as a swap partition, that means it's intended (1) as a place to hold the content of the RAM during hibernation and (2) as a sort of RAM "extension" where contents of the RAM are stored when they are not currently used, so the main RAM can be used for other processes etc. that are "life" and need more RAM.
An SSD has a limited amount of write cycles, os using a swap space on an SSD which is constantly written to is often not recommended.
With swapon, you can activate this partition to use as a swap partition. You can't use swapon to somehow reduce the size of the partition. See man swapon for details.
If you don't use hibernation, and if you have enough RAM, you can delete this partition with any partitioning tool (fdisk, gparted, whatever Mint prefers). You can also (carefully, or you'll damage your existing data) enlarge the sda2 parition to use the space that is freed up this way (google for tutorials how to that, if you run into difficulties, open a new question on stackexchange).

redpajama_set_name: RedPajamaStackExchange


text:
Q: How do I access a data nested in JSON in javascript? I have been trying to figure this out for hours.  I've seen this SO question and I still cannot figure this out.
I have some Jason data that I know begins like this:
{
  "0x123454843eacf5c5318e1234504251b937d12345": [
{
  "poolIndex": 0,
  "stakingStrategy": "masterchef",
  "farmName": "sushiChef",
 ....

I've written the following to get at the information like "poolIndex" and "stakingStrategy":
  function parseTheDataFunctionSushi(walletAddress, networkName){
  // calls a funciton to pull and parse the api data

    var walletAddress = "0x123454843eacf5c5318e1234504251b937d12345";
    var networkName = "polygon";

    var theparsedJSONdata = pullAndParseAPISushi(walletAddress, networkName)
    console.log("object keys are " + Object.keys(walletAddress));
    var firstCrack = theparsedJSONdata[walletAddress][0]['poolIndex']
    console.log("firstCrack is " + firstCrack)

This does not work.  I've written firstCrack every way I can think of
  theparsedJSONdata[walletAddress].poolIndex
  theparsedJSONdata[walletAddress][0].poolIndex

None of them work.  So frustrating.  Any help would be appreciated.
For what it's worth, `Object.keys(walletAddress) returns
 object keys are 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41

Here's the other function:
  function pullAndParseAPISushi (walletAddress, networkName){

   console.log("walletAddress inside pullAndParseAPISushi is = " + walletAddress);
   console.log("network is " + networkName);
   var apiKEY = "96e0cc51-a62e-42ca-acee-910ea7d2a241";  // API key from Zapper
   var url = "https://api.zapper.fi/v1/staked-balance/masterchef?addresses%5B%5D="+ walletAddress + "&network=" + networkName + "&api_key=" + apiKEY;
   // assembles the API URL with the wallet addressa, network and name
   console.log("url is " + URL);
   var response = UrlFetchApp.fetch(url); // pulls data from the API
   console.log(response)
   var theparsedJSONdata = JSON.parse(response); // parses the JSON response from the API
   console.log(theparsedJSONdata)
   return theparsedJSONdata
 }

A: Have you tried?
theparsedJSONdata.walletAddress[0].poolIndex

don't have enough rep to make a comment but I think this might work, let me know!

A: If the data structure is indeed as you specified, then one of the attempts you tried should work. See below for a functional example.

const data = {
  "0x123454843eacf5c5318e1234504251b937d12345": [
    {
      "poolIndex": 0,
      "stakingStrategy": "masterchef",
      "farmName": "sushiChef",
    }
  ]
}

const walletAddress = "0x123454843eacf5c5318e1234504251b937d12345";

console.log(data[walletAddress][0].poolIndex);

console.log(data[walletAddress][0].stakingStrategy);


text:
Q: Oracle SQL technique to avoid filling trans log Newish to Oracle programming (from Sybase and MS SQL Server).  What is the "Oracle way" to avoid filling the trans log with large updates?
In my specific case, I'm doing an update of potentially a very large number of rows.  Here's my approach:
UPDATE my_table
SET a_col = null
WHERE my_table_id IN
(SELECT my_table_id FROM my_table WHERE some_col < some_val and rownum < 1000)

...where I execute this inside a loop until the updated row count is zero,
Is this the best approach?
Thanks,

A: The amount of updates to the redo and undo logs will not at all be reduced if you break up the UPDATE in multiple runs of, say 1000 records. On top of it, the total query time will be most likely be higher compared to running a single large SQL.
There's no real way to address the UNDO/REDO log issue in UPDATEs. With INSERTs and CREATE TABLEs you can use a DIRECT aka APPEND option, but I guess this doesn't easily work for you.

A: Depends on the percent of rows almost as much as the number. And it also depends on if the update makes the row longer than before. i.e. going from null to 200bytes in every row. This could have an effect on your performance - chained rows.
Either way, you might want to try this.
Build a new table with the column corrected as part of the select instead of an update. You can build that new table via CTAS (Create Table as Select) which can avoid logging.
Drop the original table.
Rename the new table.
Reindex, repoint contrainst, rebuild triggers, recompile packages, etc.
you can avoid a lot of logging this way.

A: Any UPDATE is going to generate redo.  Realistically, a single UPDATE that updates all the rows is going to generate the smallest total amount of redo and run for the shortest period of time.
Assuming you are updating the vast majority of the rows in the table, if there are any indexes that use A_COL, you may be better off disabling those indexes before the update and then doing a rebuild of those indexes with NOLOGGING specified after the massive UPDATE statement.  In addition, if there are any triggers or foreign keys that would need to be fired/ validated as a result of the update, getting rid of those temporarily might be helpful.


text:
Q: img tag src variable url not working So I have my views.py in Django which is rendering a list of objects to my html template. Everything is working fine. Now, the objects have some object ID associated to them. And I have named the images in the 'static/images/' directory the same as the object ID.
So image 1.jpg will correspond to object with object id = 1, 2.jpg for object id = 2 and so on.
Now i want to load image in my img tag in my html, but the src URL of the img tag will depend on the object id.
Following is my html template:
{% for result in results %}

 {{ result.card_name }}

{% endfor %}

The above is not working as the html is not able to parse {{result.id}}.
If i hard code the value of url say like this:
src="{% static 'images/1.jpg' %}"

then the above successfully loads the 1.jpg for all the li elements, but what i want is the url to be formed according to the {{result.id}} value.
I've tried using the solution given in the following links, but none worked for me.
Links -> Reference template variable within Jinja expression
Variable within filename in jinja2
Variable in Flask static files routing [url_for('static', filename='')]
Any help will be appreciated.

A: You can use get_static_prefix (documentation):
{% load static %}


text:
Q: How to get virtualenv to work with fish shell? I'm trying to get virtualenv to work with the fish shell. I have virtualenv installed and it works fine with bash and zsh. However, running the following command returns fish: Unknown command 'source':
$ source ~/path/to/bin/activate

Does anyone know how to get virtualenv and the fish shell to work together?

A: You can use virtualfish.

A Fish Shell wrapper for Ian Bicking's virtualenv, somewhat loosely
  based on Doug Hellman's virtualenvwrapper for Bourne-compatible
  shells.

Source:
https://github.com/adambrenecki/virtualfish
Docs:
http://virtualfish.readthedocs.org/en/latest/

A: For virtualenv, fish has a separate activation file in the in the bin directory with .fish extension.
So you will have to do:
$ source ~/path/to/bin/activate.fish

A: You don't need to activate to use virtualenv it is a convenience. You can just use the virtualenv directly:
virtualenv venv
./venv/bin/pip install foo

Have you tried from fish using:
. venv/bin/activate.fish

It probably isn't as widely used as bash so may have issues - looking at the commit history shows a recent fix:
https://github.com/pypa/virtualenv/blob/master/virtualenv_embedded/activate.fish

A: You can also use this : https://github.com/adambrenecki/virtualfish
It allows you to activate a virtualenv by typing this :
vf activate <my_env>

A: If you can't use activate.fish, you can just add the bin directory to your PATH:
set -gx PATH /path/to/virtualenv/bin $PATH

That's pretty much all activate.fish does (well, not quite, it also unsets PYTHONHOME, (which wasn't set beforehand when I tried it anyway, YMMV); and it tries to mess with your fish_prompt).
Alternatively: I'm a former Bash user who's started using Fish and misses Doug Hellman's virtualenvwrapper, so I've just today started working on a replacement called virtualfish - it has a few handy shortcuts you might find useful, although it's nowhere near as complete as VEW.

A: (This thread seems close to be closed, but I found a solution :)
To enter a new fish shell with venv envrionment:
begin; set -lx PATH (realpath ./venv)/bin $PATH; fish; end

when the venv directory is ./venv.
To deactivate, just ctrl-d or exit.

Another solution, which does not invoke a child shell.
Make and enter a venv envrionment:
python3 -m venv ./venv
set -lx PATH (realpath ./venv)/bin $PATH

Exit from the envrionment:
set -lx PATH $PATH[2..-1]

A: If it's an env file try this .env/bin/activate.fish
make sure your env file is inside your project file, in my case it's a django project.
Tt worked for me

A: You can use the command - set VIRTUAL_ENV 'path to the virtual env directory'
Example - set VIRTUAL_ENV '/home/aman/Desktop/test/venv'


text:
Q: postfix master dead but subsys locked but working postfix master dead but subsys locked
I tried removing the files on /var/lock/subsys/ and restarted postfix, no error on logs and mail is working but when I check the postfix status it still says "master dead but subsys locked"
2.6.32-431.5.1.el6.i686
tcp        0      0 *:smtp                      *:*                         LISTEN      21290/master

checking on status:
[root@smtp subsys]# service postfix status
master dead but subsys locked
[root@smtp subsys]#

A: Please try with stopping or disabling the exim service because postfix can conflict with exim when both software were running.
#service postfix stop
#rm -rf /var/lock/subsys/postfix
#rm -rf  /var/spool/postfix/pid/master.pid
#service exim stop
#chkconfig exim off
#service postfix start

Your postfix will be running without dead.


text:
Q: Defer TransactionalObserverNotifier fails with ARJUNA016082: Synchronizations are not allowed I am currently facing an issue when I fire an CDI event through a Hibernate lifecycle listener, and defer the notification until the transaction has succeeded using @Observe(during = ...). This logic works fine in some cases, but there seem some exceptions to the rule. This seems to be when the persistence event was called from a @Transactional method: my commit succeeds but the observer is never notified.
After debugging the issue I found out that for a successful transaction (i.e. no error being thrown, changes are persisted in the DB), I still entered the the the AFTER_FAILURE observer rather than the AFTER_SUCCESS observer. So somehow I am looking at a new transaction that will fail, however, silently. I only found the below stack trace by bubbling up the stack and find the exception.
Based on the stack trace we see a couple of things going on:

*

*All the way down below we leave our method, the TransactionalInterceptor commits the active transaction

*This causes entities to flush

*This triggers one of my lifecycle listeners

*The CDI event is fired in one lifecycle listener

*CDI figures out that the transaction is IN_PROGRESS, where my event requires AFTER_SUCCESS, so the notification is deferred.

*Weld fails to add the synchronisation registerSynchronization in WeldTransactionServices, and fails with the stack trace below.

I am running in a JTA environment with container managed transactions. It seems Weld is not always able to call registerSynchronization and that in some cases other synchronisations have already been added to the transaction. It could be that there is something wrong with my setup, but it seems to me that this use of transactional observers is exactly what it is ment for. So I think this is a bug in either Arjuna or Weld, but I am not sure where exactly to start looking. Any advise is very much appreciated!
10:00:29,142 ERROR [java.lang.RuntimeException] (default task-3) java.lang.IllegalStateException: ARJUNA016082: Synchronizations are not allowed! Transaction status isActionStatus.RUNNING: java.lang.RuntimeException: java.lang.IllegalStateException: ARJUNA016082: Synchronizations are not allowed! Transaction status isActionStatus.RUNNING
    at org.jboss.as.weld.services.bootstrap.WeldTransactionServices.registerSynchronization(WeldTransactionServices.java:98)
    at org.jboss.weld.event.TransactionalObserverNotifier.deferNotification(TransactionalObserverNotifier.java:63)
    at org.jboss.weld.event.TransactionalObserverNotifier.notifyTransactionObservers(TransactionalObserverNotifier.java:83)
    at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:292)
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:160)
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:142)
    at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:673)
    at org.jboss.weld.util.ForwardingBeanManager.fireEvent(ForwardingBeanManager.java:101)
    at com.pallasathenagroup.cdi.HibernateLifeCycleListener.onPostInsert(HibernateLifeCycleListener.java:42)
    at org.hibernate.action.internal.EntityIdentityInsertAction.postInsert(EntityIdentityInsertAction.java:156)
    at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:102)
    at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:626)
    at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:280)
    at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:261)
    at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:306)
    at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275)
    at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182)
    at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113)
    at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:67)
    at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:189)
    at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:132)
    at org.hibernate.internal.SessionImpl.firePersistOnFlush(SessionImpl.java:842)
    at org.hibernate.internal.SessionImpl.persistOnFlush(SessionImpl.java:835)
    at org.hibernate.engine.spi.CascadingActions$8.cascade(CascadingActions.java:341)
    at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.java:467)
    at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:392)
    at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:193)
    at org.hibernate.engine.internal.Cascade.cascadeCollectionElements(Cascade.java:500)
    at org.hibernate.engine.internal.Cascade.cascadeCollection(Cascade.java:432)
    at org.hibernate.engine.internal.Cascade.cascadeAssociation(Cascade.java:395)
    at org.hibernate.engine.internal.Cascade.cascadeProperty(Cascade.java:193)
    at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:126)
    at org.hibernate.event.internal.AbstractFlushingEventListener.cascadeOnFlush(AbstractFlushingEventListener.java:150)
    at org.hibernate.event.internal.AbstractFlushingEventListener.prepareEntityFlushes(AbstractFlushingEventListener.java:141)
    at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:74)
    at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)
    at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1437)
    at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:493)
    at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3207)
    at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2413)
    at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:473)
    at org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl.beforeCompletion(JtaTransactionCoordinatorImpl.java:330)
    at org.hibernate.resource.transaction.backend.jta.internal.synchronization.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:47)
    at org.hibernate.resource.transaction.backend.jta.internal.synchronization.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:37)
    at org.jboss.as.txn.service.internal.tsr.JCAOrderedLastSynchronizationList.beforeCompletion(JCAOrderedLastSynchronizationList.java:116)
    at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:368)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:91)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1200)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:89)
    at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.endTransaction(TransactionalInterceptorBase.java:175)
    at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.invokeInOurTx(TransactionalInterceptorBase.java:121)
    at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.doIntercept(TransactionalInterceptorRequired.java:53)
    at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorBase.intercept(TransactionalInterceptorBase.java:76)
    at com.arjuna.ats.jta.cdi.transactional.TransactionalInterceptorRequired.intercept(TransactionalInterceptorRequired.java:47)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeAroundInvoke(InterceptorMethodHandler.java:84)
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:72)
    at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:56)
    at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:79)
    at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:68)
    at com.pallasathenagroup.iris.impl.ScopeResourceImpl$Proxy$_$$_WeldSubclass.addScopeCosts(Unknown Source)
    at com.pallasathenagroup.iris.impl.ScopeResourceImpl$Proxy$_$$_WeldClientProxy.addScopeCosts(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:139)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:295)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:249)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:236)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:402)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:209)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:221)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
    at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
    at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
    at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:202)
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:805)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: ARJUNA016082: Synchronizations are not allowed! Transaction status isActionStatus.RUNNING
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronizationImple(TransactionImple.java:401)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.registerSynchronization(TransactionImple.java:377)
    at org.jboss.as.weld.services.bootstrap.WeldTransactionServices.registerSynchronization(WeldTransactionServices.java:96)
    ... 121 more

A: There are two types of synchronization that can be registered with a transaction, session and interposed. Session synchronization beforeCompletion callbacks are called before interposed ones.
Note that interposed synchronizations were introduced to provide an ordering guarantee for synchronizations.
The JTA specification does not specify how session synchronizations are ordered and the Narayana transaction manager chooses to order them according to an internal scheme and if an attempt is made to add a synchronization that should appear before a one that has already run then it refuses the registration. This appears to be the issue in your stacktrace. Would it be possible for Weld to register an interposed synchronization for the notification.


text:
Q: Combining data frames with some common column names and extra columns I want to combine several data frames which contains some common variable names as well as extra variables.
A reproducible example is as follow:
df1 <- data.frame(a=1:5, b=1:5)
df2 <- data.frame(a=1:5, b=6:10, c=11:15)

I would like to merge df1 and df2 as follow:
 a  b  c
1  1  1 NA
2  2  2 NA
3  3  3 NA
4  4  4 NA
5  5  5 NA
6  1  6 11
7  2  7 12
8  3  8 13
9  4  9 14
10 5 10 15

A: You can also try the following (apart from any of the answers mentioned in the comments!) -
df1 <- data.frame(a=1:5, b=1:5)
df2 <- data.frame(a=1:5, b=6:10, c=11:15)
data.table::rbindlist(list(df1, df2), use.names = TRUE, fill = TRUE)
 a  b  c
 1: 1  1 NA
 2: 2  2 NA
 3: 3  3 NA
 4: 4  4 NA
 5: 5  5 NA
 6: 1  6 11
 7: 2  7 12
 8: 3  8 13
 9: 4  9 14
10: 5 10 15


text:
Q: To run selectively failed http requests(via counter) using jmeter I am performing provisioning performance tests using JMeter. I need to provision DB with 40 million entities using REST/http requests. I am incrementing counter to generate unique IDs for provisioning request.
While running these loads, some requests fail (~3k). To provision these,I need to run the complete load again (this way I get failures for entities already created,but the previous failures are re-attempted).
Is there a clean way to do this,where only failures can be re-attempted?

A: You can save for every failure the id in in new line in a file. Use JSR223 Post processor to check failure and save to file
Then  execute a reattempt using a new jmx with CSV Data Set Config reading the file until end of file and executing your tests with failed IDs you can use include controller to execute the jmx and pass the unique id using property.

The include controller is designed to use an external JMX file


text:
Q: Show information on web-page from external process in n2o framework How can I show information from external processes in N2O framefork.
Code like this:
tokyoWeather() ->
     timer:sleep(10000),
     Data = getTokyoWeater(),
     ??? SHOW_ON_PAGES,
     tokyoWeather().
lisbonWeather() ->
     timer:sleep(10000),
     Data = getLisbonWeater(),
     ??? SHOW_ON_PAGES,
     lisbonWeather().

Page1:
body() ->
    [ #panel { id=TokyoWeather text= <<>> },
      #panel { id=LisbonWeather, text= <<>> },
      ...].

Page2:
body() ->
    [ #panel { id=TokyoWeather text= <<>> },
      #panel { id=LisbonWeather, text= <<>> },
      ...].

Thanks in advance.

A: Use wf:reg and wf:flush functions. Example: /samples/apps/review/src/index.erl

*

*Register unique name for a page-process:
23: event(init) -> wf:reg(room)...

*Updating DOM:
60: wf:insert_bottom(history, Terms)

*Flushing changes to browser using page-process name:
62: wf:flush(room)

A: Documentation suggests using wf:reg/1 and wf:flush. However, this requires you to register process into a pool, which is handy for when you want to manipulate multiple processes at once, but quite redundant otherwise.
Another interesting function the N2O book mentions is wf:flush/1. Its description claims that it does something completely different from wf:flush/0, while in reality it does not. It really just collects the wf actions placed into a "buffer" and sends them via wf:send/2 to a registered supposedly websocket processes. Meanwhile the websocket process sits in a timed receive loop.
After some N2O's code inspection, there is a pretty simple solution, in my opinion:

*

*Starting at process that can render actions(e.g. the websocket process), spawn your desired function and pass the parent process id as one of its parameters
async_render() ->
  Pid = self(),
  spawn(fun() -> update(Pid) end).

*Perform your wf actions in now asynchronous function, then retrieve the queued actions, clear the buffer, and finally send the a tuple of {flush, Actions} to your parent process.
update(Pid) ->
  %% Your wf:insert..., update, etc. code here
  Actions = wf:actions(),
  wf:actions([]),
  Pid ! {flush, Actions}.

The rest is done by N2O for you :)


text:
Q: How to convert a single GeoDataFrame column from binary to decimal? I have GeoDataFrame where a new column 'total' was created, where the column returns a sum of values from a column within the data set. That singular column output is in binary and I need to convert the entire column output to decimal.
Have tried frombinaryToDecimal and int("total") for the following script:
import geopandas
import pandas as pd

pd.set_option('display.max_columns', None)

df = geopandas.read_file("Traps_records_4th_April_Pulse.csv")
df["total"] = ""
trap_ids = df["trap nid"].unique()
for trap in trap_ids:
    rows = df.loc[df['trap nid'] == trap]
    df.loc[df['trap nid'] == trap, 'total'] = rows["strikes"].sum()
print(df)

int_total = int("total")
print(int_total)

df.to_csv('modified.csv')

% where the output looks like:
    trap condition      notes Images geometry        total
0               OK                       None          100
1               OK                       None       110011
2               OK                       None          111
3               OK                       None         1101
4               OK                       None        10100
..             ...        ...    ...      ...          ...
771             OK                       None            1
772             OK                       None  10011001111
773             OK                       None          001
774             OK                       None      1100010
775             OK  On ground            None            0

A: you can use the apply method for that
import pandas as pd

# create sample data
total = [100, 110011, 111]
df = pd.DataFrame(total, columns=['total'])
print(df)

output:
    total
0     100
1  110011
2     111

conversion with int using base 2
df.total = df.total.apply(lambda x: int(str(x), 2))
print(df)

output
   total
0      4
1     51
2      7


text:
Q: mysql many-to-many tag implementation + full tag listing based on How to implement tagging system similar to SO in php/mysql?
ive made small changes, and have the following image tag implementation:
SELECT I.imageId, GROUP_CONCAT(DISTINCT T.tagName SEPARATOR ' '), COUNT(*)
FROM Images I
INNER JOIN ImageTagMap M ON I.imageId = M.imageId
INNER JOIN ImageTags T ON T.tagId = M.tagId
WHERE T.tagName LIKE '%new%' OR T.tagName LIKE '%yo%'
GROUP BY I.imageId
ORDER BY COUNT(*) DESC
currently, this successfully gets the imageId's of all of those images that fullfil the WHERE clause, and orders them according to the most hits (no. hits being generated by the GROUP BY clause). it also gets all the matched tag names and sticks them in a single string. nice.
what i would really like for the user, is to have all the tagNames for the relevant picture. currently the tagNames returned are only those that matched with the LIKE statements. e.g. if a picture is tagged "2010 new york" and i search (as above) "new yo" it will return imageId, "new york". but i want all the tag info for the matched image, i want imageId, "new york 2010".
a simple solution would be to stick the above query in a subquery and rerun the join with a new WHERE clause of imageId IN( above query as subquery ). although that seems silly (even if the optimiser might do magic with it), surely i dont need to rerun the exact same join twice? or do i?
as an aside, is there a better way to search tags than the bunch of LIKE's ive stuck in?

A: SELECT
    M.imageId,
    GROUP_CONCAT(DISTINCT T2.tagName SEPARATOR ' ') AS tagNames,
    COUNT(DISTINCT T.tagName) AS relevance
FROM ImageTagMap M
JOIN ImageTags T ON T.tagId=M.tagId
JOIN ImageTagMap M2 ON M2.imageId=M.imageId
JOIN ImageTags T2 ON T2.tagId=M2.tagId
WHERE T.tagName LIKE '%new%' or T.tagName LIKE '%yo%'
GROUP BY M.imageId
ORDER BY relevance DESC
had to rejoin twice. any shorter ways are welcome.

A: Add another JOIN to the ImageTags table used, and concat on that instead of the one you're testing tags against:
SELECT
    M.imageId,
    GROUP_CONCAT(DISTINCT Ta.tagName SEPARATOR ' ') AS tagNames,
    COUNT(DISTINCT Tc.tagName) AS relevance
FROM ImageTagMap M
JOIN ImageTags Tc ON Tc.tagId=M.tagId
JOIN ImageTags Ta ON Ta.tagId=M.tagId
WHERE Tc.tagName LIKE '%new%' OR Tc.tagName LIKE '%yo%'
GROUP BY M.imageId
ORDER BY relevance DESC

(I got rid of the join to Images as you didn't appear to be using it.)

is there a better way to search tags than the bunch of LIKE's ive stuck in?

If you really must arbitrary-substring-match against tags then no, there's no indexable way to do that. An equality test or a fixed-left-part LIKE (ie. LIKE 'new yo%') will be much more efficient given suitable indexes.


text:
Q: Is there a Hive equivalent of SQL "LIKE ANY ( SUBQUERY )" While Hive doesn't supports multi-value LIKE queries which are supported in SQL : ex.
SELECT * FROM user_table WHERE first_name LIKE ANY ( 'root~%' , 'user~%' );

We can convert it into equivalent HIVE queries as :
SELECT * FROM user_table WHERE first_name LIKE 'root~%' OR first_name LIKE 'user~%'

Does anyone know an equivalent solution that Hive does support in case sub-query is used with LIKE ? Have a look at below example :
SELECT * FROM user_table WHERE first_name LIKE ANY ( SELECT expr FROM exprTable);

As It doesn't have values in expression, I can't use same approach for generating multiple LIKE expression separated with OR / AND operator. Initially I thought to write HIVE UDF for it ?  Can you please help me supporting such expression and finding HIVE equivalent ?

A: You can use Hive's RLIKE relational operator as shown below,
SELECT * FROM user_table WHERE first_name RLIKE 'root~|user~|admin~';

Hope this helps!

A: This is a case involving theta joins in Hive. There is a wiki page for this and a jira request. Please go through the details here on this page: https://cwiki.apache.org/confluence/display/Hive/Theta+Join
Your case is similar to the Side-Table Similarity case given on the page.

A: You need to convert the expr values into a map and then use regular expression to find the like.  Alternatively you can also use union all with all the like expressions in separate SQL - the query might become tedious so you can programatically generate it.

A: What about this using EXISTS
SELECT * FROM user_table WHERE EXISTS ( SELECT * FROM exprTable WHERE first_name LIKE expr );


text:
Q: What is the maximum line length a browser can render? ... plotted over time on the x axis and length on the y-axis to be really useful.
I've heard/read that some JavaScript minifiers add in return characters b.c. some browsers have a maximum line length that can be rendered.  What is it for modern browsers? FF, IE, Safari, and Chrome.  Any will suffice as a starting point.
I've also heard that breaking the lines up is for firewalls and proxies which have a maximum length that can be parsed.  Google closure puts this at around 500 lines.
But this question regards the browsers capabilities.
Here is a link to information that puts the browser issue, at around 32K.
https://github.com/mishoo/UglifyJS
Related
SO Post regarding proxies
There is definitely some consistency lacking in what minifiers think this needs to be set to.


text:
Q: Understanding Function Prototype in C Why does the following program works fine?
int main()
{
    int x;
    x = foo();
    printf("%d",x);
    getchar();
    return 0;
}

int foo()
{
    return 2;
}

and not this program?
//double function(void);

int main(){
    double val;
    val = function();
    printf("%ul\n",val);
}

double function(void){
    double num;
    num = DBL_MAX;
    printf("%ul\n",num);
    return num;
}

In my understanding, definition of functions in both these cases are absent before main(). So why is it that in the first case the function is called anyway, even when compiler has no definition of it before main() and not in second case?

A: Because of implicit function declaration, the compiler assumes that unspecified types are int by default.
In the first case that is coincidentally true, but not in the second case.

A: Anything called as a function C is by default of type int, with no parameters (such as in your first case). If the compiler then finds a function which complies, there is no error.
In the second case, the compiler compiles main() thinking the function is int, but then finds it's not true, and reports an error!
COMMENT: Jonathan Leffler commented:

Only in C89/C90. Not in C99; not in C11. Of course, some vendors still
  only implement C89; a notable example is Microsoft!

A: In C if a function is defined then its implicit return type is int.

*

*In the first case the return type of the function is int so the main() recognizes the function and compiles without any errors.

*In second case the return type of function is double so the main() fails to recognize the function thus generating an error so you need to declare the prototype of function.
Also in older versions up till C89 if the return type is not mentioned then its is implicitly considered as int.
In C99 standard doesn't allow return type to be omitted even if return type is int.
For more details you can check: implicit return type C


text:
Q: phpize's config.m4 with more than one source file in PHP_NEW_EXTENSION produces a Makefile that does nothing I am trying to write a C extension to PHP.  This is my config.m4.  Straight out of helloworld, almost
PHP_ARG_ENABLE(my_ext, whether to enable my_ext support,
[ --enable-my-ext   Enable My Ext support])

if test "$PHP_MY_EXT" = "yes"; then
  AC_DEFINE(HAVE_MY_EXT, 1, [Whether you have my ext])
  PHP_NEW_EXTENSION(my_ext, my_ext.c,  $ext_shared)
fi

When I run phpize and ./configure, it generates a Makefile that works.  Looking good so far.
Now, if I add an additional source file to PHP_NEW_EXTENSION, things break down.  As per here and here, the call should look like:
PHP_NEW_EXTENSION(foo, foo.c bar.c baz.cpp, $ext_shared)

The full syntax:
PHP_NEW_EXTENSION(extname, sources [, shared [,sapi_class[, extra-cflags]]])

Ok, so I add my extra source file (logging.c) to that list:
PHP_NEW_EXTENSION(my_ext, my_ext.c, logging.c  $ext_shared)

and phpize/configure produce a Makefile that runs successfully, but does not actually build anything.  (yes, I've done make distclean, phpize --clean, etc.)
I diffed the successful Makefile vs. the broken one, and here are the differences:
$ diff Makefile Makefile.broken
14d13
< shared_objects_my_ext = my_ext.lo
16c15
< PHP_MODULES = $(phplibdir)/my_ext.la
---
> PHP_MODULES =
170,175d168
< $(phplibdir)/my_ext.la: ./my_ext.la
<   $(LIBTOOL) --mode=install cp ./my_ext.la $(phplibdir)
<
< ./my_ext.la: $(shared_objects_my_ext) $(MY_EXT_SHARED_DEPENDENCIES)
<   $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_my_ext) $(MY_EXT_SHARED_LIBADD)
<

Anyone know what is going on here?
BTW, if I leave out the extra source file, I get compiler warnings about functions in that file having "internal linkage but is not defined".

A: Try moving the 2nd comma
PHP_NEW_EXTENSION(my_ext, my_ext.c, logging.c  $ext_shared)
To
PHP_NEW_EXTENSION(my_ext, my_ext.c logging.c, $ext_shared)
If I understand the documentation correctly, the 2nd argument should be a space separated list of your sources.


text:
Q: mongoose find related documents I am using mongo db and i have realized this wasn't the proper solution for my backend. I have two models that are related, let's call them Account and contact such that contact has a field called account_id. I am curious, how much of a performance impact will this be:
Contact.findOne({id : my_id }, function(err, aCon) {
    Account.findOne({id : aCon.account_id}, function(err, anAcc) {
        // some ops
    }
}

Is this issue enough to warrant switching to a new database layer? In my use case, I can't use the embedded doc method and I would like to avoid duplication... I think this is really the only solution


text:
Q: Liquibase is unable to find changelog file for integration tests with versions 4.0 and higher I have a Spring Boot test to check if the Gradle embedded Postgres database has been successfully created. I'm using TestContainers with the JDBC URL and an init function for liquibase.
public class TestcontainersPgIT {

    public static final String EMBEDDED_JDBC_URL = "jdbc:tc:postgresql:12.5://localhost:5432/postgres?TC_INITFUNCTION=<package names>.db.LiquibaseRunner::runUpdate";

    @Test
    public void testEmbeddedPg() throws Exception {
        Connection conn = DriverManager.getConnection(EMBEDDED_JDBC_URL);
        Statement statement = conn.createStatement();
        ResultSet rs = statement.executeQuery("select 1");
        assertTrue(rs.next());
        String result = rs.getString(1);
        assertEquals("1", result);
    }

What happens above is that the line Connection conn =... will end up calling my liquibase runner function below.
public final class LiquibaseRunner {

    private LiquibaseRunner() {
    }

    public static void runUpdate(Connection connection) throws LiquibaseException {
        Database database = DatabaseFactory.getInstance().findCorrectDatabaseImplementation(new JdbcConnection(connection));

        Liquibase liquibase = new liquibase.Liquibase("src/test/resources/db/changelog/db.changelog-test.xml", new FileSystemResourceAccessor(), database);
        liquibase.update(new Contexts(), new LabelExpression());

The line that creates the new liquibase instance and passes in a path ( Liquibase liquibase = new... ) to the changelog file is the source off these errors in any Liquibase version >= 4.0. It seems unable to find the changelog file inside my tests/resources/db/changelog directory.I know this directory is copied over into the JAR/Build when it is compiled so I know the files are there. The error it throws is shown below.
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
    at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:82)
    at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15)
    at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:377)
    at liquibase.Liquibase.lambda$update$1(Liquibase.java:230)
    at liquibase.Scope.lambda$child$0(Scope.java:160)
    at liquibase.Scope.child(Scope.java:169)
    at liquibase.Scope.child(Scope.java:159)
    at liquibase.Scope.child(Scope.java:138)
    at liquibase.Liquibase.runInScope(Liquibase.java:2369)
    at liquibase.Liquibase.update(Liquibase.java:217)
    at liquibase.Liquibase.update(Liquibase.java:203)

I've tried many different file paths to be passed in, including using class path and relative file paths and it's still unable to find the changelog file for integration tests.
Filepaths I've tried

*

*classpath:db/changelog/db.changelog-test.xml

*classpath:/db/changelog/db.changelog-test.xml

*Relative file paths

A: You may just need this path resources/db/changelog/db.changelog-test.xml or this path: ../test/resources/db/changelog/db.changelog-test.xml.

A: Use a ClassLoaderResourceAccessor Instead of the FileSystemResourceAccessor:
ResourceAccessor resourceAccessor = new ClassLoaderResourceAccessor();

Then, just access your changelog relatively to your resource folder:
new Liquibase("db/changelog/db.changelog-test.xml")


text:
Q: Script to resolve GUID to String in Active Directory I am trying to understand the output of the following VB script that resolves a GUID to a string in active directory:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B325649
This article demonstrates how to convert the hexadecimal string form of an object's GUID into its string form:
Paste the following code in a .vbs file.
'================================================================
'Set the next line to reflect a DN for an object in the directory
'================================================================
Set obj = GetObject("LDAP://CN=Username,CN=Users,DC=DOMAIN,DC=COM")
MsgBox "The GUID string Value for user " & obj.Get("DisplayName") & _
       " is " &  ConvertHexStringGUIDToStringGUID(obj.GUID)

'================================================================
' ConvertHexStringGUIDToStringGUID function
'================================================================
Function ConvertHexStringGUIDToStringGUID(strOctet)
    Dim tmpGUID, GUIDStr
    'Convert the string by flipping the bits around.
    GUIDStr = Mid(strOctet, 7, 2)
    GUIDStr = GUIDStr + Mid(strOctet,  5, 2)
    GUIDStr = GUIDStr + Mid(strOctet,  3, 2)
    GUIDStr = GUIDStr + Mid(strOctet,  1, 2)
    GUIDStr = GUIDStr + Mid(strOctet, 11, 2)
    GUIDStr = GUIDStr + Mid(strOctet,  9, 2)
    GUIDStr = GUIDStr + Mid(strOctet, 15, 2)
    GUIDStr = GUIDStr + Mid(strOctet, 13, 2)
    GUIDStr = GUIDStr + Mid(strOctet, 17, Len(strOctet))

    tmpGUID = "{" & Mid(GUIDStr,  1,  8) & "-" & Mid(GUIDStr,  9, 4) & _
              "-" & Mid(GUIDStr, 13,  4) & "-" & Mid(GUIDStr, 17, 4) & _
              "-" & Mid(GUIDStr, 21, 15) & "}"

    ConvertHexStringGUIDToStringGUID = tmpGUID
End Function

My question is:

*

*What is the output of this script?

*Do you have to have a domian account to run the command Set obj = GetObject("LDAP://CN=Username,CN=Users,DC=DOMAIN,DC=COM")?

A: Answering your last question first: yes, you need a domain account, otherwise GetObject() will fail.
As for your first question: The GUID property returns a string of hexadecimal values, which are ordered according to the GUID data structure. Since the first 4 bytes are stored as a DWORD followed by 2 WORDs you have to take the endianness into account. intel machines store WORDs and DWORDs little endian encoded (least significant byte first), so you have to reverse the byte order of the first 4 bytes. The rest of the data structure is a byte array, so those bytes are already in the correct order.
Example:
Let's say you have a hex string like this:
000102030405060708090a0b0c0d0e0f

You would split it like this:
00010203 0405 0607 08090a0b0c0d0e0f
DWORD    WORD WORD BYTE[]

Because of the little endian encoding you have to reverse the order of the first 4 bytes (every 2-digit hex value representing 1 byte):
03020100 0504 0706 08090a0b0c0d0e0f

That's what this part of the code does (comments mine):
' reverse DWORD
GUIDStr = Mid(strOctet, 7, 2)
GUIDStr = GUIDStr + Mid(strOctet,  5, 2)
GUIDStr = GUIDStr + Mid(strOctet,  3, 2)
GUIDStr = GUIDStr + Mid(strOctet,  1, 2)
' reverse 1st WORD
GUIDStr = GUIDStr + Mid(strOctet, 11, 2)
GUIDStr = GUIDStr + Mid(strOctet,  9, 2)
' reverse 2nd WORD
GUIDStr = GUIDStr + Mid(strOctet, 15, 2)
GUIDStr = GUIDStr + Mid(strOctet, 13, 2)

The remainder of the string represents a byte array, so those bytes are used in order:
GUIDStr = GUIDStr + Mid(strOctet, 17, Len(strOctet))

The next instruction formats the hex string into a GUID string, grouping the digits properly (8-4-4-4-12):
tmpGUID = "{" & Mid(GUIDStr,  1,  8) & "-" & Mid(GUIDStr,  9, 4) & _
          "-" & Mid(GUIDStr, 13,  4) & "-" & Mid(GUIDStr, 17, 4) & _
          "-" & Mid(GUIDStr, 21, 15) & "}"

resulting in the following string:
{03020100-0504-0706-0809-0a0b0c0d0e0f}

Please see also this blog post from Eric Lippert for a more thorough explanation.


text:
Q: GCF of two large polynomials
What is the Greatest Common Factor for $P(x) = x^{50} - 2x^2 - 1$ and $Q(x) = x^{48} - 3x^2 - 4$?

I tried long division, but even the second step is too complicated that I gave up.
I feel there's more to it than the usual Euclidean Algorithm or long division (like the fact that the degree of the first term is drastically bigger than the second term), but I can only draw blanks.
Anyone want to help me shed some light on this particular problem?

A: It is also a common factor of $x^2Q(x)-P(x)$.
The smaller polynomial is easier to factor, so you can find all its roots.
Check whether $P(r)=0$ and $Q(r)=0$ for each root $r$.
Then construct the common factor polynomial from the list of common roots.

A: Notice that if $f$ is the GCD, then $f \mid \gcd (P, x^2 Q)$, so that
$$f \mid \gcd (P, P-x^2 Q) = \gcd (P, 3x^4 +2x^2 - 1) ,$$
which implies
$f \mid 3x^4 + 2x^2 -1 = 3 (x - \Bbb i) (x + \Bbb i) (x - \frac 1 {\sqrt 3}) (x + \frac 1 {\sqrt 3}) .$
Notice that $Q(\Bbb i) = 1 + 3 - 4 = 0 = Q(-\Bbb i)$, and that $Q(\frac 1 {\sqrt 3}) = Q(-\frac 1 {\sqrt 3}) \ne 0$ (obviously). This means that you only have to retain the part $(x+ \Bbb i) (x - \Bbb i) = x^2 + 1$, the other two "parasitic" factors having been introduced by the $x^2$ in $x^2 Q$. This shows that $f = x^2 + 1$.


text:
Q: Prevent Content Injection into HTTP Req Headers I am using Requestly Chrome extension to intercept and modify HTTP request headers and change their original values inside my NodeJS app.

How can I prevent attack? For example, I can change Referer header and inject link.

A: There is no way to prevent users from doing this.
You can't trust the Referer header.

A: You cannot, but you can try to make the thing more difficult to do, thing a tricky way to sign the headers / datas (sha512, etc..) and add signature in the headers/cookie/datas.
Use the same function on your server to check if the value has been modified during the transport.
"But the 'hacker' can still try to inspect the client code and use the signature function to modify the values ?"
Yes, but you can transform the thing in something completely illisible:

*

*Make your app include a bench of useless big script which doing nothing (uglified of course)

*Divide your signature function in many (many) functions named with random char and then uglified them, put one of them inside your useless big scripts.

*...

Nothing is trustable on client side, but you can try to discourage the hackers :D


text:
Q: Canvas overlapping circles problem A simple cut n paste and compare in FF & IE8 (in my case) will show my problem.
There are see 3 circles:
1 & 2 overlap ok in FF.
1 & 2 dont overlap ok in IE8.
3rd circle has a strange triangle thing happening in both browsers.
My question is how can i have 3 solid circles, that overlap?
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Canvas</title>
<!-- canvas fix for IE -->
<!--[if IE]><script type="text/javascript" src="scripts/excanvas.js"></script><![endif]-->
<!-- HTML5 fix for IE -->
<link href="css/suxperbo.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" >
function drawClouds() {

var canvas=document.getElementById('theCanvas1');
var context=canvas.getContext('2d');

context.fillStyle="#f90";

context.arc(50,50, 50,0,Math.PI*2, true);
context.arc(100,50, 50,0,Math.PI*2, true);
context.arc(200,100, 50,0,Math.PI*2, true);
context.fill();
}
</script>
</head>
<body onLoad="drawClouds()">
<div class="canvasHolder">
<canvas id="theCanvas1" width="1000" height="500"></canvas>
</div>
</body>
</html>

A: Easy...
The three arcs are all part of a single path, close each arc with closePath() before starting the next.
var drawClouds = function(){
    var canvas = document.getElementById('theCanvas1');
    var context = canvas.getContext('2d');
    context.fillStyle = "#f90";
    context.arc(50, 50, 50, 0, Math.PI * 2, true);
    context.closePath();
    context.arc(100, 50, 50, 0, Math.PI * 2, true);
    context.closePath();
    context.arc(200, 100, 50, 0, Math.PI * 2, true);
    context.fill();
}


text:
Q: how to show progress bar on webview? I am trying to open a webpage in my application using WebView. When I open webpage it shows me blank screen for a while and then open that page in browser inside my application.
Anyone suggest me how to show progress or get rid of that blank screen which comes during loading of webview?
I am using following code:
WebView mWebView = (WebView) findViewById(R.id.mywebview);
mWebView.getSettings().setJavaScriptEnabled(true);

// error handling
final Activity activity = this;

mWebView.setWebViewClient(new WebViewClient() {
    public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
        Toast.makeText(activity, "Oh no! " + description, Toast.LENGTH_SHORT).show();
    }
});

// error  handling

mWebView.loadUrl(URL);
mWebView.setWebViewClient(new HelloWebViewClient());

A: Try this:
getWindow().requestFeature(Window.FEATURE_PROGRESS);

WebView mWebView = (WebView) findViewById(R.id.mywebview);

mWebView.getSettings().setJavaScriptEnabled(true);

final Activity activity = this;

mWebView.setWebChromeClient(new WebChromeClient(){

         public void onProgressChanged(WebView view, int progress) {
                 activity.setTitle("Loading...");
                 activity.setProgress(progress * 100);
                    if(progress == 100)
                       activity.setTitle("My title");
                 }
});

mWebView.loadUrl(URL);

A: 1.  In oncreate ur call AsyncTask.
2.  In asynctask u just make progress dialog and show progress dialog.
3.  In webview client u just show again progress dialog click  on any link of web site which open in ur webview and after complete load link we override method onPageFinished and in this method we dismiss the progress dialog.
oncreate
@Override
protected void onCreate(Bundle savedInstanceState) {
    // TODO Auto-generated method stub
    super.onCreate(savedInstanceState);

    this.requestWindowFeature(Window.FEATURE_NO_TITLE);
    setContentView(R.layout.web_view);

    web_view = (WebView) findViewById(R.id.web_view);

    OpenWebSiteInWebView opensite = new OpenWebSiteInWebView();
    opensite.execute();

}

AsyncTask
private class OpenWebSiteInWebView extends AsyncTask<String, Void, String> {

    @SuppressWarnings("deprecation")
    @SuppressLint("SetJavaScriptEnabled")
    @Override
    protected String doInBackground(String... params) {
        web_view.setWebViewClient(new MyWebViewClient());
        web_view.loadUrl("ur site name");
        return null;
    }

    @Override
    protected void onPostExecute(String result) {

    }

    @Override
    protected void onPreExecute() {

        pd = new ProgressDialog(SiteOpenInWebView.this);
        pd.setMessage("Please wait Loading...");
        pd.show();

    }

}

WebViewClient
private class MyWebViewClient extends WebViewClient {
    @Override
    public boolean shouldOverrideUrlLoading(WebView view, String url) {
        view.loadUrl(url);

        if (!pd.isShowing()) {
            pd.show();
        }

        return true;
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        System.out.println("on finish");
        if (pd.isShowing()) {
            pd.dismiss();
        }

    }
}

A: Here is the code that I am using:
Inside WebViewClient:
webView.setWebViewClient(new WebViewClient() {

    @Override
    public void onPageStarted(WebView view, String url, Bitmap favicon) {
        super.onPageStarted(view, url, favicon);
        findViewById(R.id.progress1).setVisibility(View.VISIBLE);
    }

    @Override
    public void onPageFinished(WebView view, String url) {
        super.onPageFinished(view, url);
        findViewById(R.id.progress1).setVisibility(View.GONE);
    }

});

Here is the XML :
<ProgressBar
    android:id="@+id/progress1"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

Hope this helps..

A: You need to do something like this:
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    this.requestWindowFeature(Window.FEATURE_PROGRESS);
    this.setProgressBarVisibility(true);
}

And then
final Activity activity = this;
mWebView.setWebChromeClient(new WebChromeClient() {
    public void onProgressChanged(WebView view, int progress) {
        activity.setProgress(progress * 100);
    }
});

Update
I know it is a bit too late but I have little side note: you shouldn't use setWebViewClient() twice. Second call cancels the first call so you wouldn't get error handling.

A: Here is the code I'm using in KOTLIN:
private fun setupWebView() {

    val webViewClient: WebViewClient = object: WebViewClient() {

        override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean {
            view?.loadUrl(request?.url.toString())
            return super.shouldOverrideUrlLoading(view, request)
        }

        override fun onPageStarted(view: WebView?, url: String?, favicon: Bitmap?) {
            showProgressDialog()
            super.onPageStarted(view, url, favicon)
        }

        override fun onPageFinished(view: WebView?, url: String?) {
            hideProgressDialog()
            super.onPageFinished(view, url)
        }
    }
    webView.webViewClient = webViewClient

    webView.settings.javaScriptEnabled = true
    webView.settings.defaultTextEncodingName = "utf-8"
}


text:
Q: Debuging of 500 http response I need to fix some issues on an application written in Tornado. It is REST canvas app which use socket to communicate with the server. Sometimes it generates 500 error when user tries to logout during some nodes' loading. I tried to replace 500 response with 402 type by using Try block in certain handler, but I am still getting 500 in the client. So I need to get exact line of Python code that generates error. Unfortunately I am not sure how to check those as all my browser is showing is 500 error, that's it.

A: If you start your application from the command line and then trigger the HTTP 500 error, you should see a traceback written to the console. Or at least it will appear in the log file.
Or, update the code that creates the tornado.web.Application instance in your application's main file, and pass debug=True to the Application() constructor. That turns on several options including serve_traceback. Then you should see a full traceback in the error response, not just a "500".


text:
Q: Execution Flow of Child and Parent After reading on the web that i can't really determine which process runs before i.e child or parent I planned to disable the ASLR on my PC and run debugger to see if i can generate the pattern of execution, the observations I made are below with a GitGist to the GDB disas (full) along with the source code
#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
fork();
//fork();
printf("LINUX\n");
//printf("my pid is %d",(int) getpid());
fork();
printf("REDHAT\n");
//printf("my pid is %d",(int) getpid());

//fork();
return 0;
}

this is the code i am talking about when i disas it in gdb it gave me:-
gdb-peda$ disas main
Dump of assembler code for function main:
   0x000000000000068a <+0>: push   rbp
   0x000000000000068b <+1>: mov    rbp,rsp
   0x000000000000068e <+4>: call   0x560 <fork@plt>
   0x0000000000000693 <+9>: lea    rdi,[rip+0xaa]        # 0x744
   0x000000000000069a <+16>:    call   0x550 <puts@plt>
   0x000000000000069f <+21>:    call   0x560 <fork@plt>
   0x00000000000006a4 <+26>:    lea    rdi,[rip+0x9f]        # 0x74a
   0x00000000000006ab <+33>:    call   0x550 <puts@plt>
   0x00000000000006b0 <+38>:    mov    eax,0x0
   0x00000000000006b5 <+43>:    pop    rbp
   0x00000000000006b6 <+44>:    ret
End of assembler dump.

so basically it gives me a set pattern of the execution, so i think that should mean the program should execute always in a particular order i tried disas main about 3 times to see if the order actually ever changes and it does not but when i finally run the binary that's generated it gives me different outputs
root@localhost:~/os/fork analysis# ./forkagain
LINUX
REDHAT
LINUX
REDHAT
REDHAT
REDHAT
root@localhost:~/os/fork analysis# ./forkagain
LINUX
LINUX
REDHAT
REDHAT
REDHAT
REDHAT

which is inconsistent to the observation that i made in the disas, can someone please fill up the gaps in my understanding?
Fork Analysis Full

A:
i tried disas main about 3 times to see if the order actually ever changes

The order is fixed at compile time, so it can never change without you recompiling the program.
In addition, the order is fixed by your program source -- the compiler is not allowed to re-order your output.
What you observe then is the indeterminism introduced by the OS as a result of calling fork -- after the fork there are no guarantees which process will run first, or for how long. The parent may run to completion, then the child. Or the child may run to completion first. Or they may both run with time-slicing, say one line at a time.
In addition, most non-ancient Linux systems today are running on multi-processor machines, and the two independent processes can run simultaneously after the fork.
An additional complication is that your program is not well-defined, because of stdio buffering. While you see 6 lines of output, it might be hard for you to explain this result:
./forkagain | wc -l
8
./forkagain > junk.out; cat junk.out
LINUX
REDHAT
LINUX
REDHAT
LINUX
REDHAT
LINUX
REDHAT

You should add fflush(stdout); before fork to avoid this complication.
P.S. You should also un-learn the bad habit of running as root -- sooner or later you'll make a stupid mistake (like typing rm -rf * in the wrong directory), and will be really sorry you did it as root.

A: Each process executes in perfectly defined order. The trick here is that there is no guarantee of that each process will execute in one tick (the piece of time the process occupies the execution unit) and there is no guarantee of that two processes forked from the same process will get their tick in the order of forking.
If we assume that the printing of A (LINUX) and B (REDHAT) is the benchmark then you can get any sequence of As and Bs given that:

*

*sequence begins with A

*there are total of two As and four Bs

*there is are two Bs after each A

AABBBB
ABABBB
ABBABB
are all possible outputs on a preemptive multitasking OS.
P.S. And this answer is not complete without what Employed says.


text:
Q: How to use phpMail under MAMP for Windows I use CouchCMS as my content manager for website. I also install MAMP (Windows version) for php/mysql/apache solution. I'm trying to enable phpMail feature to use Gmail's SMTP, but failed.
My php.ini in C:\MAMP\conf\php5.6.3\php.ini
[mail function]
; For Win32 only.
SMTP = smtp.gmail.com
smtp_port = 25
auth_username = xxxxxx
auth_password = xxxxxx

; For Win32 only.
sendmail_from = xxxxx@gmail.com

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =

Any idea to debug this issue?

A: If you use MAMP you need to provide separate SMTP solution. For example, you can install email relay or some other 3rd party software with SMTP server or SMTP relay functionality, configure it and then use it for scripts which are executed in MAMP servers.
SMTP = smtp.gmail.com
smtp_port = 25

smtp.gmail.com can be only accessed over SSL/TLS so you need to use ports like 465 or 587.
As php mail send function can only work with no-SSL SMTP servers you can not use it to send email over gmail servers.
So you have to provide your own SMTP solution if using MAMP.
MAMP PRO is already bundled with STMP relay functionality and you can relay your PHP mail messages with it (MAMP PRO uses the default localhost and port 25 so no changes there).

A: I had a lot of trial and error, but finally managed to send mails with Mamp on my Windows 10 machine using these settings:
Edit you php.ini file and change the [mail function] section like this:
[mail function]
SMTP=smtp.gmail.com
smtp_port=465
sendmail_from = yourusername@gmail.com
sendmail_path = "\"C:\MAMP\bin\sendmail\sendmail.exe\" -t"
mail.log = "C:\MAMP\logs\php_mail.log"

Edit your sendmail.ini file like this:
[sendmail]
smtp_server=smtp.gmail.com
smtp_port=465
smtp_ssl=auto
error_logfile=error.log
debug_logfile=debug.log
auth_username=yourusername@gmail.com
auth_password=enteryourgmailpasswordhere
force_sender=yourusername@gmail.com

*

*Right click on sendmail.exe

*Properties

*Compatibility

*Change settings for all users

*Compatibility mode: Windows XP (Service Pack 3)

*Settings: Run this program as an administrator

*Restart Mamp (or Xampp if you use that, these settings are the same)

*Success


text:
Q: On Xamarin Studio iOS, cannot archive for publishing, Configuration doesn't target a device In Xamarin Studio when clicking archive for publishing an error appears:
Configuration doesn't target a device
Your configuration doesn't target a valid iOS device.
Please select a device from the drop-down menu before archiving.

A device is selected in the drop-down, in the development configuration it will run on the device.
The distribution provisioning profile is also selected and present on the device. I have previously gone through and recreated all the distribution and development profiles again and the problem still persisted.
How can this be fixed any suggestions are welcome.
XCODE : version 8.2.1
Xamarin Studio Community: version 6.2

A: Okay so I managed to fix this situation for me. Although a device was selected in the drop down the platform that my solution was trying to target was Any CPU and I believe this was causing the issue.
To fix this I created a new project, opened the .csproj file and selected all of the property groups and replaced the property groups in the original project with these.
At this point it was just a cases of ensuring all configurations matched up and the project could once again be archived.
Hope this helps anyone who encounters a similar problem.


text:
Q: How to find which application is using port 8080 and trying to connect open proxy? I am using Hax-Chat for my IRC but for few days I am having error of open proxy so I asked them they replied on of my application is using open proxy port 8080. So question is how could is find which one using it.

A: Open cmd prompt, enter
netstat

Voila.

A: You could run an lsof command like this:
sudo lsof -i -P | grep -i "listen"

Output would be something like this:
launchd      1           root   27u  IPv6 0x71913d17d1e5c67f      0t0  TCP localhost:631 (LISTEN)
launchd      1           root   28u  IPv4 0x71913d17d1e5d687      0t0  TCP localhost:631 (LISTEN)
mysqld    1295           jake   10u  IPv4 0x71913d17ede9ce9f      0t0  TCP *:8889 (LISTEN)
httpd     1296           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)
httpd     1298           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)
httpd     1299           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)
httpd     1300           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)
httpd     1301           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)
httpd     1302           jake    5u  IPv6 0x71913d17d1e5c23f      0t0  TCP *:8888 (LISTEN)

The ports are listed on the right next to the (LISTEN) state. The application/process is in the first column and the user running the process is in the third column. In this case I am on Mac OS X 10.9.5 and running MAMP and have my CUPS printing interface available.
So in this case you can see that I have CUPS listening to localhost:631 and then I have MySQL (mysqld) listening to *.:8889 and Apache (httpd) listening to *.:8888.
If you wanted to simply grab info on who is listening to port 8080 specifically, you could run this variant of that command:
sudo lsof -i -P | grep -i "8080"

For example if I ran that with 8889 looking for my MAMP MySQL server:
sudo lsof -i -P | grep -i "8889"

This is what I would get:
mysqld    1295           jake   10u  IPv4 0x71913d17ede9ce9f      0t0  TCP *:8889 (LISTEN)


text:
Q: Show that $a^2+b^2+c^2$ is a square when $\frac{1}{a}+\frac{1}{b} = \frac{1}{c}$ and $a,b,c\in\mathbb{Q}$
Knowing that $$\dfrac1a+ \dfrac1b=\dfrac1c$$  Prove that $a^2+b^2+c^2$ is a square, where $a,b,c\not=0$ are rational numbers.

It can probably be solved by a quick factoring trick, but I really can't figure it out.

A: Because $$a^2+b^2+c^2=a^2+b^2+\frac{a^2b^2}{(a+b)^2}=\frac{(a^2+ab+b^2)^2}{(a+b)^2}.$$
I used that:
$$(a^2+ab+b^2)^2=a^4+2a^3b+3a^2b^2+2ab^3+b^4.$$

A: Below we show how to simply derive the value of  $\,\color{#90f}x,$ using only $\rm\color{#0a0}{\textit{difference of squares}}\,$ factorization
$$\begin{align}
 a^2+b^2+\color{#c00}c^2\, &=\, \color{#90f}{x^2},\ \ \ {\rm let}\ \ \ X = (a+b) x\\
\smash[t]{\overset{\!\!\!\large \times\ (a+b)^2}\iff}\ (a+b)^2(a^2+b^2) + (\color{#c00}{ab})^2 &=\, X^2\ \ \ \ {\rm by}\ \ \ \left[\,(a+b)\color{#c00}c = \color{#c00}{ab}\,\right]^2\\[.3em]
\iff\qquad\quad\ \ (a+b)^2(a^2+b^2)  &=\, \color{#0a0}{X^2 - (\color{c00}{ab})^2}\ \\[.3em]
\smash[b]{\iff\ \, (\underbrace{a^2+b^2+2ab}_{})(\underbrace{a^2+b^2}_{})} &= {(X-ab)(X+ab)}\\
  X^{\phantom{|^{|}}}\!\!\!+ab\ \ \ \ \ \ \ \ \  X-ab,\ \!\! &\ \ \  X = a^2+b^2+ab
\end{align}\qquad\qquad\quad\ $$
Thus $\ \color{#90f}x = \dfrac{X}{a+b} = \dfrac{a^2+b^2+ab}{a+b}\ = \dfrac{(a+b)^2-ab}{a+b} = a+b-c\ $ is a solution.
Remark $ $ With that insight we can easily derive the key identity at the heart of it, which is simply the symmetric polynomial Newton identity $\ p_2 = \color{#0a0}{p_1^2} - 2\, \color{#c00}{e_2},\ $ with $\,C\to -C,\,$ i.e.
$$A^2+B^2+C^2 = \color{#0a0}{(A+B-C)^2} + 2(\color{#c00}{(A+B)C-AB})\qquad$$
hence we infer that $\ A^2+B^2+C^2\ $ is a $\,\rm\color{#0a0}{square},\,$ when $\,\color{#c00}{(A+B)C = AB}$.
Proof $ $ expanding $\,\color{#0a0}{((A+B)-C)^2}$ yields RHS $= (A+B)^2\!-2AB+C^2 = $ LHS

A: Let $\dfrac1a=A$ etc.
$\implies A+B=C$
$$a^2+b^2+c^2=\dfrac{(AB)^2+(BC)^2+(CA)^2}{(ABC)^2}$$
$$(AB)^2+(BC)^2+(CA)^2$$
$$=(AB)^2+C^2(A^2+B^2)$$
$$=(AB)^2+(A+B)^2(A^2+B^2)\text{ if }C=\pm(A+B)$$
$$=(AB)^2+(A^2+B^2+2AB)(A^2+B^2)$$
$$=(AB)^2+(A^2+B^2)^2+2\cdot AB\cdot(A^2+B^2)=?$$

A: Let $\tilde c=-c$. Therefore we have
$$\frac{1}{a}+\frac{1}{b}+\frac{1}{\tilde c}=0\Rightarrow ab+a\tilde c+b\tilde c=0$$
Now we can use the following identity:
$$(a+b+\tilde c)^2=a^2+b^2+\tilde c^2+2\underbrace{(ab+a\tilde c+b\tilde c)}_{=0}=a^2+b^2+\tilde c^2$$
Therefore
$$a^2+b^2+c^2=a^2+b^2+ (-\tilde c)^2=a^2+b^2+\tilde c^2=(a+b+\tilde c)^2=(a+b-c)^2\Rightarrow $$
$$a^2+b^2+c^2=(a+b-c)^2$$
With the last equation we proved what we wanted.

A: So we have $c(a+b)=ab$. Now \begin{eqnarray}a^2+b^2+c^2 &=&\underbrace{a^2+\color{red}{2ab}+b^2}\color{red}{-2c(a+b)}+c^2\\
&=&(a+b)^2-2c(a+b)+c^2\\
&=& (a+b-c)^2
\end{eqnarray}

A: We exploit innate symmetry. The hypothesis is equivalent to $\,\color{#c00}{(a+b)c = ab},\,$ i.e.  $\,e_2(-c)=0\,$ for $\,e_2 = ab+bc+ca.\,$ Since $\,p_2 = a^2+b^2+c^2\,$ is symmetric we can write it as a polynomial in the elementary symmetric polynomials $\,e_i.\,$ By Gauss's algorithm we subtract $\,e_1^2\,$ from $\,p_2\,$ yielding
$$ p_2 - e_1^2 = a^2+b^2+c^2 - (a+b+c)^2 = -2(ab+bc+ca) = -2 e_2$$
which yields that $\ p_2 = e_1^2 -2 e_2,\,$ which for $\,c\to -c\,$ yields
$$  a^2+b^2 + c^2\, =\, \underbrace{(a+b-c)^2}_{\large \rm  square\ \color{#c00}{\Large \checkmark}} -2(\underbrace{\color{#c00}{ab-(a+b)c})}_{\large =\ \color{#c00}0}$$
Remark $\ p_2 = e_1^2 - 2e_2 = e_1 p_1 - p_2\,$ is a special case of Newton's Identities relating power sums and elementary symmetric polynomials. Since it is instructive to do so, we derived it from scratch using Gauss's constructive version of the Fundamental Theorem of Symmetric Polynomials.
Gauss's algorithm may be viewed as a special case of Gröbner basis methods (which may be viewed both as a multivariate generalization of the (Euclidean) polynomial division algorithm, as well as a nonlinear generalization of Gaussian elimination for linear systems of equation). Gauss's algorithm is the earliest known use of such a lexicographic order for term-rewriting (now mechanized by the Grobner basis algorithm and related methods).


text:
Q: Use mathematical induction to prove that the sum of the entries of the $k^{th}$ row of Pascal's Triangle is $2^k$.
Use mathematical induction to prove that the sum of the entries of the $k$-th row of Pascal's Triangle is $2^k$. Begin by proving that the row sum for any particular row is double that for the previous row.

I am having a hard time trying to figure out how to prove that the row sum for any particular row is double that for the previous row.
I know how to show for row one, row two and so forth but once I get to row n I know that the sum has to be row(n-1)(2), but I have no idea how to prove that. I know that each row's sum can be written as $2^k$ where $k$ is the row number. I was wondering if anyone can give me a hint or start me off.

A: To prove that each row sum is twice the previous row sum: given a particular row with values $(r_1,\dots, r_n)$, with $r_1=r_n=1$, then note that the next row is given by
$$(1,r_1+r_2,r_2+r_3,\dots, r_{n+1}+r_n,1) = (r_1,r_1+r_2,r_2+r_3\dots,r_{n+1}+r_n,r_n).$$
If we sum the elements of this row, we see that each $r_i$ appears exactly two times, so the row sum is $2 \sum_{i=1}^n r_i$; that is it is twice the previous row sum.

A: There problem go from $n$ to $n+1$:
$$S_{n+1}={n+1\choose 0}+{n+1\choose 1}+...+{n+1\choose n+1}$$
Using Stiefel's rule:
$${n+1\choose k}={n\choose k}+{n\choose k-1}$$
and note that
$${n+1\choose 0}={n\choose 0}, \quad {n+1\choose n+1}={n\choose n}$$
so,
$$S_{n+1}={n\choose 0}+\left[{n\choose 0}+{n\choose 1}\right]+\left[{n\choose 1}+{n\choose 2}\right]+...+\left[{n\choose n-1}+{n\choose n}\right]+{n\choose n}=\\
=2\cdot \left[{n\choose 0}+{n\choose 1}+...+{n\choose n}\right]=2\cdot 2^n=2^{n+1}$$

A: Assume it for k.
For  k+1,
We see that the $ k+1$ th row has two 1's and the rest other values are made by adding the numbers of the kth row  two times except the ones on the corners of the kth row.
So the sum of the  numbers except the two ones of the kth row is $2^k-2$.
So the sum of the k +1 th row is $ 1 + 1 + 2(2^k -2) + 1 +1 = 2^{k+1}$.
Hence proved.


text:
Q: Codeigniter update function doesn't work corectly I have a problem with the update function. This code is updating all rows in database and i want to update only the row with the login username.The "password" is one that i logged in and i want to replace with password3. The problem is that password replace all rows(passwords) in my database.
function edit_member()
{
    $new_member_update_data = array(
                'password' => md5($this->input->post('password3'))
                );
    $this->db->where('password',$this->input->post('password'));
    $update = $this->db->update('memberships',$new_member_update_data);
    return $update;
}

A: Check column password value and $this->input->post('password') value
 function edit_member()
 {
      $password = md5($this->input->post('password3');
      $this->db->set('password',$password );
      $this->db->where('password',$this->input->post('password'));
      $this->db->where('id',$this->input->post('id'));
      $update = $this->db->update('memberships');
      return $update;
 }

A: Suppose you have logged in,then you will get the userId from session right..?So use it here like
function edit_member()
{
    $new_member_update_data = array(
            'password' => md5($this->input->post('password3'))
            );
    $this->db->where('iUserId',$this->session->userdata('iUserId'));
    $update = $this->db->update('memberships',$new_member_update_data);
    return $update;
}

Consider that iUserId will be the field that is unique or even a auto increment field.

A: Check your Password value which is in DB, if that is encrypted by MD5 then you have to pass the encrypted value of password in WHERE clause.
function edit_member()
{
   $password = md5($this->input->post('password3');
   $this->db->set('password',$password );
   $this->db->where('password',md5($this->input->post('password'));
   $update = $this->db->update('memberships');
   return $update;
}


text:
Q: JList very slow adding first element I'm adding a string to a JList with DefaultListModel and it takes seconds to appear.  Sometimes, I may have to click on the JList to have the list appear.
I'm using Eclipse Indigo.  When I set a breakpoint after adding the element to JList, execution is fast.
I searched the web and SO for JList slow and they all talk about adding many items to the list.  I'm adding the first element to the list.
Here's my code fragments:
    private DefaultListModel function_list_model = new DefaultListModel();
    private JList list_functions = new JList(function_list_model);
//...
// Initialization code:
        JPanel panel_function_list = new JPanel();
        panel_function_list.setBounds(10, 53, 541, 220);
        panel_functions.add(panel_function_list);
        panel_function_list.setLayout(null);

        JLabel lblFunctions = new JLabel("Functions");
        lblFunctions.setHorizontalAlignment(SwingConstants.CENTER);
        lblFunctions.setBounds(235, 11, 99, 14);
        panel_function_list.add(lblFunctions);
        list_functions.setBorder(new LineBorder(new Color(0, 0, 0)));

        list_functions.setBounds(10, 42, 492, 177);
        list_functions.setFont(new Font("Courier New", Font.PLAIN, 12));
        list_functions.setPreferredSize(new Dimension(0, 150));
        list_functions.setMinimumSize(new Dimension(32767, 100));
        list_functions.setMaximumSize(new Dimension(32767, 100));
        JScrollPane scrollPane_functions = new JScrollPane(list_functions);
        scrollPane_functions.setBounds(10, 79, 541, 183);
        panel_functions.add(scrollPane_functions);

// Code to add a string:
    String burger = new String("burger");
    function_list_model.addElement(burger);

I'm also using WindowBuilder with Eclipse.
So how do I improve the performance of JList?

A: if you want I can to generating new Item from Char[] and to call doClick() for JButton("Fire")
import java.awt.*;
import java.awt.event.*;
import java.util.Date;
import javax.swing.*;
import javax.swing.event.*;

public class ListDemo extends JPanel implements ListSelectionListener {

    private JList list;
    private DefaultListModel listModel;
    private static final String hireString = "Hire";
    private static final String fireString = "Fire";
    private JButton fireButton;
    private JTextField employeeName;
    private javax.swing.Timer timer = null;
    private int delay = 3;
    private int count = 0;

    public ListDemo() {
        super(new BorderLayout());
        listModel = new DefaultListModel();
        listModel.addElement("Jane Doe");
        listModel.addElement("John Smith");
        listModel.addElement("Kathy Green");
        list = new JList(listModel);
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        list.setSelectedIndex(0);
        list.addListSelectionListener(this);
        list.setVisibleRowCount(5);
        JScrollPane listScrollPane = new JScrollPane(list);
        JButton hireButton = new JButton(hireString);
        HireListener hireListener = new HireListener(hireButton);
        hireButton.setActionCommand(hireString);
        hireButton.addActionListener(hireListener);
        hireButton.setEnabled(false);
        fireButton = new JButton(fireString);
        fireButton.setActionCommand(fireString);
        fireButton.addActionListener(new FireListener());
        employeeName = new JTextField(10);
        employeeName.addActionListener(hireListener);
        employeeName.getDocument().addDocumentListener(hireListener);
        String name = listModel.getElementAt(list.getSelectedIndex()).toString();
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new BoxLayout(buttonPane, BoxLayout.LINE_AXIS));
        buttonPane.add(fireButton);
        buttonPane.add(Box.createHorizontalStrut(5));
        buttonPane.add(new JSeparator(SwingConstants.VERTICAL));
        buttonPane.add(Box.createHorizontalStrut(5));
        buttonPane.add(employeeName);
        buttonPane.add(hireButton);
        buttonPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
        add(listScrollPane, BorderLayout.CENTER);
        add(buttonPane, BorderLayout.PAGE_END);
        start();
        System.out.println(new Date());
    }

    private void start() {
        timer = new javax.swing.Timer(delay * 10, updateCol());
        timer.start();
    }

    public Action updateCol() {
        return new AbstractAction("text load action") {

            private static final long serialVersionUID = 1L;

            @Override
            public void actionPerformed(ActionEvent e) {
                listModel.addElement("Jane Doe");
                listModel.addElement("John Smith");
                listModel.addElement("Kathy Green");
                list.ensureIndexIsVisible(listModel.getSize()-1);
                count++;
                if (count >= 500) {
                    timer.stop();
                    System.out.println("update cycle completed");
                    System.out.println(new Date());
                }
            }
        };
    }

    class FireListener implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            int index = list.getSelectedIndex();
            listModel.remove(index);
            int size = listModel.getSize();
            if (size == 0) { //Nobody's left, disable firing.
                fireButton.setEnabled(false);
            } else { //Select an index.
                if (index == listModel.getSize()) {
                    index--;
                }
                list.setSelectedIndex(index);
                list.ensureIndexIsVisible(index);
            }
        }
    }

    class HireListener implements ActionListener, DocumentListener {

        private boolean alreadyEnabled = false;
        private JButton button;

        HireListener(JButton button) {
            this.button = button;
        }

        @Override
        public void actionPerformed(ActionEvent e) {
            String name = employeeName.getText();
            if (name.isEmpty() || alreadyInList(name)) {
                Toolkit.getDefaultToolkit().beep();
                employeeName.requestFocusInWindow();
                employeeName.selectAll();
                return;
            }
            int index = list.getSelectedIndex(); //get selected index
            if (index == -1) { //no selection, so insert at beginning
                index = 0;
            } else {           //add after the selected item
                index++;
            }
            listModel.insertElementAt(employeeName.getText(), index);
            //listModel.addElement(employeeName.getText());
            employeeName.requestFocusInWindow();
            employeeName.setText("");
            list.setSelectedIndex(index);
            list.ensureIndexIsVisible(index);
        }

        protected boolean alreadyInList(String name) {
            return listModel.contains(name);
        }

        @Override
        public void insertUpdate(DocumentEvent e) {
            enableButton();
        }

        @Override
        public void removeUpdate(DocumentEvent e) {
            handleEmptyTextField(e);
        }

        @Override
        public void changedUpdate(DocumentEvent e) {
            if (!handleEmptyTextField(e)) {
                enableButton();
            }
        }

        private void enableButton() {
            if (!alreadyEnabled) {
                button.setEnabled(true);
            }
        }

        private boolean handleEmptyTextField(DocumentEvent e) {
            if (e.getDocument().getLength() <= 0) {
                button.setEnabled(false);
                alreadyEnabled = false;
                return true;
            }
            return false;
        }
    }

    @Override
    public void valueChanged(ListSelectionEvent e) {
        if (e.getValueIsAdjusting() == false) {

            if (list.getSelectedIndex() == -1) {
                fireButton.setEnabled(false);
            } else {
                fireButton.setEnabled(true);
            }
        }
    }

    private static void createAndShowGUI() {
        JFrame frame = new JFrame("ListDemo");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JComponent newContentPane = new ListDemo();
        newContentPane.setOpaque(true);
        frame.setContentPane(newContentPane);
        frame.pack();
        frame.setVisible(true);
    }

    public static void main(String[] args) {
        javax.swing.SwingUtilities.invokeLater(new Runnable() {

            @Override
            public void run() {
                createAndShowGUI();
            }
        });
    }
}


text:
Q: Remove first 7 chars from every items in a listbox An example of an item would be:
Title1=Hello!

I need to remove the first 7 characters to make it:
Hello!

I have tried this code, but it is not working:
ListBox.Items.Item(1).Remove(0, 7)

A:     For Each i In ListBox1.Items
        i = (StrReverse(StrReverse(i).Remove(7)))
    Next

A: Dim x as Integer
for x = 0 to Listbox1.Items.Count - 1
  Listbox1.Items(x) = Listbox1.Items(x).substring(7)

next x


text:
Q: How to render the first tab link component of a child component in react nested routes? I'm very much new to react and i'm testing a tabs layout here:  https://codesandbox.io/s/lpjlqo7n4z  where i have 2 navigations, a Home and About which renders different contents. Inside the Homepage there's 2 more inner navigation links with different routes. Now my question is how to automatically render the component of the first tablink inside the homepage just below the inner navigation?
Assuming everything is imported properly, here's my Index.js code:
  <Router>

Logo

             <Link to="/" exact>Home</Link>

             <Link to="/about" exact>About</Link>

        <Switch>
          <Route exact path="/" render={props => <Home {...props}/>} />
          <Route exact path="/about" render={props => <About {...props} />} />
        </Switch>

  </Router>

Home component:
const Home = (props) => {
  return (

Homepage

            <Link to={`/graphics-design`}>Graphics Design</Link>

            <Link to={`/development`}>Development</Link>

        <Switch>
          <Route path={`${match}/:topicId`} render={props => <DesignTab />} />
          <Route
            path={`${match}/:topicId`}
            render={props => <DevelopmentTab />}
          />
        </Switch>

  );
};

export default Home;

And the first tab component:
const DesignTab = props => {
  return (

Design Works

            Lorem ipsum dolor sit amet consectetur adipisicing elit. Tenetur
            dignissimos corrupti eius vero maxime architecto similique odio
            maiores nihil accusantium iure error et voluptate placeat excepturi
            blanditiis, ad numquam itaque.

  );
};

export default DesignTab;

How do i automatically render the tab content just below the inner navigation of the homepage?
Please see the layout here: https://codesandbox.io/s/lpjlqo7n4z

A: There are issues with your program you need to address before starting your problem:
The tab content just below the inner navigation of the homepage is impossible to render because the path is impossible to reach. You basically saying "Once im in the / home path, i want to match /gaming/:topicId paths" but this isn't possible because the only way to get to your Home component is to exactly match / in your index. So you can't exactly match / as well as /gaming/topicId.
I would recommend moving these routes to your index.js file:
<Switch>
  <Route path={`${match}/:topicId`} render={props => <DesignTab />} />
  <Route
    path={`${match}/:topicId`}
    render={props => <DevelopmentTab />}
  />
</Switch>

I don't understand what you want this Route to match to because the match object doesn't make sense in this context.
When you make statements like render={props => <Home />, the props are not being sent to your Home component. You must tell the component you want to send it props via render={props => <Home {...props} /> instead.
Also const Home = (props, { match }) is not the correct syntax and match will always be undefined here. Change to const Home = (props) then you can access match via props.match.
I hope my advice helps :)


text:
Q: How to check if branch is partially committed in another branch? Lets say we have the following commit history.
http://postimg.org/image/q7d1rc8u7/
Here you can see that in dev:

*

*TRASH-1 is fully merged in dev

*TRASH-3 is partially merged in dev
(have extra commits that are not merged)

Using the following commands I am trying to see that TRASH-3 is partially merged. But git with this command shows the TRASH-3 as no-merged
$ git checkout dev
Switched to branch 'dev'
Your branch is up-to-date with 'origin/dev'.
$ git br -r --no-merged
  origin/feature-TRASH-2
  origin/feature-TRASH-3
  origin/master
$ git br -r --merged
  origin/dev
  origin/feature-TRASH-1

What would be the easiest way to see that TRASH-3 is partially merged?

A: git log origin/feature-TRASH-3 --not origin/dev will show you only the commits of trash3 that hasn't yet got to dev. If this list is empty - the trash has been fully incorporated into dev.


text:
Q: How to set oracle_home in linux with ansible playbook Am trying to set oracle_home by using below
---
- name: setting up the ORACLE_HOME
  hosts: localhost
  become: yes
  environment:
    ORACLE_BASE: "/u01/app/oracle/"
    ORACLE_HOME: $ORACLE_BASE/product/12.1.0.2/cl_100
    PATH: $PATH:$HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch

script executing but not setting up please help

A: I would go with the following:
  vars:
    ORACLE_BASE: "/u01/app/oracle"
    ORACLE_HOME: "{{ORACLE_BASE}}/product/12.1.0.2/cl_100"
    ADD_PATH: "{{ORACLE_HOME}}/bin:{{ORACLE_HOME}}/OPatch"
  environment:
    ORACLE_BASE: "{{ORACLE_BASE}}"
    ORACLE_HOME: "{{ORACLE_HOME}}"
    PATH: "{{ansible_env.PATH}}:{{ansible_env.HOME}}/bin:{{ADD_PATH}}"