In  question it was proved that limit $$ \lim_{x\to\infty}\sin x $$ doesn't exists. What about $$ \lim_{n\to\infty}\sin n? $$ I asking about usual limit, where $n$ is integer. I know that this limit doesn't exists, I want to see different proves. My first idea was to use Kronecker's approximation theorem, but it's not very suited for such simple question.

Using only the delta definition of a limit, how can we prove that the sequence $\{a_n\}$, where $a_n = \sin n$, as $n$ tends to infinity does not have a limit?  Thanks!


I have following class structure  public class OfferModelCollection {     List<OfferModel> offers = new List<OfferModel>(); }  public class OfferModel {      public int ID { get; set; }      public ProviderModel Provider { get; set; }      public ProviderType ProviderType { get; set; }   //Enum  }  public class ProviderModel : BaseModel, IIdentity {      public string ProviderCode { get; set; }      public string ProviderName { get; set; }    }   I am now trying to update ProviderType of those offers whose Provider.ProviderCode matches to some string value. How can I achieve it in LINQ?  Something like this:  offersVM.Offers.Where(x=>x.Provider.ProviderCode.Contains("p10"))).ProviderType = ProviderType.Default;

Is there a way to do the following using LINQ?  foreach (var c in collection) {     c.PropertyToSet = value; }   To clarify, I want to iterate through each object in a collection and then update a property on each object.  My use case is I have a bunch of comments on a blog post, and I want to iterate through each comment on a blog post and set the datetime on the blog post to be +10 hours. I could do it in SQL, but I want to keep it in the business layer.


is really a weird topic, if we try to find out that is it time or time interval.  It is the time taken by light to travel a Planck LENGTH so it must be time interval. But we also know that Planck length is MOST FUNDAMENTAL and it can't be differentiated anymore. So what's the reality?

On a quantum scale the smallest unit is the , which is a discrete measure.  There several question that come to mind:   Does that mean that particles can only live in a discrete grid-like structure,  i.e. have to "magically" jump from one pocket to the next? But where are they in between? Does that even give rise to the old paradox that movement as such is impossible (e.g. )? Does the same hold true  for time (i.e. that it is discrete) - with all the ensuing paradoxes? Mathematically does it mean that you have to use difference equations instead of differential equations? (And sums instead of integrals?) From the point of view of the space metric do you have to use a discrete metric (e.g. the ) instead of good old Pythagoras?   Thank you for giving me some answers and/or references where I can turn to.  Update: I just saw this call for papers - it seems to be quite a topic after all: Is Reality Digital or Analog? FQXi Essay Contest, 2011. , , . One can find some pretty amazing papers over there.


Let $A_1, A_2, \ldots$ be events with $A_n\in\mathcal{F}_n$. Show that    $$\biggl\{\sum_{n=1}^\infty \mathbf{P}[A_n|\mathcal{F}_{n-1}]=\infty\biggr\} = \limsup_{n\rightarrow\infty} A_n \text{ a. s.}$$      Hint: Consider the martingale $X_n = \sum_{i=1}^n \bigl(1_{A_i} - \mathbf{P}[A_i|\mathcal{F}_{i-1}]\bigr)$.   I don't even know how to start with this exercise. I think one has to use the result that martingales with bounded increments either converge or diverge to $\pm \infty$ almost surely.  Can you give me a hint? Thanks for your time.

A generalized version of the second Borel-Cantelli lemma says     Theorem 5.3.2. Second Borel-Cantelli lemma, II. Let $\mathcal F_n, n \ge 0$ be a filtration   with $F_0 = \{\emptyset, \Omega\}$ and $A_n , n \ge 1$ a sequence of events with $A_n ∈ \mathcal F_n$ . Then   $$ \{A_n \,i.o.\} = \left\{\sum_{n \ge 1} P (A_n |\mathcal F_{n−1}) =\infty \right\}. $$   An exercise of this lemma is     Exercise 5.3.6. Show    $\sum_{n \ge 2} \mathbb P (A_n | \cap_{m=1}^{n−1} A_m^c ) = \infty$ implies $P (∩_{m \ge 1} A_m^c ) = 0$.   I think we can actually prove that $\cap_{m \ge 1} A_m^c = \emptyset$. My proof is like this: Let $B_n = \cup_{m = 1}^n A_n$. Let $\mathcal F_n = \sigma(A_1,\dots,A_n)$, which forms a filtration. It is easy to verify that $$ \mathbb P (A_n | B_{n-1}^c ) = \mathbb P (A_n | \mathcal F_{n-1})(\omega) $$ when $\omega \in B_{n-1}^c$.  Assume there exist $\omega \in \cap_{m \ge 1} A_m^c$. It follows from the previous lemma that $$ \omega \in \left\{\sum_{n \ge 1} P (A_n |\mathcal F_{n−1}) =\infty \right\} = \{A_n \,i.o.\}. $$ In other words, $\omega \in \cap_{m \ge 1} \cup_{n \ge m} A_n$, which contradicts $\omega \in \cap_{m \ge 1} A_m^c$.  Is this the right proof?


Is it possible to have Unity and Gnome3 installed at the same time, and then be able to switch between them?  I currently running Ubuntu 13.04 with Unity, and really want to try the Gnome3 desktop, but I still wan't to be able to use unity if I don't like it.

Im currently using Ubuntu 11.10 (on Mac on Virtual Box) and thinking of installing Gnome Shell because of its similarity with Mac interface.  If i install Gnome Shell will I need to reinstall printer, webcam drivers, etc.?  Also, will I be able to switch back and forth between Unity & Gnome Shell.


ItemClass for ArrayList  public class ItemClass { ...     private String mNomenclatureBrand; ...     public ItemClass(... String NomenclatureBrand ...) {         ...         mNomenclatureBrand = NomenclatureBrand;         ...     }     ...     public String getNomeclatureBrand() {         return mNomenclatureBrand;     }     ... }   ArrayList nomenclatureList   nomenclatureList.add(new ItemClass(                 ...                 "Alex",                 ...  nomenclatureList.add(new ItemClass(                 ...                 "Gustiyar",                 ...   For search "Alex" (getNomeclatureBrand) in this ArrayList I use  for (ItemClass d : nomenclatureList) {     if (d.getNomeclatureBrand() != null && d.getNomeclatureBrand().equals("Alex")) {         int size = nomenclatureList.size();         Toast.makeText(this, "OK", Toast.LENGTH_SHORT).show();         TextView nomenclarureBrand = findViewById(R.id.nomenclatureBrand);         nomenclarureBrand.setBackgroundColor(Color.GREEN);     } }   But app crash in  nomenclarureBrand.setBackgroundColor(Color.GREEN);   How can I fix it?

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am trying to prove this statement.   for any $a,b \in \mathbb{R}$, $$\max\{a,b\}=\frac{1}{2}\big(a+b+|a-b|\big)$$  and $$\min\{a,b\}=\frac{1}{2}\big(a+b-|a-b|\big)$$  I am eating myself not knowing where and how to start. For any guidance Iwill be thankful in tons

Show that the $\max{ \{ x,y \} }= \dfrac{x+y+|x-y|}{2}$.   I do not understand how to go about completing this problem or even where to start.


I made a document in word and then in a rush I had to change it to Latex, I do not have time to use the bibtex for my references, so I just copy and paste them from word. The problem that I got is that my references are appearing like this:  but I would like them to appear like this:  I am a newbie in latex, so I would like to know how can I do to move the [] to the left and indent the text to the right, so that it appears like the model that I want it to be.

I want to make an enumerated list in the following format:  [1] foo foo [2] foo foo ...    How I can do that using enumerated lists? I have tried the following:  \begin{enumerate}[\left[ 1 \right]]   but it does not work.


so i have been experimenting A LOT with blender but this has got me stumped. I'm trying to make this character open his mouth very far (to his legs) and im wondering what the best way to go about this while also keeping the Lips and the body separate from each other. Any help i would very much appreciate.

Setting a fill and border is pretty easy in apps like Illustrator and Gravit Designer but in Blender. I've found it to be more tedious as I can't find anything online to solve this problem.  The picture above is a simple 2d mouth with lips. I would like to be able to move the lips and still have a fill but in Blender I needed to add another path for the mouth. Is there anyway I can move my lips path while having it also take the exact same shape (but not material) as my mouth's path?    (454.2 KB)  I work in Blender 2.79 cause 2.8 doesn’t run well on my laptop at all.


I want to install Ubuntu 12.04 in my laptop replacing my existing windows 8 PRO (am not affected by the UEFI since my laptop was a Windows 7 intial laptop). However I have several partitions in my hard disk as shown in the link below where C: is where my windows 8 is installed and D: is where my backup is, there is also a System Reserve partition. I do not want to loose any of my backup data in D: How can I install Ubuntu without loosing this data?and once I install ubuntu will I be able to access the partition D:?

I am a newbie in linux. I wanted to install ubuntu to my desktop. I currently have two partitions, Windows 8 in installed on one, and i have some important files in another partition. While installing ubuntu, if I chose "Replace Windows 8 with Ubuntu", do I lose the other partition too?   And are there other ways to leave the other partition as it is, and install ubuntu in the partition  where windows was installed.


I refer to a shot that occurs quite often in crime shows...    There is the victim at the hub and spokes of red yarn that connect the suspects. How realistic is this in modern detective work?  I have read these articles:         All of which suggest in a vague and noncommittal way that this technique is more about narrative exposition for the television viewer rather than a detective's tool. Can someone confirm and explain?

I have seen in a lot-lot of movies that the person who searches for a crime or another person creates a web of red tape or wire around the newspapers and evidence he acquires. I never guessed its usefulness and am therefore asking why do they do it?  Here is an illustration I created:


My charger is lost so I am using a charger with an output of 5.5v and 0.6A. My real charger  gives an output of 5V and 0.7A. Will the other charger damage my phone?

My friend and I both have droids and we often user each other's wall chargers out of convenience. I was told that it's possible that my phone might explode if it's charged with a charger that wasn't built specifically for my phone. How true is this across droids?


Focus on fields in which you can become good at. vs Focus on fields that you can become good at.

I am confused about when to use:  'which' vs 'in which' vs or 'that'?    Would you please explain it as a writing rule? Here I have an example:       Authors reported shortened growth period and slower radial growth rate for low soil water potential which is directly attributed to the decrease in water potential, rather than to the constraints on carbon availability.


$X_1, X_2, ..., X_n$ are i.i.d random variables with mean $\mu$ and variance $\sigma^2$. $\bar{X_n} = S_n/n$ where $S_n = X_1 + X_2 + ... + X_n$. Show that   $$ E\Big[\sum_{i=1}^{n}(X_i - \bar{X_n})^2\Big] = (n-1)\sigma^2 $$  Attempt:  $$ E\Big[\sum_{i=1}^{n}(X_i - X_n)^2\Big] = E\Big[\sum_{i=1}^{n}~X_i^2 - 2X_i\bar{X_n} + \bar{X_n}^2\Big] \tag{1} $$  $$ = \sum_{i=1}^{n}E\Big(X_i^2 - 2X_i\bar{X_n} + \bar{X_n}^2) \tag{2} $$  $$ = \sum_{i=1}^{n}\Big(E(X_i^2) - 2E(X_i\bar{X_n}) + E(\bar{X_n}^2)\Big) \tag{3} $$  I don't know how to proceed.

If $X_1,...,X_n$ are iid, what is the mean of the following variable:?  $ \sum (X_i - \bar{X})^2$  I know the answer is $\sigma^2(n-1)$, but how is this calculated in general? If I expand, I get the variables squared, and that turns quite ugly. What's the trick here?


I have a VM config currently where I have 1 external IP pointing to a VM with an Nginx HTTP Reverse proxy serving HTTP Web Pages from several internal VMs without external IPs.  I need a similar setup to re-direct SSH requests to certain hostnames to internal servers, this is for a hosted git repository which sits behind by proxy and thus has no external IP of its own, so I require some kind of iptables rule to allow me to reverse proxy/forward SSH requests to corresponding VMs.  Can anybody point me in the right direction?

I've grown quite fond of HTTP reverse proxies in our development environment and found the DNS based virtual host reverse proxy quite useful. Having only one port (and the standard one) open on the firewall makes it much easier for management.  I'd like to find something similar to do SSH connections but haven't had much luck. I'd prefer not to simply use SSH tunneling since that requires opening port ranges other than the standard. Is there anything out there that can do this?  Could HAProxy do this?


I know this is probably a super easy answer, but I can't find it anywhere. How do I turn the shading off on objects when I got them in texture mode? I want to fully see the texture without the crazy dark shadows; preferably no shadows at all.  Thanks.

I'm trying to display models that have shading drawn or baked directly on the textures, but I can't figure out how to disable Blender's default scene lighting. If there are no lights in the scene, everything is black, but I want to see the textured objects fully bright. How do I disable the lighting?  NOTE: Just before posting this, I found the "Shadeless" material property, which does more or less what I want. However, is there a way to globally toggle the default lighting?


I made an admin account on my computer but can't remember the password. now i can't get into my control panel.

I accidentally disabled my admin account.  After I login to another account I found I can not get admin rights, because all admin accounts on my computer are disabled.  I clicked on 'run as administrator' but only see a smart card choice (all the admin accounts are disabled so no choice provided)    I don't want to re-install my OS, help!    Details:  I have account A on my computer.    I got a new computer so I want to give the old one to my mother.    Creating a new user account B for her and disable account A.    Logout and restart.    Successfully login B, now I found I could not get admin rights because no account choice is provided.    More informations about my machine:  OS is Windows 10 and my admin account is a Microsoft Account.  I have an arch-linux installed on my computer and dual-boot it using GRUB, so maybe I can not use safe mode.


So I recently started using bleder and decided to make a Lightsaber, However after a bit of time modeling i found that the end had a slightly black flicker effect, can any fix this please. Thanks -Jake.

I was following  on creating a watch and noticed that when I rendered the watch, some pieces were messed up.  I'm new to 3D modeling and I've just learned Blender, I can't explain it well, so here's a picture:    Other examples:     I don't know if it's a problem with my World texture, the object, or the object's texture/material, so I can't even guess how to fix it. What causes this? Is it possible to fix it?


Is there any reference or evidence in the Harry Potter universe where a wizard produces more than one patronus, one after the other or simultaniously?

In Harry Potter, we do not see or hear about anyone conjuring more than one Patronus (that I remember), except for Professor McGonagall:     'We must alert the other Heads of House. You’d better put that Cloak back on.’      She marched towards the door, and as she did so she raised her wand. From the tip burst three silver cats with spectacle markings around their eyes. The Patronuses ran sleekly ahead, filling the spiral staircase with silvery lights, as Professor McGonagall, Harry and Luna hurried back down.      -Deathly Hallows - page 480 - Bloomsbury - chapter 30, The Sacking of Severus Snape   How is it that she was able to produce more than one?  We know that it takes a seeming amount of energy to produce one:   Also her Patronuses (Patronii?) were small; could this have helped?


Say $R$ is an integral domain and $k$ is a field.  Is it true that if $\bar{k}\supseteq R\supseteq k$, then $R$ is a field?  I'm not sure how to show this immediately, and it seems to be implied in the textbook, or else they are using some other facts not listed.

This is an exercise in some textbooks.     Let $E$ be an algebraic extension of $F$. Suppose $R$ is ring that contains $F$ and is contained in $E$. Prove that $R$ is a field.   The trouble is really with the inverse of $r$, where $r\in R$. How to prove that $r^{-1}\in R$, in apparent lack of a characterization of $R$.  It occurred to me to use the smallest field containing $R$ ($R$ is easily shown to be an integral domain), that's the field of quotients, and proving that it's $R$ itself, but I don't really know how to proceed.  A not-too-weak, not-too-strong hint will be much appreciated.   Beware $ $ Readers seeking only hints should  beware that there is now a complete answer.


$\{ (x,y,z) \in \mathbb R^3 : x^2 + y^2 + z^2 = 1 \}$ in the Euclidean Topology $\{ (z_1,z_2,z_3) \in \mathbb C^3 : z_1^2 + z_2^2 + z_3^2 = 1 \}$ in the Euclidean Topology. $\prod_{n=1}^{\infty} A_n$ with product topology , where $A_n = \{0,1\}$ has discrete topology  for $n = 1,2, \dots$ $\{ z\in \mathbb C : Re z \leq \alpha \}$ in the Euclidean topology for some fixed positive real number $\alpha$.   I think   For 1) and 2)  I know that any subset in $\mathbb R^n$ which is closed and bounded iff it is compact.  for 3)   Since $A_n$ is a finite discrete topological space . So it is compact. So by Tychnoff's Theorem $\prod A_n$ is compact.  for 4)  Since $K= \{ \alpha + i n : n \in \mathbb N \}$ is a subset of the given set which is unbounded. So it is not comact.  Please check my Solution, If you find any error  , then correct me. Thank you

Which of the following sets are compact:   $\{(x,y,z)\in \Bbb R^3:x^2+y^2+z^2=1\}$ in the Euclidean topology. $\{(z_1,z_2,z_3)\in \Bbb C^3:{z_1}^2+{z_2}^2+{z_3}^2=1\}$ in the Euclidean topology. $\prod_{n=1}^\infty A_n$ with the product topology where $A_n=\{0,1\}$ has discrete topology. $\{z\in \Bbb C:|\operatorname{Re} z |\leq a \}$ for some fixed positive real number $a$ in the Euclidean topology.   $1$ is closed and bounded and hence compact,$2$ is closed but not bounded and hence not compact.  $3$ is compact by Tychonoff Theorem and $4$ is not bounded and hence not compact.  Are these correct?


In the Eloquent Javascript book I came across this code. I understood how this works and the passing of arguments but what I am unable to understand is author's statement regarding this code that it's a function which can create another function!   My question is: How is it creating a new function? What is happening which the author is calling creation of a new function? I mean sure we are creating a function called greaterThan and it has another function in it but I can't see how greaterThan is creating another function!  I assure you I have read many similar Qs before asking but couldn't find the answer I am looking for. Thank you for your time & help.  function greaterThan(n) {   return function(m) {     return m > n;   }; } var greaterThan10 = greaterThan(10); console.log(greaterThan10(11)); // → true

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I started the Android language Studio and I only need one step to finish this first TD.  Here are the instructions from TD:  In MainActivity, create an array of Boolean values mQuestionTrichee, to browse with variable mIndexActuel  ok, so here that's I did:  private static final String A_TRICHE = "a triche"; private boolean[] mQuestionTrichee = new boolean[mTabQuestions.length];   After, I have the value of Question Cheat [mIndexActuel] in the Bundle in the onSaveInstanceState () method:  @Override protected void onSaveInstanceState(Bundle outState) {     super.onSaveInstanceState(outState);     Log.i(TAG, "onSaveInstanceState");     outState.putInt(KEY_INDEX, mIndexActuel);     outState.putBoolean(A_TRICHE, mQuestionTrichee[mIndexActuel]); }   So, then, I have to get its value in onCreate ():     @Override protected void onCreate(Bundle savedInstanceState) {      super.onCreate(savedInstanceState);     Log.d(TAG, "onCreate appelee");     setContentView(R.layout.activity_main);     mQuestionTrichee[mIndexActuel]=savedInstanceState.getBoolean(A_TRICHE);   }   but I have this error later:      java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.os.Bundle.getBoolean(java.lang.String)' on a null object reference   I tried to browse my table in the method onCreate () or onSaveInstanceState () but nothing changed I still have it.  Here's what I added:       if(savedInstanceState != null)     {         for(mIndexActuel=0; mIndexActuel < mTabQuestions.length; mIndexActuel++)         {             if(mQuestionTrichee[mIndexActuel]==true)             {                 mQuestionTrichee[mIndexActuel] = true;             }             else             {                 mQuestionTrichee[mIndexActuel] = false;             }         }         mIndexActuel = savedInstanceState.getInt(KEY_INDEX,0);         mQuestionTrichee[mIndexActuel] = savedInstanceState.getBoolean(A_TRICHE);     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I appear to be having issues with group membership for the single user on my Ubuntu laptop. I found this initially when trying to access a USB stick and finding I was getting access denied. I checked I was a member of the group the device was being assigned when mounting but I can only access with sudo or by changing the permissions to o+rw  I've just installed docker and again I can only run under sudo as running as an unprivileged account gives an access denied error to the docker.sock file. Weirdly when I query my groups I get none but when I query for the user I am logged on as I get them. It appears as though there is some problem with assigning groups to the logged in account. This has been happening for several weeks and I've logged off/rebooted many times.  lsb-release  DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"   File permissions  $ ls -l /var/run/docker.sock  srw-rw---- 1 root docker 0 Oct 22 09:14 /var/run/docker.sock   User  $ whoami rob   Groups  $ groups rob   but  $ groups rob rob : rob adm disk dialout cdrom sudo audio dip video plugdev netdev fuse lpadmin scanner sambashare vboxusers docker   Is there something corrupted here?

Ubuntu 16.04.5  Very weird situation - after Xorg crash, now every time when I login into Unity, my user account doesn't have it's system groups like adm, sudo, plugdev, fuse etc. But when I login on virtual console (Alt+F1) or over SSH - all my additional groups are there, as reported by id command.  Neither of /etc/group* or /etc/gshadow* files have changed, my user is still listed there in many system groups.  It looks like some systemd session parameters for GUI logins or lightdm cache files got screwed. But I have no idea where to start looking..  A lightdm log:  $ journalctl -au lightdm  -- Reboot -- systemd[1]: Starting Light Display Manager... systemd[1]: Started Light Display Manager. lightdm[3223]: pam_kwallet5(lightdm-greeter:setcred): (null): pam_sm_setcred lightdm[3223]: pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0) lightdm[3345]: pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user "chm" lightdm[4867]: pam_ecryptfs: Passphrase file wrapped lightdm[3345]: pam_kwallet5(lightdm:auth): (null): pam_sm_authenticate lightdm[3345]: pam_kwallet5(lightdm:setcred): pam_kwallet5: pam_sm_setcred lightdm[3345]: pam_unix(lightdm:session): session opened for user chm by (uid=0) lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Error writing to daemon: Bad file descriptor lightdm[3046]: Failed to write utmpx: Permission denied


The description of the Tumbleweed badge says:     Asked a question with zero score, no answers, no comments, and low   views for a week.   If I get 1 up-vote and 1 down-vote, then the total score is 0.  Am I still eligible for the Tumbleweed badge?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I noticed that the count update and awarding of vote related badges like the following is slow / flaky:  Civic Duty Vox Populi Suffrage  For instance, one day I had completed 40 max votes, but the count showed 39 till the next day. And finally on the next day after a few more votes the Vox Populi badge was awarded. Is there a bug or does the calculation take time or does it have to go through moderators to work?

Some badges are not awarded after the event has happened.  They require analysis, some of them are Suffrage, Tenacious, Unsung Hero, Quorum...  These calculations are triggered by some schedules.  What are theses badges? When are those calculated?


I created an image in illustrator, which I have included here:  Note that the white space in this image is empty and is not a white color fill. I am importing this image as an SVG into illustrator. What I am trying to do is to take the tracing of this image, turn it into a mesh, and extrude it. However, whenever I import the image into blender, I get this:  Notice how the imported SVG fills in the shape instead of it just creating a tracing of this shape like I have created in illustrator. Is there any way for me to create a mesh where it is just the tracing of this image? Thanks in advance! Also let me know if I need to clarify.

I'm having a big problem with the bezier curves in Blender. I'm trying to fill up the curves, but I can't. I have already seen some videos from YouTube, that say that I have to click on the 2D button.    But when i click on the 2D button, this is what it happens.    I thought it was a problem with the camera, but:    What am I doing wrong?


I'm trying to install Ubuntu Server 18.04 on a PC with an old Intel motherboard. The installation finished ok, but at restart it says  no bootable device   I suppose that Ubuntu was installed in UEFI mode and the motherboard only boots in legacy mode.  What should I do?

I would like to see a full how-to guide on how to install Ubuntu.


I want to write a script which gets the latest file from a list of zipped files and then unzip the file  I have tried ls -t1 |  head -n 1 -exec unzip {} -->  to get the latest zipped file. and unzipping it but it is not working

I have created two files:  sample.txt and sample.txt  (the second file contains some hidden characters, e.g. a space). How can I remove the latest modified file? I'm using Linux.


I am thinking of buying a camera to learn photography. Most of the time I'll be shooting portraits and landscapes. But I am not sure where I should start. Most of my friends tell me that I should get an entry level DSLR, but I am not sure if I have the persistence and enthusiasm to carry it all day in a backpack. But the camera on my cellphone doesn't seem to be enough to begin with.  So what I want is some expert advice (preferably with professional experience). Can most compact fixed-lens or mirrorless cameras fit the situations I mentioned? Or do I really need to go to a DSLR to get a tool to learn photography?

I'm really interested in getting into serious or even professional photography. I've read some articles about fundamental concepts like aperture, exposure, ISO sensitivity, etc., and I want to get the feeling of how changing different setting affects the resulting picture.  My point-and-shot camera has a manual mode but it seems like no matter what kind of settings I select, I always get worse results than if I shoot in auto mode.  Some people claim that manual mode on point-and-shoots is a joke. Should I get a "real camera"?


I am trying to query counts of an custom object records but i also need to filter out the records. so when i am using single quotes for where clause getting error as:     Error: dailyHLAReportDashboardController Compile Error: expecting a   right parentheses, found 'Active' at line 6 column 201   I am trying to use below statement in visualforce controller.  Integer HLA_Signed_By_Customer = database.countQuery('Select id from Hardware_Loan_Agreement__c where CreatedDate>=:Date.today().addDays(-5) and CreatedDate<=:Date.today() and Primary_Status__c = 'Active'');   How can I fix this error?

Declared a string and assigned SOQL value as shown below. While running I am getting an error.   String country = 'United States'; String accountQuery = 'SELECT Id,BillingPostalCode,County_Name__c '+      'FROM Account WHERE zipCodeLen__c =9 AND AND BillingCountry = '+ Country;   System.QueryException: unexpected token: 'AND'  System.QueryException: expecting a colon, found 'United'


I thought using \pgfkeysvalueof on a key that does not have a /.store in and the variable of a key that does have a /.store in would give the same result. This seems not to be the case.  This example, using /.store in for the key overlay works like a charm:  \documentclass{article} \usepackage{tikz} \usepackage{etoolbox} \usepackage{overpic}  \pgfkeys{     /icon/.cd,     width/.initial,     overlay/.initial,     overlay/.store in=\iconoverlay,     set defaults/.unknown/.code={\pgfkeys{/icon/\pgfkeyscurrentname/.default=#1}} } \newcommand\icondefaults[1]{%     \pgfkeys{/icon/set defaults/.cd, #1}% } \newcommand\ifkeyempty[3]{%     \pgfkeysgetvalue{#1}{\keyvalue}%     \ifempty{\keyvalue}{#2}{#3}% } \newcommand\ifempty[3]{%     \def\novalue{\pgfkeysnovalue}%     \def\empty{}%     \ifboolexpr{test {\ifdefequal{#1}{\empty}} or test {\ifdefequal{#1}{\novalue}}}{#2}{#3}% } \newcommand{\icon}[2][]{%     {%         \pgfkeys{/icon/.cd,width,overlay,#1}% Reset to default values         \def\options{}%         \ifkeyempty{/icon/width}{}{\edef\options{width=\pgfkeysvalueof{/icon/width},\options}}%         \ifempty{\iconoverlay}{%             \edef\graphic{\noexpand\includegraphics[\options]{#2}}%         }{%             \edef\overlay{\noexpand\begin{overpic}[\options]{#2}}%             \def\graphic{\overlay\put(0,0){\iconoverlay}\end{overpic}}%         }%         \graphic%     }% }%  \begin{document}  \icondefaults{width=6cm} \icon{example-image} % Image gets default width 6cm \icon[width=2cm,overlay={\icon{example-image-overlay}}]{example-image} % Image gets width 2cm, while the overlaid image gets default width 6cm \icon{example-image} % Image gets default width 6cm  \end{document}   While this example does not work. The only difference is that /.store in is not used for the key overlay, and hence \pgfkeysvalueof is used to access the value of the key. It results in an error TeX capacity exceeded.  \documentclass{article} \usepackage{tikz} \usepackage{etoolbox} \usepackage{overpic}  \pgfkeys{     /icon/.cd,     width/.initial,     overlay/.initial,     set defaults/.unknown/.code={\pgfkeys{/icon/\pgfkeyscurrentname/.default=#1}} } \newcommand\icondefaults[1]{%     \pgfkeys{/icon/set defaults/.cd, #1}% } \newcommand\ifkeyempty[3]{%     \pgfkeysgetvalue{#1}{\keyvalue}%     \ifempty{\keyvalue}{#2}{#3}% } \newcommand\ifempty[3]{%     \def\novalue{\pgfkeysnovalue}%     \def\empty{}%     \ifboolexpr{test {\ifdefequal{#1}{\empty}} or test {\ifdefequal{#1}{\novalue}}}{#2}{#3}% } \newcommand{\icon}[2][]{%     {%         \pgfkeys{/icon/.cd,width,overlay,#1}% Reset to default values         \def\options{}%         \ifkeyempty{/icon/width}{}{\edef\options{width=\pgfkeysvalueof{/icon/width},\options}}%         \ifkeyempty{/icon/overlay}{%             \edef\graphic{\noexpand\includegraphics[\options]{#2}}%         }{%             \edef\overlay{\noexpand\begin{overpic}[\options]{#2}}%             \def\graphic{\overlay\put(0,0){\pgfkeysvalueof{/icon/overlay}}\end{overpic}}%         }%         \graphic%     }% }%  \begin{document}  \icondefaults{width=6cm} \icon{example-image} % Image gets default width 6cm \icon[width=2cm,overlay={\icon{example-image-overlay}}]{example-image} % Image gets width 2cm, while the overlaid image gets default width 6cm \icon{example-image} % Image gets default width 6cm  \end{document}   Does anyone know what is the difference between accessing a key's value through \pgfkeysvalueof and through it's /.store in variable?

This is my first foray into the pgfkeys package and I found the following behavior really odd. The Tikz/pgfkeys manual mentions two ways for setting key values: \pgfkeys{key=value} and \pgfkeyssetvalue{key}{value}. When I tried both, they return different values. MWE:  \documentclass{article} \usepackage{tikz}  \pgfkeys{/my color/.initial = red, /my color/.estore in = \mycolor}  \begin{document}  \pgfkeys{/my color=blue} The colors are \mycolor{} and \pgfkeysvalueof{/my color}.  \pgfkeyssetvalue{/my color}{yellow} The colors are \mycolor{} and \pgfkeysvalueof{/my color}.  \end{document}   The output is:  The colors are blue and red. The colors are blue and yellow.   I was expecting all blue on the first line and all yellow on the second. What went wrong?


I have a simple script that calls my onepage-scroll.js script. How can I set the class name for div (which is a container) in case of this script? I've broke my head of trying to solve this problem - unfortunately my javascript knowledge is too poor at the moment and I'd appreciate any help.  jQuery(".main").onepage_scroll({    sectionContainer: "div",         easing: "ease",                   animationTime: 1000,                 pagination: true,                    updateURL: false,                    beforeMove: function(index) {},      afterMove: function(index) {},       loop: false,                         keyboard: true,                      responsiveFallback: false,                            direction: "vertical" });

How can I change the class of an HTML element in response to an onclick or any other events using JavaScript?


Long story:  Tried to install Ubuntu 14.04 desktop. 12 already installed. Dual boot system with Vista.  Install failed. Now I cannot boot to either 14 or Vista. Grub rescue only prompt available.  Tried sudo add-apt-repsotitory ppa:yannubuntu/boot repair. It could not find boot repair Tried update. No go. Tried install. No go. Ubuntu will not install again either.  Desperately need to get windows back. Files system shows Windows system intact. Grub seems to be the issue.

After upgrading Ubuntu 13.10 to 14.04, grub failed to load Ubuntu and threw the error symbol 'grub_term_highlight_color' not found. I followed the solution offered in the  but this failed for me, throwing the error failed to get canonical path of /cow.   Now, I'm trying to install Boot-Repair to fix this problem on a live pen-drive, using these commands.   sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && (boot-repair &)   But after adding and updating the repositories, it shows ppa:yannubuntu/boot-repair 404 Not Found error.  W: Failed to fetch http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/dists/trusty/main/binary-amd64/Packages  404  Not Found   Is this problem solvable or is there an alternative PPA for Boot-Repair?


I get the following error when I run my Perl script:     "Can't locate autovivification.pm in @INC"   How can I install this module on my system?

I get this error:  Can't locate Foo.pm in @INC  Is there an easier way to install it than downloading, untarring, making, etc?


I have downloaded this pdf file with a very long name, which cannot be opened by Adobe Reader or by Adobe Professional because it has "invalid file name".  It cannot be renamed using the DOS prompt but it has "too long name or extension". I tried to delete so that my recovery program can rename then restore it, it but it won't be deleted as a file.   The only way to delete it is by deleting the folder where it was downloaded into (which I did, but restored it later). It can't also be printed or moved or copied to another folder. Is there a way to open or rename these kinds of files?  I tried to rename it by right clicking the title but what appears is a shortened version of the options with no rename function. I then discovered that it has a password protection, which is not provided by the website from which I downloaded it.

Windows seems to have a length limit on file names when trying to delete, though it won't prevent those files from being created.  Our build process creates a number of temporary files (many build off of a WSDL) that run afoul of this limit.  Our ant script is somehow able to delete them when doing a clean, but sometimes I need to delete the workarea directory (where all the temp files go) without actually doing a full clean from ant.  This is the same errors , but the answers there don't really work for me as I'm dealing with a directory, not a file, and I don't always know what specific files or subdirectories are causing the problem.  And I'm trying to avoid any manual process (other than triggering a single command) to actually delete them.  If I try deleting the directory from Explorer I get the error   Cannot delete [file name]: The file name you specified is not valid or too long.   Specify a different file name   Trying Remove-Item in powershell gives the following error:  Remove-Item : The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. At line:1 char:12 + Remove-Item  <<<< -force -Recurse <directory>   Does anyone know of any tools or easy ways to get around this delete error without having to manually find the problem files and move/rename them?


I'm working on a React app where you have a have a form where you can add a new employee and X number of dependents.  In the form, I set a default state like this:  class NewEmployee extends Component {   state = {     employees: [],     costEstimates: { ...emptyCosts },     relationshipOptions: [],     newEmployee: { ...emptyEmployee }   };   That emptyEmployee is coming from a const in a separate file, and it looks like this:  export const emptyEmployee = { firstName: '', lastName: '', dependents: [] };   I do this purely to just try and keep the initial state looking tidy in the code.  My problem is that the dependents array in emptyEmployee is getting modified, and I don't understand how. This is the function getting called when the user clicks to add a new dependent:    handleNewDependent = () => {     const newEmployee = { ...this.state.newEmployee };     // blank dependent for now     const dependent = {       firstName: '',       lastName: ''     };      newEmployee.dependents.push(dependent);      this.setState({ newEmployee });   };   I've pinpointed that this is when the dependents array of my emptyEmployee object gets modified. I don't understand how, since I use the spread operator to make a copy.

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


For example:  $ 2^3 = 2 \cdot 2 \cdot2 $   But what about a fractional power such as:  $$ 2^{2/3} =  ? $$    1) How would I explain this?   2) How would I find value?  3) How would computers calculate this number?

Say you have a number $x^{\sqrt 2}$.  Is there any way to represent this number so that there's no root (or irrational) as the exponent (so that it's easier to understand for me)? I just can't wrap my head around this.  I was thinking something like $$x^{2^{1/2}}$$ and extending on that idea, but I don't know how.  Also, what about for $x^{\sqrt 3}$? Or $x^{\sqrt n}$?


How can the unstable particles of the standard model be considered particles in their own right if they immediately decay into stable particles? It would appear to a layman such as myself that these heavier unstable particles are just transient interplay of the stable forms.

Let me start by explaining my particle physics background is very patchy, so this question may not be as coherent as  I would like it to be.   In general terms, what is the difference between a resonance found during a particle experiment and a particle?   From reading Wikipedia it seems to be mostly based on timescales. If a heavy particle decays quickly, how can we distinguish it from a resonance?  I would not be posting this question except for the fact that the Wikipedia page says "This page has some issues".        and I would be interested in knowing more about the subject.


I'm practicing creating a website, and am currently trying to replicate . At the moment I am working on the navigation bar, but I am unable to vertically align the button vertically in the nav.    .header {   background-color: red;   padding: 40px 20px; }  .header h1 {   background-color: yellow;   float: left; }  .header h1 img {   display: block; }  .header__nav {   background-color: aqua;   float: right; }  .header__nav li {   float: left;   height: 38px; }  .header__nav li a {   padding: 0 20px;   display: inline-block;   line-height: 38px; }  .contents {   background-color: green; }  .footer {   background-color: blue; }

View icons

Buy now

<button class="menu">menu</button>

   contents
    footer        I wanna align the top-right button of the nav bar vertically. I know this can be solved using display: flex;, but I wanna solve it another way. Is there a proper way to solve this issue?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I'm new to Ubuntu and Linux in general and I'm not sure how to go about setting up my wifi. It doesn't detect any networks.   I'm using a late-2013 13.3" macbookpro with retina display, so it doesn't come with an ethernet port. I used this installation guide to dual boot Mac OSx and Ubuntu 14.04.    I have a second computer that runs windows 7 that I'm using to research this and I want to avoid purchasing an ethernet adapter if possible.   I also did not install/download any of the updates as a result.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


In the early days the DC current was dominate, until Tesla came with AC because it can by step up/down by using transformer.  But today with advancing in power semiconductor devices, DC can be easily step up/down, most devices at homes are DC powered(or can be DC), in addition high voltage DC is more efficiency in transmission line(compared with AC) and also is less difficult to synchronize with other DC lines.  So why isn't there a comeback of DC as the main electricity?

Is there a good reason why we are not in the process of completely converting our electrical transmission system to DC? The main reason for using AC on the grid (no offense Tesla, I love you man) was to enable transformation to higher voltages in order to drop line losses (\$P=IE=I^2R\$) and if the conductor size remains the same, when \$E\$ is increased in the equation \$E=IR\$ then \$I\$ must necessarily decrease, in turn decreasing losses as the square of \$I\$). But now we have the ability to transform AC (at all thermal, hydro and wind generators) and DC (at solar generators) to any level of DC we desire and transmit, usually to residential or commercial loads which tend to use DC anyway. If need be it can be converted back to AC at industrial loads (motors usually).  In this way many transformers, capacitors, spacing issues, etc. can be eliminated from the electrical grid, increasing efficiencies dramatically, and in turn decreasing emissions and costs.  Am I missing something here?


