I am trying to remember a book I read a while ago.  It is about a boy who lives in some sort of special mathematical conclave that only opens its doors to the outside world every few years.  An alien spaceship is discovered orbiting earth and the boy, along with a few others, travel to space to take over the ship.

Earlier this year, I read a huge (1000+ pg) novel about a cloistered group of monks that sort of worshiped math. The story involved alternate dimensions or time travel or something. A big thing in the book was coordinates, containing data like for speed or something as an alternate axis. There were several rings of the monastery.   At some point the main character was called out of his monastery to never return. I'm hoping to figure out the name so I can discuss it with my book club.


I am trying to fit the decimal alignments in my table in below. Could you please advise to me? Thanks in advance!  Currently my table is like this:    \documentclass{article} \usepackage{booktabs} \usepackage{multirow} \usepackage{array} \usepackage{siunitx}  \begin{document} \begin{table*}[h!] \caption{Results with different numerical schemes for the simple Cartesian trajectory} \label{Table:02} \centering \begin{adjustbox}{max width=\textwidth} \begin{tabular}{ccccccccc} \hline    Radius of platforms  Vs Limb lengths  &  Numerical Scheme &      &    &     & Errors    &    &   &     \\ \cline{4-9}   &  &  &  $\pmb{g}_x[\rm{mm}]$ &  $\pmb{g}_y[\rm{mm}]$ & $\pmb{g}_z[\rm{mm}]$ & $\pmb{g}_{\psi}[^{\circ}]$ & $\pmb{g}_{\theta}[^{\circ}]$  & $\pmb{g}_{\phi}[^{\circ}]$ \\ \hline \\    $\mathbf {1:1}$       & Constant Jacobian & max & 0.39   & 1.27 & $\mathbf{2.41}$ & 0.54 & 0.73 & 0.74 \\                    &                   & min & $\mathbf{-4.52}$ &    -1.38 & -1.88 & -0.56 & -0.72 & -0.72 \\                    $\sigma_{max}$   (1.08)            &   Updated Jacobian & max &    0.51 & $\mathbf{0.92}$ & 0.85 & 0.58 & 0.68 & 0.68 \\        &      & min & -0.56 & -0.84 &$\mathbf{ -0.93}$ & -0.58 & -0.83 & -0.81 \\         $\sigma_{min}$ (0.54)      & Newton-Raphson Method   & max & 0.50 &$\mathbf{ 0.87} $ & 0.84 & 0.63 & 0.68  & 0.72 \\               &         with $\mathtt{fsolve}$                  & min & -0.48 &$\mathbf{ -1.08}$ & -0.83 &-0.58 & -0.74 &-0.73 \\ \hline \\   $\mathbf  {1:2}$     & Constant Jacobian  & max &0.41 & 1.47 & $\mathbf{1.74}$ & 1.02 & 0.58 & 0.53 \\               &       & min &$\mathbf{ -2.72}$ & -1.49 & -1.56 & -1.11 & -0.55 & -0.52 \\         $\sigma_{max}$  (1.65)     & Updated Jacobian & max & 0.43 & 1.37 & $\mathbf{1.49}$ & 1.06 & 0.55 & 0.57 \\                 &                  & min & -0.50 & $\mathbf{-1.55}$ & -1.52 & -0.87 & -0.57 & -0.59\\      $\sigma_{min}$ (0.44)        & Newton-Raphson Method  &max & 0.38 & $\mathbf{1.44}$ & 1.37 & 0.98 & 0.51 & 0.58 \\               &          with $\mathtt{fsolve}$              &min & -0.44 &$\mathbf{ -1.39}$ & -1.38 & -1.05 & -0.57 & -0.62 \\ \hline  \\     $\mathbf{1:3}$     &  Constant Jacobian & max & 0.37 & 1.94 &$\mathbf{ 1.95}$ & 1.35 & 0.53 & 0.50 \\              &               & min & -1.88 & -1.76 & $\mathbf{-2.06}$ & -1.24 & -0.63 & -0.55 \\         $\sigma_{max}$ (2.34)           & Updated Jacobian  & max & 0.39 & 1.93 & $\mathbf{2.10}$ & 1.37 & 0.54 & 0.51 \\                &                     & min & -0.42 & $\mathbf{-1.96}$ & -1.84 & -1.34 & -0.54 & -0.53 \\            $\sigma_{min}$ (0.43)       & Newton-Raphson Method  & max & 0.37 &$\mathbf{ 1.93}$ & 1.87 & 1.54 & 0.60 & 0.58 \\               &              with $\mathtt{fsolve}$         &min & -0.39 &$\mathbf{ -2.13}$ & -1.85 & -1.33 & -0.53 & -0.51\\ \hline \end{tabular} \end{adjustbox} \end{table*} \end{document}

