This may be a correct vs. more correct situation.  “If life was simple, we’d never grow.”  I wonder if this should be "were" or "was." "Were" is used for unreal conditionals, so when looking up “if life…” then “were” normally shows up. But I wonder if “was” would actually be correct here because life being simple is a possibility for some and not for others, so there’s duality to the meaning. It could be simple for some and complex for others.

I'm not a native english speaker, so even though I'm decently proficient at it, I don't really "know the rules" sometimes, and this is one that's been confusing me for a long time.  Which one is correct in each sentence?     If the movement [was/were] to continue uncorrected, the tower would   one day topple.      If I [was/were] rich, I would buy a yacht.   NOTE: I care not only about the case of "I", but also "she", "them", "it", etc, as in the example of the tower. Would it be any different if instead of the tower, it'd be me who'd topple if uncorrected?  I'm pretty sure it's "were" in both cases. That's what they taught me, I think. I started to doubt when I saw a lot of "was", but it sounded like the typical intentional mistake used "stylistically". ("If I was a rich girl...")  Then I saw it some more and thought it came down to an American/British English difference (I was taught British, in theory, and most of what I read is American).    But that tower sentence came straight from "The Guardian"...  When do you use was and when do you use were?


I have a country shapefile with many districts polygons which are administrative boundaries, I want to have a shapefile for each of the district, which tool in ArcGIS can I use to accomplish this

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


Do you know how you can add ringtones to your iPhone? I just noticed that my iPhone X has default ringtones still just like the older ones.

The iPhone has a very limited selection of default ringtones.  How do I create a new ringtone for my iPhone?


Can someone please help me in this exercise?     $$2^n \ge 1+n $$   What I've done so far is prove for $n=1$. So:     $$2^1 \ge 1+1 $$   $$2 \ge 2 $$   Which is true   Now, I'm supposing that what I have to prove is for $n+1$:     $$2^{n+1} \ge 1+ (n+1)$$   But I don't know how to continue it.  Thank you for the help

