text:
Q: Call an URL and send parameters as POST using PHP I know this is maybe a very dummy question, but I'm facing a requirement with PHP, I've made some very simple things with it, but now I really need help.
I have this scenario:
I invoke a Java Rest WS using the following url:
http://192.168.3.41:8021/com.search.ws.module.ModuleSearch/getResults/jsonp?xmlQuery=%3C?xml%20version%3D'1.0'%20encoding%3D'UTF-8'?%3E%3Cquery%20ids%3D%2216535%22%3E%3CmatchWord%3Ehave%3C/matchWord%3E%3CfullText%3E%3C![CDATA[]]%3E%3C/fullText%3E%3CquotedText%3E%3C!...

But for this I had to use a Java util class to replace some special chars in the xml parameter, because the original xml is something like:
<?xml version='1.0' encoding='UTF-8'?><query ids="16914"><matchWord>avoir</matchWord><fullText><![CDATA[]]></fullText><quotedText><![CDATA[]]></quotedText><sensitivity></sensitivity><operator>AND</operator><offsetCooc>0</offsetCooc><cooc></cooc><collection>0</collection><searchOn>all</searchOn><nbResultDisplay>10</nbResultDisplay><nbResultatsParAspect>...

Now, I've been asked to create a PHP page in which I can set the XML as input and request it to the REST WS using a submit button. I made an approach but not seems to be working, here I paste my code:
<?php
  if($_POST['btnSubmit'] == "Submit")
  {
    $crudXmlQuery = $_POST['inputXml'];
    echo $crudXmlQuery;
    echo "=================================================";
    $xml = str_replace("%", "%25", $crudXmlQuery);
    $xml = str_replace("&", "%26", $crudXmlQuery);
    $xml = str_replace("=", "%3D", $crudXmlQuery);
    echo $xml;
    //$ch = curl_init($url);
    //curl_setopt ($ch, CURLOPT_POST, 1);
    //curl_setopt ($ch, CURLOPT_POSTFIELDS,'inputXml='.$xml);
    //$info = curl_exec ($ch);
    //curl_close ($ch);
  }
?>
<form action="sampleIndex.php" method="post">
    Please insert your XML Query
    <input type='text' name='inputXml' value='<?=$crudXmlQuery?>'/>

    <input type='submit' name='btnSubmit' value='Submit' />
</form>

I commented the part of the cURL since it was giving me some problems, I'm not sure how to handle this requirement yet, if somebody could help me please, I will really appreciate it. Thanks in advance. Best regards.

A: curl_setopt ($ch, CURLOPT_POSTFIELDS,'inputXml='.$xml);

this is not going to work, you shoud url encode $xml first. (using urlencode function)
The other part  - not sure what exactly not working there :) But I do not see you taking the value of input field anywhere in your code:
$crudXmlQuery = $_POST['inputXml'];


text:
Q: Spree install error "spree (>=0) x86-mingw32 depends on thor (=0.15.4)" Installing spree on rails gives multiple errors for dependence on 'thor' although I have both versions in my gem list.

#

Bundler could not find compatible versions for gem "thor":
  In Gemfile:
    spree (>=0) x86-mingw32 depends on
      thor (= 0.14.6) x86-mingw32
sass-rails (~> 3.23) x86-mingw32 depends on
  thor (= 0.15.4)

#

NOTE: My versions used are:
rails 3.2.6
spree 1.1.2
ruby 1.9.3p194

A: Although you're asking about a specific install error, I'm assuming that since it sounds like you're setting up a development environment that the following could be helpful:
Setting Spree up on Windows can be a little bit of a pain, and using Vagrant and VirtualBox is a good way around the issues.  This Vagrant setup and bootstrap script installs more recent versions of Rails, Ruby and Spree, but you should be able to modify it to your taste (focus on bootstrap.sh):
https://github.com/nurelm/spree_vagrant

redpajama_set_name: RedPajamaStackExchange


text:
Q: When is the following process stationary? Let $Y$ be a random variable with mean zero and variance $\sigma^2$, and let $c$ be a constant. Let $$X_t = Y\cos(ct)$$
When is the process $X_t$ stationary?
I find $E(X_t) = \cos(ct)E(Y) = 0$
$E(X_tX_{t+\tau}) = E(Y^2\cos(ct)\cos(ct+c\tau)) = \cos(ct)\cos(ct+c\tau)E(Y^2)$
Note that $Var(Y) = E(Y^2)-E(Y)^2 \implies E(Y^2) = Var(Y) = \sigma^2$
Then, using the sum and product formula for cosine, we get $$E(X_tX_{t+\tau})= \frac{\sigma^2}{2}(\cos(2ct+c\tau)+\cos(c\tau)) $$
Now, as I understand it, in order for this process to be stationary, we require $E(X_tX_{t+\tau})$ to be only a function of $\tau$. So is the process only stationary when $c=0$? This doesn't seem to be correct based on the proceeding questions.

A: Let us observe the situation when $\tau=0$. The expectation of $X_t^2$ should not depend on $t$ hence we should have either $\sigma=0$ or $\cos^2\left(ct\right)=1$ for all $t$. The last condition forces $c$ to be a multiple of $\pi$.
Conversely, we can check that if $\sigma=0$ or $c\in \pi\mathbb Z$ then $\left(X_t\right)_{t\in\mathbb Z}$ is weakly stationary. In the first case $X_t=0$ and in the second, $X_t=\left(-1\right)^t Y$.


text:
Q: Visualizar valores adicionandos no object FormData e remover Muitas vezes tentei debugar uma instância do objeto FormData, porém não consigo ver os valores armazenados pelo método append.
Tentei isso:
f = new FormData();

f.append('name', 'Wallace Maxters');

f.append('image', $('#file').prop('files')[0]);

// tento obter o conteúdo adicionando

f.toString() //"[object FormData]"

console.log(f['name']) // undefined

Como posso visualizar os valores que armazenei dentro de uma instância do objeto FormData? Há alguma maneira de se fazer isso?
Como faria pra remover o valor "name" adicionando no objeto do exemplo acima?

A: O formData não permite retirar informação depois dela ter sido inserida.
Se quiseres ter a certeza que tens o conteúdo certo tens de fazer um objeto à parte e depois converter em formData.
Há algumas respostas no SOen (esta ou esta) sobre isto e curiosamente a especificação da W3C aponta para novas funcionalidades no futuro... para além do .append() haverá has, delete, get, getAll e set. Vamos ver quando será implementado.


text:
Q: Webpack 5+Process is not defined triggered by stream-browserify I have to decode a CBOR encoded array using the cbor node module.
When i launch my command:
const decodedData = base45.decode(greenpassBody);
const output = pako.inflate(decodedData);
const results = cbor.decodeAllSync(output); // this line

this error is being triggered:
_stream_readable.js:529 Uncaught ReferenceError: process is not defined
    at emitReadable (_stream_readable.js:529)
    at addChunk (_stream_readable.js:303)
    at readableAddChunk (_stream_readable.js:280)
    at NoFilter.Readable.push (_stream_readable.js:241)
    at NoFilter.Transform.push (_stream_transform.js:139)
    at NoFilter._transform (index.js:220)
    at NoFilter.Transform._read (_stream_transform.js:177)
    at NoFilter.Transform._write (_stream_transform.js:164)
    at doWrite (_stream_writable.js:409)
    at writeOrBuffer (_stream_writable.js:398)

Triggered by the stram-browserify polyfill, necessary to use all of these packages in my web app.
As I read on web, I tried to install the process module in my package.json, then in my webpack config file i tryied in few ways:
fallback: {
  stream: require.resolve('stream-browserify'),
  util: require.resolve('util/'),
  zlib: require.resolve('browserify-zlib'),
  assert: require.resolve('assert/'),
  crypto: require.resolve('crypto-browserify'),
  fs: require.resolve('browserify-fs'),
  path: require.resolve('path-browserify'),
  process: require.resolve('process/browser'),  // <- this
}