Let me begin by stating that I did google the answers (and I'll reference to them soon). Yet each of the resources I found discussed one particular method, I'm interested in a comparison of the approaches.  So far, I've found three ways to deal with this problem:   split the number into two columns (integer and fractional parts), as documented  or . The LaTeX code is simple, but the approach is a pain when it comes to copying and pasting tables from external sources. use  manually use Mike Zhang's automatic  (). I have yet to test it.   What do most people use? dcolumn? Are there other options?


When using * to create list like:  >>> ll = [None] * 3 >>> ll [None, None, None] >>> ll[0] = 2 >>> ll [2, None, None]   And then using two dimension,   >>> ll2 = 3 *[ 3 * [None]] >>> ll2 [[None, None, None], [None, None, None], [None, None, None]] >>> ll2[0][0] = 2 >>> ll2 [[2, None, None], [2, None, None], [2, None, None]]   So, create list by operator *, if the element is object like list. It doesn't create new object, just use the referenced object.  Are there any other operators like this in Python?  Edit:  Sorry, My representation is bad.  What I want to know is, are there any other operators using like "*" will not create multiple reference.

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


i have purchased new laptop hp 14q-cs0017tu. it has windows 10. then dual boot my laptop with ubuntu 18.04. in this i have created a separate home and swap partition but after installation of ubuntu. while using internet, wired connections are working properly but for wireless connections it shows no wifi adapter. i have tried many things(like dkms method and got cloning of rtl87** files) but nothing seems to work. here are some details:     description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: eno1    version: 15    serial: f8:b4:6a:ec:e8:d0    size: 100Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.045.08-NAPI duplex=full ip=100.83.109.112 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s    resources: irq:127 ioport:4000(size=256) memory:a1204000-a1204fff memory:a1200000-a1203fff   Please help me to resolve this issue,if you want some more information i will provide you.  edit: this is the output after firing the command lspci -knn | grep Net -A3; rfkill list   03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd.   Device[10ec:d723]  Subsystem: Hewlett-Packard Company Device [103c:8319]  0: hci0: Bluetooth  Soft blocked: no Hard blocked: no

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


I am a Filipino living in Dubai and I have a two year visa for the UK.  I need to travel to Spain, can I do this using my UK visa ?

I am a Filipino Citizen working in Qatar and have a valid Residence Permit. I am planning to visit my wife's sister in the UK, and afterwards we are planning a Schengen tour with the other family member living in the UK. Do I need to get two visas which is a UK Visa from UK embassy (my point of entry) and at the same time another visa which is a Schengen visa from the France's embassy?


When I use nautilus to browse a directory (the specific example in this one is the /media folder) I see nothing, but when I type ls -a in the terminal it shows:  .  ..    in blue. I'm aware that blue highlights are directories and the . and .. can symbolize parent and working directories, but why are they in the /media folder?

when I used ls -a to view hidden files in folder there were 2 hidden files created by default what is the significance of this two files . and ..?  ls -a   Produces  .  ..


From asking several questions about virtual particles on this website, the most popular consensus (on PSE at least) seems to be that they are nothing more than a convenient way of expressing a perturbative expansion and therefore one should not read too much into them. However other sources such as  make arguments about virtual particles that say even 'real' particles can be virtual depending on 'what scale' you do a calculation, with a classic example being 'in the process of a photon emitted from Alpha Centauri being absorbed by our eye, the photon is a virtual particle' (presumably since you can describe it by an internal leg of a Feynman diagram). This doesn't seem to sit right with my current intuition that virtual particles are just artifacts of perturbative expansions.  To me this process isn't an interaction between particles in Alpha Centauri and particles in my eye (which can be calculated by decomposing it into virtual particles) but is instead a process where a real photon has been emitted and transported and then absorbed. How would you respond to this?

I just found  blog post, which gives an interpretation of virtual particles I haven't seen before.  Consider a 1D system of springs and masses, where the springs are slightly nonlinear. A "real particle" is a regular $\cos(kx-\omega t)$ wavepacket moving through the line, where $\omega$ satisfies the dispersion relation $\omega = \omega(k)$. When two real particles collide, the region where they collide temporarily looks really weird, as they interact nonlinearly, pulling and pushing on each other.  Formally, we can write this weird region as the sum of a bunch of $\cos(kx-\omega t)$ waves, but there's no guarantee they'll have the right dispersion relation. Thus, each term in the resulting expansion is a off-shell "virtual particle". If you add up all the virtual particles, you get the actual intermediate field state, which is just a weird ripple in the field where the two particles are interacting.  As another example, consider the statement "a static EM field is made of virtual particles". Under this interpretation, what that really means is, "a static field (e.g. $1/r^2$) is not equal to $\cos(kx-\omega t)$, but may be expanded in terms of such sinusoids", which is much less mysterious sounding. In fact, this is exactly what we do when we consider scattering off a potential in normal QM, e.g. in the Born approximation.  The above gives some intuition for what a 'virtual particle' means in classical field theory. They are the Fourier components of the field with $(\omega, k)$ not satisfying the dispersion relation, and they are useful in classical perturbation theory. However, they are not propagating degrees of freedom, so they only appear during interactions.   The picture above is entirely classical. Does this picture generalize to quantum field theory, giving a physical intuition for virtual particles there?


I made a lightsaber, and it's looking pretty good, but I have a few problems.  When I render it out, it looks like this:  However, in the viewport rendered shading, it looks like this:   How come the exact same scene can have different reflections?  I would like the rendered image to look like it does in the viewport.  How can I do this?

What could cause this? f12:    Viewport:    (the f12 has fewer samples, but even when the viewport is at lower samples it looks different..)  I know about color management, but that is at the defaults..    EDIT: oops.. I know 'log' is not a default, but that is because I was fiddling with it. The image above is rendered with 'default'    The material is quite simple, only a translucent shader. (for testing) I even tried appending everything into a new file to reset all the settings, but no difference.  EDIT2: Uploaded blend


What is the value of $$\frac{1}{\pi^{2}} \int_{0}^{\infty} \frac{(\ln x)^{2}}{\sqrt{x}(1-x)^{2}} d x$$   I tried with by parts.But not able to  Proceed further. Tried with put $x=\sin^2\theta$


Im using this command:  /execute if entity @e[type=minecraft:zombie,distance=100] run say HEY!  ignore the say part, but I want it to detect a zombie in a radius from the command block, logically this should work right or am I just being an idiot?

I've been using the double dot (..) operator in commands ever since they were introduced but I've recently noticed that I can use just a single dot, double dot and a triple dot as well. What is the difference between the three?  for example, this selector will target players with a score of 7 or more  @a[scores={myScore=7..}]   but what if I were to use three dots or a single dot?  @a[scores={myScore=7...}] @a[scores={myScore=7.}]


I want to communicate host1 to host2 using ssh,  Lets think i have username/pwd of host2 , i want to connect to host2 using ssh via shell script, (which takes username and pwd as parameters)  can someone help me to write the shell script for the same ?

At work, I access both a remote system via SSH and some web interfaces that login through LDAP. I use 1password to manage my passwords, but I can't seem to find a simple way to input the password from the password manager to SSH. I saw sshpass but it can show the password in ps, which is really bad security, and also doesn't work in my case. Is there any way to input a password from an external program or script through SSH directly, or are there facilities within SSH that I can leverage and keep the passwords in sync? Such as keeping a key file that I unlock for SSH that has the same password, which is updated whenever I update the password. Note I can't directly use keys to log into the system because it's not built to support it.  Edit: One commenter pointed out that sshpass will show the password in ps, which is a no-go. I also can't directly alias ssh to something like sshpass ... ssh because I do still log into systems that use keys.   Edit 2: I got confirmation that a password manager is okay, and I attempted to use sshpass with a file descriptor to log into the server but it doesn't seem to work -- instead of giving me a prompt to enter my RSA token, I just get nothing, which makes me think it doesn't run through the same code and won't accept sshpass.


From      SIGQUIT is the dump core signal. The terminal sends it to the   foreground process when the user presses ctrl-\. The default behavior   is to terminate the process and dump core, but it can be caught or   ignored. The intention is to provide a mechanism for the user to abort   the process. You can look at SIGINT as "user-initiated happy   termination" and SIGQUIT as "user-initiated unhappy termination."   $ sleep 100 ^\[1]+  Done                    nohup sleep 100 Quit (core dumped)   But I can't find the dump file in the current directory. Where is it? Thanks.

Scenario (Ubuntu 16.04):  I compile and run a C program (with -g, I get the traditional Segmentation Fault (core dumped), and then (of course) there is no mythical "core" file to be found. Some digging says to modify /proc/sys/kernel/core_pattern with a command to the effect of: echo '|tee /home/me/my_core_folder/my_core_file' | sudo tee /proc/sys/kernel/core_pattern, and after doing this, I stop getting (core dumped) and start only getting the plain Segmentation Fault. I try things like gdb ./program_object_file.out core.pid which obviously doesn't exist (I was getting desperate), and of course try the plain gdb ./a.out followed by (gdb) core core.pid and variants of the commands where I spam the tab key desperately trying to get auto-completion to get me to where I need to be.  Question:  Is there a generalized way I can get to core dumps? I recognize that every machine that I touch seems to have a Michael Bay's Transformers-esque ability to reconfigure hardware and software such that no device I own can be expected to work normally out-of-the-box. Is there a simple algorithm/recipe I can follow to locate core dumps on my own machine as well as on other peoples' machines? I always find myself tutoring friends on stuff like this after no small amount of  work to get things working for myself and it would be nice to be able to run a command or something to get core files dumped to the directory which the executable was run from... is there any way to do this that should work on most (I would settle for "some") Linux/Unix machines?


I'm somewhat new to blender and i have a problem with mixing materials:  Material A and B are similar (roughness, and colors) but material B has "holes" in it. These holes need to be in specific location on that mesh, and only there.   I need to somehow mix thesee materials so that is transformes smoothly to one another, and i dont know how.  I thought about "merging" them and mixing them with gradient texture as a factor but given that the materials are messy, and they blend in multiple places i don't think it can work, or at least i don't know can it work.  Any help would be appreciated

I have created this with cycles:  But the edge between the glowing and non glowing materials is very sharp. The material was manually applied to faces in edit mode. Is there any way I can smooth the edge between them in cycles?


My calculator suggests that the limit of this series is 0.75. $$\sum_{k=2}^{\infty} \frac{1}{k^2-1}$$ How can this be proved. I was thinking about a telescop sum but that didn't help me I appreciate any help you could provide


I wonder whether Hawking's derivation is purely heuristic, and in analogy with the Casimir effect case, whether a QFT based derivation of Hawking radiation intensity should depend on the coupling constants associated to the different interactions.   In particular, shouldn't be the particle-antiparticle fluctuation, often shown in Hawking radiation schemes, accompanied by some boson appearing as in usual Feynman diagrams?

Could someone please provide an explanation for the origin of ? (Ideally someone who I have been speaking with on the h-bar)  Any advanced maths beyond basic calculus will most probably leave me at a loss, though I do not mind a challenge! Please assume little prior knowledge, as over the past few days I have discovered that much of my understanding surrounding the process as virtual particle pairs is completely wrong.


I am doing research on reverse engineering. I am able to decompile .net dll files with reflector. But in reflector we can't decompile c++ dll files. Is there any other decompiler available to decompile c++ dll Files?

Is there a way to disassemble Pro*C/C++ executable files?


I am trying to take a photo of a banner against an off white wall.  Is there a way to get a pure white background and the banner colors not be overexposed?  I am using a point a point and shoot camera on auto settings.  Right now, the picture looks a little/blueish.

I'm a new photographer, and I'm trying to take photos of a product with a pure white background (#ffffff). I'm using a light box (something like ), so my lighting should be solid.   But I can't seem to find the right settings for a good photo. I've taken lots of photos (100+), with a lot of different settings and basically my photos are either overexposed, or the background is not white. Here are some examples:  1.    The product is great on this photo. Only the background is WAY to grey.   f/8 -- 1/2000 sec -- ISO-6400    2.    The background is pure white. But the product is overexposed.  f/8 -- 1/320 -- ISO-6400     3.   Too grey and the product is overexposed  f/22 -- 1/200 -- ISO/128000    Based on feedback, I have adjusted the exposure parameters and gotten somewhat , but that that alone doesn't solve the fundamental problem. What else do I need to do to get a pure white background without overexposing the subject?


I use a template of my university for my thesis. I have several figures. In the table of figures, I have a blank line under two of the figures. I cannot see why and badly cannot reproduce it in a minimal example. The blank line appears between those two figures:  \begin{figure}[htb]     \centering       \includegraphics[width=0.5\textwidth,keepaspectratio]{graphics/example1.png}       \caption[examplecaption1]{examplecaption1\footnotemark}       \label{img:example1}   \end{figure}     \footcitetext[Vgl.][674]{example1}   \begin{figure}[htb]     \centering       \includegraphics[width=0.7\textwidth,keepaspectratio]{graphics/example2.png}       \caption[eaxamplecaption2]{examplecaption2\footnotemark}       \label{img:example2}   \end{figure}     \footcitetext[Vgl.][]{example2}   This produces a table of figures like the following. The Banl line appears between figure 8 and 9.  The list is created with \listoffigures. If any further information is needed, I will provide it as soon as possible.

I use \listoffigures and \listoftables. Both commands create line breaks for items from different chapters. How can you stop that?  Screenshot:


I wanted to remove Ubuntu and get back to Windows. I had both Windows and Ubuntu running on my system. To remove Ubuntu I just deleted the partition and unmounted the live CD and now I am getting this error saying "error:no such partition. " What should I do to get my Windows 7 back!!?!?!

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I have a Macbook Pro 2017 base model with 2 thunderbolt ports. I just bought a Xiaomi AX1800 router for its 5G capability. Unfortunately, my Macbook cannot connect to the channels provided by the router, because they are 36, 40, 44, and 48; while my Macbook's en0 channels are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 149, 153, 157, 161. After a few minutes tinkering, suddenly my Macbook picked up the 5G wifi of the router, and when I look into system report, the channel it listed now includes my router channel and the interface is now en1 (idk why it switched to that.) Several minutes later, my Mac went into sleep mode, and the 5G connection was lost. I tried SMC and NVRAM reset, removing and adding a thunderbolt bridge, all with no luck. The 5G can no longer be detected by my Macbook. The router is not damaged btw, since my phone and iPad can pick the 5G immediately just fine. I ran sudo networksetup -listallhardwarereports, but it returns the list of possible commands, with ** Error: The command is not recognized. at the bottom. Also tried: sudo ifconfig en1 up, but it's still inactive afterward when trying to check with sudo ifconfig -a. So I think, if I am able to force en1, then it will pick 5G again just fine. Where do you think the problem lies?

When I'm connected to two networks with separate routers using Wifi and Ethernet, how does my Mac know what connection to use when I visit a website?


I'd like to model a tube with both ends rounded. After that i want to add a colorful gradient to it.  I know a little about building a tube via bezier curves and a cylinder but the tube has open ends.   How would you try to model it?  Attached you find a picture what I would like to build.

I was trying to make a pipe with rounded cap or ends. Something like in the image, where I just added to spheres as "ends".     I've already surfed the internet a little and it looks like an uncovered issue, as simple as it seems.  I need to do this because I want to animate it later, like some type of growing body of water.  So, the method I'm trying out now is using a Bezier curve and applying some bevel, because of the "start bevel factor" and "end bevel factor" parameters which can modify the length of the pipe from its start or its end. Very handy.  What I've tried later, was to select a sphere for the bevel object, so it would return a pipe with rounded caps... but it was impossible.  So I'm totally open to new approaches, if you have any ideas!


I am stumped with starting this problem. Could I please get some hints/ advice on tackling it:  Show   $$ \mathbb{E}[X\mid X \leqslant x] \leqslant \mathbb{E}[X] $$  Thanks in advance!  EDIT (Solution):  Following Marcus's hint:  $$\mathbb{E}[X]=\mathbb{P}[X≤x]\mathbb{E}[X|X≤x]+\mathbb{P}[X>x]\mathbb{E}[X|X>x]$$  and noting  $$\mathbb{E}[X|X≤x] \leqslant x < \mathbb{E}[X|X>x]$$  it follows that  $$\mathbb{E}[X] \geqslant \mathbb{P}[X≤x]\mathbb{E}[X|X≤x]+\mathbb{P}[X>x]\mathbb{E}[X|X≤x] = \mathbb{E}[X|X≤x].    $$  Note: It has been brought to my attention that there is an existing question on here almost identical to mine. It does not however have such a complete answer and so I leave it to the operators to remove this post.

I would like to show that:  $\hspace{2mm} E[X|X<x] \hspace{2mm} \leq  \hspace{2mm} E[X] \hspace{2mm} $ for any $x$   X is a continuous R.V. and admits a pdf. I'm guessing this isn't too hard but I can't come up with a rigorous proof. Thanks so much.


Occasionally I change my mind about the value of a question, or about which concern I have with it. We let folks retract/correct up or down votes (though we limit that on comments); we should have an undo capability on close votes, which are arguably more critical.

Sometimes you vote to close something and the OP then changes it to fix the issue or issues. You can't take a close vote back though. It would be nice if you could.    With the new Duplicate close changes and the review queues, it's even more important to be able to remove accidental or erroneous close votes: close votes now place a banner on the question (for dupes) or put the question into a queue for other users to look over.  An easy "undo" button could save a bunch of people some time and grief for these accidental/no longer desired close votes.


I'm almost done assembling my new bike :)  There is still one thing in the way though... See the headset in the picture? It was installed by a professional (or, at least a LBS owner) when I bought the frame. Kinda came preinstalled.   After assembling the bike, I went back to the shop to have the headset adjusted. And somehow they couldn't get the thing set up properly. I tried too, and yeah, let's face it, that headset is probably bad or badly installed.     As is, the bike is pretty much unrideable since the fork would wobble every time I brake.  The frame is an Intec M1, see document page 6.  It has a 1" 1/8 fork tube.  The current headset is a XLC A51AN. I guess it's an external headset, but not really sure.    There are enough spacers, allowing to tighten the top cap really hard, hard enough to almost lock the steering. Even then, the fork still wobbles. The fork tube is not cut straight, but I'm pretty sure the tube never touches the top cap.   So what are my options to fix that? (not involving yet another LBS)   What could explain why we can't adjust it? Can I fix this headset? otherwise, which tools would I need to replace the headset with another? And what kind of headset do I need?   Also would I need to change the "fork race" (referring to the piece attached to the bottom of the fork tube, correct?) if I were to fit a different headset?

When I wrap my fingers around my roadie's headset, I'm able to 'rotate' some parts of it freely around.   Should this be happening? If it should not be happening, what is causing this and is it dangerous? The bolt that attaches the stem to the headset near the topcap (not sure if that's the proper way to describe it) is tightened, so it won't be due to a loose bolt.


On Unity I had Compiz Config. It was responsible for my workspace grid, and with it I could make specific type of window appear in specific workspace.  So terminator was always on row 2 column 4, emacs row 1 column 4. Chrome row 3 column 2, Libre office writer row 4 column 2, Texworks row 4 column 4... Etc.  How is it possible in Ubuntu 18.04? Can I do it with gnome shell extensions? Is it possible to install Compiz Config and make it work like old times without switching to Unity? Do I have to switch to Unity for this?  I just upgraded from 16.04 to 18.04 and I'm trying to make it work.

I would like to have some applications always appear in a specific workspace. For example: I would like my mp3 player on the bottom left workspace, and terminal application on the bottom right one;  I am new to Ubuntu, so tried using wmctrl but it looks to me as desktop wall works by creating one big desktop and then splitting it up into 4 pieces.


One of our drafts was accepted for publication in Nov. 30, 2020. It has not been published online yet. I have not even received the first proof. Is it appropriate to push the Editor? Thanks!

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


says that I have to  edit the "linux" line in the grub boot menu to set up bootchart. I do not understand what exactly it is that I have to do. Please help.

I am running Ubuntu Gnome 15.04, and I want to generate a bootchart to help me diagnose some system problems. However in  it says:    So how do I access the grub boot menu in order to append this text? And just to be clear, how should the line look once I have appended the necessary text? Also, is grub already installed for I don't appear to have either or these packages: grub or grub2?    OS Information:  No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid


I want some programming suggestion, say for example, in , I have a question about whether we should or must remove public folder or not for best practices. Shall we remove it or not whether I am on local server and go on to upload on live server.   I am afraid to ask this question on  as I can end up losing my reputation which I do not want as I do not have much.  So where can I ask those need suggestion kind of programming questions? Here on Meta or somewhere else?

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.


Absolutely every question I ever ask on programmers.stackexchange.com ends up being a bad question and put on hold due to being off topic.  Where can I ask my questions without having to constantly defend from negative comments and votes, the question being put on hold, etc?   Not every programming question has a definitive answer, and those whose answers can be a bit more ambiguous or open for interpretation are also very important. Especially when if you are like me, you don't know anybody in real life or on the internet, that could help you. I could search around for forums, but there is not as much activity there as it is here, for me to get timely feedback.  I have no one to ask. And now, apparently, nowhere to ask for help too.        And there are at least 3 or 4 more questions that I had to delete before my reputation would have hit rock bottom.  Where do I ask these questions?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


Tables  Fruits  f_id  | names --------------- 1   |   Apple 2   |   grapes 3   |   mango 4   |   orange 5   |   cherry   Some common table, where I'm storing fruits table f_id is comma separated  or single   common  id  |   f_id    |   m_id ------------------------- 1   |   1       |   7 2   |   1       |   7 3   |   1       |   7 4   |   3,4     |   8 5   |   2       |   7 6   |   5       |   8 5   |   2       |   9 5   |   2,4     |   9 5   |   4,5     |   9 5   |   1,3     |   10 5   |   2       |   10   Now, I want to fetch the data based on m_id. I have m_id 7 if I pass 7 into below query      SELECT COUNT(C.f_id) as count, C.f_id, (select name from fruits where   f_id = C.f_id) as name FROM common C  where C.m_id = 7 group by   C.f_id   Based on my query I'm getting the result   count   |   f_id    |   name ------------------------------ 3       |   1       |   Apple 1       |   2       |   grapes   But, I'm failed when I pass 8 OR 9 OR 10 which has comma separated values and I aslo tried IN() operator and FIND_IN_SET()     SELECT COUNT(C.f_id) as count, C.f_id, (select name from fruits where   f_id IN(C.f_id)) as name FROM common C  where C.m_id = 8 group by   C.f_id   How can I fetch the data as I expected for m_id = 8 (I want as per below, please suggest)  count   |   f_id    |   name ------------------------------ 1       |   3,4     |   Mango, orange 1       |   5       |   cherry

I have two simple tables in my database. A "card" table that contains Id, Name, and text of a card, and a "rulings" table which contains the Id of the card, and text detailing the rulings for the card.  Often enough in the ruling text, there is a reference to another card in the database. It is easy enough to find this in the text because each card is encapsulated within quotes in the text. It is not uncommon to have multiple cards referenced within the text of the ruling.  What I'd like to do is be able to create a cross reference table (or procedure if it is efficient enough) so that when I submit a query for a card, I can find all the ruling records that directly reference the card through the Id and get all of the ruling records where the card name is referenced in the text.  What would be the best way to approach this? My environment is SQL 2005, but any kind of "DB agnostic" solutions are greatly accepted here.


Please suggest: I have MS SQL 2000 database  backup i want to Restore in Ms SQL 2012 Please suggest.

I have come across three old databases sitting on SQL Server 2000 which I need to move to 2012. I believe the standard approach is to restore into a 2005 or 2008 instance, update, re-export and finally restore into 2012.  Fine, except we have no 2005 or 2008 instances available.  Are there any workarounds or other methods that might be worth trying?  For information, the databases only contain 15-20 tables and a few views, they appear very simple and the backups are only 100-200MB in size.


i want to write this code( java ) on c# , but receive this error message  Unable to cast object of type 'System.SByte[,]' to type 'System.SByte[][]'.  java code is :  byte[][] bArr2 = (byte[][]) Array.newInstance(byte.class, new int[]{2, 8});    my csharp code is   sbyte[][] bArr2 = (sbyte[][])Array.CreateInstance(typeof(sbyte), new int[] { 2, 8 });    thanks

I'm trying to deserialize an array of an type unknown at compile time. At runtime I've discovered the type, but I don't know how to create an instance.  Something like:  Object o = Activator.CreateInstance(type);   which doesn't work because there is no parameterless constructor, Array doesn't seem to have any constructor.


I'm trying to right-align pieces of text in separate TikZ nodes. One piece of text is alphabetical and the other is numerical. The numerical text is much larger than the alphabetical text, and I'm finding there is extraneous space to the right of it. As a result, the right alignment is not accurate enough.  Here is a MWE:  % !TEX program = xelatex  \documentclass{book}  \usepackage{tikz} \usepackage{tikzpagenodes} \usetikzlibrary{positioning} \usepackage{fontspec} \setmainfont{Cambria}  \newcommand\hugefont{     \fontsize{200}{220}\selectfont% }  \newcommand\smallfont{     \fontsize{20}{22}\selectfont% }  \begin{document}     \begin{tikzpicture}[remember picture,overlay]%         \node(small) [anchor=north east,fill=green,inner sep=0pt]             at (current page text area.north east) {\smallfont abc};%         \node(big)   [anchor=north east,fill=red,inner sep=0pt,yshift=-10pt]  at (small.south east)                  {\hugefont 123};%         \node(big2)  [anchor=north east,fill=blue,inner sep=0pt,yshift=-10pt] at (big.south east)                    {\hugefont abc};%     \end{tikzpicture} \end{document}   And here is the result:    As you can see, the "123" has a large gap to the right of the "3", so it doesn't align well. The large "abc" is better, though still imperfect.  I'm aware that my font choice of Cambria exacerbates the issue, but even without it the problem persists to a lesser extent.  Is there any way I can accurately right-align this text without resorting to manual xshift values?

I would like to left-align two nodes which contain text of different size such that the exact left of the small text is aligned to the exact left of the large text. What I'm finding is that there is a small but noticeable gap between them:    What I would like is something like this, which was obtained by opening the PDF in Inkscape and using the align tool:    A small difference, certainly; but I am particular. Is there any better way of aligning the text as such than doing it manually?  The above example was generated by the following code:  \documentclass{article}  \usepackage{tikz}  \begin{document}  \begin{tikzpicture}     \usetikzlibrary{positioning}      \node[anchor=text] (largetext) {         \Huge Large text.};     \node[below=.4cm of largetext.text, anchor=text] (smalltext) {         \large small text.};      \draw[red] (largetext.text) ++ (0,.7) -- (smalltext.text); \end{tikzpicture}  \end{document}


I just modeled this knife and I can't find how to export its texture as png.    I searched a lot, but nothing seems to work. I tried baking it a few times, but all I got is a black UV map. And yes, it is unwrapped. When I baked it using combined bake type it baked the texture together with the light that was reflected of it.

I created a interior scene and  i don't know how to bake a texture using cycles bake.


I use Ubuntu 14.04 LTS. I tried rm 'ls', rm rf but they did not work.

The closest I've gotten is   # rm /path/to/directory/*.*   but that doesn't work for files that don't have an extension...


I have heard that a gamma photon can convert into an electrons positron pair( I don't know how that works), but see when the reverse thing happens shouldn't a single photon be release but in books it is given that during the annihilation two gamma photons are generated,  does it have to do something with momentum conservation?

In reading through old course material, I found the assignment (my translation):     Show that a single photon cannot produce an electron-positron pair, but needs additional matter or light quanta.   My idea was to calculate the wavelength required to contain the required energy ($1.02$ MeV), which turned out to be $1.2\times 10^{-3}$ nm, but I don't know about any minimum wavelength of electromagnetic waves. I can't motivate it with the conservation laws for momentum or energy either.  How to solve this task?


I would like to be able to easily generate calendars like the following:     Is there some package or library to easily generate something like this, given the initial year and month?  TiKZ has a calendar library, but it does not generate the the desired layout.

Maybe TeX isn't the best for this particular problem, but any teachers out there use a particular class or package to plan lessons?  Right now I'm just using a spreadsheet, but I always find myself wishing there was a 'lessonplan.sty' or 'classschedule.sty' file out there somewhere so I could still use the LaTeX for equations, tables, lists etc.    A bit of searching yielded a few results, but there doesn't seem to be a consensus.  Anyone used any of these:        Any recommendations from anyone on best way to make calendar-based class schedules and/or lesson plans?


It is known that a semigroup with left identity element and left invertibility is a group.  I noticed that I can make an unnamed group-like structure with some tweaks. I call a semigroup $\langle G,*\rangle$ a demimonoid iff:   There exists a unique right identity element.   Furthermore, I call a demimonoid a demigroup iff:   For every element in $G$, there exists a unique left inverse.   The key motivation is from that the "one-sided definition" of groups derive that the left identity is also the right identity by using left invertibility.  Note that uniqueness matters. A notable non-example of a demimonoid is the left zero semigroup:  $$ \begin{array}{l|ll} * & x & y \\ \hline x & x & x \\ y & y & y \end{array} $$  Every two-element demimonoid is a group. An example of a three-element demimonoid which is not a monoid (nor a demigroup) is:  $$ \begin{array}{l|ll} * & x & y & z \\ \hline x & x & x & x \\ y & y & y & y \\ z & x & x & z \end{array} $$ where $z$ is the unique right identity element.  I see no example of a demigroup that is not a group. All three-element demigroup is a group, namely, the cyclic group. Is every demigroup a group? If not, what is the smallest demigroup which is not a group?

We know that a semigroup with a right identity and right inverse for all elements is a group (e.g. see ). Symmetrically, also a left identity together with a left inverse implies a group. We also know that a semigroup with a right identity and a left inverse is NOT necessarily a group (see ). My questions are:   in a semigroup, is the existence of a UNIQUE right identity together with the existence of a left inverse enough to have a group? in a semigroup, is the existence of a right identity together with the existence of a UNIQUE left inverse enough to have a group?   I think both these claims are false,  ut haven't found a counter-example so far.


I was just reading this on an online max-DPR build and there were some who thought using the metamagic twinned spell on the warlock cantrip was illegal, and some who thought the opposite.  Twinned Spell, PHB page 102 (emphasis mine)     When you cast a spell that targets only one creature and doesn't have a range of self, you can spend a number of sorcery points equal to the spell's level to target a second creature in range with the same spell (1 sorcery point if the spell is a cantrip).   So can the sorcerer's Twinned Spell metamagic class feature be used with Eldritch Blast?

Can a multiclass sorcerer/cleric use the Metamagic class ability with non-sorcerer spells? For example, using Twinned Spell when casting cure wounds to heal two creatures instead of just one?


I have a shortcut on my Desktop which points to an internet address.Usually it opens in my default browser which is chrome.  But I want to open it on Firefox without the address bar and menu bar visible.  And if possible, I'd like to define a custom window size for Firefox too.  How can I do this?

I am looking for a way to launch Chrome, Firefox, or IE9+ (any one will do) from a script or command line without any window frame, address bar, or tabs section.  Illustration:    For instance, I'd like to only be able to see the section that is comprized of the orange box, and the area inside of it.  The horizontal scroll bar won't be an issue (I control the html that will be displayed and I can ensure it won't need to scroll). Ideally I'd like to cut out the vertical scrollbar, but I could live with it if it were shown.  Does anyone know of any tool or script that would allow me to do this on Windows 7?


I am installing Ubuntu alongside Windows 10. I chose the Something else option and manually specified the root, swap and home partitions. Finally, when I click on Install now, I am getting the above-mentioned error(Requires Separate Boot Loader Code). How to Fix it? I am stuck here.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


There is an apparent paradox in a Black hole. Keenan Pepper :     Electromagnetic radiation cannot escape a black hole, because it travels at the speed of light. Similarly, gravitational radiation cannot escape a black hole either, because it too travels at the speed of light.   If this is true, then evidently a BH cannot exert a pull at the centre of a Galaxy, neither it can suck off the energy out of light trying to excape from it , etc?  EDIT: should I ask a new question about this? @John Rennie, saying that gravity is curvature, seems like shifting the problem (,like saying that electrostatic pull is the electric field). Relativity says that mass curves spacetime, but that supposes interaction. How can spacetime know that a BH is there, if it cannot communicate? a planet modifies surrounding spacetime in some way, and that , in its turn, affects bodies and light. The question now becomes: how does a BH acts on surrounding spacetime to make it curve, since nothing can excape it, except Hawkings radiation?

My understanding is that light can not escape from within a black hole (within the event horizon).  I've also heard that information cannot propagate faster than the speed of light.  It would seem to me that the gravitational attraction caused by a black hole carries information about the amount of mass within the black hole.  So, how does this information escape?  Looking at it from a particle point of view: do the gravitons (should they exist) travel faster than the photons?


I have a scenario. I have to pass the parameter values to the methods in script and methods to execute. Example: File name app.py value1 = sys.argv[1] value2 = sys.argv[2] def method1():     print(value1)  def method2():     print(value2)  Command I am trying to execute: python3 app.py 10 12 method2 In the above the output should be method2() print value is 12

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


I have a "small" problem. There is a database server that contains a database where some test frontends are connected to. I want to update that database from a dump + some scripts to the most recent version. For that I need to drop the db. But when I kill the connections to the DB, the clients immediately reconnect within a second. :-(  So I try to disallow new connections, kill the connections and then drop the DB. For that I write a small script. The essential part is that:  SQL="UPDATE pg_database set datallowconn = 'false' where datname = '$DB_NAME';       SELECT pg_terminate_backend(procpid) FROM pg_stat_activity where datname = '$DB_NAME' and current_query       NOT LIKE '%SELECT pg_terminate_backend(procpid)%'; DROP DATABASE $DB_NAME;"  psql -h $DB_HOST -W -U $DB_USER "$DB_NAME" -c "$SQL"    But psql is not able to perform the drop database in a multiline statement...  So I tried (just for the sake of trying it out) to do the drop db in a second statement. But as I expected that complains that it can't drop the DB because the DB does not allow new connections...  Isn't there a reliable way to perform an action like this?  I can't simply stop all clients that are connected, because I don't know in my script which clients are connected from where. So that option is not possible.

I need to remove a database from a PostgreSQL DB cluster. How can I do it even if there are active connections? I need sort of a -force flag, that will drop all connections and then the DB.  How can I implement it?  I'm using dropdb currently, but other tools are possible.


I am using Windows 10 and am perfectly able to use the application . but i am not able to open my saved projects  i am able to see in edit mode but the opened rendered image does not load . i have to reclick render and wait for it again.   Please help.

Is it possible to render an image and have blender remember it, so that next time I open the file the render result will not be blank?  I am not talking about saving to an external file.  Specifically I would like to render an image, close blender, and come back later and be able to do some compositing on the render without having to waste a half an hour rendering it again (my GPU drivers are messed up so I have to use the CPU).  Currently the render result is blank when ever I open a file.


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


I'm working on a theme for Drupal 9 where I'm rendering a node's field, which consists of multiple "raw" HTML elements (without any attributes). The item.content variable inside my field template looks as follows when I dump() it: array(4) { ["#type"]=> string(14) "processed_text" ["#text"]=> string(27) "
Sub heading

Lorem ipsum
" ["#format"]=> string(10) "basic_html" ["#langcode"]=> string(2) "de" }   This gives me, as expected, just
Sub heading

Lorem ipsum
. In this case, simply using the tags for styling is not acceptable as I wish to follow specific conventions, so I'd like to add suitable class attributes to these elements, for instance each
 inside this template should get a defined class, each
 another class. As I don't want the person typing the text inside the editor take care of the styling, I'd rather not change the editor's setup to include classes. How can I do things like that, importantly without affecting any other elements to be rendered somewhere outside this template? Unfortunately my own research did not lead to an answer so far. Thanks for your help!

Is it possible to automatically add a class to each <ul> element added to the CKEditor WYSIWYG?  In my project, I decided to not style ul > li in order to not have to rewrite CSS for each ul Drupal can display (i.e. menus or contextual links). So, I have only one CSS rule for my unordered lists: ul.my_custom_class li. I used to add a custom style in CKEditor's Styles dropdown that add this class, but it's not a perfect solution, as some administrators forget to use it (or sometimes, CKEditor does not recognize ul ou a since Drupal 8.4.x, see ).  The perfect solution would be that, each time you add an unordered list into the WYSIWYG, instead of having ul li, you'd have ul.my_custom_class li. I know I can use an other CSS rules like .ckeditor ul to make it work, but I want to be able to use this specific class anywhere in the website.  I've found  in the CKEditor docs but I don't really know where to use them on Drupal 8.


I'm working on building a contact form for my new Web site and want to send mail through Google's SMTP relay server (smtp-relay.gmail.com) because I want to set up a "dummy", "no-reply" address from which to send the mail. Also, I tried sending it through the regular SMTP server (smtp.gmail.com) using my own actual Gmail credentials for that account and it got blocked as an insecure app. I'd rather not turn on the "" option (it's not really an option for me anyway because I use 2FA on this account), so this seems like the best way to get there - if I can get it working. The domain's mail is hosted in G Suite and I've configured the SMTP relay service in the  for my domain as per the instructions in the support article, . I have the relay configured using both the public static IP address of my Web site, as well as the static IP address of the firewall behind which the Web server lies. I configured the relay to accept mail from my domain(s) to allow for the "dummy" address that doesn't actually have a mailbox, and set it to require SMTP Authentication and TLS encryption:  I've set up DNS records for MX, SPF, and DKIM with my domain registrar.  I've waited over 24-hours for the changes to take effect (as per the notification when making the changes in the Google Admin Console) I've even set up an app password for my Web site to use for my domain e-mail address:  I'm using an ASP.NET (VB) Web site on IIS. My code for sending looks like this: Dim NewContact As New System.Net.Mail.MailMessage()  With NewContactMessage     .From = New System.Net.Mail.MailAddress("no-reply@mydomain.com")     .To.Add("myaddress@mydomain.com")     .Subject= "TEST MESSAGE"     .IsBodyHtml= True     .BodyEncoding = System.Text.Encoding.UTF8     .Body = "This is a test."     .Priority = System.Net.Mail.MailPriority.Normal End With   Dim Server As New System.Net.Mail.SmtpClient()  With Server     .Port= 587     .Host= "smtp-relay.gmail.com"     .EnableSsl= True     .Send(NewContactMessage) End With  However, when I try to submit my contact form, I get an error, Mailbox unavailable. The server response was: 5.7.1 Invalid credentials for relay [X.X.X.X]. The IP address you've:  It looks like there should definitely be more to that actual error message, but it's apparently being truncated somewhere along the way. I've tried feeding the credentials in the SmtpClient block: With Server     .Credentials = New System.Net.NetworkCredential("myaddress@mydomain.com", "my_app_password")     .Port= 587     .Host= "smtp-relay.gmail.com"     .EnableSsl= True     .Send(NewContactMessage) End With  In this case, I get a different error: The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Authentication Required. Learn more at. (If I use the credentials with the "default" Gmail SMTP server (smtp.gmail.com), I get the same error.) According to the Audit Logs, it appears that all of my configuration setting changes have completed. Everything appears to be correct for this to work, but what am I missing?

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?


The way I'm using just involves trying to fopen() the file to be checked,  /* --- does file exist??? --- */ char    fname[999] = "whatever";        /* constructed during execution */ FILE    *fp = NULL;                     /* try to fopen(fname,"r") */ int     isfilefound = 0;                /* set true if fopen() succeeds */ if ( (fp = fopen(fname,"r"))            /* try to fopen() for read */ !=    NULL ) {                          /* succeeded */   isfilefound = 1;                      /* set file found flag */   fclose(fp); }                         /* and just close the file */   Is there a quicker, less resource-intensive, way?... A specific way for unix/linux? A Windows way? And preferably, a portable posix-compliant way (as above presumably is)? It's being done lots (1000's) of times, so I'd prefer not to be unnecessarily opening and closing files for no good reason.  ----------------------------------------------------------------- Edit Okay, based on answers below, I put together the following little function intended to check whether or not file (already:) exists in a posix,windows,other portable way...  /* ==========================================================================  * Function:    isfilexists ( path )  * Purpose:     check whether file at path exists  * --------------------------------------------------------------------------  * Arguments:   path (I)        pointer to null-terminated char string  *                              containing "path/filename.ext" of  *                              file whose existence is to be determined  *                              (path is relative to pwd unless explicitly  *                              absolute by initial '/' or other syntax)  * --------------------------------------------------------------------------  * Returns:     ( int )         1 if file at path exists, or 0 if not  * --------------------------------------------------------------------------  * Notes:       o conditional compiles for various systems,  *                depending on whether POSIX or WINDOWS is #define'ed...  *              o ...method used:  *                1: use access() on Posix systems,  *                2: PathFileExists() on Windows systems,  *                3: fopen() on any other systems.  * ======================================================================= */ /* --- entry point --- */ int     isfilexists ( char *path ) { /* ---  * allocations and declarations  * ------------------------------- */ int     isexists = 0;                   /* set true if file at path exists */ FILE    *fp = NULL;                     /* fopen() for non-posix,windows */ #define POSIX                           /* just for testing */ /* ---  * determine whether file at path already exists  * ------------------------------------------------ */ #if defined(POSIX)                      /* posix-compliant system... */   #include <unistd.h>   if ( access(path,F_OK) == 0 )         /* file at path exists */     isexists = 1;                       /* so set file exists flag */ #else   #if defined(WINDOWS)                  /* Windows system... */     isexists = PathFileExists(path);    /* set flag if file at path exists */   #else     /* --- fopen() for any other non-posix, non-windows system --- */     if ( (fp = fopen(path,"r"))         /* try to fopen() for read */     != NULL ) {                         /* succeeded */       isexists = 1;                     /* set file exists flag */       fclose(fp); }                     /* and just close the file */   #endif #endif return ( isexists );    /* back to caller with 1 if file at path exists */ } /* --- end-of-function isfilexists() --- */   The access() and fopen() methods tested and work okay. Unable to test PathFileExists() for windows. And I still want to figure out what #define'ed symbols to automatically and unambiguously check for conditional compiles.

Is there a better way than simply trying to open the file?  int exists(const char *fname) {     FILE *file;     if ((file = fopen(fname, "r")))     {         fclose(file);         return 1;     }     return 0; }


I've come to  question on SO, where the asker's program purpose is obviously to crack some password on social networks.    Should this kind of question be flagged for moderator attention ? Should I refrain from answering ?  Should I consider this question as ... normal.

How should we treat questions that are, or have seeds of, evil or malicious purposes and actions, such as writing spambots and malware?    Should they be answered like regular "everybody keeps their pants on" questions? Or should there be some other type of response to this bad behaviour lot?


I came to know through one of my friends that one of his colleagues, who lived and worked in US for 6+ years completely relocated to his home country (and no plans to return) and settling there. He has had 3 credit cards with credit line worth 35K combined. He drew all of them as Cash Advance and left US.   How are the CC companies going to pursue this issue? For one, he drew $14.5K from Amex CC. Are they able to pursue this guy abroad?   I guess this is a loophole. If people like these are unaffected after doing this, by moving abroad,  then it opens up huge abuse of system.

I have a colleague who is going back to his country after staying for a couple of years in US. He has 3-4 credit cards plus a personal loan. His total debt would come to around $10,000. Some days ago, he told me he is going to default on the accounts. He figures, since he is not planning to come back to US, it should not matter to him.  Question is, is this a bad move on his part, and if it is, how can I convince him?


Consider dockerized Laravel (5.7) app running on nginx/php 7.0.33. I'm experiencing weird rounding (?) error:  Can anyone explain me how floor($x) is 7256 instead of 7257? Bonus:  Bonus 2: the same test in PHP 7.4 / 8 gives good results:

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


Here is my code.  \documentclass[12pt,a4paper,twoside]{memoir} \pagestyle{empty}% for cropping \usepackage{colortbl,multirow,hhline} \usepackage[raggedrightboxes]{ragged2e} \definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725} \definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941} \begin{document}  \begin{table}[H]   % added on 12172013 for caption and label \centering \caption{Table} \label{tb32b} \arrayrulecolor{white} \begin{tabular}{|p{4.5em}|p{10.8cm}|p{3em}|} \rowcolor{c1} \textcolor{white}{Measure}          & \textcolor{white}{Description}                                          &   \textcolor{white}{NO.}  \\ \hline   \rowcolor{c2} \multirow{2}{*}{Orientation-based}    &   The first orientation-based measure is the number of empty bins in the t.  &   $N_i$ is the number of detected      \\ \cline{2-2} & The second one is defined as the variance in  the orientations of points. & $N_i$ \\ \cline{2-2}   \end{tabular} \end{table} \end{document}

I am trying to implement a table given in the snapshot.  Firstly, I just want to draw a multirow, as it is shown in the image.    \documentclass[12pt, a4paper,twoside]{memoir} \begin{document} \definecolor{c1}{rgb}{0.30980, 0.50588, 0.73725} \definecolor{c2}{rgb}{0.82353, 0.87843, 0.92941}  \setlength{\arrayrulewidth}{1pt} \setlength{\extrarowheight}{1.0pt} \begin{table}[H]   % added on 12172013 for caption and label \centering \caption{Table} \label{tb32b} %\arrayrulecolor{white} \begin{tabular}{|p{4.5em}|p{3.8cm}|p{7cm}|l|} \rowcolor{c1} \multirow{4}{*}{\textcolor{white}{Measure}}      & \multicolumn{2}{l|}{\multirow{4}{*}{\textcolor{white}{Description}}} &                                         \multirow{4}{*}{\textcolor{white}{NO.}}  \\ \hline  \arrayrulecolor{white}  \rowcolor{c2} \multirow{4}{*}{Orientation-based}  & \multicolumn{2}{p{11.25cm}|}{The first orientatiofdsafsafsadfsdafdsfasdfdasfdsafasdfsdafdsaffsdafasdt.}    & \multirow{2}{*}{$M_8$}    \\ \rowcolor{c2}  & \multicolumn{2}{p{11.25cm}|}{The second osafdsafsdafasdfsda the sadfdsas of the misdafdsa points.}      & \multirow{2}{*}{$M_9$} \\ \hline  \rowcolor{c2} \multirow{4}{*}{Pair-based} & Equ1 &  \multirow{4}{*}{sdafdsafasdfdsafasdfdsfasdfdsafdsafdsafasdfdsafasdfasdfsadfasdfsadfsadfasdfdsafdsafdsafdasfdsafdsafasdfasdfsadafdas}  & \multirow{4}{*}{$M_{10\_13}$} \\ \cline{2-3} & Equ2 & & \\ & Equ3 & & \\ &  Equ4 & & \\ \hline \end{tabular} \end{table} \end{document}   I found a thread but I cannot modifiy it successfully. The URL is   And then I have a new snapshot of my code. This one is closer to the expected table. But row line between M8 and M9 fail to display, and row colors of the last three rows were not showed.


I use a TpLink Archer, it's a Realtek, and I want to use it / install it into my Ubuntu. I have 2 drives, the first drive (C:) is Windows, which the USB Wireless Adapter works fine there, I just need it to work on my Ubuntu (D:) drive. My Ubuntu version is 20.04 LTS. Here's more information of the USB:  ID: 2357:0115 WI1 chip1: Realtek RTL8812BU How can I install this into my Ubuntu? I am having trouble, and I've been searching everywhere but couldn't find a solution. Edited: I cannot install any sudo softwares, so I don't know how I could install any of this (may be no internet connection?). The only "internet" source I have is my USB, which I can install stuff from my Windows computer.

On Ubuntu 19.04 I had current rtl8812au (AC1200) and rtl8814au (AC1750) dkms drivers for my USB wireless dongles installed and running fine. They both broke after I upgraded to Ubuntu 19.10. I've been able to find a replacement/newer rtl8812au driver that works with kernel 5.3 on Ubuntu 19.10. I haven't been able to find a replacement/newer rtl8814au driver that works with kernel 5.3 on Ubuntu 19.10. Github.com has a number of rtl8814au drivers available, even some that proport to compile with kernel 5.2. I believe that I've tried about 6 different rtl8814au drivers from github, but none of them work, even though some of them do compile with kernel 5.3. Does anybody know of a working rtl8814au driver that works with kernel 5.3 on Ubuntu 19.10?


I am trying to click on the link shown on the attachment but, no matter what I try, webdriver can't find the element. I tried these: elem = driver.find_element_by_xpath("/html/body/div[1]/div/div/div[2]/div[2]/div/div[1]/div/div[1]/div/div[1]/div[2]/div/div/table/tbody/tr/td[1]/div/a").click()  elem = driver.find_element_by_xpath("//*[text()='P0005 - ORP TEST Dev Team 4 Mateusz']").click()  elem = driver.find_element_by_link_text("P0005 - ORP TEST Dev Team 4 Mateusz").click()

When you are writing Selenium/WebDriver automation scripts you will probably run into the exception NoSuchElementException. You think your selector is working, but somehow the element cannot be found.  What strategy should I take to analyse different reasons that this might be the case?   What should I research and how? Good answers would contain example situations and how to resolve them. (e.g. verify selectors, frames, waiting, etc)


I have a attendance table like this:  Student_id   attendance_date    status -----------  ----------------   ---------        1     1/8/2014          Present        2     1/8/2015          Absent        1     2/8/2014          Present        2     2/8/2015          Present        1     3/8/2014          Present        2     3/8/2015          Present   Expected output is this:    Student_ id   1/8/2014      2/8/2014     3/8/2014  -------------  ---------     ---------   ----------          1     present         present      present          2     absent          present      present   Please help me to get a expected output.....

I have a simple problem when querying the SQL Server 2005 database. I have tables called Customer and Products (1->M). One customer has most 2 products. Instead of output as  CustomerName, ProductName ...  I like to output as   CustomerName, Product1Name, Product2Name ...  Could anybody help me?  Thanks!


I have learned lot's of Lasso regression models(20000) using glmnet. I need to compute somehow test statistics for each features of models. like F-statistics,...  Can I do this using bootstrapping ? if yes, how is it possible ?

I'm looking at a regression model where a very large number of possible explanatory variables are being evaluated, and a small number are finally chosen via the lasso method of variable selection. The $\lambda$ tuning parameter in the lasso is chosen by looking at cross-validation forecast performance, which is pretty standard.   However, when I take the list of chosen variables and just run OLS on them, many turn out to be statistically insignificant. That may be perfectly fine if they are jointly significant and the forecast performance is superior to other models (in addition, there would be a question of what the t-test means when you have already screened the variables in a separate step, but I'm leaving that aside).   I'm curious though whether it makes sense to look at statistical significance of individual variables in a model chosen by lasso using CV forecast performance to select the tuning parameter. The problem is that lasso ends up selecting various dummy variables that are only true on small segments of the population and which are insignificant in OLS, and there is a natural question as to whether the model should be judgmentally simplified.


The questions  and  were both marked as duplicates.   However, one of them has a different "marked as duplicate" notice below from the other. The first says "This question was marked as an exact duplicate of an existing question",  and the other one says "This question has been asked before and already has an answer".   I thought that maybe the messages were different because one of the questions is mine and the other one isn't as explained at , so I logged out and saw that there were still two different messages:            There are two differences that I noticed. First of all, the first one was closed by someone who had a gold badge in one of the question's tags, whereas the other one was closed by five normal users. Second of all, the first closure is much more recent than the other one. Is the reason to the different wording one of these? Or is there another reason?  Why are there two different duplicate notices? What is the difference between them?  This is not a duplicate of , as that question asks about the link to the target question above, while mine asks about the "marked as duplicate" notice below.

On duplicate questions, I often see different headings for the duplicate question list. These include:     Possible Duplicate:    [duplicate question list]   and      This question already has an answer here:    [duplicate question list]   and more recently,     This question is an exact duplicate of:    [duplicate question list]   What decides which heading is placed before the duplicate question list?


Hi I'm wanting to mount a 112x112x3000 post onto a concrete slab.  I have purchased L shaped brackets to do the job.  Because the post will sit at the edge of the concrete I can install at most three brackets as there isn't enough room on the fourth side for a bracket.  Also I could only find L brackets, they don't sell the sleeve type where I am.  The issue is check that the post is level I realized that the concrete slab is not level on one side. its only out by a little but there is a very small gap under the post.  So I am wondering what I should do.  I figure I have four options.     Use self leveling grout level the slab surface Grind the slab level Sand the edge of the post until it sits level on the slab I don't need to worry about it as the brakets will hold the post in place.   To me option 3 sounds the most viable if the post must site level on the slab but if I don't need to do anything because the brackets will keep it in place then thats easier.  There isn't going to be much load on the post as it isn't going to be supporting a gate, only three 50x100 rails and 1.8m palings, pretty standard.  I would appreciate some advice on the matter thanks.

I'm building a short (3.5 ft) fence in my front yard. I have most of the posts sunk in dirt holes, but two of them will need to be mounted on a concrete slab. The problem is that the slab has a slight slope to it and the post brackets I have will cause the posts to not be completely vertical. These are  I bought. Is there something I can put under this bracket/anchor to make it sit level?


$a,b,c$ are positive reals and distinct with $a^2+b^2 -ab=c^2$. Show that $(a-c)(b-c)<0$.  This is a question presented in the "Olimpiadas do Ceará 1987" a math contest held in Brazil. Sorry if this a duplicate. Given the assumptions, it is easy to show that $$0<(a-b)^2<a^2+b^2-ab=c^2.$$ But could not find a promising route to pursue. Any hint or answer is welcomed.

I have an inequality problem which is as follow:  If $a,b,c$ are positive integers, with $a^2+b^2-ab=c^2$ prove that $(a-b)(b-c)\le0$.  I am not so good in inequalities. So, please give me some hints so that I can proceed.  Thanks.


I've been wondering if there is a way to set the PATH system variable using other system variables. For example my /etc/environment currently looks like  PATH="........other stuff........ :$SCALA_HOME/bin" SCALA_HOME="/usr/lib/scala/scala-2.11.4"   But I can't get the path to actually use the SCALA_HOME variable I defined.  When I type 'scala' into the terminal it isn't recognized as a command.  I know I could just add the actual value of SCALA_HOME to the path like this...  PATH="........other stuff........ :/usr/lib/scala/scala-2.11.4/bin"   But I feel like this is repetitive and there should be a way to do it the way I was trying.  Anyone know how to do this?

I recently discovered /etc/environment, which seems a more standard way to setup simple environment variables than scripts, but I was wondering if there was a way to back-reference environment variables in the /etc/environment file.  That is, I have this:  JAVA_HOME="/tools/java" GRAILS_HOME="/tools/grails" GROOVY_HOME="/tools/groovy" GRADLE_HOME="/tools/gradle" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"   If I try to add $JAVA_HOME/bin to the PATH definition, however, I get $JAVA_HOME/bin, and not the interpolated variable. To remedy this, I'm creating environment.sh in profile.d to add the /bin entries to the path, but this seems sloppy and disorganized.  Is there a way to backreference the environment variables in /etc/environment?


How to calculate this elementary complex integral?  This is what we would encounter if we are studying the Green's function for Schroedinger's equation. $$\int_{-\infty}^\infty e^{-ix^2}d x=?$$ However, I think there  should be someone that posted similar question on Math SE, though I don't know how to search by equation.  Thank you very much if you can help me out! And I would be grateful if you can give more than one approach    P.S.: The equation $\int _{-\infty}^{\infty}e^{-kt^2}d \sqrt{k}t=\sqrt{\pi}$ surely comes to my mind, but I don't know why it holds for $k\in\mathbb{C}$, because for me, the above integral is over real line, however, the question here is like integral on $y=e^{i \pi/4}x$  ( So I think it's the problem with my complex integral knowledge.)   I tried to rotate this integral path by $\pi/4$, but the two arcs at $R\rightarrow \infty$ seem not easy to handle either.

$\mathrm{Re}(i) = 0$, but the fourier transform of $f(x) = e^{-ix^2}$ is $g(\alpha) = \sqrt{\pi\over i}\times e^{i\alpha^2 \over 4}$, is it not?   Is there an easy to show that it is so, knowing the fourier transform of $h(x) = e^{-x^2}$? (It is $k(\alpha) = \sqrt\pi\times e^{-\alpha^2 \over 4}$.)  The non-unitary, angular frequency Fourier transform is taken into consideration.


I wonder whether it is formal to omit the subject in writing.  Must all sentences always have a subject when I'm writing an English test?  Ìs it colloquial and reserved to speech?

I want to know firstly if it's grammatically correct to start a declarative sentence with "Am". For example:     Am excited about the game today.   Secondly, if it is grammatically incorrect, then I wanted to ask how much "head room" there is for the above usage. I can't think of an example now, nor find one here at english.stackexchange. However I imagine there are usages of the english language that grammatically are illegal, yet have somehow become accepted as colloquial or idiomatic perhaps.


Where does the following formula come from: $\sum_{i=1}^n i \cdot  2^i $ $= (𝑛 − 1)2^{n+1}  + 2$

Prove by induction:   $$\sum_{i=1}^{n} i \cdot 2^i = (n-1) \cdot 2^{n+1} +2$$   Basis: let $p(n)$ be the predicate.  Let $n=1$ this gives $(1-1) \cdot 2^1+1+2 = 2$ and $1 \cdot 2^1 = 2$ so its true for $p(1)$  Induction: assume $n=k$ thus $$\sum_{i=1}^{k} i \cdot 2^i = (k-1) \cdot 2^{k+1} +2$$  when $n=k+1$:  $$\sum_{i=1}^{k+1} i \cdot 2^i = \sum_{i=1}^{k} i \cdot 2^i + ((k+1)-1) \cdot 2^{(k+1)+1} +2$$  $$ =(k-1) \cdot 2^{k+1} +2 + ((k+1)-1) \cdot 2^{k+2} +2$$  $$= 2^{k+1}k - 2^{k+1} +2 +2^{k+2}(k+1) - 2^{k+2}+2$$  $$=\frac{2^{k+1}k-2^{k+1}+2 \cdot 2^{k+1}(k+1)-2 \cdot 2^{k+1} +4}{2}$$  $$=2^{k+1}k-2^{k+1}+2^{k+1}(k+1)-2^{k+1}+2$$  $$= (k-1) \cdot 2^{k+1}+((k+1)-1) \cdot 2^{k+1} +2$$  I've been messing around with the arithmetic part of this for a while now and it's getting frustrating, I'm thinking that I've possibly made a mistake at the beginning of the induction step and that's why I cant get this to work, or maybe I'm just missing something in the algebra, either way can someone please help.


This is more like a feature-request than a question. Anyway: I have some questions and I would like to delete some of these questions (some have upvoted answers). By deleting I mean that I don't want to show those questions in my profile page. I can send an email to stackoverflow team, but this sounds an overkill to me. I don't care if those questions remain on stackoverflow or on another website network, I simply want to hide them from my profile page.  I am the OP of those questions and I have also a good amount of reputation on stackoverflow +10k, so I think users like me should have this possibility, without resorting to send an email to stackoverflow asking for a complete removal, or flag for a moderator. For example there could be a an option to transfer the ownership of the question to a fake-account such as Community ♦, ONLY for trusted users with, for example, more than 10k reputation. This would be a win-win for both users and stackoverflow:  the questions will not be deleted (i.e. it will continue to get views from Google); the user will not have that question in his profile page AND the user will keep all the downvotes if any;  Maybe give this possibility with a reputation cost, such as each time you hide a question you get -1 reputation and also you keep all the downvotes (if any). Final note: Considering stackoverflow has more than 3 million users, I don't think there is any added value by showing an user nickname under a question (rather than a fake user) if the user doesn't want to be associated with that question.

The Creative Commons FAQ      Third, if the licensor does not like how the material has been modified or used, CC licenses require that the licensee remove the attribution information upon request [...]  in 4.0, this also applies to the unmodified work.   How do I remove / dissociate my name from a post, in accordance with this clause?  Also, what are the effects of having my post dissociated from my account?  Finally, how will dissociation requests be handled for posts licensed under earlier versions of the license, which do not require dissociation upon request in all cases?


I am struggling to verify this identity. I've tried using the Principle of Mathematical Induction, combinatorial proofs, and a generalization of Vandermonde's Identity, all to no avail. It's the $(2n)!$ that's giving me problems.

I am trying to prove this identity:  $$\sum_{v=0}^{n}\frac{(2n)!}{(v!)^2(n-v)!^2}={2n \choose n}^2$$ I think this identity (corollary of Vandermonde identity): $${n\choose 0}^2+{n\choose 1}^2+{n\choose 2}^2+\cdots+{n\choose n}^2={2n \choose n}$$ is applicable for solving it. Please give me some hints. thank you


When you check in luggage on a flight you get a receipt and also there is a tag dangling from your luggage. Assuming that you received your luggage at your destination, what reasons are there to not throw away the tag and its receipt immediately (maybe even in the baggage claim area)?

Will be flying with easy jet and was wondering for retuning flights the old luggage tag we have on are suitcase. should we take them off before arriving at the airport to return home or leave it as the person will do it for us anyways? Im guessing even at self check in they will have someone who will make sure that old tags are taken off and that the new one is correctly done etc?


I was wondering if you could help me with a question:   Suppose that $ f $ and  $ g $ are entire functions, and that $ |f(z)| \leq |g(z)| ,\forall z \in C $. Prove that there $ \exists \beta \in C $ such that $f(z) = \beta g(z), \forall z ∈ C$.  I tried to show $f(z)/g(z) $ was constant by Liouville theorem however we don't know if $ f(z)/g(z)$ is entire as $g(z)$ might be equal to $0$. So I couldn't use the fact that it is entire and bounded to use Liouville theorem. Do you have an idea?  thank you in advance

Suppose $f$ and $g$ are entire functions, and $|f(z)| \leq |g(z)|$ for all $z \in \mathbb{C}$, Prove that $f(z)=cg(z)$.   My try :  I consider $h(z)=\frac{f(z)}{g(z)}$. If I prove that $h(z)$ is entire, using the fact that $|h(z)|\leq 1$, the result follows immediately from Liouville's theorem.  To prove that $h(z)$ is entire, I have to prove that $h(z)$ has removable singularities at possible zeros of $g(z)$.  Suppose $g(z_0)=0 \Rightarrow |g(z_0)|=0 \Rightarrow |f(z_0)|=0$, BUT what if $z_0$ be a root of of order $k$ of $g(z)$ (i.e. $f^{(n)}(z_0) = 0 $ for all $ 0 \leq n \leq k-1$) and be a zero of order $m$ of $f(z)$ and $k>m$ ?  And if that's not the case, how to rigorously show that $z_0$ is a removable singularity ?  Thank you all in advance.


I think I had  a configuration problem of the visual studio 2019 exception setting, which I am not able to solve. I am trying to catch a simple exception, using try/catch block. on one pc it works as intended (shows a message box), on other pc - using visual studio 2019, the program crashes, show the exception on the code it self. only after pressing the "continue" button, a message is shown. both pc's are windows 10, running vs19. I assumed that it is more a configuration problem, then a code problem (running the same code on both pc's). please see code below: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Emgu; using Emgu.CV; using Emgu.CV.CvEnum; using Emgu.CV.Structure;  namespace WindowsFormsApp8 {          public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          Capture _capture;           private void Form1_Load(object sender, EventArgs e)         {             _capture = new Capture(2);         }          private void btnCapture_Click(object sender, EventArgs e)         {            try            {                 var img = _capture.QueryFrame().ToImage<Bgr, byte>();                 var bmp = img.Bitmap;                 picBoxCapture.Image = bmp;            }             catch (Exception ex)            {                 MessageBox.Show(ex.Message);            }         }       }}

I would like Visual Studio to break when a handled exception happens (i.e. I don't just want to see a "First chance" message, I want to debug the actual exception).  e.g. I want the debugger to break at the exception:  try {    System.IO.File.Delete(someFilename); } catch (Exception) {    //we really don't care at runtime if the file couldn't be deleted }   I came across  notes for Visual Studio.NET:     1) In VS.NET go to the Debug Menu >>   "Exceptions..." >> "Common Language   Runtime Exceptions" >> "System" and   select "System.NullReferenceException"      2) In the bottom of that dialog there   is a "When the exception is thrown:"   group box, select "Break into the   debugger"       3) Run your scenario. When the   exception is thrown, the debugger will   stop and notify you with a dialog that   says something like:              "An exception of type "System.NullReferenceException" has   been thrown.              [Break] [Continue]"       Hit [Break]. This will put you on the   line of code that's causing the   problem.   But they do not apply to Visual Studio 2005 (there is no Exceptions option on the Debug menu).  Does anyone know where the find this options dialog in Visual Studio that the "When the exception is thrown" group box, with the option to "Break into the debugger"?  Update: The problem was that my Debug menu didn't have an Exceptions item. I customized the menu to manually add it.


Do they have some special meaning related to the release version or they are just random names to sound cool?

As the title says - why also use names and not just version numbers?


This is the log:     Caused by: java.lang.NullPointerException: Attempt to invoke interface   method 'void   com.google.android.youtube.player.YouTubePlayer.cueVideo(java.lang.String)'   on a null object reference   I don't know why it has this error?  public class StudyActivity extends YouTubeBaseActivity implements YouTubePlayer.OnInitializedListener {  YouTubePlayerView youTubePlayerView; YouTubePlayer player;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_study);      youTubePlayerView.initialize(KEY.YOUTUBE_API_KEY,this);     player.cueVideo("GyrH6xiFiT0");  } @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) {     player = youTubePlayer; }  @Override public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) {     Toast.makeText(this, "Error!", Toast.LENGTH_SHORT).show(); } }

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


I have written a simple network engine for client-server communication. It works perfectly on Windows, server knows when the client disconnected etc. (readLine() throws exception). I tried to port the engine to Android and sending and receiving data works, but for some reason server does not detect when the socket is closed (readLine() is still blocked and does not throw any exception). I even tried disconnecting the Android device from internet and it still did not detect closed socket. I thought of a workaround by implementing timeout, when the client does not send something for a long time, server will think that he is disconnected, but that's probably not a good permanent solution.  Code is surrounded by try-catch exception:  String userInput; BufferedReader stdIn = new BufferedReader(new InputStreamReader(socket.getInputStream()));  while ((userInput = stdIn.readLine()) != null) {     //do something }

As a follow up to a , I wonder why it is impossible in Java, without attempting reading/writing on a TCP socket, to detect that the socket has been gracefully closed by the peer? This seems to be the case regardless of whether one uses the pre-NIO Socket or the NIO SocketChannel.  When a peer gracefully closes a TCP connection, the TCP stacks on both sides of the connection know about the fact. The server-side (the one that initiates the shutdown) ends up in state FIN_WAIT2, whereas the client-side (the one that does not explicitly respond to the shutdown) ends up in state CLOSE_WAIT. Why isn't there a method in Socket or SocketChannel that can query the TCP stack to see whether the underlying TCP connection has been terminated? Is it that the TCP stack doesn't provide such status information? Or is it a design decision to avoid a costly call into the kernel?  With the help of the users who have already posted some answers to this question, I think I see where the issue might be coming from. The side that doesn't explicitly close the connection ends up in TCP state CLOSE_WAIT meaning that the connection is in the process of shutting down and waits for the side to issue its own CLOSE operation. I suppose it's fair enough that isConnected returns true and isClosed returns false, but why isn't there something like isClosing?  Below are the test classes that use pre-NIO sockets. But identical results are obtained using NIO.  import java.net.ServerSocket; import java.net.Socket;  public class MyServer {   public static void main(String[] args) throws Exception {     final ServerSocket ss = new ServerSocket(12345);     final Socket cs = ss.accept();     System.out.println("Accepted connection");     Thread.sleep(5000);     cs.close();     System.out.println("Closed connection");     ss.close();     Thread.sleep(100000);   } }   import java.net.Socket;  public class MyClient {   public static void main(String[] args) throws Exception {     final Socket s = new Socket("localhost", 12345);     for (int i = 0; i < 10; i++) {       System.out.println("connected: " + s.isConnected() +          ", closed: " + s.isClosed());       Thread.sleep(1000);     }     Thread.sleep(100000);   } }   When the test client connects to the test server the output remains unchanged even after the server initiates the shutdown of the connection:  connected: true, closed: false connected: true, closed: false ...


Problem: Let $\{u_n\}_n$ and $\{v_n\}_n$ be two bounded sequences and $u_n>0, v_n>0$ for all $n\in \mathbb{N}$. Prove that $$\overline{\lim }~u_n\cdot \overline{\lim}~v_n\geq \overline{\lim}~u_n v_n.$$  Progress: Since $\{u_n\}_n$ and $\{v_n\}_n$ are bounded , there exis $K_1,K_1>0$ such that $|u_n|\leq K_1$ and $|v_n|\leq K_2$ for all $n\in \mathbb{N}$. What can I do next to  prove that result?

I´m not sure how to start with this proof, how can I do it? $$ \limsup ( a_n b_n ) \leqslant \limsup a_n \limsup b_n  $$ I also have to prove, if $ \lim a_n $ exists then: $$ \limsup ( a_n b_n  ) = \limsup a_n \limsup b_n  $$ Help please, it´s not a homework I want to learn.


Solve the recurrence  $T(n) = 2T(n-1) + n$ where $T(1) = 1$ and $n\ge 2$.  The final answer is $2^{n+1}-n-2$  Can anyone arrive at the solution?


I heard this phrase long ago. I have always wondered the obvious WHY? Why is it that we park in our driveway and drive on a parkway?

I've always been fascinated by these two words, as they seem to have the exact opposite meaning as expected. Is it because of the etymology? Or perhaps the meanings were switched at some point in time?


how many solutions in natural numbers are there to the inequality  $x_1 + x_2 +....+ x_{10} \leq 70$ ?  I know it has to be solved with combinatorics and specifically with the inclusion exclusion principle but I have no idea where to start. Help ?

I need to find the number of possibilities for which the following equation exists:  $$x_1 + x_2 + x_3 + \cdots + x_{10} \leq 70$$  Each variable is a non-negative integer.  I tried simplifying the question to the point of finding the number of possible solutions to each equation seperatly:  $$x_1 + x_2 + x_3 + \cdots + x_{10} = 70,$$ which is ${79}\choose{10}$.  $$x_1 + x_2 + x_3 \cdots + x_{10} = 69,$$ which is ${78}\choose{10}$.  $$x_1 + x_2 + x_3 + \cdots + x_{10} = 68,$$ which is ${77}\choose{10}$, and so forth.  Then I thought about adding all of these together. This seems a bit too much work considering that the textbook solution is: ${80}\choose{10}$, and I can't seem to figure out the idiomatic way of approaching these kind of questions.   Any help is greatly appreciated.


I have a set of data in which the dependent variable Y is a continuous random variable in the interval [0,1] (i.e. it can take the value 0 and 1). This is an insurance dataset so the Y has many 0 (about 96% of the number of observation). I would like to find a model for Y in which I can run a regression to find the relationship between Y and other predictors (like Age, Sex, Profession,...) but can't not find any proper type of regression that describes closely the variable Y. Could you please give my some suggestion ? I would like to thank you very much for your help!

I am thinking of building a model predicting a ratio $a/b$, where $a \le b$ and $a > 0$ and $b > 0$. So, the ratio would be between $0$ and $1$.  I could use linear regression, although it doesn't naturally limit to 0..1.  I have no reason to believe the relationship is linear, but of course it is often used anyway, as a simple first model.  I could use a logistic regression, although it is normally used to predict the probability of a two-state outcome, not to predict a continuous value from the range 0..1.  Knowing nothing more, would you use linear regression, logistic regression, or hidden option c?


Regarding syntax for object creation using new keyword. I know that syntax to create an object is:  Foo ref = new Foo();   Do java language in itself provide some mechanism that can create object other than standard syntax as mentioned above?  I have knowledge that Scala has such functionality or may be some other JVM compatiable language but I want to know from just core java point of view.  Without using keyword 'new' and assignment operatior '='. For example it can be like Foo ref Create(). ? Now I want to develop 'Create' method to replace traditional syntax.

Had a conversation with a coworker the other day about this.  There's the obvious using a constructor, but what are the other ways there?


I am a brand new Ubuntu user. I recently made the switch by creating a USB Boot Drive with PenDrive. I followed the online instructions to have computer boot from the USB. Initially, I chose the 'Try Ubuntu' option. I liked what I saw, so I chose to 'Install Ubuntu".   My problem is this: I believe I had followed the 'Install Ubuntu' instructions to a tee; however, after I am prompted to restart my computer after installation, I am brought back to the Ubuntu Welcome screen with the option to "Try Ubuntu" or "Install Ubuntu". The bloody Welcome Screen keeps coming back!  My apologies if this has been answered in another forum.

After I choose to reboot the computer when ubuntu 13.10 done installing, I booted again with the "Try Ubuntu" or "Install now"  I chose install now (note that I installed ubuntu already) and it had 3 options:   Reinstall windows and install ubuntu or something like that Reinstall ubuntu And format everything and install ubuntu again   I chose back, and I chose the "try ubuntu"  Is this normal? All my system is functioning ok right? I have every feature like a normal ubuntu user cause I installed it right??


I want to assign an array (lists in a list) to a dictionary.  For this I have already tried the fromkeys() method. But this is not working as I've expected.  # a list with 3 string elements list_of_Strings = ['index', 'substance', 'container'] # a list with 3 lists, each list has a few values index_list = [0,1,2] substance_list = ['water','oil','acetone'] container_list = ['B100','B200','B300'] list_of_lists = [index_list, substance_list, container_list]  # this line sets all for all dict keys the value to 0 dict_dummy_1 = dict.fromkeys(list_of_Strings,0)  # when I try this line, in every "key value" are all 3 lists from list_of_lists: # Key -> Value # index -> index_list, substance_list, container_list # substance -> index_list, substance_list, container_list # container -> index_list, substance_list, container_list dict_dummy_1 = dict.fromkeys(list_of_Strings,list_of_lists)  # but I want to have it like this: # Key -> Value # index -> index_list # substance -> substance_list # container -> container_list  # with a loop it is possible: dict_dummy_2 = dict.fromkeys(list_of_Strings,0) for i in range(len(list_of_Strings)):     dict_dummy_2[list_of_Strings[i]] = list_of_lists[i]   It is possible to avoid the loop solution? Is there any function for it? Thank you very much in advance. :)

Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']  What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}


Following on from my previous question entitled .   How do I enable the Debug Menu via Terminal command or otherwise, thereby increasing the functionality of Disk Utility ?

I'm primarily interested to know whether installation of Lion included the .  I understand you can enable extra formats and debugging in Disk Utility, using the following commands:  defaults write com.apple.DiskUtility advanced-image-options -bool true  defaults write com.apple.DiskUtility DUDebugMenuEnabled -bool true   Is this safe? What can this be used for?


NOT HW just practrice question  If eight distinct dice are rolled what is the probability that all six numbers appear ?  The chapter is INclusion and exclusion and the answer in the back of the text is :  $\frac{6^8}{6^8}-\binom{6}{1}\frac{5^8}{6^8}+\binom{6}{2}\frac{4^8}{6^8}-\binom{6}{3}\frac{3^8}{6^8}+\binom{6}{2}\frac{2^8}{6^8}-\binom{6}{1}\frac{1^8}{6^8}$  I am trying to understand this answer.. and what I follow is that the first term $\frac{6^8}{6^8}$ is the probability of the first number and then we subtract probability of the second number appearing $\binom{6}{1}\frac{5^8}{6^8}$ but why is it multiplied by $\binom{6}{1}$ or perhaps I am not interpreting the answer correctly. Could use some intuition n understanding this answer.

Probability that numbers 1...6 show up at least once when rolling 8 dice  How can this be solved using the inclusion-exclusion principle.