I'm having a problem involving formatting a number. Here in Brazil we got a type of document called "CPF", which is a type of personal ID every citizen have.  So here is an example of a correctly formatted CPF number: 096.156.487-09  I'm trying to use a regular expression to format a string containing a CPF number, but I'm having a hard time at it. My current code is returning the unformatted numbers.  For instance: It should output 123.456.789-0 but instead I'm getting 1234567890.  This is my current code:       String cpf ="09551130401";     cpf = cpf.replaceAll("(\\d{2})(\\d{3})(\\d{3})(\\d{4})(\\d{2})", "$1.$2.$3-$4");     System.out.println(cpf);

How do I format a number in Java? What are the "Best Practices"? Will I need to round a number before I format it?  32.302342342342343 => 32.30 .7323 => 0.73  etc.


It's sunday and I left an instance of R running in the office. The script finished running, and I would like to save my workspace without going to the office. I can ssh to the computer, but I have not run the program into screen.  Is there a way, over ssh, to disown the process (I don't have access to jobsid of the terminal the program is running on!) and reattach it with say, reptyr? Reptyr and reptyr -T don't work without previously disowning the process  28845 3diag       20   0  139.3m  10.4m   0.0  0.1   0:12.06 S  `- urxvtd                                                                                5327 3diag       20   0   16.4m   4.6m   0.0  0.1   0:00.02 S      `- bash                                                                                5335 3diag       20   0 3499.3m 3.244g   0.0 43.3 171:57.89 S          `- R    The unique part of my question is that I explicitly require to detach a program without having access to the terminal in which it was created.