alias: {
    'jquery-ui': path.resolve(__dirname, "./node_modules/jquery-ui"),
    'owl.carousel': path.resolve(__dirname, "./node_modules/owl.carousel"),
    modernizr$: path.resolve(__dirname, "./modernizrrc.js"),
    WOW: 'wowjs',
    process: "process/browser", // 1st try
    process: path.resolve(__dirname, "./node_modules/process/browser.js"), // 2nd try
},

    plugins: [
      // ...
      new webpack.DefinePlugin({
         process: "process/browser"
        "process.env": {
          ASSET_PATH: JSON.stringify(ASSET_PATH),
          NODE_ENV: JSON.stringify("development"),
          ENV: JSON.stringify("development"),
        },
      }),

With the DefinePlugin try, the error changed, it said browser is not defined.
Anyone knows how to correctly polyfill this module or if there are other ways to use the CBOR module?
Thanks so much

A: SOLVED
the problem was that the process plugin must be provided, not defined:
it's
new webpack.ProvidePlugin({
  process: 'process/browser',
})

not
new webpack.DefinePlugin({
  process: 'process/browser',
}),


text:
Q: What is the meaning of "${name##*/}" in Shell I have a code as
while read name; do uuencode "$name" "${name##*/}"; done

but I do not understand what is meaning of ##*/ in "${name##*/}"
Google doesn't give good results. Can someone please explain.

A: This is used to get the filename from the full path. This is similar to using the basename command.
Example:
filename="/tmp/test.txt"
echo "$filename" "${filename##*/}"
/tmp/test.txt test.txt
basename "$filename"
test.txt``


text:
Q: has the twitter api resource url for update status changed Custom twitter app all of sudden stopped updating status and I'm new to Twitter.
<errors>
  <error code="34">Sorry, that page does not exist</error>
</errors>
Stack Trace:
   at TwitterOAuth.WebResponseGet(HttpWebRequest webRequest)

Custom app is using the following resource url:
"https://twitter.com/statuses/update.xml"

Found a Code Project example that uses the following resource url and it worked for me:
"http://api.twitter.com/1/statuses/update.json"

http://www.codeproject.com/Articles/247336/Twitter-OAuth-authentication-using-Net

So I tried
"https://api.twitter.com/1/statuses/update.xml"

Got the following error:
Unhandled Exception: System.Net.WebException: The remote server returned an erro
r: (403) Forbidden.
   at System.Net.HttpWebRequest.GetResponse()

A: now, twitter published new API V1.1
and the old API v1.0 will be retired on March 5th, 2013.
so you should review API V1.1


text:
Q: When can you canonically extend an ultrafilter after forcing? Suppose that $V$ is a model of $\sf ZFC$, and fix some regular $\kappa$, say $\omega_1$ for practical purposes.
Let $\cal U$ be an ultrafilter on $\omega_1$ in $V$ which is non-principal and even uniform. Let $\Bbb P$ be a forcing such that:

*

*$\Bbb P$ does not add bounded subsets to $\kappa$, but its generic defines a canonical unbounded subset of $\kappa$, say $G$.

*$\Bbb P$ satisfies $\kappa^+$-c.c.

*$\Bbb P$ is homogeneous.

Of course that $\cal U$ is not an ultrafilter in $V[G]$ since it is no longer closed under supersets. But we can ask whether or not $\mathcal U\cup\{G\}$ is an ultrafilter base.

Is there a condition on $\cal U$ (or an additional condition on $\Bbb P$ or $G$) which guarantee that $\mathcal U\cup\{G\}$ is an ultrafilter base in $V[G]$?

A: Here is a necessary and sufficient condition:
Theorem. If $U$ is an ultrafilter in $V$, then the following
are equivalent:

*

*$U\cup\{G\}$ is an ultrafilter base.

*$G$ is not disjoint from any element of $U$ and $U$ decides every subset of $G$ in $V[G]$, meaning that for every $A\subset G$ in $V[G]$
there is $B\in U$ with $B\cap G$ contained in $A$ or disjoint from $A$.

The proof is straightforward.
It follows that many of the usual forcing notions do not have this
property. For example, if the forcing is adding a Cohen subset
$G\subset\kappa$, then we definitely won't have condition 2. For example, if $A$ consists of every other element of $G$ and $B$ is any unbounded ground model set, then it is dense that $B\cap G$ is neither contained in nor disjoint from $A$.


text:
Q: Icacls - Change permission invalid parameter When I enter:
icacls %SYSTEMROOT%\system32\drivers\etc\hosts "/E /G %USERNAME%:W"

It says invalid parameter /E.

A: There is no such parameters in icacls named /E or /G. Read icacls /?.
Correct command will be:
icacls %SYSTEMROOT%\system32\drivers\etc\hosts /grant "%username%:W"


text:
Q: How to prove this inequality in Euclidean space?
Prove that
  $$\begin{align*}&|a+b||a+c|+|a+b||b+c|+|a+c||b+c|\\
\leq &(|a|+|b|+|c|) \cdot |a+b+c|+|a||b|+|a||c|+|b||c|\end{align*}$$
  in Euclidean space $\mathbb{R}^n$.

I have been thinking about this inequality for 2 weeks. This exercise was in my exam in functional analysis. I think, we have to use fact, that
$|x+y|^2=\langle x,x\rangle+2\langle x,y\rangle +\langle y,y\rangle$ and $|x+y|\leq |x|+|y|$ and symmetries properties, but I can not find a good proof.
If $a,b,c\in \mathbb{R}$ then it is easy to prove this inequality. We have to prove following inequalities
$$|a+b||a+c|\leq |a||a+b+c|+|b||c|$$
$$|a+b||b+c|\leq |b||a+b+c|+|a||c|$$
$$|a+c||b+c|\leq |c||a+b+c|+|a||b|$$
There is symetry therofore we can prove only one equation. It is easy to show that
$$|a+b||a+c|=|a(a+b+c)+bc|\leq |a||a+b+c|+|b||c|$$
We take the sum of 3 inequalities above and the proof is ended.
I was trying to prove inequality analogues in the space $\mathbb{R^n}$, but without a success. If I take a square of one of the inequalities, I can not get simplifier inequality.
P.S. Please, correct my grammar mistakes

A: One cheapish trick is to use the quaternions.
For $a,b,c\in \mathbb{R}^n$, there exists a three dimensional subspace containing $a,b,c$. Since the inequality you wrote is obviously invariant under global isometries of $\mathbb{R}^n$, we can without loss of generality assume that $a\neq 0$ is real, and $a,b,c \in \mathbb{R}^4$ which we identify with the quaternions $\mathbb{H}$.
The advantage to working in the quaternions is that it is an algebra, and has the property that
$$ |pq| = |p||q| $$
Therefore we get
$$ |a+b||a+c| = |a^2 + ac + ba + bc| = |a(a+b+c) + bc| $$
here we see that it is important we choose $a$ to be real, so that $ba = ab$.
Similarly
$$ |a+b||b+c| = |ab + ac + b^2 + bc| = |ba + b^2 + bc + ac| = |b(a+b+c) +ac | $$
and
$$ |a+c||b+c| = |ab + ac + cb + c^2| = |ab + ca + cb + c^2| = |c(a+b+c) + ab| $$
and you can apply directly your argument for the case $a,b,c$ are in $\mathbb{R}$ and argue that the desired inequality holds. Note that this also gives you when the inequality is in fact an equality: whenever $bc$ and $a(a+b+c)$ are positively collinear, $ac$ and $b(a+b+c)$ are positively collinear, and $ab$ and $c(a+b+c)$ are positively collinear as quaternions. The trivial cases are when $a,b,c$ are all collinear and all have the same sign, and when $a+b+c = 0$.


text: Q: embed fonts into eps figure with ghostscript I have a figure (EPS format), that I include in a large tex file. I would like to embed the fonts into the eps figure before including it. How can I do this with ghostcript on windows?


text:
Q: Ubuntu Server 14.04 LTS includes unknown SFTP server I've installed Ubuntu Server 14.04, and when I try to connect it with browser sftpd://10.0.0.100 it lets me see my files after I type my username and password.
It's weird, because I haven't installed any FTP server on my computer.
So, the question is: how to remove that FTP server that is running on my computer for some reason?

A: SFTP is not FTP
It stands for SSH File Transter Protocol
Server users often remotely connect to the server using Secure Shell (SSH), also known as OpenSSH. Open SSH is part of the default Ubuntu server installation. SFTP is an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capabilities.
You can remove the openSSH server from your Ubuntu server, but then you will lose the ability to log into your server remotely using SSH protocol. If you are sure that you will never remotely connect to the server, and want to do this use the command:
sudo apt-get remove openssh-server

Alternately you may disable SSHD to auto-start when your server starts up. See How do I disable SSHD from starting automatically?. Thanks to David Foerster for the link.
You may also want to learn about How to harden an SSH server? so that it is not easy for a hacker to gain access to your server remotely.
Hope this helps


text:
Q: Easy Variable Question in Visual Studio 2010 Express Please help I'm trying to make a unit converter and what I have is one button and two textboxes. What I want the button when pressed to do is convert whatever is entered to the other side (what isnt entered)
ALSO! Another thing that would be great would be how do I implement a drop down menu so I dont need to do so many buttons and fields? Thanks <3
TEXTBOX BUTTON TEXTBOX2 (say TEXTBOX is Fahrenheit and TEXTBOX2 is Celsius) I enter in the Fahrenheit and leave TEXTBOX2 and hit the button I should get the Celsius now. Simple enough right?
Here is what I have:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace UnitConverter
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {

            if (boxc.Text=="")
                boxc.Text = (Convert.ToDouble(boxf.Text) * 9 /5) +32;
        }

        }
    }

