Recently, I downloaded Windows 10 Redstone 4 and noticed that my version was missing the Media Feature Pack. So I tried to download it from  and faced a new problem -- that version did not match with my OS version. So I searched for the latest version but I didn't find it, either on the Microsoft website nor on any website.  So what should I do and how can I get the Media Feature Pack that matches with my OS?

I own a Windows 10 K or N Edition which doesn't include the media player package. My problem is: I want to have preview thumbnails in the explorer for my MP3s and videos.  I had the issue before when I updated to Win10 but there  saved me. Since the Anniversary update they are gone again.   Now I can install the old update but I still don't get the media player nor the preview images.  I tried most of the things Microsoft offers me but they are either not installable or don't work.  Any ideas what might be the correct update package?  Thx!  Ron


How would I get a function to take the date in terms of YYYY-MM-DD, YYYY/MM/DD and DD.MM.YYYY and return YYYY-MM-DD?  I’ve tried a few ways which would work for one of the formats but then not the other

This is my code:  import datetime today = datetime.date.today() print(today)   This prints: 2008-11-22 which is exactly what I want.  But, I have a list I'm appending this to and then suddenly everything goes "wonky". Here is the code:  import datetime mylist = [] today = datetime.date.today() mylist.append(today) print(mylist)   This prints the following:   [datetime.date(2008, 11, 22)]   How can I get just a simple date like 2008-11-22?


Using my Macbook Pro on Catalina 10.15.7, when my Mac wakes from sleep mode it loses the connection to my Samsung monitor. I have to unplug the hdmi cable and reconnect to get it to detect my monitor again. Is there anything I can do to prevent this? My MacBook details are: Model Name:    MacBook Pro    Model Identifier: MacBookPro16,    Processor Name:   Quad-Core Intel Core i5    Processor Speed:  1.4 GHz    Number of Processors: 1    Total Number of Cores:    4    L2 Cache (per Core):  256 KB    L3 Cache: 6 MB    Hyper-Threading Technology:   Enabled    Memory:   16 GB    Boot ROM Version: 1037.147.4.0.0 (iBridge: 17.16.16610.0.0,0)    Serial Number (system):   C02DF018P3YV    Hardware UUID:    1185ACE8-96B4-5B4C-A7A1-604EEAAFAC70    Activation Lock Status:   Disabled

MacBook Pro (15-inch, 2016) with 2 USB-C to HDMI adapters. The setup works great if I start up in that configuration.   If I connect the adapters while the machine is running or simply sleeping, one of the monitors will never get a signal and stay in low power mode. The OS sees the monitor, it shows in the display arrangement settings and I can move the mouse into it, but until I restart, I can't see anything on it.  Once I have restarted I can let the machine sleep or whatever, and the display still works unless I disconnect the adapter. As soon as I do that a restart is required to use it again.   Using MacOS Sierra (10.12.4)  Using this adapter:


I am using Ubuntu 17.10 with gnome shell, and want my monitors to stay alive when screen gets locked.  Background: It's a Notebook connected to external monitors which need ages to wake after every time they get black. Locking is necessary and needs to happen after an idle time and manually, so Caffeine is no option.  Any hints on how to achieve that behavior? Possibly an extension?

I lock my computer a lot, and was wondering if there was a way to get the lock screen when I hit Ctrl + Alt + L. Right now when I use that key combination it turns the screen black, and I have to hit a key or click to bring up the screen where it shows the option to enter your password or switch users, as well as displaying the desktop background behind it.   Is there anyway to avoid having to hit that extra key, to bring up the screen I want? And is there anyway to keep it that way? It's really a matter of personal preference, and I don't see any reason why not to have it stay that way as my monitor eventually is turned off and/or my computer suspended.


I've done the following:  sudo usermod -a -G root userA sudo su - root cd / chmod 775 root ls -aln -- drwxrwxr-x.   6 0 0 4096 Sep 13 22:04 root   I can cd /root from my userA, but I can't make directories.  mkdir testing mkdir: cannot create directory ‘testing’: Permission denied   For completeness:  id userA uid=624981(userA) gid=624981(userA) groups=624981(userA),10(wheel),0(root)   What am I missing?

I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives:  -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile   I then added a user to that group ("/etc/group" has user1:x:1000:user2 line), but am failing to edit that file as user2. Why is this so?


I mean, I do read some articles about how to distinguish between those three, but I found that when I wrote stories or blog entries, the rules that I've read is impractical to remember. I found myself going over all the articles over again to decide which one to use, almost for every single sentence.  Can you give a very simple principal rule of thumb, which may cover a large portion of their usage rules? I understand that there's no single "one rule over them all", but at least "one rule over most of them", which I can remember while I write sentences, is already fine by me. :)

I am really confused.  Which preposition is correct?     She is in/at the park.   They are in/at the park.   I am in/at the park.   Should I use in or at in these sentences?


I am seeing "Telerik" for testing. This is right. You should not doing for money.  Does it mean that testing = Telerik?  If you are getting money then You cant do like this ..  These are my thoughts:  General computer concepts. This icon is right one...  For example,

I don't see any problem with companies sponsoring tags that are products/proper names, like  or  being sponsored by Adobe or  being sponsored by Android. However, I just noticed that the  tag is sponsored by Red Gate.  Does it really make sense to let someone sponsor a tag that represents a general concept? I mean, if they're willing to pay for it, so be it. But it just seems silly to think that someone might be able to sponsor tags like  or .


Safari's Show All Tabs view is pretty useless, it only shows one tab at a time and is fairly easy to trigger with an accidental pinch gesture. How do I turn it off (as least for the pinch gesture)?

Too often, when I try to move my cursor and click, or try to drag something or select text, and my two fingers end up on the trackpad at the same time, all my open tabs shrink into this view:    This is extremely disruptive as it makes me lose my focus and then I have to locate the page I was currently on, click it and then resume working.  I can't tell what this specific feature in Safari is called (I want to still be able to pinch to zoom in and out of a page), and couldn't find info anywhere on how to completely disable it.  Can I disable this? (or I can use another browser, obviously...)


I read this story as a kid, and I'd like to find it again! It was a story about a group of children with physical mutations like extra eyes, missing limbs, and so on, who lived in an group so isolated from other humans that they didn't even know 'normal' people existed, until one child became sick and non-mutants were forced to intervene. It was told from third person point of view of a preteen girl and her feelings about discovering she'd be considered a monster to the rest of humanity, when the community of mutant children were very supportive of each other and she was something of a leader. The one detail I remember well was the mutants all had names beginning with an "Em", something like Emellen, Emesszie, Emaarty (those aren't the actual ones), and when the non-mutants came one of them mentioned they were actually acronyms with the Em standing for mutant (MLN becoming Emellen, Emesszie = MSZ, Emaarty = MRT and so on).   I read this in the very early 80's, so it would had to have been older than that. It was collected in a large book of science fiction stories aimed at younger readers, and I think there were illustrations at the beginning of each story - I want to say they were painted, possibly in color, and they were small and above the title, but this may be my memory playing me false. I'm afraid I don't recall any of the other stories in the volume; one of them may have been about an underwater city. I'm pretty sure all the stories had children as protagonists.

Okay, so here it goes. Over a decade ago I read a sci fi anthology book from my grade school's library. I would guess it was written in the 50's or early 60's but I could be wrong. There are 3 stories I vaguely remember.    I remember this one the most. Most kids are born really smart through some type of enhancements. But the protagonist, while not dumb, is born like a normal person. Normal people tend to be looked down on or stigmatized in this society and he grows up and despite having average intelligence, leads a revolution against the government that has been promoting these kinds of genetic mutations. The only thing I know is that this story is set in the year 2000 on New Years Day. The title includes "the Year 2000" in it I'm fairly sure. But that's all I can remember about it. The final story is the most vague in my mind. But it's a story about cars and possibly racing? The title might be a two word title, the something. That something being the title of the name of the people that drive/race? Like the Langoliers, although obviously not that. I've read that one.   I know the last 2 are really vague, but any info on the first one at least might lead me to find different collections it's been in if I can track it down.   Thanks for everything!


I'll explain myself, I would want to add a replaceLast into String class, is that possible? At the moment I'm using a self-made method, which is:   public static String replaceLast(String string, String toReplace, String replacement) {             int pos = string.lastIndexOf(toReplace);             if (pos > -1) {                 return string.substring(0, pos) + replacement + string.substring(pos + toReplace.length(), string.length());             } else {                 return string;             }         }   Is there any way to be able to use this method like:  String str = "Hello World"; str.replaceLast("l", ""); //being the first String the one to be replaced and the second one the replacement   like it is used:  String str = "Hello World"; str.replaceFirst("o", "e");

I'd like to add a method AddDefaultNamespace() to the String class in Java so that I can type "myString".AddDefaultNamespace() instead of DEFAULTNAMESPACE + "myString", to obtain something like "MyDefaultNameSpace.myString". I don't want to add another derived class either (PrefixedString for example).  Maybe the approach is not good for you but I personally hate using +. But, anyway, is it possible to add new methods to the String class in Java?  Thanks and regards.


I have a function that takes a reference to a base object (used as an output parameter).  That function must create a derived object and pass it back to the caller through that reference.  The caller calls that function by dereferencing a pointer to base (in this case a smart ptr), and passing it as the argument to the function.    The problem is that even though the function changes the underlying object, the caller still can't cast the pointer to the derived object:  #include <iostream> #include <memory> using namespace std;  struct Base {   virtual void id() { cout << "Base" << endl; } };  struct Derived: Base {   void id() override { cout << "Derived" << endl; } };  void get_derived(Base &b) {   b = Derived();   b.id();         //Still prints "Base" }  int main() {    auto b = make_shared<Base>();   b->id(); //prints "Base"   get_derived(*b);   b->id(); //prints "Base" still    auto f = dynamic_pointer_cast<Derived>(b);   if(!f) cout << "cast failed" << endl; //this branch taken   else cout << "cast succeeded" << endl; }   Why is it that after b = Derived(), the pointer to id() in the virtual table of b still points to Base's id() function instead of Derived's vtable?  And how do I change get_derived() to make the b reference refer to a Derived object? Note: I can't change the signature of get_derived()