I have a running program on a SSH shell. I want to pause it and be able to unpause its execution when I come back.  One way I thought of doing that was to transfer its ownership to a screen shell, thus keeping it running in there.  Is there a different way to proceed?


My mother has forgotten her screen lock password. is a four digit number. how can I reset phone so she can use it again?  Please assist!

I have an Android device which is running Android 4.0.3 (or something like that).  My little brother decided to try and guess my lock screen pattern the other day, and ended up locking me out.   I have since been unable to log back in to the tablet using my Google Account details. I provided the correct login details, however it says they are incorrect. Could this be connected to the fact I have no internet connection?  I have no internet connection as the device is WiFi only, and the WiFi is currently turned off. I cannot turn it on, as I am locked out.  How can I log back into my tablet without wiping the user data?


Superconductors are really good at conducting electricity. Should they not reflect light very well too?

A type-I superconductor can expel almost all magnetic flux (below some critical value $H_c$) from its interior when superconducting. Light as we know is an electromagnetic wave. So what would happen if we shine a light deep into a type-I superconductor? Suppose the magnetic field of the light is significantly lower than $H_c$.  And what about type-II superconductors?


The goal is to show this integral $\int_{-\infty}^{\infty} e^{-zt^2+2wt}dt = \sqrt{\frac{\pi}{z}} e^\frac{w^2}{z}$ for $z,w \in \mathbb{C}$ with $\Re(z)>0$ using the identity: $ \int_{-\infty}^{\infty}e^{-\pi x^2}e^{-2\pi ix \psi}dx = e^{-\pi \psi^2} $ for $\psi \in \mathbb{R}$ I have proven in a previous far that the function is holomorphic as a function of $z$ on all of $\mathbb{C}$ but I'm not sure how to do this next part. I looked for a substitution that would help but I only know the substitution formula for real number so I cannot just replace the $x$ in the identity with some complex number. Any help welcome :)

