body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I'm using BibTex with the style called "alpha." I am generally happy with the way it creates short labels, and have no desire to edit the style file or use a different style or anything like that. There are one or two instances though where I would like to manually override the way it shortens names, but there are no obvious ways to do so. Are there any ways to modify the .bib file that affects the way alpha determines its labels? Add an extra entry, or put brackets around the names, or put the authors in two seperate fields, or something? Something that affects just one bibliographic entry, not all of the entries. For context, if it helps, my specific situation is that I have a lot of citations from the same authors ([ABC19] and [ABC17] etc by Arnold, Bob and Charles), and there is one paper by authors with all the same initials ([ABC18] but now it's Alvin, Brian and Cyril), so the short label is misleading. The best solution would be to change the label slightly ([AlBrCy18]) so it's immediately obvious this is different people. | I want to do amsalpha style citation with BibTeX, except that I want to have manual control over the key/labels (e.g., [ABC09]). Is there an option for this? |
When she had entered the room, she found him laid on the floor with the box in his right hand. She had entered the room and found him laid on the floor with the box in his right hand. She entered the room and found him laid on the floor with the box in his right hand. In the first sentence I used the past perfect and the simple past; in the third sentence I only used the simple past with help of "and". My question is: is it possible to use the present perfect and the simple past or is it necessary to use the two simple past verbs joined with an "and" as I did in the third sentence? In short: is my second sentence right or is it wrong? | I have never had this problem before. But after seeing some questions posted on ELU, I started to doubt. I have been through links1, pages of grammar books2, a lot of questions3 posted here and ELU. I now still can't seem to understand how the past perfect is exactly used. The references sometimes even contradict each other. What I had understood so far was The past perfect is not necessary if we are not 'going back' to the earlier past, and simply moving from one event to another. but I then saw a lot of other 'rules' including If the sequence is clear, the past perfect is not needed. which is slightly different, less 'narrow' and can be applied in more situations than the first ruleA, and The past perfect is optional only when talking about an action at a specific time. This is confusing. Can anyone here clarify things out please? A For example, for Doing the survey [completed] -> Showing the result We showed the result of the survey we did. If the second rule is applied, the sentence above is fine (the sequence is clear), but not if the first rule since we are not moving from any event to the next and possibly even going back. 1 and 2 Practical English Usage (2005) by Michael Swan, Collins Cobuild Student's Grammar (1991). Upper-Intermediate Cutting Edge. 3 including , , , etc. |
I'll start with the actual scenario that occurred in our last session. Our party, of which I am one of the PC's came across a nasty trapped/warded dirt wall. We figured out that the trap was only triggered by contact with metal and resulted I in utterly destroying the metal. After some discussion, we decided that we would just have to spend the time digging through it with our bare hands to avoid setting off the trap. Now, as a player, it slipped my mind I was wearing rings made out of metal. Kaboom, and a magical ring and one finger later, I find myself accidentally triggering the trap. Now, I accepted the gm ruling on this because I felt stupid for forgetting such a basic thing and it was my fault for forgetting. My question is, as GM's, should you remind your players about things that their characters should not have forgotten, especially as obvious as a trap that they just discovered? | To make a long story short, a campaign I was playing in [as play-per-mail] has come to a standstill. The cause of this is the following: My character dove into the river, to retrieve something that was lost, and spent some time in the water. When he emerged, I was told to "maybe take it easy from here on, because my character was close to fainting." When I asked how this had happened, the reply was that it was winter [something I was told a couple of sessions ago--when it was still played around a table--but had long since forgotten] and that the water was almost at a freezing temperature. I feel like the GM should've at least reminded me of these facts before I dove into the water, as I might've forgotten this, but it is something that would be totally obvious to my character. Was this my responsibility to check? How should we proceed after this? [As the state of my character is kind-of important at the moment of emerging from the water.] |
I know that the symmetric difference looks like that when having three sets A,B,C: I want to make a prove with Venn diagrams to prove the associativity of the symmetric difference. What are some good ways to create this proof in a clear way? I really appreciate your answer! | By $A\oplus B$ we denote the symmectric difference of two sets. The definition is $A\oplus B =(A\setminus B) \cup (B\setminus A)$. Now I hope to show that $A\oplus (B\oplus C) = (A\oplus B)\oplus C$. I remember that there's an elegant proof, but I forget its detail. (The first step is to show $A\oplus (A\oplus B) = B$, and maybe applying this formula, we can obtain associativity.) |
\begin{description} \item[Public : ] Dans les clouds publics, \item[Privé : ] Dans les clouds privés, \end{description} I don't know why I got the error mentioned in the question knowing that I worked with this syntax before. How can I solve this ? | When I try to cite more than two authors, I got this: ! Package inputenc Error: Unicode char (U+200B) (inputenc) not set up for use with LaTeX. \documentclass[a4paper,oneside,BCOR=10mm,12pt,titlepage]{scrreprt} \usepackage[polutonikogreek,ngerman,english]{babel} \usepackage[maxlevel=4,autostyle,german=guillemets]{csquotes} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[style=mla]{biblatex} \DeclareMultiCiteCommand{\parencites}[\mkbibparens]{\parencite}{\multicitedelim} \begin{document} \parencites[cf.][]{key1}{key2}{key3} \end{document} |
I'm trying to find a solution for exercise G1 of Chapter VII in Kunen's "Set Theory - An Introduction to Independence Proofs". The question is in the context of Cohen forcing. We start with a c.t.m. $M$ for a sufficiently large segment of ZFC. In the ground model we fix three infinite cardinals $\kappa,\lambda,\vartheta$. The notion of forcing is $P := \mathrm{Fn}(\kappa\times\omega, 2)$. One now has to prove that $$(\lambda^\vartheta)^{M[G]} = ((\max\{\lambda, \kappa\})^\vartheta)^M$$ for any generic filter $G\subseteq P$. I'm guessing that the argument uses the fact that $P$ has c.c.c. and since $|P| = \kappa$ there are at most $\kappa^{\aleph_0}$ many antichains in $P$. However, I do not see how to start the argument. Would someone be so kind as to give me a hint? | Let $\kappa, \lambda,\theta$ be infinite cardinals of $M$ where $M$ is a transitive model of ZFC. Let $\mathcal{P}=Fn(\kappa\times \omega,2)$ (finite functions from $\kappa\times \omega$ to 2) and G is a (M,P)-generic set. I want to show $(\lambda^\theta)^{M[G]}=(max(\kappa,\lambda)^\theta)^M$. One direction is easy $(\lambda^\theta)^M \leq (\lambda^\theta)^{M[G]}$ and $(\kappa^\theta)^M\leq (\kappa^\theta)^{M[G]}\leq ((2^\omega)^\theta)^{M[G]}=(2^\theta)^{M[G]}\leq (\lambda^\theta)^{M[G]}$ where $(\kappa \leq 2^\omega)^{M[G]}$ is by the forcing construction. But now I am not quite sure how to get the other direction. Any thoughts? |
In Age of Ultron, Tony Stark's office building / home/ Avengers HQ is a high rise building in Manhattan. It is seen with Grand Central Station in the foreground in north-facing views, so it must be a small number of blocks north of Grand Central Station. It is also possible to see the Chrysler building from Stark/Avengers Tower, so it is probably east of the Chrysler building, somewhere in midtown. But where in specific is the Avengers/Stark tower located? Has anyone seen an actual address description? And I am curious, what other building is actually in the same location in real life? | In the Avengers movie, Tony Stark builds a tower in New York City. It is big, it is shiny, it is tall. It's all the things that Tony Stark loves, especially in his buildings. During the battle in the third act: ...we see the ground team (Hawkeye, Black Widow, Captain America) are pretty much camped out near Grand Central station. It would seem that Stark Tower isn't too far from there, given that Captain America's primary mission is to keep the Chitauri within a 3 block radius of Grand Central. That leads me to believe the portal (which is above Stark Tower) is located close by, because otherwise the mission objective would be laughable and tactically unwise. Based on the establishing shots, I was wondering: Where is Stark Tower located? And, furthermore: Is Stark Tower located in lieu of the MetLife building? |
I wanted to know how much weight the college someone got a master's from matters while applying for a doctoral program? So for instance, if a person is enrolled in a college which is not well known and his application is great in terms of research projects, CPI score, TOEFL, GRE scores etc., then would that person's application be considered worse than a person who is doing master's from a very good college (well-known)? In particular, I wanted to ask this because I have heard that those Indian students are preferred for PhD programs in Physics in good colleges in US who have done Master's from a top IITs like IIT Kanpur or IIT Madras and students who apply from a lower ranked IIT get frequently rejected. P.S: Those who have no idea about IITs can take the question in a general context from my first paragraph. | When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area? Note that this question originated from this . Please feel free to edit the question to improve it. |
Show that $(\mathbb{N}, d)$ is a metric space with $$d(x,y) = \frac{|x-y|}{1+|x-y|}$$ My attempt: let $x,y \in \mathbb{N}$, 1) $d(x,y) = 0 \implies |x-y| = 0 \iff x = y$ 2) $d(x,y) = d(y,x)$ 3) show for $z \in \mathbb{N}$, $d(x,z) \leq d(x,y) + d(y,z)$ Using the triangle ineuqality I managed to get: $$d(x,z) \leq \frac{|x-y|}{1+|x-y| - |y-z|} + \frac{|y - z|}{1 + |x-y| - |y-z|}$$ but i assume here I must use the fact that $x,y,z \in \mathbb{N}$ but I'm not sure how. Any hints please: edit: improvements on solution - Using fact that $|x-y|$ is a metric we have that $$d(x,y) \leq \frac{|x-y|}{1+|x-y| + |y-z|} + \frac{|y - z|}{1 + |x-y| + |y-z|}$$ (Since $|x-z| \leq |x-y| + |y-z|$) Is this correct? From there I can use the fact that $$\frac{1}{1+|x-y|+|y-z|} \leq \frac{1}{1+|x-y|} $$ and $$\frac{1}{1+|x-y|+|y-z|} \leq \frac{1}{1+|y-z|}$$ to conclude? | Show $\rho (x,y)=\dfrac{d(x,y)}{1+d(x,y)}$ is a metric on the metric space $X$, equipped with the Euclidean metric $d$. I've already shown that the positivity $\rho(x,y)\geq 0$, the symmetry $\rho(x,x)=\rho(y,y)=0$. I'm having trouble proving the last condition of a metric space though: the triangle inequality must be valid: $\rho(x,y)\leq \rho(x,p)+\rho (p,y)$, for $p\in X$. So, $\dfrac{d(x,y)}{1+d(x,y)}\leq \dfrac{d(p,x)}{1+d(p,x)}+\dfrac{d(p,y)}{1+d(p,y)}$ Could someone provide a hint as to get started? No complete solutions please. Thanks in advance. |
I have a very simple C# .NET multitasking example that is not producing the result I expect. (I am using VisualStudio 2017 on Windows 10, and this is a .NET Console application.) Here is the code: using System; using System.Threading.Tasks; namespace Multithreading_Example { class Program { static void Main(string[] args) { Task[] tasks = new Task[3]; for (int i = 0; i < 3; i++) { int n = i; tasks[i] = Task.Run(() => TestTask(i, n)); } Console.ReadLine(); } static void TestTask(int taskNum, int n) { Console.WriteLine("{0} {1}", taskNum, n); } } } Here is the output that this program prints: 3 0 3 1 3 2 (The three lines of output could theoretically appear in a different order because the tasks are asynchronous, but that is fine.) TestTask() simply prints the two integers that are passed to it. Those two integers should be identical - one of them is the loop variable "i," and the second one is a new local variable "n" that is set to the same value as "i." In other words, the above program should (it seems to me) produce this output: 0 0 1 1 2 2 The weird part, though, is when I run the program, TestTask() always prints "3" as the first number (see the actual output, above). Why? This feels like maybe some kind of optimization bug in the compiler, which is getting confused by the loop variable "i" being passed into the task. | I met an interesting issue about C#. I have code like below. List<Func<int>> actions = new List<Func<int>>(); int variable = 0; while (variable < 5) { actions.Add(() => variable * 2); ++ variable; } foreach (var act in actions) { Console.WriteLine(act.Invoke()); } I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s. It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output. Is there a way to work round this limit to have each action instance have its own captured variable? |
I am trying to store objects of inherited types into a std::deque array. I succeed to store the elements, but when I try to use them, only the parent properties are preserved. enum Family { parent_, child_}; class Parent { public: double a; Family type; Parent(double a_, Family type_=Family::parent_) { a = a_; type = type_; } void print() { std::cout << "I am the parent. a:" << a << std::endl; } }; class Children: public Parent { public: double b; double c; Children(double a_, double b_, double c_) : Parent(a_, Family::child_) { b = b_; c = c_; } void print() { std::cout << "I am the children. a:" << a << ", b:" << b << ", c:" << c << std::endl; } }; void class_inheritance_test() { std::deque<Parent> vec; vec.push_back(Parent(1.0)); vec.push_back(Parent(2.0)); vec.push_back(Children(10.0, 20.0, 30.0)); for (Parent &e : vec) if (e.type == Family::child_){ Children* ch = static_cast<Children*>(&e); ch->print(); } else { e.print(); } } The output of this piece of code is: I am the parent. a:1 I am the parent. a:2 I am the children. a:10, b:0, c:-1.30018e-231 Clearly, when I cast back the Children from its storage as a Parent, the properties defined in the Children class are lost. I see that the problem is either in the way I store the objects or in the way I cast them back to the class they are supposed to be. I would appreciate some guidance on how to store objects of multiple types in a vector and be able to use them back. The other examples I have seen do not include properties, and for my problem I must have properties. EDIT ------------------------------ For those in the future, the solution is to use shared_ptr: void class_inheritance_test() { std::deque<std::shared_ptr<Parent>> vec; vec.push_back(std::make_shared<Parent>(1.0)); vec.push_back(std::make_shared<Parent>(2.0)); vec.push_back(std::make_shared<Children>(10.0, 20.0, 30.0)); for (std::shared_ptr<Parent> e : vec) if (e->type == Family::child_){ std::shared_ptr<Children> ch = std::static_pointer_cast<Children>(e); ch->print(); } else { e->print(); } } The output is exactly what is expected: I am the parent. a:1 I am the parent. a:2 I am the children. a:10, b:20, c:30 | Someone mentioned it in the IRC as the slicing problem. |
There is even no wifi drop-down bar. Does anyone know how to fix this? $ lspci -knn | grep Net -A3; rfkill list 03:00.0 Ethernet controller [0200]: Broadcom Limited NetXtreme BCM57786 Gigabit Ethernet PCIe [14e4:16a3] (rev 10) Subsystem: Broadcom Limited NetXtreme BCM57786 Gigabit Ethernet PCIe [14e4:16b4] 03:00.1 SD Host controller [0805]: Broadcom Limited BCM57765/57785 SDXC/MMC Card Reader [14e4:16bc] (rev 10) Subsystem: Broadcom Limited BCM57765/57785 SDXC/MMC Card Reader [14e4:96bc] Kernel driver in use: sdhci-pci -- 04:00.0 Network controller [0280]: Broadcom Limited BCM4331 802.11a/b/g/n [14e4:4331] (rev 02) Subsystem: Apple Inc. AirPort Extreme [106b:00ef] Kernel driver in use: bcma-pci-bridge Kernel modules: bcma 0: hci0: Bluetooth Soft blocked: no Hard blocked: no | I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible. What are the steps to install Broadcom wireless drivers for a BCM43xx card? I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc. lspci -vnn | grep Network showed: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] iwconfig showed: lo no wireless extensions. eth0 no wireless extensions. NOTE: Answer below is updated every time new information is added and confirmed working. |
I'd like to solve the problem that denoted in the below picture. With which network could I try and start to solve this problem? | I am a sophomore student who's interested in deep learning and its method layering up some linear/non-linear operations and constructs up the complex function through the network. I'd like to comprise a network that finds the word upon the given explanations : e.g.1 input: a spherically shaped fruit which tastes sour and sweet and gets red when matured well output: apple e.g.2, input: to make up the boundary between multiple options for the base of one's behavior or decision output: determine. So basically it's a classification problem but the class might be more than 20,000. I'd like to name this task "rephrase neural network". Any good reference or starting point, or, any network recommendation for comprising this neural network? |
I want to protect my USB flash drive in general so these files and directories are readable but not copyable so no one can make a copy of these files in my USB flash drive. Is that possible? | I have customers who want to buy large amount of flash memories but he wants to copyright all files inside it. The flash will contain files that will be delivered for his customers but they're not allowed to copy or delete any of the files the only allowed permission is to ready the files. I searched and found many solutions but all have on function it WriteProtect the USB though I can't add files to Drive at all but I can delete or copy any file in the drive. Is there any way to protect the flash memory so I can't copy data out of it? |
How can I pan my camera around in a blender game? I want to be able to use camera controls in my blender game Like panning 360 around with the right mouse button. My view does not need to pan up or down, just needs to rotate around the view like to say I have a cube to represent my character! I want to be able to pan the view around it. | How can I zoom in and out using the mouse wheel in the BGE? And press the middle button to go move around the character? I want the camera to be parent to the character so that it will follow it. |
I have read that the electric energy flows from the battery into the circuit through electric field created outside the wires into the light bulb (or any other resistor). I have also read that the friction caused in the movement of electrons cause light bulb to heat up. So which is the correct explanation? | On a systems level, I understand that as electrons are pushed into a wire, there is a net field and a net electron velocity. And I've read that the net electron drift is slow. But electricity travels through the wire, essentially at c, and I want to understand that mechanism. My apologies if my question is poorly stated, I know bare bones undergraduate quantum theory circa 1990s but it doesn't explain the motion of electricity in detail. Here's my conception, I'm hoping someone will fill in the holes, ha ha. An electron moves into the wire. It's got a kinetic energy. After travelling a short distance, it spontaneously emits a photon, which hits another electron in a valence shell. That electron then presumably does the same. If this conception is simply wrong, please enlighten me. The questions that arise: Presumably at this level, electrons are acting more like waves and less like particles, but is there any classical component in the picture, ie are electrons coming in imparting other electrons with kinetic energy through repulsion, or does it not work that way? If electrons momentarily have energy, then pass it on by a photon, what determines when that photon is emitted, and what frequency it will be? I assume that electrons in this cloud are not limited by any kind of exclusion principal, and that any frequencies are possible? Why should a photon emitted by an electron be in the direction of travel? Conservation of momentum tells me that if an electron is moving, the photon should be emitted in that direction, slowing the electron, but could an electron emit a photon in the opposite direction? If it did, I assume it would somehow have had to absorb energy from elsewhere? That sounds possible by analogy with quantum tunneling. What is the mechanism by which electrons propagating increase the temperature of the material? Are they transmitting energy to the electrons in the valence shell, which tug at the nucleus, do some photons hit the nuclei directly, or is there some other way? Presumably, electricity travels slower than light, because there is some time in each exchange, and some time when electrons are moving at sublight speeds before emitting a photon. By how much is this slower than light, and what is the speed of each interaction? |
I wanted to make a table with the text centered in every box of the table, both horizontally and vertically. This is my code: \renewcommand{\arraystretch}{1.5} \begin{center} \begin{tabular}{ |>{\centering}p{0.5cm}|>{\centering}p{0.5cm}|>{\centering}p{0.5cm}|p{0.5cm}| } \hline A & B & C & $\varphi$ \\ \hline \end{tabular} \end{center} and this is the result: (I removed the other 8 lines of the code, because they were basically the same) And now the thing is, the fourth column isn't centered and when I put >{\centering} before p{0.5cm}, exactly how I did on the first 3 columns, Tex would give me Any ideas how to fix this? Thanks. | I have a document that uses both the longtable and the array package. At first I ascribed the problem to an interaction of both. After testing, it seems array is the only culprit. Here's a minimal example. \documentclass{article} \usepackage{array} \begin{document} \begin{tabular}{p{0.4\textwidth}>{\raggedright}p{0.4\textwidth}} 1 & a \\ 2 & b \\ 3 & c \\ \end{tabular} \end{document} It produces the error ! Extra alignment tab has been changed to \cr. |
We want to setup a "small" server for on of our offices (8 Client Computers, local Domain not linked). We need to have an Exchange Server. Unfortunately we cannot use SBS since its support is running out. We already do have a Windows Server 2012 R2 Essentials Licence and an Exchange Server 2013 Licence (+CALs). As Exchange does not run on Essentials (thanks Microsoft for that!) we need to run a Standard Licence. My Setup would be the following: Host Machine Windows Server 2012 R2 Standard with Hyper-V on it 1 Virtual Machine Running Windows Server 2012 R2 Standard + Exchange Server 1 Virtual Machine Running Windows Server 2012 R2 Essentials (Domain Controller) As Microsoft does not recommend running the domain controller on the same instance as the Exchange Server and we do have less than 25 Clients i would go for that setup. Seems a bit over complicated but as far as i understand it follows Microsoft's recommendations. Do you have any recommendations concerning the hardware? Right now we have a Lenovo RD340 equipped with 8GB RAM, 1 SSD 128GB and 3*3TB HD in Raid 5. Maybe we should upgrade it to 16GB RAM, but as the Hyper-V can manage the required memory it could be enough right now. Where should we install the Guest VMs? On the SSD? | This is a about Related: I have a question regarding capacity planning. Can the Server Fault community please help with the following: What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application? |
I got that "The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path" error when I was moving documents across folders. I know there are ways to disable that file path length restriction, but those ways just did not work on my laptop. offers two solutions to get rid of the restriction, the second of which resorts to the use of Group Policy (dpedit.msc). As I am using a Windows 10 Home Edition, the second solution does not work. I tried to install dpedit.msc as instructed here (), but for some reason it did not work as demonstrated -- I downloaded that zipped folder and ran the extracted setup.exe file. Following the execution, however, I tried to access gpedit.msc command via RUN as well as START Menu search box, but my laptop failed to locate gpedit.msc. So I tried the first solution. I looked up regedit and followed everything and changed the value date from 0 to 1. It still did not work, even after I logged off, restarted the computer, and logged back in. This is giving me so much headache, so I appreciate it if someone can shed some light as to what led to the foregoing issues and how to get rid of the file path restriction. P.S. I am a tech amateur, so any walk-through or explanation in layman terms would best help, thanks! | For some time, Microsoft has supported an option to remove the limit of 260 symbols for NTFS file name length. The web is full of articles, describing what should be done. Hit the Windows key, type gpedit.msc and press Enter. Navigate to Local Computer Policy > Computer Configuration > Administrative Templates > System > Filesystem > NTFS. Double click the Enable NTFS long paths option and enable it. However, I don't have such option. Please see the screenshot below: Am I missing some Windows update, or is it something else? |
I cannot get the Parse Path tool to pass each file name to the next tool. In the example shown, the Raster to Ascii tool will take the first entry in the 'filename' variable list as part of the output name. But when it runs the next iteration, the Raster to Ascii tool uses some generic file naming convention. 'filename' is set as a precondition for the R2A tool. Example: raster1.tif raster2.tif Run the Model in Batch mode, using tifs as parameters. 1st output = raster1_asc.txt 2nd output = RastTo_rast.txt <--- this is wrong. Summary: Raster to Ascii tool sucessfully uses the filename variable as inline variable as part of the output file name. However, the the Raster to Ascii tool uses a generic naming convention for the following files (running Model as Batch). Does anyone have an insight as to why this is happening? | Am I correct that if my model has a model-only tool (Calculate Value), and then I run the model as a batched process, it will not run the Calculate Value expression? I wrote a model to upload, define, project (and clip) XY data from excel files. I had thought to use iterate tables, but it wasn't working. (I assume due to having to choose which worksheet within xlxs). So I thought to do a batch, but this seems to leave that annoying $ that arc appends to table names (and is an invalid character in most tools...) My guess is that the Calculate value that removes my $ is not being run in the batch. Ideas? Confirmations? |
I have Ubuntu 16.04 on my PC. I'm having problems playing hotstar videos on firefox. I installed flashplayer using: sudo apt-get install flashplugin-in But it didn't help. | I have Ubuntu 16.04 LTS installed on my PC. I have a problem playing videos on google chrome. Version of google chrome: 51.0.2704.63 (64-bit). All other videos of youtube are playing normally in google chrome. I even tried playing the videos on Firefox but the same problem persists. Can anyone help me with the same ? |
I am trying to increase the radius for a bezier curve. What I have tried: Edit Mode-> Radius, this increases and decreases the lines (I think animation lines) but the radius remains the same. Scale: this increases and decreases the object without changing the radius. I cant find a way to do this. In my viewport I have BezierCurve. Not a bevel. How can I increase the radius of this? | Is there a way to scale up the bevel object on one end of a curve, a little bit over each point? I notice the vertex "weight" slider will tweak how much influence each vertex has on the others, is there something like this that can scale the bevel object up a little bit? Preferably with the option to constrain X,Y,Z independently |
I have to show that $$ \bigcup_{n=1}^{\infty}A_{n} := (a: \exists n \in \mathbb{N}: a \in A_{n}) $$ EDIT: So beneath this edit were just my thoughts. Above is the task. Is there any elementary way to prove that this Union of countable sets is countable? (besides counting like $\mathbb Q$) As far as I understand countability, I have to show that the union is a bijection to $\mathbb{N}$. $$ f: \bigcup_{n=1}^{\infty}A_{n} \to \mathbb{N} $$ Well, surjection is given by definition above, isn't it? Now I only have to show injection. So if $f(a)=f(b)$ then $a=b$. How do I show that for the union? | How do you prove that any collection of sets $\{X_n : n \in \mathbb{N}\}$ such that for every $n \in \mathbb{N}$ the set $X_n$ is equinumerous to the set of natural numbers, then the union of all these sets, $\bigcup_{i\in \mathbb{N}}$ $X_i$ is also equinumerous to the set of natural numbers? (By equinumerous I mean there exists a one-to-one and onto function $f:X_n \to \mathbb{N}$.) Is this statement false as it stands? |
I want to have arrowhead caps on the end of a stroke in illustrator (so similar to the rounded caps, but with an arrowhead that fits perfectly to the edge of the stroke) I can sort of achieve this using actual an arrowhead, but it doesn't look perfect. Here's what I've got so far: EDIT: I've also tried messing with the stroke's Variable Width Profile - there appears to be a profile that is exactly what I'm after, however, the "caps" scale depending on the width of the stroke. I need the arrowheads of the stroke to be exactly at a 45° angle. | First post here! What I'm trying to accomplish looks fairly simple but so far I've had no luck in finding a way to accomplish it. Essentially I want to create custom stroke caps (or strke profiles if necessary) that will allow me to create strokes with a shallow rounded end or an angled end as shown below Is this even possible? If so, how would I go about making this happen? I am working on a typeface where these two shapes will be common, and I prefer to work with pure strokes first, so if I can accomplish this it would be great. Thanks in advance for any tips! |
I have a table duplicate which shows datas as: select * from ot.duplicate; I wanted to delete the duplicate data from the table where I tried: delete from (select * from(select * from ot.duplicate a union select * from ot.duplicate b) t1); But I am getting error: ORA-01752: cannot delete from view without exactly one key-preserved table | I'm testing something in Oracle and populated a table with some sample data, but in the process I accidentally loaded duplicate records, so now I can't create a primary key using some of the columns. How can I delete all duplicate rows and leave only one of them? |
BBEG casts a spell, I counterspell, and the mob has a chance to counterspell my counterspell under normal circumstances, leading to a wasted slot and some hurt from the incoming spell. If however I cast counterspell with subtle metamagic, am I right in thinking that this counterspell itself cannot be counterspelled as there is no way to identify that i'm casting this spell? Subtle casting: "When you cast a spell, you can spend 1 sorcery point to cast it without any somatic or verbal components." | Counterspell 1 reaction, which you take when you see a creature within 60 feet of you casting a spell. Can I Counterspell a creature that completely eliminates component requirement? Subtle Spell When you cast a spell, you can spend 1 sorcery point to cast it without any somatic or verbal components. If the spell is subtle then can I see it’s being cast in order to counterspell it? |
My 3 years old kid plays games and visits YouTube for kids app on the mobile phone frequently. After some time some effort must be made to remove it from her. It seems like she is addicted to the phone. Apart from the personal experience, people around me also complain that using phone to play games and watch videos affects kids' mental health. What are the mental consequences using a mobile phone or tab to teach kids using video games or YouTube videos? | Somehow, my wife and I have made it through 27 months of virtually no screen time for our daughter. We thought we were doing what's best for her, but we're starting to fear it's going to come back and bite us. To elaborate... My question is spurred by the fact that recently I let her use my phone on a video chat with Grandma and I had it locked completely down so she couldn't do anything. This was the first time we had tried this, and after the call ended she carried my phone around for a half an hour refusing to part with it. When I finally insisted on getting it back, it was the ultimate meltdown of her young life. Both my wife and I were stunned. It was not her first video chat, but the first chat where she got to hold the device solely herself. She could not manipulate the phone so to speak as all the controls were off, including the touchscreen. She sees her parents, other adults, and some kids with electronics that she is not allowed to see or hold, though she desperately wants to. By keeping screens from her so stringently, is she more likely to be obsessed with screen time later? Would she be better off now if they had been a small part of her daily life from the get go? |
I want to update blender to the latest version, 2.77, I'm currently using 2.75, and I know you can update blender by reinstalling the program, but my only concern is that would my files be imported into the next version. And if not, how would I do so? | If I uninstall the old version I have, then download the new version, will my I still be able to open my old project files, or will I lose anything in them like models, rigs, textures etc. I have a ton of blend files and really don't want to lose them! I hope you can help!!! |
I must create unique keys for certain objects I create (needed for React key prop), where key can be any random string or number, but has to be truly unique for each time it's generated in program lifetime. I tried to use new Date().getTime() as key, but encountered problem where multiple objects got assigned the same key when creating them in loop. Is there a function which returns something purely unique each call as long as the program is running, or do I have to implement my own counter? | I'm trying to create globally-unique identifiers in JavaScript. I'm not sure what routines are available on all browsers, how "random" and seeded the built-in random number generator is, etc. The GUID / UUID should be at least 32 characters and should stay in the ASCII range to avoid trouble when passing them around. |
I have a MacBook Pro 2017 13" with High Sierra. Is it possible to somehow successfully connect a 27" Cinema Display with Mini DisplayPort to my MBP with an adapter? I have read from some people that it worked and from some others that it didn't work. Can you guys tell if it is possible? Because I have the opportunity to get a 27" Cinema Display for quite a cheap price (but only tomorrow because the person is there for a visit tomorrow). Would be kinda sad if I would purchase a Monitor for 460 Euros just to find out, that these two devices are not compatible and probably never will be in the near future because there is and will not be a working adapter for this specific case.. | I've seen many of the solutions on the topic, all posted in this site. But I haven't seen any of them mentioning Apple's adapter, I have that, which was used to connect to my old MacBook Pro 2013. Now, I'm assuming that all I need is to connect the Mini DisplayPort to an adapter, such as (as mentioned in one of the posts) and the USB cable to a USB-C adaptor. Is this correct? |
I am currently starting my second year of PhD study in mathematics at an institution ranked 70-80 in math in the US. In my first year, I have taken some courses in probability theory and passed two of three qualifying exams. After taking the probability courses and since my girlfriend is pursuing a master in statistics. I found myself really interested in statistics, is it wise to get another PhD in statistics after finishing PhD in math, or should I try to apply for a PhD in statistics now? Is it possible for me to get admitted to an good institution(ranked 30-40 in US) with only some backgrounds in math? | I am studying a combined bachelor of engineering (electrical) and bachelor of mathematics; I just started this year and will graduate in 2018. The reason why I am doing double degrees and not a single degree is because I love both electrical engineering and mathematics and I could not ignore any of them. So with this in mind, I am thinking of doing two PhDs when I graduate (one in electrical engineering and one in mathematics). Is this a good path or I should concentrate on only one of them? |
I'm using the .NET System.Windows.Forms.DataVisualization.Charting types and want to assign a MarkerStyle to each Series I create preferably skipping MarkerStyle.None, but getting the next one each time and cycling around to the beginning again. private MarkerStyle markers = new MarkerStyle(); public Series CreateSeries(string name) { var s = chart1.Series.Add(name); s.ChartType = SeriesChartType.Point; s.MarkerSize = 7; s.MarkerStyle = Cycle(markers ,MarkerStyle.None); // get next marker style s.XValueType = ChartValueType.DateTime; return s; } I tried variations of the following code I found, all of which don't compile: public static IEnumerable<T>Cycle<T>(IEnumerable<T> iterable,<T> skip) { while (true) { foreach (T t in iterable) { if(t == skip) continue; yield return t; } } } Gives error CS0411. The type arguments for method 'MyClass.Cycle(System.Collections.Generic.IEnumerable)' cannot be inferred from the usage. Try specifying the type arguments explicitly. Although I have a specific use it would be nice for a generic answer. Edit: Having looked at the code above more closely and I see it was never going to work outside a foreach loop. Ho hum. Time to write a hack: private int _markerIter = 0; private readonly int _markerCount = Enum.GetValues(typeof(MarkerStyle)).Length; public MarkerStyle Cycle() { if (_markerIter + 1 == _markerCount) { _markerIter = 1; //skips MarkerStyle.None which is == 0 } else { _markerIter++; } return (MarkerStyle) _markerIter; } | How can you enumerate an enum in C#? E.g. the following code does not compile: public enum Suit { Spades, Hearts, Clubs, Diamonds } public void EnumerateAllSuitsDemoMethod() { foreach (Suit suit in Suit) { DoSomething(suit); } } And it gives the following compile-time error: 'Suit' is a 'type' but is used like a 'variable' It fails on the Suit keyword, the second one. |
Is there any simple reason? Why is spinning so common? | The origin of spin is some what a puzzle to me, everything spin from galaxies to planets to weather to electrons. Where has all the angular momentum come from? Why is it so natural? I was also thinking do photons spin? we always think of the wave as a standard 2d sin wave but could this rotate in 3d? What implications would this have? And what about spacetime how does all the spinning effect? This has always been avoided in all lectures and classes I ever went to. |
When I use "cd" command to move to certain directory in terminal, I press Tab button to autocomplete the directory name, and a "/" sign appends at the end. But, when I use some other command (say "mv"), clicking on Tab button to autocomplete the directory name, autocompletes the directory name, but does not append "/" after it, but a space. So, I have to manually delete the space by pressing Backspace button and type "/". But, in my friend's laptop, it does not occur. Whichever command he uses, he always gets "/" after presing Tab button to autocomplete the directory name. Please tell how to solve this problem. I have freshly installed 12.04 LTS version. See the screenshot here: | There's something odd about my autocomplete in the gnome terminal. I used to be able to type cp Downtab to get cp Downloads/, and then type Jettab to end up with cp Downloads/Jet\ Pack\ Instructions.pdf But now, when I have cp Down typed and hit tab, I get cp Downloads with a space afterwards. And if I backspace that and make it say cp Downloads/Jet and hit tab, I get cp Downloads/Jet Pack Instructions.pdf without the backslashes. It wasn't like this before. How do I fix this? EDIT: There's a problem with my /etc/bash_completion file, it seems. Just not sure what. |
I found this old desktop computer in our attic and it seems that its hardware is still in good condition. It is running a Windows XP and I wish to change its OS. I searched the web and found about Ubuntu OS. How can I install this free OS to that old PC? Can I install it through DVD/CD? | I would like to see a full how-to guide on how to install Ubuntu. |
In blender 2.74 I can add a circle in object mode and change the number of sides, but in 2.75 I can't. I have to add the circle,enter edit mode and delete it, add it again and then i can edit. I add objects every second, I feel like I waste a lot of time. Is there a way to go back to the old behaviour?. | Sometimes when adding an object to the scene I see that all options (on toolbar or in window after pressing F6) are disabled. Can anyone tell me when can this happen? What is causing it and how to revert it - make it enabled again. It worked for me when I restarted Blender and reloaded the scene. However I would really like to know what can cause it? |
I edited yesterday, and added the tag . However, I happened to come upon the same question today and noticed that this tag is missing. I tried to edit the post to add the tag but received the message Nothing appears to have changed. Is this a bug? | I've tried at least 4 times on to add the tag css-columns, but each time after I save it disappears. When I type it in the tag box, it shows up and even has a tag wiki associated with it, but it will not stick when I save. |
I usually keep my homemade breads for a day or two in a ziplock bag. I recently felt like buying a good-looking bread box/tin to not use plastic bags that often (I keep the bags for as long as possible unless used for something like cinnamon rolls) and a bread box looks good on the breakfast table. I was reading some reviews that people complained about their bread going moldy in the box although it was a pretty fancy/expensive one. Since I wouldn't spend money on something useless which takes some space in my small kitchen, I'd like to make sure it is a good buy. I also read on plastic bags keeping the bread fresh for a few days and ask myself whether I should keep using ziplock bags. Also, there different types of them, | In the context of boiling water for pasta or other purposes, all over the Internet the advise is oft-repeated that salt should not be added to the water when it is cold in order to prevent damage to the pot such as pitting over long term use. The reasoning is that the salt stays on the bottom of the pot for longer without dissolving, and has a chance to interact with the surface metal. Is there any objective evidence--preferably scientifically based--that this phenomenon actually occurs in practical kitchen-type conditions, or is this another piece of common wisdom that is often shared but not backed by evidence, much like common wisdom that it is necessary to use very large volumes of water to cook pasta? |
I came across a theorem used to calculate residues of rational functions that states that if f and g are analytic functions at $z_k$ and $g'(z_k)$ isn't 0, then the residue of $f(z)/g(z)$ at $z_k$ is $f(z_k)/g'(z_k)$. I want to prove this using Laurent series (taking out the coefficient of $(z-z_k)^-1$) but I can't get around the algebra of actually dividing the two Laurent series. Can someone guide me through this? | Let be $f,g$ functions analytic in $z_0$, with $z_0$ a zero of order one of $g$ and $f(z_{0})\neq 0$. Show that $$ \operatorname{Res}\Bigl(\frac{f}{g},z_0\Bigr)=\frac{f(z_{0})}{g'(z_{0})} $$ My attemp... If $z_{0}$ is a zero of order one of $g$, then $g(z)=(z-z_{0})h(z)$, with $h(z)$ analytic and $h(z_{0})\neq 0$, then by analyticity of $g$ and $h$: $g'(z)=h(z)+(z-z_{0})h'(z)$. So, $$ \frac{f(z_{0})}{g'(z_{0})}=\frac{f(z_{0})}{h(z_{0})+0}=\lim_{z\to z_{0}}{(z-z_{0})\frac{f(z)}{g(z)}} $$ But in the ultimate point I'm not sure |
I am on Minecraft pocket edition version 1.2.10.1, and am trying to use the following command: /give @p stone_pickaxe 1 0 {display:{Name:"The Stone Breaker"},Unbreakable:"1"} When trying to use this command, it returns Line 1 Column 2 Missing '}' or object member name. Could someone point out what is wrong with my command? | This question was recently split into different questions for each workaround. See meta posts for more information. Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s} |
On SO, after paging through X number of pages using the pagination menu, then viewing a question...Hitting the back button returns to the initial page listing of questions but back to page 1 - is this a known bug? By design? | Go to the list of questions (any tab) Click on page X (other than the first) Select a question Click the browser's back button You will now be back on page 1 of the list, instead of page X (which would be the expected behavior). Apparently, this only happens for question lists on StackOverflow. The back button works as expected for user lists and tag lists, as well as for question lists on other SE sites. I'm guessing this bug happens because switching pages in SO's question list is done through dynamic in-place updates rather than actual links. My browser is Chrome version 47. |
board_1 = [[0]*4]*4 board_2 = [[0,0,0,0], [0,0,0,0], [0,0,0,0], [0,0,0,0]] both the above methods yield the following list. [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] but when we replace an element(3,3) in those list we get different result board_1[3][3] = 1 this will yield [[0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1], [0, 0, 0, 1]] whereas, the below will get the correct output board_2[3][3] = 1 [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 1]] why we get two different result? | 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? |
Is there any biological basis for excluding outliers in a dataset of blood cytokine levels (e.g. values outside 3 standard deviations from the mean for each cytokine) as measured by multiplex technology? How may I distinguish values reflecting the potential heterogeneity of my sample cohort from real outliers (e.g. measurement or coding errors)? | Following my question , I am wondering if there are strong views for or against the use of standard deviation to detect outliers (e.g. any datapoint that is more than 2 standard deviation is an outlier). I know this is dependent on the context of the study, for instance a data point, 48kg, will certainly be an outlier in a study of babies' weight but not in a study of adults' weight. Outliers are the result of a number of factors such as data entry mistakes. In my case, these processes are robust. I guess the question I am asking is: Is using standard deviation a sound method for detecting outliers? |
Using WMS I do a GetCapabilities request on a GeoServer instance. This works in FireFox, but not in Chrome, Safari, and Internet Explorer. The point is that in the web.xml from the server I did add: "Access-Control-Allow-Origin: *" So the XML output does not have anything which will put the Access-Control-Allow-Origin header in. And the case is that in any other request this not an issue, especially when I use jsonp in the jquery AJAX call. However I didn't find any way to get the Capabilities in a JSON object. In other words I am stuck with XML and this doesn't seem to work. Is there a way to do the request on jsonp? If not how do I set-up the server so that the GetCapabilities XML does use the Access-Control-Allow-Origin? | I hope somebody has already figured this one out. I just installed Geoserver 2.9 on a vanilla Ubuntu 16.04 distro. The Geoserver 2.8 method of enabling CORS with the shanbe.hezoun class does no longer work with Jetty 9.2.13. There are mentions that CORS support is already packaged with Jetty 9.2.13 in the jetty-servlets.jar. The Jetty lib which is compiled with Geoserver contains a jetty-servlet-9.2.13.v20150730.jar in geoserver/lib but not jetty-servlets.9.2.13.v20150730.jar. Are these supposed to be the same jar with a different name? It should be possible to enable CORS either in geoserver/etc/webdefault.xml or in geoserver/webapps/geoserver/WEB-INF/web.xml. My understanding is that the webdefault.xml is applied first and the web.xml thereafter. I have tried following filter in both xml. I haven't got as far as adding a filter mapping. Adding the filter alone will cause the Geoserver/Jetty service to not start proper. <filter> <filter-name>cross-origin</filter-name> <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> </filter> |
I have two coordinates. Lat:53.307718 Long:-6.230189 Lat:53.307708 Long:-6.229988 . I then use the distance formula distance = SQRT((Y2-Y1)*(Y2-Y1) +(X2-X1)*(X2-X1)) . I put it points in. distance = SQRT((53.307708-53.307718)*(53.307708-53.307718) +(-6.229988--6.230189)*(-6.229988--6.230189)) and it get a value of 0.000201 What is the factor to convert that point to convert to meters? I but the two points into this website and found the distance to be 12.92 meters. But when i do it then for the next point the factor isnt the same. | I am trying to measure distances between points and writing the calculated measure between these points in the attribute table. The points represents a vehicle's location based on GPS data according to existence location in time aspect. I could add the longitude and latitude data from Excel to a shape layer. After creating shapefile, I could be able to measure the euclidean distances between the nodes, but if I will do the calculations manually, I might need to have immortal life. How can I calculate automatically the distances between the nodes and write the calculations in my table or Excel or CSV data. the distance will calculate according to the id's. I mean the first distance will be for FID 1 and 2; the second will be for 2-3, third 3-4 and etc. Please help me :) |
I don't want to clean /var/cache/apt/archives/, I need to stay my deb files there. Which apt option can works for me? | On a current (2018-06) Debian sid, installing .deb packages via apt-get or aptitude or synaptic caches the downloaded packages in /var/cache/apt/archives: # rm -f /var/cache/apt/archives/nano_* # aptitude install nano [...] # aptitude purge nano [...] # ls /var/cache/apt/archives/nano_* /var/cache/apt/archives/nano_2.9.7-1_amd64.deb Using the frontend apt does not cache the downloaded files anymore: # rm -f /var/cache/apt/archives/nano_* # apt install nano [...] # ls /var/cache/apt/archives/nano_* ls: cannot access '/var/cache/apt/archives/nano_*': No such file or directory So switching between two mutually exclusive sets of packages re-downloads everything. How can I change the settings of apt to keep the downloaded files? |
echo "hi,my,name,is" | sed 's/,/\n/g' >out.txt yields: hi my name is But in reverse: sed 's/\n/,/g' out.txt yields: hi my name is Why doesn't sed revert the operation with an inversion of the replace operation? | Is there an issue with sed and new line character? I have a file test.txt with the following contents aaaaa bbbbb ccccc ddddd The following does not work: sed -r -i 's/\n/,/g' test.txt I know that I can use tr for this but my question is why it seems not possible with sed. If this is a side effect of processing the file line by line I would be interested in why this happens. I think grep removes new lines. Does sed do the same? |
I have been installing and uninstalling modules on my site and I am starting to run into problems involving re installing previously disabled modules. The install script is finding old database tables from previous module installations and is refusing to install. For some of these modules, there is no 'uninstall' option. Is there a good way to determine which database table are associated with each module? I'm looking for a method of discovery or an online list. | Is there a module that lists which tables are created, owned or modified by a particular module? I need something that can show me what tables are created or modified by when new modules are installed. |
I have to state a few long numbers in a document. These aren't meant to be regarded as regular numbers but instead as data. So I don't want to format them with \num{<...>} but with \texttt{<...>} so they appear in typewriter font like code. They can't be approximated. The last digit of each one of these numbers is as important as the first one. Unfortunately, when these numbers appear at the end of a line, they sometimes exceed the lengths of the surrounding lines by quite a margin. Example: \documentclass{article} \begin{document} Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut sit amet ornare eros. Vivamus ac bibendum sapien. Morbi efficitur iaculis elit et pellentesque. Maecenas fermentum augue non tortor rutrum, vel malesuada nunc venenatis. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Integer fringilla. Suspendisse ac scelerisque tortor \texttt{1937294810383219482}. Pellentesque at iaculis risus. Curabitur porta ante non nunc eleifend, sit amet porta enim congue. Nullam semper fringilla suscipit. Nam ac elementum eros. Vivamus sed quam fringilla, tristique odio a, pretium lacus. \end{document} Can I tell LaTeX to just end the line early and continue in the next one? As it's not a URL, I probably shouldn't put the numbers in \url{<...>}. This as a solution that pops up quite often when googling the problem. I can't use either because these numbers can't be hyphenated. About half of them are actually negative numbers and I don't want the readers to be confused about how many numbers I mentioned and which of the digit blocks belong to the same number. | Possible Duplicate: I'm writing a report (in LaTeX) in cryptology and I have to work with very large numbers. I want those big numbers to be on multi-lines, I mean when I write my big number, and after compiling, LaTeX puts this big number on a single line, but we can only read the beginning of this number. How to print the big number on multi-lines automatically ? Is there a tag to use or something else? Thanks |
I am using beamer and TikZ and would like to change the color and thickness of an edge in the second slide of the same frame. Here is what I tried: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes,shapes.geometric,arrows,fit,calc,positioning,automata} \begin{document} \frame{ \newcommand*\properties{} \only<2>{\renewcommand*{\properties}{orange, ultra thick}} \begin{figure} \begin{tikzpicture}[node distance = 1.5cm, scale=0.8] \node (1) {1}; \node[right = of 1] (2) {2}; \path[->] (1) edge[\properties] (2); \end{tikzpicture} \end{figure} } \end{document} The strange thing is that when I put only orange or only ultra thick in the definition of \properties, everything works as expected. In addition, if I just put orange, ultra thick together in the bracket that follows edge, it is still fine (and of course in this case the edge has the same look on both slides). But when I have both of them there, an error occurs: Package pgfkeys Error: I do not know the key '/tikz/orange, ultra thick' and I am going to ignore it. Perhaps you misspelled it. May I know why this is the case? How should I correct it to achieve the desired result (i.e., the edge turning both orange and thicker on the second slide)? Thank you! | I have a matrix initialized with some colors and no values. With the help of beamer's overlays I wanted to modify the matrix in the next step, changing some of the colors and inserting some values. I attach a figure, so you can get a clear picture of what I want to achieve (on the top you have the empty matrix, and on the bottom the matrix after it has been filled in): I have tried to overwrite the whole matrix with a new one, but that has several problems: Text like "Some label" gets overwritten and looks thicker in the second slide. If I need to do N steps, instead of just 2, rewriting the whole matrix every time is really tedious. I know I am not really aware of all the possibilities in TikZ and Beamer, so there might something there that I am missing, and that would allow me to do what I want. Does anyone know what can I do in order to update the matrix nodes between the overlay steps? |
In my HTML FORMs, when I focus certain text fields they list down history of values entered previously. Is it possible to avoid this auto-drop-down? I am not looking for some browser settings tips for my computer, instead, I want these settings for all of the users of my website filling a form. Will it also be possible to apply these settings for some selected text fields only? as historical values for some text fields may be helpful for a particular user using his/her machine. May be this could be achieved using Javascript, but no clue where to start from. Thanks for your help. PS: I am using PHP and Javascript (JQuery). | How do you disable autocomplete in the major browsers for a specific input (or form field)? |
Thank you in advance and support that provides this website for the tex users. I am a new member of the tex society almost a year now and I can say that most of my answers related to my problems have been answered previously here. Your work is really impressing taken in consideration that people are sharing knowledge for free. Recently I came across with a problem that I think it is a bug of the system. I was trying to create a beamer presentation and by using \usepackage{subcaption} and \begin{subfigure} environment. While I was trying to use the \label and \ref points to my subfigure(s) I noticed that only the first \label was operating correctly as 1a. Unfortunately the rest are coming up as ??. I assume this is because the \ref points are located before the \label, but in this case all of them should not be operating correctly all should fail. I was not able to find an answer relative to my question no matter how much I searched for. Maybe it is a bug of the system. I was just hopping that you could provide more information and maybe a solution to overcome this problem. More information and the testing code can be found here: . \documentclass[xcolor=pdftex,dvipsnames,table]{beamer} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{cleveref} \usepackage{caption} \usepackage{subcaption} \mode<presentation> \setbeamertemplate{caption}[numbered] \begin{document} \begin{frame} \begin{columns}[t] \begin{column}[T]{5cm} \begin{itemize} \item<+-| alert@+> 1~\autoref{1} \item<+-| alert@+> 2~\autoref{2} etc \end{itemize} \end{column} \begin{column}[T]{5cm} \begin{figure} \only<1>{\begin{subfigure}[b]{1.0\linewidth} \caption{sub caption 1} \label{1} \includegraphics[width=7.0cm,height=5cm]{fig 1} \end{subfigure} } \only<2>{\begin{subfigure}[b]{1.0\linewidth} \caption{sub caption 2} \label{2} \includegraphics[width=5.5cm,height=5cm]{fig 2} \end{subfigure} } \caption{main} \protect\label{3} \end{figure} \end{column} \end{columns} \end{frame} \end{document} | I have tried several approaches to solve my problem but unfortunately none successful yet. I can not find documentation mentioning how to solve this particular case. My problem is that I am using a subfigure in beamer and I am trying to create multiple \ref points before the \label appear in the same figure. When compiling the .tex document only one reference point appears and the rest are appearing as ??. Is there any possible solution to my problem? EDIT: The code I'm using \documentclass[xcolor=pdftex,dvipsnames,table]{beamer} \usepackage[english]{babel} \usepackage{hyperref} \usepackage{cleveref} \usepackage{caption} \usepackage{subcaption} \mode<presentation> \setbeamertemplate{caption}[numbered] \begin{document} \begin{frame} \begin{columns}[t] \begin{column}[T]{5cm} \begin{itemize} \item<+-| alert@+> 1~\autoref{1} \item<+-| alert@+> 2~\autoref{2} etc \end{itemize} \end{column} \begin{column}[T]{5cm} \begin{figure} \only<1>{\begin{subfigure}[b]{1.0\linewidth} \caption{sub caption 1} \label{1} \includegraphics[width=7.0cm,height=5cm]{fig 1} \end{subfigure} } \only<2>{\begin{subfigure}[b]{1.0\linewidth} \caption{sub caption 2} \label{2} \includegraphics[width=5.5cm,height=5cm]{fig 2} \end{subfigure} } \caption{main} \protect\label{3} \end{figure} \end{column} \end{columns} \end{frame} \end{document} |
I really want to install Skype on Ubuntu 16.04 but i don't know how I've tried this: , but it didn't work; I get a message saying it can't locate the Skype package. I have also installed the .deb from the official Skype site but that didn't work either; in the software store it said installing and went back to install. When I do this: sudo apt update && sudo apt install skype It just says it's installing and then ends up with this: E: Unable to locate package skype | I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me? |
I have Ubuntu 18.04 (Bionic) installed on 1 partition (ext 4) using whole disk. I want to downsize it with GParted running from live USB, but after resizing, 18.04 does not boot, showing lots of errors. I was able to try several times, because I have an ISO image of the system and I recreate it after with Clonezilla. What should I do? | I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back? |
Let $R$ be a ring and $I$ the set of non-invertible elements of $R$. If $(I,+)$ is an additive subgroup of $(R,+)$, then show that $I$ is an ideal of $R$ and so $R$ is local. $$$$ I have done the following: Since $(I,+)$ is an additive subgroup of $(R,+)$, we have that $\forall a,b \in I$ : $ab\in I$. But how can we show that it holds that $ax\in I, \forall a\in I, \forall x\in R$ ? | Problem is this: Suppose for any element $r$ in a ring $R$ with unity $1$, $r$ or $1-r$ is invertible. Then show that non-invertible elements form an ideal of $R$. It is crystal clear that $-r$ is non-invertible if $r$ is. So I tried to show the sum of two non-invertible elements is non-invertible, and the product of non-invertible elements with any ring element is non-invertible but I'm stuck. Any help will be appreciated. |
Please help me to install Ubuntu 13.04 in a dual boot setup with Windows 8 on my Sony Vaio E Series SVE14125CNB laptop. When I try to install Ubuntu, after the installation is finished, the system gives me a message that says: operating system missing. Then I changed the BIOS setting as normal, and it only boots Windows 8. | 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? |
So I recently bought a blender animation course from bloop animation and it covered the very basics. I know the principles of animation and the basics of 3D bone animation, what I'm looking for is tips and tricks on how to improve my work/get character movements to look more realistic/rigging tricks to make animation easier, etc. Right now, my animations look very robotic, my keyframes get messy and weird things start to happen, and trying to get my character to move through an environment is very clunky, I was looking for recourses on learning after learning the basics other than trial and error. Because I am having quite the time (A bad time) learning through trial and error. Thanks in advanced for any help! | Since asking for tutorials, videos, resources, links to other content or downloads is considered off topic here, this is a specifically created Community Wiki which gathers resources for Blender and it has been approved by the . Just write in the appropriate answer/section. If you have concerns, questions, post a question, so we don't clutter the comments, but you can link your meta question from the comments. Questions regarding such resources are not allowed anymore, except for very specific and on topic requests (ask on if you're unsure about your question). Follow the instructions made in the question about how to post, what can be posted, etc. Learning Assets (also see: ) Reference Images/Blueprints (also see: ) Tools (also see: ) Other Special Interest () Also see the . |
These two methods seem to be extensively used inside linux kernel code. I know the foundations of branch prediction, but I would like to know how these two functions affect the operation of if() statements. Also do they work at the level of CPU instruction pipeline? or is it at a much higher level of abstraction at kernel code level? Being a starter to linux kernel I would be deeply interested in knowing the internal workings of these two methods. Thanks! | I've been digging through some parts of the Linux kernel, and found calls like this: if (unlikely(fd < 0)) { /* Do something */ } or if (likely(!err)) { /* Do something */ } I've found the definition of them: #define likely(x) __builtin_expect((x),1) #define unlikely(x) __builtin_expect((x),0) I know that they are for optimization, but how do they work? And how much performance/size decrease can be expected from using them? And is it worth the hassle (and losing the portability probably) at least in bottleneck code (in userspace, of course). |
Hi everyone i have a question regarding recording mobile device usability testing sessions. do you suggest any external device i can attache to the camera to record the test? if you familiar with mobile usability testing recording , what is your methodology or process ? what kind of device are you using to run the test? can you share some useful articles or links on the internet? Regards, | I'm trying to figure out how to conduct a usability test upon a handset device (smartphone). it seems there aren't many methods for screen video capturing of a user making use of an app. Do you know of such methods? or alternatively how to conduct such usability test? |
An advertisement: The Howard Neverov Creative Writing Awards, sponsored by Washington University in St. Louis. Open to high school juniors and seniors 3 prizes of $250 each both in fiction and in poetry. Students may send one typed entry in each genre. Entries must be postmarked by March 15, 2009... Please, answer the questions: 1. Who are high school juniors and seniors in US? 2. What did they mean writing "one typed entry in each genre"? 3. What are "Entries" in that context? 4. What is "to be postmarked"? | Today, I've heard my lecturer who turned to us by the word: "sophomores". This the is the first time that I was exposed to this word in the meaning of "student of 2nd year". My question if there are other names for the 1st, 3rd, 4th, 5th etc. and if all these appellations are common in use? |
In Cause and Effect (S5:E18), Picard's Captain's Log states they are charting the Typhon Expanse and the Enterprise-D is "the first Starfleet vessel to chart this unexplored region". This implies it's in one of the more remote regions of Federation space or even outside of the Federation in "International Space" or extremely difficult to navigate to. Yet the Bozeman was there in the Typhon Expanse but 80-90 years prior to the 24th century. Further, they were only 3 weeks away from their starbase. This is right next door to the Expanse in galactic terms. It seems unlikely in the span of 100 years or however long that starbase has been operational that Starfleet hadn't gone as far as 3 weeks away. (This assumes it took the Bozeman the full 3 weeks to get to the TE and they just got there.) How can the USS Bozeman be in the Thyphon Expanse when Picard says the Enterprise-D is "the first Starfleet vessel to chart this unexplored region"? | In the TNG episode "", we are treated to the following line of dialogue...three times. "Captain's Log, Stardate 45652.1. The Enterprise has entered an area of space known as the Typhon Expanse. We are the first Starfleet vessel to chart this unexplored region." This strongly suggests that no Starfleet ship has ever actually been into this part of space. Yet the very end of the episode shows that a Starfleet ship WAS in this section of space, Specifically the USS Bozeman, years ago. Proven when it emerged from a temporal loop just in front of the Enterprise. How do we account for this inconsistency - saying that the Typhon Expanse has never been charted, and yet there clearly being a federation ship already in the Typhon Expanse? |
I was attempting to install Ubuntu 18.04.3 LTS for the very first time without help from a tutorial and I managed to somehow install Ubuntu on my intel optane memory instead of my hard drive. When I look at the disks, my hard drive "Acer" comes up as a removable drive - when it is a hard drive installed into the laptop. I am wondering if it is possible to change my file-system location to my internal hard drive as my optane memory is only a small capacity. | Does Ubuntu 17.10.1 with Linux 4.13 kernel support the Intel Optane Memory for the purpose of dual booting with Windows 10? states that Linux is not supported and only Windows 10 64-bit is. |
Given probability density function $$p(x|\phi)=\begin{cases}\dfrac{\phi}{x^2}&\phi<x<\infty\\0&\text{others}\end{cases}.$$ I want to find an estimation for the $\phi$ parameter with the maximum likelihood estimator. First, I find the likelihood function as below $$L(\phi)=\dfrac{\phi}{{x_1}^2}\dfrac{\phi}{{x_2}^2}\ldots\dfrac{\phi}{{x_n}^2}=\dfrac{\phi^n}{\prod\limits_{i=1}^n{x_i}^2}.$$ Then I determine the log likelihood $\ln L(\phi)$, $$\ln L(\phi)=n\ln \phi-2\ln\prod\limits_{i=1}^n{x_i}.$$ Now, I try to find the maximum of the log likelihood, $$\dfrac{d}{d\phi} \ln L(\phi)=\dfrac{n}{\phi}=0.$$ Then I have $n=0$. Problem: I can't find the $\hat\phi$. How to find the parameter estimation of $\phi$ using maximum likelihood estimator? Please help me. Thanks before. | I am trying to get the maximum likelihood estimate for the parameter $p$. The distribution is the following: $$ f(x\mid p) = \begin{cases} \frac{p}{x^2} &\text{for} \ p\leq x < \infty \ \\ 0 &\text{if not} \end{cases} $$ The sample has size $n$. The problem is, when I try to estimate it by the procedure I know, I would have to estimate the likelihood function and obtain the derivative of the log-likelihood. We'd have: $$ L(p; x) = \frac{p^n}{\prod_{i=1}^{n} x^2_i}$$ $$ \ln L(p;x) = n \ln(p) - \sum_{i=1}^{n} \ln(x_i^2) $$ For the derivative: $$ l'(p;x) = \frac{n}{p} = 0$$ And I am stuck because it has no solution for $p$. How do I evaluate this? Thanks! EDIT: So in this case I can use the indicator variable to write: $$ L(p;x) = \frac{p^n}{\prod_{i=1}^{n}x_i^2} I_{(x_i \geq p)}$$ for $i = 1,2, \ldots n$ in the indicator variable. So the "closest" non-null value of $x \in X$ to $p$ is $min(X_1, \ldots X_n)$. Is that the point? |
Hi so I am a beginner and im modeling an anvil. When I go to face selection mode there's this random dot (shown in picture 1) and when i use subsurf it connects to that dot (shown in picture 2). Please help me Edit: I cant select the dot. Thanks Matt | I'm following . After using Boolean I cleaned up the extra vertices. Edge flow looks fine on my mesh. However, when I apply a Subdivision Surface modifier my mesh becomes really messy as if something is wrong with the edge flow. Can you guys help spot the problem? Mesh topology: Subdivision issue: |
As it happens, I lost the password to my admin account on win7. It was the only admin account on the machine, so logging in with another account isn't an option. Now, normally this would't be an issue: I'll either use a livecd or the sethc backdoor. Having no livecd at hand (just when I need it), I go into the recovery option on boot, and discover there is a password set. Ugh. As there is no accessible admin account, I can't even remove it through the registry. Is there another way to get an elevated console like through WinRE, or remove the WinRE password requirement? | I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do? There is no external CD, the operating system is loaded from somewhere inside the machine. I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc. |
How can I delete all function from my database using sql-script. I tried: declare @nm varchar(100) select @nm = name from sysobjects where type = 'FN' exec('drop function ' + @nm) And I put in into the loop but it not delete all function. Please help | Is there any way in which I can clean a database in SQl Server 2005 by dropping all the tables and deleting stored procedures, triggers, constraints and all the dependencies in one SQL statement? REASON FOR REQUEST: I want to have a DB script for cleaning up an existing DB which is not in use rather than creating new ones, especially when you have to put in a request to your DB admin and wait for a while to get it done! |
Using mathematical induction, prove that $n\le5: 4n<2^n$ base case: $4(5) < 2^5$ $20 < 32$ Correct I need help with the inductive process | I did the following base case $n = 5$ $$\begin{align*} 4(5) &\lt 2 ^5\\ 20 &\lt 32 \end{align*}$$ So true. $$\begin{align*} 4n &\lt 2^n\\ n &\lt 2^{n-2}\\ \log_2(n)+2 &\lt n \end{align*}$$ But I don't think this is right. Where do I add in the $(n+1)$. |
How can I determine within a shell script if the script is running: On a Ubuntu LiveOS (not necessarily version dependant) -- (already answered ) Within a chroot on an Ubuntu LiveOS (already addressed ) On a locally installed system (no LiveOS) -- (already answered ) As all three points seem to be addressed elsewhere, I'm going to vote to close this question. Pointed out in the only answer here, a combination of tests can be used to determine chroot on LiveOS. | I have a shell script that can only be run from a live session (LiveCD or Live USB) because it shrinks the root filesystem of an actual installation, which can only be done when the filesystem is not mounted. If the script is run from the live session, it should pursue its execution. If not, it should fail. I cannot find a way to differentiate the live session and a "normal" user session, as the live session has a look-and-feel very close to the installed system sessions. The only thing I can tell so far is that live sessions always have ubuntu as the hostname, but I cannot rely on that since the user can choose this when installing Ubuntu. Is there a way of identifying this in a shell script / command line? (I hesitated between posting on Ask Ubuntu or Stack Overflow, I can delete the post and re-post on Stack Overflow if more appropriate) |
I've killed the Ender Dragon, and I'd like to fight it again. How can you respawn the Ender dragon after you kill it? | I've recently beat the Ender Dragon. I've heard there is a way to respawn her. How do I do that? |
Consider a pool of $N$ candidates, where $N$ is an even number. Each day, you would like to pair all the candidates up in order for them to get to know each other. In other words, each candidate should spend a day with each of the $N-1$ other candidates by the end of the internship. What algorithm allows for generating a daily list of pairings such that no two candidates meet each other twice? Is this always possible? | Given a list of people: [ 1, 2, 3, 4, 5, 6 ] The goal is to generate some number of lists of pairs. [ [ [1,2], [3,4], [5,6] ], [ [2,3], [4,5], [6,1] ], [ [3,1], [5,2], [4,6] ], [ [2,6], [3,5], [4,1] ], [ [4,2], [5,1], [3,6] ] ] Each list of pairs represents the schedule for that week. Each pair represents the people who should meet with that week. In the example above, in the first week, persons 1 & 2, 3 & 4, 5 & 6 will meet. In the second week, persons 2 & 3, 4 & 5, 6 & 1 will meet and so on until everyone has meet with each other. After some experimenting, it appears that for a list of n people, if n is even, there will be n - 1 lists of pairs. If n is odd, there will be n lists of pairs and one person will have a bye week where they don't meet with anyone. Is there an algorithm to generate this list of pairs given a list of people? |
My Mountain Bike ,about ten years old,Three (3) sprockets in front. It backpedals (whizzz) But when I go to pedal there is no engagement - Pedals turn but sprockets don't move..But sprockets move when backpedaling. edit<- I searched Batman's & the other person mentioned for this "Duplicate question" but found none similar. It's Shimano parts , the pedal arm is white aluminum, the chaingears, is that the word for sprocket ? The Chaingear/sprocket where the chain rides on is Black Aluminum. When I look behind the assembly,Down at the crank axle, and while turning crank by using pedal, A round circular part is turning with the pedal , But it is perfectly round and factory made like that ,Looks like a part of chaingear, It's also Black Aluminum, Maybe there's a catch or pin that's broke ? While I grasp the pedal and crank forward , both pedals turn as supposed to , But the chaingear/Big circular saw piece remains idle, It does not move , But it moves when backpedaling, As does the gears on the rear tire.. edit edit>> I proceeded to cross a peculiarly arranged intersection, I deemed the coast clear , 5 feet from safety my pedals gave out , I could pedal easily and freely but no movement on my front chaingear and as a result - No torque available to propel my rear gear into saving my life. A car whizzed around the corner and straight at me at the same time my 21 speed Mountain Bike with GTX tires Shit thine bed | I just pulled my old bicycle out of the garage. It's about 10 years old (a 21-speed mountain bike). It was working when it was put into storage. When I tried to ride it today, the crank wouldn't engage properly to make the chain rings rotate; or more casually, when I pedaled nothing moved but the pedals themselves. I flipped the bike over and if the rear wheel was spinning at a fair speed then the chain rings would engage when the crank was turned and the rear wheel had power driven to it as normally expected. Is there a freewheel or freehub at the crank / chain ring junction that I should examine? I read through a few dozen questions but I couldn't find any that addressed this specific issue; I hope this is a new question and not just a serious misunderstanding on my part! I'll post a video shortly, but to give further clarification... The chain is on the gears; the chain does not slip I can backpedal and the chains and gears spin, as normally expected However, if I pedal forward, the gears which are located at the pedals will not spin; the pedals rotate freely. They rotate as if the thing they are supposed to be affixed to isn't attached. Also, I'm certainly misusing terms here! By "chain rings" and "crank" I was referring to the areas of the bike as indicated in this diagram: |
In the manual page of command find, I found options of -depth, -delete, -exec and etc their leading symbol are single - instead of a double as -- Conversely, there's git log --oneline , git log --graph, and --python, which are facile to distinguish the full names and abbreviated commands Why does command find not follow such a practice. | Why is a parameter in the POSIX find command added with a single hyphen for multi-character parameter names, while most other programs use single hyphen to indicate multiple single-character flags, and double-hyphens to indicate single parameter names with multiple characters? This seems inconsistent, and I'm curious as to A. why it's really not inconsistent, or B. the history of that decision. |
Why are tank-style water heaters generally installed on a 2-3 foot (~0.6-0.7 meter) tall pedestal? | I saw a water heater stand at Home Depot but it's about 15" high. That's a bit too high for my basement. Can I just make one with 2x4 and plywood that's only 4" tall, basically just enough to be able to drain water off the drain tray? Or does the code require it be higher? |
When an impulsive force is acted upon a rigid body, (and the force doesn't pass through the centre of mass) why does the body rotates specifically about an axis passing through centre of mass ? | If a force is applied to a body which does not act through its centre of mass, it rotates about its centre of mass and not any other point. Why? |
please help me.i write this code : public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); File dir=Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS); File[] files=dir.listFiles(); Toast.makeText(this,files.length+"",Toast.LENGTH_LONG).show(); } } and it has this error : Caused by: java.lang.NullPointerException at ir.itpro.videosample.MainActivity.onCreate(MainActivity.java:20) i put 3 files in directory downloads . how to fix it now?? | 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? |
For a mini game in where the user tries to guess a name. But when I want to compare two text strings just to check if are the same it seems that doesn't work. final String miName = "Jhon"; Scanner input = new Scanner(System.in); System.out.println("Guess my name: "); while (true) { String attempt = input.next(); if(attempt == miName) { System.out.println("Congrats!"); break; } else { System.out.println("Try it again!"); } } The output: Guess my name:: Karl Try it again! jhon Try it again! Jhon Try it again! | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I can run following command on my Ubuntu 14.04.3 Terminal without any problem: sudo service network-manager restart [sudo] password for username: network-manager stop/waiting network-manager start/running, process 5204 If I type sudo service network and then press Tab it is auto completed to sudo service networking. If I type sudo service network-ma and them press Tab no auto-complete occurs. My question is if there is a service named network-manager that could be restarted by service command why its name is not auto-completed? and How to solve it? Update: ls -l /etc/init.d/network* -rwxr-xr-x 1 root root 4479 Apr 28 2014 /etc/init.d/networking | I'm used to create upstart services with a file in /etc/init/<service>.conf and it works perfectly fine, the only thing I'd like to is to have tab completion the same way that every service in /etc/init.d/ have right now. When writing sudo service xx the name of the service should apear. Is there a way to add upstart services to that autocompletion list? |
From a unix admin standpoint what is the difference please between those terminologies : Service, Process, Thread, Task, Job, Daemon ? | I know that an application is a program that you interact with on the desktop, but what exactly are processes and services? Are services classified as processes or is it the other way round? |
After asking a question, I may be interested in quick responses and react on comments quickly. So I leave the tab open. But I always need to check back to the tab to see whether there's a "something has been added" note somewhere, either a comment to the question, or a new answer or a comment update on an answer I already read. Couldn't this also be shown in the page title so I don't need to switch tabs all the time while I'm reading something else? | Background Recently was implemented. With this feature the amount of questions with new activity is shown in parenthesis at the beginning of the page title, e.g. (2) Meta Stack Overflow means that MSO has two questions with new activity since the user last viewed it. this feature is unrelated to inbox updates. Here is an example to illustrate this: Even though there are two inbox messages in this screenshot this is not reflected by the page title. The page title is currently only sensitive to questions with new activity. Suggestion I suggest that the page title also reflects inbox updates. For the screenshot above this would mean that the page title shows that there are two inbox updates and two questions with new activity. I am not sure what format is best for showing this. For chat * in the page title is used to show that there are messages directed at you which is similar in meaning to inbox updates. However, * if is placed after the number in parenthesis to denote inbox updates there might be confusion as there is no connection between the number in parenthesis and * like in chat. Thus, one might prefer another format such as one of the following (all are meant to reflect the status of the screenshot above): * (2) Meta Stack Overflow 2* (2) Meta Stack Overflow [2] (2) Meta Stack Overflow 2i 2q Meta Stack Overflow (2/2) Meta Stack Overflow (2|2) Meta Stack Overflow For the alternatives without an explicit hint of which number refers to what it might be best to place the number for questions with new activity first as it will in most cases be greater. This will to a greater degree avoid combinations such as "(0/2)" which may be confused zero of two. An advantage of the suggested feature is that if the user has a browser tab with a Stack Exchange site then they will be instantly notified of inbox updates. They do not need to focus a tab with a Stack Exchange site to know if there are inbox updates, they merely have to check the relevant page titles among their tabs. A disadvantage of the suggested feature is that it might be experienced as verbose. I suggest that it is implemented such that it is as unobtrusive as possible while still being informative. Think of a situation where a user has one Meta Stack Overflow tab with two inbox updates relating to Meta Stack Overflow and two questions with new activity, and one Super User tab with one inbox updates relating to Super User and three questions with new activity. Then the sum of the inbox notification in the page titles should be local to sites and not global. The page titles for the tabs above should be something like the following pair: 2i 2q Meta Stack Overflow 1i 3q Super User |
I'm not sure if this is possible - I've tried searching, but can't seem to find anything. I run a dual boot system, Trusty & Win 7 - being in the former about 98% of the time. Here's what I'd like: always boot into Ubuntu, but have the option from within Ubuntu of rebooting into Win 7 - with subsequent boots going back to Ubuntu. Thoughts? | I have a dual boot system with Ubuntu 11.04 and Windows 7. My GRUB bootloader defaults to Ubuntu. I mainly use Ubuntu, but I occasionally need to bootup Windows to do a few things. If I need to do something in Windows I can "shutdown" Ubuntu and select Windows 7 in the bootloader. However, it would be more efficient if I could do this in one click from Ubuntu. Is it possible to press a key in Ubuntu which means "Shut down, and then boot into Windows"? (or for that matter Shut down and boot into any non-default bootup) |
Can i install ubuntu(any flavor at that) onto am external hdd and will it run normally? If so what are the procedures and how do i do it? I wanted to install into a usb external hdd | A friend just complained to me about Ubuntu being slow. Although I've noticed a certain lack of snappiness with Linux vs Windows in the past, I really can't say I've had much to grumble about with the recent distributions of Ubuntu. That said, his objections seem much worse than the ones I used to have and I know that his current setup is significantly more powerful than my laptop. And then it turned out he is running Ubuntu off an external HDD hooked up via USB2.0. The HD enclosure is USB3.0 but apparently he can't manage to get it to boot on USB3.0 so he switched to one of the USB2.0 ports or whatever and that works, albeit not very well. Now I would expect USB to add some overhead to communication between the computer and the HDD; SATA is after all designed to get the maximum out of a hard drive, whereas USB is, well, universal. What are your expreriences with booting off external HDDs? Edit: Does anybody know just how much of a slowdown can be expected? |
Can you please cite a book that treats deep learning from the mathematical perspective as I tried to search, but most of the books are either technical or too superficial in terms of the mathematics behind? | I am looking for a book that goes through the mathematical aspects of neural networks, from simple forward passage of multilayer perceptron in matrix form or differentiation of activation functions, to back propagation in CNN or RNN (to mention some of the topics). Do you know any book that goes in depth into this theory? I've had a look at a couple (such as Pattern Recognition and Machine Learning by Bishop or Deep Learning by Goodfellow, Bengio and Courville) but still have not found a rigorous one (with exercises would be a plus). Do you have any suggestions? |
So I'll explain my self briefly, I've just finished my first semester in my undergrad program and my goal is to move on to masters in the US in Stanford or near that area. So obviously grades are very important and here's the problem, I'm putting the hours in throughout all the semester (easily 10 hours a day, sometimes longer) and I don't have issues with understanding nor with executing what was learned but come the day of the exam and I do TERRIBLY and I can't explain why, I don't know whether it's because of stress or something else and I feel lost as everyone I score a B instead of an A I feel like my grad school goal is only getting further away from me. I'd appreciate any tips or ideas with how to deal with this. I'm currently retaking all the tests to improve my grades but it's exhausting because the material is not the problem... In case it matters, I'm talking about computer science. if the title is inappropriate please let me know how to change it Thank you Edit: my topic is different from the one mwhombat linked to because where I live you don't get to pick your courses I can't focus on project based courses some have then but most don't so I HAVE to get better at test taking | So I am gradute student in theoretical computer science. Throughout my education path up to highschool, I have all been praised a big lot by my teachers, some of them even went to such lengths as to say I was the most intelligent student they have ever taught. By dint of all that, I took it for granted that I must be cleverer than average and before I noticed, I might have gotten on a very high horse. Then I got into college, and things started getting harder. The higher the horse, the bigger and harder the fall. So my grades stopped being close to full score, but not bad at all. Until I decided that I wanted to do a PhD later, and for that, I have to get very good marks and hope to get a scholarship. Ever since, at the dawn of every test/exam, as opposed to the relaxed and cool mindset I'd be in before, I get very, very, VERY anxious and very flustered, either out of fear that I run out of time (because of a lived experience), or of not having the answer. That anxiousness would get lifted immeditely when time is up, and on my way back home, all answers or most of them, would start flowing in my head. Only this morning, I had a test which I failed like never before. I quickly glossed over problems one by one in order, my mind would go blank for a few seconds, then I would deciddeto move on to the next problem and that it is no use wasting time on this one (because I wasn"'t going to find a solution), and that for every exercise. It is for a reason I say I failed today's like never before because I literally could do nothing; my mind was paralyzed and started weating and how I was going to not get to what I want to (PhD). But as soon as I got home and sat down for a few minutes, I solved prefectly 5 problems out 7 in 30 minutes (the test was to do within 90 minutes). I was one of the most confident people in themselves before, but now I lost every bit of that confidence and wouldn't stop thinking I'm too dumb to make it. I have been struggling with this for two years now, and after today's huge blow, I decided to take to the internet and this board in order to try and find a solution. Chances are Academia is not the right board to ask this question in, but it must be the closest to that out of all other SE boards. What can I do about my test taking so that my scores are more reflective of my natural ability? |
$\pi$ is irrational, and of course its digits are not a repeating sequence. However I cannot wrap my head around the following... Is there a digit $x$ in $\pi$ such that the digits before are repeated in reverse order after that digit? $$\pi = 3.14159\ldots zyxxyz \ldots 951413 [\ldots]$$ In other words, is there a positive integer $n$ such that $\lfloor 10^n\pi\rfloor$ is ? $\pi$ has infinite digits, but it is unknown whether any sequence of digits will appear at some point. Moreover, this isn't just a requirement for $n$ digits appearing at some position, but for a sequence of $n$ digits has to appear at position $n$. | I came across the : Which states: $\pi$ Pi Pi is an infinite, nonrepeating $($sic$)$ decimal - meaning that every possible number combination exists somewhere in pi. Converted into ASCII text, somewhere in that infinite string of digits is the name of every person you will ever love, the date, time and manner of your death, and the answers to all the great questions of the universe. Is this true? Does it make any sense ? |
If you root an android phone does this also unlock it from a network? I.e. say you had a moto g locked to the vodafone network, and then you rooted the phone, would it then be unlocked from vodafone? | I'm a bit confused about this topic. I have a T-Mobile myTouch 3G which I've recently replaced with a Nexus One so it's kind of standing there. I was contemplating rooting the myTouch and installing an alternative ROM but I also wanted to unlock it so it can be used with other carriers. Now, the real questions: When rooting and installing a custom ROM, will that also unlock the phone so it can be used with other carriers? Or is that a baseband feature? |
Let $A$ be a Noetherian local ring such that your Krull dimension is greater than 1, show that $Spec(A)$ has an infinity many points. I have been trying with the following idea; I take a chain of ideals in it, there must be a maximal $Max_A$ and a minimal $Min_A$, and ideals between them, I suppose there is a finite number of these, but I still can't arrive the conclusion. I would like to get some recommendation or other way for the proof. Thanks for all. | If $R$ is a Noetherian commutative ring with unity having finitely many height one prime ideals, one could derive from the "Principal Ideal Theorem", due to Krull, that $R$ has finitely many prime ideals (all of height less than or equal to $1$). It may comes to mind that, in general, if $R$ is a commutative Noetherian ring with unity of finite Krull dimension $d$ has finitely many prime ideals of height $n$ with $0<n≤d$, then $n=d$. My question: is this generalization valid? I shall appreciate any help. |
Saying things like "rain rains" "thunder thunders" etc | What is the term when a word is used consecutively twice, with intentional stress placed on the first word, as a means to alter the severity of the word's meaning? I am not referring to a (had had) or a (that that), but to the slightly sarcastic use as demonstrated in shows like Seinfeld. Sample sentences, with emphasis: I know we're going out to eat, but I am only going to pick at an appetizer because I'm not hungry hungry. Don't wear something so formal to the party; I don't think you need to be dressed dressed. Of personal note, some of my relatives decided a few years ago to nick-name the term a "Celaine" (a combination of their names) due to their own frequent use of it. Note: This question explicitly requests the term of art used by linguists and English scholars when discussing this phenomenon. This question is different from a which requests a historical explanation for the phenomenon described by this term. None of the answers to the suggested duplicate provide the term. The author of the similar question requests the term for the pattern in a comment, but does not receive an acceptable answer. The only mention of an acceptable term is in a comment made by the author of this question, in response to the author of the similar question, directing back to this very question. |
I can thnk of only one way to tackle this problem, however, it is very tedious. $$ a \oplus b \iff (a \land \neg b) \lor(\neg b \land a)$$ And so now I evaluate, by definition, $(a \oplus b) \oplus c$ and $a \oplus(b\oplus c)$ And then, using the associativity of OR and AND, I get the same expression for arrangements of parentheses. However, is there an easier way to solve this problem? | Through the use of Boolean algebra, show that the XOR operator ⊕ is both commutative and associative. I know I can show using a truth table. But using boolean algebra? How do I show? I totally have no clue. Any help please? |
I just want to make sure i am on the right lines so please correct me if wrong. I am testing which hyperparmets are best for logisitic regession on my data X, y where X is featrues and y is target. X, y are made from my training set. I also hhave a test set. from sklearn.linear_model import LogisticRegression # split train into target and features y = Train['target'] X = Train.drop(['target'], axis = 1) X = pd.get_dummies(X) #split test data into target and features y_test = Test['target'] X_test = Test.drop(['target'], axis = 1) X_test = pd.get_dummies(X_test) logistic = LogisticRegression() # initialize the model # Create regularization penalty space param_grid = {'C': [0.001, 0.01, 0.1, 1, 10, 100, 1000] } clf=GridSearchCV(logistic,param_grid=param_grid,cv=5) best_model = clf.fit(X, y)# View best hyperparameters print('Best Penalty:', best_model.best_estimator_.get_params()['penalty']) print('Best C:', best_model.best_estimator_.get_params()['C']) # I will now use these hyper parameters and 'train' it on my training data. Just so i'm sure when we say train do i then take best_model and train on the whole X data e.g.: bestLog=best_model.best_estimator_ trained_model=bestLog.fit(X,y) predicted=trained_model.predict(X_test) then use this output above as my final model to test? | In general, if we have a large dataset, we can split it into (1) training, (2) validation, and (3) test. We use validation to identify the best hyperparameters in cross validation (e.g., C in SVM) and then we train the model using the best hyperparameters with the training set and apply the trained model to the test to get the performance. If we have a small dataset, we cannot create training and test set (not enough samples). Therefore, we will do cross validation (k-fold, leave-one-out, etc) to evaluate the model performance. I have seen nested cross validation (whether repeated or stratified) has been used in the setting of small dataset, i.e., to generate generalized model performance while optimizing parameters selection. My question is, how can I obtain the best hyperparameters in nested cross validation (repeated/no repeated)? I am interested in doing this in scikit-learn, if possible. I am a bit confused about how to do it. I have read several resources but none gave me the definitive answer for this question: |
I want to change the size of one paragraph in my paper, however, scriptsize is too small for me while footnotesize is very big. | I am trying to create a command to modify fontsize with one parameter, it seems that the paramater is not expanding properly: \newcommand{\mycfs}[1]{\fontsize{#1pt}{1.2*#1pt}} |
Suppose I run some code which I know may contain a lot of defects. Those may be memory leaks or just bugs causing very high memory consumption. So let's say that today 8 gigabytes RAM is usual amount and that code gets crazy and consumes 8 gigabytes, then another 8 gigabytes forcing excessive page file operations, then 8 more gigabytes until the whole system just stalls. I tried that - Windows gets mostly unresponsive and useless in such case, the best bet is just powering the machine down and up. Is there any way to protect the system from such cases? Perhaps some programmatic limits of how much memory the process is allowed to use? | Is there any way to set a system wide memory limit a process can use in Windows XP? I have a couple of unstable apps which do work ok for most of the time but can hit a bug which results in eating whole memory in a matter of seconds (or at least I suppose that's it). This results in a hard reset as Windows becomes totally unresponsive and I lose my work. I would like to be able to do something like the /etc/limits on Linux - setting M90, for instance (to set 90% max memory for a single user to allocate). So the system gets the remaining 10% no matter what. |
How can I show the contents of a text file, with every occurrence of a word highlighted? | Say I have the following file: $ cat test test line 1 test line 2 line without the search word another line without it test line 3 with two test words test line 4 By default, grep returns each line that contains the search term: $ grep test test test line 1 test line 2 test line 3 with two test words test line 4 Passing the --color parameter to grep will make it highlight the portion of the line that matches the search expression, but it still only returns lines that contain the expression. Is there a way to get grep to output every line in the source file, but highlight the matches? My current terrible hack to accomplish this (at least on files that don't have 10000+ consecutive lines with no matches) is: $ grep -B 9999 -A 9999 test test If grep can't accomplish this, is there another command-line tool that offers the same functionality? I've fiddled with , but it doesn't seem to have an option for it either. |
I have one problem, that I think it's pretty hard to solve. The problem reads: Let $G$ be a finite $p-$group, and $H < G$ (i.e $H \le G$, and $H \neq G$). Prove that $H \neq N_G(H)$. Here are my thoughts on this problem: I know that if $G$ is a finite $p-$group, then its center is non-trivial, i.e $\mathcal{Z}(G) \neq \{e\}$. Then, I start off by Proof by Contradiction (note that we already have $H \lhd N_G(H)$), i.e, assume that $H = N_G(H)$, then for every $g \notin H$, there exists $h_g\in H$, such that $g^{-1}h_gg \notin H$. And from here, I come up with the fact that, in order for $H$ to satisfy $H = N_G(H)$, we must have $\mathcal{Z}(G) \lhd H$. However, the two facts above don't seem to help much. :( Can you guys give me a little push on this problem? Thanks so much, And have a good day, | If $o(G) = p^n,$ p a prime number, and H is a subgroup of G, show that there exists an $x\in G$, but $x\notin H$ such that $x^{-1}Hx = H$ How can I prove this? |
What if we dug a tunnel through the center of the earth connecting the two ends (like two poles). Suppose we have these condition in our tunnel. 1:There is no heat at all. 2:The tunnel be vacuumed (there is no air resistance in it). Questions 1:What if we jump through this tunnel what would happen then? 2:Can we reach the other end of the earth? 3:If yes, How long it would take to reach the other end point? 4:Can we survive through the journey (if the above conditions are applied)? 5:If there is air at the center what would be the pressure at center? | ...And you jumped in. What would happen when you got to the middle of the Earth? Would you gradually slow down, until you got to the middle and once you were in middle would every direction feel like it was up? |
Problem (The question will be found at the end, Question.) As a user of any Stack Exchange's community, you most likely stumbled through a post where for you that would be considered spam, but you're not quite sure how to proceed, because different communities / users have different expectations to what spam really is. Let's take as example / inspiration two situations I've encountered recently (this doesn't mean the answer to this question is solely based in them). Situation 1 On , when reading a user's answer, I found another answer that has a "See Also" section at the end, including many links to other answers from the same user inside of the community, without disclosing the affiliation. I created a , explained the situation and still don't know how to proceed. From 's comment, I've noticed a specific approach to spam (which I didn't read anywhere in the documentation): Links within the same site are IMHO unproblematic. Trying to drive traffic to an external site is what the disclosure requirement is supposed to discourage. Situation 2 On Stack Overflow, when reading about converting to SQL, I found a post from a user mentioning a specific tool and linking to an external site. There was no doubt the user was the creator of the tool. After analyzing the Q&As where the tool was mentioned, noticed five (out of 25) was from the same user (creator of the tool) and at least two from team member(s). From all the seven answers, only one of the team member(s)'s posts disclosed the affiliation. I flagged as spam (all but one), explaining in the comments why I've done that. The flag was accepted for the user creator of the tool, which then edited the answers to include (Disclaimer: I help run the tool) (I am not sure how acceptable such edits are though, but this would be a different question.) The other still . Question I would like to understand when we should flag a post as spam and when not, considering what was mentioned by : lack of disclosure where disclosure is required VS voluntary disclosure where none is strictly required. Note: I know of two good questions including similar information, namely: | It's that posting links to your own website is ok, but should there be a line drawn? There were several spam flags today for 's recent posts, presumably because they all link to his website. Initially I disagreed because his answers seem for the most part relevant to the question, but then I looked into it more and realized there's three things that set this apart from most of the related cases that have come up: This isn't an occasional thing -- he's posted in the last year This isn't a random blog he writes for a fun, it's a for-profit company he and makes money promoting I'm not willing to go through all 412, but from the sample I checked, he generally doesn't mention that the products he's recommending are his own. The site is linked from his profile, but most people aren't going to check that Is all this considered acceptable use, or are the spam flags accurate? |
I cannot for the life of me figure out where in the account settings you update your account avatar... Any suggestions? I don't think I used Gravatar as I could not find an account based on my emails. | Where does the image come from? How do I change my profile picture, or avatar? How do I change my profile picture on all SE sites at once? How can I use different avatars on different SE sites? How do avatars work? How do the SE sites know when I changed my Gravatar? Why do SE sites show a different Gravatar identicon than other sites where I use the same email address? How can I use a Gravatar image after logging in to facebook.stackoverflow.com? I changed my picture but am still seeing the old one See also: |
Below is the environment in Mac: ~$ ~$ ~$ echo $0 -bash ~$ ~$ ~$ ~$ ~$ ~$ cat /etc/paths.d/go /usr/local/go/bin ~$ ~$ cat /etc/paths /usr/local/bin /usr/bin /bin /usr/sbin /sbin /Users/MYUSER/go/bin ~$ ~$ ~$ echo $PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/MYUSER/go/bin:/usr/local/go/bin ~$ ~$ uname -a Darwin XYXYXYXXYX 19.6.0 Darwin Kernel Version 19.6.0: Mon Apr 12 20:57:45 PDT 2021; root:xnu-6153.141.28.1~1/RELEASE_X86_64 x86_64 ~$ ~$ which go /usr/local/go/bin/go ~$ ~$ ~$ ~$ go version -bash: /usr/local/bin/go: No such file or directory ~$ ~$ ~$ ~$ /usr/local/go/bin/go version go version go1.16.4 darwin/amd64 ~$ ~$ I performed rm -rf /usr/local/go , rm /usr/local/bin/go before installing new version go v1.16 that installs go binary in /usr/local/go/bin How to make go version command work? | I have a program on my path. The program runs when executed with a full path specified. But the program cannot be found when I run it with just its name. Essentially, I want to understand how the below output is possible, and how to fix it so that my program can actually be found without a full path specified: root:/usr/local/bin# ./siege **************************************************** siege: could not open /usr/local/bin/etc/siegerc run 'siege.config' to generate a new .siegerc file **************************************************** root:/usr/local/bin# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games root:/usr/local/bin# siege bash: /usr/bin/siege: No such file or directory root:/usr/local/bin# wtf!?!? I'm on Ubuntu 12.04 using bash. Also please note the warning output from siege is not relevant for the purposes of this question, as I am only interested in whether or not the program can be found and invoked. |
I've been playing Magic for about six months and thought I had a decent handle on how things work until I ran into the following problem: Set-up: I was playing mono black devotion against blue-green control. I bestowed onto . At the end of my turn, my opponent (in control of ) flashed in a . I chose not to pay the tribute, so my opponent took my with attached. Question: If I kill while my opponent controls it, when becomes a creature again do I regain control of Herald of Torment, or does my opponent retain possession of it? | What would happen if I 'd a creature that had been enchanted by a bestow creature and cast a spell to give it protection from the enchantment's color on it to remove the bestowed creature? For instance: They have just bestowed a on a and passes the turn. I use Portent of Betrayal to take control of the Asphodel Wanderer, attack and in the second main I cast Gods Willing to give the Asphodel Wanderer protection from black. Nighthowler detaches and where does it go, my control, opponents control or graveyard? As an additional question, in the same vein: What if I destroyed the creature while it was on my side? So change the gods willing to a hero's downfall in the example. Relevent (under state-based actions): 704.5n If an Aura is attached to an illegal object or player, or is not attached to an object or player, that Aura is put into its owner's graveyard. |
My company wants to launch a new website for a new offer in 4 different countries : France, Germany, Netherlands, Poland. I was asked for advice about what kind of URL organisation to choose for international targeting. First, I thought this was the same website, same content, in 4 different languages, managed centrally. So I advised subfolders, for better link equity sharing. So let's call the domain "mob.com": we would have mob.com/fr, mob.com/de, etc. Then I learned that actually the websites will have different offers and content pages depending on the country, and that each would be updated by a local team. So I advised ccTLDs : mob.fr, mob.de... Since it's different languages, different content and different teams, let's go for different websites as well. But for reasons that are beyond my control, they refuse ccTLD. So i'm left with 2 options : back to the subfolders (mob.com/fr, mob.com/de...), or subdomains (fr.mob.com, de.mob.com...). For SEO, I tend to prefer subfolders (for link equity and global SEO authority), but I wonder if it's right since these are in the end quite different websites. For different content, aren't subdomains more relevant ? Moreover, subdomains allow to have one dedicated Search Console account for each. So I can set up the International Targeting in SC differently for each website. With subfolders, I will have only one website, so one Seach Console account, so I can't use the International Targeting set up for each country can I ? Thank you very much if you have insights about these questions | When I set up a site in multiple languages, how should I set up my URLs for search engines and usability? Let's say my site is www.example.com, and I'm translating into French and Spanish. What is best for usability and SEO? Directory option: http://www.example.com/sample.html http://www.example.com/fr/sample.html http://www.example.com/es/sample.html Subdomain option: http://www.example.com/sample.html http://fr.example.com/sample.html http://es.example.com/sample.html Filename option: http://www.example.com/sample.html http://www.example.com/sample.fr.html http://www.example.com/sample.es.html Accept-Language header: Or should I simply parse the header and generate content server-side to suit that header? Is there another way to do this? If the different language versions don't have different urls, what do I do about the search engines? UPDATE 2011-12-06 Google has new recommendations for meta tags for explicitly pointing to other language content: . UPDATE 2012-05-25 Related but not precisely: UPDATE 2013-06-12 includes discussion of several URL schemes directly relevant to the question. |
I have an enum Eg. enum { APPLE, MANGO, BANANA } and a corresponding string array char fruits[] = { "apple", "mango", "banana" } I need to retrieve the index of string, given I have the string. So given that the string is apple, I need to get 0 and so on. [ Enum is additionally there, might help the solution] Is there an elegant way, to save [apple,0],[banana,1] that is short and simple, that I might use as a macro. I don't need lengthy things like a hashtable. Can Enum assist in the mapping? | Here's what I am trying to do: typedef enum { ONE, TWO, THREE } Numbers; I am trying to write a function that would do a switch case similar to the following: char num_str[10]; int process_numbers_str(Numbers num) { switch(num) { case ONE: case TWO: case THREE: { strcpy(num_str, num); //some way to get the symbolic constant name in here? } break; default: return 0; //no match return 1; } Instead of defining at every case, is there a way to set it using the enum variable like I am trying to do above? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.