I am currently in the process of learning how to prove statements by induction. For the most part, I understand but I am at most clueless when it comes to prove some inequalities.  For example, I am having a hard time proving that: $n < 2^n$ is true. (Even if it's clear that it is indeed true!)  In the induction step, I am stuck with: $n + 1 < 2^{n + 1}$  I don't know what would be the assumption I should make from this statement.  Anyone could point me in the right direction? Thanks!


im trying to render a laserbeam animation. (In EEVEE) The beams need to be on a transparent background, as they will be projected over an image/animation for a project. here is the problem: it looks correct in blender when rendering, the background is transparent, the beams glow. i added a glare node in composite and everything looks fine.  Now when i export the picture as a png or tiff or anything, it wont save the glow/emission , while it shows in the render window. In photoshop it turns up like this: (no glow! - black layer added to show)  Why doesnt it export the glow/emission ? what am i doing wrong? it drives me quite nuts at the moment ;|

To avoid the problems that PNG has with fire Transparency, I exported the images in EXR format, but when I compare them to the PNG counterpart, the colours in the EXR image are way to blown out.  Why and how can I correct for that?


Like my title says I am having an issue with getting an out range error with my code in C++. The basic gist is that I am making a vector for a 52 card deck. After which I am randomizing the order of the cards.   When I go to print out the cards one by one in the terminal I get an out of range error for the location of memory. The output gives me the first card but then breaks.   From error checking I know my Deck size is 1 but I thought that my push back when creating the deck would increase the deck size to be 52.   Is there something I am missing? Any help is appreciated.  #include <iostream> #include <chrono>        #include <random> #include <vector>  int main() {     srand(time(0));     std::vector <std::string> Deck[52];     CreateDeck(Deck);     ShuffleDeck(Deck);     ShowDeck(Deck); }  void ShowDeck(std::vector <std::string> Deck[52]) {     for (size_t i = 0; i < 52; i++) {          // Microsoft C++ exception: std::out_of_range at memory location 0x004FF718.         std::cout << Deck->at(i) << ",";         if ((i + 1) % 13 == 0) {             std::cout << "\n" << std::endl;         }     } }  void ShuffleDeck(std::vector <std::string> Deck[52]) {      //shuffle deck to a randomize order     unsigned seed = rand() % 100;     std::shuffle(Deck, Deck + 52, std::default_random_engine(seed));     std::cout << " Shuffling Deck......." << std::endl; }  void CreateDeck(std::vector <std::string> Deck[52]) {     //using the arrays below contruct a 52 playing card deck      std::string suit[4] = { "S","C","D","H" };     std::string value[13] = { "A","2","3","4","5","6","7","8","9","10","J","Q","K" };     int x = 0;     for (size_t j = 0; j < 4; j++)     {         for (size_t i = 0; i < 13; i++)         {             Deck[x].push_back("[" + value[i] + suit[j] + "]");             x++;         }     } }

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


I have connected a LCD to my laptop. When I try to open a file in Nautilus, the target application opens in my laptop display, rather than the second display (in which nautilus window is open).  I don't want to change the default display. I want to open windows in the display I am working in. If my file manager is in laptop display, I want the apps to open in laptop display. If my file manager is in external display, I expect to open files there.  The output of xrandr  Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 32767 x 32767 eDP1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm    1366x768       60.1*+    1360x768       59.8     60.0      1024x768       60.0      800x600        60.3     56.2      640x480        59.9   VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 connected primary 1920x1080+1366+0 (normal left inverted right x axis y axis) 527mm x 296mm    1920x1080      60.0*    50.0     59.9      1920x1080i     60.1     50.0     60.0      1680x1050      59.9      1280x1024      75.0     60.0      1440x900       59.9      1280x960       60.0      1280x800       59.9      1152x864       75.0      1280x720       60.0     50.0     59.9      1440x576i      50.1      1024x768       75.1     70.1     60.0      1440x480i      60.1     60.1      832x624        74.6      800x600        72.2     75.0     60.3     56.2      720x576        50.0      720x480        60.0     59.9      640x480        75.0     72.8     66.7     60.0     59.9      720x400        70.1   DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) VIRTUAL1 disconnected (normal left inverted right x axis y axis)

I would like to be able to set my "default" monitor to be my external 25' monitor instead of my laptop one when I have my external monitor connected.  Many applications always open on the laptops monitor instead of the "big" one. Currently, the only way I know to disable this behavior is to disable the laptop monitor, however, as I use a laptop stand to bring it higher, Id like to be able to use my laptop monitor as a "secondary" monitor, without dock (launcher) and without any windows opening on it.  The only way for a window to reach it would be to actually manually grab it and drag it over.  Some known applications that ALWAYS open on the laptop monitor and drive me crazy: Slack, Rocket Chat, Thunderbird, Sky, System Settings, Guake (specially annoying since i cant move it).


$$i=\sqrt{-1}=\sqrt{\frac{1}{-1}}=\frac{1}{i}=\frac{-i^2}{i}=-i$$  I'm sure there is a mistake above but I can't figure out where. What's exactly wrong in the above situation & why?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


How do I  two vector layers one with a projection like UTM WGS 84 Zone 45N using QGIS?

Is there a rubbersheet tool in QGIS similar to ? Basically, I want the yellow line to move to the red line.  I have tried Vector Bender with a buffer of 0.1m through to 100m and still get a bad result: Input  Bend Green to Red Output


I know I can create a folder's shortcut by pressing Ctrl and shift, but I wonder how to do it in a command line.

I am installing p4v in /opt, but /usr/bin is on my path.  Is it possible to create a soft or symbolic link for p4v from /opt to /usr/bin, so I can just type "p4v" since /usr/bin is in my path?


man function are best way for learning new information in Ubuntu. They are the most extensive source possible. Every man has a section of **Example (in majority of cases),my query is on ways to use it without opening man and then copy-pasting the lines. Let me elaborate further below.   Suppose I am wishing to learn about the find function. I type  man find   My query is  I wish to directly run the example section of the man so that I can get a practical understanding on seeing outputs. How to directly run the examples of the man in terminal quickly?  In the above example of man find, the example codes were  EXAMPLES        find /tmp -name core -type f -print | xargs /bin/rm -f         Find files named core in or below the directory /tmp and delete them.  Note that this will work incorrectly if there are any filenames containing newlines, single or double quotes, or spaces.         find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f         Find files named core in or below the directory /tmp and delete them, processing filenames in such a way that file or directory names containing single or double quotes,  spaces  or  newlines        are correctly handled.  The -name test comes before the -type test in order to avoid having to call stat(2) on every file.         find . -type f -exec file '{}' \;         Runs  `file'  on every file in or below the current directory.  Notice that the braces are enclosed in single quote marks to protect them from interpretation as shell script punctuation.  The        semicolon is similarly protected by the use of a backslash, though single quotes could have been used in that case also.    One of the solution on way to just view the example directly in terminal (which I could think off) is   man find | grep -i "example" -C 2    Ofcourse, this did not take me to the example section and in turn help me in running it

For example instead of whole manual of apt-get I want jump to -f option from terminal prompt right away, without using search through manpage.


When I press shift+f8 or f8 on boot time windows 10, I can't find safe boot mode. How to boot in safe mode windows 10?

I've been through the Windows 10 upgrade, and am experiencing a recurring "INTERNAL_POWER_ERROR", which is stopping me from logging in.  I'd like to be able to try to boot to safe mode, but it appears that pressing F8 during boot is no longer enough, so how can I boot in safe mode (or any of the other recovery options) on a Windows 10 PC that doesn't let me log on?


Linux novice here... I have 2 Internet connection with 2 ISP providers with 2 NIC.  I tried for a long time to combine these 2 isps connection to use like a single connection.     Home Connection Number 1:   #1st ISP... which is dhcp auto eth0 iface eth0 inet dhcp      Home Connection Number 2:   #2nd ISP auto eth1 iface eth1 inet static address 192.168.200.97 netmask 255.255.255.0 gateway 192.168.200.1 dns-nameservers 208.67.222.222 8.8.8.8   Now my questions are:  Can I combine these 2 connection as a single one.. I have a server ("Fat piping"...as this concept is not clear to me...and how to setup or what to setup ).. then how I do it ???  If not then can you direct me how can I add load balancing... if one connection is not available the second connection take over...  And overall how can I learn more about linux's networking...  Thanks in advance...  Update [Solved]  at-last...found a solution https://github.com/lstein/Net-ISP-Balance   thanks... lincoln-stein from ubuntu forum http://ubuntuforums.org/showthread.php?t=2214561

Direct Question:  My evga classified motherboard has two ethernet ports.  I want to use them simultaneously to improve the speed of a remote connection.  (Yay for programming remotely).  How do I do this?  At present /etc/network/interfaces:  auto lo eth0 eth1  iface lo inet loopback  iface eth0 inet static address 192.168.1.202 netmask 255.255.255.0 gateway 192.168.1.2  ifrace eth1 inet static address 192.168.1.201 netmask 255.255.255.0   What should I change? Is there a package I need to install to bond the two channels.  Background: I do a lot of remote computing both from home to office and office to home.  But (to take my ISP out of the equation), let's frame the question as if I'm really just interested in maximizing the file transfer rate between two computers on the same (local) network.  Both boxes have dual ethernet motherboards.  Using a simple Linksys WRT54GS as a 5 port switch (ignore wireless and isp) -- how do I maximize the transfer rates between the computers?  Please Note: I'm not interested in load balancing -- Correct me if I'm wrong, but I want to bond the two channels together so that the box appears as if it has one connection that's twice as fast.


Let $(R,+, . )$ be a (not necessarily commutative) ring for which $r+r=r$ for all $r \in R$. ( boolean ring ).  ☆ by considering $(r+r). (r+r)$ show that $r+r=0_R$?   ☆show that $(R,+,.)$ Must be a commutative ring? Using $(r+s)(r+s)$

A ring $R$ is a Boolean ring provided that $a^2=a$ for every $a \in R$. How can we show that every Boolean ring is commutative?


Where should I ask Node.js or anything related to server-side JavaScript questions?   Can anyone suggest me the right place?

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


I think this question is not completely out of topic so I am showing the courage to ask the community for help as I don't formally understand the reason. Today I was going through this , from channel , but I can't understand the reason behind the origin of this type of sound. Is it just a unusual thing as mentioned or there is something specific physicis or Physical intuition behind it( obviously there is physicis)? Then what is it?

I've come across a couple of videos where some interesting sounds are produced using ice.  (Click on the images to see the video.)      Here, they drop a block of ice into a deep crevice and as the block falls, you can hear some strange sounds. These sounds remind me of some sound effects in old cartoons and sci-fi movies. The pitch of the sounds start high and end up low. Is this some kind of doppler effect?      Here, there's a man performing 'nordic skating', making the same sounds as he skates on top of a thin ice sheet. Maybe they are caused by the cracking ice. But why does that sound like this?    There are some other videos too, where they skip stones on frozen lakes.    Here the ice makes some high-frequency sounds which correspond to the chirping of birds.  What are these sounds and why do they sound the way they sound?


So there is a web appliance running on my Mac localhost. I want to check how it looks in Internet Explorer. I have Parallels Desktop 12 running Windows 10 with installed Parallels tools.   However, if I run IE in Coherence, it still cannot load localhost. I tried to set up IP of my mac to 10.0.0.45 (because I know my router gives IP in this range) and then accessing http://10.0.0.45 from parallels IE  While this worked, I would like to know if there is better process to do that

I am running Yosemite on a MacPro.  I have an AMPPS installation with a file sharing database app running within it.   I access the files via 127.0.0.1 on a browser running on the Mac. How can I set this up to allow access from within the rest of my home network, using that address?


Question.  Suppose that a function $f$ is defined on an interval $I$, $c$ is a point of $I$, and $\{x_k\}$ is any sequence of points in $I$, no term of which is $c$, such that $\lim_{k\to \infty} x_k =c $. Define a sequence $\{y_k\}$ by $y_k=\frac{f(x_k)-f(c)}{x_k-c}$.  a)Prove that $f'(c)$ exists if and only if $\lim_{k\to \infty} y_k $ exists and has the same value for every such sequence $\{x_k\}$.  b)Prove that, if $f'(c)$ exists, then $\lim_{k\to \infty} y_k=f'(c) $ for every such sequence $\{x_k\}$.  My attempt(...?)  a) Let $\epsilon>0$ be given.  Since $f'(c)$ exists, $\lim_{x\to c} \frac{f(x)-f(c)}{x-c} $ exists.  (...)  There exists $k_0\in \mathbb N$ such that for $k\ge k_0$, $\vert \frac{f(x_k)-f(c)}{x_k-c}-L \vert< \epsilon$.  How can I find the link between $\frac{f(x)-f(c)}{x-c}$ and $\frac{f(x_k)-f(c)}{x_k-c}$?  It just seems so trivial to me and I cannot fill the blank.  Any advice would be appreciated!

Question.  Suppose that a function $f$ is defined on an interval $I$, $c$ is a point of $I$, and {$x_k$} and {$y_k$} are any two sequences in $I$ such that $\lim_{k\to \infty}x_k=\lim_{k\to \infty}y_k=c$ with $x_k<c<y_k$ for all $k$. Prove that, if $f'(c)$ exists, then $\lim_{k\to \infty}\frac{f(x_k)-f(y_k)}{x_k-y_k}=f'(c).$   My Attempt.  Let $\epsilon_k=\frac{1}{k}$ be given.  For $\epsilon_1=1,$ there exists $\delta_1>0$ such that $x_1,y_1\in I, x_1,y_1\in N'(c;\delta_1)$ implies $\vert \frac{f(x_1)-f(y_1)}{x_1-y_1} -f'(c) \vert<\epsilon_1.$  For $\epsilon_2=\frac{1}{2},$ there exists $0<\delta_2<$min$\{\vert x_1-c \vert,\vert y_1-c \vert,\epsilon_2\}$ such that $x_2,y_2\in I, x_2,y_2\in N'(c;\delta_2)$ implies $\vert \frac{f(x_2)-f(y_2)}{x_2-y_2} -f'(c) \vert<\epsilon_2.$  Similarly, for $\epsilon_{k}=\frac{1}{k},$ there exists $0<\delta_k<$min$\{\vert x_{k-1}-c \vert,\vert y_{k-1}-c \vert,\epsilon_k\}$ such that $x_k,y_k\in I, x_k,y_k\in N'(c;\delta_k)$ implies $\vert \frac{f(x_k)-f(y_k)}{x_k-y_k} -f'(c) \vert<\epsilon_k.$  Then by taking the limit to infinity, we obtain $\lim_{k\to \infty}\frac{f(x_k)-f(y_k)}{x_k-y_k}=f'(c).$   It really took me a lot of time to finish the proof and I need this to be checked by an expert:) Is the proof okay? Any response would be appreciated!


, the author is using the command \widowpenalties=3 10000 10000 150. While I can understand what \widowpenalty is doing, I found no documentation for \widowpenalties3 nor for \widowpenalties4. I looked in the TeXBook, in the Companion book, in source2e.pdf, but they don't explain anywhere what those commands are doing, and how they work exactly, with precise details. Could you please shed some light on this notion?

I would like to know if there is any global command that would prevent any page-breaks inside paragraphs. I'd rather have the whole paragraph on the next page instead of having it cut in the middle. I tried the \nopagebreak command but it doesn't do the trick. Any idea?


Label on my phone charger says it's output is DC 5V and 2.1mA. I find this confusing, because at school I was thought that you can only talk about current when you know exact voltage AND RESISTANCE. So, using Ohms law, I thinks manufacturer assumes that resistance of my battery is exactly 5/2.1=2.38 Ohms.  But how can they assume that if people might use this charger for different types of batteries? Why don't they simply say it's 5V?

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I currently have Ubuntu 14.04 installed, but I want a fresh start. I am going to wipe the drive and install Ubuntu Gnome 16.04. Unfortunately I'm having no success at all.  I downloaded ubuntu-gnome-16.04.3-desktop-amd64.iso (the md5 checksum matches) and installed it to a new USB drive. My BIOS allows for both a Legacy Boot and a UEFI boot. I've posted the results when I drive to boot both as Legacy an UEFI below. I'm not sure how to solve these issues. I've tried a different USB drive, and different ports.  My video card is a NVIDIA Corporation GM204 [GeForce GTX 970].  Is this possibly a problem with the boot process, the USB, graphics drivers?   Legacy boot results  I get the gfxboot.c32 error. I hit [Tab], then I tried live and live-install. Both result in this error    UEFI Result  This is the screen that is produced. It flickers a bit, then just remains in the image I show here.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have one million lines in a file. An object is created out of each line and added to a collection. The collection has to be sorted using the custom compareTo() method of class.  Currently I add objects to an ArrayList in the order of reading, then do Collections.sort().  Would it be faster to make a TreeSet?

If I have a sorted list (say quicksort to sort), if I have a lot of values to add, is it better to suspend sorting, and add them to the end, then sort, or use binary chop to place the items correctly while adding them. Does it make a difference if the items are random, or already more or less in order?


How the user can see the reason to close his/her question before it has enough votes to be closed? All I see is close(2/3/4), but if I would know the reason in advance I could improve a question.

When users vote to close a question, the original poster can't see the selected reason why until after the question is already closed.  If they could see this information, they might be able to edit the question to make it more acceptable and averting the need to close it.  For example, the owner of this  cannot see the reason why his question is being voted to close:


I'm trying to send a simple message from a child document (an iframe) back to its direct parent using the window.postMessage API.  Within the parent document I have the following:  window.addEventListener("message", receiveMessage, true); var receiveMessage = function(event) {     console.log("Recieved event " + JSON.stringify(event)); }   Then, in the iframe I have the following:  window.parent.postMessage('message', '*');   Based on everything I've read, this should work and my log message should be written to the console.  Except it's not working.  I'm aware that using the * as the targetOrigin is not always secure, but at this point I just want to sort out the linkage.  Any ideas or anything obvious that I'm missing?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I ran the command file -- * and got this output: -file04: data -file05: data -file06: data -file07: ASCII text  So it basically prints filename and content type. But what do the parameters mean?

I have seen -- used in the compgen command.  For example:  compgen -W "foo bar baz" -- b   What is the meaning of the -- in there?


I've got Decimal class which implements decimal floating point arithmetic. It can be initialized with an integral arithmetic type or a fractional digit stored as a string. Build-in floating point types are deliberately avoided because of their approximative nature. Such approach works well but fractional digits coded as strings look awkward. Is it possible to use somehow C++ literals to build strings (or binary representation) behind the scene?  Decimal a{"1.254684987"}; // current initialization Decimal b{1.254684987_dec}; // desired way

introduces  which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation.  Examples:  // imaginary numbers std::complex<long double> operator "" _i(long double d) // cooked form {      return std::complex<long double>(0, d);  } auto val = 3.14_i; // val = complex<long double>(0, 3.14)  // binary values int operator "" _B(const char*); // raw form int answer = 101010_B; // answer = 42  // std::string std::string operator "" _s(const char* str, size_t /*length*/)  {      return std::string(str);  }  auto hi = "hello"_s + " world"; // + works, "hello"_s is a string not a pointer  // units assert(1_kg == 2.2_lb); // give or take 0.00462262 pounds   At first glance this looks very cool but I'm wondering how applicable it really is, when I tried to think of having the suffixes _AD and _BC create dates I found that it's problematic due to operator order. 1974/01/06_AD would first evaluate 1974/01 (as plain ints) and only later the 06_AD (to say nothing of August and September having to be written without the 0 for octal reasons). This can be worked around by having the syntax be 1974-1/6_AD so that the operator evaluation order works but it's clunky.   So what my question boils down to is this, do you feel this feature will justify itself? What other literals would you like to define that will make your C++ code more readable?    Updated syntax to fit the final draft on June 2011


I frequently browse popular stack questions that appear on the right side of any site. Every now and then I find myself capable and willing to voice opinion/answer a question. This is why I pushed my rep on Stack Overflow, and rocketed (completely legitimate) from 150 to 300-something, in few hours, to get the 100 bonus on all stack sites. (The one you get once you hit 200 rep on any stack site)  So here I am having (similarly to my meta profile) 101 rep and trying to answer    And yet I get      Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.    What gives? Isn't the core idea behind the "100 rep on all sites" award exactly to allow me to post answers? If it says I have 101 (), and yet it would only recognize the original 1 and disregard the awarded 100. What is the point of even getting 100 if I can't take advantage of the perks they should give me...

I registered on  only to post an answer to .  However, since it's a protected question, I am not allowed to answer it. (I found this info from ).  Worth to mention, I can comment on the above question, just not post an answer.  I was under the impression that the whole point of association bonus was to bypass such limits, so why isn't that the case for answering protected questions?


If I login to 1 stachexchange website, sometimes when I go to another one it automatically logs me in.  Sometimes this happens on the main page, and other times it happens when I try and post.    On the other hand, sometimes it just doesn't autologin at all and I have to go to myopenid.

When I'm surfing between SE sites where I'm a member (e.g. I'm on SO and I click on a link to Web Apps or something), any of these things can happen, seemingly at random:   Everything is seamless and I'm logged in automatically Or I get a big notification bar saying "Welcome back Mr Lister; Click here to refresh" Or I'm not logged in at all and I need to click the Log In link manually   Why is that? What causes these differences?  Edit: I found , which has a  tag, but I'm not sure if it's the same problem.


In my master branch There are old commits which are important for me to not loose I have another branch named beta-release and it lost those old commits since I had to reset its head and then had to add all the changes and make a commit , resulting into a single commit of the whole branch which is the updated version of the whole app ! Now if I merge beta-release (into master) instead of deleting those files that are not present in the beta-release branch , it keeps them , basically just merging but I want to override without loosing commits of the master branch but making the single commit of the beta-release branch as the newer commit that replaces everything in master ]  I want to override master with beta release branch with history of old commits in master branch

When merging topic branch "B" into "A" using git merge, I get some conflicts. I know all the conflicts can be solved using the version in "B".  I am aware of git merge -s ours. But what I want is something like git merge -s theirs.   Why doesn't it exist? How can I achieve the same result after the conflicting merge with existing git commands? (git checkout every unmerged file from B)  UPDATE: The "solution" of just discarding anything from branch A (the merge commit point to B version of the tree) is not what I am looking for.


Here is the code I'm trying to use :  $(document, ".openScript").on("click", function() {     $("#scriptWindow").modal("show"); });   This will call the event at any click. But because the .openScript isn't present at the beginning, if I do like below once, it won't be attached to the element that will be created after this code :  $(".openScript").on("click", function() {     $("#scriptWindow").modal("show"); });   I thought it was possible to do like the first example, is there no other way than calling the second code at any time I create an element that has the .openScript class ?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Not in jQuery, vanilla JS.  I have the below code I'm using that works fine within the console; the problem is the 'goCheck' element does not appear right away at default, after the user crawls through a few sections, then it appears visible; because of this the event listener is hitting null immediately.  How could I get this to execute WHEN my 'goCheck' element becomes visible on page?      var goCheck = document.getElementById('input_52_65_chosen');     goCheck.addEventListener('click', function (event) {      var value1 = document.getElementById('input_52_22').value;     var value2 = document.getElementById('input_52_100').value;     var value3 = document.getElementById('input_52_95').value;     // var value4 = document.getElementById('input_52_96').value;      if (value1 > 0 ) {           document.getElementById('rate').style.display = "none";          document.getElementById('pay-plans').style.display = "none";          document.getElementById('field_52_116').style.display = "none";        } else if (value1 === 0 ) {          document.getElementById('field_52_116').style.display = "block";     }     if (value2 > 0 ) {           document.getElementById('rate').style.display = "none";          document.getElementById('pay-plans').style.display = "none";          document.getElementById('field_52_116').style.display = "none";      } else if (value2 === 0 ) {          document.getElementById('field_52_116').style.display = "block";     }     if (value3 > 0 ) {           document.getElementById('rate').style.display = "none";          document.getElementById('pay-plans').style.display = "none";          document.getElementById('field_52_116').style.display = "none";        } else if (value3 === 0 ) {          document.getElementById('field_52_116').style.display = "block";     }     if (value1 && value2 && value3 == 0 ) {          document.getElementById('field_52_116').style.display = "block";     }      } );


From , if a linear transformation, in matrix form $Q{\mathbf {v}}$, preserves vector lengths, then: $${\displaystyle {\mathbf {v} }^{\mathrm {T} }{\mathbf {v} }=(Q{\mathbf {v} })^{\mathrm {T} }(Q{\mathbf {v} })={\mathbf {v} }^{\mathrm {T} }Q^{\mathrm {T} }Q{\mathbf {v} }.}$$ What happens to $Q^{\mathrm {T} }Q$?

Suppose $Q$ is a matrix (perhaps neither square nor real) that satisfies $(Qx)^\mathsf{T}(Qx) = x^\mathsf{T}x$ for all real column vectors $x$ of the right dimensions.  Must $Q^\mathsf{T}Q = I$? Why?


I have dates in 2 tables. Table student is as below:  ID|Name|Examdate 1  John 01/10/2015 2  Fred 11/12/2014   Table retake as below:  ID|RetakeDate 1  02/10/2016 2  05/11/2015   So what I am trying to do is create another table where only students who have taken a retake after 12months or more exist. the difference between examdate and retake date needs to be >=12months.  How do I achieve this?  PS: there could be multiple rows in both tables for the same student!

I have dates in 2 tables. Table student is as below:   ID|Name|Examdate 1  John 01/10/2015 2  Fred 11/12/2014   Table retake as below:   ID|RetakeDate 1  02/10/2016 2  05/11/2015   The IDs in retake relate to the students' IDs in student, i.e. they are the same.  I am trying to create another table where only students who have taken a retake after 12 months or more exist. The difference between examdate and RetakeDate needs to be >= 12months.  How do I achieve this?  There could be multiple rows in both tables for the same student. There will be multiple rows on both tables, as this will allow me to see how many times they have taken a retake and how many times an exam. At this moment in time I don't want to see if the retake is for the latest exam. I just want to see how many retakes they have taken all together. End result should be comparing each Exam date with Retake date. Some more explanation:     Q: So  if a student has dates in 2012, 2013, 2014 and then 2 retakes in 2016?       A: There should 3 rows in the result (one for each date)      Q: What if it's three exams – in 2012, 2013, 2014 – and (a) two retakes – in 2014 and 2016? or (b) one retake – in 2014? What should be expected as the result in each of those cases?          A: It doesn't matter. As long as the (a) retake was taken after 12 months or more, they should appear in the result.


I was just wondering if it is possible to define the contents of a Map Object on initialisation.   For example, an array can be created, as:  new String[] {“apples”, “bananas”, “pears”}   So, I was wondering if there is something similar we can do for maps.

How would you initialise a static Map in Java?  Method one: static initialiser  Method two: instance initialiser (anonymous subclass) or some other method?  What are the pros and cons of each?  Here is an example illustrating the two methods:  import java.util.HashMap; import java.util.Map;  public class Test {     private static final Map<Integer, String> myMap = new HashMap<>();     static {         myMap.put(1, "one");         myMap.put(2, "two");     }      private static final Map<Integer, String> myMap2 = new HashMap<>(){         {             put(1, "one");             put(2, "two");         }     }; }


I am trying to understand the code below:  from functools import reduce reduce(lambda d, i: (i[0] < 7 and d.__setitem__(*i[::-1]), d)[-1], [{}, *{1:2, 3:4, 5:6, 7:8}.items()])      The part that I don't understand is the *.   [{}, *{1:2, 3:4, 5:6, 7:8}.items()]   returns:  [{}, (1, 2), (3, 4), (5, 6), (7, 8)]   Now if i run in isolation  *{1:2, 3:4, 5:6, 7:8}.items()   it returns an error : "File "cell_name", line 4 SyntaxError: can't use starred expression here".  However I am able to run the code without * just fine as a one-line code and returns:  dict_items([(1, 2), (3, 4), (5, 6), (7, 8)])   I have googled it and in  it seems related to unpacking containers, but this one is used in arrays.  However in the full lambda, the * seems necessary and throws an error "'dict_items' object does not support indexing" without the *.  Anyone understand this syntax jargon?  Thanks for any help.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


dy/dx represents the derivative of y wrt x. We are taught that it is not the ratio of dy and dx but a limiting form that the ratio of the change of the dependent variable wrt the change of the independent variable takes when the latter tends to zero. Now if dy/dx is just a symbol representing the derivative how can we separate dy n dx during the process of integration i.e if dy/dx=f(x) then we can write dy=f(x)dx. Are dy n dx real numbers or what do they represent . What exactly are differential. Plz explain elaborately

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


Edit: I have checked for duplicates. There is no post on this website or on Google that matches my problem. Try it for yourself, it's a Windows feature and not a bug or an error. I have tried various machines, running win7 and win10, and they all exhibit the same flashing window when you click outside of its active area.   Edit 2: Happens in any program. Windows Settings, Illustrator, you name it. As long as it is a focused window that requires confirmation before being able to close. It is not always blinking, only when you click outside of the window.   Description: In Windows 10, while in a focused window that require confirmation before being closed, clicking outside the window causes the title bar of the window to rapidly flash with a high contrast color a few times, to warn the user that there's still a window open.    Is there a way to disable this flashing behavior? I don't mind having a window open that requires confirmation to close, I just really don't like the flashing title bar effect.   I have deliberately not embedded this image since it contains flashing imagery.    I think this is particularly annoying and should maybe just flash once, or, warn the user in another, less intrusive way. Or, at least provide a setting to disable the effect. I'm aware it's meant to draw attention, it just seems a bit overkill for the problem at hand. It might also be an issue to users with photosensitive epilepsy.  What I've tried: There is a setting under Ease of Access related to "Show audio alerts visually" but that is toggled off and likely does not affect the title bar flashing. I've looked through Settings and was unable to find any option related to title bar flashing.

Is there some setting in Windows where I can change the default behavior that causes the border and title of a modal dialogue box to flash like 6 or 7 times when I click on the parent window?  Simply focusing it would be plenty to let me know what I did was wrong.   I don't feel the need for all the sirens and bull horns and strobe lights to let me know I clicked in the wrong place.


George Edison and I got in a discussion about my April 30 Rollback to a "NSFW" version of the famous  to the old "Source code comments" question.  While I'm in favour of not using expletives in everyday language here on the site, I strongly feel that editing out the "Fuck"s from this answer is wrong because   it's a WTF classic, and a piece of art, and needs to be either left the way it is or removed completely. Also, it's a quote from a third person.  It's not "NSFW" like an image of a nude person that could get you in trouble at work. It's almost three years old and has been viewed by 433,000 users without an adverse effect on Stack Overflow's culture of communication.    my opinion here is, if you're offended, then don't look at it.  I have reverted it to the "NSFW" version that also contains the OP's very relevant update. I'm not interested in an edit war, and can live with whichever outcome, but a community ruling on this would be good.

Can I use salty, -laden language on Stack Exchange sites, like ?       For more information, see  in the .


I have installed Ubuntu in my system last week which was defaultly installed with Windows 8. Whenever I boot to Windows after a visit to Ubuntu the date and time has changed and vice versa. I have to change the date and time every time when I boot to the OS.Help me to solve this issue..

Dual boot system Windows XP Pro and Ubuntu 12.04.  I have the bios set for the correct time and Ubuntu set for US Eastern time.  Ubuntu will boot up and the time will be off by -4 hours.  If I correct the time in Ubuntu then when I boot up in Windows XP the time will be off by + 4 hours.  This is a fresh install of 12.04. I did not have this problem before reinstalling Ubuntu.


When I tried to install Apache in Ubuntu 18.04 using the command sudo apt install apache2, I got:  E: Distorted line 2 in the sources list /etc/apt/sources.list.d  /official-package-repositories.list E: The list of sources is not read. E: Distorted line 2 in the sources list /etc/apt/sources.list.d/official-package-repositories.list   The second line contains the word universe. After I deleted it, I got:  The apache2 package is not available, but is listed in the dependency list of another package. E: No installation candidate found for the “apache2” package.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I am having windows 10 pro 64 bit OS,With 4 Gb RAM. But in memory section its showing 2.66 GB usable. Why? doing some research(Googling) I found that 32 bit machine can't utilize the full RAM. But though I am having 64 bit machine, still why its showing 2.66 GB usable? I tried a tweak through MSConfig → Boot → Advanced option → unchecking but nothing is working.  ------------------ System Information ------------------        Time of this report: 6/3/2016, 08:39:50          Operating System: Windows 10 Pro 64-bit (10.0, Build 10586) (10586.th2_release.160104-1513)                  Language: English (Regional Setting: English)       System Manufacturer: LENOVO              System Model: 20351                      BIOS: InsydeH2O Version 03.73.069ACN28WW                 Processor: Intel(R) Core(TM) i3-4030U CPU @ 1.90GHz (4 CPUs), ~1.9GHz                    Memory: 4096MB RAM       Available OS Memory: 2722MB RAM                 Page File: 3268MB used, 1885MB available               Windows Dir: C:\WINDOWS           DirectX Version: 12       DX Setup Parameters: Not found          User DPI Setting: Using System DPI        System DPI Setting: 96 DPI (100 percent)           DWM DPI Scaling: Disabled                  Miracast: Available, with HDCP Microsoft Graphics Hybrid: Not Supported            DxDiag Version: 10.00.10586.0000 64bit Unicode   --------------- Display Devices ---------------           Card name: Intel(R) HD Graphics Family        Manufacturer: Intel Corporation           Chip type: Intel(R) HD Graphics Family            DAC type: Internal         Device Type: Full Device          Device Key: Enum\PCI\VEN_8086&DEV_0A16&SUBSYS_380C17AA&REV_0B      Display Memory: 1473 MB    Dedicated Memory: 112 MB       Shared Memory: 1361 MB        Current Mode: 1366 x 768 (32 bit) (60Hz)

I have the following machine configuration:   Intel Core 2 Duo E6300 1 x 2048 MBytes memory chip 2 x 1024 MBytes memory chip 1 x Radeon HD 4870 Motherboard : Gigabyte 945P-S3 Windows 7 RTM 64-bit   In both Windows and the BIOS I have 3.25GB memory available. How can I enable it to support 4GB?  EDIT: I've sort of upgraded the CMOS version, and Windows acknowledges I have 4GB but is only using 3.25GB.    I guess it is hardware after all?


There is a great demand for Red Hat Certified Engineers in the market.  Is there anything equivalent in Ubuntu?

I am looking for certification on Ubuntu server technology or possibly Debian (as long as its supplied by Canonical, is that even possible?) which Ubuntu is based on.  Is there such a thing provided by Canonical? In what regions are these services available? Can someone get Ubuntu training and certification the same way Red Hat and other companies supply? Where can I get more information on this matter?


What are the possible niuances (differences) between a method and a lambda? I have an identity function and wonder does it make much of a difference how I define it?  def ident(x): return x ident = lambda x: x   These are surely functionally the same, but do they differ in performance or otherwise?

I mostly use lambda functions but sometimes use nested functions that seem to provide the same behavior. Here are some trivial examples where they functionally do the same thing if either were found within another function: Lambda function >>> a = lambda x : 1 + x >>> a(5) 6  Nested function >>> def b(x): return 1 + x  >>> b(5) 6  Are there advantages to using one over the other? (Performance? Readability? Limitations? Consistency? etc.) Does it even matter? If it doesn't then does that violate the Pythonic principle:  .


how to find probability cut off in logistic regression. by considering the Sensitivity, specificity and accuracy on different cut off values.  cut off                      0.3    0.35    0.4      0.45      0.5   0.55 Sensitivity                 66.93%  57.48%  44.09%  30.71%  23.62%  18.90% Specificity                 58.97%  72.16%  82.05%  87.18%  93.04%  95.24% Accuracy                    61.50%  67.50%  70.00%  69.25%  71.00%  71.00%   In this case which cut off to choose.

I have the data of a test that could be used to distinguish normal and tumor cells. According to ROC curve it looks good for this purpose (area under curve is 0.9):    My questions are:    How to determine cutoff point for this test and its confidence interval where readings should be judged as ambiguous? What is the best way to visualize this (using ggplot2)?   Graph is rendered using ROCR and ggplot2 packages:  #install.packages("ggplot2","ROCR","verification") #if not installed yet library("ggplot2") library("ROCR") library("verification") d <-read.csv2("data.csv", sep=";") pred <- with(d,prediction(x,test)) perf <- performance(pred,"tpr", "fpr") auc <-performance(pred, measure = "auc")@y.values[[1]] rd <- data.frame(x=perf@x.values[[1]],y=perf@y.values[[1]]) p <- ggplot(rd,aes(x=x,y=y)) + geom_path(size=1) p <- p + geom_segment(aes(x=0,y=0,xend=1,yend=1),colour="black",linetype= 2) p <- p + geom_text(aes(x=1, y= 0, hjust=1, vjust=0, label=paste(sep = "", "AUC = ",round(auc,3) )),colour="black",size=4) p <- p + scale_x_continuous(name= "False positive rate") p <- p + scale_y_continuous(name= "True positive rate") p <- p + opts(             axis.text.x = theme_text(size = 10),             axis.text.y = theme_text(size = 10),             axis.title.x = theme_text(size = 12,face = "italic"),             axis.title.y = theme_text(size = 12,face = "italic",angle=90),             legend.position = "none",             legend.title = theme_blank(),             panel.background = theme_blank(),             panel.grid.minor = theme_blank(),              panel.grid.major = theme_line(colour='grey'),             plot.background = theme_blank()             ) p   data.csv contains the following data:  x;group;order;test 56;Tumor;1;1 55;Tumor;1;1 52;Tumor;1;1 60;Tumor;1;1 54;Tumor;1;1 43;Tumor;1;1 52;Tumor;1;1 57;Tumor;1;1 50;Tumor;1;1 34;Tumor;1;1 24;Normal;2;0 34;Normal;2;0 22;Normal;2;0 32;Normal;2;0 25;Normal;2;0 23;Normal;2;0 23;Normal;2;0 19;Normal;2;0 56;Normal;2;0 44;Normal;2;0


Is a photon able to transfer an impulse to a neutron or, and this is the same, can light accelerate a neutron?

Protons only 'interact with' very high-energy photons, whether inside a nucleus or free, right?  I'm assuming the same about neutrons....  Neutrons have a small magnetic moment and a slight electric 'moment' (dipole?), correct?  They are sometimes considered to consist of a negative charge surrounding a positive charge?  I would assume that neutrons, in a nucleus or free, interact with photons even less often than protons, and that the gamma photon has to have an even higher energy than one interacting with a proton....  Lastly, I have read about 'photodisintegration', in which a nucleon is kicked out of a nucleus by a gamma ray.  It seems to happen to neutrons sometimes...  But, I am mostly curious about experimental evidence of free neutrons interacting with photons, how often it happens compared to free protons, and whether the interacting photon's energy has to be extremely high, higher even than a photon interacting with a proton...


On this guys  he's using infinite scroll and it's appending the page number to the url so when you click on a story and go back, you start off where you were.  I'm using infinite scrolling on a website I'm developing just now but I can't figure out how this is done, it's not a function built into the plugin.  I'm not using jetpack, I'm using the   Also, if I append a page number to my local installation like this   http://localhost:8888/page/2   Then scroll down, it loads in the next set of posts, then it breaks and doesn't load in anymore posts.  Is there a way to append the page number as more posts are loaded in with infinite scroll?

I added infinite scroll support of the Jetpack plugin to my own theme using :  add_theme_support( 'infinite-scroll', array(     'container'  => 'content',     'footer' => false,     'render' => 'vividflow_infscroll_render',     'wrapper' => 'post_summaries',     'posts_per_page' => 12,     'type' => 'scroll' ) );   Now I need something like a counter which increments every time additional posts are loaded.   I know that the new posts are placed in an infinite-view-n class and I have a JavaScript function which I want to call on that new loaded class:  function setupPostSummaries(counter) {     jQuery('.infinite-view-'+counter).doSomething(); }   So I guess I need a PHP variable in the infinite scroll render function or the loop which increments every time additional posts are loaded. Then I can do in the end of The Loop:  <script type="text/javascript">setupPostSummaries(<?php the_counter(); ?>);</script>   Is such a variable there already? Or is there an other way to achieve my goal?


Is $$\sum_{n=1}^\infty \frac{1}{\text{lcm}[1,~2,~\ldots,~n]} $$ an irrational number? I just thought up of the problem, and can anyone help this out?

Show that the infinite sum $S$ defined by -$$S=\sum_{i=1}^\infty \frac{1}{\operatorname{lcm}(1,2,...,i)}$$ is an irrational number.  I found this question while reading 'Mathematical Gems' by Ross Honsberger. After pondering over it for nearly an hour, I was able to prove it by using Bertrand's postulate which states that there is a prime between n and 2n for every natural number n>1.   This question was solved by Lajos Pósa when he was just 12 years old. Is there any elementary proof that does not use Bertrand's postulate or any complicated theorem?


I was downloading android system webview from apkmirror due to downloading an unsupported version through aurora store, and there when I found the right version for my system the page said that it needs "Trichrome library" with the same latest version as system webview. What is that? I downloaded it and installed it. Webview is working fine. But I failed to find the com.google.android.trichromelibrary package. I am pretty sure that I installed it and now It is no where in my apps. Is it safe? Am I downloaded something wrong? What that library does?

From nowhere, my friend got a notification that com.google.android.trichromelibrary was downloading together with a progress bar.  Why?


Ever since I started doing work on Bézout Identity and Extended Euclidean Algorithm, I have tried to understand how to do modular arithmetic of big numbers etc. Basically, I have come up with the following problem of my own that I wish to solve:  $t = 24^3 \mod 35$  We know that $35 = 7\cdot 5$ and both $7$ and $5$ are prime numbers. I believe that there is a way of doing modular arithmetic of this nature if the modulus number is coprime like in this case.  I got as far as this: $$t = 24^3 \mod 7$$ $$t = 24^3 \mod 5$$  What do I do after? It would be great if someone could help me compute this answer as I am very keen to better understand all of this using my own examples.  Please I am new to CRT and any help of steps of calculating this would mean a lot!

Prove $x \equiv a \pmod{p}$ and $x \equiv a \pmod{q}$ then $x \equiv a\pmod{pq}$ for $p\neq q$ distinct primes.  Where can I start with this proof? It looks similar to the Chinese Remainder Theorem, but that deals with two different a values.


I am a novice using C# to scrape sites. I understand how to find hrefs and how to handle really simple tables.  Now I want to parse this .. and just pick out the first text i.e. 'office manager' and the href.
   Office Manager	   Office & Admin	   Cambridge	   Find out more

   Find out more
   Also can folk recommend a site where I can learn my way into the world of nodes, tds and trs?

I'm looking for a library/method to parse an html file with more html specific features than generic xml parsing libraries.


I have this object with a material I created with an image, how can I manage to add thickness to it ? I already tried adding the solidify modifier but could not get any result...   Here is a screenshot from Blender, as you can see the object is totally flat. How can I give it some thickness ?  Thanks,  Edit: Here are screenshots with "Only Rim" checked and not checked to give a better idea of what I get but is not good

I'm using Cycles I want to add thickness to a texture with alpha transparency like  do in his nice answer here:  But this time with an image texture (jpg+mask or png/tiff) not a mathematically generated one. It can be separated planes or solidify modifier, I don't mind, even if solidify would be better. I've already seen things about parallax mapping but not sure it's suitable and as good as this one.      Edit 1  A reference image of what kind of texture I use  The point of my question is that it can be seen from a side angle and not looks like a paper sheet.    Resolved  The answer of Rich is working, it's not perfect, no material on the volume, quite expensive and volume don't seem to work with UVmaps, only generated or object so for array it's complicate. But if it's not for a close shot it makes the joke.


I have a question about the definition of energy.  the definition is "ability to do work". what does it mean? what is the ability that the definition talks about? what is the meaning of ability in energy? I understood the concept of work, and it would be great if someone could explain to me the concept and definition of energy.

Here was my argument against this, the second law of thermodynamics, in effect says that, there is no heat engine that can take all of some energy that was transferred to it by heat and do work on some object. So, if we can not take a 100% the thermal energy of an object, and use it to do work, what about the thermal energy that is rejected to the environment, can we use all of that energy to do work on an object? No, if energy is supposed to be the ability to do work, well that’s a contradiction.


In python the new style of class declaration is this:  class A(object):     pass   what I don't understand is what is wrong with the old declaration,  class A:     pass   more specifically, why they needed to add the base object class.Also,I want to know a little bit more about the object class in python,couldn't find any resource available on object class.  However,   There's some answer over here,which talks about the rules but my specific question is what is the advantage of this declaration with object(Base class) on the declaration without the object.

What is the difference between old style and new style classes in Python?  When should I use one or the other?


Not long ago I suddenly received 100 points in every Stack Exchange site I was a member of. I got 100 points just for signing up in Meta Stack Exchange.  Is this a glitch, or a planned change?

I was just awarded +100 reputation on all of my Stack Exchange accounts.  What is this bonus for? It simply says "Association Bonus" on my reputation overview.  Also:   What privileges does the association bonus grant users? Can I lose the association bonus? Does it make my reputation 101 everywhere? Can I earn the association bonus on sites I haven't joined yet? Does it matter which site I earn the 200 reputation on? Will I get an association bonus every time my reputation on a site crosses 200 points? Does the association bonus allow me to answer protected questions? Does the association bonus count towards the reputation cap? Can I get the association bonus if I only have a profile on one site? What else is there to know about the association bonus?


I'm trying to remove JAMF completely from a MacBook Pro M1 and actually start afresh. I can successfully put it into DFU mode in Apple Configurator 2, and I've tried both Revive and Restore, but what happens each time is that when the MBP reboots after the operation, there are some setup screens and then I'm taken to a screen that forces auto-configuration with a JAMF server! What am I doing wrong?

I got a 2015 MacBook Pro from eBay. I’m trying to install Sierra from scratch (after completely formatting the SSD) but I get this strange extra step (although the install USB is vanilla and done using Apple’s own bootable usb tool) that I can’t pass (pressing continue asks me to connect to a IBM private network, which I obviously can’t do)  Does anyone have any info about this. Where is this MacBook comming from? How can I disable this remote management step? Is this a custom firmwere, or where does this come from?


How do you use /title? I used it like this   /title @a title {text:"you're fighting the castle",bold:true,italic:true,color:red}"    and it gave me this error      [10:51:17] Invalid json: malformed JSON at line 1 column 3    I'm trying to make something and I've been stuck for a while so if anyone knows please help me!!!

I've been at this for almost two hours and no one seems to have the same problem as I and I doubt this will be solved but I'll try anyway.  this is the code  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}},{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   this part is fine  /tellraw @p ["Would you like to teleport?",{"text":"Yes","color":"green","bold":"true","clickEvent":{"action":"run_command","value":"/tp @p ~ ~4 ~ "},"hoverEvent":{"action":"show_text","value":{"text":"Confirm"}}   it's just when I add this  ,{"text":"No","color":"red","bold":"true","clickEvent":{"action":"run_command","value":"/tellraw @p{"text":"Come back when you want to teleport"}"}}}]   Minecraft gives me the error:     Invalid JSON at line 1 column 203   I've tried to space it out and figure out what column 203 is but I can't, I don't know what I did. Anyone got any ideas?


I have seen pictures of people having pokemon everywhere and having their nearby box full of pokemon and footprints but I have never had a single one no matter how far I walk.  I walked around 3,5 kilometers yesterday without getting anything in my nearby box and I never see the grass that sometimes should fly up from the ground.  I think that this is a bug or something because the ring that indicates when a new pokemon is added to the list pops up for me but for some reason I cant see the pokemon and the footprints so I can like only find pokemons when I use an incense.  I play on a samsung galaxy s6

So me and my friends downloaded pokemon go yesterday.  We got drunk, walked 3km and found 0 pokemon, not even one pokemon showed up in the 'pokemon near you' thing.   Is this normal for remote areas?(nearest pokestop is ~15km away)  Thanks.


I'm trying to design a raspberry pi HAT prototype and I came across this circuit below. I'm not familiar with power electronics but i'm curious of what this circuit is trying to accomplish. Any help would be appreciated. Thanks   Image of schematics

The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board.  They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse.  I understand why this is the recommendation, but I'd like to understand more about how this circuit works.  I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors.  What are they doing for this circuit?  Also, is this primarily using the body diode?  In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application?  In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.


I tried put two tables in the same page. I read in the Internet that I can make this using the minipage. I use minipage but the two tables still in pages differents, not side by side. The piece of code that I used is:  \documentclass[11pt]{article} \usepackage{amstext} \usepackage{lmodern} \usepackage{ragged2e} \usepackage{mathtools,float,geometry} \usepackage{booktabs,array,tabularx,threeparttablex} \usepackage{subfig} \begin{document} \begin{table}[H] \begin{minipage}{.2\textwidth} \centering \begin{tabular}{cc} \toprule Tempo (s) & Per\'{i}odo (s)\\ \midrule 0,9509 & 1,3645\\ \hline 2,3153 & 1,3644\\ \bottomrule \end{tabular} \end{minipage} \end{table}  \begin{table}[H] \begin{minipage}{.2\textwidth} \centering \begin{tabular}{cc} \toprule Tempo (s) & Velocidade (m/s)\\ \midrule 0,2733 & 5,3763\\ \hline 0,9496 & 5,3763\\ \bottomrule \end{tabular} \end{minipage} \end {table} \end{document}

Suppose I have two tables that don't have many columns (3, for example). How can I position them side by side?


I'm making a graphing calculator because my comp sci teacher said if i can prove i know all the topics that will be taught in the class he'll pass me for the rest of the year, so my idea is a graphing calculator, and I'm trying to put my applet mumbo jumbo in a different class. But after what i feel is doing things properly, i get an error when trying to use a method from my class with the applet. Both of these classes are in same package. Here's the class i'm calling from: (Also I imported java.awt.* already)  public class NumberCalc { //Bunch of variable for calculator Graphics page; static GraphingCalc graph = new GraphingCalc();  /* Blah blah calculator shit for miles *  main method is in here with the drawGraph method * */  public static void drawGraph() {     graph.addPoint(20,20,5,5);     //Test method to see if it draws, next class has the info     } }   And here is the class I'm calling to:  public class GraphingCalc { Graphics page; //Code that doesnt matter right now public void addPoint(int x, int y, int sizeA, int sizeB) {     setBackground(color.black);     page.setColor(color.cyan) //Easy to see color for testing     page.fillOval(x,y,sizeA,sizeB);     }     }   And the error i get thrown is this:  Exception in thread main java.lang.NullPointerException at calculator.GraphingCalc.addPoint(GraphingCalc:18)   line 18 is page.setColor(color.cyan), and if i comment out this line and go to the fillOval, then it gives the same error, so there is obviously something wrong with the 'page' graphics variable. Any solutions?

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?


$\displaystyle \left|z^3 + {1 \over z^3}\right| \le 2$ prove that $\displaystyle \left|z + {1 \over z}\right| \le 2$     $$\left|z^3 + {1 \over z^3}\right| = \left(z^3 + {1 \over z^3}\right)\left(\overline z^3 + {1 \over \overline{z}^3}\right) = \left(z + {1\over z}\right)\left(z^2 - 1 + {1\over z^2} \right)\left(\overline z + {1\over \overline z}\right)\left(\overline z^2 - 1 + {1\over\overline z^2} \right)$$  $$=\left|z + {1\over z}\right|^2\left|z^2 - 1 + {1\over z^2} \right|^2 \le 2$$  $$\therefore \left|z + {1\over z}\right| \le \sqrt{2}$$ where $\displaystyle \left|z^2 - 1 + {1\over z^2} \right| \ge 1$.     But I am not able to prove $\displaystyle \left|z^2 - 1 + {1\over z^2} \right| \ge 1$, need some help on this.

Problem :  Let $z \in\Bbb{C}^{\times}$ such that $|z^3+\frac{1}{z^3}|\leq 2$. Prove that $|z+\frac{1}{z}|\leq 2$.  My approach : Since : $(a^3+b^3)=(a+b)^3-3ab(a+b)$ $\Rightarrow z^3+\frac{1}{z^3}=(z+\frac{1}{z})^3-3(z+\frac{1}{z})$ Now I don't know further about this problem whether or not this will help here. Please guide to solve this problem will be of great help, thanks.


I know that quadratic formulas make parabolas, linear makes straight lines and sin, cos and tan make cool curves but after messing around with WolframAlpha and online equation graphing tools I can make really varied and weird shapes with just the right type of equation. Is it possible that there is an equation to graph a picture of the Mona Lisa? Is this how computers show draw things perhaps?

In school, I have learnt to plot simple graphs such as $y=x^2$ followed by $y=x^3$.  A grade or two later, I learnt to plot other interesting graphs such as $y=1/x$, $y=\ln x$, $y=e^x$. I have also recently learnt about trigonometric graphs and circle equations. In the internet, I have seen users posting graphs of different shapes like a heart-shaped graph and a Batman logo-shaped graph. I am sure there are numerous more graphs that I have yet to see. Seeing that the graphs can be shaped into shapes like the Batman logo and a heart brings me to my question: Is it possible to plot a graph of any shape regardless of its complexity? Perhaps, shaped into an outline of a person or a landmark? Why or why not?


I am typesetting some mathematical equations using \begin{align*} environment. Hopefully to make the steps clear I am adding text above =, \leq, \geq but I am having troubles with aligning them e.g.:  \begin{align*} x_1 + x_2 \overset{\text{some text}}=& 2y^3 \leq\\ \overset{\text{some longer text}}\leq& 3z \end{align*}   The result is, that the \leq is not centered with = sign above. Is there a neat way to solve this? In some different cases I am using this approach:  \begin{align*} x_1 + x_2 \overset{\text{some text}}=& 2y^3 \leq\\ \overset{\phantom{\text{some text}}}\leq& 3z \end{align*}   But I don't think that adding some phantom characters to the first example would be a good way how to do it.

I have the following type of code in my document:  \begin{align*}        (-m)+m & \stackrel{\mathrm{Ax 1.1 (i)}}{=}  m+(-m)\\   &\stackrel{\mathrm{Ax 1.4}}{=}  0 \   I want to align on the = but that is complicated by the fact that there is something hovering over it.  It would seem to be easier to align their centers (no matter what, that is where the = will be).  How can I center a column in align (or align* to be honest, I am not that clear on the difference)


The room cools for a moment but then it becomes warmer. Why?

I'm well aware that the default answer to this textbook default question is "it doesn't work", but still, I believe it does.  To cool the insides of the fridge, the compressor must do work, and since the efficiency isn't 100% you are constantly warming the whole room to cool it's insides, the winning move here is simply turning the fridge off. However, let's suppose the fridge must stay on, wouldn't it be better to open the door?   In other words: Isn't opened fridge turned on better than closed fridge turned on for the whole room temperature?


I calculated $\cos(30^{\circ})$ and it is $\frac{\sqrt(3)}{2}$. I calculated $\cos(-30^{\circ})$ and it is $\frac{\sqrt(3)}{2}$. And, I don't know why? Can you explain me simply? I think that figures will be very much helpful.

Can somebody explain to me graphically or intuitively why this is true? Because if we think in terms of the base of the triangle formed inside a unit circle it seems like it should not be negative.


Lets just say I have 3 hard drives:  c: 500 gig windows 7 with win7 boot loader d: 1tb nothing on it (but I want a Linux os on it... Ubuntu, debian, fedora ect) g: 3tb random stuff   I want Ubuntu and grub on drive D but I want to boot my computer normally and only boot into grub and Ubuntu when I do an advanced startup and select an alternative boot device (the 1tb hard drive). Is this possible with Ubuntu and other Linux distributions? Also do all distributions require you to make a Linux swap partition?  Oh and lastly could I multiboot different distributions such as slackware and archlinux on the D drive and have grub come up with all the os's on the D drive when I boot from it? Even multiboot stuff like older versions of windows and DOS or even hackintosh?

I have two hard drives. One is used for Windows and one is empty. I want to install Ubuntu on the empty hard drive. The Windows hard drive is disk0 in Windows and the empty hard drive is disk1. When I install Ubuntu and it asks where I want to install it, I choose "Something Else" but I am stuck there. What do I choose for "boot loader installation"?


I don't know what to choose, that's why I am here to ask this question.     I have been paying this amount since November 2013 until/till now.

Which is the correct form on an invoice, or a general date range in a form, and why?  Monkey dolls                        12 GBP From 2012-01-03 to 2013-01-02  Monkey dolls                        12 GBP Since 2012-01-03 until 2013-01-02   Form format (dates can be modified with a datepicker):  Since: 2012-01-03 until: 2013-01-02   Since+until makes sense and sounds ok to me, yet I know I can be very wrong, at least when it comes to the common usage in the UK and/or US, since English is not my first language.  I am interested in both British and American English.  Until now I've been using since+until, yet some articles explicitly say they may not ever be used together, while some people and some other articles get deep into grammar rules which I can't really apply on the context of invoices and forms.  Here's a recent article saying since and until can never be used together (last paragraph):   Edit: The date range can start in the past or in the future, and can end in the past or in the future. However, at the time of issuing an invoice or rendering a form, you cannot know when the document will be read or how the form will be filled.


I need the exact config as displayed in the image above. I need to have the entire alphabet showing and I need the title of content to be displayed below the Letter it belongs to. Can we get a detailed explanation on how that can be achieved?

I want to list all the posts with alphabetical headings like this site:    How can I do this with drupal 7 using views?


Actually I'm beginner at Ubuntu. Please help me to install VLC, Office and so many software. When I clicked install in Ubuntu software, then it was showing waiting for install.  When i opened terminal and trying there, then it was showing me some messages:   E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Sometimes it shows:  E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   What is root? Need I go to root? Or how could I install all software successfully?

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


I would like to access the Stack Exchange data dump.  I am aware the dump is available as torrent download through , however clearbits is currently down (since at least December 2013 - when I first tried): the site returns a error (113) - No route to host.  Are there other repositories for the data dump, or alternative ways to get the torrents/data?  I have noticed a user has uploaded some of the data on Mega (see ), but this is not an up-to-date dump.

I tried to connect to  and got an error message:      ERR_ADDRESS_UNREACHABLE.   Is this a known problem? Do you expect that the problem will be solved soon?


Okay, so my problem is that one of the people I have in my party (my brother) is VERY stubborn when it comes to playing a session of D&D, everything from getting on his tablet and getting distracted to the point where when it's his turn he has no clue what is even happening, saying things like "I punch the monster" when it is 50 feet away from him. I tried to incite a tabletop rule of "No electronics" but everytime I tell him to put his tablet away, he labels me a "Tight-ass DM" and tells me its my fault no one is having fun. What can I do about this? Is he right? Should I make changes to adhere to his rules? I have contemplated removing him from the game, but I really don't want to as he is my brother.

My group have been playing various D&D style games for a few years,  I have one player however that often will drift off and start playing on his phone  and several times has actually fallen asleep (with his character having to be "nudged" along by his fellow players).  He insists he's "just tired" and "isn't bored" — and besides, he keeps insisting we all get together for D&D and wants to play.  Unfortunately we're all pretty busy, so if I'm to get the group together at all it's usually late on a Sunday. After talking to the player he insists it's not the game, or the story, he just happens to be tired. But, it's the same excuse every week, and the odd times we've played at different times or situations, the falling asleep has happened.  How do I cope with:   The morale destroying (for me) idea of your players falling asleep through a campaign and story you've put lots of work into. The general tone of the room when this player loses interest. (Occasionally a couple of others zone out into Facebook when they're not "active" because the players have split up / gone unconscious).   Given that it's an "all or nothing" situation with the group (there are only 3 players and they won't play unless all 3 are around), how do I best deal with it?


I just wanted to know what the technical term for allocating words from a string separated by spaces to a variable is called so I can look up a tutorial for it. Any terms, links, or explanations would be greatly appreciated.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


Given a text file, or the output of a command, how can I truncate it so that every line longer than N characters (usually N=80 in a terminal) gets shorten to N characters maximum?

I've got multiple-line text files of (sometimes) tab-delimited data.  I'd like to output the file so I can glance over it - so I'd like to only see the first 80 characters of each line (I designed the text file to put the important stuff first on each line).  I'd thought I could use cat to read each line of the file, and send each line to the next command in a pipe:  cat tabfile | cut -c -80   But that seemed broken.  I tried monkeying around, and grep appeared to work - but then I found out that, no it didn't (not every line in the file had 80+ characters) - it appears tabs are counted as single characters by cut.  I tried:  cat tabfile | tr \t \040 | cut -c -80   Even though that would mangle my data a bit, by eliminating the white-space readability.  But that didn't work.  Neither did:  cat tabfile | tr \011 \040 | cut -c -80   Maybe I'm using tr wrong?  I've had trouble with tr before, wanting to remove multiple spaces (appears the version of tr that I have access to on this machine has an -s option for squeezing down multiple characters - I may need to play with it more)  I'm sure if I messed around I could use perl, awk or sed, or something to do this.  However, I'd like a solution that uses (POSIX?) regular commands, so that it's as portable as possible.  If I do end up using tr, I'd probably eventually try turning tabs into characters, maybe do a calculation, cut on the calculation, and then turn those characters back into tabs for the output.  It doesn't need to be a single line / entered directly on the command line - a script is fine.    More info on tab-files:  I use tab to break fields, because someday I may want to import data into some other program.  So I tend to have only one tab between pieces of content.  But I also use tabs to align things with vertical columns, to aid in readability when looking at the plain text file.  Which means for some pieces of text I pad the end of the content with spaces until I get to where the tab will work in lining up the next field with the ones above and below it.   DarkTurquoise           #00CED1         Seas, Skies, Rowboats   Nature MediumSpringGreen       #00FA9A         Useful for trees        Magic   Lime                    #00FF00         Only for use on spring chickens and fru$


I had question regarding ccTLDs, lets say, I have domain = domain.com but I found some one is copying my posts and paste at his domains at the same time, which seems to ccTLDs like domain.co.uk, domain.in (these are not my domains)  Additionally, we both have implemented the canonical tag, then how Google will determine which was the original post? Or to whom the content credit will be awarded?

Someone has created an exact copy of my site.   At first, the code of his pages were identical to mine.  A few days later he just replaced my internal links with the same links to his own domain. At the top of his source code he uses some "Vodafone securenet" script connecting to my site.  At first I thought he was using embed or iframes or something to reproduce my site, but I have posted a new post and it doesn't show on his domain.  I have contacted the company that protects his whois info and I plan to issue a dmca with Google.  What else can I do?  Btw, this is obviously a neg seo case, since his site has no chance to appear on the search, yet it can hurt mine as duplicate content.


Recently encounter an algorithm question which asked to do Top-K frequent Element better than O(nlogn). I implemented it using C++ and did some complexity analysis. I feel it is NOT possible to do better than O(nlogn). Attached my code and complexity analysis in lines. I used map. I think unordered_map in practice will do better but ,for worst case analysis, unordered_map is worse than map due to hash conflict. It would make the first block to O(n^2) in worst case.  Description: Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note:  You may assume k is always valid, 1 ≤ k ≤ number of unique elements. Your algorithm's time complexity must be better than O(n log n), where n is the array's size.  Many solutions from google search are using hash table and those solutions assumed inserting operation to a hash table is O(1) which, in my opinion, is not true. Because in worst case, hash table produce O(n^2) for insert operation when hash conflict happens. Big O notation is all about worst case analysis.  vector<int> topKFrequent(vector<int>& nums, int k) {         map<int, int> _map;         vector<int> result;          //complexity: O(nlogn)         for(auto n : nums) {             // map.find() has O(logn)             if (_map.find(n) != _map.end()) {                 // have seen before                 _map[n]++;             } else {                 // new one,                  _map[n]=1;             }         }          //complexity: O(n)         vector<pair<int,int>> v;          for(auto itr = _map.begin(); itr != _map.end(); ++itr) {             v.push_back(make_pair(itr->first, itr->second));         }          // complexity: O(n)  (build a heap)         auto f = [] (pair<int,int> p1, pair<int,int> p2)  { return p1.second < p2.second; };         make_heap(v.begin(), v.end(), f);           // complexity: O(k*logn)         while(k) {             result.push_back(v.front().first);             pop_heap(v.begin(), v.end(),f); // delete heap from binary tree O(logn)                                             //    1. swap root with last leaf O(1)                                             //    2. find right place for last leaf             v.pop_back();             k--;         }          return result;      }   Thanks in advance for your response.

Input: A positive integer K and a big text. The text can actually be viewed as word sequence. So we don't have to worry about how to break down it into word sequence. Output: The most frequent K words in the text.  My thinking is like this.    use a Hash table to record all words' frequency while traverse the whole word sequence. In this phase, the key is "word" and the value is "word-frequency". This takes O(n) time.  sort the (word, word-frequency) pair; and the key is "word-frequency". This takes O(n*lg(n)) time with normal sorting algorithm.  After sorting, we just take the first K words. This takes O(K) time.    To summarize, the total time is O(n+nlg(n)+K)， Since K is surely smaller than N, so it is actually O(nlg(n)).  We can improve this. Actually, we just want top K words. Other words' frequency is not concern for us. So, we can use "partial Heap sorting". For step 2) and 3), we don't just do sorting. Instead, we change it to be  2') build a heap of (word, word-frequency) pair with "word-frequency" as key. It takes O(n) time to build a heap;  3') extract top K words from the heap. Each extraction is O(lg(n)). So, total time is O(k*lg(n)).  To summarize, this solution cost time O(n+k*lg(n)).  This is just my thought. I haven't find out way to improve step 1). I Hope some Information Retrieval experts can shed more light on this question.


I'm trying to extend the  package so that I can pass options to \includegraphics and have them override defaults, something like this:  \documentclass[]{article} \usepackage{graphicx} \usepackage{xkeyval} \usepackage{xstring} \usepackage[hybrid]{markdown}  \renewcommand{\markdownRendererImage}[4]{   \StrCut{#1}{,}{\sclabel}{\scoptions}   \begin{figure}[ht]     \centering     \includegraphics[width=0.8\textwidth,\scoptions]{#3}     \caption{#4}     \label{\sclabel}   \end{figure} } \begin{document} \begin{markdown} ![fig:example,width=10px](example.png "Lorem ipsum...") \end{markdown} \end{document}   Unfortunately, this code results in an error:  ! Package xkeyval Error: `width=10px' undefined in families `Gin'.   I understand that \StrCut is somehow bundling up \sclabel and xkeyval doesn't know how to unpack it into key-value pairs, but I'm at a loss as to how to fix it. I've tried every combination I can think of of xstring's \detokenize, \tokenize, \expandafter etc. macros and I'm just very confused.  Here's a simpler MWE that doesn't depend on markdown and that shows some of the weird behavior I've already discovered:  \documentclass[]{article} \usepackage{graphicx} \usepackage{xkeyval} \usepackage{xstring}  \newcommand{\markdownRendererImage}[2]{   \StrCut{#1}{,}{\sclabel}{\scoptions}   \includegraphics[\scoptions]{#2} }  \begin{document}  \includegraphics[width=10px]{example1.png} % works as expected \markdownRendererImage{fig:example}{example2.png} % works as expected (\scoptions is empty) \markdownRendererImage{fig:example,width=10px}{example3.png} % fails with error, uses default settings \markdownRendererImage{fig:example,{width=10px}}{example4.png} % fails without error, uses default settings  \end{document}   I'm sure there's a simple way to do this but I can't crack it. Any help would be greatly appreciated!  Thanks,  Josh

I have a large set of pictures, and I want to apply predefined settings to each using the optional argument of the \includegraphics macro from the graphicx package.  I would like to define the settings once at the top of the file (like \def\settings{width=\textwidth, angle=90}), and then apply them to all of my images so that I can modify all of the settings from one place.  If I run the following code block, it gives me the versions of the error "Package xkeyval Error: 'width=\textwidth, angle=90' undefined in families 'Gin'", which seems to be because it's interpreting my entire group of settings as a single key input.  \documentclass{article} \usepackage{graphix} \begin{document}      \def\settingsA{width=\textwidth, angle=90}     \def\settingsB{page=1, scale=.1}     \def\settingsC{angle=90, scale=.5}      \begin{figure}         \includegraphics[\settingsA]{filename1.png}         \label{fig:oneofonehundred}     \end{figure}      \begin{figure}         \includegraphics[\settingsB]{filename2.pdf}         \label{fig:twoofonehundred}     \end{figure}      \begin{figure}         \includegraphics[\settingsC]{filename3.jpg}         \label{fig:threeofonehundred}     \end{figure}   \end{document}   What is the technique to modify this settings string so that it is interpreted correctly? How do I pass an optional argument that is interpreted as a set of arguments instead of one string?  Thanks in advance!


I was applied for a permanent residence visa for canada, they declined on 2005. In 2012 I entered in canada with swazi passport (while allow port entry). Now I am applying for a visit visa with swazi passport.   So what should I put yes or no?  If yes what should I write. Ex. In 2012 i enterd in canada but I didnt apply for remain in canada.

I have had a working holiday visa before and I am applying again, do I say yes to this question or no. I have to explain if I say yes


Let $G$ be abelian group and $H=\{ x^{2}/x\in G\}$    $H$ is it a subgroup of $G$ ?   H is subset of a group G is a subgroup if :  (i)$\quad  e \in H$ (e is The identity element of G)  (ii) if $x, y \in H$, then $x\ast y \in H;$  (iii) if $x \in H$, then $x^{-1} \in H.$  indeed,  For  ii) let $x,y \in H$ then $x \ast y=(xy) \in H$  i'm stuck in that level so i can't prove (i) or (ii) true or flase    If H is subgroup of G can i general that  for  $H^{n}=\{ x^{n}/x\in    G\}\quad  \forall n \in \mathbb{N} $

Let $H = \{x \in G: x = y^2$ for some $y\in G\}$;  that is, let $H$ be the set of all the elements of $G$ which have a square root.  Prove that $H$ is a subgroup of $G$, where $G$ is an abelian group.  So I'm pretty lost in group theory.  I know that I need to prove that for any element, $a,b \in H$, that $(a^{-1} * b) \in H$, where * is the group operation on $G$.   I know that I also need to use the fact that $G$ is abelian.  So somehow commutativity is involved.  But I admit that I have no idea what I am doing.  I guess my primary question is:  What does $x^{-1}$ look like in $H$?  Since $x$ = $y^2$ then $x^{-1} = (y^2)^{-1}$, which is what?


I am very new to Ubuntu, and I don't know what I did but it shows this error today.   Error:Opening the cache  (E: Couldn't create temporary file to work with /var/lib/apt/list/us.archive.Ubuntu.com_Ubuntu_dists_xenial_InRelease - mkstemp (30:  Read-only file system)  E: The package lists or status file could not be parsed or opened.   I have tried apt-get update, but it shows that problem unlinking the file:  /var/cache/apt/pkgcache.bin - Remove Caches (30: Read-only file  system)  Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (30: Read-only file system)   W: Not using locking for read only lock file /var/lib/dpkg/lock   How can I proceed?

When I try to save something or rename a file/folder it say this error " Read-only file system" or run something as root in the terminal it say this error  sudo: unable to open /var/lib/sudo/"My User Name"/0: Read-only file system  W: Not using locking for read only lock file /var/lib/dpkg/lock E: Unable to write to /var/cache/apt/   E: The package lists or status file could not be parsed or opened.   When I make a Folder the error dialog in the details with Nautilus is this:    Error creating directory: Read-only file system   I would show you I picture of it but it isn't even letting my save onto my flash drive. Please help me.


I am trying to solve problem and I keep running into a different proof. I am trying to prove $\log(x)$ not uniformly continuous (0,1) yet I keep running into the proof for uniform continuity with $\ln(x)$ on (0,1). I am challenged and would appreciate some help. please and thank you.

Prove that $\ln x$ is not uniformly continuous on $(0,1]$.  Got all confused on how to prove this kind of things... Any hints would be great!


I am trying to classify all groups of order 75. I am only allowed to use Sylow's theorems, and other basic facts (such as what groups of order $p^2$, $2p$ are isomorphic to, basic facts about direct products, etc).  My attempt was the following:  We have that $75 = 3 \cdot 5^2$.  Sylow's third theorem tells us that the number $n_5$ of Sylow $5$-subgroups is congruent to $1 \bmod 5$, and must divide $3$. Therefore $n_5 = 1$, so we must have a normal (by Sylow's second theorem) subgroup of order $5^2 = 25$.  Similarly we get that $n_3$, the number of Sylow $3$-subgroups, is either $1$ or $25$. In the case that $n_3 = 1$ it isn't hard to show that that the group is isomorphic to either $\mathbb Z_{25} \times \mathbb Z_3 \simeq \mathbb Z_{75}$, or to $(\mathbb Z_5 \times \mathbb Z_5) \times \mathbb Z_3 \simeq \mathbb Z_5 \times \mathbb Z_{15}$.  In the other case when $n_3 = 25$, we have $25$ subgroups where the pairwise intersection of any two is $\{e\}$. This accounts for $1 + 25 \times (3-1) = 51$ distinct elements (including the identity) of the group, leaving $24$ elements.  This is all I know for this case, and I don't know how to proceed. I appreciate any assistance.

I am trying to use a semi-direct product to construct a non-abelian group of order 75 (Ex 5.5.8 in Dummit & Foote). Using the third Sylow theorem, we get $n_5=1$ so the subgroup of order $25$ is normal. Hence it makes sense to use the following semi-direct product:  $$ (\text{Sylow }5\text{-subgroup})\rtimes(\text{Sylow }3\text{-subgroup}) $$  There are two groups of order $25$, either $\mathbb{Z}/5\mathbb{Z}\times \mathbb{Z}/5\mathbb{Z}$ or $\mathbb{Z}/25\mathbb{Z}$. In order to use the semi-direct product, I need a homomorphism from $\mathbb{Z}/3\mathbb{Z}$ to one of these. The automorphism group of $\mathbb{Z}/25\mathbb{Z}$ is $C_{20}$ so we can't use this group (since $3\nmid 20$). My questions are:  $$ \begin{split}&1&) \text{ What is } \mathrm{Aut}\left(\mathbb{Z}/5\mathbb{Z}\times \mathbb{Z}/5\mathbb{Z}\right)? \\ &2&) \text{ How can we construct a non-trivial homomorphism } \phi:\mathbb{Z}/3\mathbb{Z}\to \mathrm{Aut}(\mathbb{Z}/5\mathbb{Z}\times \mathbb{Z}/5\mathbb{Z}) \end{split} $$


Spoiler quotes might be messed up. They break when multiple lines of spoiler are involved. This is inconvenient on sites like Scifi, where spoilery plot details might be discussed, or Puzzling, where some members are picking up a convention of spoilering their answers.  I'm assuming they're intended to work with multiple lines, since regular quotes do and the  says nothing either way.  This is what spoiler syntax looks like when it's working just fine:  >! See here   It shows up as:      See here   Now to the bugs.  Multiple lines, blank line in between  >! This line is visible, it's just a quote  >! So is the exclamation mark      ! This line is visible, it's just a quote      ! So is the exclamation mark   Multiple lines, no blank line  >! In quote markup, you can put >'s in the blank lines. >! >! When you do that in spoiler quotes, the entire thing becomes one line.       In quote markup, you can put >'s in the blank lines.   When you do that in spoiler quotes, the entire thing becomes one line.

While trying to assist with the formatting of a , I discovered there's not a lot of parity between how spoilers and quote blocks (which are superficially quite similar) handle nested Markdown formatting.  (Simple HTML works fine.)  For example, here's a variety of typical Markdown nested inside a quote block:     heading            paragraph  code block          nested         list                 even nested quotes!               with nested nested formatting!           Aside from the code and quote blocks not standing out due to matching background colors, everything works exactly as expected.  Sadly, the same is very much not true for spoilers:      ### heading   ---   paragraph       code block   - nested  1. list   > even nested quotes!  >  > - with nested nested formatting!   Eek!  Any chance of changing spoilers to act more like quotes?  Needing complex formatting in spoilers isn't a terribly common scenario, but when you do, the inconsistency is jarring and a bit frustrating.


I have a training test with 3000 samples, 100 features per sample.  For each sample, there is also a label column with the sample "price" - continuous variable with infinite values possible (think of price of a house, for example)  My end goal is to build a model, based on the training set, which predicts a new sample "price".  In order to do so, I would first like to perform some dimensionality reduction, such as PCA, but I want to perform it so it would give me as a result, manipulated data set, with samples containing only the most affecting features in regard to the price label.  e.g. get transformed data set, with only X features that actually have an impact on the specific "price" column value  How can I achieve that in R?

I'm new to feature selection and I was wondering how you would use PCA to perform feature selection. Does PCA compute a relative score for each input variable that you can use to filter out noninformative input variables? Basically, I want to be able to order the original features in the data by variance or amount of information contained.


I have a visual force page which dynamically displays multiple records with check box's.  I  need to allow the user to select only one check box at a time.  I know it is possible with only javascript.  Can any  one post sample code for this?  If you have any other suggestions as well, please let me know.

I have custom fields in contacts form named checkbox1__c, checkbox11__c, checkbox12__c, checkbox13__c.  When I check checkbox1__c then I want checkbox11__c,  checkbox12__c,  checkbox13__c to be unchecked.  When I unchecked checkbox1__c then I want checkbox11__c, checkbox12__c, checkbox13__c to be checked.  Is there any way to do this by using validation-rules? If not no way to this by validation-rules, then what is the best way to do this?