I'm doing complex analysis out of Gamelin, and I'm stuck on a problem in section V.7 on zeros of analytic functions.  Problem:  Show that $\int_{-\infty}^{\infty}e^{-zt^2 + 2wt} \ dt = e^{w^2 / z} \sqrt{\frac{\pi}{z}}$ for $z,w \in \mathbb{C}, Re(z) > 0$.  Gamelin gives a hint to start with $z$ as a real positive number, and I was able to show this is true when $z$ is a positive real number.  But I do not see how to extend this result to general $z$.


As an example, on my system apt-get needs to download 3.5 MB to install the IDE geany, while the download size is 100 MB for snap. This is so big and unacceptable! Even the Windows installer of geany is no more than 15.4 MB in size! What libraries used by a software are included in its snap file? And what are assumed to be already present on the OS? Does a snap file include all the required libraries? If that is the case, why? I see no reason why more than one copy of each specific version of a library, say GTK, should be present on a system. Maybe I haven't understood the snap system well enough. Maybe the download size of each snap depends on the snaps already installed. For example, maybe if another application installed by snap uses the same version of GTK, the download size for snap installation of geany would be less than 100 MB.

Snap packages each have their own copy of dependencies. This means there are lots of packages in each snap, which would equate to large package sizes. Wouldn't this mean that snaps would be so much bigger than traditional debs? How can I make them smaller? I have limited space.