Someone mentioned it in the IRC as the slicing problem.


The status from the very 1st day is "Awaiting ME Processing". Can someone tell me what does it mean?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I want to run a 60 amp sub panel to my shed 200'+ out back. This will only run a few lights, an outlet and run to a chicken coop for a heat lamp in the winter. What size wire would get it done? I will be putting it below ground in conduit. Thank you for any help or guidance you can give.

I have a shed in my backyard about 200ft from the house. I would like to run electrical to the shed to install 2 or 3 power outlets, and two LED lights for the inside.  Currently from the house to about 50ft from the house there is an exterior power outlet on a pole (no light on the pole, just the outlet). The line from the circuit breaker is completely dedicated to this one outlet the whole way -- currently no forks or splices. It is a 12 gauge UF-B wire run connected to a 20 amp gfci breaker. It is not in conduit and looks about 2 to 2.5 feet deep.  I am wondering if I can continue the line from the power outlet 50ft from the house on more 12 gauge UF-B for another 150ft to the shed -- which will have 2 or 3 power outlets and two LED lights for the inside. Or I am wondering if it would be required for me to have a dedicated line and a subpanel in the shed -- and maybe heavier wire.  Thanks!


I'm trying to figure out how to do this in PostgreSQL The original data Book         Author HP1          Rowling HP2          Rowling HP3          Rowling LOTR1        Tolkein LOTR2        Tolkein  I want to group by Author and have the next column be comma seperated books Author       Books Rowling      HP1, HP2, HP3 Tolkein      LOTR1, LOTR2

I am looking for a way to concatenate the strings of a field within a group by query. So for example, I have a table:  ID   COMPANY_ID   EMPLOYEE 1    1            Anna 2    1            Bill 3    2            Carol 4    2            Dave   and I wanted to group by company_id to get something like:  COMPANY_ID   EMPLOYEE 1            Anna, Bill 2            Carol, Dave   There is a built-in function in mySQL to do this


If $f(x) \geq 0$ and for every $x \in [0, \infty)$, $f(x)$ is Riemann integrable on $[0,n]$ for all n. If $\int_{0}^{\infty}f(x)dx < \infty$ then is it true that $\lim_{x \rightarrow \infty}f(x) = 0$. If yes then how?

Suppose that $f:[0,\infty)\rightarrow\mathbb{R}$ is continuous. Is it true that   $$\int_{0}^\infty|f(t)|dt<\infty\Rightarrow \lim_{t\rightarrow\infty}f(t)=0?$$  If so can you provide a proof, otherwise a counter example. Thank you.


I am not able to understand how the computer is able to access an element in the multidimensional array with the following code.  I have tried searching on net for the possible syntax of accessing an element in a multidimensional array in c.  int main()  {      int A[][2]={{23,22},{12,13},{16,178}};     printf("%d",1[A][2]);     return 0; }   The result is 16.

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


Some people work with the interpretation that the time basis vector has magnitude sqrt(-1) to justify the negative sign in a -+++ Minkowski metric signature.  I came across a Youtube comment that remarked that such an interpretation for the negative sign is wrong. Upon further research it seems like many other people (including those on this site) have a similar distaste for the imaginary number time interpretation.   My question is, why is the imaginary time interpretation "bad" or "wrong"?  I'm having trouble seeing the justification in disliking the imaginary time interpretation.

When I learned about the Minkowski Space and it's coordinates, it was explained such that the metric turns out to be $$ ds^{2} = -(c^{2}dx^{0})^{2} +(dx^{1})^{2} + (dx^{2})^{2} + (dx^{3})^{2}   $$ where $ x^0,x^1,x^2,x^3 $ come from $ x^{\mu} : \mu = 0,1,2,3 $, and $ c $ is the speed of light. The first resource I had access to--I have to do a bit of digging for the exact paper--of course addressed that this invariant takes the tensor form: $$ ds^2 = g_{\mu \nu}dx^{\mu}dx^{\nu} $$ as well. This two things I've seen in all of my texts and online resources regarding resources. The element in question that varies between authors, is the time coordinate, $ x^0 $. When it was first explained to me, it was using the standard Cartesian representation for the spatial portion of the coordinates, and the time coordinate was labeled as $ x^0 = ict $. Squaring gives $ (x^0)^2 = -c^2t^2 $, and applying differential calculus, we get $ (dx^0)^2 = -c^2dt^2 $. Sensible and expected to have the tensor formula spit out the Minkowski Metric. The author then later explicitly states the coordinates are $ x^0 = ict, x^1=x,x^2=y,$ and $x^3 = z$.  My questions is then, why is it most authors on the subject omit the imaginary unit on the time coordinate? For example, .   The only reason I can fathom omission is if the author is using metric signature $ [+,-,-,-] $, where I started off learning the theory with signature $ [-,+,+,+] $ which may be the reason seeing the time coord with no imaginary unit seems dissonant to me. All help appreciated!  Edit: After reading the other answers, my questions is now one of why and how (mathematically) do we obtain the Minkowski Metric Signature. More specifically the one element with a different sign.


Here's a quote from my textbook:  Although reallocating an array is an O(n) operation, it is amortized over n items, so the cost per item is O(1).  I can't find a clear definition for what amortized means in this context.

What is meant by "Constant Amortized Time" when talking about time complexity of an algorithm?


Bruce Banner has no power over the Hulk. Bruce doesn't even remember what happens when he is the Hulk. He is afraid to turn into the Hulk all the time. Especially inside a Helicarrier. In one of the scenes, he crushed everything on his way and almost kill Black Widow, and fought with Thor.  But in the battle against the Chitauri in New York Bruce arrived on a small motorbike, did a maneuver and turned into the Hulk, who could understand where is the allies are and where is the villains.   I don't think that Bruce had learned to control him, because in Thor Ragnarok he didn't know that he spent 2 years on Sakaar.  So, why and how he could understand the situation?

In the Avengers movie, when      Bruce Banner is on the helicarrier, he becomes angry and transforms into the Hulk. Black Widow happens to be next to him and even though both are on same team, he attacks her and then Thor.  He becomes hostile to everyone on the ship.  But later on, in the fight against Chitauri troops, Hulk is very comfortably self-controlled.    Why is that?    The only thing I could think of is that it has been many days (a year?) since the Hulk had gotten angry, so he couldn't control himself.    But that's lame to be so puny when Bruce Banner was compared to Stephen Hawking in intelligence.


Hi does anyone know the easiest way to put 3 table side by side like in the figure below, but with only one caption at the bottom of these tables.


This film was made sometime the 80s I think and was concerned with scientists who developed some device that could be used to record memories. The main story was about one of the scientists dying and using the device to record her death. This resulted in the military getting involved. That is about all I remember but I remember it being a very good and thought provoking film that I would like to watch again. I just cannot remember what it was called though. Does anyone know what this movie is called?

I know that this sounds like Strange Days, which I haven't seen, but from the Wikipedia description I don't think that's it.  I saw this back in the early-to-mid-90's on TV, pretty sure it was a premium channel. It follows a research group who develops a way to record experiences. Not thoughts, but at least the sights, sounds, smells, touch, etc. They record it onto this reel-to-reel tape, it looked striated and golden in color. The protagonist is the head of the research team.  I don't remember a great deal of the plot, but there were conspiracies surrounding the invention. The lab clown decides to give it a whirl by putting the bike-helmet-sized apparatus on his head and going out to have a little fun, in the classic wine, women, and song fashion. Once he returns, an older member of the team finds the tape and finds a section where the clown is having sex. Later on, the protagonist, who is the lead researcher, finds the older member shut up in his house seemingly for days and nearly comatose. The older researcher had the playback device over his head and is non-responsive. Worried, the protagonist removes the helmet and puts it on himself, only to find that the older researcher had snipped a few seconds of tape and had them running on a non-stop loop; the moment of orgasm for the clownish researcher. The older researcher eventually comes to and awkwardly apologizes.  I think there were also experiments in recording the sensorum of a lab monkey, and that played into the plot. I remember the plot seemed fairly thin and dull for what seemed to be a pretty neat idea. I don't desperately feel the need to watch the movie, but I'm mildly curious if my impressions would differ 20 years later now.


Does anyone know this location? Thank you

Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.


Because seriously, looking at updates like "User added Enheter for nytenkning" or something (random typeish to illustrate) looks ridiculously stupid. I tried looking at the options, but there was nothing hinting to a way to do so.

Is there a way to translate Trello in other languages? I'm looking for French translation in particular.  Or is it possible to do this translation myself?


I am reading "The Alchemist," by Paulo Coelho.  And I found a text like this:  "He swept the floor with his jacket and lay down, using the book he had just finished reading as a pillow. He told himself that he would..." As you can see, it is "lay down" instead of "laid down". So I would like to ask you guys for helps explaining more whether there is any other meaning for this one or whether I found it true that it is grammatically incorrect?  Thank you so much for your concerns. Best regards.

Here is the sentence:  I laid down on a crunchy bed of autumn leaves at the right corner of the fence and observed the mysterious residence for movement.   I'm not sure whether "laid" is the correct grammatical term or if it is lay, lie, lied, etc.