Sorry when it comes to numbers and strings I always get thrown for a loop :\ Thanks in advance for any help.

A: This line is wrong:
boxc.Text = (Convert.ToDouble(boxf.Text) * 9 / 5) + 32;

You're trying to put a double back into the textbox; you need to convert the result back to a string:
boxc.Text = ((Convert.ToDouble(boxf.Text) * 9 / 5) + 32).ToString();

Also, you mixed up the formulas; I believe you're trying to convert from Fahrenheit (the value in boxf) to Celsius (the value in boxc), but you're using the formula to convert from Celsius to Fahrenheit.

A:     double c ;
try{
 c= double.Parse(boxf.Text);
}catch{
MessageBox.Show("Error!Invalid Data");
return;
}

    if (boxc.Text.Trim().length==0)
                    boxc.Text =( (c * 9 /5) +32).ToString();

A: Replace
boxc.Text = (Convert.ToDouble(boxf.Text) * 9 /5) +32;

With
boxc.Text = Convert.ToString((Convert.ToDouble(boxf.Text) * 9 /5) +32);

A: Use this:
boxc.Text = ((Convert.ToDouble(boxf.Text) * 9 / 5) + 32).ToString();
instead of
boxc.Text = (Convert.ToDouble(boxf.Text) * 9 /5) +32;


text:
Q: ORA-00936 when trying to use EVALUATE I need an evaluation of purchase contracts (Einkaufsverträge) and the corresponding sales contracts, where the Einkaufsverträge will be extended.
Therefore, I want to create a query that returns a row from the nag_einkaufsverträge table if the expression in the vertragsverlaengerung column (vertrag extension column) evaluates to true for the data item.
I used this query:
SELECT *
FROM nag_einkaufsvertraege
WHERE EVALUATE (nag_einkaufsvertraege.vertragsverlaengerung, <data item>) = 1;

but then it shows error ORA-00936 – missing expression.
My table looks more or less like this:

I'm using SQL Tools 1.8 b38
Could someone please help to write the right query? I'm lost. Thank you.


text:
Q: A question about axes of symmetry in the plane. Suppose J is a Jordan curve in the Euclidean plane E and that there are two perpendicular straight lines
in E, each of which is an axis of symmetry of J. Does the intersection point of these two lines always
necessarily lie in the interior of J?

A: Here is a more general fact: if $J$ is central-symmetric w.r.t. a point $O$ (in our case, this is the intersection of the axes), then $O$ is inside.
Indeed, let $D$ be the domain bounded by $J$. We know it's a topological disc. And it's central symmetric w.r.t. $O$. Now if $O$ is outside, then the symmetry is a map from $D$ to itself without fixed points, contrary to Brouwer fixed point theorem.
If $O$ is on the boundary (i.e. on $J$), the the central symmetry is an involution of $J$ with exactly one fixed point. But there are no such involutions of the circle.

A: Yes.  Suppose without loss of generality that the two lines are the x- and y-axes.  Some point of J lies in some quadrant, so corresponding points a, b, c, d of J exist in every quadrant by symmetry.  Suppose a, b are the points in the northeast and southeast quadrants, respectively.  Then the portion of J passing between a and b cannot intersect the y-axis (or else, by symmetry, its reflection across the y-axis intersects itself), so it is homotopic to the straight line between a and b in in a half plane $x > \epsilon$ for some $\epsilon > 0$, hence homotopic to the straight line between a and b in $\mathbb{R}^2 - \{ (0, 0) \}$.  Similar statements are true of every other pair of adjacent points, so J is homotopic to a rectangle in $\mathbb{R}^2 - \{ (0, 0) \}$ containing the origin.


text:
Q: PPTP VPN - users cannot access internet via the server I have set up a pptp vpn on windows xp, and added the users. The vpn users can connect to the server, but once they are connected they can't access the internet via the vpn server which should act like a proxy. That's my basic task - to make a vpn server serve as a proxy for the users.
Can someone explain why the users are not able to access the internet via the vpn server OR Point me to some site where this is well explained ?
Thanks in advance.

A: A proxy server is typically an applicaiton-layer function. I believe that when you say "act like a proxy" you're really saying "route their traffic across the VPN to that server which will, in turn, route the traffic to its default gateway and ultimately to the Internet".
I'd start with a "tracert" (or OS equivalent command) from a client while connected to the VPN to an Internet address and see where the traffic is going.
It's fairly commonplace in the Microsoft VPN client for users to untick the "Use default gateway on remote network" (set in the "Advanced" settings of TCP/IP on the VPN connection) which will cause only traffic bound for the remote VPN subnet to cross the VPN. Have you checked to see that no one has unticked that box on the clients?
Typically the Microsoft VPN client will "push down" the DNS and WINS settings from the VPN server to the client computers. If the clients are having an inability to access web sites with a browser, for example, it may be that they are routing traffic down the VPN tunnel but that the DNS server being "pushed down" can't resolve Internet names.
Viewing the routing table on a client while connected with the "route print" command will also help figure out what's going on. There should be two default-gateway (0.0.0.0 with a subnet mask of 0.0.0.0) entries on a client that's configured to route all traffic down the VPN-- one for the client's on-subnet default gateway, and one "pointing" to the VPN tunnel.
Edit:
If you want all the traffic from the VPN clients to cross the VPN and egress to the Internet from the VPN "hub" then leave the "Use default gateway on remote network" checkbox ticked on the client computers.
I would suspect that you're having a name resolution problem. I'd connect a client to the VPN and do the following:
tracert -d (your favorite Internet IP address here)

You can use any IP address you want in that command, so long as it's something that's really reachable. Heck, use the IP address of "star.slashdot.org"-- I've already used it in some examples on here... >smile&lt   216.34.181.48
That will show you the route that packets are taking. It's important to use an IP address in that command so that you aren't relying on DNS.
If that looks okay (i.e. you see the packets cross the VPN and leave through the VPN "hub" Internet connection) then give DNS a shot:
nslookup star.slashdot.org

You should get back something like:
C:\>nslookup star.slashdot.org
Server:  the-name-of-the-VPN-server's-DNS-server
Address:  the-ip-address-of-the-VPN-server's-DNS-server

Non-authoritative answer:
Name:    star.slashdot.org
Address:  216.34.181.48

If you get back something nasty like this then the remote DNS server isn't configured to resolve Internet names.
*** the-name-of-the-VPN-server's-DNS-server can't find star.slashdot.org: Non-existent domain