Consider equation $\exp(-x) = x$.  Solution is so-called $\text{LambertW}(1)$.  It is beautiful special function called .  Now consider $\cos(x) = x$ and $\sin(x) = x$.  What beautiful special functions solve above equations?

There is an unique solution with $x$ being approximately $0.739085$. But is there also a closed form solution?


martin@martin:~$ sudo apt-get install netbeans Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  netbeans : Depends: libnb-apisupport3-java (= 8.1+dfsg3-1) but it is not going to be installed             Depends: libnb-ide14-java (= 8.1+dfsg3-1) but it is not going to be installed             Depends: libnb-java5-java (= 8.1+dfsg3-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   When running sudo apt-get install netbeans I get error when I try to run  martin@martin:~$ sudo apt-get install oracle-java8-installer Reading package lists... Done Building dependency tree        Reading state information... Done oracle-java8-installer is already the newest version (8u131-1~webupd8~2). The following packages were automatically installed and are no longer required:   libavcodec57 libavfilter6 libavformat57 libavresample3 libavutil55 libchromaprint0 libllvm3.8 libpostproc54 librubberband2v5 libswresample2   libswscale4 libtidy5 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   How to fix this error in installing netbeans in ubuntu

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I am currently working with some shapefiles of congressional precincts of the US.   One of my objectives is to get a list of the "Neighboring" precincts for each of the precincts. For example, if precinct X shares a border with YZ then I know that X has neighbors Y and Z.   I saw that ArcMap is a very powerful tool for working with shapefiles and analyzing data.  What tool can I use to get this done?  This is how my map looks like:

I have a dataset of zipcodes.  I want to add a new field "NEIGHBORS" that includes bordering polygons in a comma delimited manner such as attached image:


What is the underlying concept due to which we prioritize one operator over the other? Is it just a convention?

For example $2+2\times2$ is $6$ not $8$.   Actually $+$ and $\times$ are binary operations on $\mathbb Z$. but here there is an triple $(2,2,2)$ which we sent to $2+2\times 2$. So we have to put and order for applying operations as binary such that $$a+b\times c \: : \: (a,b,c) \to a+(b\times c)$$ with assuming that $(\cdots)$ has priority more.  My question is why multiplication has priority more than addition? We could also define $$a+b\times c \: : \: (a,b,c) \to (a+b) \times c.$$


Let $U,V \sim R(0,1)$ be independent. Calculate $P(U \leq V)$.   About notation: $U,V \sim R(0,1)$ mean random variables $U,V$ is equally distributed from interval $0$ to $1$.  I think there is not much to do because we have given $P(U \leq V)$, there is symmetric rule which say $$P(U \leq V) = P(V \leq U) = 0.5$$  Is this really easy like that? Or maybe that rule is not really useable here?

Let $U, V \sim U(0,1)$ be independent. What is $P(U \leq V)$?  My attempt:  We are looking for $P(U-V \leq 0)$. For a given $t \in [0,1]$ this is equivalent to $$P(U \leq t, V \gt t)= P(U \leq t)P(V \gt t)=P(U \leq t)(1-P(V\leq t))=t(1-t)=t-t^2$$  Then summing over $t$ on $[0,1]$, I get:  $$\int_0^1 t-t^2 \, dt = \frac{1}{6}$$  Which seems like a reasonable value, but I'm not exactly sure whether my approach with doing this in terms of t was correct, can anybody please validate my solution?


I currently managing 2 POS Devices in a Restaurant. The POS is using Windows 7.  1 POS located on the first floor has a printer connected via COM1 port. The printer itself has a LPT Port, the printer comes with a LPT to COM Port. 1 POS located on the second floor doesn't has any printer. (more like an Ordering Station)  What i want is when i ordered from the ordering station i want to print the orders to the printer on the first floor.  I used a software from , it works like a charm. But since it was on beta, the trial period is expired today.  Other methods i have tried :    1. Sharing the printer like any modern printer : failed.    2. creating a TCP/IP Port by typing the 1st Floor POS : failed.    3. Searching international forum for my case : from what i found, all refering to use (and buy) softwares for it.   My question is : is there anyway to share the COM port from 1st Floor POS so it's accessible from POS on 2nd floor directly from Windows without using anykind of softwares?

I have two computers and I'd like to access the serial port on one machine from the other. Is it possible to do this with free software and if so, what options do I have?  The sharing machine is running Windows XP And the client machine is running Windows 7 x64


I am modeling commissions earned based on non sales data. My equation looks like this:  commissions = Number of times logged into the system + ...    (many binary variables for HR related info)  Realistically, there would be a peak login, or plateau where any more logins is not correlated to commissions. So should I take the natural log of this variable?

Am I looking for a better behaved distribution for the independent variable in question, or to reduce the effect of outliers, or something else?


After I researched Biology I found 2 sources of oil and after that turn the oil signals dissappeared and i dont know where these sources are. How i can identify them ? I have a World like map and i have all America dominated.  Thanks

When you first research a technology that reveals a new resource on the map (eg.  reveals ), you can click the tip that comes up to center the map on deposits of that resource that are near your cities.   Is there a way to easily find those Strategic Resources again on later turns? So far I haven't found any method other than hovering my mouse over all of the tiles near where I thought it was to try to locate it.


I'm trying to switch over to U from windows. All of this is new to me. I just installed U14.04 on my laptop. I want to be wireless. I have downloaded wifi-radar 2.0.s05-1.1.deb How do I install it? Because it recommended i also downloaded Aptitude_0.4.11.11.orig. How do I get it to install?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


Theoretically if one variable (Black and White Imagery) does not significantly correlate with another variable (Perceived Usability), in practice (real world situation) does this mean that there is no relationship between the two variables; in other words, can I say that the Black and White Imagery is considered to be non-usable in this context?

Any hard-working student is a counterexample to "all students are lazy".  What are some simple counterexamples to "if random variables $X$ and $Y$ are uncorrelated then they are independent"?


Anyone who can solve it or give me an idea on how to try to do it myself?  $$1 + \frac{1}{\sqrt{2}} + \frac{1}{\sqrt{3}} + ... + \frac{1}{\sqrt{n}}\geq \sqrt{n}, \;\;\;n \in \mathbb{N^*}$$

I am just starting out learning mathematical induction and I got this homework question to prove with induction but I am not managing.  $$\sum\limits_{k=1}^{n}{\frac{1}{\sqrt{k}}\ge\sqrt{n}}$$  Perhaps someone can help me out I don't understand how to move forward from here: $$\sum\limits_{k=1}^{n+1}{\frac{1}{\sqrt{k}}+\frac{1}{\sqrt{n+1}}\ge \sqrt{n+1}}$$ proof and explanation would greatly be appreciated :) Thanks :)  EDIT sorry meant GE not = fixed :)


Consider the following scenario: On my PC I have only one partition, with the drive letter C. If I connect a USB hub or more, what happens / which drive letters get assigned to the USBs if they exceed the A to Z available list of drive letters? If I connect for example 50 USB memory sticks - how will the drives get named after A to Z will get used, for the remaining number of USB memory sticks?

As we know, in Windows the partition location is prefixed with [a-z]:. What happens if there are more than 26 partitions?


I came across the following question and it is confusing me.  I'm completely new to cryptography, so please excuse the beginners question.     "Having just completed a course in Cryptography, Tom and Jerry start a   new  business to manufacture and market cryptography products. Tom   designs an encryption algorithm $E_k(m)$ which produces a ciphertext upon   encrypting message m with a key k and keeps the algorithm a secret,   but the length of $E_k(m)$ is made public. Then Jerry enthusiastically   advises Tom to increase the security by  constructing $(E_k(m)\oplus m) \Vert (E_k(m)\oplus 1111…11)$ as the final ciphertext.       Here $ \vert\vert $ is the concatenation symbol and $\oplus$ is the XOR operator.       Is this a good scheme?"   Initially at first glance I can see that the new algorithm is more secure, but I couldn't actually get any ciphertext from the equation. Does that make it secure? or does it make it useless because there isn't any ciphertext to decrypt? OR is there ciphertext and I have just tackled it the wrong way?  I am probably going to kick myself, I'm probably missing the entire point.  I really appreciate any help!

I have a cryptography workshop question I'm having trouble with as follows;  Person A creates a cipher $E_k(m)$ which produces a ciphertext from message $m$ using key $k$. The function inside $E$ is kept secret but the length of $E_k(m)$ is known.  Person B recommends "increasing" security of the cipher by instead doing :   $(E_k(m) \oplus m)\ ||\ (E_k(m) \oplus 1111...11)$      Does this in fact increase security of the cipher or increase new problems.  My thinking is, depending on the function within $E$, xoring the output of the cipher with the plaintext message $m$ could expose the key $k$, meaning the extra complexity is for nothing. Am I on the right track, or am I missing something?  I have tried searching for examples of similar schemes and found nothing (which probably means it's not a good scheme) but I need to justify my answer.   Any steers in the right direction would be greatly appreciated, I'm more than happy to do the research myself just unsure what specifically to look for.   Unfortunately the above context is all I have been provided for this question.


