text:
Q: No block given error when executing rails and rake commands I went to generate a new controller for my rails app today, and I was confronted with a rather disturbing error. When I run rails generate controller Matches I get the following error:
rails generate controller Matches
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1075:in `member': no block given (LocalJumpError)
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:546:in `scope'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1074:in `member'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1260:in `with_scope_level'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1073:in `member'
    from /Users/max/workplace/SummerGypsy/config/routes.rb:34
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1011:in `resources'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1269:in `resource_scope'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:546:in `scope'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1268:in `resource_scope'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1260:in `with_scope_level'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1267:in `resource_scope'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1010:in `resources'
    from /Users/max/workplace/SummerGypsy/config/routes.rb:33
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/route_set.rb:233:in `instance_exec'
    from /Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/route_set.rb:233:in `draw'
    from /Users/max/workplace/SummerGypsy/config/routes.rb:1
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `reload_routes!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `each'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `reload_routes!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:120:in `routes_reloader'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/file_update_checker.rb:32:in `call'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:51
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:52:in `call'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:52
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `instance_exec'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `run'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:50:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `each'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `run_initializers'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:134:in `initialize!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:77:in `send'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:77:in `method_missing'
    from /Users/max/workplace/SummerGypsy/config/environment.rb:5
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
    from /Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:103:in `require_environment!'
    from /Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/commands.rb:16
    from script/rails:6:in `require'
    from script/rails:6

I have absolutely no idea what this means. I get a similar error when running rake db:migrate
rake db:migrate --trace
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
no block given
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1075:in `member'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:546:in `scope'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1074:in `member'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1260:in `with_scope_level'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1073:in `member'
/Users/max/workplace/SummerGypsy/config/routes.rb:34
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1011:in `resources'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1269:in `resource_scope'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:546:in `scope'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1268:in `resource_scope'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1260:in `with_scope_level'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1267:in `resource_scope'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/mapper.rb:1010:in `resources'
/Users/max/workplace/SummerGypsy/config/routes.rb:33
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/route_set.rb:233:in `instance_exec'
/Library/Ruby/Gems/1.8/gems/actionpack-3.0.8/lib/action_dispatch/routing/route_set.rb:233:in `draw'
/Users/max/workplace/SummerGypsy/config/routes.rb:1
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:235:in `load'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `reload_routes!'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `each'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:127:in `reload_routes!'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:120:in `routes_reloader'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/file_update_checker.rb:32:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/file_update_checker.rb:32:in `execute_if_updated'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:51
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:52:in `call'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application/finisher.rb:52
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `instance_exec'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:25:in `run'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:50:in `run_initializers'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `each'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/initializable.rb:49:in `run_initializers'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:134:in `initialize!'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:77:in `send'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:77:in `method_missing'
/Users/max/workplace/SummerGypsy/config/environment.rb:5
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:596:in `new_constants_in'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:225:in `load_dependency'
/Library/Ruby/Gems/1.8/gems/activesupport-3.0.8/lib/active_support/dependencies.rb:239:in `require'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:103:in `require_environment!'
/Library/Ruby/Gems/1.8/gems/railties-3.0.8/lib/rails/application.rb:218:in `initialize_tasks'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Library/Ruby/Gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => db:migrate => environment

I am running rails 3.0.8 on top of Ruby 1.8.7 (patch level 249). Does anyone have any suggestions? Thank you for your help.


text:
Q: prove that $ a^2 b^2 \left( {a^2 + b^2 - 2} \right) \ge \left( {a + b} \right)\left( {ab - 1} \right) $ good evening I want to show that
$(1)a;b\in\mathbb {R^*_+}:a^2 b^2 \left( {a^2  + b^2  - 2} \right) \ge \left( {a + b} \right)\left( {ab - 1} \right)
$
$
\begin{array}{l}
 \frac{a}{b} + \frac{b}{a} \ge 2 \\
 \frac{a}{b} + \frac{b}{a} = \frac{{a^2  + b^2 }}{{ab}} \Rightarrow a^2  + b^2  = ab\left( {\frac{a}{b} + \frac{b}{a}} \right) \ge 2ab \\
 a^2 b^2 \left( {a^2  + b^2  - 2} \right) \ge a^2 b^2 \left( {2ab - 2} \right) = 2a^2 b^2 \left( {ab - 1} \right) \\
 \end{array}
$
$ x;y;z\in\mathbb {R^*_+}:$
$(2)\sum_{cyc}^{ } xy(x+y-z)\ge \sqrt {3(x^3y^3+y^3z^3+z^3x^3)}$
thank you in advance

A: Do you keep the first true in the case of
$a;b\in\mathbb {R^*_+} and :   a^2  + b^2  \ge 2$
$ (2)x;y;z\in\mathbb {R^*_+}:$
$\sum_{cyc}^{ } xy(x+y-z)\ge \sqrt {3(x^3y^3+y^3z^3+z^3x^3)}$
Thank you for all helping and guidance. ...

A: By way of simplifying the situation, let x = ab and y = a+b. Note that as a and b range over all positive reals, x and y range over all pairs for which x>0 and y > 2 √x because if x lies on the hyperbola ab = x in the first quadrant of the a-b plane, then the least value for a+b will be when a=b and then it is  2 √x. So as long as y > 2 √x there will be positive a and b satisfying the equations between x,y and a,b.
Expressing the given  inequality in terms of x and y we get:
x^2 (y^2 – 2x – 2) > y (x-1), which can be transformed into
y^2 + y(1-x)/x^2  > 2x+2.
Let u = (1-x)/2x^2  and v = 2x+2, so we require that
y^2 + 2uy > v, which holds iff y > √(u^2 + v) – u (since y>0).
The only way for this condition to hold for all x, y as described above is for
2 √x >= √(u^2 + v) – u.
Move the u to the other side and square to get
u √x >= v/4 – x.
Now replace u and v with their definitions to get the condition:
(1-x)/2x^2  * √x >= (1+x)/2 – x = (1-x)/2.
If 1-x > 0 this simplifies to x<=1 which is true and if 1-x <= 0 it simplifies to x>=1, also true, which proves the inequality.
To clarify things a little, one starts with an arbitrary positive a and b, then finds x, y, u, v. Since y > 2 √x which itself is >= √(u^2 + v) – u, also y > √(u^2 + v) – u. This last  inequality then can be traced back to demonstrating the original inequality.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Deleting Thumb Cache in Windows 7 folder Is it safe to delete %LOCALAPPDATA%\Microsoft\Windows\Explorer\ThumbCacheToDelete ?
And if so how do I do it ? It keeps telling me that it's used by other program in Explorer but not which ones.

A: Multiple Answers can be a solution!
Turn off thumb caching, then turn it back on
http://www.technoleros.com/turn-off-caching-of-windows-7-thumbnails-in-hidden-thumbs-db-files/
Not all versions of Vista-Windows 7 have Group Policy Editor though.
Another trick is to open task manager and an elevated (administrator) command prompt, leave both open, on the process tab, kill explorer.exe, use the command prompt to delete the files, then use task manager and do a File >New Task >type in explorer.exe to load you desktop again.
This article shows how to do it at boot, but just use the method above to do it without rebooting. http://www.sevenforums.com/tutorials/55728-file-delete-command-prompt.html
If there is a permissions error when trying to delete, you may have to take ownership of the files first. For ownership refer http://www.howtogeek.com/howto/windows-vista/how-to-delete-a-system-file-in-windows-vista/

A: You can delete the thumbnail cache from Disk Cleanup.  Windows doesn't let you delete it normally because it is indeed open for frequent reading and writing.  Please know that Windows does regenerate these over time.  If you don't want to see icon previews at all, you can go to 'Folder and search options' and check 'Always show items, never thumbnails'.


text:
Q: Only one active thread after forking by Parallel::ForkManager. Why? I've got only one working thread after forking by Parallel::Fork:
ps -ef | grep ./BuildReportIndexV_VR2.pl

503      15955  9531 18 13:11 pts/0    00:02:06 /usr/bin/perl ./BuildReportIndexV_VR2.pl promt_tenant=AD backward=1
503      16102 15955 99 13:13 pts/0    00:09:29 /usr/bin/perl ./BuildReportIndexV_VR2.pl promt_tenant=AD backward=1
503      16103 15955  0 13:13 pts/0    00:00:02 /usr/bin/perl ./BuildReportIndexV_VR2.pl promt_tenant=AD backward=1
503      16104 15955  0 13:13 pts/0    00:00:02 /usr/bin/perl ./BuildReportIndexV_VR2.pl promt_tenant=AD backward=1
503      16105 15955  0 13:13 pts/0    00:00:03 /usr/bin/perl ./BuildReportIndexV_VR2.pl promt_tenant=AD backward=1

Process 15955 is parent, 16102 and down are children.
Here is the relevant code:
my $pm = Parallel::ForkManager->new($MAX_PROCESSES);
$pm->set_max_procs( $MAX_PROCESSES );

my $start_index;
my $last_index;

for ( $start_index = 0,
      $last_index=$start_index+$subhash_size-1;

      $last_index <= keys %$index_hr;

      $start_index=$last_index+1, $last_index=$start_index+$subhash_size-1
    )
{
    $pm->start and next;
    create_report_subprocess( $index_hr, $start_index, $last_index );
    $pm->finish;
}
$pm->wait_all_children;

print "After all children are waited: last index: $last_index\n";
if ( $last_index > keys %$index_hr) {
    $last_index = keys %$index_hr;
    create_report_subprocess( $index_hr, $start_index, $last_index );
}

I set $MAX_PROCESSES=4.
I expected that all 4 threads be running. Why only one?

A: Try setting AutoInactiveDestroy for any active database or statement handles before your for loop.


text:
Q: Phone-to-Case Solution Is there an existing solution in Salesforce for Phone-to-Case implementation? A client calls a 1-800 support number and the phone system should automatically create a Case in Salesforce?
Thanks in advance!


text:
Q: Mysql ibdata1 size is too big My database size (with indexs): 70GB
My ibdata1 size: 211GB
How can it possible with inno_db_per_file=1 setting?
SELECT FILE_NAME,DATA_FREE, (DATA_FREE / 1024 / 1024 / 1024) AS GB FROM information_schema.files WHERE file_id = 0

Result is:
FILENAME  | DATE_FREE    | GB
./ibdata1 | 212448837632 | 197
my settings
innodb_file_per_table=1
innodb_log_file_size=512M
innodb_buffer_pool_size=128G
innodb_buffer_pool_instance=128
join_buffer_size=64G

A: Possible causes of huge ibdata1:

*

*It was huge before setting innodb_file_per_table = 1

*A huge UPDATE or DELETE wad run, leading to lots of "undo" data that may have been stored (temporarily) in ibdata1.

*Maybe a very complex SELECT needed it for temp space?

*other(?)

Alas, there is no simple way to shrink a big ibdata1.  (There are lots of Q&A about it, probably on this forum.)


text:
Q: {Done] Permissions for Data folder on external Harddrive So i reinstalled Nextcloud on my Pi, because i got now an external harddrive to connect. So i used:
sudo ln -s media/pi/Elementals/Nextcloud/data /var/www/nextcloud/data
and i changed the the owner inside var /www/nextcloud to www-data for the data folder there.
Still i cant install it. I tried to change the owner of /media/pi/Elementals/Nextcloud/data. But cant change it.
im using:
chown -R www-data:www-data data/
Even thos when i use:
sudo -u www-data bash
and then create a folder its owned by pi.
What i did wrong ?
Got it:
used fstab used there ntfs-3g

A: I think you forgot to add sudo the command should be
sudo chown www-data /path/to/data/


text:
Q: Any closed formula for this summation involving binomial coefficients? I am stuck with writing a closed formula for the following summation:
$$\sum_{i=0}^{n-m} (-1)^i {m \choose i} {n-m \choose i}^2$$
I would appreciate any help.

A: As I wrote in a comment,
$$\sum_{i=0}^{n-m} (-1)^i {m \choose i} {n-m \choose i}^2=\, _3F_2(-m,m-n,m-n;1,1;1)$$ where appears the generalized hypergeometric function which is not a closed form. I do not see any way to simplify it.
If you fix $m$, you will get a polynomial in $n$ of degree $2m$
$$\left(
\begin{array}{cc}
 m & \, _3F_2(-m,m-n,m-n;1,1;1) \\
 0 & 1 \\
 1 & -n^2 +2n\\
 2 & \frac{n^4}{4}-\frac{5 n^3}{2}+\frac{29 n^2}{4}-7 n+2 \\
 3 & -\frac{n^6}{36}+\frac{2 n^5}{3}-\frac{211 n^4}{36}+\frac{145 n^3}{6}-\frac{893
   n^2}{18}+\frac{146 n}{3}-18 \\
 4 & \frac{n^8}{576}-\frac{11 n^7}{144}+\frac{389 n^6}{288}-\frac{113
   n^5}{9}+\frac{38785 n^4}{576}-\frac{30869 n^3}{144}+\frac{6365
   n^2}{16}-\frac{791 n}{2}+162
\end{array}
\right)$$


text:
Q: Newline differences in c# vs. JS/HTML If I have a textarea and I put in a newline, FireFox and IE 7/8 seem to store that as "\n". (i.e. if I do val.match(/\n/) it finds something, but val.match(/\r/) finds nothing) C# of course represents newlines as "\r\n". This leads to problems when we have maximum length restrictions, since every newline is counted as one character in the browser but two on the server.
This must be a problem that others have run into before, so what is the solution? Should I manually count '\n' as two chars in the browser? (Is there a jQuery option that will do this for me?) Should I strip out the '\r' on the server? Either way it seems like I might get into trouble.

A: I'd strip/transform it on the server. Its an input issue, so handle the case. Dont do it on the client.


text:
Q: Пропуск присваивания значения uniform переменной Какое значение будет в fragment-шейдере иметь sampler2D uniform-переменная, если я не присвою ей значения в коде?
Такой же вопрос об остальных uniform-переменных. Например, если у меня есть в fragment-шейдере переменная типа vec4, то она будет содержать null значение, если я не инициализирую ее в коде? Или OpenGL как-то пропускает куски в шейдере, которые работают с не инициализированными переменными? Прошу дать справку.
Использую OpenGL ES 2.0. GLSL - кажется, версия 1.0.
A: В общем, vec4 у меня по умолчанию заполняется нулями. Думаю все uniform-переменные, которые не имеют значения, заполняются нулями. С sampler2D та же история - texture2D() возвращает vec4 с нулями.


text:
Q: Which one(s) of "up", "above", "over", "on" and "upon" is (or are) correct for this sentence?
*

*Could you please put the pen over the book?

*Could you please put the pen on the book?

*Could you please put the pen upon the book?

*Could you please put the pen above the book?

*Could you please put the pen up the book?
Which of these sentences is/are correct?
For the incorrect ones, I hope you add extra information like, "This word ('over', 'on', etc.) cannot be used that way, but it could be used this way:" and give an example.

A: There is a significant difference in meaning if you are talking about the pen and the book as objects that you are just locating in space... vs. getting a pen ready and poised to write in the book.
Let us say the pen is just an object that might serve the purpose equally well whether it is capped or uncapped, and its nature as a writing tool is irrelevant.  Then simply upon/on would likely mean the pen is resting on the book and touching, due to gravity.  above would probably suggest not touching but being in a somehow "upward" direction.  (Like hanging from a string in three dimensions, or perhaps placed on a table "above" the book as it is seen from a photo in its defined orientation.).
The construction up the book is bizarre; it suggests some kind of slot into which the pen could be put.  You might argue that if a closed book were pierced through the pages along the binding that someone "stuck the pen up the book" but that is awkward.  up the (whatever) has "vulgar" associations as a phrasing for almost any (whatever)--at least today.
If it is an instruction about a pen in readiness to be writing in a book, then perhaps the more important thing to point out is the nuance of "book" itself.  The word in isolation is typically used to mean something pre-printed that you aren't to mark up...and there are special categories invoked for the kinds of books you are "supposed" to write in (workbook or coloring book).
In that sense the best answer may be "Keep the pens off the books, or you'll hurt their resale value."  :-)
If you wanted to tell someone to get their pens ready to write in a book, you'd be clearest saying:
"Open your workbooks to page 3, and touch the tip of your pen to the center of the page."
Because if that is what you are trying to say vs just positioning objects (as for a photo shoot, like @J.R. suggests) then none of the choices you mention convey that meaning well.

A:
2) Could you please put the pen on the book?

is the most likey way someone would say this. 3) "upon" is also OK but is more likely to occur in literature. These refer to placement.

1) Could you please put the pen over the book?
  4) Could you please put the pen above the book?

These refer to location. This would imply the pen is located above the book, which would not be likely in the setting of your examples, but could be possible with other wording. For example:

Could you please put the pen on the shelf above the book?

Finally -

5) Could you please put the pen up the book?

does not make sense  in this  phrase. "up" refers to inside in a sense.
An example where it would be OK:

Could you please put the medicine up your nose?

A: The best fit might be onto, which indicates movement:
Could you please put the pen onto the book?


text:
Q: swi-prolog negation I've had a hard time searching for clear answers on negation in Prolog, so I apologize if this is an obvious question:
I'm trying to write a simple code that will logically say that "X and Y love each other if X likes Y and only Y." My .pl code looks something like this:
likes(mary,john).
likes(mary,chad).
likes(john,mary).

loves(X,Y):- likes(X,Y), \+likes(X,Z).

I then run my program and simply ask:
?- loves(X,Y).

but it always comes out false. By my logic, it ought to come back saying 'X=john,  Y=mary'.
I've tried a few combinations of separating the negation with cuts, trying multiple lines for defining "loves"... I'm probably missing a major principle of negation, or maybe there's even an easier way to implement what I'm trying to do here. Please let me know if you can help!
I'm using SWI-Prolog (swipl) from the Debian Software Manager, if that helps at all, though I doubt this will make much difference.

A: Your problem is that Z it's not bound when your rule calls for \+likes(X,Z), then at least there will always be Z=Y that invalidates loves/2. I mean, since likes(X,Y) is true, surely will be true likes(X,Z).
Change it this way:
loves(X,Y):- likes(X,Y), \+ (( likes(X,Z), Z \= Y )).

and you'll get
?- loves(X,Y).
X = john,
Y = mary.


text:
Q: Where to store services that shouldn't be moved (OSX app install)? I am building a desktop app which creates a service (daemon) during install.
Before registering the service, though, I want to install the files of this service to a location, different than the app's Contents dir - the user might want to move the app from the Applications dir, and if the service changes location on the next start of the OS, it will not be located and my app will not be able to find it.
Where should I install the service at?
Thanks in advance.
Update:
Is "~/Library/Services" the right place?
Or, perhaps, "/Drivename/Library/Services" for multi-user use?

A: There's a terminology ambiguity with this question and it might be causing you some difficulty with determining where to locate your files.
Under OSX, a Service can have two meanings, one of which is relating to code that executes in response to the Services menu item in applications, and that's what is stored in the various /Library/Services, /System/Library/Services, and ~/Library/Services directories, so you don't want to place them there.
Daemon Control file placement
Assuming about a daemon (which you mention specifically in the text of your message), then you are going to want to place it in one of the LaunchAgent or LaunchDaemon directories and use launchd to start the daemon for you.  For launchd purposes, Agents are run per user and Daemons are run per system (difference is how many copies are run).
For daemons/services that are used by a single user and started when the user logs in, their configuration files may be stored in ~/Library/LaunchAgents, which will allow the system to kick them off whenever the user logs in to the system.   If you need something that will be available at all times (i.e. starts when the system boots), you'll need to gain privileges and install in the /Library/LaunchDaemons location.
That's the tale of the configuration files for launchd, but it doesn't address directly your question of where to put the executables to prevent them from getting disconnected if the user relocates the Application outside of the /Applications folder.
Daemon executable placement
These days, fewer users are moving apps out of the /Applications folder unless they're intentionally uninstalling or deactivating them, so you may want to avoid trying to prevent this.  Instead, when the application launches, you should verify that the daemon is running and if it isn't, install and activate the appropriate launchd configurations using your application's internal Library folder as the repository for the code which is referenced by the launchd configuration.
If you choose to store them separately, you should place them in either ~/Library/Application Support/(your app's id) or /Library/Application Support/(your app's id), depending on whether you are installing per-user or per-machine.   Generally, the latter is preferred.


text:
Q: How to connect a VM to the Internet in VMware vCloud using a Network Gateway CIDR I am familiar with managing servers and VMs that have their own IP address and network connection, but am now trying to host a VM in a VMware vCloud and am a newb for this.
I have created the VM and configured its webserver and iptable Firewall, but now need to configure the network, as I cannot access it from the Internet.
I already have an Edge that has a subnet (.../24), ip address, Sub-allocated IP Pool (...134 - ...135), and a Default Gateway (...101.1)
I need to create VDC Network, from what I understand I need a "Routed network connecting to an existing edge gateway" and can select the exiting Edge.
Next I need to set the "Network Gateway CIDR" and I have no idea what to enter here?


text:
Q: Uppaal simulation Error : state not well define I am new to uppaal. I have a system consisting of different models. I also have a clock and a double variable declared.
For my invariants and guards, there is a need for me to check these two values (Clock t; double y; invariant: t<=y or for guard t==y or ty).
Now at the point of the simulation, I have this error

The successors of this state are not well defined. SymbolicState:clock: Model.t -> double

I have no idea what I did wrong.


text:
Q: App is not opening after build and installing, Android Studio Java I am making the Carpooling app but when I run the code the app builds successfully and installs too but when I click on the app nothing happens after debugging the following error is shown

A: i see an error that say  com.google.firebase.auth not found
Look at your app-level build.gradle file. Usually shown as build.gradle (Module: app). Check if it has the two lines mentioned below. If there's none, add those.
dependencies {
// ...
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-auth:16.0.2'
}

if the both are mention and not work you have two option
Option 1: Go to Firebase Console < Authentication < SIGN-IN METHOD, and see if you are using it in the Anonymous state. If you are, disable that and enable Email/Password or whichever login method you are using.
Option 2: Check if the device you are testing with is running Google Play Services 9.0.0 or later.

A: Go to https://firebase.google.com/docs/android/setup.
See latest dependency of firebase authentication.
Add it into your project and then build it.
Hope it works .


text:
Q: ContenPresenter TextBlock style not working in Visual Studio ToolWindow Extensibility This is weird.
I've created a custom control called Switch. I've also defined a style for TextBlock.
<!-- Switch -->
<Style TargetType="{x:Type controls:Switch}">
    <Setter Property="Margin"
            Value="3,3,3,3" />
    <Setter Property="MinWidth"
            Value="40" />
    <Setter Property="MinHeight"
            Value="24" />
    <Setter Property="On"
            Value="ON" />
    <Setter Property="Off"
            Value="OFF" />
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type controls:Switch}">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter Grid.Column="0"
                                      Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Off}" />
                    <Border Grid.Column="1"
                            Background="{TemplateBinding Property=Background}"
                            BorderBrush="{TemplateBinding Property=BorderBrush}"
                            BorderThickness="{TemplateBinding Property=BorderThickness}"
                            CornerRadius="12,12,12,12"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Center">
                        <Track x:Name="PART_Track"
                               Minimum="0"
                               Maximum="1"
                               Orientation="Horizontal"
                               Value="0">
                            <Track.Thumb>
                                <Thumb x:Name="PART_Thumb"
                                       Style="{DynamicResource ResourceKey=SwitchThumb}" />
                            </Track.Thumb>
                        </Track>
                    </Border>
                    <ContentPresenter Grid.Column="2"
                                      Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=On}" />
                </Grid>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

<!-- Text Block -->
<Style TargetType="{x:Type TextBlock}">
    <Setter Property="Margin"
            Value="3,3,3,3" />
    <Setter Property="HorizontalAlignment"
            Value="Left" />
    <Setter Property="VerticalAlignment"
            Value="Center" />
    <Setter Property="TextAlignment"
            Value="Left" />
    <Setter Property="TextWrapping"
            Value="Wrap" />
</Style>

When I add an instance of Switch (along with TextBlock style) to a simple window, the ContentPresenter used within the Switch is inheriting TextBlock style.

But when the Switch is used within Visual Studio ToolWindow Extensibility, the ContentPresenter used within the Switch does not inherit the TextBlock style.
Notice the Vertical Alignment and Margin, they are not Center and 3,3,3,3 as set in the Style.
Any idea why?
I tried using snoop to find out the values of the TextBlock within ContentPresenter and they are not according to the style I have defined.
NOTE: I cannot set TextElement Attached Properties on all the ContentPresenters as I have a lot of custom controls and therefore would prefer setting a style for TextBlock instead.

A: The answer to "why" is probably: the implicit TextBox Style is not being used in the Tool Window.
I wouldn't really care for that though. If I were to style this switch I'd say, OK, I want a little separation between the Track and the labels and I want them all vertically centered. And that's exactly what would go in the Switch style. I wouldn't rely on the textbox to accomplish that. So it'd be like this:
        <ControlTemplate TargetType="{x:Type controls:Switch}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <ContentPresenter Grid.Column="0"
                                  Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=Off}" VerticalAlignment="Center"/>
                <Border Grid.Column="1"
                        Background="{TemplateBinding Property=Background}"
                        BorderBrush="{TemplateBinding Property=BorderBrush}"
                        BorderThickness="{TemplateBinding Property=BorderThickness}"
                        CornerRadius="12,12,12,12"
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Center" Margin="3,0">
                    <Track x:Name="PART_Track"
                           Minimum="0"
                           Maximum="1"
                           Orientation="Horizontal"
                           Value="0">
                        <Track.Thumb>
                            <Thumb x:Name="PART_Thumb"
                                   Style="{DynamicResource ResourceKey=SwitchThumb}" />
                        </Track.Thumb>
                    </Track>
                </Border>
                <ContentPresenter Grid.Column="2"
                                  Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=On}" VerticalAlignment="Center"/>
            </Grid>
        </ControlTemplate>


text:
Q: layout buttons size gets changed on vaadin dialog popup I am creating a dialog popup for a logout button, but whenever I am clicking on my logout button, my other buttons layout changes.
Code for logout button:
hl1=new HorizontalLayout();
hl1.setSizeFull();
hl1.setHeight("40px");
hl1.setMargin(false);
hl1.setPadding(false);
hl1.setSpacing(true);
logout = new Button("Logout");
logout.setAutofocus(isVisible());
hl1.add(l2,logout);

Code for dialog:
logout.addClickListener(new ComponentEventListener<ClickEvent<Button>>() {
    public void onComponentEvent(ClickEvent<Button> event) {
        logout();
    }

    protected void logout() {
        Dialog dialog = new Dialog();
        dialog.setModal(false);
        dialog.setDraggable(true);
        UI.getCurrent().setChildComponentModal(dialog, false);
        dialog.setHeaderTitle("Do you really want to logout? You will loose unsaved work");

        VerticalLayout dialogLayout = createDialogLayout();
        dialog.add(dialogLayout);

        Button YesButton = createYesButton(dialog);
        Button cancelButton = new Button("Cancel", e -> dialog.close());
        dialog.getFooter().add(cancelButton);
        dialog.getFooter().add(YesButton);
        dialog.addThemeVariants(DialogVariant.LUMO_NO_PADDING);
    }
}


text:
Q: how to merge multiple json files into 1 using python Here's my code, really simple stuff...
Here, I am trying to merge multiple json files into a single json file
import json
import glob

result = []
for f in glob.glob("*.json"):
with open(f, "rb") as infile:
    result.append(json.load(infile))

with open("merged_file.json", "wb") as outfile:
  json.dump(result, outfile)

file 1 is--
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3402}
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3389}

file 2 is--
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3402}
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3389}

they do have redundant records and 2 records per column. How do I merge these two files in one single json file.
I am getting the below error--
 JSONDecodeError: Extra data: line 2 column 1 (char 62)

with the traceback as--
JSONDecodeError                           Traceback (most recent call last)
<ipython-input-2-d33a95f39988> in <module>
  5 for f in glob.glob("*.json"):
  6     with open(f, "rb") as infile:
----> 7         result.append(json.load(infile))
  8
  9 with open("merged_file.json", "wb") as outfile:

~\anaconda3\lib\json\__init__.py in load(fp, cls, object_hook, parse_float, parse_int,
parse_constant, object_pairs_hook, **kw)
294         cls=cls, object_hook=object_hook,
295         parse_float=parse_float, parse_int=parse_int,
--> 296         parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
297
298

~\anaconda3\lib\json\__init__.py in loads(s, encoding, cls, object_hook, parse_float, parse_int,
parse_constant, object_pairs_hook, **kw)
346             parse_int is None and parse_float is None and
347             parse_constant is None and object_pairs_hook is None and not kw):
--> 348         return _default_decoder.decode(s)
349     if cls is None:
350         cls = JSONDecoder

~\anaconda3\lib\json\decoder.py in decode(self, s, _w)
338         end = _w(s, end).end()
339         if end != len(s):
--> 340             raise JSONDecodeError("Extra data", s, end)
341         return obj

Please HELP :(

A: The file format is incorrect.
It should either be a list of dictionary or dictionary containing unique keys
If you cannot modify the file, you can read the content and append it to the result.
Read each file and append the result
result = ''
for f in glob.glob("*.json"):
    with open(f, "r") as infile:
        result += infile.read()

Then write the final result into another file
with open("merged_file.json", "w") as outfile:
    outfile.writelines(result)

Output:
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3402}
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3389}
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3402}
{"playlist_track.PlaylistId":1,"playlist_track.TrackId":3389}

With the above solution I would definitely attempt to change the file extension to .txt or something else that is not JSON.
My recommandation would be to convert the file into a JSON format and save it this way.
Read each line and convert it in to a dict. Result will contain a list of dict, which is JSON serializable
result = []
for f in glob.glob("*.json"):
    with open(f, "r") as infile:
        for line in infile.readlines():
            result.append(json.loads(line))

Once this is done you can now save the content as a JSON file
with open("merged_file.json", "w") as outfile:
  json.dump(result, outfile)

You may open the file as a JSON file now:
with open("merged_file.json", "r") as fp:
    print(pformat(json.load(fp)))

Output:
[{"playlist_track.PlaylistId": 1, "playlist_track.TrackId": 3402}, {"playlist_track.PlaylistId": 1, "playlist_track.TrackId": 3389}, {"playlist_track.PlaylistId": 1, "playlist_track.TrackId": 3402}, {"playlist_track.PlaylistId": 1, "playlist_track.TrackId": 3389}]


text:
Q: Discord.py. Как получить числовой id реакции и как повесить реакцию на сообщения бота После всего выше перечисленного хотелось бы узнать как выводить сообщение после того как пользователь нажал на саму реакцию.

A: *

*ID реакции не существует, но существует ID эмодзи:

print(reaction.emoji.id)

*Чтобы повесить реакцию на сообщение, для начала получи объект этого сообщения, а затем уже используй метод add_reaction():

message = await ctx.send("Hi!")
# Или:
message = await channel.fetch_message(message_id)

# emoji может быть объектом следующих классов: Emoji, Reaction, PartialEmoji, str
await message.add_reaction(emoji)

*Если тебе нужно, чтобы после нажатия реакции писалось сообщение, используй событие "on_raw_reaction_add":

@bot.event
async def on_raw_reaction_add(payload):
    channel = await bot.fetch_channel(payload.channel_id)
    await channel.send("Message")


text:
Q: navigation bar doesn't go translucent The status bar is but the navigation bar is not.
activity
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_pictures);

    getSupportActionBar().hide();

    swipeLayout = findViewById(R.id.swipe_container);

    final WebView myWebView = findViewById(R.id.webview);
    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    webSettings.setBuiltInZoomControls(true);
    webSettings.setDisplayZoomControls(false);
    webSettings.setLoadWithOverviewMode(true);
    webSettings.setUseWideViewPort(true);
    myWebView.addJavascriptInterface(new WebAppInterface(this), "Android");
    myWebView.setWebChromeClient(new WebChromeClient());
    myWebView.setWebViewClient(new WebViewClient() {
        @Override
        public void onPageFinished(WebView view, String url)
        {
            if (swipeLayout.isRefreshing()) {
                swipeLayout.setRefreshing(false);
            }
            super.onPageFinished(view, url);
        }

        @Override
        public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
            myWebView.loadUrl("file:///android_asset/errorPage.html");
        }

        @Override
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            Log.i("mooverApp", "Host: "+url);
            if (Uri.parse(url).toString().contains("eupdates")) {
                // This is my web site, so do not override; let my WebView load the page
                return false;
            }
            // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs
            Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
            startActivity(intent);
            return true;
        }
    });
    myWebView.setBackgroundColor(getResources().getColor(R.color.colorBlack));
    myWebView.loadUrl(URL_FIRST_PART + URL_SECOND_PART + "main.php?targ=postImages" +  QuickstartPreferences.lastItemForQueryString);
    swipeLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
        @Override
        public void onRefresh() {
            myWebView.loadUrl(URL_FIRST_PART + URL_SECOND_PART + "main.php?targ=postImages" +  QuickstartPreferences.lastItemForQueryString);
        }
    });
    swipeLayout.setColorSchemeResources(
            R.color.colorPrimary,
            R.color.colorPrimary);

}

main layout
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="com.eupdates.eupdates.PicturesActivity"
    >

    <include
        layout="@layout/content_pictures"
        />

</android.support.design.widget.CoordinatorLayout>

content layout
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:context="com.eupdates.eupdates.PicturesActivity"
    tools:showIn="@layout/activity_pictures"
    >

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

        <WebView  xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/webview"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@color/colorBlack"
            />

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

</android.support.constraint.ConstraintLayout>

v21/styles
<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="android:windowDrawsSystemBarBackgrounds">true</item>
    <item name="android:statusBarColor">@android:color/transparent</item>
</style>
<style name="Theme.AppCompat.Translucent">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
    <item name="android:windowTranslucentStatus">true</item>
    <item name="android:windowTranslucentNavigation">true</item>
    <item name="android:fitsSystemWindows">false</item>
</style>

Basically the navigation bar doesn't go translucent. I've tried setting android:fitsSystemWindows true in the styles and both bars go not translucent.
I've also tried setting android:fitsSystemWindows=true and android:fitsSystemWindows=true in the root layout and it didn't work either.
I also tried top set setWebChromeClient in the webview which didn't work either.

A: METHOD 1
Add the following code in your java file.
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION); getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
Example Java File:
public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
    getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);

}
}

METHOD 2
Set the following theme in your styles.xml. Make sure to extend Activity instead of AppCompatActivity in your java file.
<style name="TranslucentStatusBar" parent="@android:style/Theme.Holo.Light.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:windowTranslucentNavigation">true</item>
        <item name="android:windowTranslucentStatus">true</item>
    </style>

OUTPUT


text:
Q: Pycharm detects python rubber instead of python test template When I run a test inside my tests folder via Idea, it always uses the Python template instead of the Python tests template. When I start all tests by selecting the tests folder, it even tries to start them as Django tests. I tried to change the template, but this it didn't help. The default test runner is set as Unittest.
So could anyone tell me how to choose Unitest as default test runner?

I'm using Pycharm 2019.2.

A: Solution was to rename the tests from xyz_test.py to test_xyz.py


text:
Q: Crystal Report won't display record if GUID column in Record Selection Formula I have a table with a GUID column and a recordId (not a guid) column. I need my report to accept a GUID as a report parameter and use it as part of the Record Selection formula to make certain the report only get the record Id's it needs.
[Linking Table] -> [Detail Containing Table]
Since the report doesn't support passing a GUID parameter directly, I was able to convert the GUID to a string and pass it in without incident. When I generate the SQL query in Crystal Designer it looks good: The WHERE clause is properly formatted and if I run the query in SQL Designer it will find all the records I need to fetch. Actually attempting to display the report fail however, it states that 0 records were found despite SQL Profiler also showing that the same SQL was fired off.
Has anyone run into this issue? Is there any way to get the Record Selection formula to not drop the records when actually displaying the report?

A: After working with SAP Support we were able to determine that there is a defect in 14.0.11. The SQL Query was being formatted correctly, but the record linking under the hood was using a different (and incorrect) linking order. Since the database results and internal schema wound up with different starting tables, Crystal discarded the results to prevent exceptions.
Going to Database Expert -> Links -> Order Links and checking the 'Link Ordering is Enforced' box forced the engine to use the same link ordering throughout the report in the proper order. Then the SQL query and internal record schema matched and we got records.


text:
Q: nginx return 301 / redirect among all 'redirect in nginx' questions I couldn't find how to redirect (using return 301 and better no ifs) using regexps.
I have a link to my website and I'd like to remove parameter a the end:
domain.com/article/some-sluggish-link/?report=1        #number at end

Regex to find this:
\?report=\d*$

For this i want 301 redirect to:
domain.com/article/some-sluggish-link/

I nginx.conf I have 3 redirections:
server {
    listen 80;
    server_name subdomain.example.com.; #just one subdomain
    }

server {
    listen 80;
    server_name  *.example.com;
    return 301 http://example.com$request_uri;
    }

server {
    listen 80;
    server_name  example.com;
    }

and it works; it redirects 301 all www., ww., aaa., and every subdomain, except 1 particular, to main domain.com
I'd appreciate any help
Cheers!
EDIT 25/03/2015
I already have "location /" in my conf file:
location / {
    uwsgi_pass unix://opt/run/ps2.sock;
    include uwsgi_params;
    }

which redirects to some django app. After applying 'if' clause it gives me infinite loop!!!
My problem is basically with SEO, meaning google indexes some certain pages (those with '?report=' parameter) that are copies of urls without this trailing parameter.
I wanted googlebot to stop indexing using robots.txt, but the problem is you can't use regexps in this file. Also I can't say which url exactly nedd to be redirected or stopped from indexing cause it happens somehow randomly...

A: I haven't tried this myself, but it should work. Add this inside your server {} block:
location / {
    if ($args !~ ^$) {
        rewrite ^ $request_uri? permanent;
    }
}

What this block actually does:
location / tells nginx to apply these directives to all requests matching root directory and subdirectories.
if ($args !~ ^$) checks if the URI contains any query parameters with regular expression.
rewrite ^ $request_uri? permanent; makes the redirect to the desired URI without any query parameters. The ? at the end of $request_uri tells nginx to strip query parameters from the redirect URL.


text:
Q: psexec bat file execution on multiple systems I have a requirement to run a particular .bat file on multiple servers.
I am currently using:

psexec -s @c:\list.txt -c c:\copy.bat /user:Domain\userName -p %PasswordVariable% -d

I am getting error such as:-
Error copying c:\copy.bat to remote system:
The file exists.
Please note that file never exists.
Am i doing anything wrong?
list.txt has multiple server names and to access say for example \server1\c$ - username password is required. Does that creating problem while copy? But i have given the username and password in psexec command itself.

A: use psexec "-c -f" or "-c -v" qualifiers

A: Check the windows\system32 directory for that file.  Usually, psexec copies the file into that path.  Use the -f option to ovwrwrite the batch file if it already exists


text:
Q: Running jar on hortonworks with HDP throws ClassNotFoundException I'm trying to run a simple map reduce program from coursera on hortonworks sandbox with HDP.
This is the program (taken from https://github.com/jz33/Coursera-Cloud-Computing-Applications-Solution-Manual/blob/master/hw2/TitleCount.java):
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.util.Tool;
import org.apache.hadoop.util.ToolRunner;

import java.io.*;
import java.util.*;
/**
* Classic "Word Count"
 */
public class TitleCount extends Configured implements Tool {
    public static void main(String[] args) throws Exception {
       int res = ToolRunner.run(new Configuration(), new TitleCount(), args);
    System.exit(res);
}

@Override
public int run(String[] args) throws Exception {
    Job job = Job.getInstance(this.getConf(), "Title Count");
    job.setOutputKeyClass(Text.class);
    job.setOutputValueClass(IntWritable.class);

    job.setMapOutputKeyClass(Text.class);
    job.setMapOutputValueClass(IntWritable.class);

    job.setMapperClass(TitleCountMap.class);
    job.setReducerClass(TitleCountReduce.class);

    FileInputFormat.setInputPaths(job, new Path(args[0]));
    FileOutputFormat.setOutputPath(job, new Path(args[1]));

    job.setJarByClass(TitleCount.class);
    return job.waitForCompletion(true) ? 0 : 1;
}

public static String readHDFSFile(String path, Configuration conf) throws IOException{
    Path pt=new Path(path);
    FileSystem fs = FileSystem.get(pt.toUri(), conf);
    FSDataInputStream file = fs.open(pt);
    BufferedReader buffIn=new BufferedReader(new InputStreamReader(file));

    StringBuilder everything = new StringBuilder();
    String line;
    while( (line = buffIn.readLine()) != null) {
        everything.append(line);
        everything.append("\n");
    }
    return everything.toString();
}

public static class TitleCountMap extends Mapper<Object, Text, Text, IntWritable> {
    Set<String> stopWords = new HashSet<String>();
    String delimiters;

    @Override
    protected void setup(Context context) throws IOException,InterruptedException {

        Configuration conf = context.getConfiguration();

        String delimitersPath = conf.get("delimiters");
        delimiters = readHDFSFile(delimitersPath, conf);

        String stopWordsPath = conf.get("stopwords");
        List<String> stopWordsList = Arrays.asList(readHDFSFile(stopWordsPath, conf).split("\n"));
        for(String e : stopWordsList){
            stopWords.add(e);
        }
    }

    @Override
    public void map(Object key, Text value, Context context) throws IOException, InterruptedException {
        StringTokenizer stk = new StringTokenizer(value.toString(),delimiters);
        while(stk.hasMoreTokens()){
            String e = stk.nextToken().trim().toLowerCase();
            if(stopWords.contains(e) == false){
                context.write(new Text(e),new IntWritable(1));
            }
        }
    }
}

public static class TitleCountReduce extends Reducer<Text, IntWritable, Text, IntWritable> {
    @Override
    public void reduce(Text key, Iterable<IntWritable> values, Context context) throws IOException, InterruptedException {
        int sum = 0;
        for(IntWritable e : values){
            sum += e.get();
        }
        context.write(key, new IntWritable(sum));
    }
   }
 }

This is how I run it:

*

*git clone https://github.com/xldrx/cloudapp-mp2.git

*cd cloudapp-mp2

*sudo -u hdfs bash start.sh

*cp /media/sharedFolder/TitleCount.java .

*mkdir build

*export HADOOP_CLASSPATH=$JAVA_HOME/lib/tools.jar

*hadoop com.sun.tools.javac.Main TitleCount.java -d build

*jar -cvf TitleCount.jar -C build/ ./

*sudo -u hdfs hadoop fs -rm -r /mp2/A-output
After that I have the build folder with the .class files (TitleCount.class, TitleCount$TitleCountMap.class, TitleCount$TitleCountReduce.class)
and the current folder - cloud-mp2, with the TitleCount.jar file.

*sudo -u hdfs hadoop jar TitleCount.jar TitleCount -D stopwords=/mp2/misc/stopwords.txt -D delimiters=/mp2/misc/delimiters.txt /mp2/titles /mp2/A-output
This is the error I'm getting:

Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class TitleCount$TitleCountReduce not found

Full trace:
000_0, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class Title
Count$TitleCountReduce not found
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195
)
        at org.apache.hadoop.mapreduce.task.JobContextImpl.getReducerClass(JobCo
ntextImpl.java:210)
        at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:611
)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma
tion.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class TitleCount$TitleCountReduce n
ot found
        at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.jav
a:2101)
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193
)
        ... 8 more

15/12/30 12:46:45 INFO mapreduce.Job: Task Id : attempt_1451479269826_0001_r_000
000_1, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class Title
Count$TitleCountReduce not found
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195
)
        at org.apache.hadoop.mapreduce.task.JobContextImpl.getReducerClass(JobCo
ntextImpl.java:210)
        at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:611
)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma
tion.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class TitleCount$TitleCountReduce n
ot found
        at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.jav
a:2101)
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193
)
        ... 8 more

15/12/30 12:46:57 INFO mapreduce.Job: Task Id : attempt_1451479269826_0001_r_000
000_2, Status : FAILED
Error: java.lang.RuntimeException: java.lang.ClassNotFoundException: Class Title
Count$TitleCountReduce not found
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2195
)
        at org.apache.hadoop.mapreduce.task.JobContextImpl.getReducerClass(JobCo
ntextImpl.java:210)
        at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:611
)
        at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:389)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:164)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:415)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInforma
tion.java:1657)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:158)
Caused by: java.lang.ClassNotFoundException: Class TitleCount$TitleCountReduce n
ot found
        at org.apache.hadoop.conf.Configuration.getClassByName(Configuration.jav
a:2101)
        at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:2193
)
        ... 8 more

15/12/30 12:47:05 INFO mapreduce.Job:  map 0% reduce 100%
15/12/30 12:47:06 INFO mapreduce.Job: Job job_1451479269826_0001 failed with sta
te FAILED due to: Task failed task_1451479269826_0001_r_000000
Job failed as tasks failed. failedMaps:0 failedReduces:1

15/12/30 12:47:07 INFO mapreduce.Job: Counters: 7
        Job Counters
                Failed reduce tasks=4
                Launched reduce tasks=4
                Total time spent by all maps in occupied slots (ms)=0
                Total time spent by all reduces in occupied slots (ms)=32247
                Total time spent by all reduce tasks (ms)=32247
                Total vcore-seconds taken by all reduce tasks=32247
                Total megabyte-seconds taken by all reduce tasks=8061750

A: The problem was that I used sudo -u hdfs instead of using the root user.
I had to add the /user/root folder :
sudo -u hdfs hadoop fs -mkdir /user/root

and give permissions to /user/root and /mp2:
sudo -u hdfs hadoop fs -chown root:root /user/root
sudo -u hdfs hadoop fs -chown root:root /mp2
sudo -u hdfs hadoop fs -chown root:root /mp2/*


text:
Q: How to find a specific tag in XML using Javascript I want to find a specific tag in XML using javascript, for example: I want to find a tag which name is "table" and that tag can be at any place in the XML
XML is:
<chater>
    <info>

        ........

    </info>
    <contetnt>

        ........

    </contetnt>
</chater>

anybody suggest any idea for this
Thanks

A: Something like this maybe:
function loadExample(table)
{
    $.ajax({
        type: "GET",
        url: 'data/example.xml',
        dataType: "xml",
        success: function (xml) { parseExampleXml(xml, table); }
    });
}

function parseExampleXml(xml, lang)
{
    var $xml = $(xml),
        name = $xml.find('name[table="' + table+ '"]').text(),
}

and don't forget to change the names of the function to your function names I just named them Example for the Example.....

A: With jQuery you can do this:
var $tableTag = $(document).find("table[name='findme']");

where "findme" is the value of the "name"-attribute.
$tableTag.get(0)

will return the acutal HTML-Tag
    $tableTag.length
will return the number of results


text:
Q: How come Python3 typing.List is a subclass of list and list is also a subclass of typing.List? I tested this simple code and find something confuses me. Run the following code in Python 3.6 and both statements returns True. Why?
import typing
print(issubclass(list, typing.List))  # print True
print(issubclass(typing.List, list))  # print True

Can someone give me some explanation on this?

A: Strictly speaking, list is not a subclass of typing.List. To see what list is actually a subclass of, you can take a look at its MRO:
>>> list.__mro__
(<class 'list'>, <class 'object'>)

On the other hand, the MRO of typing.List shows that it actually is a subclass of list, as well as of many other classes:
>>> typing.List.__mro__
(typing.List, <class 'list'>, typing.MutableSequence, <class 'collections.abc.MutableSequence'>, typing.Sequence, <class 'collections.abc.Sequence'>, typing.Reversible, <class 'collections.abc.Reversible'>, typing.Collection, <class 'collections.abc.Collection'>, <class 'collections.abc.Sized'>, typing.Iterable, <class 'collections.abc.Iterable'>, typing.Container, <class 'collections.abc.Container'>, typing.Generic, <class 'object'>)

So, why does Python say that list is a subclass of typing.List?
Well, that is the whole point of typing.List. To pretend to be a base class of list.
How is it done?
Using Abstract Base Classes. See what Python doc says about them:

ABCs introduce virtual subclasses, which are classes that don't
  inherit from a class but are still recognized by isinstance() and
  issubclass(); see the abc module documentation.

You can see from its MRO that typing.List inherits from many ABC's, which list recognizes as its base classes, e.g.:
>>> issubclass(list, collections.abc.MutableSequence)
True
>>> issubclass(list, collections.abc.Collection)
True
>>> issubclass(list, collections.abc.Container)
True


text:
Q: Lazarus TStringGrid - Color a cell Problem.
I have two TStringGrids on the same Form.
When I click on a cell (x, y) of the first Table, the background of the same cell (x, y) of the second table must turn red.
How can I do since the tables are different?
I know how to find a cell using the OnClick method on table1, but I don't know how to color a cell in table2

A: You must tell grid2 somehow which cell(s) you want highlighted. There are many ways to do this, depending on what you want to do.
If you just want the last cell clicked highlighted create a couple of form variables, say fx and fy and set them in your onclick event and refresh grid2. Then use the following OnDraw event for grid 2.
procedure TFormAdobeTest.StringGrid2DrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
  if (ACol = fx) and (ACol =fy) then
  begin
    StringGrid2.Canvas.Brush.Color := clRed;
    StringGrid2.Canvas.Rectangle( Rect );
  end
  else
  begin
    StringGrid2.Canvas.Brush.Color := clWhite;
    StringGrid2.Canvas.Rectangle( Rect );
  end;
end;

Obviously this could be extended of you want all clicked boxes recorded. Another way to do this is to instead use the objects property to tell StringGrid2 to pass this information for example by assigning StringGrid1 to the objects property (or any other object!)
an then the routine become
procedure TFormAdobeTest.StringGrid2DrawCell(Sender: TObject; ACol,
  ARow: Integer; Rect: TRect; State: TGridDrawState);
begin
  if Assigned( StringGrid2.Objects [ ACol, ARow]) then
  begin
    StringGrid2.Canvas.Brush.Color := clRed;
    StringGrid2.Canvas.Rectangle( Rect );
  end
  else
  begin
    StringGrid2.Canvas.Brush.Color := clWhite;
    StringGrid2.Canvas.Rectangle( Rect );
  end;
end;

These are just a starting point of course.

A: Thanks, I have achieved part of my purpose with this:
procedure TForm1.StringGrid1Click(Sender: TObject);
begin
  if (StringGrid1.col > 0) and (StringGrid1.row > 0) then
  begin
    cc := StringGrid1.col;
    rr := StringGrid1.row;
  end
  else
  begin
    cc := -1;
    rr := -1;
  end;
  memo1.Lines.Append(cc.ToString+','+rr.ToString);
  StringGrid2.Repaint;
end;

procedure TForm1.StringGrid2DrawCell(Sender: TObject; aCol, aRow: Integer;
  aRect: TRect; aState: TGridDrawState);
begin
  if (ACol = cc) and (aRow = rr) then
  begin
    StringGrid2.Canvas.Brush.Color := clRed;
    StringGrid2.Canvas.Rectangle(aRect);
  end;
end;


text:
Q: PostgreSQL backend behavior upon receiving "Terminate" ('X') after "COMMIT" We run a postgres server v9.2.8, and use epgsql (erlang) as a client library. And in some cases, which we had on production but weren't able to reproduce in dev environment, we're loosing data.
A function in our application (it should be killed) allows an operator to change session parameters on a running connection. Since connection is usually always busy on production, a "SET SESSION bla-bla" query always crashes pgsql_connection process.
Before crashing, pgsql_connection sends a "Terminate" ('X') signal via pgsql_sock (a wrapper around tcp socket) to a backend. At the same time another erlang process (let's call it "worker") is waiting for a response from postgres backend using the same socket.
Now the question: is it possible that upon receiving a "Terminate" signal from a client, backend can cancel last transaction even if it has sent an "OK" on "COMMIT" statement already?
Because if it is possible, a worker will have a chance to report to the main application process about successfully written transaction while indeed the transaction has been cancelled.
Or, where can I read more details about this? Documentation says (http://www.postgresql.org/docs/9.2/static/protocol-flow.html):

For either normal or abnormal termination, any open transaction is
  rolled back, not committed. One should note however that if a frontend
  disconnects while a non-SELECT query is being processed, the backend
  will probably finish the query before noticing the disconnection. If
  the query is outside any transaction block (BEGIN ... COMMIT sequence)
  then its results might be committed before the disconnection is
  recognized.

– not a crystal clear statement.

A:
Now the question: is it possible that upon receiving a "Terminate" signal from a client, backend can cancel last transaction even if it has sent an "OK" on "COMMIT" statement already?

No. that is fundamentally impossible. If it's committed, it's committed, and there's no going back. That's what "commit" means.
The only time Pg might return success before the commit hits disk and is persistent is if you told it to by setting synchronous_commit = off.
If you're seeing anything different happening then most likely it's a result of attempting to share a single connection between multiple processes (as you establish the connection before fork()) without proper locking or other mutual exclusion to ensure that the connection is locked while a command is in-flight.
Note that the reverse isn't true, which might be what you're thinking of with the quoted documentation passage. A transaction can get committed without returning a successful OK to the client if the client goes away (crashes, loses connection, etc) after issuing the commit command.

What the application is doing, where it sends out-of-sync messages on the wire protocol, is totally broken. It's guaranteed to cause unpredictable problems. The protocol is somewhat robust, so you're not likely to get things like an unintended commit, but you're very likely to get transactions aborted or whole sessions disconnected suddenly.

If you need to be able to roll back/abort committed transactions, then your application design has problems. You're not really ready to commit when you say COMMIT. You would have the same problem if the app process crashed or the whole server crashed between Pg committing the transaction and you doing whatever you need to do.
If you cannot fix the app design to avoid this then you will have to use two-phase transactions, either directly using PREPARE TRANSACTION then COMMIT PREPARED, or indirectly via the XA API. This has significant costs in performance and management overhead, but it's the only option if you need to do special work after database commit but before you're really "done".
The docs you quote are talking about the case where the app has sent a COMMIT but then disconnects before receiving the backend's acknowledgement of the commit. Because TCP/IP is buffered there's no guarantee the COMMIT got flushed to Pg, and if it did there's no guarantee it doesn't accompany the RST that terminates the connection. So in this specific case it's somewhat uncertain whether the transaction will commit or not. An application for which this is a problem would need to have a way of checking whether the last unit of work committed or not when it resumes work, or if it can't do that use two-phase transactions. The docs you quote say nothing about being able to cancel a commit after it's completed, because you can't. Ever.
Assuming that the app has to do some kind of extra work after commit, like moving a file or sending an email or doing work on another data store, then you're probably going to need two-phase transactions. Even then you're vulnerable to issues unless all parties in the distributed transaction support two phase commit, because your "other bit" could get done then your worker or server could crash before the confirmation of its completion is sent to the database to finish phase II of the commit.
You can keep your own two phase commit log of sorts in the DB instead of using true 2PC:

*

*Do the main database work and write a record to the work log table that says "I've done the work in the database and I'm about to do the next part".

*Do the next part; and

*Update the work log to say the next part is done.
... but this has the same problem, where a crash between parts 2 and 3 causes the app to forget that it did part 2 and repeat it on startup. If you can't live with that, you need to find a way to make part 2 commit completion verifiable, so you can tell if it's done or not, or find a way to make it capable of doing 2-phase commit.
To learn more about this topic, read about XA, distributed transactions, two-phase commit, etc.


text:
Q: How to enable 256+ cores in Yakkety Server

Yakkety Server uses generic kernel flavor. It is 4.8.0 Linux kernel.
While running on Intel KNL processor I cannot see cores above 256.
user@ubuntu02:~$ grep processor /proc/cpuinfo | wc -l
256

dmidecode shows real number of cores
user@ubuntu02:~$ sudo dmidecode -t 4
[sudo] password for user:
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x001B, DMI type 4, 48 bytes
Processor Information
    Socket Designation: CPU0
    Type: Central Processor
    Family: Xeon
    Manufacturer: Intel(R) Corporation
    ID: 71 06 05 00 FF FB EB BF
    Signature: Type 0, Family 6, Model 87, Stepping 1
    Flags:
            FPU (Floating-point unit on-chip)
            VME (Virtual mode extension)
            DE (Debugging extension)
            PSE (Page size extension)
            TSC (Time stamp counter)
            MSR (Model specific registers)
            PAE (Physical address extension)
            MCE (Machine check exception)
            CX8 (CMPXCHG8 instruction supported)
            APIC (On-chip APIC hardware supported)
            SEP (Fast system call)
            MTRR (Memory type range registers)
            PGE (Page global enable)
            MCA (Machine check architecture)
            CMOV (Conditional move instruction supported)
            PAT (Page attribute table)
            PSE-36 (36-bit page size extension)
            CLFSH (CLFLUSH instruction supported)
            DS (Debug store)
            ACPI (ACPI supported)
            MMX (MMX technology supported)
            FXSR (FXSAVE and FXSTOR instructions supported)
            SSE (Streaming SIMD extensions)
            SSE2 (Streaming SIMD extensions 2)
            SS (Self-snoop)
            HTT (Multi-threading)
            TM (Thermal monitor supported)
            PBE (Pending break enabled)
    Version: Intel(R) Xeon Phi(TM) Processor 000A @ 1.40GHz
    Voltage: 0.9 V
    External Clock: 100 MHz
    Max Speed: 4000 MHz
    Current Speed: 1400 MHz
    Status: Populated, Enabled
    Upgrade: <OUT OF SPEC>
    L1 Cache Handle: 0x0019
    L2 Cache Handle: 0x001A
    L3 Cache Handle: Not Provided
    Serial Number: To Be Filled By O.E.M.
    Asset Tag: To Be Filled By O.E.M.
    Part Number: To Be Filled By O.E.M.
    Core Count: 68
    Core Enabled: 68
    Thread Count: 272
    Characteristics:
            64-bit capable
            Multi-Core
            Hardware Thread
            Execute Protection
            Power/Performance Control

Is it possible to enable all 272 cores without recompiling kernel?
user@ubuntu02:~$ grep CONFIG_NR_CPUS /boot/config-4.8.0-32-generic
CONFIG_NR_CPUS=256

I think Ubuntu Server kernel flavor should be ready for it.

A: The number of cpus has recently been increases to 512 in the Yakkety kernel, and will land in kernel release Ubuntu-4.8.0-34.35:
commit 4cc43dc6b3bf9ea5b9ed6d91af47dbe137a71cd9
Author: Luis Henriques <luis.henriques@canonical.com>
Date:   Thu Dec 8 10:36:14 2016 +0000

    UBUNTU: [Config] Increase the NR_CPUS to 512 for amd64 to support systems with a large number of cores.

    BugLink: http://bugs.launchpad.net/bugs/1579205

    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    Acked-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Tim Gardner <tim.gardner@canonical.com>

So if you are not running that kernel, update and you should get this fix.


text:
Q: Error from tshark and python I am trying to execute this simple tshark command through python but I am not able to succeed and I don't understand the error
OS : Windows 7
Python 3.3
Code is
from subprocess import Popen

f = open("C:\\folder2\\test.txt","w")
Popen(["tshark" ,"-r","C:\\folder2\\fvido.pcap","-qz", "io,stat,0"],stdout=f)

and the error I get is
Traceback (most recent call last):
  File "C:/Users/pc/Google Drive/Python/tshark1.py", line 6, in <module>
    Popen(["tshark" ,"-r","C:\\folder2\\fvido.pcap","-qz", "io,stat,0"],stdout=f)
  File "C:\Python33\lib\subprocess.py", line 820, in __init__
    restore_signals, start_new_session)
  File "C:\Python33\lib\subprocess.py", line 1112, in _execute_child
    raise WindowsError(*e.args)
FileNotFoundError: [WinError 2] The system cannot find the file specified


text:
Q: Windows 10 network drive permissions problems I have thoroughly searched for answers on this site and nothing seems to be working.
I have a Surface Pro 3 / Windows 10 connected to a closed network (i.e. no internet access by design) via wifi on a static IP IPv4 address.  The network has 11 machines on it (Windows XP, Windows 7, Windows Vista, and Windows 8.1), all on the same work group "WORKGROUP" with the same network adapter settings as the surface (of course, different static IP addresses).
Also on this network is a Windows Server 2003 machine with a shared drive.  The server has no firewall/virus scanning, and the drive allows full permissions for all users.  All of the computers on the network can modify, create, or delete files from this drive, except for the Windows 10 surface.  When trying to create or delete files with the surface, I get a "Destination Folder Access Denied" message.
On the Windows 10 surface, I can see the drive and all of the files on it, but I cannot create/delete any files on the drive.  This is a problem because I cannot open any databases, since I can't create the lock file.  Again, this is only a problem on the surface none of the other machines.
Here are some things I've tried:

*

*Mapping the network drive Dropping / re-joining WORKGROUP

*Disabling UAC

*Disabling Windows Firewall

*Changing the network to a "private network"

*Designating the network as a "Home Group"

*Downloading all windows updates

*Turned on network discovery / file sharing for all network types (public, private, home group, work, etc)

*Right clicking the mapped network drive from the surface, applying full control permissions for "users"

When trying this last item, I get an error "The handle is invalid"
What could be causing this problem?  Why would this only happen on the Windows 10 surface, not the Windows 8.1 surface, the windows 7 machines, the windows vista machines, or the windows xp machines?

A: I would additionally check that your stored Windows credentials (Credential Manager) does not have stale authentication to your network location.
I would also delete all network mappings from both (a) a command prompt (using NET USE /DELETE even if it's not mapped to a drive letter) as well as (b) an elevated command prompt, since both user contexts will have separate stored network mappings.


text:
Q: padding not working I want to add some space above the heading. I have added:
padding-top: 200px !important;

Appriciate your help to solve this issue.
Also I wonder how can I add spaces (padding top/bottom) to h1,2,3,4,5 & 6 tags so when ever I apply heading to a text, the padding should be applied automatically instead of adding additional class or style. I don't want to use line-height?
Note: I'm using Elementor Pro + Hello Theme.
Thanks

A: <span> tags is a inline element and inline elements don't react well with padding.
You can target the h1 - h6 as you said, but if you want to target the <span> you will need to add display: inline-block; as well for it to work with padding.
Also, this has nothing to do with WordPress as this is a pure CSS question, for future questions that don't involve WP use stackoverflow.


text:
Q: Where to use Mono/Flux? I'm kind of forced to switch to reactive programming (and in a short time frame), using WebFlux and I'm having a really hard time understanding it. Maybe because the lack of examples or because I never did functional programming.
Anyways, my question is where to use Mono/Flux and where can I work with normal objects? E.g. my controller is waiting for a @Valid User object, should that be @Valid Mono or something like Mono<@Valid User>? If let's say it was just a User object, I pass it to my service layer, and I want to encode the password before saving it to the reactive MongoDb, should I write:
User.setPassword(...);
return reactiveMongoDbRepository.save(user); //returns Mono<User> which is returned by the Controller to the View

Or it should be something like
return Mono.just(user).map.flatmap(setPasswordSomewhereInThisHardToFollowChain).then.whatever.doOnSuccess(reactiveMongoDbRepository::save);

In other words, am I forced to use this pipeline thing EVERYWHERE to maintain reactiveness or doing some steps the imperative way, like unwrapping the object, working on it, and wrapping it back is OK?
I know my question seems to be silly but I don't have the big picture at all, reading books about it didn't really help yet, please be gentle on me. :)

A: Use pipelining when you require sequential, asynchronous and lazy execution. In all other cases (when you are using a non-blocking code) you're free to choose any approach and it's generally better to use the simplest one.
Sequential non-blocking code can be organised in functions that you can integrate with reactive pipeline using map/filter/doOnNext/... components.
For example, consider the following Order price calculation code.
class PriceCalculator {

  private final Map<ProductCode, Price> prices;

  PriceCalculator(Map<ProductCode, Price> prices) {
    this.prices = prices;
  }

  PricedOrder calculatePrice(Order order) { // doesn't deal with Mono/Flux stuff
    Double price = order.orderLines.stream()
      .map(orderLine -> prices.get(orderLine.productCode))
      .map(Price::doubleValue)
      .sum();
    return new PricedOrder(order, price);
  }
}

class PricingController {

  public Mono<PricedOrder> getPricedOrder(ServerRequest request) {
    OrderId orderId = new OrderId(request.pathVariable("orderId"));
    Mono<Order> order = orderRepository.get(orderId);
    return order.map(priceCalculator::calculatePrice)
  }
}


text:
Q: Can setup ssh Keys to work from within a go program for git commands? I can't run git pull --tags from Go's exec.Command as I do not have access rights..
Code...
func SimpleCommand(start string, args ...string) (result string) {
    cmd := exec.Command(start, args...)

    //cmd.Dir = dir
    bytes, err := cmd.Output()
    if err != nil {
        fmt.Print(err)
    }
    s := string(bytes)

    return s

}
func main() {
    SimpleCommand("git", "pull", "--tags")

}

Normally when I run git commands I am doing it manually in Git-bash  and I have the .bashrc file setup as follows...
 eval $(ssh-agent -s)
 ssh-add c:/sshkeys/id_rsa
 ssh-add c:/sshkeys/github

This works fine but I as I am running the git command from with in a Go program It obviously does not run these commands.  So I get the following Error...

git@gitlab.com: Permission denied (publickey). fatal: Could not read
  from remote repository.
Please make sure you have the correct access rights and the repository
  exists.

I have tried running these command individually using the SimpleCommand function however it cannot find the eval command (it does not appear to be a an executable),
I also feel there should be a better way of doing this is there not way i can have the go program manage the ssh keys in such a way it will be able to use them the run the git commands.

A: Was unaware for the core.sshCommand, this now works for me.
Setup The current repo to use an ssh key in a specific location...
Setup function...
func SetupGitSsh() {
    sshKeysDir := "c:/sshkeys/id_rsa"
    sshloc := fmt.Sprintf("ssh -i %s", sshKeysDir)
    DirCommand("git", "c:\\DEV\\outsideprj", "config", "core.sshCommand", sshloc)
}

DirCommand Function...
func DirCommand(app string, dir string, args ...string) {

    cmd := exec.Command(app, args...)
    cmd.Dir = dir
    stdout, err := cmd.Output()

    if err != nil {
        fmt.Println(err.Error())
        return
    }

    fmt.Print(string(stdout))
}


text:
Q: How to get multiple joined data in one Laravel DB Function Update 3 (Solved but not optimal)
There is a way to hack the result:
public function loadRouteData($day, $week_nr, $year){
        $route_data = Facturatie_Invoice::with('customer', 'invoice_lines')
        ->whereHas('route_manager', function ($query) use ($week_nr, $year) {
            $query->where(['week_nr' => $week_nr,
                           'year' => $year]);
        })
        ->where('day', $day)
        ->get();

        foreach($route_data as $rd){
            for($i = 0; $i < count($rd->invoice_lines); $i++){
                $product = DB::table('facturatie_product')->where('id', $rd->invoice_lines[$i]->product_id)->first();
                $rd->invoice_lines[$i]->product = $product;
            }
        }
        return $route_data;
    }

I don't think this is the most optimal way so if any of you know a better method please let me know.
For details and things I tried see below.

I have the following ERD:

Now what i want to do is get Facturatie_Route_Manager with:
Facturatie_Invoice
Facturatie_Customer
Facturatie_Invoice_Line
Facturatie_Product

Now when i try the following:
public function loadRouteData($day, $week_nr, $year){
    $route_data = DB::table('facturatie_route_manager')
    ->join('facturatie_invoice', 'facturatie_route_manager.invoice_id','=','facturatie_invoice.id')
    ->join('facturatie_customer', 'facturatie_invoice.customer_id','=','facturatie_customer.id')
    ->where(['facturatie_invoice.day' => $day,
             'facturatie_route_manager.week_nr' => $week_nr,
             'facturatie_route_manager.year' => $year])
    ->get();
    return $route_data;
}

I get duplicate records for route manager because each new invoice line don't get added to the same record but makes a new record instead. Also because i don't get the desired result i'm not including Facturatie_Product here yet.
Any ideas? I'm using Laravel 5+.
I've tried using models from Facturatie_Route_Manager but can't seem to refer Facturatie_Invoice id to Facturatie_Invoice_Line invoice_id starting at model Facturatie_Route_Manager. I would prefer not using joins if possible.

Update 1
public function loadRouteData($day, $week_nr, $year){
        $route_data = Facturatie_Route_Manager::whereHas('invoice', function ($query) use ($day) {
            $query->where('day', $day);
        })
        ->where(['week_nr' => $week_nr,
                 'year' => $year])
        ->get();
        return $route_data;
    }

Now still need link between facturatie_invoice and facturatie_invoice_line and facturatie_invoice_line and facturatie_product.
Model Facturatie_Route_Manager
class Facturatie_Route_Manager extends Model
{
    protected $table = 'facturatie_route_manager';

    public function invoice(){
        return $this->hasOne('App\Facturatie_Invoice', 'id', 'invoice_id');
    }
}

Update 2
Maybe it's easier to look from model Facturatie_Invoice because it has a one to one relationship with Facturatie_Route_Manager. This code is getting close to the end result:
public function loadRouteData($day, $week_nr, $year){
        $route_data = Facturatie_Invoice::with('customer', 'invoice_lines')
        ->whereHas('route_manager', function ($query) use ($week_nr, $year) {
            $query->where(['week_nr' => $week_nr,
                           'year' => $year]);
        })
        ->where('day', $day)
        ->get();
        return $route_data;
    }

Only still need a link between Facturatie_Invoice_Line - product_id and Facturatie_Product - id
Model Facturatie_Invoice
class Facturatie_Invoice extends Model
{
    protected $table = 'facturatie_invoice';

    public function customer()
    {
        return $this->hasOne('App\Facturatie_Customer', 'id', 'customer_id');
    }

    public function invoice_lines()
    {
        return $this->hasMany('App\Facturatie_Invoice_Line', 'invoice_id', 'id');
    }

    public function route_manager()
    {
        return $this->hasOne('App\Facturatie_Route_Manager', 'invoice_id', 'id');
    }
}


text:
Q: executing az acr hangs and never finish Describe the error
Running az acr within GitHub actions never finishes
To Reproduce
Run command inside the AZURE CLI container within Github Runner
az acr repository show-manifests --verbose --debug --name ACR-NAME --repository REPO-NAME --debug

Expected behavior
Show manifests of a repository in an Azure Container Registry.
Output i got
DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): acrname.azurecr.io:443


text:
Q: Update value only if Null php/mysql Thanks for checking out my question. I am trying to only update a value in my database if that field is null (so existing users won't be overwritten if someone tries to signup for a spot that is all ready taken and an error message will be output). I have listed below 2 of the most recent scripts I have tried. The first script works for updating the database if the select statement is not there but will overwrite users if entered for the same day and time. Thanks everybody!
$sql = ("SELECT `player1` FROM `users` where id = '$id' and Times = '$time'");

$result = $conn->query($sql);

if ($result->fetch_assoc === NULL) {
$update_player = ("UPDATE users SET player1 = '$name' where id = '$id' AND Times =   '$time'")

if($update_player){
echo "Date for $name inserted successfully!";
}
}

else {
  echo 'That spot is all ready taken!';
}

//2nd script

$query=mysql_query("UPDATE users SET
player1 = isNULL (player1, $name)
where id = '$id' AND Times = '$time'" );

if($query){

 echo "Data for $name inserted successfully!";
}

else {
 echo 'That spot is all ready taken!';
}

A: The following code should do the trick:
$query=mysql_query("UPDATE users SET
player1='$name'
where id = '$id' AND Times = '$time' AND player1 IS NULL" );

if(mysql_affected_rows() == 1){
  echo "Data for $name inserted successfully!";
}
else {
  echo 'That spot is all ready taken!';
}

Note that you should use pdo or mysqli functions instead.

A: Try This.
 while($row = $result->fetch_assoc) {
    if($row['player1'] == NULL){
      $update_player = ("UPDATE users SET player1 = '$name' where id = '$id' AND Times =   '$time'")
    }


text:
Q: PHPMailer SMTP via Mailgun is Stripping HTML for Gmail, Yahoo and others I'm using PHPMailer via Mailgun (site is hosted via shared hosting on Hostgator.com) to send a validation email for users when they register. As the title, says, my HTML is being stripped in many of the common email providers. Any help with this issue would be MUCH appreciated—it's driving me nuts.
The email output (note the link is not there):
Thank you for registering with us. Please click the link below to verify your email address. Once verified, you will be able to login! Click this link to verify your email.
Thank you!
define('VALIDATE_EMAIL_ENDPOINT', 'https://example.com/validate');

if(sendEmail($email, $user['name'], 'Email Verification', 'Thank you for registering with us. Please click the link below to verify your email address. Once verified, you will be able to login!Click this link to verify your email

Thank you!')) {
                                return 0;
                            }

If it matters, this is urlSafeEncode's function:
function urlSafeEncode($m) {
        return rtrim(strtr(base64_encode($m), '+/', '-_'), '=');
    }

The sendEmail function:
function sendEmail($to, $toName, $subj, $msg) { //function that sends email via PHPmailer

        $mail = new PHPMailer(true);
        try {
        //Server settings
        //echo $to . $toName . $subj . $msg;
        $mail->isSMTP();
        $mail->Host       = SMTP_HOST;
        $mail->SMTPAuth   = true;
        $mail->Username   = SMTP_USERNAME;
        $mail->Password   = SMTP_PASSWORD;
        //$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
        $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; //STARTTLS is for port 587
        $mail->Port       = SMTP_PORT;

        //Recipients
        $mail->setFrom(SMTP_FROM, SMTP_FROM_NAME);
        $mail->addAddress($to, $toName);

        // Content
        $mail->isHTML(true);
        $mail->Subject = $subj;
        $mail->Body    = $msg;
        $mail->SMTPDebug = 0;

        $mail->send();
        return true;
        }
        catch(Exception $e) {
            //echo '

Caught exception: ',  $e->getMessage(), "\n";
            return false;
        }
    }

The original email appears to PASS SPF and DKIM:

EDIT:
This is the output in console from SMTPDebug = 2:
'2022-01-27 11:24:57 SERVER -> CLIENT: 220 Mailgun Influx ready\n2022-01-27 11:24:57 CLIENT -> SERVER: EHLO example.com\n2022-01-27 11:24:57 SERVER -> CLIENT: 250-smtp-out-n01.prod.us-east-1.postgun.com250-AUTH PLAIN LOGIN250-SIZE 52428800250-8BITMIME250-SMTPUTF8250-PIPELINING250 STARTTLS\n2022-01-27 11:24:57 CLIENT -> SERVER: STARTTLS\n2022-01-27 11:24:57 SERVER -> CLIENT: 220 Go ahead\n2022-01-27 11:24:57 CLIENT -> SERVER: EHLO example.com\n2022-01-27 11:24:57 SERVER -> CLIENT: 250-smtp-out-n01.prod.us-east-1.postgun.com250-AUTH PLAIN LOGIN250-SIZE 52428800250-8BITMIME250-SMTPUTF8250 PIPELINING\n2022-01-27 11:24:57 CLIENT -> SERVER: AUTH LOGIN\n2022-01-27 11:24:57 SERVER -> CLIENT: 334 VXNlcm5hbWU6\n2022-01-27 11:24:57 CLIENT -> SERVER: [credentials hidden]\n2022-01-27 11:24:57 SERVER -> CLIENT: 334 UGFzc3dvcmQ6\n2022-01-27 11:24:57 CLIENT -> SERVER: [credentials hidden]\n2022-01-27 11:24:58 SERVER -> CLIENT: 235 Authentication successful\n2022-01-27 11:24:58 CLIENT -> SERVER: MAIL FROM:<mail@ example.com>\n2022-01-27 11:24:58 SERVER -> CLIENT: 250 Sender address accepted\n2022-01-27 11:24:58 CLIENT -> SERVER: RCPT TO:< example @gmail.com>\n2022-01-27 11:24:58 SERVER -> CLIENT: 250 Recipient address accepted\n2022-01-27 11:24:58 CLIENT -> SERVER: DATA\n2022-01-27 11:24:58 SERVER -> CLIENT: 354 Continue\n2022-01-27 11:24:58 CLIENT -> SERVER: Date: Thu, 27 Jan 2022 11:24:57 +0000\n2022-01-27 11:24:58 CLIENT -> SERVER: To: Fred Merc < example @gmail.com>\n2022-01-27 11:24:58 CLIENT -> SERVER: From: Support <mail@ example.com>\n2022-01-27 11:24:58 CLIENT -> SERVER: Subject: Email Verification\n2022-01-27 11:24:58 CLIENT -> SERVER: Message-ID: <LxG6t46MyrcQEBfaez8ZSrY0VdYEXWkA1raYD9yIAH4@example.com>\n2022-01-27 11:24:58 CLIENT -> SERVER: X-Mailer: PHPMailer 6.2.0 (https://github.com/PHPMailer/PHPMailer)\n2022-01-27 11:24:58 CLIENT -> SERVER: MIME-Version: 1.0\n2022-01-27 11:24:58 CLIENT -> SERVER: Content-Type: text/html; charset=iso-8859-1\n2022-01-27 11:24:58 CLIENT -> SERVER: \n2022-01-27 11:24:58 CLIENT -> SERVER: Thank you for registering with us! Please click the link below to verify your email address. Once verified, you will be able to login!Click this link to verify your email

Thank you!\n2022-01-27 11:24:58 CLIENT -> SERVER: \n2022-01-27 11:24:58 CLIENT -> SERVER: .\n2022-01-27 11:24:58 SERVER -> CLIENT: 250 Great success\n2022-01-27 11:24:58 CLIENT -> SERVER: QUIT\n2022-01-27 11:24:58 SERVER -> CLIENT: 221 See you later. Yours truly, Mailgun\n[0]'