If you get back something like this then the VPN server doesn't have a valid DNS server specified:
C:\>nslookup star.slashdot.org
Server:  [the-ip-address-of-the-VPN-server's-DNS-server]
Address:  the-ip-address-of-the-VPN-server's-DNS-server

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to [the-ip-address-of-the-VPN-server's-DNS-server] timed-out


text:
Q: Determining if the set of bounded sequences in $\mathbb{R}$ is open and/or closed w.r.t. the product topology of $\mathbb{R}^\mathbb{N}$ I would like some hints/pointers on how to proceed with the problem given my current thoughts:
Let $X = \mathbb{R}^{\mathbb{N}}$ be the set of sequences in $\mathbb{R}$, and $B \subset X$ the set of bounded sequences in $\mathbb{R}$. Let the topology of $X$ be given by the product topology, i.e. the topology whose subbasis is the set $\{\mathrm{pr}_i^{-1}[U_i]\mid i \in \mathbb{N}, U_i \subset \mathbb{R}\}$ where each $U_i$ is an open set in $\mathbb{R}$. When $X$ is equipped with a box topology, it is straightforward to show that $B$ is a clopen set. But I don't think that $B$ is an open set with the product topology of $X$, as with the product topology the basic elements are of the form $\prod_{i=1}^\infty S_i$ with only finitely many $S_i \neq \mathbb{R}$. Therefore, as the open sets of $X$ are given by the unions of these basic sets, it makes sense that the open sets of $X$ correspond to unbounded sequences $f$ with $|f(k)| \leq M, M \in \mathbb{R}$ for only finitely many indices.
Right now, I'm unsure whether the only way to finish the proof is by taking an arbitrary union of the basic sets and show that it does correspond to a union of products in which some terms are unbounded, as the union of Cartesian product seems to get out of hand quite quickly. That is, I'd really like to avoid working with an arbitrary union of Cartesian products (since the formula seems to expand exponentially in terms of the terms in the product), but I don't know any other approach.
As for closedness, since $X\setminus B$ corresponds to unbounded sequences, it follows from the reasoning above that for any $f \in X\setminus B$, there exists a neighborhood of unbounded sequences s.t. $f \in V \subset X\setminus B$. Hence $B$ is closed.

A: Hint: Any mentioned base element in $X$ (in the product topology) contains both points in $B$ and points in $X\backslash B$. This can be seen by reformulating the condition on $S_i$ in a fixed base element $\prod_{n=1}^\infty S_i$ into the equivalent $\exists N\,\forall i\ge N: S_i=\mathbb R$.
From that it easily follows that neither $B$ nor $X\backslash B$ is open.


text:
Q: c++ How does unordered_set prevent from begin "sorted" from syntax level? I'm just curious if I apply "std::sort" on unordered_set, what will happen. Does STL design protect unordered_set from using std::sort on it, if yes, how is it achieved from syntax level?
#include<algorithm>
#include<iostream>
#include<unordered_set>
using namespace std;
struct E{
    char vertex;
    size_t distance;
    E(char v, size_t d):vertex(v),distance(d){}
    E(const E& e):vertex(e.vertex),distance(e.distance){}
    E& operator=(const E& e){
        vertex = e.vertex;
        distance = e.distance;
        return *this;
    }
};
template<>
struct std::hash<E> {
    std::size_t operator()(const E& e) const {
        return e.vertex;
    }
};
using edgeSet=unordered_set<E>;
int main(){
    edgeSet U;
    while(!U.empty()){
        sort(U.begin(),U.end());//ERROR!
    }
    return 0;
}

As I expected, it gives a lot of error information below:
g++ m.cpp -std=c++11
In file included from /usr/include/c++/7/algorithm:62:0,
                from m.cpp:1:
/usr/include/c++/7/bits/stl_algo.h: In instantiation of 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::__detail::_Node_iterator<E, true, true>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
/usr/include/c++/7/bits/stl_algo.h:4836:18:   required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::__detail::_Node_iterator<E, true, true>]'
m.cpp:26:31:   required from here
/usr/include/c++/7/bits/stl_algo.h:1969:22: error: no match for 'operator-' (operand types are 'std::__detail::_Node_iterator<E, true, true>' and 'std::__detail::_Node_iterator<E, true, true>')
    std::__lg(__last - __first) * 2,
            ~~~~~~~^~~~~~~~~

Well, could you help to explain how STL protect this "sort", I don't quite get the meaning of this error information, what does the information indicate? Just want the learn the skill. Thanks a lot.


text:
Q: Rounding up decimals bug in c? I'm doing a very simple c program which receives the integer n and finds the square root approximation of n.
This is my square root approximation function up to the 5th decimal:
float sqrt_approx(int n){
    float sqrt,how_many_tenths=10,how_many_decimals=0,i;
    for (i=1;i<n;i++){
        if ((i*i)<n) continue;
        if (i*i==n){ sqrt=i; goto return_; }
        else break;
    }
    sqrt=i-1;
    for (i=0;i<10;i++){
        if (i==9){

            sqrt=sqrt+i/how_many_tenths;

            how_many_tenths*=10;
            how_many_decimals++;
            if (how_many_decimals != 5) i=0;
            else break;
        }
        if ((sqrt+i/how_many_tenths)*(sqrt+i/how_many_tenths) < n) continue;
        sqrt=sqrt+(i-1)/how_many_tenths;
        how_many_tenths*=10;
        how_many_decimals++;
        if (how_many_decimals != 5) i=0;
        else break;
    }
    return_:
        return sqrt;
}

Brute force, pretty intuitive I would say. The problem, however, appears when I'm trying to get the approximation up to the 6th decimal. In order to do that, all I need to do is to change this:
if (how_many_decimals != 5)

into:
if (how_many_decimals != 6)

both times in my code. And if I'm to evaluate the square root of $35$ approximation up to the 6th decimal,
I get $5.916080$ instead of $5.916079$.
I tried to find the mistake and it appears to me that the 5th decimal gets rounded up. Take a look, I changed only a bit of my code to find out what is going on here:
float sqrt_approx(int n){
    float sqrt,how_many_tenths=10,how_many_decimals=0,i;
    for (i=1;i<n;i++){
        if ((i*i)<n) continue;
        if (i*i==n){ sqrt=i; goto return_; }
        else break;
    }
    sqrt=i-1;
    for (i=0;i<10;i++){
        if (i==9){
            printf("%f + %f equals: ",sqrt,i/how_many_tenths); //NEW
            sqrt=sqrt+i/how_many_tenths; //NEW
            printf("%f\n",sqrt); //NEW
            how_many_tenths*=10;
            how_many_decimals++;
            if (how_many_decimals != 6) i=0; //NEW (6 instead of 5)
            else break;
        }
        if ((sqrt+i/how_many_tenths)*(sqrt+i/how_many_tenths) < n) continue;
        sqrt=sqrt+(i-1)/how_many_tenths;
        how_many_tenths*=10;
        how_many_decimals++;
        if (how_many_decimals != 6) i=0; //NEW (6 instead of 5)
        else break;
    }
    return_:
        return sqrt;
}

results in ( after typing printf("%f,sqrt_approx(35)):
$5.000000 + 0.900000$ equals: $5.900000$ ( which is fine )
$5.916070+0.000009$ equals: $5.916080$ ( which is not fine )
$5.916080$
What seems to be the problem here ?

A: Changing float into double fixed it. Thanks for your comments guys.


text:
Q: How to display all even numbers less than a given number? I need to display all even numbers for that are less than a specific number. Those numbers are random generated between a range. Here's the assignment:

Write a program that prompts the user to enter an integer (n). Your program generates then, another random
  integer (max) that reaches at most 10 * n. So if n entered was 5, the number generated (max) should be
  between 5 and 50 (5*10). This program displays the sum of all even numbers less than (max). Your program
  stops at the first sum value reached greater than max. Display its value.

What I have done so far:
Scanner s = new Scanner(System.in);
System.out.print("Enter an integer: ");

int n = s.nextInt();
int most = (10 * n) - (n+1);
int max = (int)( n + Math.random() * most);

System.out.println("Maximum generated is: "+ max);

for(int i = 2 ; i < max; i+=2) {
    int num = max/i;
    if(num % 2 == 0) {
        System.out.print("number is "+ num);
    }
}

Sample run:
Enter an integer: 5
Maximum generated is: 45
Sum of (6 8 10 12) = 50 //we stopped because 50 is the first sum greater
                        //than max

What's wrong?

A: I think your logic should like this,
int sum = 0;
int i = 2;
while (i<max) {
    sum+=i;
    if (sum > max) {
        break;
    }
    i+=2;
}
System.out.print("Value=" + sum);

A: You can do this:
for(int i=0; i<max; i=i+2){
  sum+=i;
}

System.out.println(sum);
It does however sound like there might be an even faster dirrect mathametical formula for fonding the sum of all even numbers bellow a certain number but that's a question for another stack exchange.


text:
Q: Why aren't The Mire immortal? In Series 9, "The Girl Who Died", we're introduced to Ashildr, the viking girl whose life the Doctor saved by using a Mire "Medical Kit", which will keep "repairing" her, maybe forever.

The Doctor: It won't stop, the repair kit I put inside Ashildr, not ever. It'll just keep fixing her.
Clara: Well, good.
The Doctor: I'm not sure, but it's entirely possible she has lost the ability to die.
Clara: The ability?
The Doctor: Oh, dying is an ability, believe me. Barring accidents, she may now be functionally immortal.

As the series went on, we discovered that Ashildr

 effectively lived forever. Right to the end of the universe, which is still 100 trillion years away, according to some theories. The Mire medical kit kept curing her of everything, and healing every injury, not to mention that she even stopped aging.

So, why was she the only immortal? If those medical kits are used by Mire warriors, why aren't they immortal as well? Did the Doctor tamper with it? Does it only make humans, or humanoid species immortal?

A:
Barring accidents, she may now be functionally immortal.

For all we know, they were immortal, but since they were a warrior race, "accidents" could've happened and wiped them out as a species.
That's one possibility, the other being that the kit made Ashildir immortal because The Doctor tampered with it.
Bear in mind that no explanation was explicitly given in the show, these are just a few possibilities.

A: As stated by the Doctor, Ashildr had lost her ability to die.
If you take the example of the Timelords, they could also make themselves immortal, but they didn't because of many issues. In my opinion, those main issues would be:

*

*What if someone  becomes something like The Master, they will cause heavy destruction

*If they kept reproducing and didn't die, too high population

*The rule of nature, the one who is born, has to die. I think, this have to do something with the laws of time. Even Daleks don't try to play with time. Note: Immortality is the inability to die

*it could be an accident might resulting in wiping in the whole species. Even regeneration of a Timelord could go wrong, who knows what would happen with the immortality experiment.

The must have happened with the Mires, they were too afraid of the heavy consequences of immortality.

A: There may be another explanation. I know.... it is just a theory but I think that Mire could have become immortal but I believe they did not just invented repair kit, they had tens of versions and evolution took care that it stopped work for them so they invented another version, something like antibiotics today.
But Ashildir is a human, and I think it could be much simpler DNA for the repair kit to repair, and to be so much more advanced to the organism it was repairing that it could make it immortal. With Mire they had advanced DNA and overtime and versions of repair kit they developed some resistance to it.


text:
Q: Q: How to use ng-repeat onClick to execute function with param in AngularJs? I have a directive with template which has the list element < ul> < / ul> and it has onClick functionality. I get the input as an array to this directive. That array has two parameters they are name & functionname.
     $scope.actionsArray = [{
        functionName: $scope.releaseAllMovie,
        name: "Release All Movie"
      }, {
        functionName: $scope.releaseByDate,
        name: "Release By Date "
      }];

To execute this functionname i use another method inside directory. That is
       controller: function($scope){
            $scope.exec = function(func){
                func();
            };
        },

it works fine. Now i need to add two more options in it with function with parameter like below
     $scope.actionsArray = [{
        functionName: $scope.addVideos('clip'),
        name: "Add Video Clip"
      }, {
        functionName: $scope.addVideos('title'),
        name: "Add Movie Title"
      }];

but it is not working the way expected. While onClick on these items I get error like:

TypeError: func is not a function

I have this code in Plnkr
Please help.

A: That's because this line right here:
functionName: $scope.addVideos('clip')

Is going to immediately evaluate the function with that parameter and assign the result to functionName.
It sounds like what you want is a function to be executed with that specific parameter. Luckily, you can achieve this using the bind function in JavaScript.
functionName: $scope.addVideos.bind(this, 'clip')

This will actually create a new function that is pre-bound using those parameters.
Here is a fork of your plunker showing the working code: http://plnkr.co/edit/PboMINtDGmMNvDfuBjTd?p=preview


text:
Q: What does $(B+I)/I\sim B/(B\cap I)$ tell us? Let $A$ be a $C^*$-algebra in which $B$ is a $C^*$-subalgebra and $I$ is a closed ideal. In several books on $C^*$-algebras I have encountered the following:

$(B+I)/I$ is $*$-isomorphic to $B/(B\cap I)$.

It seems important, but none of the books I read gives a hint why this is important.
So what does this isomorphism say actually?
Thanks!

A: Here's a general algebraic interpretation that I've always found compelling.
Within a fixed algebra $A$, we're given a subalgebra $B$ and an ideal $I$ (something you can quotient by, I'm skipping the specifics). We are interestered in the quotient $B/I$, but this does not make sense in general, since we don't necessarily have $I \subset B$.
There are 2 different ways to go about this:

*

*either extend the subalgebra $B$ so that $I$ lies in this extension (the smallest such subalgebra is $B+I$)

*or restrict $I$ so that this restriction lies in $B$ (the largest such ideal is $B \cap I$).
The isomorphism $(B+I)/I \cong B/(B\cap I)$ tells us that both approaches yield the same result.

A: As azarel mentioned, the form of this 'second' isomorphism should be familiar from elementary group, ring, or module theory.
A useful application is the following:
If $I,J$ are closed ideals of the $C^*$-algebra $A$, then $I+J$ is a closed ideal as well.
(proof: the natural 'second isomorphism' map $I/(I\cap J)\to A/J$ is a $*$-(iso)morphism onto $(I+J)/J$, hence the latter is closed in $A/J$. Now $(I+J)/J$ and $J$ are Banach, hence $I+J$ as well.)
In turn, closed ideals are nice because their quotients yield complete spaces, e.g. the quotient of a C*-algebra by a closed ideal is again a C*-algebra.


text:
Q: displaying grid of images in jupyter notebook I have a dataframe with a column containing 495 rows of URLs. I want to display these URLs in jupyter notebook as a grid of images. The first row of the dataframe is shown here. Any help is appreciated.
id           latitude     longitude     owner             title                          url
23969985288 37.721238   -123.071023 7679729@N07 There she blows!    https://farm5.staticflickr.com/4491/2396998528...

I have tried the following way,
from IPython.core.display import display, HTML
for index, row in data1.iterrows():
  display(HTML(""%(i["url"])))

However, running of above code displays message
> TypeError                         Traceback (most recent call last)
<ipython-input-117-4c2081563c17> in <module>()
      1 from IPython.core.display import display, HTML
      2 for index, row in data1.iterrows():
----> 3   display(HTML(""%(i["url"])))

TypeError: string indices must be integers

A: The best way to show a grid of images in the Jupyter notebook is probably using matplotlib to create the grid, since you can also plot images on matplotlib axes using imshow.
I'm using a 3x165 grid, since that is 495 exactly. Feel free to mess around with that to change the dimensions of the grid.
import urllib
f, axarr = plt.subplots(3, 165)
curr_row = 0
for index, row in data1.iterrows():
     # fetch the url as a file type object, then read the image
     f = urllib.request.urlopen(row["url"])
     a = plt.imread(f)

     # find the column by taking the current index modulo 3
     col = index % 3
     # plot on relevant subplot
     axarr[col,curr_row].imshow(a)
     if col == 2:
         # we have finished the current row, so increment row counter
         curr_row += 1

A: Your idea of using IPython.core.display with HTML is imho the best approach for that kind of task. matplotlib is super inefficient when it comes to plotting such a huge number of images (especially if you have them as URLs).
There's a small package I built based on that concept - it's called ipyplot
import ipyplot

images = data1['url'].values
labels = data1['id'].values

ipyplot.plot_images(images, labels, img_width=150)

You would get a plot similar to this:

A: Just add this code below to your cell:
display(IPython.display.HTML('''
  <flexthis></flexthis>

'''))

and then, on the same cell, use calls to IPython.display.Image or anything else you want to show.

This code above allows you to add custom CSS to that specific output cell. I'm using a flex box (display:flex), but you can change it to your liking.

A: I can only do it by "brute force":
However, I only manage to do it manually:
import matplotlib.pyplot as plt
import matplotlib.image as mpimg

%matplotlib inline

img1=mpimg.imread('Variable_8.png')
img2=mpimg.imread('Variable_17.png')
img3=mpimg.imread('Variable_18.png')
          ...

fig, ((ax1, ax2, ax3), (ax4,ax5,ax6)) = plt.subplots(2, 3, sharex=True, sharey=True)

ax1.imshow(img1)
ax1.axis('off')
ax2.imshow(img2)
ax2.axis('off')
   ....

Do not know if ot helps


text:
Q: Maven dependency timeout settings Maven reports timeout exception while downloading dependencies, as it's default time out is 60000, but in my case I need to increase because ( The environment where I am working has established an intermediary server that first download all the file to it's own server and my machine get those downloaded file from that intermediary server).
Now here the problem comes, if the dependency is too large simply that takes more than 60000 mili seconds then eclipse burst with the following exception
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Arquillian Persistence Extension Aggregator
[INFO] Arquillian Persistence Extension API
[INFO] Arquillian Persistence Extension SPI
[INFO] Arquillian Persistence Extension Core
[INFO] Arquillian Persistence Extension DBUnit Integration
[INFO] Arquillian Persistence Extension Integration Tests
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Arquillian Persistence Extension Aggregator 1.0.0.Final-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java-version) @ arquillian-persistence-parent ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-maven-version) @ arquillian-persistence-parent ---
[INFO]
[INFO] --- maven-dependency-plugin:2.3:unpack (unpack) @ arquillian-persistence-parent ---
[INFO] Configured Artifact: org.wildfly:wildfly-dist:8.0.0.Final:zip
Downloading: http://repo.maven.apache.org/maven2/org/wildfly/wildfly-dist/8.0.0.Final/wildfly-dist-8.0.0.Final.zip
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Arquillian Persistence Extension Aggregator ....... FAILURE [2:11.315s]
[INFO] Arquillian Persistence Extension API .............. SKIPPED
[INFO] Arquillian Persistence Extension SPI .............. SKIPPED
[INFO] Arquillian Persistence Extension Core ............. SKIPPED
[INFO] Arquillian Persistence Extension DBUnit Integration  SKIPPED
[INFO] Arquillian Persistence Extension Integration Tests  SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:11.908s
[INFO] Finished at: Wed May 07 11:27:41 PKT 2014
[INFO] Final Memory: 22M/177M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.3:unpack (unpack) on project arquillian-persistence-parent: Unable to resolve artifa
ct. Could not transfer artifact org.wildfly:wildfly-dist:zip:8.0.0.Final from/to central (http://repo.maven.apache.org/maven2): No response received after 60000
[ERROR] org.wildfly:wildfly-dist:zip:8.0.0.Final
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

No response received after 60000 , this line creates trouble.
As a Solution :
I am using settings.xml with the following settings
<settings>
  <servers>
    <server>
      <id>central</id>
      <configuration>
            <timeout>120000</timeout>
      </configuration>
    </server>
  </servers>
</settings>

while I am sure the path of the settings.xml is correct.
Unfortunately it does not work.

A: According to this Maven guide there's a new way to set up timeouts.
I changed my ~/settings.xml that now reads like that...
<server>
  <id>central</id>
  <configuration>
    <httpConfiguration>
      <all>
        <connectionTimeout>120000</connectionTimeout>
        <readTimeout>120000</readTimeout>
      </all>
    </httpConfiguration>
  </configuration>
</server>

It seems to work in my case. I tried with an unexisting repository and it seems to fail far quicker than before, when I set both timeouts to 5000. Can you give it a try ?


text:
Q: By default, can a docker container call host's localhost UDP? I have a docker container, and also installed on the VM a daemon listening for UDP on port 8125. The container sends data with UDP protocol on this 8125 port.
I was trying to open the port by starting the container with the -p 8125:8125/udp, but I'm getting the following error:
Error starting userland proxy: listen udp 0.0.0.0:8125: bind: address already in use

Which makes sense because the daemon is already listening on this port.
So how can I configure Docker so that the container can send UDP payloads to the external daemon ?

A: Opening ports is only needed when you want to Listen for the requests not sending. By default Docker provides the necessary network namespace for your container to communicate to the host or outside world.
So, you could it in two ways:

*

*use --net host in your docker run and send requests to localhost:8125 in this case you containerized app is effectively sharing the host's network stack. So localhost points to the daemon that's already running in your host.

*talk to the container network gateway (which is usually 172.17.0.1) or your host's hostname from your container. Then your are able to send packets to your daemon in your host.


text:
Q: "tuple index out of range" when converting python code to exe I wrote a desktop program with Python. The module I am using is PyQT5. To convert the program to exe, I type the following into the console:
pyinstaller --noconsole --onefile index.py

And it gave an error:
293 INFO: PyInstaller: 4.7
293 INFO: Python: 3.10.0
305 INFO: Platform: Windows-10-10.0.19043-SP0
305 INFO: wrote C:\Users\emiry\Desktop\Stok takip yazılımı\index.spec
307 INFO: UPX is not available.
309 INFO: Extending PYTHONPATH with paths
['C:\\Users\\emiry\\Desktop\\Stok takip yazılımı']
790 INFO: checking Analysis
790 INFO: Building Analysis because Analysis-00.toc is non existent
791 INFO: Initializing module dependency graph...
794 INFO: Caching module graph hooks...
804 INFO: Analyzing base_library.zip ...
4341 INFO: Processing pre-find module path hook distutils from 'C:\\Users\\emiry\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-distutils.py'.
4343 INFO: distutils: retargeting to non-venv dir 'C:\\Users\\emiry\\AppData\\Local\\Programs\\Python\\Python310\\lib'
5301 INFO: Caching module dependency graph...
5441 INFO: running Analysis Analysis-00.toc
5454 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
  required by C:\Users\emiry\AppData\Local\Programs\Python\Python310\python.exe
5499 INFO: Analyzing C:\Users\emiry\Desktop\Stok takip yazılımı\index.py
5706 INFO: Processing pre-find module path hook PyQt5.uic.port_v2 from 'C:\\Users\\emiry\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-PyQt5.uic.port_v2.py'.
7020 INFO: Processing pre-find module path hook site from 'C:\\Users\\emiry\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\hooks\\pre_find_module_path\\hook-site.py'.
7021 INFO: site: retargeting to fake-dir 'C:\\Users\\emiry\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\PyInstaller\\fake-modules'
Traceback (most recent call last):
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 124, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\__main__.py", line 58, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 782, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 714, in build
    exec(code, spec_namespace)
  File "C:\Users\emiry\Desktop\Stok takip yazılımı\index.spec", line 7, in <module>
    a = Analysis(['index.py'],
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 277, in __init__
    self.__postinit__()
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\datastruct.py", line 155, in __postinit__
    self.assemble()
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\building\build_main.py", line 439, in assemble
    priority_scripts.append(self.graph.add_script(script))
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 265, in add_script
    self._top_script_node = super().add_script(pathname)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1433, in add_script
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1505, in import_hook
    target_package, target_module_partname = self._find_head_package(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1684, in _find_head_package
    target_package = self._safe_import_module(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2510, in _safe_import_hook
    self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1544, in import_hook
    for target_submodule in self._import_importable_package_submodules(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1794, in _import_importable_package_submodules
    submodule = self._safe_import_module(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2510, in _safe_import_hook
    self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1544, in import_hook
    for target_submodule in self._import_importable_package_submodules(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1794, in _import_importable_package_submodules
    submodule = self._safe_import_module(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2062, in _safe_import_module
    self._process_imports(n)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2850, in _process_imports
    target_module = self._safe_import_hook(*import_info, **kwargs)[0]
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2301, in _safe_import_hook
    target_modules = self.import_hook(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 1518, in import_hook
    submodule = self._safe_import_module(head, mname, submodule)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\depend\analysis.py", line 387, in _safe_import_module
    return super()._safe_import_module(module_basename, module_name, parent_package)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2061, in _safe_import_module
    n = self._scan_code(module, co, co_ast)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2645, in _scan_code
    self._scan_bytecode(
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\modulegraph.py", line 2749, in _scan_bytecode
    for inst in util.iterate_instructions(module_code_object):
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 147, in iterate_instructions
    yield from iterate_instructions(constant)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\site-packages\PyInstaller\lib\modulegraph\util.py", line 139, in iterate_instructions
    yield from get_instructions(code_object)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\dis.py", line 338, in _get_instructions_bytes
    argval, argrepr = _get_const_info(arg, constants)
  File "C:\Users\emiry\AppData\Local\Programs\Python\Python310\lib\dis.py", line 292, in _get_const_info
    argval = const_list[const_index]
IndexError: tuple index out of range

I'm using PyQT5 for the program's interface. What is the source of the problem? How can I solve it?
All the modules I use are: sys, PyQT5, datetime, sqlite3, tabulate, pandas, smtplib, email.mime.multipart.


text:
Q: Exception subtype: KERN_INVALID_ADDRESS in Swift I am getting this crash from a small group of users and not sure how I can fix this, only a couple of users are experiencing this crash. It is happening when the tab bar is switched to one of the tabs, but nothing in the tab bar/that view controller code has changed since it was working last. Any ideas on how to diagnose this?
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x000000000000000c
VM Region Info: 0xc is not in any region.  Bytes before following region: 4331765748
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->
      __TEXT                   102318000-102334000 [  112K] r-x/r-x SM=COW  ....app/AppName

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [69948]
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib              0x000000018a168b40 0x189de5000 + 3685184
1   App                         0x0000000102991068 0x102318000 + 6787176
2   App                         0x0000000102991068 0x102318000 + 6787176
3   App                         0x00000001029812e8 0x102318000 + 6722280
4   SwiftUI                         0x000000018ce811c0 0x18c768000 + 7442880
5   App                         0x000000010297f530 0x102318000 + 6714672
6   APp                         0x0000000102987cdc 0x102318000 + 6749404
7   SwiftUI                         0x000000018cb32b8c 0x18c768000 + 3976076
8   SwiftUI                         0x000000018ce8b248 0x18c768000 + 7483976
9   SwiftUI                         0x000000018cb2c328 0x18c768000 + 3949352
10  SwiftUI                         0x000000018ce8b6d4 0x18c768000 + 7485140
11  SwiftUI                         0x000000018cb527fc 0x18c768000 + 4106236
12  AttributeGraph                  0x00000001af68aa50 0x1af685000 + 23120
13  AttributeGraph                  0x00000001af68ae84 0x1af685000 + 24196
14  AttributeGraph                  0x00000001af690588 0x1af685000 + 46472
15  AttributeGraph                  0x00000001af6a25bc 0x1af685000 + 120252
16  SwiftUI                         0x000000018cfabe20 0x18c768000 + 8666656
17  SwiftUI                         0x000000018cfabfa0 0x18c768000 + 8667040
18  SwiftUI                         0x000000018cfac07c 0x18c768000 + 8667260
19  SwiftUI                         0x000000018c8d5b64 0x18c768000 + 1497956


text:
Q: Can't draw on Canvas Contexts in loop I'm trying to generate multiple canvas and draw on them in loop.
When I execute the code all canvas generate properly, but only the last one have rectangle on it.
for(var i = 0; i < canvasNumber; i++) {
    $(".canvas-container")[0].innerHTML += `<canvas class="canva${i}"></canvas>`;
    $(`.canva${i}`)[0].width = window.innerWidth/5;
    $(`.canva${i}`)[0].height = window.innerHeight/5;
    let cc = $(`.canva${i}`)[0].getContext("2d");
    cc.fillRect(30*i,20,200,100);
}

A: As mentioned in @prog1011's answer:

Below DOM element properties can cause browser to perform a reflow
  operation

*

*innerHTML

*offsetParent

*style

*scrollTop

  innerHTML will only trigger a reflow when setting it changes the
  DOM.
innerHTML changes the HTML of an object which certainly can affect
  size and position and will trigger at least a partial reflow.
See the reference link

So instead of innerHTML use append as below:

const canvasNumber = 4;
const width = window.innerWidth / 5;
const height = window.innerHeight / 5;

for (var i = 0; i < canvasNumber; i++) {
  $(".canvas-container").append($(`<canvas class="canvas"></canvas>`));
  const $canvas = $('.canvas').eq(i)[0];
  $canvas.width = width;
  $canvas.height = height;
  const cc = $canvas.getContext("2d");
  cc.fillRect(30 * i, 20, 200, 100);
}
.canvas {
  border: 1px solid red;
}


text:
Q: Dice Game of two players There are two players playing a dice game. Assume player 1 rolls first and the game will end until either player rolls a 6. What is the probability that player 2 wins the game?
I can calculate the probability using the sum of a geometric sequence. Could someone explain this question in a more intuitive way? Thank you very much,

A: I assume that the first player to roll a $6$ wins.
Let $p$ be the probability that Player $1$ wins.  Then $1-p$ is the probability that player $2$ wins.  But if Player $1$ rolls anything but a $6$ on the first roll (which happens with probability $\frac 56$), then Player $2$ is now in the same position Player $1$ was in at the start of the game.  On the other hand, if Player $1$ does roll a $6$, then the probability that Player $2$ wins the game is $0$.
Therefore, $1-p= \frac 56 p + \frac 16 \cdot 0$, so $p = \frac{6}{11}$ and $1-p= \frac{5}{11}$.

A: If player 1 gets anything other than a 6, then we are effectively in the same position as we were before, but with the players roles swapped.
So Player 2's chance of winning is $5/6$ that of player 1's chance of winning.
So the chances of winning must be $6/11$ for player 1 and $5/11$ for player 2.


text:
Q: fields from foreignkey is not showing data in django admin I am trying to show fields from foreignkey, So my fields are showing but with empty value, i have value for these field.
I have following code for
admin.py
@admin.register(OrderDetail)
class OrderDetailAdmin(admin.ModelAdmin):
    list_select_related = ('category', 'industry', 'user')
    fieldsets = (
        ('User Information', {'fields': ('first_name', 'last_name', 'email',),}),
    )
    readonly_fields = ('first_name', 'last_name', 'email',)

    def first_name(self, obj):
        obj.user.first_name

    first_name.short_description = 'First Name'

    def last_name(self, obj):
        obj.user.last_name

    def email(self, obj):
        obj.user.email

and related model code is here:
class OrderDetail(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE)

A: You did not return anything from these functions:
def last_name(self, obj):
    return obj.user.last_name


text:
Q: Scala Why does the List class define a toList Method? The scala docs define the following method in class List:
def toList: List[A]

As far as I can tell this method just returns a copy of our initial list.

What is the use case of this method?

A: List extends the GenTraversableOnce trait, which is a common trait for many other traversable collections.
GenTraversableOnce declares a toList method so that all subclasses can be converted into a List. This method must be implemented by List (and indeed - trivially by returning this).

A: Consider something like this:
def bar(strings: List[String]) = strings.foreach(println)
def foo(ints: Seq[Int]) = bar(int.map(_.toString).toList)

foo(List(1,2,3))
foo(1 to 3)
foo(Stream.from(1).take(3))

etc.
foo accepts a Seq of ints, converts them to strings, and calls bar, that wants a List.
You can send any kind of Seq to foo, and it uses .toList to convert it to a List before invoking bar, because that's the only type it will accept. Now, if the argument to foo happens to already be List (like in the first example above), it will end up calling List.toList, which is just a nicer, more elegant alternative to making a special case in the code to check the concrete type of the argument.


text:
Q: Insert XML node in the second node, of two identical nodes I am programmatically editing an xml file with XML Starlet. I have the following XML document:
    <manifest>
            <application>
                    <activity>
                            <intent-filter>
                                   <action/>
                                   <category/>
                            </intent-filter>
                            <intent-filter>
                            </intent-filter>
                    </activity>
            </application>
    </manifest>

I'm trying to add a new <action> tag to the second <intent-filter> node. How do I do that without creating a node in the first <intent-filter> inadvertently?
Expected output:
    <manifest>
            <application>
                    <activity>
                            <intent-filter>
                                   <action/>
                                   <category/>
                            </intent-filter>
                            <intent-filter>
                                   <action/>
                            </intent-filter>
                    </activity>
            </application>
    </manifest>

I've reviewed the documentation at: http://xmlstar.sourceforge.net/doc/xmlstarlet.txt Yet, I appear to be missing the solution for this situation.
Thanks!

A: Figured it out, I was actually having an XPath problem!
xml ed -s "(/manifest/application/activity/intent-filter)[2]" -t elem -n action -v "" manifest.xml

Although please do chime in if there is another canonical way of achieving this action.


text:
Q: Django Rest Framework Serializer I'm using Django Rest Framework, i'm trying to get some field from my models
class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Student
        ordering = ['score' , 'username']
        fields = ('id', 'username', 'user' ,'first_name', 'last_name', 'reg_number' ,'score', 'classroom')

my problem is that i get just :
-id
-username
-first_name
-last_name
-score
but i can't get the reg_number and classroom
even if i delete all fields :
class StudentSerializer(serializers.ModelSerializer):
    class Meta:
        model = Student
        ordering = ['score' , 'username']

i get the some result.
I have this problem just with 3 models : User & Student & Professor ( Student and Professor are inhereted from User )
my student model :
class Student(User):
    reg_number = models.IntegerField()
    classroom = models.ForeignKey(Classroom)
    score = models.IntegerField(default=0)
    skills = models.TextField(blank=True)
    interest = models.TextField(blank=True)
    about = models.TextField(blank=True)
    projects = models.TextField(blank=True)

A: Can you include your student model definition.?? The reason may be ur student model contains reverse relationship in any other models. You have explicitly include that field in serializer. Checkout reverse relations topic in following link
http://www.django-rest-framework.org/api-guide/relations/#reverse-relations


text:
Q: Apache Reverse Proxy with Node JS and Socket IO spawning lots of httpd_prefork processes I'm attempting to setup a reverse proxy using Apache for my Node JS app, which uses Socket IO (and is written in Koa v1.x).
This works great if I don't use Socket IO; but when I do use it, I am running into big issues with Apache spawning lots of http_prefork processes - to such an extent, that it maxes them out (my config is 150), and Apache just hangs forever until I restart it.
My hunch is that Socket IO is keeping the processes open, so when my app gets more than 150 connections, it gets upset and hangs - leading me to believe I am doing something wrong...
Has anyone else experienced the same issue as me, and if so - is it resolvable, or do I simply up the maximum number of prefork processes indefinitely (feels wrong).
I'd normally use Ngnix for reverse proxy - it seems to play nicer in my experience (and I haven't ran into this issue) - but unfortunately, installing it on the server my app is running on is out of the question.
Here's a part of my apache config:
ProxyRequests        off
ProxyPreserveHost    on
RewriteEngine        on

RewriteCond         %{QUERY_STRING}     transport=polling           [NC]
RewriteRule         /(.*)               http://localhost:5000/$1    [P]
RewriteCond         %{HTTP:Upgrade}     websocket                   [NC]
RewriteRule         /(.*)               ws://localhost:5000/$1      [P]
ProxyPass           /my-app/            http://localhost:5000/
ProxyPassReverse    /my-app/            http://localhost:5000/

# Redirect to fully-qualified domain name for HTTPS
Redirect permanent  /my-app             https://[fqdn]/my-app/

Here's a couple of snippets of my Koa app too and how I use Socket IO.
I've removed some parts to avoid over complicating, but can include more if required.
app.js
'use strict';
const app    = koa();
const server = http.createServer(app.callback()).listen(process.env.PORT || 5000, => {
    console.log('HTTP Server started...');
    const io = require('./io')(server);
});

io.js
module.exports = (server) => {
    const io = require("socket.io")(server);

    // Catch errors
    io.on("error", (err) => {
        console.error(err);
    });

    // On connection
    io.on("connection", (socket) => {

        console.log("[SOCKET IO]: A user has connected with ID:", socket.id);

        // Join a room event with callback emit of 'room-joined'
        socket.on('join-room', (roomName) => {
            console.log(`A user is joining a room with the name ${roomName}`);
            socket.join(roomName);
            socket.emit('room-joined', roomName);
        });

    });


text:
Q: Uncaught ReferenceError: rgba is not defined I am attempting to make a simple animation that would change a color of a font, but I am struggling with said reference error. Can anyone point me to the right direction, please? I have already installed color animation jQuery-plugin.
HTML:

ABOUT US

CONTACT

JS:
$('.menu').find('a').on('mouseenter', function() {
    $(this).css({color: rgba(239, 231, 35, 0.8)});
});

A: Since you're using jQuery color animation, then the below code would do the trick:
$(this).animate({color: 'rgba(239, 231, 35, 0.8)'});

A: Your JavaScript code is missing some quotes.
Change this line:
$(this).css({color: rgba(239, 231, 35, 0.8)});

To this:
$(this).css({'color':'rgba(239, 231, 35, 0.8)'});


text:
Q: Using HDF5 from C# for realtime data I am able to store HDF5 data using the .net version of HDF5. The problem is, that data is in an array, after which I write it out to the HDF5 file.
Is there a way to continuously add data to HDF5 in realtime from C#? From what I see on the internet, this is handled by packet table, but I don't see that it is part of the dotnet port?

A: In hdf5 you can append datasets to an already existing dataset. It is a lot of work to implement it with the low-level methods of the Hdf.Pinvoke library. I have created a library that adds a layer around these methods to make it easier to read and write hdf5 files. HDF5DotNetTools. It's still an early version but you can append data to a file.
There's an example of appending data to existing data in the readme and also in the unit tests of the project.
Here's part of the code:
int fileId = Hdf5.CreateFile(filename);
// Create a dataset and append two more datasets to it.
// The dsets list are three 10 by 5 matrices
using (var chunkedDset = new ChunkedDataset<double>("/test", fileId, dsets.First()))
{
  foreach (var ds in dsets.Skip(1))
    chunkedDset.AppendDataset(ds);
}
Hdf5.CloseFile(fileId);

A: To continuously add data to HDF5 in real-time (and without knowing how many rows of data exist a priori) you need to work with an extendible dataset.
Assuming that you are not bound to a particular API, take a look at HDFql as it may greatly alleviate you from the low-level details of HDF5. Using HDFql in C# your use-case could be solved as follows (this is just an example - we assume that you have a function named acquire that populates variable values with a timestamp (UNIX Epoch Time) and an acquired value):
using System.Runtime.InteropServices;
using AS.HDFql;

// declare structures
[StructLayout(LayoutKind.Sequential, Pack = 0)]
struct Data
{
    public int timestamp;
    public float reading;
}

public class Example
{
    public static void Main(string []args)
    {
        // declare variables
        Data values;
        int number;

        // create an HDF5 file named 'data.h5' and use (i.e. open) it
        HDFql.Execute("CREATE AND USE FILE data.h5");

        // create a dataset named 'dset' of data type compound composed of two members named 'timestamp' (of data type int containing a UNIX Epoch Time)
        // and 'reading' (of data type float containing an acquired value). The dataset starts with 0 rows and can grow (i.e. be extended) in an unlimited fashion
        HDFql.Execute("CREATE DATASET dset AS COMPOUND(timestamp AS INT, reading AS FLOAT)(0 TO UNLIMITED)");

        // register variable 'values' for subsequent use (by HDFql)
        number = HDFql.VariableRegister(values);

        // call hypothetical function 'acquire' that populates variable 'values' with a timestamp and an acquired value
        while(acquire(values))
        {
            // alter (i.e. change) dimension of dataset 'dset' to +1 (i.e. add a new row at the end of 'dset')
            HDFql.Execute("ALTER DIMENSION dset TO +1");

            // insert (i.e. write) data from variable 'values' into the last row of dataset 'dset' (thanks to a point selection)
            HDFql.Execute("INSERT INTO dset(-1) VALUES FROM MEMORY " + number);
        }
    }
}

Please check HDFql reference manual to get additional information on how to work with extendible datasets using this library.