I am trying to disprove this proposition $|\mathcal P([0,1]) \setminus \mathcal P((0,1))| > |\mathcal P(\mathbb{N})|$, where $\mathcal P (X)$ is the power set of $X$, but I am not sure how. I hope someone here could help me, thanks.

I need to prove the following inequlity:$$ |P([0,1]) \backslash P((0,1))| > |P(N)| $$ Now I have the intuition that in the left side of the inequlity there is all the subsets of [0,1] that contain the elements 0 or 1 and that is in the same cardinality is P[0,1] witch is greater then the right hand side (as Cantor proved) but I dont know how to write it down. Thank you


Trying to create a zoom-out animation from center.  Can't get the svg to center vertically to save my life. Also would love to have it zoom out of browser-window width and not reset back to 100%.  <html> <head>   <style>    div {   display: flex;   justify-content: center;   align-items: center;   animation-name: example;   animation-duration: 0.5s;   animation-iteration-count: 1;   }    @keyframes example {     0%   {zoom: 250%}    33%  {zoom: 500%}     60%  {zoom: 750%}     80%  {zoom: 1000%}     100% {zoom: 1250%}   }   body {     background-color: #4D4D4D;   }   </style> </head> <body>   <div>     <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="#fff">     <path d="M0 0h48v48H0z" fill="none"/>     <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm-4 29V15l12 9-12 9z"/>     </svg>   </div> </body> <html>

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I have 2 internet connections on differnet interfaces. I have eth0 which is internal ip of 192.168.1.70 and then I have another network connection to a different network which is on wlan0 192.168.43.193.  I want to use the 1.70 as my primary interface, however I'd like to have everything except Deluged go out of the eth0 and all connections for deluge go out of wlan0 (43.193)  I understand that you can only have one default gateway which currently I have to change depending on what I wish to do. I would prefer to keep my main outbound connections going via eth0 but still able to use wlan0 for specific processes.  How can I go about this?

My problem is really simple yet it sounds complex, but I have zero to none experience with this.  I have set up a box using gentoo which has its own semi-static WAN-IP and acts as router for my LAN. I have access to a router elsewhere on the web, which has a dynamic IP and is registered to dyndns. My plan is to redirect specific traffic from my gentoo-box to the router to make use of the tunnel and the dynamic IP.  My idea was to install a proxy on my gentoo-box which uses a VPN connection to the router as default. Every computer on the LAN and specific computers on the WAN (that have access right to the proxy) should be allowed to use this proxy, but no traffic should be forced to go through the router. Which rules out the idea of just using iptables.  Example: I want to redirect Firefox traffic through the VPN but not Opera traffic. I setup Firefox to use the local proxy, it gets the dynamic IP of the distant router, Opera still browses with my semistatic-IP.  Is this possible? Which software to use? Any further ideas?  btw: the router supports PPTP, IPSec and L2TP  Edit: If you have better ideas for the title please edit or suggest, I have no idea how to call my problem :(


I read in a book today ( the computer music tutorial by curtis roads), that humans are not capable of imagining any long series of truly random numbers. Apparently, the only way to generate a series of truly random numbers is to use either a Geiger counter or some type of cellular automata algorithm. Is it true that a computer would be able to detect a pattern and accurately guess the nth number in a series of random numbers thought up by a person?

Let's say you tell me to produce randomly a number from 1-100, and I choose the number 47. Can it be said that there is a specific reason I chose the number 47, and that it is not completely random? By random I mean that there is absolutely no reason this number in particular was chosen.    It seems odd to me, since it seems like since I have applied conscious effort to produce or choose a number within that range, or even without range, that it can't be truly random, but there might be a reason why I chose that number amongst the many others I could have chosen.  I guess the general question, which I'm interested to know if any philosophers in the past have discussed, is whether our thoughts are necessarily based on prior thoughts, or if thoughts can be truly spontaneous and random?


I try to include three different reference lists into one article, all using different citation styles, like e.g. in this mini layout example:  \documentclass{article}  \begin{document}  We have regular References, like e.g. Hamburger (1995), but also still [1],[2] and the third one [R1].  \section{Other references} \hangindent+25pt \hangafter=1 [1] Meyer, D.: Really, really interesting stuff, it's a must read. Publ. Int. Stu. \textbf{112}, 1--21 (2014)\\  \noindent \hangindent+25pt \hangafter=1 [2] Smith, D.: Even more interesting stuff than Meyer has. Publ. Int. Stu. \textbf{122}, 1--21 (2014)\\  \noindent \hangindent+25pt \hangafter=1 [R1] Smith, D.: One can make even an R-package from that stuff. Publ. Int. Comp. \textbf{1}, 21--41 (2014)  \section{References} \hangindent+25pt \hangafter=1 Hamburger, C.: Quasimonotonicity, regularity and duality for nonlinear systems of partial differential equations. Ann. Mat. Pura. Appl. \textbf{169}, 321--354 (1995)  \end{document}   Of course, I could hard-code the entire reference list as in the layout example above, but is there any way to use a \cite command with tailored bst files? I tried also the multibib library, but this only adds prefixes to all different reference lists, by using e.g. \citeR,... with \usepackage[labeled,resetlabels]{multibib} resulting in reference lists like  [A1] ... [A2] ...  [R1] ...  [C1] ...   What I would need is an option in multibib that avoids the numbering for one sublist entirely (dropping the C1), for one it should use only consecutive numbers (dropping the As) and for the third it should add a prefix like it is in R1.  Is there any alternative to multibib that could do the trick? Or is there any way of tailoring three bst files for multibib so that the three references lists look like I want them to be?

When using biblatex, suppose I have set up two separate bibliographies, how can I assign them different styles, e.g. one numbered and the other author-year format or some such thing.  \documentclass{article}  \usepackage[defernumbers=true]{biblatex}  \DeclareBibliographyCategory{cited} \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @misc{A01,   author = {Author, A.},   year = {2001},   title = {Alpha}, }  @misc{B02,   author = {Buthor, B.},   year = {2002},   title = {Bravo}, }  @misc{C03,   author = {Cuthor, C.},   year = {2003},   title = {Charlie}, } \end{filecontents}  \bibliography{\jobname}  \begin{document}  \nocite{*}  \cite{A01,B02}  \printbibliography[title={References},category=cited]  \printbibliography[title={Further Reading},notcategory=cited]  \end{document}


$$\binom n0 + \binom n4 + \binom n8 + \cdots$$ Any hints?

It is widely known that $$\sum_{m=0}^{n} {n\choose m} = 2^n$$ and that $$\sum_{m=0}^{\lfloor\frac{n}{2}\rfloor}{n\choose 2m} = 2^{n-1}$$ Both results can be proven by exploting the nature of the roots of unity. Analagously, we can find $$\sum_{m=0}^{\lfloor\frac{n}{3}\rfloor}{n\choose 3m}$$ by taking the sum of the equations $$(1+1)^n = {n\choose 0} + {n\choose 1} + {n\choose 2} + {n\choose 3} + \cdots$$ $$(1+\omega)^n = {n\choose 0} + {n\choose 1}\omega + {n\choose 2}\omega^2 + {n\choose 3} + \cdots$$ $$(1+\omega^2)^n = {n\choose 0} + {n\choose 1}\omega^2 + {n\choose 2}\omega + {n\choose 3} + \cdots$$ by taking $\omega$ as a primitive cube root of $1$ and exploiting the fact that the roots of unity sum to $0$, i.e. $1 + \omega + \omega^2 = 0$.  The above method however seems to depend on the fact that every non-trivial root is primitive, so that the method only works for primes (For example, attemtping this method for $k=4$ will quickly run into problems as there is no longer full cancellation). Is there a generalization of this method for finding the sum of every $k$th binomial coefficient for arbitrary $k$? Failing that, does anyone know of any general method for finding such a sum?


I have lots of images to be watermarked. Is there a good batch image watermarking application that can do the job quickly and easily. I have found some, but none of these have a professional touch.

1) I dont know how to write a watermark, like a copyright notice, on a photo.  2) I have a folder of photos which I wish to watermark with the same watermark.  How should I write a watermark on a folder of photographs?