I have the following identity which I want to prove:  $$\frac{d}{dt} det(A+tB)|_{t=0} = Tr( Cof(A)^TB)$$  where $Cof(A)$ is the cofactor matrix of $A$, and $A$ is an $n\times n$ complex matrix. The reference is exercise 2 in section 1 of chapter 1 of Basic theory, volume I of PDE by Michael Taylor's book (2011 edition).  I tried the definition, i.e:  $$\frac{d}{dt}\det(A+tB)|_{t=0} = \frac{d}{dt}|_{t=0} \sum_{\sigma \in S_n} sgn(\sigma) \prod_{i=1}^n (a_{i\sigma(i)}+tb_{i\sigma(i)})=$$ $$= \sum_{\sigma \in S_n } sgn(\sigma) \bigg[ b_{1\sigma(1)}\prod_{i=2}^n a_{i\sigma(i)}+\ldots + b_{n\sigma(n)} \prod_{i=1}^{n-1} a_{i\sigma(i)}\bigg]$$  How to proceed, I am not sure how does the cofactor of $A$ will look like in the notation with permutations, otherwise what is the missing step in the proof?  Thanks in advance.

Let $\mathbb{R^{ n×n}}$ be the space of n × n real matrices. Show that if $ A(t) \in \mathbb{R ^{n×n}}$ is a differentiable function of $t$ then $\frac{d(det A(t))}{dt}$ is the sum of the determinants of $n$ matrices, in which the $i$th matrix is $A(t)$ except that the $i$th row is differentiated. Use this result to prove that the directional derivative of the determinant function at the matrix $A \in \mathbb{R ^{n×n}}$ along the direction $B \in \mathbb{R^{ n×n}}$ is given by $$(det)^{'} (A; B) = tr(Adj(A)B) = \langle Adj(A)^{T} , B \rangle $$ where $Adj(A)$ is the adjoint of $A$, and where the inner product on $\mathbb{R^{n×n}}$ is the trace inner product given by $\langle X, Y \rangle = tr(X^{T} Y )$ Conclude that $$D(det)(A) = Adj(A) ^T $$.


Moderators have the ability to clear a user's profile on our site, if it violates site policy.  We also have the ability to copy these changes to the user's profiles on other sites.  However, doing this apparently leaves the network profile unchanged.  This is surprising and unexpected.  It seems like a design flaw.  There are circumstances where a moderator needs to clear a user's profile (e.g., because it is abusive or violates our guidelines).  In those circumstances, we need to clear the user's network profile, too.  Moderators should be given that capability, without needing to contact a community moderator.  I don't see much of a risk or harm.  Also, when we need to clear a user's profile because of abusive content, there is no indication that clearing their profile leaves the network profile untouched, or that we need to contact a CM.  This is a trap for the unwary.  I'd go farther and suggest that in every situation where a moderator changes a user's profile and copies it to all other public sites, it should also change the network profile as well.  For moderators: I'm referring to the interface in the tab labelled "Edit profile and settings", and specifically the button labelled "Save and copy changes to all public communities".

Currently, moderators have the ability to reset a user's username and/or profile text, and propagate that to the rest of the network, resetting it everywhere. However, often, the user's stackexchange.com network profile will also need to be reset, and this is currently only possible to do by either the user in question or staff.  Instead of bothering staff every time, moderators should have something available similar to chat, where moderators can change a user's parent site and have access to a "refresh profile" button, which will fetch updated information such as username and avatar from the parent site.  Currently, the only thing that moderators can do on stackexchange.com is to see hidden accounts. It would make sense for moderators to be able to refresh profiles there, like chat, and avoid pinging CMs every time this comes up.


I am have a database that is running fine on website, but when I run it on my xampp for wordpress it is showing single quote ' as â€™ . While database also has â€™ in table, and there is smooth mysql_fetch_array is using to display data, but my xampp and wordpress not showing â€™ as ' single quote, please let me know how can I solve this issue. ?

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am successfully create an onClick based on adapter getPosition.  the common way is that making onClicklistener at onBindViewHolder  @Override public void onBindViewHolder (final MyViewHolder holder, final int position){ holder.mId.setText(itemList.get(position).getId());  holder.itemView.setOnClickListener(new View.OnClickListener(){  public void onClick(View view) {  final Intent intent; if (position == 0) { intent = new Intent(context, MyActivity.class); } else if (position == 1) { intent = new Intent(context, MyActivity2.class); } else { intent = new Intent(context, MyActivity3.class); } context.startActivity(intent);   But, what I am trying achieve is, the parameter that I'm gonna use to go to next Activity is the getId.      I've modified my code to this.  holder.itemView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { final String idNumber = itemList.get(position).getId(); final Intent intent; if (idNumber == "7") { intent = new Intent(context, MyActivity.class); } else if (idNumber == "10") { intent = new Intent(context, MyActivity2.class); } else { intent = new Intent(context, MyActivity3.class); } context.startActivity(intent); Log.e("YOUR ID NUMBER IS", idNumber); Toast.makeText(context, "Recycle Click" + idNumber,Toast.LENGTH_SHORT).show(); } });   When I run it, and when I click on any item, it keeps going to MyActivity3  But, on the Log and toast says, the right idNumber that I click.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


We are looking at deploying the latest version of Office but are having difficulty deciding between Office 365 or Office 2013 volume license. I understand the cost benefits of 365 (and I actually like the user based approach) however I'm having a hard time finding all the info in one place regarding authentication.  I've found an article that describes 3 different auth methods (Office 365 account, DirSync, and ADFS). Ideally I would like to provide as seamless integration as possible so SSO using ADFS is my choice but I don't know much about any of the gotchas that would prevent users from being able to open Office.  I know they have to authenticate every 30 days (with another 30 day grace) to not enter reduced functionality mode) but what about each time Word or Outlook or whatever is opened. Do users creds need to be verified each time? What if the user wasn't connected to our internal network, or they installed a copy on their home computer, or they didn't have network connectivity at all?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


The function I am using now to check this is the following:  function inArray(needle,haystack) {     var count=haystack.length;     for(var i=0;i<count;i++)     {         if(haystack[i]===needle){return true;}     }     return false; }   It works. What I'm looking for is whether there is a better way of doing this.

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


Here is my code :  var string1= "Hello how are =you";   I want a string after "=" i.e. "you" only from this whole string. Suppose the string will always have one "=" character and i want all the string after that character in a new variable in jquery.  Please help me out.

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


So we have been given a table for the Maclaurin series of $\cos(x)$ but I'm not sure how to even start with this problem.    Here is the problem:  Use the Maclaurin series for $\cos(x)$to compute the value of $\cos(5^\circ)$ correct to five decimal places.  And we were giving the following hint:  Hints: Remember that the Maclaurin series assumes that the angle is in radians, not     degrees. Also, since the Maclaurin series for $\cos(x)$ is alternating and decreasing in     magnitude for small $x$, the error in using a partial sum of the series for the sum is less     than the first term in the series omitted.  Can you please help me to get started on this?

I'm working on a problem:  Compute cos(5°) to 5 decimal places with Maclaurin's Series  I know that that function cos(x) has a Mclaurin representation of:  $ \sum_{n=0}^\infty \frac{(-1)^n (x)^{2n}}{(2n)!} $  The only part I am unsure of is how to find out many terms n to choose.  I'm not sure if I am supposed to use the alternating series estimation or taylor series estimation or what.


I'm in need of changing the position of the Enderman's legs when it is in the sitting pose. I have tried searching the files but I couldn't find them so asking here.

I have been trying to edit an entity's model in Minecraft. Is there any way to do this? I understand that Optifine can be used, but is there another way?  For example, say I wanted to remove the head of a zombie model. How could I do that?  I've tried to search the appdata folders, and have downloaded model makers, but don't know how to use them without Optifine. I would be fine using it, but I'm using update 1.14.


In the west we celebrate many types of holiday. Christmas, Halloween, and Valentines Day, just to name a few. However, I would like to know if there are any similar types of occasions in middle-earth, and what (if any) Tolkien based them on. I'm also quite interested to know if there were race specific holidays, or any sort of hero worshiping days. Thanks.

Does any species, in any age, in any of the works by Tolkien have designated days of celebration, except birthdays, besides the holidays mentioned in the  on Wikipedia?


So I'm trying to install the nvidia drivers for my laptop (it has GeForce 940MX) but without luck.  I'm trying to install them by typing:   sudo ubuntu-drivers autoinstall   Unfortunately this fails and gives the following output:  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:  nvidia-driver-396 : Depends: nvidia-dkms-396 (= 396.54-0ubuntu0~gpu18.04.1) but it is not going to be installed                      Depends: nvidia-utils-396 (= 396.54-0ubuntu0~gpu18.04.1) but it is not going to be installed                      Recommends: nvidia-settings but it is not going to be installed                      Recommends: nvidia-prime (>= 0.8) but it is not going to be installed                      Recommends: libnvidia-compute-396:i386 (= 396.54-0ubuntu0~gpu18.04.1)                      Recommends: libnvidia-decode-396:i386 (= 396.54-0ubuntu0~gpu18.04.1)                      Recommends: libnvidia-encode-396:i386 (= 396.54-0ubuntu0~gpu18.04.1)                      Recommends: libnvidia-ifr1-396:i386 (= 396.54-0ubuntu0~gpu18.04.1)                      Recommends: libnvidia-fbc1-396:i386 (= 396.54-0ubuntu0~gpu18.04.1)                      Recommends: libnvidia-gl-396:i386 (= 396.54-0ubuntu0~gpu18.04.1) E: Unable to correct problems, you have held broken packages.   Can you please explain me what the exact problem is (I'm having some hard time trying to understand it) and what should I do to fix it?

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 have included a graphic using \includegraphics into a \begin{figure} \end{figure} in revtex4-1. The figure appears in section II (i.e. 2) but the caption of the figure says Fig.1 (this is not a problem per se).   The problem is when I refer to the figure by saying e.g.   See Figure \ref{Figure: Fig1} then the output is See Figure II.  I suspect because the figure occurs in section II. How to fix this? Or perhaps this is OK for journals (e.g. J math phys)? Below you can find a MWE      \documentclass{revtex4-1}     \usepackage{amsmath}     \usepackage{graphicx}     \usepackage{verbatim}     \usepackage{color}     \usepackage{subfigure}     \usepackage{hyperref}     \begin{document}     \section{First Section}     hey     \section{Second Section}     \begin{figure}        \includegraphics[width=.5\textwidth]{StupidPicture}\label{Figure: SimplyStupid}        \caption{This is a stupid picture}     \end{figure} Hello dear reader, please see Figure \ref{Figure: SimplyStupid}. Thanks.      \end{document}

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


Lately I've noticed a very annoying trend where individual answers are being indexed by Google. Often these are not even the accepted answer but for whatever reason it's what gets picked up.  Is this a recent change in SO's indexing policy? A profile setting to always go to the question would be awesome.

Lately, I've seen many search results in the form of https://stackoverflow.com/q/<id> and /a/<id> on Google. Why do I see these slug-less permalinks instead of the full URL?  For instance, a search for  gives  instead of :        For the record, it seems that Google has indexed  and .


I'm trying to prove that  $⌊xy⌋ \le ⌊x⌋⌊y⌋ + ⌊x⌋+⌊y⌋$ by writing x as $x=m+\epsilon_1$ and $y=n+\epsilon_2$ for some positive integer $m,n$. Trying to use the inequality $⌊xy⌋ \le xy$ and $(m+\epsilon_1)(n+\epsilon_2)<m+n+mn$, but it turns out that the inequality doesn't hold, and I have no idea how to prove this inequality then. Can somebody share some lights on this issue? Thanks!

I'm reading a book about proofs and I'm currently stuck in this problem.  Prove that for all real numbers $x$ and $y$ we have that: $$\lfloor x\rfloor \lfloor y\rfloor \leq \lfloor xy\rfloor \leq \lfloor x\rfloor \lfloor y \rfloor + \lfloor x \rfloor + \lfloor y \rfloor$$  I though I could do it by cases, considering when the number is a pure integer and when is an integer plus some real number. But by doing this I end up with having a lot of cases to show. Is there any better, simpler and clever approach? Thank you!  PS: I end up with a lot of cases because there is a point where I will have to consider "subcases" of cases specifically when the integer part is multiplying with the positive "rest" less than one


Consider the following code snippet:  SuperClass superClass = new SubClass(); // Instantiating SuperClass reference SubClass subClass = new SubClass(); // Instantiating SubClass reference   If I list fields/methods of superClass object, I can see methods from SuperClass only. Then what's the difference between:  SuperClass superClass = new SubClass();   and  SuperClass superClass = new SuperClass();   I know it could be a case of polymorphism and I can use SubClass reference, as SubClass IS-A SuperClass, but why would I use SubClass reference if I want to instantiate SuperClass as I'm getting the same fields/methods by instantiating it with SuperClass?  I've seen this question but I'm still confused.    Edit: I am not talking about interfaces here. I know about interfaces that we can use them to assign objects of the classes that implements them. I'm talking about only superclass.  Any help on this would be appreciated.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


It goes into a black screen and then the only option left is to force shutdown (using the power button) and turn on again. Please help as it is really annoying and I have to shut down every time I need to close the laptop or transport it.  Laptop Model: Acer Aspire E 15 (E5-573-5108)

I have recently upgraded my desktop to Ubuntu 16.04. I had one problem with it before, which was that the Unity Launcher and status bar were missing. I solved this with . However, when I try to suspend my machine, the following occurs: The hard drive will save the last bits of data and will turn itself off. But the thing is: the computer itself is still turned on. This means I am stuck with no screen input, and it forces me to push the reset button on my computer case, as I can't take control of my pc anymore.  Can anyone help me with this?


This is doc.tex  \documentclass{article} \begin{document} a \end{document}   Then I xelatex doc.tex and md5 doc.pdf, so I get a unique md5  code. If I run xelatex again on the same tex file it produces a diff pdf (diff md5).  What can I do for xelatex to procude the same md5 result for the same tex file?

I am interested in using LaTeX in a way such that when I compile twice, I get the very same resulting file.  My test.tex:  \documentclass{article} \begin{document} Hello, World! \end{document}   Compiling yields different hashes:  8493b40b225993d01d46ed7479725d8b4e9f6efbfddcc8d6d657f00084d41cdb  test.pdf 05f2a3cd3780df33470a4363da18b008595e42acd9a085d76c83b6c83dc71c41  test.pdf   and so on.  (This also applies when compiling to DVI at least a minute apart.)  My guess is that this is, at least, due to the Created and Modified metadata of the PDF. I followed  for fixing those, but I still get different hashes.  I found out that when compiling with faketime '2008-12-24 08:15:42' pdflatex test the file will be reproducible. I conclude that there is no random data involved, but it's only dependent on the time.  My question is thus, can I influence that time for pdflatex from within my TeX document?


$$\sin^2z+\cos^2z=1\tag a \space \forall z \in \mathbb{C}$$  $(a)\div\sin^2z$  $$1+\cot^2z={\csc^2{z}}\tag b$$  $(a)\div\cos^2z$  $$\tan^2z+1=\sec^2z\tag c$$  $(b)$ and $(c)$ are derived from $(a)$.  But where was $(a)$ originally derived from?

Could you provide a proof of Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?


What do you call someone when they're always asking for something, and then is dissatisfied after getting exactly what they ask for?

I searched on Google - but mainly find "difficult" / "demanding". I am just wondering if there is any more appropriate word?


I Have a list A: A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]  I want to code a function that will return a list of lists B: B=[[4,5,6],[10,11,12],[16,17,18]]  I tried this: def listing():     A=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]     ans= [A[i:len(A)] for i in range(0, len(A), 3)]     return ans     But it gives me a very long and incorrect output, how could I fix this?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Question Give a bijection from $\Bbb N\to\omega^{\omega}$ Where $\omega^{\omega}$ is the set of ordinals expressible in Cantor normal form as: $$\sum_{i=k}^0\omega^i\cdot a_i:a_i\in\Bbb N_{\geq0}$$ Attempt 1 A close try is to let $a_i$  count the number of consecutive ones and twos in an integer's binary representation: $27=11011_2\mapsto\omega^2\cdot2+\omega+2$ But since there are no zero-length sequences of ones or twos in binary representations, this is unable to represent any ordinal having a finitely long sequence of consecutive zero coefficients. Attempt 2 One might think of just reducing each coefficient by $1$ like this: $27=11011_2\mapsto\omega^2+1$ This now represents zero coefficients, but it fails to inject because it gives the same ordinal $0$ for all the following numbers: $S_n=1,2,5,10,21,42,85,\ldots$. Attempt 3 Ideally I'd like to fix this approach rather than take a new approach altogether.  I'm not sure how to proceed but I have a rough hunch we might be able to add or multiply a number (which may not truly be an ordinal) of the following form or similar: $$\beta=\sum_{i=0}^\infty\omega^{2i+k}\cdot$$ but I'm all out of ideas really, beyond that.

I have few questions to the proof of this claim that is illustrated in a textbook.  $Seq (\mathbb{N})$ of all finite sequences of elements of $\mathbb{N}$ is countable.   Proof: Since $Seq(\mathbb{N}) = \bigcup^{\infty} _{n=0} \mathbb{N}^n,$ it suffices to produce a sequence $\left \langle {a_n | n \in \mathbb{N}}\right \rangle $ of enumerations of $\mathbb{N}^n,$ i.e. for each $n \in \mathbb{N}, a_n =\left \langle {a_n(k)| k \in \mathbb{N}}\right \rangle $ is an infinite sequence, and $\mathbb{N}^n = \{a_n(k) | k \in \mathbb{N}\}$   Let $g$ be a bijection from $\mathbb{N}$ to $\mathbb{N} \times \mathbb{N}.$ Define $a_1(i) = \left \langle {i}\right \rangle, \forall i \in \mathbb{N}; a_{n+1}(i) = \left \langle {b_0,...,b_{n-1},i_2}\right \rangle, $ where $g(i) = (i_1,i_2)$ and $\left \langle {b_0,...,b_{n-1}}\right \rangle = a_n(i_1).$ Hence $a_n$ is onto $\mathbb{N}^n.$  My questions: This means $a_2(i) = \left \langle {i_1, i_2}\right \rangle,$ where $g(i) =(i_1,i_2).$ Then $a_3(i) = \left \langle {i_1,i_2,i_2}\right \rangle $ $,a_4(i) =\left \langle {i_1,i_2,i_2,i_2}\right \rangle $ and $a_n(i) =\left \langle {i_1,i_2,...,i_2}\right \rangle$ etc? If so, given $f = \left \langle {f(0),...,f(n-1)}\right \rangle  \in \mathbb{N}^n,$ I don't understand how could $f $ be expressed as $a_n(i),$ for some $i \in \mathbb{N}?$  Appreciate any clear instruction. Thank you.


Let $$n= 2^a p_1^{e_1}...p_r^{e_r}q_1^{f_1}...q_s^{f_s} $$ be the prime factorization of $ n \in \mathbb{N} $, where $ p_1,\ldots,p_r $ are the primes leaving a residue of $1\bmod{4}$, $q_1,...,q_s$ are the ones leaving a residue of $3$, and $f_1,...,f_s $ are even numbers.  How can I show that   $$ \# \{(a,b) \in \mathbb{Z} ^2 | a^2 + b^2=n \} = 4(e_1+1)...(e_r +1 ) ?$$  Any help is appreciated. __ _Edit  I try to get an example for this to understand it more..the answere in the linked duplikate is not very clear to me. lets take $ 65$  $65= 5* 13 $  $65=(1* 3+2*2)^2+(2*3-1*2)^2  $  I can't find a representation for the $4(e_1 +1)..(e_r+1) $ what is $e$ in this case?

This is an extra question from an old examination paper:     VI. Let $n>1$ in $\mathbf{Z}$ and let $r(n) = \#\{(a,b)\in \mathbf{Z}^{2};n=a^{2}+b^{2}\}$ Let also $n=n'n''n'''$ where $n',n'',n''' \in \mathbf{N}$ and   $p|n' \Longrightarrow p\equiv 1\mod 4 ; p|n'' \Longrightarrow p=2 ; p|n''' \Longrightarrow p\equiv 3 \mod 4$   for $p\in \mathbf{N}$ prime.   i) Show that if $n'''$ is not a square, then $r(n)=0$.  ii) Show that if $n'''$ is a square and $n' = 1$, then $r(n)=4$  iii) Show that if $n'''$ is a square and $1<n'=p_{1}^{e_{1}}\ddots p_{k}^{e_{k}}$ where $p_{1},...,p_{k}$ are different primes in $\mathbf{N}$ and $e_{1},...,e_{k} \in \mathbf{N}$, then it holds that $r(n)=r(n')=4(e_{1}+1)\ddots (e_{k}+1)$    I am completely dumbstruck and can't see how to begin (and neither did an older student who took this exam and whom I asked for hints). Help is greatly appreciated.


I have a 120gb SSD which is dedicated to /root and a separate HDD for /home but for some reason my root drive is full and I can't see why. I've tried autoclean autoremove and clean but it hasn't helped. I've been having problems with lightdm and spent hours scanning a faulty usb drive with testdisk, its possible some big error logs could have been created, though I don't know where. Is there a way for me to trouble shoot this? $ df -h Filesystem      Size  Used Avail Use% Mounted on udev            2.9G     0  2.9G   0% /dev tmpfs           588M  1.8M  586M   1% /run /dev/nvme0n1p2   96G   91G  284M 100% / tmpfs           2.9G   26M  2.9G   1% /dev/shm tmpfs           5.0M  4.0K  5.0M   1% /run/lock tmpfs           2.9G     0  2.9G   0% /sys/fs/cgroup /dev/loop1      114M  114M     0 100% /snap/audacity/675 /dev/loop2      157M  157M     0 100% /snap/chromium/1213 /dev/loop4       55M   55M     0 100% /snap/core18/1754 /dev/loop3       97M   97M     0 100% /snap/core/9665 /dev/loop5       97M   97M     0 100% /snap/core/9436 /dev/loop6      159M  159M     0 100% /snap/chromium/1229 /dev/loop7      162M  162M     0 100% /snap/gnome-3-28-1804/128 /dev/loop9      146M  146M     0 100% /snap/firefox/392 /dev/loop10     256M  256M     0 100% /snap/gnome-3-34-1804/36 /dev/loop8      161M  161M     0 100% /snap/gnome-3-28-1804/116 /dev/loop11     145M  145M     0 100% /snap/firefox/387 /dev/loop12     256K  256K     0 100% /snap/gtk2-common-themes/13 /dev/loop0      114M  114M     0 100% /snap/audacity/666 /dev/loop13     256K  256K     0 100% /snap/gtk2-common-themes/9 /dev/loop14      63M   63M     0 100% /snap/gtk-common-themes/1506 /dev/loop15     116M  116M     0 100% /snap/spek/43 /dev/loop16      30M   30M     0 100% /snap/snapd/8140 /dev/nvme0n1p1  188M  7.8M  180M   5% /boot/efi /dev/loop17     291M  291M     0 100% /snap/vlc/1700 /dev/loop18      55M   55M     0 100% /snap/core18/1880 /dev/loop19     112M  112M     0 100% /snap/simplescreenrecorder-brlin/69 /dev/loop20      30M   30M     0 100% /snap/snapd/8542 /dev/loop21     291M  291M     0 100% /snap/vlc/1620 /dev/sda1       3.4T  490G  2.7T  16% /home tmpfs           588M   24K  588M   1% /run/user/1000  Ok, so syslog.1 and kernlog.1 are both 35.9 each, they probably would have gotten bigger if they could - this caused major problems with my system - lightdm stopped working and a login loop on boot. EDIT: I need to open these to find out what the cause was, but I suspect they will lock up my PC with the amount of data to open - can anyone confirm this or have any suggestions to see the contents? EDIT: Cause found, question answered. I think it may be better to ask another question RE: how to read/open the files EDIT: The cause seems to have been testdisk or the faulty drive. I aborted a deepscan on the drive and unplugged it. The top 20 lines of syslog, thanks to Soren A, are: Jul 27 14:09:08 ryzen kernel: [19606.795097] sd 10:0:0:0: [sdc] tag#0 device offline or changed

I've run into a problem on one of my servers running 16.04: there is no disk space left.  I have no idea what is taking up the space. Is there a command to list the current directory sizes, so I can traverse and end up in the directory taking up all the space?


Both these terms seem to refer to the jagged parapets you see on classic medieval castle towers.  Merriam-Webster  "battlement" like this:     a parapet with open spaces that surmounts a wall and is used for defense or decoration   And it  "crenellation" like this:     1   :  battlement      2   :  any of the embrasures alternating with merlons in a battlement — see battlement illustration    Looking at the picture, it appears a "crenellation" is a gap in the parapet, and a "merlon" is a solid part, while "battlement" is the whole thing.  But this doesn't seem to match up with the usage in , which says "crenellation" is the process of converting a parapet into a battlement (by knocking holes in it).  If I specifically want to talk about what Merriam-Webster calls "merlons," what is the best word to use?

What do you call these?  Please provide a reliable source with your answer.


Sometimes I forget to add some files before commiting. With Mercurial I fix it this way:   hg qinit  Convert commit to patch Update patch Convert patch to commit   Can I do anything like this with Git?

I wrote the wrong thing in a commit message.  How can I change the message? The commit has not been pushed yet.


I've read this: ?  In the main answer (by Dan) it's said:      The AccountManager then asks   you if you want the requesting app (YouTube) to be able to use the   requested account (Google account). This might be in a dialog that   appears over the app, or in a notification.   However, upon installing something, e.g. Facebook (which adds facebook account as I understand) and starting to use it, I don't remember some system message asking me to grant access to facebook account to facebook app. Facebook app can post on facebook w/out using facebook account?

Can such an app freely read my emails/calendar/message/docs/etc.?  The "USE ACCOUNTS ON THE DEVICE" permission is also known for developers as .  Example of such apps: , .


My c:\windows\temp\ folder contains 18 GB which I seem unable to do anything about.   That's getting to be a problem because my SSD isn't that big (100 GB) and it's starting to become too much. I need to do regular manual cleanups to keep it from flooding. If I could free 18 GB the difference would be huge.  It's all system or temporary files, because my data is on a separate hard disk, so my cleaning options are (very) limited.  I found an old  (CCleaner), but it's from 6 years ago, so it may no longer be the best option today.  I tried the Windows 7 , regular and with 'clean up system files', but it detects only minimal amounts of disk space that can be cleared. Only about 200 MB was cleared that way, far too little.  Maybe the  is (a part of) the problem?  Any suggestions?  Edit regarding duplicate: I don't think this question is a duplicate because I specifically mention that I looked into older questions and found the one suggesting CCleaner. And, as I mention I don't know if it's still a reliable asset on today's systems.  Also, the Windows 10 download issue is ofcourse much more recent than 6 years, so I don't know if the tool in that answer can deal with it. (or if there's a solution at all).  It's not like I didn't do any effort before asking my question.

Is there any software for cleaning Windows' local settings / temp folder?   With no installing, not many options, just a simple, nice interface with buttons to do what's needed and which wouldn't scare the younger users. Explicitly made for clearing the temp folder? Or maybe there is some command which can be run in  (cmd.exe)?  It's just that  has some weird bug. It stores the files in this folder and now I and few other users are experiencing problems with files being used, not found and lot of mess generally which I guess is caused by the files being stored in this folder and not overwriting.  So it's kind of a hard situation here..  does not help in clearing this folder and  is very confusing for young users and people not into the OS.


While revising a question from my phone, I was unable to access anything other than "Add picture". I don't remember this being an issue but I rarely edit from my phone. Can anyone confirm? I'm using Android 9 with the latest Chrome 86.0.4240.99. I see the full editing menu when I ask a new question:  But I only see a menu with the option to add a picture when editing (revising) a previously submitted question:

I seem to have clicked on something that changed my display preferences. The main site is now very minimalistic, with fewer controls and different fonts.  I want to change it back, but where is it?


I am trying to print random numbers using random , but when I try to print the output in one line using end= " " the output doesnt show anything until I break the program.  import random import time while True:     x = random.randint(1,6)     print(x, end=" ")     time.sleep(1)   The out put is like this after I interrupt :  C1 2 3 5 5 4 5 4 1 --------------------------------------------------------------------------- KeyboardInterrupt                         Traceback (most recent call last)

Is output buffering enabled by default in Python's interpreter for sys.stdout?  If the answer is positive, what are all the ways to disable it?  Suggestions so far:   Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)   Is there any other way to set some global flag in sys/sys.stdout programmatically during execution?


Currently, on the Stack Exchange , the row for スタック・オーバーフロー (Stack Overflow in Japanese) has two obviously-wrong values:  visits/day: 0  site age: 2013y11m   If the latter is used somehow as the denominator in calculating the former, that would explain how these are caused by a single bug.

I took this screenshot just now, and  about the new . I refreshed the page, went back, and nothing changed.    And, here's what I find odd:  It clearly isn't almost 2014 years old. That's more likely when it was started.  How can there be 8.7 questions a day, while there are 0 visits a day? That's kind of impossible.   I'm hoping here that it's not just me. I know very limited Japanese, not even enough to hold a conversation with a toddler. I'm merely observing.


The question in the title is motivated by recent comments on other questions on this site that were surprising to me.  Is there a precisely defined and widely accepted standard for CVs that would mean omitting one or more publications in a CV is dishonest?  Please base your answer on one or more references and not merely personal opinion.  Note that this question is about honesty, not about whether it is a good idea to omit publications.

I'm a Masters Student who has an old paper. I wrote a paper years ago with a research group in my old school. However, it's a really simple idea and was published in a not very reputed journal (Impact Factor 0.3). It was a long time ago, and honestly I would rather not be affiliated with it.  International Journal of Advanced Trends in Computer Science and Engineering  Should this be included in my CV?    It's relevant to what I'm doing now but just not very important and I consider it a not very good use of my time


How could I go about replacing a string:  Hello my name is max!     with  Hello my name is max!  &lt;script&gt;alert("DANGEROUS SCRIPT INJECTION");&lt;/script&gt;     I can easily have all the <,> replaced with &lt;,&gt; with:  string = string.replace(/</g, "&lt;").replace(/>/g, "&gt;");   but I still want to be able to have  links.    I have also looked into preventing script injection with:  var html = $(string.bold());  html.find('script').remove();   But I want to be able to still read the script tags rather than them being removed.

Does anyone know of an easy way to escape HTML from strings in ?  I need to be able to pass an arbitrary string and have it properly escaped for display in an HTML page (preventing JavaScript/HTML injection attacks).  I'm sure it's possible to extend jQuery to do this, but I don't know enough about the framework at the moment to accomplish this.


I am trying to build logistic regression that will work with unbalanced data, i.e. I have about 0.33% of data parts that have to be classified as class 1 and others that have to be classified as 0.    The question is how should be standard binary crossentropy loss () changed in order to cope with such data?  I tried adding weight to the first part - 1 class, equal to inverted frequency of the 1 class; adding weights to both parts equal to percentage of 0 class for the first part and 1 class to the second class; but nothing seems to work

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


How would I make a double value have a trailing zero in java. My program deals with currency. Ex. How do I to make 9.5 to 9.50?

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I am travelling from Kuwait to Goa via Mumbai. According to the latest guidelines I need to take a PCR test on arrival and get my receipt before I can take the connecting flight. Can someone who has recently travelled tell me, do I just have to give the test and take my domestic flight or wait for the results, I have a 7-hour layover, is that enough? I've heard you need to wait to get the test results to take the connection.

I am travelling from Berlin to Goa via Mumbai. According to the latest guidelines I need to take a PCR test on arrival and get my receipt before I can take the connecting flight. Can someone who has recently travelled, please shed some light on how long it might take on average to exit the flight, complete immigration, take the test and proceed to the transit gates?


Task from old exam:     Prove that $$\sum_{k=1}^{n}k! \cdot k= (n+1)! -1$$   I'd like to use induction proof and nothing else.  Here is what I did:  $n=1:$ $\sum_{k=1}^{1}1! \cdot 1= (1+1)! -1 \Leftrightarrow 1=1$  So this is true, so it will work for an $n$ already.  It worked for one $n$, now we need to show it will work for every other $n$, too.  $$\sum_{k=1}^{n+1}k! \cdot k= (n+2)! -1$$  But what can I do from this point on? There is this sum symbol on the left and I don't know how to continue with it. Any hints maybe?  I really don't want know another way of solving it. It might be easier with telescope or something else but the recommendation was induction.

Prove the summation:  $$\sum_{i=1}^n i! \cdot i = (n+1)! - 1$$ using induction.   base case:  $n=1$: \begin{align*} \sum_{i=1}^1 i! \cdot i &= (1+1)! - 1 \\ 1 &= 2 - 1 \\ 1 &= 1 \end{align*}   This is a question from my test review packet, currently have the base case completed and I am a bit lost on where to go from there. Any help/hints are appreciated.


Hi i was adding style sheet to my visual force page, it is working fibe but it is affecting  default salesforce tabs look un-user-friendly.  without adding style sheet it is looking like   <apex:page standardController="case" extensions="UnclaimedTicket" sidebar="false" tabStyle="case"  recordSetVar="search" >  </apex:page>     when style sheet was added to the page  <apex:page standardController="case" extensions="UnclaimedTicket" sidebar="false" tabStyle="case"  recordSetVar="search" >  <link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.1.1/css/bootstrap.no-icons.min.css" rel="stylesheet"/>     </apex:page>     by adding the style sheet i am loosing the salesforce and version logos on top right and also the whole page was zoomed in and giving very narrow and closed look.   Is there any way to over come this ...

I am trying to create a simple page using Bootstrap within salesforce. I need this page to have the standard salesforce header and sidebar.  When I use the standard bootstrap library via a CDN and the page is affecting all the CSS styling for my standard salesforce headers and side bars. Any help on how to prevent this ?


I have list of objects with properties  Id and Name.   foreach (var x in mydata)  {                     var model = new MyViewModel()     {        Id = x.Days.Id,        Name = x.Days.Name                                        };                                         models.Add(model);  }   I'm returning list (models) which has duplicate items, how can I return list of distinct items inside?

I am playing with LINQ to learn about it, but I can't figure out how to use Distinct when I do not have a simple list (a simple list of integers is pretty easy to do, this is not the question). What I if want to use  on a list of an Object on one or more properties of the object?  Example: If an object is Person, with Property Id. How can I get all Person and use Distinct on them with the property Id of the object?  Person1: Id=1, Name="Test1" Person2: Id=1, Name="Test1" Person3: Id=2, Name="Test2"   How can I get just Person1 and Person3? Is that possible?  If it's not possible with LINQ, what would be the best way to have a list of Person depending on some of its properties in .NET 3.5?


I have a small group of adventures. One of them is playing  also described . A large part of the story for him is hunting undead creatures. One of the undead I want to use is ghost, but the party has no cleric or paladin.   Is there a way to remove possession other than some of the ones here:    I thought about Turn Undead, but again, they have no cleric or paladin. Is there another way to remove it that I am missing?

So I'm thinking of a few adventure hooks for my players, and I thought about the possibility of them removing a demon that has possessed a noble. Are there currently any mechanics or rules surrounding possession and the removal of entities?  If not, does anyone have any play-tested homebrew rules?


This is my first time preparing chicken and I'm affraid i might've undercooked it. There's a small red spot in the middle of it. I've seasoned it so it might be from that

Last night I was grilling chicken thighs on a barbecue and I was told that if there was any pink inside them, they are not safe to eat. My question is twofold:  (a) Is this true?  (b) Is there a way to tell that doesn't involve cutting the thighs open to have a look at the colour?


I am trying to find the last two digits of 3745  I know I need to solve 3745 = x(mod 100), but I'm not sure how to go about doing that. I know it has something to do with Euler's  Any help is greatly appreciated

I'm trying to find the last two digits of ${2012}^{2012}$. I know you can use (mod 100) to find them, but I'm not quite sure how to apply this. Can someone please explain it?


My problem while I am converting Double to BigDecimal I am loosing original value. My requirement like input would be  like Double val = 10435383974769502920d and want to convert like 10435.383974769502920 but getting below output. I have tried with Double BigDecimal..but no success  Double val = 10435383974769502920d; System.out.println(BigDecimal.valueOf(val).movePointLeft(15));  output : 10435.383974769502

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm trying to find the kernel verion running on my system. I'm running Ubuntu 13.04 with  the gnome desktop because  a failed ati/amd driver install moofed my unity desktop and I haven't been able to get it back...even though I've removed the offending  drivers and re-installed the generic version that came with the original install.

Could you tell me the version number of the 10.04.1 kernel?


I am implementing a component blueprint of the  component which needs aria attributes to properly toggle the chevron from being open and closed.   Let's say I need to add the attribute: aria-expanded="false" to the actual button tag. If there is a way to access the DOM and add this, how would I do this and at what part of the rendering cycle should it be added?  The base component looks like this:  <lightning:buttonIcon        iconName="utility:switch"       variant="bare"        alternativeText="toggle switch"        class="slds-m-right_x-small slds-m-top_x-small"/>   The html markup looks like this:  <button    class="slds-button slds-button_icon slds-m-right_x-small slds-m-top_x-small"    title="Toggle details for Add Users to Your Org"    aria-controls="step-0-summary-action"    aria-expanded="false">      <svg class="slds-button__icon slds-summary-detail__action-icon"         aria-hidden="true">         <use            xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#switch">         </use>     </svg>   <span class="slds-assistive-text">Toggle details for Add Users to Your Org    </span> </button>

In Visualforce you can use custom html attributes like this   <apex:outputText html-data-myAttr="myValue" ... />   Now in a Lightning-Component trying the same  <ui:outputText html-data-myAttr="myValue" ... />   I got only     The attribute "html-data-myAttr" was not found on the COMPONENT markup://ui:outputText: Source   How to set custom attributes in Lightning?


Someone can say that this is a duplicate question but I have looked through a lot of answers, tried a bunch of methods but can not understand what I have missed.  I use very basic Spring Security in my REST server. When I first time make a request to my server directly from a browser to localhost:.../getData I am of course asked to authorize.   Then the server permits this request every time. How I can logout so that the next requests require an authorization again?  Now I tried to use several methods on my server for logout:  @RequestMapping(value = "/logoutMe2", method = RequestMethod.GET) public void logout2() {      SecurityContextHolder.getContext().setAuthentication(null);  }  @RequestMapping(value = "/logoutMe3", method = RequestMethod.GET) public void logout3() {      SecurityContextHolder.clearContext();  }   @RequestMapping(value = "/logoutMe", method = RequestMethod.GET) public void logout(HttpServletRequest rq, HttpServletResponse rs) {      SecurityContextLogoutHandler securityContextLogoutHandler =             new SecurityContextLogoutHandler();     securityContextLogoutHandler.logout(rq, rs, null);  }  @RequestMapping(value = "/logoutMe4", method = RequestMethod.GET) public static void myLogoff(HttpServletRequest request, HttpServletResponse response) {     CookieClearingLogoutHandler cookieClearingLogoutHandler = new CookieClearingLogoutHandler(AbstractRememberMeServices.SPRING_SECURITY_REMEMBER_ME_COOKIE_KEY);     SecurityContextLogoutHandler securityContextLogoutHandler = new SecurityContextLogoutHandler();     cookieClearingLogoutHandler.logout(request, response, null);     securityContextLogoutHandler.logout(request, response, null); }   If I use direct link         I receive a Not Found error.  What I am missing? It seems that I have forget some obvious thing...

Is it possible to log out user from a web site if he is using basic authentication?  Killing session is not enough, since, once user is authenticated, each request contains login info, so user is automatically logged in next time he/she access the site using the same credentials.  The only solution so far is to close browser, but that's not acceptable from the usability standpoint.


Is there a method like {enumerate}, but which can enumerate questions in alphabetic order, As in the list in Question 2 in the image below.    I tried something like this:  \documentclass{article} \usepackage[utf8]{inputenc}   \begin{document}  \section{} \subsection{} \begin{enumerate}     \item     \item \end{enumerate} \end{document}

I've seen documentation whereby an \alph command is put around the \begin{enumerate} somewhere, but I'm not entirely sure how that operates...


So, I installed KDE Plasma so I could try it out, I thought it would just install the desktop environment, but it apparently it also installed the boot screen too. I managed to remove the DE and everything else I deemed useless, but I can't seem to remove the boot screen, how do I put back to the normal Ubuntu boot screen?

With regards to Plymouth --  Are there alternative boot screens available?  What's the easiest way to change the boot screen?


This problem is from Ram Murtys book Problems in analytic number theory. In his solutions it only says that this is an immediate result when combining the Möbius inversion formula: $$f(n)=\sum\limits_{d|n}g(d) \ \ \ \forall n\in \mathbb{N} \Leftrightarrow g(n)=\sum\limits_{d|n}\mu (d)f(n/d) \ \ \ \forall n\in \mathbb{N}$$ and gauss theorem: $$\sum\limits_{d|n}\phi (d)=n.$$ I cant get it right though... Here is one thing that I have tried thus far: Let $f(n)=\phi (n)$ in Möbius inversion formula. We wish to show that $g(d)\stackrel{?}{=}\dfrac{\mu (d)}{d}$. We have that $$g(n)=\sum\limits_{d|n}\mu (d)f(n/d)=\sum\limits_{d|n}\mu (d)\phi (n/d).$$ From here I have tried a bunch of things which seemed unjustified and did not actually get me anywhere. Can someone give me a hint on how to solve this problem?

Prove that, for every natural n, $\sum_{d|n} \frac{\mu(d)}{d}=\prod_{p|n}(1-\frac{1}{p})$ and conclude that $\phi(n)=n \sum_{d|n} \frac{\mu(d)}{d}$.  Proof of $\sum_{d|n} \frac{\mu(d)}{d}=\prod_{p|n}(1-\frac{1}{p})$:  I am havent trouble doing the proof of this statement,  Proof of $\phi(n)=n \sum_{d|n} \frac{\mu(d)}{d}$:  By definition, the Euler phi-function is given by $\phi(n)=\sum_{m \leq n,(m,n)=1}1.$ Eliminating the coprimality condition $\gcd(m,n)=1$ yields  $\phi(n)=\sum_{m \leq n} \sum_{d| \gcd(m,n)} \mu(n)=\sum_{d|n} \mu(n) \sum_{m \leq n, d|m}1 = \sum_{d|n} \mu(d) \frac{n}{d}$


In my very first rendering I have an unknown object in my rendering image. its not found on any layer and I cant finde any unknown axis or objects on my rendered layers. Its a white circle behind a cup. could it have something to do with the light?

Have Blender on about 4 machines rendering animations. Just spotted on one of the machines its rendering something different from the actual scene that I have setup.    Top window shows a different set of layers objects to whats actually being rendered in the rendering window below.  In my scene contents, layers objects 1-5 are not visible, but these are the ones that look like they are being rendered.  The only thing I can assume is that perhaps it might be because I did not save the document before clicking render, but I would not have expected that behaviour (you dont need to save your word document before printing it).  Can anyone confirm why this is happening?


What does the following from  mean?     In general, in shells other than zsh, $PATH outside double quotes breaks when the value contains spaces or other special characters, but in an assignment, it's safe   Could you give some example? Thanks.

The old advice used to be to double-quote any expression involving a $VARIABLE, at least if one wanted it to be interpreted by the shell as one single item, otherwise, any spaces in the content of $VARIABLE would throw off the shell.  I understand, however, that in more recent versions of shells, double-quoting is no longer always needed (at least for the purpose described above).  For instance, in bash:  % FOO='bar baz' % [ $FOO = 'bar baz' ] && echo OK bash: [: too many arguments % [[ $FOO = 'bar baz' ]] && echo OK OK % touch 'bar baz' % ls $FOO ls: cannot access bar: No such file or directory ls: cannot access baz: No such file or directory   In zsh, on the other hand, the same three commands succeed.  Therefore, based on this experiment, it seems that, in bash, one can omit the double quotes inside [[ ... ]], but not inside [ ... ] nor in command-line arguments, whereas, in zsh, the double quotes may be omitted in all these cases.  But inferring general rules from anecdotal examples like the above is a chancy proposition.  It would be nice to see a summary of when double-quoting is necessary.  I'm primarily interested in zsh, bash, and /bin/sh.


I am a volunteer in Italy since January 2017 and I have a national visa type D - Multi - 190 days. I'm staying in Italy 6 months until my project is finished in July 2017.  This is my first time in Europe, so I would like to make a trip to some other countries in the Schengen area at the end of June, before I return to my native country in the beginning of July. I'm afraid that I can't do it if I don't have a residence permit for Italy. They gave me an appointment on the 23rd of May at the Police department to apply for a residence permit, but I think it will be too late to get the decision (normally, it takes 2 or 3 months).  Can I use my visa to travel without residence permit? If it is possible, do I need prepare any document or paper to travel with my visa?

I have requested for a French long term (Type D) student visa from a consulate in India. It's a national Type D visa and not a Schengen visa. My question is that can we still go to other Schengen countries on this visa? If not then can we get a Schengen visa from a consulate in France?


In a short document, I wrote reference-based sentence, which ended up reading :     With the previous example (figure 1), the features used are presented in table 1.   I would like both figures and tables to share the same counter, so after figure 1 comes table 2, then table 3, figure 4, etc.  How can I merge the counts for tables and figures ?  A similar question was asked on SO () but I couldn't make the answers work.

Is there a way to have a List of tables and figures as one list? Currently I have  \listoffigures  \listoftables   which generates two lists and starts a new page for each list. What I want is a list that contains Tables and Figures in the same list, numbered in sequence (i.e. the first table should get the number following the last figure at that point), Babel-compatible and KOMA-Script-compatible if possible (I use both). The example command  \listoffiguresandtables   should create something like     List of Figures and Tables      1.1 A nice picture caption      1.2 Another nice picture caption      2.1 A caption of a cool table    How to do this?


How would i be able to set my 3d manipulator so that one of the axis is parallel to the face of what im moving, i want to move it parallel to the face of the plane.

When in Edit Mode, I find sometimes I want to move an edge, or at least two vertices, in a direction that would be perpendicular to their orientation along their existing edge.  At that moment, the Transformation Orientation selections (Normal, Local, Global, et al) have no vectors pointing in that direction.  How might I, or is it possible to, change the "polarity" of those manipulator vectors (independent of the given selections: Global, Local, Normal, Gimble, View) so that one of them is pointing in the perpendicular direction to the line/edge between the vertices?


I know that if $X = a Y + b$ and $a>0$ then $\operatorname{Corr}=1$. it can be proved easily using the fact that $Cov(X,Y) = E(XY)-E(X)E(Y)$ and $\sigma^2_X =Var(X) = a^2 Var(Y) = a^2 \sigma^2_Y$ and $E(X) = a E(Y) + b$, and substituting $X = a Y + b$ in the covariance formula, and also the definition of correlation that $\operatorname{Corr}(X,Y) = \frac{\operatorname{Cov}(X,Y)}{\sigma_X \sigma_Y}$  But as I know, it is an "if and only if" relation (biconditional) and so we have that if $\operatorname{Corr}(X,Y) =1$ then $X = a Y + b$ with $a>0$. I can understand this intuitively but I don't know how to rigorously prove this.

I need to prove that $$\rho(X,Y) = \pm 1 \implies Y = aX+b,$$ for some constants $a, b$.  With the help of  and  here's what I've got so far:  Let $X, Y$ be random variables and $a$ some constant. $aX + Y$ is also a random variable whose variance by definition is non-negative $$V(aX+Y) \ge 0.$$ From variance properties: $$a^2 V(X)+2a\text{Cov}{X,Y}+V(Y)\ge 0$$ This is a quadratic as a function of $a$, which has a maximum of 1 root. It has a root only for $a$ that satisfies $$a^2 V(X)+2a\text{Cov}{X,Y}+V(Y)=0$$ let it be $a_0$. That means that $$V(a_0X+Y)=0$$  How can I continue from here?  Thank you.


I have string list of a deck of card the strings are as such, A-DIAMONDS, 2-CLUBS, etc.  I want to be able to generate 5 unique items from this list randomly.   I know how to do this in python with Random.sample(5) but in trying to find a solution in C#. everything seems to be generating a random, put it in a list, generate another random, check it against the list and it is working fine.   Is there a more compact way of doing this in C#?  Here is my full code after using Linq for shuffling.      class Program {     static void Main(string[] args)     {         string [] cardValues = { "A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K" };         string [] cardSuites = { "HEARTS", "CLUBS", "DIAMONDS", "SPADES" };         List<string> deckOfCards = new List<string>();          foreach(string cardsuit in cardSuites)         {             foreach(string cardvalues in cardValues)             {                 deckOfCards.Add(cardvalues + "-" + cardsuit);             }          }          for(int i = 0; i <= 10; i++)         {             List<string> pokerHand = new List<string>();             Random rand = new Random();             deckOfCards = deckOfCards.Select(x => new { card = x, rand = rand.Next() }).OrderBy(x => x.rand).Select(x => x.card).ToList();             for(int x = 0; x < 5; x++)             {                 pokerHand.Add(deckOfCards[x]);             }             Console.WriteLine(String.Join(", ", pokerHand));         }           Console.ReadLine();     } }   }

What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.


Why do hair continuously grow on human heads, while the same doesn't happen on other parts of the human body? Where there are hair, they only usually grow to a fixed length; but they seem to have no limit (or at least a much higher limit) as long as the head is concerned (and the face, in men).  Why does this only happen on humans? When did it start happening? What kind of evolutionary advantage could there be in overly-long head hair, so that humans have them while other primates and mammals don't?    I know there are various questions around about why humans have much less body hair than other mammals; mine is related but different: why are we the only species with so much hair on our head, to the point that they might even become inconvenient if we don't cut them?

Some hair especially body hair regrows after trimming but stops growing after a while. What is the mechanism behind control of hair growth and how is the length limit determined?


I've gone through my model and manually selected edges to be creased. I'd like a way to reselect these creased edges long after they have been deselected. Could anybody help me out with this?

Technically simple thing, how can I check for exact crease weight edges and then select only them? Like only that one edge on the cube ?


When I try to run my code, it gives me an error saying that i'm trying to attempt RecyclerView on a null object reference. The problem that android studio detect is in this line recyclerView.setHasFixedSize(true);. Anybody know the problemm ?  Here is the Activity:   public class SalesHistoryActivity extends AppCompatActivity {      @BindView(R.id.sales_recycler)     RecyclerView recyclerView;      SalesAdapter adapter;     List<Sales> salesList;     Sales sales;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_sales_history);           salesList = new ArrayList<>();         recyclerView.setHasFixedSize(true);         recyclerView.setLayoutManager(new LinearLayoutManager(this));         adapter = new SalesAdapter(this, salesList);         recyclerView.setAdapter(adapter);          loadItem();      }   Here is the adapter  public class SalesAdapter extends RecyclerView.Adapter<SalesAdapter.ItemViewHolder> {      private Context mCtx;     private List<Sales> salesList;      public SalesAdapter(Context mCtx, List<Sales> salesList){         this.mCtx = mCtx;         this.salesList = salesList;     }      @NonNull     @Override     public ItemViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {         View rootView = LayoutInflater.from(mCtx).inflate(R.layout.list_sales, null, false);          RecyclerView.LayoutParams layoutParams = new RecyclerView.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);         rootView.setLayoutParams(layoutParams);         return new ItemViewHolder(rootView);     }      @Override     public void onBindViewHolder(@NonNull ItemViewHolder holder, int position) {          final Sales sales =salesList.get(position);          holder.tvDate.setText(sales.getDate());         holder.tvType.setText(sales.getType());         holder.tvQty.setText(sales.getQty());         holder.tvPrice.setText(mCtx.getString(R.string.price, sales.getPrice()));      }      @Override     public int getItemCount() {         return salesList.size();     }      public class ItemViewHolder extends RecyclerView.ViewHolder {          TextView tvDate, tvType, tvQty, tvPrice;         public ItemViewHolder(@NonNull View itemView) {             super(itemView);         }     } }

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 suddenly found all icons (and related spacings) greatly increased. A newly created icon has the same size. Reboot has no effect. How can I resize the whole desktop in Ubuntu 18.04?

I just upgraded to 18.04 (with GNOME 3.28) from 16.04. I am using gnome-shell, gnome-ubuntu-desktop. After upgrading the icon size on desktop are very large.  I am unable to find my option to decrease the size in preferences. How do I decrease it?


Im facing this problem for the first time and it looks very funny to me because there is no issue with the settings.  My object is showing in the Rendered viewpart but when i hit render for final image result its nothing in the result. lol

I have a model which you can see here (camera perspective).    In the second image, you can see how the render turned out.    I'm at my wit's end trying to figure our why it's not showing up in the render. If anyone needs more information, just ask and I'll get it to you. I've already checked the normals and they're not the cause.


I have recently become a fan on Ubuntu and I wanted to get it on my old computer. I downloaded the 32 bit software and I have burned it to a usb stick in fat32. While on the installation bit of Ubuntu when I boot it up, press F2, change the priority of booting up the computer, all that, it doesn't give me an option of running Ubuntu along side of Windows. It just says, "Delete the whole disk" and also "Something other" Could someone please help? Thanks.

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


I could reach my ubuntu-server via  in a previous install of ubuntu server 16.04 LTS. Before I got that install fully configured, I reinstalled (changed to a different physical disk).  Now I can only reach it with its IP in my local subnet .  gives me an error:     name not resolved   Both installs include LAMP.  Not sure how to get it working via  again. I have checked the hosts file:  127.0.0.1 localhost 127.0.1.1 ubuntu   resolv.conf has  75.75.75.75 75.75.76.76 8.8.8.8   as name servers.

Bit stuck here.  I have 2 machines that cannot resolve LAN hostsnames, unless there are specific entries in /etc/hosts  But other machines on the LAN can resolves hostnames.   My LAN:    1 x Cisco router runnning DD-WRT v24-sp2 with DNSMasq enabled. I've configured this with the hostnames and IPs on my LAN. 1 x Kubuntu 12.10 (resolves all hostnames correctly as long as they are entered into DNSMasq on the router) 2 x NAS (also resolve all names correctly) 1 x Ubuntu Server 12.04 (this does NOT resolve local hostnames unless they are entered into /etc/hosts) 1 x XBMCLive (Dharma) (same - does not resolve unless entries are in /etc/hosts)    How do I get the last 2 to use the DNSMasq entries on the router? Each machine is set to use the router as a nameserver, and all units resolve external addresses correctly.  Thanks.  some more info:  whilst on server, if I ping another PC (wstation)  $ ping wstation PING wstation.local.domain (x.x.x.x)    If I then append .local  $ ping wstation.local PING wstation.local.local.domain (x.x.x.x)   and directly  $ ping 10.0.0.4 PING 10.0.0.4 (10.0.0.4) 56(84) bytes of data. 64 bytes from 10.0.0.4: icmp_req=1 ttl=64 time=0.387 ms 64 bytes from 10.0.0.4: icmp_req=2 ttl=64 time=0.316 ms 64 bytes from 10.0.0.4: icmp_req=3 ttl=64 time=0.312 ms 64 bytes from 10.0.0.4: icmp_req=4 ttl=64 time=0.280 ms 64 bytes from 10.0.0.4: icmp_req=5 ttl=64 time=0.322 ms ^C --- 10.0.0.4 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 3998ms rtt min/avg/max/mdev = 0.280/0.323/0.387/0.038 ms


English is not my native language and I am confused when writing about midnight of some day. I am mostly using 24h-format on every day basic, so I want to make sure how to use 12h-format properly.  When I am informing people they can do something between 19 April (today) 9:00 till midnight/end of the day on 22 April. How do I write it properly?     You can sign in to my diary/visit me etc. from 19th (9am) of April   until 22nd of April (12pm)   Soo... Is 22 April 12pm the same as 23 April 00am? (analogical 22 April 12:30pm is the same as 23 April 00:30am?)  What is the accepted practice?

From what I understand, the word "midnight" is usually interpreted incorrectly.  Midnight is written as "12am" which would imply that it's in the morning.  Therefore, it should be at the start of the day.  On the other hand, both  and the  define it as "twelve o'clock at night".  Some examples:   "Midnight on the 10th of December" "Midnight Thursday" "Midnight tonight"   are usually interpreted as:   Straddling the 10th and the 11th of December Straddling Thursday and Friday Straddling today and tomorrow   but should they technically mean:   straddling the 9th and the 10th of December? straddling Wednesday and Thursday? This is much less clear. Technically is there a midnight "tonight", or is midnight "tomorrow morning"?   What do you think? How should "midnight" be interpreted?


I am having trouble adding current PATH permanently on my ubuntu server for a postgresql user. Every time I ssh or restart the server I have to run export PATH="${PATH}:${HOME}/.local/bin", I am running a python script which will not work unless this command is done so I tried a a simple addition of this in python but it didn't solve. import os cmd ='''export PATH="${PATH}:${HOME}/.local/bin"''' os.system(cmd) ... rest of my code  I also tried sudo export PATH="${PATH}:${HOME}/.local/bin" but it gets removed after each restart what can I do to permanently add this path or make the python script run it.

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


We are trying to upgrade our sql server from 2005 to 2012. we got some offers for different type of license from some resellers. the only thing I'm not sure now is, there's one type core license with software assurance (more expensive), and another type core license without software assurance (cheaper). I wonder if this software assurance means the access of SA account?  we would of course like to have the SA access, as we have now in sql 2005.   I guess i'm probably confused with the meaning of software assurance and SA account.    This question is not a double to the suggested question, I was confused with the SA account, and the Software assurance in SQL server license. It's completely two different questions, and the answer from the other post, doesn't answer my question.

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


This code:  import pprint pp = pprint.PrettyPrinter() matrix = [[None]*6]*6 ROWS = len(matrix) COLS = len(matrix[0]) for row in range(ROWS):     for col in range(COLS):         matrix[row][col] = row+col pp.pprint(matrix)   Prints this:  [[5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 10], [5, 6, 7, 8, 9, 10]]   Whereas this code produces the desired result:  import numpy import pprint ROWS = 6 COLS = 6 matrix = numpy.zeros((ROWS,COLS)) for row in range(ROWS):     for col in range(COLS):         matrix[row][col] = row+col pp.pprint(matrix)   And outputs this:  [[  0.,   1.,   2.,   3.,   4.,   5.], [  1.,   2.,   3.,   4.,   5.,   6.], [  2.,   3.,   4.,   5.,   6.,   7.], [  3.,   4.,   5.,   6.,   7.,   8.], [  4.,   5.,   6.,   7.,   8.,   9.], [  5.,   6.,   7.,   8.,   9.,  10.]]   I thought I knew how multidemsional lists worked but I guess not. What could cause my code to be assigning the same values to every row in the list?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?