In bash how to get printf take input interactively to print a sequence. I have tried the following: read x; read y; printf '%s\n' {"$x".."$y"..5} 0 40 {0..40..5}  whence I am trying to get the output like this: printf '%s\n' {0..40..5} 0 5 10 15 20 25 30 35 40

i am writing a script in bash and I would like to give the two numbers in the brackets, x and y to be precise, as variables.  I wrote the script this way:  echo "x?" read x echo "y" read y  for i in {$x..$y}   but it does not work.  How could I set it up to make it function?  Thanks a lot in advance.


Suppose that $f\in L^p\cap L^\infty$ for some finite $p$. Then $f\in L^q$ for all $q>p$ and   $\|f\|_\infty=\lim_{q\to\infty}\|f\|_q$  I've managed to prove that $\int_E |f|^q<\int_E |f|^p<\infty$ with $E=\{x:|f(x)|<1\}$   and that $\int_F|f|^q=0$, with $F=\{x: |f(x)|>\|f\|_\infty\}$.   However I don't know how to proceed in the case where $1\leq f(x) \leq \|f\|_\infty$ and to prove that this convergence.

Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start.


Can anyone help me to download a latex manuscript template for journal of advanced research (Elsevier)

Where can I find the LaTeX template for Elsevier Camera-ready copy (CRC) journals (Neuroimage journal) for publishing my paper?


On my ubuntu box I accidentally just did cd // and noticed that my current path changed to //. ls showed the contents of my root directory.  When I try cd /// (or any other number of slashes) I'm just taken directly to the root.  I'm sure this isn't something I need to worry about in any way during every day life but I was wondering if there was some interesting curiosity about why it behaves this way.

I'm working on a python script that passes file locations to an scp subprocess. That's all fine, but I'm in a situation where I may end up concatenating a path with a filename such that there's a double '/ in the path. I know that bash doesn't care if you have multiple file separators, but I'm wondering how exactly that is rectified. Is it bash that strips extra /s or does it really not matter ever?  I ask because it will save me several lines of code to check for extra /s while concatenating. I know it's not a big deal, but I'm curious as well. I have a bash script that has the line cd //usr (instead of cd /usr), which seems to imply there might be a significance to using multiple /s in a path


My last card was a wild draw 4, I knew my friend had one but I had to put it down. I called uno out and he put his draw 4 ontop of mine. Can he do that?

When playing with progressive Draw 2 and Draw 4 and (say that there are 2 players playing) and    Player 1 goes out with a Draw 2  Player 2 puts down a Draw 2    Does player 1 have to pick up 4 cards?


Is there a way to make my gnome terminal show the previously typed commands as I type i the terminal?

I use Ubuntu on a daily basis, recently I've seen that the terminal on Kali Linux behaves differently from the terminal on Ubuntu... I can see the end of the command that I'm typing based on the history of commands that I've typed like the following:  I know I can use autocompletion by pressing tab, but this feature is something else since I can see the command before pressing tab... That's not a Kali related question too since I just want to replicate this feature on Ubuntu 20.04. Is it a feature that I can easily install on Ubuntu by installing some tool with apt install? Or is it a configuration that I need to do?


In this article:  a question was raised but not really answered.   I have the same problem, but now with biblatex.   If my entry is e.g.:   @article{Diensberg:boy,     author= "Diensberg, Bernhard",     title=  "The etymology of modern English \textit{boy}: a new hypothesis",     journal="Medium {\AE}vum",     volume= "50",     number= "4",     pages=  "79--87",     year=   "1981",   }   then I want "boy" to be romanized if the bibstyle in effect italicizes titles, and italicized if the current bibstyle romanizes titles.   I can't see anything in the biblatex manual to achieve this.  Is it possible?  I am doing this (and no more):  \usepackage[style=authoryear,sorting=nyt,hyperref,dashed=true,backend=biber]{biblatex} \DeclareFieldFormat{postnote}{#1} % no "p" in postnotes \DeclareFieldFormat[article]{title}{`#1'} % no quotes \DeclareFieldFormat[inbook]{title}{`#1'} % no quotes \DeclareFieldFormat[incollection]{title}{`#1'} % no quotes \DeclareFieldFormat[mastersthesis]{title}{`#1'} % no quotes \renewbibmacro{in:}{} % no "In: " \renewcommand*{\labelnamepunct}{\addcomma\space} % comma after author, no t"." \renewcommand*{\newunitpunct}{\addcomma\space} % commas everywhere

I use a BibTeX style which automatically italicises booktitles (using \emph). I have certain entries which contain italicised words in the title. I would like these to appear non-italicised (in roman) in the final PDF output. Using any of \emph or \textit or \textrm on these items doesn't seem to make any difference -- the whole title still appears in italics.  Minimal .bib entry  @PHDTHESIS{klein1974, author = {Klein, Jared S.}, title = {The Particle \emph{u} in the {R}igveda}, school = {Yale}, year = {1974}, address = {New Haven, CT}, timestamp = {2009.12.04} }   Minimal .bbl entry generated by sp.bst:  \bibitem[{Klein(1974)}]{klein1974} Klein, Jared~S. 1974. \newblock \emph{The particle \emph{u} in the {R}igveda}. \newblock New Haven, CT: Yale dissertation.


⊨∃x(Px⇒∀xPx) I was trying to solve the above drinker's paradox by contradiction and came up with the below expression by negating the above expression -  ⊨ ∀x ( Px ∧ ¬ ∀x Px )   This is where I got stuck because to distribute the universal quantifier I need all the variables inside the parenthesis to be bound variables but as x is a free variable I was not able to go further. Is the approach correct considering that the universal set is not empty and what should I do next?

Why is this true?  $(\exists x)(P(x) \Rightarrow (\forall y) P(y))$


What is equivalent of head/tail command to show head/tail or a line?  head2 -2 "abcdefghijklmnopqrstuvwxyz"  => ab  tail2 -2 "abcdefghijklmnopqrstuvwxyz" => yz

Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable.  So to emphasize the point, I have a filename with x number of characters then a five digit sequence surrounded by a single underscore on either side then another set of x number of characters.  I want to take the 5 digit number and put that into a variable.  I am very interested in the number of different ways that this can be accomplished.


When I delete a file by going to the folder my self and deleting it manually (not with git command line interface), git doesn't see that a file is deleted when I perform "add ." or "commit -m".  How can I get it to see, after deleting a file, that a file is removed and it shall delete it from the deployment server during a push?

I have a Git repo that I have deleted four files from using rm (not git rm), and my Git status looks like this:  #    deleted:    file1.txt #    deleted:    file2.txt #    deleted:    file3.txt #    deleted:    file4.txt   How do I remove these files from Git without having to manually go through and add each file like this:  git rm file1 file2 file3 file4   Ideally, I'm looking for something that works in the same way that git add . does, if that's possible.


Phone : nexus 5 version 2013 Android version : 6.0 Kernel version : 3.4.0-g2aa165e Build number : MRA58N   For the last few days, 10118 has been draining my phone's battery. It drains battery by using GPS. I typed 'ps' in a terminal emulator, and there was no application with PID 10118. I don't know what exactly 10118 is. My guess is that it's one of recently installed weather apps.  How can I fix this?    Screenshots (click images for larger variants)

There is a mysterious app, 99070 that is consuming power on my Nexus 5X. Any idea how I determine what it is?  There is no option to stop or uninstall it. My phone is a Nexus 5X running stock Android 6.0.


I need to create two different dice in Java. The first one (dice1) has random integer values from 1 to 10 inclusive. The second dice (dice2) should have even numbers from 2 to 20 inclusive. I was able to successfully code for dice1 but cannot figure out how to declare and initialize dice2. Below is the code I wrote for dice1. How would I go about coding for dice 2? int dice1 = (int)Math.floor(Math.random()*(10-1+1)+1);

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


So i have trace a logo using pen tool the problem is the logo has a hole inside that I need it to be transparent. Here is the look of the image   now I need to make the white inside the logo transparent but when I change the fill to none the look will be   what should I do about this? I just started with Illustrator.

I need the center of the letter A in Illustrator to be transparent so you can see the background underneath. Same with letter D, B, O, P, R.  I imported a vector version of a word, and I am able to select the letter but if I click delete button it deletes the whole word.


I am new at C programming. I wrote some code for a stack exercise. The question is: one of the result is wrong, but when I debug step by step, the number changed abruptly. Could you help me solve this?  // @name mystack.c // Created by lilei on 2017/3/10. // #include "mystack.h" #include <malloc.h> #include <stdio.h>  Stack createStack(){     Stack stack = (Stack)malloc(sizeof(Stack));     stack->top = -1;     return stack; }  int isFull(Stack s){     if (s->top == MAXSIZE-1){         return 1;     } else{         return 0;     } }  int push(Stack s, ElementType item){     if(!isFull(s)){         s->top++;         s->data[s->top] = item;         return 1;     } else{         printf("full!");         return 0;     } }   int isEmpty (Stack s){     if(s->top == -1){         return 1;     } else{     return 0;     } }  ElementType pop(Stack s){ if(!isEmpty(s)){     ElementType e = s->data[s->top];     s->top--;     return e; } }  void myPrintf(Stack s){     int len = s->top;      printf("The data are ");    while(len >= 0){         printf("%d ", s->data[len]);         len--;     }     printf("\n"); }  int main(){     Stack s = createStack();     for(int i = 0; i < 7; i++){         push(s, i*2);     }     myPrintf(s);      printf("isEmpty:%d, isFull:%d\n, pop one:%d", isEmpty(s), isFull(s), pop(s)); }   The result is

In , someone suggested in a  that I should not cast the result of malloc. i.e., I should do this: int *sieve = malloc(sizeof(int) * length);  rather than: int *sieve = (int *) malloc(sizeof(int) * length);  Why would this be the case?


I understand that an arrow is between two objects, a functor is between two categories. And then a natural transformation is, according to Goldblatt's Topoi, a comparison of two functors. Here is Goldblatt's definition:  A natural transformation from functor $F: \mathscr C \to \mathscr D$ to functor $G: \mathscr C \to \mathscr D$ is an assignment $\tau$ that provides, for each $\mathscr C$-object $a$, a $\mathscr D$-arrow $\tau_a :F(a) \to G(a)$, such that for any $\mathscr C$-arrow $f:a\to b$, the diagram commutes in $\mathscr D$, ie. $\tau_b \circ F(f)=G(f)\circ \tau_a$. We use the symbolism $\tau: F \xrightarrow{\tau} G$ to denote that $\tau$ is a natural transformation from $F$ to $G$.   I have absolutely no idea what's going on. I tried to understand the diagram, but I can't even understand where the $F(a)/F(b)$ and $F(f)$ are coming from. (Is this similar to how structures are preserved under homomorphism? Because the way the composition is formulated looks a bit similar) I think I am lacking an intuitive understanding of what it means to compare two functors. Could anyone help please?  It's been pointed out that another question has already covered what I am asking (); the question does also ask for an intuitive perspective on natural transformation. However it's framed around topology and other mathematical structures, but I really would like to avoid those because coming from a non-mathematical background, framing it around those does not really help (I have no idea what those structures are). If possible, I would like to keep any other structure away from the explanation.

Mac Lane once said that he didn't invent category theory to study categories, but to study natural transformations.  But googling around a bit, I haven't found out what natural transformations intuitively are about (only their definition).  I want to ask:    What is the intuitive notion formalized by "natural transformation" in category theory, and (in the simplest possible terms) why does this formalization capture that intuition? Do category theorists in general still agree with MacLane's statement that natural transformations are the raison d'etre of category theory?   To clarify what I mean with an analogy:   A topology on a set $X$ formalizes the intuitive notion that each point $x\in X$ "touches" some subsets of $X$ but not others. If a set $X$ has a group structure, this formalizes the intuitive notion that elements of $x$ can be seen as "invertible actions" that can be applied in succession. Natural transformations (and their base concept Functor) formalizes the intuitive notion that ...


I have a package that contains two classes. Private variable share is located in class A and that variable can be accessed only by these two classes, A and B, and can't be accessed by importing the package. Is it possible to achieve this?  // A.java     class A {     private static String share;  }  // B.java class B {     public String myMethode() {         // do something with share     } }

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


First, is there any generic term or style for this type of showcasing images/items in mobile? I'm trying to emulate the style used here but first I would like to know the proper team so that we could search if there is any library built already and avoid reinventing the wheel.      I could build something like this in mobile app (react-native), but it would be too rigid, like it would be a rows/columns of fixed images but it is no way closer than this where images have their own sizes and it seems not following the traditional row/column grid structure.

It seems as if with some of the modern front-end development frameworks there is a blur between the different types of 'container' elements. Whether this is an attempt to abstract the design from implementation or if this is due to there not being any standardization of terminologies I am not sure, but it leads to the fact that in some design frameworks I see the term panels being used but not cards (e.g. Bootstrap 3) while in others the term cards exists but not panels (e.g. Iconic), and perhaps both exist in others?  From a design perspective, it seems that both cards and panels are just containers, and since there's nothing that defines how big a card can get and how small a panel can be, I am wondering whether there's really any difference. From an implementation perspective, it seems that cards should be used for smaller size design elements and are preferred on mobile specific applications, whereas panels are used for a wider range of design elements and are preferred on desktop specific applications.  Is there any evidence/reference/examples that will help to illustrate or highlight the (lack of) differences? For some reason I think cards and tiles are more closely related to each other, and that panels seem to be in a slightly different class/family?  If we take the argument that there are no differences, then it is hard to understand why people associate 'tiles' with Microsoft 'Metro' style home pages, while on Google and Android apps it is 'cards' and for Java and Gnome applications it is 'panels'. Perhaps there are some contextual or implementation differences?  UPDATE: with the release of Bootstrap 4, it seems like cards are basically equivalent to panels (since one component has replaced the other), but with this comes the cost of having to maintain a more flexible container that will make it difficult to implement consistently. According to Bootstrap:      A flexible and extensible content container. It includes options for   headers and footers, a wide variety of content, contextual background   colors, and powerful display options.   FURTHER UPDATE: It seems as if Bootstrap 5 and Material.io have adopted the card UI component in the new world of responsive and mobile first/multi-device ecosystem design systems while "tiles" have a very specific meaning in the Microsoft Fluent Design System:      A tile is an app's representation on the Start menu. Every app has a tile. When you create a new Universal Windows Platform (UWP) app project in Microsoft Visual Studio, it includes a default tile that displays your app's name and logo   Panels don't seem to be part of the vocabulary anymore, as least in terms of a UI component, but in the Microsoft and Java world it still represents an abstract concept of organisation layouts of UI components.


I am a little confused by this preview of the damage that could be done in Diablo 3  Dire Span is reporting to give me +1076 to damage.  When equipped however it in fact reduces my overall dam by nearly 1.5k.  So how is this calculated? Is it only a problem because of the % that is added on these weapons to the damage when strength is taken into account?   Whilst this question may appear similar to this:   However this question does not give information on strength factor.

A 2h mace damage range as shown in AH is 1405-1944.  The weapon has  +284 min damage +361 max damage 49% damage increase  and no other stats.  The Doomhammer damage range is approximately 655-720 per Blizzard's web site.  I assume the correct approach is to multiply the damage range by 1.49 giving 976-1073, and then I add the min and max damage, giving a final range of 1260-1434.  That's nowhere near the listed damage range. What am I doing wrong?  Solving for what the actual damage range of the mace would have been, I get 752-1062, for an effective +97 min +342 max hidden bonus. Sadly, that hidden bonus doesn't match any known tier min/max table I've been able to find.  (I care because I'm writing an accurate random weapon generator.)


I have a question about coding style / indentation and alignment, and I don't know where (or if) there is a Stack Exchange site suitable for that.  I only figured that it would not be an o.k. question for Stack Overflow, because it is both off-topic and primarily opinion based, and I don't think it's suitable for Code Review either.    A sample question:  How should I align the following long construct to make it a little more readable?  return LongClassName.DoSomething<TReturn, TExceptionOnFailure, TPassedData>(myReturn, new MyException(), this.helper.Data);     Where can I ask such questions?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


My goal is to match domestic and international telephone numbers as much as possible, and my pattern works pretty except for a leading space on one test input. Also looking for any other general improvements for sample data that I have missed.  I am less interested in identifying if the telephone is in the correct format for the country, more that it is (ex: not strictly USA).  Pattern is as follows, and is testable with data content here:   \+?1?[\ \-\.]?\(?\d{2,4}\)?([\ \-\.]?\d+)+(\ ?[xX]\d+)?   The input (greedy) that I am trying to match and is failing with intended result of 635-48018 but getting 635-48018 is:   (089) / 636-48018   Domestic  <-- fails (matches with leading space)   Full data sample is here (any actual numbers are accidental):  333-555-1075 333.555.1075 (333)555.1075 (333)555-1075 (333)555-1075 x4141 (333) 555-1075 (333) 555-1075 x4141 1 (333) 555-1075 1 (333) 555-1075 x4141 1-333-555-1075 1-333-555-1075 X4141 1.800.591.5911 1.800.591.5911 x41 1.800.591.5911X414166 1.800.591.5911 X4141 +1555789123 +4974339296 +591 74339296 +1 555 555 5554 +1 555 555 5554 x4141 +(591) 7433433 +(591) (4) 6434850  <--fail, but OK 0591 74339296 0001 5555555555 (0001) 5555555 59145678464 645-00-0000 <-- also matches social security number, but OK for my needs  555-3010            Local (541) 555-3010      Domestic +1-541-555-3010     International 1-541-555-3010      Dialed in the US 001-541-555-3010    Dialed from Germany 191 541 555 3010    Dialed from France  636-48018           Local (Germany telephone) (089) / 636-48018   Domestic  <-- fails (matches with leading space) 089/636-48018       Domestic  <-- fails +49-89-636-48018    International 19-49-89-636-48018  Dialed from France   Variant needed is PRCE (php) and ECMAScript.

I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following:   1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901   I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.