body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Elemental Affinity Starting at 6th level, when you cast a spell that deals damage of the type associated with your draconic ancestry, add your Charisma modifier to that damage. At the same time, you can spend 1 sorcery point to gain resistance to that damage type for 1 hour. Create Bonfire: You create a bonfire on ground that you can see within range. Until the spell ends, the magic bonfire fills a 5-foot cube. Any creature in the bonfire’s space when you cast the spell must succeed on a Dexterity saving throw or take 1d8 fire damage. A creature must also make the saving throw when it moves into the bonfire’s space for the first time on a turn or ends its turn there. The spell does not deal damage directly, it creates a bonfire, and the bonfire can potentially deal damage. But then perhaps that's the same as creating a fireball, the spell doesn't deal damage, the giant burning ball of flame it creates deals damage. However, create Bonfire is Conjuration, whereas Fireball is Evocation, so perhaps it's different. I suppose the difference is that it could be a few turns later that someone steps in the fire and gets burned. Does it count? | Based on , if a target is under the effect of an ongoing spell, and then the target changes such that it is no longer a valid target, the spell no longer effects them. But does the spell end, or is it merely suppressed? For example, suppose a human has been charmed by a dominate person spell. A friendly wizard casts polymorph on them; they fail their save and get turned into a sheep. This makes their type change to Beast, which is an invalid target for the dominate person spell, and the charm effect ends. The next turn, the wizard chooses not to concentrate, so polymorph ends and the target pops back into human form. Assuming the dominating caster has maintained their concentration (if possible), did the spell simply end when the target became invalid, or does being invalid just suppress the dominate spell, which reasserts itself once the target is once more valid, like it would in an antimagic field? |
I would like to run a script at wakeup. So my laptop is sleeping, I open the lid, and the script should run immediately or within the minute after wakeup. This script should run at startup as well, as that is essentially the same situation. How can I run a cronscript at either wakeup and startup? | MacBook Pro 2010 running OS X Lion. Is it possible to run scripts on sleep and wake events? My specific application is that I've got Dropbox-synced Truecrypt volumes that I regularly use on both my MacBook and iMac. I rarely shut down my MBP since closing the lid is much faster and easier, but this means that I have to remember to dismount my Truecrypt volumes and let them sync back up before closing my MBP. It's trivial enough to script mounting/dismounting of them, but I'd like to go a step further and have these scripts run automatically. |
I want to add a remove button in my clone element for some purposes. HTML <div class="more">add</div> <div id="other_fee"> <div> <input type="text" value="" name="other" placeholder="Description" /> <input class="short3 theAmount" type="text" value="" name="other_amount" placeholder="Amount" /> <div class="inputBlocker"></div> </div> </div> jquery <script type="text/javascript"> jQuery(function($) { $('.more').on('click', function() { var $table = $('#other_fee'); var $tr = $table.find('div').eq(0).clone(); $tr.appendTo($table).find('input').val(''); }); $("#abc").each(function() { var form = $(this); form.on('keyup', '.theAmount', function() { var sum = 0; form.find('.theAmount').each(function() { sum += +this.value; }); form.find("#other_total").val(sum); }); }); }); </script> | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
I'm reading data from a file, and sometimes the file contains funky stuff, like: "䉌Āᜊ»ç‰ç•‡ï¼ƒè¸²æœ€ä²’Bíœë¨¿ä„€å•²ï²ä‹¾é¥˜BéŒé“‡ä„€â²ä‹¾â¢" I need to strip/replace these characters as JSON has no idea what to do with them. They aren't control characters (I think), so my current regex of Regex.Replace(value, @"\p{C}+", string.Empty); Isn't catching them. A lot of these strings read in are going to be long, upwards of256 characters, so I'd rather not loop through each char checking it. Is there a simple solution to this? I'm thinking regular expressions would solve it, but I'm not sure. | How can you strip non-ASCII characters from a string? (in C#) |
We want to concatenate the function name and variable name. This should occur on click of a <a> tag. How can we concatenate the function and variable name? Issue: we are getting error message fn_dataId() is not defined Desired output: fn_dataId() should be fn_some123(); What we tried $(function() { $('.link').on('click', function() { console.log('clicked'); var dataId = $(this).attr('data-id'); console.log('data id - ' + dataId); // What we tried, but didn't work. fn_dataId(); }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <a data-id="some123" class="link"> Click here </a> | I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later? Depending on the circumstances, I may need to pass various arguments into the method too. Some of the functions may take the form of namespace.namespace.function(args[...]). |
I made an invitation for an event in LaTeX, with output at 4.25in x 5.5in. I'd like to place four of these in a 2x2 grid, and get an 8.5in x 11in document for printing. No margin changing, no resizing, just stick the pages together. One would think this should be easy, but I haven't had any luck actually doing it... Some utilities I've tried: pdfjam --nup 2x2 out.pdf (output has dimensions 8.27in x 11.69in. I can't tell what's gone wrong, but I don't want this off center) imagemagick with +append and -append. The PDF gets rasterized and the text doesn't come out well. Any ideas? The option to set the page size originally was \usepackage[paperwidth=4.25in,paperheight=5.5in,margin=0.7in]{geometry} | I would like to style my document in such a way that the page is divided into four equal parts and then the text is printed in those pages: it is similar to twocolumn but I also want to have, say two rows. The reason is that I would like to cut the page into four smaller pieces, so it would be very convenient if LaTeX can do this. Thank you in advance for help! |
I'm using LuaTex. If i have a figure and a longtabu on one page, the text after it just doesn't break. MWE \documentclass{scrreprt} \usepackage{ltablex} \usepackage{tabu} \usepackage{lipsum} \begin{document} \begin{figure} \vspace{10cm} \end{figure} \begin{longtabu} {XX} \textbf{Test} & \textbf{Test} \\ \end{longtabu} \lipsum[1-5] \end{document} Result How to make the text break correct? | I have been searching for a while now without any luck, so I hope you can help me. The problem is that when I insert a figure/longtabu on my page, the text below is running out of the page, like this image shows: Do you know what the problem is here? I have uploaded some sample code here: |
In some python scripts, I see this format; def main(): #run code if __name__ == "__main__": main() In other python scripts, the line if __name__ == "__main__": is not present but the code runs normally. Why have this extra redundant line when the code can run normally even without it? What is the advantage of using if __name__ == "__main__":? | Given the following code, what does the if __name__ == "__main__": do? # Threading example import time, thread def myfunction(string, sleeptime, lock, *args): while True: lock.acquire() time.sleep(sleeptime) lock.release() time.sleep(sleeptime) if __name__ == "__main__": lock = thread.allocate_lock() thread.start_new_thread(myfunction, ("Thread #: 1", 2, lock)) thread.start_new_thread(myfunction, ("Thread #: 2", 2, lock)) |
If $M$ is a Noetherian $R$-module then every submodule of $M$ is a finite intersection of irreducible submodules. Please show me the way how to get the proof of this statement. | If $M$ is Noetherian, any submodule $N \neq M$ can be written as a finite intersection of intersection-indecomposable ones. I just don't know how to begin with the proof of this proposition. Very kind of you for reading or answering. |
Say, I purchased an iPhone (not from Apple or any official reseller.) How do I know that it's not Jailbroken? PS. My concern is the presence of key loggers or other tracking software. | How can I find out if my iOS device has been jailbroken (with a drive-by exploit for example)? Is there an app for that? |
I installed Ubuntu from windows 8 and selected option to format just windows 8. But after full installation of Ubuntu I can't even find my d drive files. It contains very important files. Please help! | I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions (C:) Vista (D:) Entertainment (E:) Work (F:) Sources and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB. I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse? I need these data badly as I don't have a backup for them. |
Help! I had a dual-boot of Ubuntu and Windows 8.1 on my computer. Last night I decided to "uninstall" Ubuntu. Rather than re-install the Windows MBR I decided to just edit GRUB to timeout at 0, with the default choice as Windows. I restarted my computer and it boot just fine into Windows. I removed all the Ubuntu partitions from Disk Management (being careful not to remove the partition with mount point /boot/efi) and reclaimed the unallocated space. Today I turned on my computer and a black GRUB screen came up with the line "Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions. Anywhere else TAB lists possible device or file completions" How do I boot in to Windows 8?! | I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot. |
I'm solving exercises of noncommutative ring theory and I have find across the following problem. If $D$ and $D'$ are division rings and $M_m(D)\simeq M_n(D')$, show that $D\simeq D'$ and $m=n$. I have already tried to attack in various ways and I understand that this exercise says that, by the Wedderburn-Artin theorem, a simple Artinian ring $R$ is a ring of matrices over a division ring $D$ unique up to isomorphism. Any suggestion is appreciated. Thank you. | I am studying Artin-Wedderburn structural decomposition theorem for semisimple rings. I understand that it says that any semisimple ring, $R$ is isomorphic (as rings) to $M_{n_1}(D_1) \times M_{n_2}(D_2)\times\cdots\times M_{n_k}(D_k)$ for some $n_i$ and division rings $D_i$. Is this decomposition unique, i.e., suppose $R$ is also isomorphic to $M_{n'_1}(D'_1) \times M_{n'_2}(D'_2)\times\cdots\times M_{n'_{k'}}(D'_{k'})$, then is $k=k'$ and $n_i$ equal to $n'_i$ and $D_i \approx D'_i$ up to some permutation? If so, how? |
I've been reading through this forum and google for this answer for a while now, the closest I have come to my answer is the thread linked above. Specifically this answer here. Now to the specifics of the question. I'll use and . Opponent attacks with Long Tusk without pumping it up, leaving it at 2/2. I do not declare any blockers. Opponent decided to pay energy to make it a 3/3. In response, I cast shock. Does shock take effect, since its an instant, before Long Tusk becomes a 3/3? Thanks for the help in advanced. | I'm a relatively new player to Magic: the Gathering. I was reading to try to understand exactly when it's okay to cast instants (e.g. ) and use some abilities (e.g. should be tappable sometime during other peoples' turns), but I don't seem to be making much progress: as I come to understand some things, others make less sense. My confusion is boundless For instance: to cast one needs priority. Spells go on the stack, and priority gets passed at some points (I have no idea when), and effects on the stack are resolved when both players have passed priority. But when is that? I can't find any mention of when the other player gets the priority to cast an instant, except on their own turn. Furthermore, states that during the Main Phase: 505.4. Second, the active player gets priority. Players may cast spells and activate abilities. The active player may play a land. So players (plural) may cast spells, but only the active player has priority, so only the active player can cast an instant. The turn rules, and the rules on , never mention any point at which the other player gets priority, so when can they possibly Cancel? In addition, you can only cast a spell when the stack is empty, so the entire stack must be able to be resolved in your turn at some point. I need an explanation! I could go on a bit more. There is also which can be overloaded to "Counter each spell you don't control", which seems like it could only possibly work with an understanding of the stack. Could someone explain, in simple English: When can Instants be cast? When can tap abilities be used? What do Instants and abilities have to do with the Stack and Priority? |
I have a set of code in which I have \begin{IEEEeqnarray*}{rCl} f(y,x) & = & \frac{1}{(2\pi)\left | \Sigma_{xx} \right |^{\frac{1}{2} \cdot \left | (\Sigma_{yy} - \Sigma_{yx}\Sigma_{xx}^{-1}\Sigma_{yx}^{\prime})^{-1} \right |^{\frac{1}{2} \\ && \cdot exp \left \{ -\frac{1}{2} \left \lbrack (y - \mu_y)^{\prime} (\Sigma_{yy} - \Sigma{yx}\Sigma_{ya}\Sigma_{xx}^{-1}\Sigma_{yx}^{\prime})^{-1}(y - \mu_y) \\ && -(x - mu_x)^{\prime}\Sigma_{xx}^{-1}\Sigma_{yx}^{\prime} (\Sigma_{yy} - \Sigma_{yx}\Sigma_{xx}^{-1}\Sigma_{yx}^{\prime})^{-1}(y-\mu_y) \right \rbrack \right \} It works if I put it under the second line but not the third. Any suggestions much appreciated. | I have a multi-line equation that I want to have matching sized parentheses. The advice I read online was to use \left( equation \right. \\ left. rest-of-equation \right) . However, this syntax leaves first half of the equation unaware of what is in the second half. For example, if you include a square root term after the break, the second parenthesis will be larger than the opening parenthesis. When you are using the aligned environment to split a long equation this can look somewhat offputting. Compare the top equation to the bottom one. The parentheses match in size for the bottom equation, but the left hand parentheses for the top one is noticeably smaller. Top Code: \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{108} \left(57\gamma_{\text{er}} \right. &+ 38\gamma_{\text{se}}\\ & {}\pm \left.\sqrt{2601 \gamma_{\text{er}}^2 + 3648 \gamma_{\text{er}}\gamma_{\text{se}} + 1444 \gamma_{\text{se}}^2} \right) \end{aligned} Bottom Code: \begin{aligned}[t] \gamma_{\text{u}} + \frac{1}{16} \left(9\gamma_{\text{er}} + 6\gamma_{\text{se}} \pm \sqrt{49 \gamma_{\text{er}}^2 + 76 \gamma_{\text{er}}\gamma_{\text{se}} + 36 \gamma_{\text{se}}^2} \right) \end{aligned} |
Prove that $(1+\frac{1}{n})^k < 1+ \frac{k}{n}+\frac{k^2}{n^2}, \forall$ n, k nonnegative integers, $k\le n$. I know that has something to do with Bernoulli's inequality $(1+\alpha)^x\ge 1+\alpha x, \alpha \ge -1, n\ge1$. If I reconsider Bernoulli's inequality with $\alpha=\frac{1}{n}$ and $x=k$ it follows that $(1+\frac{1}{n})^k\ge 1+\frac{k}{n}$, but I don't know how to continue. I also tried to prove it with induction where I consider $p(n):(1+\frac{1}{n})^k < 1+ \frac{k}{n}+\frac{k^2}{n^2}$ to be true and prove that $ p(n+1):(1+\frac{1}{n+1})^k < 1+ \frac{k}{n+1}+\frac{k^2}{(n+1)^2}$ to be also true, but it didn't work. Thank you! | We know that $\dfrac1n>0$, $\dfrac1n<\dfrac mn<1$, $\left(\dfrac1n+1\right)^m < \left(\dfrac mn+1\right)^m$, so we have to prove that $\left(\dfrac mn+1\right)^m<\dfrac mn+1+\left(\dfrac mn\right)^2$. I tried using Newton's binomial expression of $\left(\dfrac mn+1\right)^m$ and calculating the difference, but I didn't get there. |
I submitted a custom-reason flag on an answer on "Aug 30 at 11:42", and it is still labeled active. I also have another custom-reason flag on another answer on a different question from "Aug 30 at 13:04" that is labeled active. Why is this? Has my flag weight changed, or are moderators responding slower than usual to custom-reason flags? | Looking at my flagging history, I see quite a few (got 8 now) active ones dated as far back as August 9. Sometimes a flag gets addressed almost instantaneously, other times it just sits & wait there. Is it because I tend to flag edge cases /debatable stuff (like questions , or questions posting working code and asking for a code review, which is suitable for CodeReview.SE)? Or am I "flagged" as a trigger-happy flagger and my flags are just being ignored unless they're obviously warranted? I'm sure it's only because there's too many flags and not enough flag reviewers (is that 10K+ users or just diamonds/mods?), but what would be a "normal" delay for a flag to be reviewed? -- As I was tagging this question, the tag came up as a suggestion; this makes me wonder, have I shot myself in the foot? Where can I see my "flag weight" and what's an ok value? Lastly, what can I do to "flag better"? |
I have a problem in which I am trying to prove over GF(2) that a binary symmetric matrix (A) with a diagonal of ones has a rank always equal to the rank of its augmented matrix with a ones vector (C) $$ C=\left[\begin{array} \\ 1 \\ \vdots \\ 1 \end{array}\right] $$ To clarify, such matrix is constructed like so: $$ A=\left[\begin{array}{rrrr} 1 & a_{1,1} & a_{1,2} & \dots & a_{1,n} \\ a_{1,1} & 1 & a_{2,1} & \ddots & \vdots \\ a_{1,2} & a_{2,1} & \ddots & a_{n-1,n-1} & a_{n-1,n} \\ \vdots & \ddots & a_{n-1,n-1} & 1 & a_{n,n} \\ a_{1,n} & \dots & a_{n-1,n} & a_{n,n} & 1 \end{array}\right] $$ For example, a 3 by 3 matrix like this has a rank of 2: $$ A=\left[\begin{array}{rrr} 1 & 1 & 0 \\ 1 & 1 & 0 \\ 0 & 0 & 1 \end{array}\right] $$ When we augment it with a ones vector, we get this matrix which also has a rank of 2: $$ A|C=\left[\begin{array}{rrr|r} 1 & 1 & 0 & 1 \\ 1 & 1 & 0 & 1 \\ 0 & 0 & 1 & 1 \end{array}\right] $$ Cleary rank(A) = rank(A|C) over GF(2). Why is this always true for such type of matrices? If you have a proof, an idea, or a suggestion on how to proceed, please let me know. Any help is appreciated. | Let $A$ be a (skew-) symmetric matrix over $\mathbb{Z}/2$. (In fact, I would take $A$ as the linking matrix of an oriented framed link in $S^3$ or the matrix representing the intersection form on a closed smooth 4-manifold. The following statement however does seem to hold in general.) I am interested in the following linear system over $\mathbb{Z}/2$, $$a_{i1}x_1+a_{i2}x_2\cdots+a_{in}x_n=a_{ii},\quad i=1,\cdots,n.$$ This system is known to always have a solution. (c.f. Saveliev's Lectures on the Topology of 3-Manifolds.) But I cannot see why is this true unless $A$ is nonsingular over $\mathbb{Z}/2$. Is there a general method to deal with these kinds of linear systems? |
I recently got a laptop that came pre-installed with Windows 8. I would also like to run Linux, but I do not want to remove Windows, as many of the programs I use for school are only Windows-compatible. I successfully booted using a USB into 'try Ubuntu', but when I went to install the only options were to overwrite Windows or 'something else' - it said no other operating system was detected. I did some research into partitioning, but the guides all said to back up a Windows image (or something like that) in case something went wrong. However, I don't have any way of backing up (all my USB sticks are <4GB). So I have a few questions: How do I solve the issue with Windows 8 not being recognised? Using the built-in Ubuntu 'install alongside' would be so much easier than partitioning myself (I really don't want to mess anything up) How big are Windows image backups? If they are <4GB I can use my USB stick and feasibly partition myself. | Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions. /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition) Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function? |
I want to calculate the integral $\int \sqrt{1+\sin x}\, dx$. I have done the following: \begin{equation*}\int \sqrt{1+\sin x}\, dx=\int \sqrt{\frac{(1+\sin x)(1-\sin x)}{1-\sin x}}\, dx=\int \sqrt{\frac{1-\sin^2 x}{1-\sin x}}\, dx=\int \sqrt{\frac{\cos^2x}{1-\sin x}}\, dx=\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx\end{equation*} We substitute $$u=\sqrt{1-\sin x} \Rightarrow du=\frac{1}{2\sqrt{1-\sin x}}\cdot (1-\sin x)'\, dx \Rightarrow du=-\frac{\cos x}{2\sqrt{1-\sin x}}\, dx \\ \Rightarrow -2\, du=\frac{\cos x}{\sqrt{1-\sin x}}\, dx $$ We get the following: \begin{equation*}\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx=\int(-2)\, du=-2\cdot \int 1\, du=-2u+c\end{equation*} Therefore \begin{equation*}\int \frac{\cos x}{\sqrt{1-\sin x}}\, dx=-2\sqrt{1-\sin x}+c\end{equation*} In Wolfram the answer is a different one. What have I done wrong? | To find: $$\int \sqrt{1+\sin(x)} dx$$ What I tried: I put $\tan(\frac{x}{2}) = t$, using which I got it to: $$I = 2\int \dfrac{1+t}{(1+t^2)^{\frac{3}{2}}}dt$$ Now I am badly stuck. There seems no way to approach this one. Please give a hint. Also, can we initially to some manipulations on the original integral to make it easy? Thank you. |
I am a Bangladeshi student. I have got student visa from British Virgin Island immigration. Do I need a transit visa to stay airside in Heathrow, as a Bangladeshi going to the British virgin Islands? | Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have. |
Words like wheelbarrow and nailbrush are used mingled, the wheel goes with barrow in inseparable form. On the other hand, words like tank top and high heels as it sounds written separable. On what reasons they're written like this? Is there a clear way to distinguish the correct form and making them in writing? | Are there any rules when to write a set of two (or more) words or abbreviations forming a name of some entity as separate, when to hyphenate, and when to stick them together? These are my findings with ngram: bitwise, bit-wise, but never bit wise sci-fi, but never sci fi, or scifi wastelands (increasingly frequent), waste lands (dying out), never waste-lands fanfiction or fan fiction, but almost never fan-fiction, but fanfic, never fan fic or fan-fic read-only or read only, rarely readonly twofold (frequently), two-fold (rarely), two fold (minimal) bittersweet (rise), bitter-sweet (decline), bitter sweet (minimal), but... sour-sweet (frequent), sour sweet (less frequent), soursweet (even less frequent) all-nighter (dominant), allnighter (infrequent), all nighter (somewhat less frequent) cross-country (gaining), crosscountry and cross country (about equal, not infrequent) overnight (rise), over night (same as overnight until 1920, then drops to 0), very rare over-night. In particular, if I'm coining a new blend, which rules should I follow when deciding which of these three forms to give it? |
So i was making an alarm clock with python using tkinter I set up my layout for i wanted it to look, then i decided to implement the plus button in order to increase the number of minutes or hours by which i wanted to set the alarm For some reason, it says that the 'demo_hour' variable has been refered to before the assignment Is there something wrong with the logic in my code? The needed code: demo_hour = 0 demo_minute = 0 demo_am_pm = "AM" hour = time.strftime("%I") minute = time.strftime("%M") am_pm = time.strftime("%p") mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") # Up/Down commands def u_hr(): demo_hour += 1 mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") def u_m(): demo_minute += 1 mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") def u_ap(): demo_am_pm = "PM" up_hr.config(state=DISABLED) mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") def d_hr(): demo_hour -= 1 mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") def d_m(): demo_minute -= 1 mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") def d_ap(): demo_am_pm = "AM" dw_hr.config(state=DISABLED) mytime.config(text=f"|{demo_hour}| : |{demo_minute}| |{demo_am_pm}|") The needed error: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Users/veresh/Desktop/Python Projects/alarm.py", line 112, in u_hr demo_hour += 1 UnboundLocalError: local variable 'demo_hour' referenced before assignment | The following code works as expected in both Python 2.5 and 3.0: a, b, c = (1, 2, 3) print(a, b, c) def test(): print(a) print(b) print(c) # (A) #c+=1 # (B) test() However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons: Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error? The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists. Could someone please explain this behavior? |
I want to create new json object from exiting one, because if I create from var person1= { First Name: 'John', Last Name: 'Smith', age: 54, dateofbirth: '31-08-68', } var person2=person1; delete person2.age This will also delete age from the person1, I don't want to delete age from person1, but person2. Because I need to initialize other person also. So How I create new json object from exiting object . | What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency. I've also seen recursive copying functions with various flaws. I'm surprised no canonical solution exists. |
I'm sorry but this is my first project i'm watching a tutorial and this is what it looks like in viewport shading | I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips? |
There's an obscene yet often used expression in Russian which sounds exactly like this: "Сделать что-то на отъебись" Which means you do/create/complete something just enough so that it worked (often in a very bad, barely sufficient, shoddy way) and not a single bit more. As a result of such "work", the product can be used for its primary purpose but it leaves a very bad aftertaste and in certain cases can even be dangerous. Is there a similar expression in English? A literal translation would be "To do something [so that you or someone else] fucked off". | Imagine you are surviving in the wilderness traveling in a wandering manner. You've found this landscape that is wonderfully abundant in food and basking in a very favorable climate. Therefore, you decide that this is your new residence. Night is approaching, so you haphazardly piece together a makeshift shelter to make for a more enjoyable living experience while you get your act together. This shelter is only temporary. After you've become familiar with the land and have gathered finer resources, you will begin creating a proper home complete with securities, amenities, and furnishings. The word I am looking for is an adjective meaning something similar to "created recklessly for temporary use." The shelter you were building on your first night was a(n) ________ abode. The words and phrases "ad-hoc", "off the cuff", "on the run" came to my mind, but none of those are understood to mean what I am trying to communicate (in fact, two of them are not even close). If you think of a word with a meaning that you believe to be similar to what I am searching for, I'd love to hear from you! Thank you. |
At the climax of Star Wars: The Rise Of Skywalker Rey dies while killing the bad guy, Palpatine. Then Ben Solo, comes and uses Force Life Transfer++ to save her life. But in the process, he dies and vanishes. So why did he vanish upon his death but she didn't vanish upon hers? | Some Jedi disappear when they die: In Star Wars Episode IV: A New Hope At the end of his duel with Vader on the first Death Star, Obi-Wan Kenobi let down his guard and concentrated for a moment, disappearing entirely just as Vader's lightsaber passed through his empty robe. In Star Wars Episode VI: Return of the Jedi When Luke returned to Dagobah in the Return of the Jedi, Yoda also disappears when he peacefully dies. In Star Wars Episode VIII: The Last Jedi When Luke is exhausted after “being” on Crait he looks into the Horizon and disappears. And others don't: Star Wars Episode I: The Phantom Menace When Qui-Gon Jinn's dies after his duel with Darth Maul, he doesn't disappear and is cremated. Star Wars Episode VI: Return of the Jedi When Vader/Anakin Skywalker dies on the second Death Star, he does not disappear and he is cremated by Luke. Also, they all became a "ghost" after their death. |
Here is the code below. plt.figure(figsize=[15,7]) sm.tsa.seasonal_decompose(bitcoin_month.Weighted_Price).plot() print("Dickey–Fuller test: p=%f" % sm.tsa.stattools.adfuller(bitcoin_month.Weighted_Price)[1]) plt.show() When I release it I get the following output. Every time I change the figsize the size does not change. Please assist. | How do you change the size of figure drawn with Matplotlib? |
In the world you teleport to when you drink the X potion, is it possible to kill "yourself" without dying? Put the answer under a spoiler. | When I use the X Potion from any level, I get teleported to an area where I fight myself. But, I can't seem to win! Whenever I try to heal, the other me heals as well, so I keep dying before I can kill myself! How can I win? |
Uniform fields are created by setting up a potential difference between two conducting plates placed at distance (d) from one another: The electric field equation is: $\vec{E}=kQ/r^2$ so if you have 2 plates(+,-) with distance d. then the electric field should be: $\vec{E_{tot}}=\vec{E_{+}}+\vec{E_{-}}$ $\vec{E_{+}}= k(Q)/(d)^2$ $\vec{E_{-}}= k(-Q)/(1-d)^2$ $\vec{E_{tot}}=k(Q)/(d)^2 + k(-Q)/(1-d)^2 $ but isn't this field proportional to: $\frac{1}{d^2} +\frac{1}{1-d^2} $ which is not a constant? I imagine the filed to be stronger near the plates and weakest in the middle. | I know from Gauss law, it is $\vec{E}=\dfrac{\sigma}{2 \epsilon_0}(\hat{n})$ at all points. But it doesn't make sense because of the inverse square nature of electric field which suggests if you move further away from the plane, electric field must reduce. Then why is electric field of an infinite plate constant at all points? |
So in Skyrim going to one town near a river a regular troll is outside the entrance down the slope of the hill and you have to walk past him I ran using my whirlwind sprint you learn from the greybeards... After running I had made it to the town all the towns people pulled out weapons and it turns out the troll had followed me from the river to the town itself and this was when I was over encumbered yet the cool down was fairly quick so I was a ways ahead and on your way to the greybeards the first time you pass by a frost troll I would really like to level some skills against them yet I also want it to be quick any tips? | So I've run into two frost trolls so far. The first one I took advantage of bad pathing which I feel bad about because it ruined the game immersion. The second one I used a full unrelenting shout and got a bunch of free shots in while it was unconscious, but then had to back off since it really didn't go down more than 1/4 of its life. I finally took advantage of bad pathing to run past it to the end of the dungeon. This feels really odd because I have taken down a handful of dragons, including once being attacked by two at the same time. Is there any good strategy to kill a frost troll which won't make me feel like I'm glitching the game? |
I've written the following code*: function val = newton_backward_difference_interpolation(x,y,z) % sample input : newton_backward_difference_interpolation([0.70 0.72 0.74 0.76 0.78 0.80 0.82 0.84 086 0.88],[0.8423 0.8771 0.9131 0.9505 0.9893 1.0296 1.0717 1.1156 1.1616 1.2097],0.71) % sample output: % X-Input must be equidistant % -1.1102e-16 n=numel(x);% number of elements in x (which is also equal to number of elements in y) h=x(2)-x(1);% the constant difference %error=1e-5;% the computer error in calculating the differences [It was workaround where I took abs(h-h1)>=error] if n>=3% if total elements are more than 3, then we check if they are equidistant for i=3:n h1=x(i)-x(i-1); if (h1~=h) disp('X-Input must be equidistant'); disp(h1-h); return; end end end ... I also wrote a function for calculating inverse of a matrix** where this: a=[3 2 -5;1 -3 2;5 -1 4];disp(a^(-1)-inverse(a)); displays this: 1.0e-16 * 0 -0.2082 0.2776 0 0.5551 0 0 0.2776 0 Why is there a small difference of 1e-16 occuring? Am I right in saying that this is because computer calculations (especially divisions are not exact)? Even if they are inexact, why does a^(-1) provide more accurate/exact solution (Sorry If this question is not programming related in your view.) Can this be avoided/removed? How? *for newton backward difference interpolation: (whole code at ), the expected output is 0.85953 or something near that. **using Gauss-Jordan Elimination: (whole code at ) | I am writing a program where I need to delete duplicate points stored in a matrix. The problem is that when it comes to check whether those points are in the matrix, MATLAB can't recognize them in the matrix although they exist. In the following code, intersections function gets the intersection points: [points(:,1), points(:,2)] = intersections(... obj.modifiedVGVertices(1,:), obj.modifiedVGVertices(2,:), ... [vertex1(1) vertex2(1)], [vertex1(2) vertex2(2)]); The result: >> points points = 12.0000 15.0000 33.0000 24.0000 33.0000 24.0000 >> vertex1 vertex1 = 12 15 >> vertex2 vertex2 = 33 24 Two points (vertex1 and vertex2) should be eliminated from the result. It should be done by the below commands: points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :); After doing that, we have this unexpected outcome: >> points points = 33.0000 24.0000 The outcome should be an empty matrix. As you can see, the first (or second?) pair of [33.0000 24.0000] has been eliminated, but not the second one. Then I checked these two expressions: >> points(1) ~= vertex2(1) ans = 0 >> points(2) ~= vertex2(2) ans = 1 % <-- It means 24.0000 is not equal to 24.0000? What is the problem? More surprisingly, I made a new script that has only these commands: points = [12.0000 15.0000 33.0000 24.0000 33.0000 24.0000]; vertex1 = [12 ; 15]; vertex2 = [33 ; 24]; points = points((points(:,1) ~= vertex1(1)) | (points(:,2) ~= vertex1(2)), :); points = points((points(:,1) ~= vertex2(1)) | (points(:,2) ~= vertex2(2)), :); The result as expected: >> points points = Empty matrix: 0-by-2 |
Let's say you are tasked with backing up a Windows installation. You could back up everything, but that's inefficient. One can make a backup more compact by considering these directories: (1) Much of what can be found in C:/WINDOWS is also replaceable by just reinstalling the system from scratch (and although you may not get back the exact binaries you had on the system due to updates, there is seldom a logical reason to hold onto old versions of Windows system files). (2) Most of the things in C:/Program Files is replaceable; for instance if you want to get FireFox up and running again, just re-download the binaries from their website. Even large pieces of software such as Adobe's over-priced Creative Suite is reconstructible provided you back up the easy to store key. (3) The data that is irreplaceable is pretty much everything in C:/Users (especially in the oft-forgotten subdirectories related to AppData). This obviously needs to be backed up. Aside from those three obvious locations, what other parts of a Windows can or cannot be replaced, and should be considered when backing up a Windows system? For instance, from what I understand, the registry (which will have unique data in) is actually stored physically somewhere on the harddrive as well. | A couple years ago, my father made a backup of one of our computers using Windows Backup and Restore. It was either Windows Vista or Windows 7, not sure which. He backed up the entire computer, including Program Files, AppData, My Documents, everything, and now it is on .zip files on a WD Passport with 300GB, I'm not sure exactly what it is called. Now I am trying to decide which files to keep and which to delete. Most of what we would keep are files, as we would need CD's to use the programs, and I'm pretty sure they would install everything all over again. That pretty much leaves out Program Files, however, I'm not sure about AppData. For example, my mother used Greetings Workshop and wants some files from there, and she may want to keep some default settings she used. I am talking generally here, as I'm sure some programs have different ways of saving things in AppData. What, if anything, should I keep from AppData, and what should I delete? |
Let $Y_1,Y_2$ are two (Zariski) closed subsets of $\mathbb{A}_k^n$, for any field $k$. Then how do I show that $\mathcal{I}(Y_1 \cap Y_2)= \text{rad}(\mathcal{I}(Y_1)+\mathcal{I}(Y_2))$. Clearly $\text{rad}(\mathcal{I}(Y_1)+\mathcal{I}(Y_2)) \subseteq \mathcal{I}(Y_1 \cap Y_2)$. How can I prove the converse ? I need some help. Thanks. | I want to prove that $I(X_1 \cap X_2) = \sqrt{I(X_1)+I(X_2)}$ for algebraic sets $X_1=Z(G_1)$ and $X_2=Z(G_2)$, with $G_1,G_2 \subseteq \mathbb{K}[X_1,\ldots,X_n]$. Remark: Unfortunately I named the indeterminates $X_1,X_2,\ldots$ but obviously the first ones $X_1,X_2$ are algebraic sets and not indeterminates. I've already proved $\supseteq$ but I'm struggling with proving $\subseteq$. The problem is equivalent to prove that, if $g \in I(X_1 \cap X_2)$, then $g^n \in I(X_1)+I(X_2)$ for some $n \in \mathbb{N}$, but the $+$ is bothering me... some hint can definitely put myself in the right way. Also, I'd like to: Interpret geometrically what it means to have $I(X_1 \cap X_2) \neq I(X_1)+I(X_2)$, thing that I don't see at all. |
I'm writing a lengthy project which needs to be in 12pt, but my appendices make use of \small and \tiny commands which only align correctly in 10pt since there is a large amount of numerical data in multiple columns across the pages (these get too squished together and overlap in any higher font size). I have separate sections and \include those files, and wish only to set the appendix section in a smaller font. I reference to the appendix and it contains many figures so can't make it a separate document. I'm trying to use \fontsize{10}{12}\selectfont but it's not working. Sometimes it doesn't change anything, at the moment it makes the font slightly smaller but not 10pt size. Code: \documentclass[12pt]{article} \usepackage{graphicx} \usepackage{multicol} \includeonly{intro,theory,appendix} \begin{document} \include{intro} \include{theory} %...etc {\fontsize{10}{12}\selectfont %<---this doesn't work \include{appendix} } \end{document} I'm fairly new to LaTeX and self taught, so most of my help comes from googling and ending up here, but I'm really stuck at this one and the solutions to similar questions don't seem to work for me. makes the font size correct but seems to add the page margins twice in the appendix, so that the whole appendix text is too far down and too far to the right. | Inside a 12pt document I like to switch in an environment to a font size of 10pt. The macros like \normalsize, \large, \small etc. should all work like in a 10pt document. I'm aware that this isn't good typography and might look bad in general. I'm planning to use it for the labels inside a tikzpicture. The task (I don't like to call it a "problem") is that I have some standalone tikzpicture documents which are using 10pt when compiled standalone, but can be also inserted into 12pt documents where the text does not fit any more in some places. I know it could be fixed by changing all distances to one of the font size specific units em or ex, but don't like to change several figures and maybe add this as a feature to the standalone package. |
I am making some photo-realistic rocks in Cycles, and I made a material using nodes, and combined two images using a bunch of modifiers and then connected them to the rocks material node. How can I take the rocks material and save it as an image? I've tried to bake it, but I can never find where the baked image is. Thanks in advance. | How can I change my object material to an image texture? I want to be able to export a blender material applied to an object as (for example) a .png file. Is this possible ? |
I accidentally deleted /etc/ssh/ssh_config file. I've tried purging and re-installing openssh-server and ssh but the file doesn't return. How would I restore this file? | By accident, I messed up a configuration file. How do I recover the default version without reinstalling or affecting other things? |
the below is what confuses me: In terminal, I tried these codes: >>> a = 1900 >>> b = 1900 >>> a is b False >>> c = 1 >>> d = 1 >>> c is d True As I think, these result comes from what I read from this post: : Python caches small integer objects for performance reasons. So 'a is b' will return false because they point to different objects (obviously they are not small integer objects). But when I try this part of code on PyCharm venv, the result comes to different: a = 1900 b = 1900 print(a is b) console shows 'True' Why does this happen? they have the same python version: Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 03:13:28) [Clang 6.0 (clang-600.0.57)] on darwin | My has failed me. In Python, are the following two tests for equality equivalent? n = 5 # Test one. if n == 5: print 'Yay!' # Test two. if n is 5: print 'Yay!' Does this hold true for objects where you would be comparing instances (a list say)? Okay, so this kind of answers my question: L = [] L.append(1) if L == [1]: print 'Yay!' # Holds true, but... if L is [1]: print 'Yay!' # Doesn't. So == tests value where is tests to see if they are the same object? |
I'm working on a small java program, and I was wondering if there was an equation to calculate the approximate velocity of a falling body, in function to its mass $M$ and the time $t$ since the beginning of the fall (example; Body $A$ of a mass of 57kg has a velocity of $y$ after 11 seconds of fall) I googled it and the only equations I found were either in function of time or mass, but never both. Sorry if this comes out as a rudimentary question, I'm a computer science student, my last physics course was in high school. | I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time. According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance. BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it. I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact". Can someone explain this to me? I feel pretty dumb right now :) |
Well, I'm using \newcommand{\Name}{Name } so I can change the name for different versions of my pdf. When I use it like {Name }, with a space bar, sometimes in the text it gives 2 spaces, and sometives gives 1. "Name Age" wrong or "Name Age" The way I want to be But if I use it like {Name}, without a spacebar they just unify words. like "NameAge".again wrong I'd like to know if someone know how to solve, or another way to just change the command for a word that it is not a new command maybe. | I have a definition: \newcommand{\arnold}{Arnold Schwarzenegger} When I refer to it by: \arnold is a it is rendered as: Arnold Schwarzeneggeris a In order to have a space in front of "is" I would need to write \arnold\ is a Is there some other shorter way? |
I often find myself forgetting what I installed to get a certain command. On my Arch machine, I can simply run pacman -Qo $(which <command>) and it finds the associated package. Does anyone know of a way to do this using brew? | $ brew link binutils Linking /usr/local/Cellar/binutils/2.24... Warning: Could not link binutils. Unlinking... Error: Could not symlink file: /usr/local/Cellar/binutils/2.24/share/info/configure.info Target /usr/local/share/info/configure.info already exists. You may need to delete it. To force the link and overwrite all other conflicting files, do: brew link --overwrite formula_name As I see I can not link binutils because there is configure.info file in my filesystem. I am just wondering if there is any way to know which of installed home-brew formulas had installed this file ? |
I'm new to dual boot and don't know much about it. I installed Ubuntu 18.04.2 on a USB key and booted from it (I chose the UEFI option). My computer has 3 hard drives (one 250 Gb SSD with Windows, one 2Tb HDD with games and one 1Tb SSD with nothing on it. This one was completely "unalocated"). When installing Ubuntu, it only showed the option to erase disk. I picked that and selected the 1TB empty SSD. I completed the installation. Now, I have several problems. 1) My computer boots directly to Ubuntu. To boot on Windows, I need to press F12 and choose to boot from the 250 Gb SSD. I tried to install grub, then did a reboot but it didn't change anything. I tried to install boot-repair, but I get the error "GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again.". I don't know what to do now and I'm afraid to srew things up beyond repair. 2) I have a GTX 2080 and a i9-9900k. Ubuntu doesn't recognize the graphics card so I get very weird graphical issues (also my 2nd monitor isn't recognized). I tried to install nvidia drivers but it didn't work. Apparently this has something to do with removing "secure boot" ? | Since I updated Windows to 8.1 my Grub menu disappeared. I ran Ubuntu using Live USB, I used Boot-Repair but something went wrong. If I click on Reccomended repair I get this error: GPT detected. Please create a BIOS-Boot partition (>1MB, unformatted filesystem, bios_grub flag). This can be performed via tools such as Gparted. Then try again. Alternatively, you can retry after activating the [Separate /boot/efi partition:] option. So I tried to set my sda9 (I think that it's the Ubuntu system partition, since it's ext4) with the bios_grub flag and then to run Boot-Repair again. It didn't work. I don't know what to do. My Grub was working fine (using UEFI) before I updated Windows. I removed the bios_grub flag. Then I used fsck and it didn't find any error. So I tried again with Boot-Repair but it always gives me the "GPT detected" error. My boot is on UEFI mode, Secure Boot is "off". When I boot my PC with SecureBoot OFF, I can reach the GRUB menu. But it's empty (the only voice is "System Setup"). I mounted my Ubuntu system disk: sudo mount /dev/sda9 /mnt and the other things: sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys I logged on the system with chroot: sudo chroot /mnt I re-installed grub: grub-install /dev/sda update-grub2 But it still doesn't work. |
I am a US citizen and have been granted a temporary residence permit in Sweden on the grounds of visiting my father who lives there. I first stayed in the Schengen area for the full 90 day period which is allowed on the free US travel visa, and received the temporary residence permit on the last day of this period. It extended my stay in Sweden by 5 1/2 months and only allows me to stay in Sweden. When this extension expires in March, I would like to take some time to travel in the rest of Europe. I want to know if I am legally allowed to do so. I know that US citizens are allowed 90 days in 180 day period, and my 180 days are up in Jan, but I will stay in Sweden until March. Would it be best for me to exit Schengen from Sweden and then reenter through another country? Or do I have to go home? | I have a 1-year residence permit from one Schengen country that is now expiring. Upon its expiration, I would like to get my 90/180 days validity as a tourist to stay, or return here as soon as possible. I understand that the tourist short-stay scheme is based on the 90/180 days "counter". But what happens if my previous stay was not tourism but residence (as searching year). Wouldn't that mean that I can quickly exit and re-enter the Schengen area to activate my tourist stay? Also, is there a way to change this purpose of stay without exiting the Schengen area? |
I'm trying to create a button so that when clicked, a specific element stored in an associative array will get deleted. But what I've done doesn't seem to work. Any help will be appreciated. // Creates the button bodyText = bodyText + '<input type="button" id="btnDeleteQuestion" value="Delete a question">'; document.getElementById("btnDeleteQuestion") .addEventListener("click", function() { // Deletes the third question stored in the questionBank delete questionBank[2]['questionText']; console.log(questionBank); }); } | How do I remove the key 'bar' from an array foo so that 'bar' won't show up in for(key in foo){alert(key);} |
It can be difficult to navigate the magnitude of answers available on certain types of posts. These posts usually span multiple pages and by definition hide a lot of information. While reading all the answers is a great way to understand the issues, there are posts with 5+ pages of answers. There is no way that most users have read all the answers (Some? Maybe), but most people want to be more efficient when going through these types of posts. You don't read a scientific paper first. You read the abstract continue from there. What I am suggesting is an "abstract" for these confusing, and/or controversial posts. From the last 2 months, these are the posts that come to mind that would benefit from an "abstract" of some kind Is there a better way to navigate through all the answers and confusing parts of the post in a way that will allow others to understand the post and answers more clearly? For clarity, this would not apply for your everyday Meta posts. This is only for those posts that produce multiple pages of answers. That heavily reduces which posts this would apply to. | on StackOverflow, I asked a . There are many good answers but I can not accept just one of it. I would prefer to create my own answer where I summarize all answers. Is that allowed? |
I set my password to ir****3 when installing Ubuntu, but when I try to use su - postgres on terminal and enter tge same password it shows authentication error: you are not a root user. How can I fix this? | I've installed PostgreSQL 9.1 and pgadmin3 on Ubuntu Server 13.10. I configured postgresql.conf with: listen_addresses = '*' also I configured ph_hba.conf by changed peer connections to md5 Plus I reset the password of postgres by: sudo password postgres then restarted the service with sudo /etc/init.d/postgresql restart after that I tried to connect to the default PostgreSQL template database: sudo -u postgres psql template1 but login failed with this error message: psql: FATAL: password authentication failed for user "postgres" then I tried to login from the pgadmin, which gave me the same error. I've read here that it might be a password expiry dates bug but I couldn't solve it coz I cannot login with psql. Does anyone now how to resolve this issue? EDIT ph_hba file: Screenshot: |
I am planning to build an archer for my next D&D character for Adventurers League. I will be going three levels in fighter to pick up the Battle Master Archetype and from there I am considering multiclassing as a ranger. I have been away from D&D for the better part of 2 years and am unfamiliar with the ruling regarding the revised ranger from Unearthed Arcana in league play. My question is thus: can I use the revised ranger in Adventurers League and if not, is their any point in going ranger otherwise? I remember that the ranger was really underpowered and I know Unearthed Arcana addressed this issue. Also just to note, I am not planning on going beast master. | Are classes and other material from Unearthed Arcana articles legal to use in Adventurers League, or are they a kind of beta phase intended for playtest only before they go official? |
I created a presentation in Beamer. But, my table did not fit the page. I have 5 columns and 5 rows. But just 3 rows and columns appear in the page. | I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met: The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction. What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist? |
Is there an inherent Microsoft-Exclusive way of obtaining Windows 10 Activation keys from existing installations? Even if this is not necessary with Windows 10 specifically, I want to emphasize my interest in non-3rd-party ways of getting such keys from prior versions of Windows too. Unnecessary Background Info: I've upgraded numerous workstation to Windows 10 from Windows 7 and Windows 8. I want to reinstall Windows 10 from scratch on one of these workstation, but I don't want to have to install windows 7 (or 8) first. Before doing this, I'd like to obtain the activation key from the current installation of Windows 10. In the past, I've always resorted to using 3rd Party software to obtain keys, but have never liked doing so. Is there an inherent Microsoft-Exclusive way of obtaining Windows 10 Activation keys from existing installations? | I have not found any information from MS - only speculations from people like me, so I hope someone here has had better findings. When I upgrade a qualified version of Windows to Windows 10 and then want to do a clean install, I've heard that the installer won't ask for a key. But what if my HDD is formatted before I attempt the clean install? How does Windows 10 try to detect the valid "upgraded" status? It seems that it doesn't in such a case, at least as far as I've tested. So my question is: In that (or a similar) scenario: How do you clean install Windows 10? In my case it's actually even more complicated. I'm from Germany so I can re-use OEM-licenses due to law. I have two qualified Windows OEM licenses which I both installed in a VM on my Linux installation and upgraded both to Windows 10. Now I want to install one of them onto my bare physical machine - how would that be possible? Is there an official way of doing this or do I need to wait for those unofficial "backup license"-tools being updated to work with Windows 10? |
I am trying to upload a scanned image to the new Google Photos app (Windows Desktop). For some reason changing the exif info to 1982 still puts the photo as uploaded today. So my photo collection is not sorted by date taken. Is this fixable? | I have just viewed my Google Photos account and already have a couple of pictures in my account – it seem to have fetched it from Google+, Picasa or whatsoever. Now I have a bunch of pictures that always appear on top of all the other photos because they – erroneously – are dated in 2075. Is there a way to modify the date online? Update First of all, in Picasa, instead of being dated 2075, photos and albums are dated 1970. And following does not wholisticly help: I can redate the albums, but not the photos themselves. And on Google Photos, the default view are the pictures, not the albums, which is still very annoying. Any other hints? I want to avoid having to download, delete, redate and reupdate all misdated photos. Update 2 |
Suppose I have two lists ['a', 'b'] and ['m', 'c']. Is there a quick and dirty way to "multiply" them in such a way that the resulting array would be the list of combinations of each element in both arrays, i.e., [ ['a', 'm'], ['a', 'c'], ['b', 'm'], ['b', 'c'] ] | How can I get the Cartesian product (every possible combination of values) from a group of lists? Input: somelists = [ [1, 2, 3], ['a', 'b'], [4, 5] ] Desired output: [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...] |
I am new to Linux and have been poking around a lot in Terminal. I launched Firefox from the command line and noticed that I began getting the below. It still opens and seems to run as it should. I don't remember seeing this before deleting Chrome or before using proxychains. Any thoughts? (firefox:8321): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:8321): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed (firefox:8321): GLib-GObject-CRITICAL **: g_object_ref: assertion 'object->ref_count > 0' failed (firefox:8321): GLib-GObject-CRITICAL **: g_object_unref: assertion 'object->ref_count > 0' failed | I tried to open Software Center using the command line software-center and it did work. I mean, Software Center opened and works fine, BUT, at the same time, in the Terminal window I see a lot of strange errors. How can that be? I'm puzzled. Is there any explanation for this (and a fix for it)? I repeat, the app does open and it works fine, is only the lines in the background that show that something is not all right. Here are the screen-shots with all the lines. |
I have a bank account in EU in euros and want to remit some funds to my Indian NRE account. What is the most efficient way to remit the funds to my NRE account: Which methods give the best currency rates? Which methods are the quickest? What the fees involved with different methods? Searching around the internet gave me some commonly used services like money2india, hdfcremit, yes remit. Are there other services that will give me a better exchange rate? What services would be recommended? | I have a bank account in Germany in which I receive my salary in Euros. I want to deposit a part of it in my Indian bank account for personal savings. My Indian bank account is in INR. As I see it, I have two options: To use a remittance service that converts my Euros into INR and deposits in my account. I am not sure how it works. The service (which I know is reliable) I signed up for asks me to deposit Euros in a certain account ("funding") which will be converted to INR and deposited in my account. How does that work exactly? Use my bank's service to make a international bank transfer to my account. Is that even possible, given that my Indian account is in INR? Will I incur higher conversion fees and lower exchange rate? In general, what are the pros and cons of each of the above methods? And are there any other methods? |
I was reading Allen Hatcher's proof of the Brouwer's fixed point theorem using the no retraction theorem. That is, we want to prove that every continuous $f: \mathbb{D}^n \to \mathbb{D}^n$ has a fixed point $f(x) = x$, by contradiction. The no retraction theorem says there is no continuous $r: \mathbb{S}^{n-1} \to \mathbb{D}^n$ such that $r \mid_{\mathbb{S}^{n-1}}(y) = y$. i.e. $r$ restricted to $\mathbb{S}^{n-1}$ is the identity functon. Suppose a continuous $f$ exists with no fixed point. Then, define $r(x)$ by the point on the line $tx + (1-t)f(x)$ intersecting $\mathbb{S}^{n-1}$. The book, and lecture notes that I looked up, say this is clearly continuous. Question: How do we proof that $r(x)$ is continuous? | Take a continuous mapping $f: \bar{B^{n}} \rightarrow \bar{B^{n}}$, where $\bar{B^{n}}$ is a closed unit ball in $\mathbb{R}^{n}$. Assume that $f(x) \neq x$ for every $x \in \bar{B^{n}}$. Define another function $r$ by following the directed line segment from $f(x)$ through $x$ to its intersection with $\partial B^{n}$, and let the intersection point be $r(x)$. Is it immediately evident that $r$ is a continuous function? Is so how does it follow? Thanks. |
When I'm trying to push new name in to my array, enter key don't respond and there for I can't add another names. Part of the JS: $("input[type='text']").keypress(function(event){ if(event.which === 13){ var newName = $(this).val(); $("#" + "newName").append("#" + names); names.push(this.value); } }); My | How do I append an object (such as a string or number) to an array in JavaScript? |
I am about to upgrate from 17.10 to 18.04 but I'm afraid to lose all my Gnome desktop preferences in the process (always been using Unity until 17.10). I made many changes through "Gnome Tweak tool" and I would like to backup all the current config so I can restore it in my new installation (the same question applies for a fresh At the same time, I'd like to know if there's a similar way to backup all other configuration for Gnome in general (Nautilus, etc.) Any info would really help, thank you in advance... | The problem: I have two machines, both with Ubuntu Gnome 14.04 up-to-date, and both with installed the latest CrossOver Linux(1) to run MS Office 2007 on it. I know, it's a proprietary program, but the problem is more general and affect Wine too. Please do not stop reading. Both machines have a spanish keyboard working well most of the time (showing sometime a but I think it's unrelated). The problem is that on one of them there is a set of program running under Crossover Wine affected by a on some program, notably MS Office Word (there is also ). Disabling IBus in Language Support -> Change Keyboard input method and unsetting XMODIFIERS works on one machine but not on the other (!). So it must be some strange setting doing the difference... The question Is it possible to dump all the gsetting/dconf/whatever configuration database(2) in a readable file so that I can check differences with diff -u? I know that gsettings list-recursively org.freedesktop.ibus.general works, but I am quite puzzled that gsettings list-recursively org.freedesktop gives the error No such schema 'org.freedesktop' ...so it seems that I can't dump all of the registry in one go. Any hint? Footnotes: (1) This is a version of Wine with added technical support and fixes to run some program better. A lot of the improvement percolates on free Wine, so I think is a good part of the Ubuntu ecosystem; nevertheless I do not add the link to avoid being accused of publicity ;-) (2) Can we call it what it really is --- a registry like the infamous windows one? |
Most of the commandline tools I'm looking at have the ability to pick a field delimiter. However, I'd like to pick one delimiter to start, and a different one to end the segment of text I'd like to remove from each line I'm processing. 1text [blah blah blah] text number punctuation text text 2text text text 3text text (text) [blah blah blah] number text 4text <url> <email> text [blah blah blah] text I'd like to remove all the 'blah blah blah' from those lines. Blah can contain anything, except newlines, EOFs, and other breaky-things, and '['. ie: I shouldn't have '[[' (nor '[blah[') in any of the data I only have one (optional) instance of [] per line. So, for line 2 there is nothing to remove, and this shouldn't cause a halt, stop or failure. I'm almost 100% positive that if I've got a start '[' I also have a ']'. That might be nice to check for, however. There are other forms of punctuation, so I don't want to work it with something that just looks for non-alphanumeric stuff to start removing (ie: line 4) Bonus points for being able to figure out if I'm putting together two (now adjacent) whitespaces at that particular point - but without removing double whitespaces at any other point. I'm pretty sure I'll have to use awk or sed, but if there were a way to do this via regular commandline tools, to make it as portable as possible, that would be ideal. Also, explaining what you're doing (if you're using regex / sed) would certainly help, as: A suggestion says: sed 's/^.*%\([^ ]*\) .*\$\([^$]*\)$/\1 \2/' infile I got that kinda working with this bit of monkeying: cat data | sed 's/^.*\[\([^ ]*\) .*\]\([^$]*\)$/\1 \2/' However it doesn't take out the whole swath of 'blah blah blah', and leaves with an extra line-break. Doesn't really answer the question in a general sense (or, at least I wasn't able to figure something out after reading it - maybe just a fail on my part), but seems to be (too) specifically tailored to that person's data. | I am working with some text that is full of stuff between brackets [] that I don't want. Since I can delete the brackets myself, I don't need the one-liner to do that for me, but I do need a one-liner that will remove everything between them. What about parentheses () instead of brackets? |
I have the following problem that I would like to solve, but I don't know where to look. I have a Machine A that produces candles. According to the pre-setting of the machine, the color, the height, and the width of the candle that is being produced, the machine builds a certain number of candles per minute. E.g., a candle without color, and with a width of 2cm and a height of 10cm, and with a single candle wick, and with the pre-setting mode 1 of the machine, the machine produces 10 candles per minute. If we have a red candle, with a width of 5cm and a height of 15cm, and with a triple candle wich, the machine produces 5 candles per minute. The goal of my model is to find out what is the best configuration setting that it is possible to have for a specific candle type so that we can increase the number of candles to be produced per minute. I created a Neural Network model that takes several features as input, and the dependent variable is the number of candles to be produced per minute. The goal of this model is to predict the dependent variable based on machine pre-settings and candle characteristics. I also use Bayesian optimization to obtain the best hyperparameters of the model. Now, I want to find if there is any other pre-setting of the machine so that we can increase the number of candles to be produced. What can I do to find this pre-setting? The only way that I found to do is the following: Use a brute-force mechanism that tries different configuration settings of the machine in the already trained model, and keep the ones that predicted a higher number of candles to be produced. I don't know if Bayesian optimization could also help me, and what should I do. Can someone give me some directions so that I could start to research it? | I am very new to design of experiments concept. I would like to design an experiment to understand the relationship between input parameters like amount of various ingredients, cooking temperature, time of cooking, etc. vs. the quality of a cake to be baked. Assuming that all input parameters are continuous and range bounded, and the quality of the cake to be assessed by an expert from a scale of 1-5 stars, is the best sampling strategy for input parameters uniform over their ranges? My understanding is that the uniform sampling helps us collect information regarding the entire function space. However in this experiment I am interested in figuring out the best inputs in order to achieve 5-star quality cakes. Therefore is there a better sampling strategy than uniform? |
I can get second highest salary by this query. is it possible to use this query for calculate fifth highest salary?? SELECT max(salary) FROM [Employee] where (EmployeeID not in (SELECT max(EmployeeID ) FROM [Employee] )) please help me... | I'm interested in learning some (ideally) database agnostic ways of selecting the nth row from a database table. It would also be interesting to see how this can be achieved using the native functionality of the following databases: SQL Server MySQL PostgreSQL SQLite Oracle I am currently doing something like the following in SQL Server 2005, but I'd be interested in seeing other's more agnostic approaches: WITH Ordered AS ( SELECT ROW_NUMBER() OVER (ORDER BY OrderID) AS RowNumber, OrderID, OrderDate FROM Orders) SELECT * FROM Ordered WHERE RowNumber = 1000000 Credit for the above SQL: Update: See regarding the SQL standard. Troels, have you got any links we can cite? |
$$f:\mathbb R\rightarrow \mathbb R$$ be the function defined by $$f(x)={{\sin x}\over {|x|+\cos x}}.$$ Then , $A.$ $f$ is differentiable at all $x\in \mathbb R.$ $B.$ $f$ is not differentiable at $0.$ $C.$ $f$ is differentiable at $x=0$ but $f'$ is not continuous at $x=0.$ $D.$ $f$ is not differentiable at $x={{\pi}\over 2}.$ I think option $B$ is correct as we know $|x|$ is not differentiable at $x=0.$ So that immediately makes options $A$ and $C$ incorrect. And the derivative can actually be worked out for option $D$ . So , the correct answer is option $B.$ Am I right $?$ Thanks. | Let $f : \Bbb R \to \Bbb R$ be the function defined by $f(x)= \frac {\sin x}{|x|+ \cos x}$. Then A.$f$ is differentiable at all $x \in \Bbb R$. B.$f$ is not differentiable at $x =0$. C.$f$ is differentiable at $x=0$ but $f'$ is not continuous at $x=0$. D.$f$ is not differentiable at $x=\frac {\pi}{2}$. Using the standard definition of derivative, I get that $f$ is differentiable at $0$ as well as $\frac {\pi}2$. This is as follows, $\lim_{h \to 0} \frac {f(0+h)-f(0)}{h}=1=\lim_{h \to 0} \frac {f(0-h)-f(0)}{-h}$ and $\lim_{h\to 0} \frac {f(\frac {\pi}2 +h)-f(\frac {\pi}{2})}{h}=0=\lim_{h \to 0} \frac {f(\frac {\pi}2 -h)-f(\frac {\pi}2)}{-h}$ using L'Hospital rule at one stage. Hence I eliminate options B and D. Since $0$ was the only doubtful point to check about differentiability, I choose option A as the answer. I regret a little about not knowing how to check validity of option C. Can you tell me how to prove it wrong? |
I've been offered a "weekly allowance" he's asking for my bank login to do mobile check deposits. I know it's probably a scam but i created a completely new bank account. I know my information is on there but is it any safer? Can he still pull information like my social from the account? | Someone is offering to pay me in a sort of sugar daddy/sugar baby arrangement. They want to make online deposits to me, and they're asking me for my online banking username and password. Is that information alone enough for them to be able to take my money out of my account, or am I safe? |
Is there any customs problem while checking at the airport? | I am planning to travel to India (COK airport, Kerala) from United States. I want to take my laptop as well as my tablet (iPad). Am I allowed to take both in my backpack with my documents related my work. I think I am allowed to take only one computer as per the rule. Will the customs consider my iPad as a computer? What all I can take? One of my friends took 2 laptops (1 work and 1 personal) and had trouble at the airport. Also I am planning to take some wristwatches (7 of them, each avg price is 45 $). I read in a website that I can take stuff up to max 35000 INR. Is that true? In that case, how will I manage my stuff? |
I am running a single-user Ubuntu install. When I enter the password to unlock my screen after suspend/timeout, it is the same password I use for sudo - my user password. Is there any way for me to set a different, weaker password for unlocking from sleep, so it's safe to give it to friends that, for example, are reading something on my computer and forget to wiggle the mouse without me having to give them potential root access if they decided to? The only reason I even have a lock screen is so little siblings won't hit random keys and mess up my work when I forget and leave for a minute, so lockscreen "security" is totally a non-issue. I am using GDM / Gnome 3.16 on Ubuntu 15.04. I need to add that removing my login account from sudoers and using another account for sudo-related work is not a solution that I can consider. | How can I give a user one password for normal usage when logging in, and another password for system administration and sudo access? I want one user to have two passwords. |
Let $P(n)$ be the product of the positive integers which are $\leq n$ and relatively prime to $n$. Prove that $$P(n) = n^{\phi(n)} \prod_{d|n}{(d!/d^d)}^{\mu(n/d)}. $$ | Actually, I posted this long ago in MO but did not get a reply as it was unfit. Now this is an exercise in some textbook (I think Apostol), and I would be happy to receive some answers. Let $P(n)$ be the product of positive integers which are $\leq n$ and relatively prime to $n$. Prove that $$ \displaystyle P(n) = n^{\phi(n)} \prod\limits_{d \mid n} \left(\frac{d!}{d^d} \right)^{\mu(n/d)}.$$ |
For some reason I can't seem to find where I can edit the HTML/Scripts in a CEWP via SharePoint Designer. No issues via a browser. | I can add a script or CSS in a webpart via the broswer CEWP > HTML But how do I do the same , what more modify a CEWP with script in it when I am in SPD 2010? I can't seem to figure it out nor can see the script in the CEWP because there id not HTML ribbon button. |
I am trying to install on the ubuntu server 16.04 LTS. for that I have created file /etc/apt/sources.list.d/mongodb-org-3.2.list and added a line as per the doc. echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list Now when I try to download the package list using sudo apt-get update it is giving me below error. nodev@ubuntu:/etc/apt/sources.list.d$ sudo apt-get update E: Type 'echo' is not known on line 1 in source list /etc/apt/sources.list.d/mongodb-org-3.2.list E: The list of sources could not be read. | Every once in a while I see users having issues to update due to errors like this: E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list' with varying types/line numbers/source list files (often after removing a PPA). How can such an error be fixed? |
I come aross an OPE between stress tensor components in CFT which is \begin{equation} T(z)\bar{T}(\bar{w})\sim -\frac{\pi c}{12}\partial_{z}\partial_{\bar{w}}\delta^{(2)}(z-w)+... \end{equation} I am confused about this OPE. Because in general in CFT chial part does not correlated with anti-chiral part, for example in free fermion and boson. So how to derive this OPE? | In his lectures on String Theory (), Tong gives a proof of the Weyl anomaly, using equation $(4.36)$. It seems wrong to me. Here he uses the OPE between the stress-energy tensors $T_{zz}T_{ww}$ obtained when trace vanishes, i.e. $T_{z \bar{z}} = 0$: this implies that they are holomorphic functions $T_{zz} = T_{zz}(z)$. But in this proof he starts from the fact that $T_{z \bar{z}} \neq 0$ (we want to proof this thing after all) and so $T_{zz}$ is not a holomorphic function anymore! In the OPE $(4.36)$ I should have also terms with $(\bar{z}- \bar{w})$. I can't also understand why he uses in the rest of the proof only the singular term $(z-w)^{-4}$, neglecting the other ones $(z-w)^{-2}$, $(z-w)^{-1}$. (The same proof is given in these lectures on conformal field theory, equation $(6.9)$). I'll be really thankful if someone could explain me this proof :) |
I've been exploring some of the Hot Network Questions and I noticed that it doesn't show on I suspect it's a bug | Curious why (se site) doesn't have hot questions list on the right. It also uses the old stackoverflow design. Why has this site's design and functionality been abandoned (or at least look abandoned?) |
I try to test my Java class using python, i use suproccess in a "for loop" >>> import subprocess >>> for x in range(1, 6): ... subprocess.call(["java", "Watermelon"]) ... so when the Watermelon is executing waiting for input... public class Watermelon{ public static void main(String[]args){ Scanner sc = new Scanner(System.in); int w = sc.nextInt(); and i have to input the "value" and press ENTER to Watermelon get the "value" and the loop from python continues and input the "value" again and ... to the end. Can you help me to use "x" in python loop like the "value" to java class... Thanks for your help and excuse me by my English. | How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script? |
var test={ dha1:'Boolean', dha2:'Boolean', dha3:'Number', dha4:'String' } for(x in test){ console.log(test.x); } Here i want my output as Boolean Boolean Number String But its return undefined for all four properties | How do I enumerate the properties of a JavaScript object? I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object. |
why a candle's flame direction is always upward? What is the coposition of fire? Don't say it's energy. There is something else. | I was watching today, and noticed this: in some moment the space station changed orbit and the people inside experienced zero-gravity. At that moment, a candlestick passed floating in the air, with the candles burning (). But in our environment the flames go upward because the hot air is less dense, and that effect should disappear when no gravity is present, am I right? How would a candle flame look then? |
If you ask someone working at a store 'Where's milk?' would that be right grammatically or does it have to be 'Where's the milk?' I know in the kitchen you would say 'Where's the milk?' or 'Where's the salt?' but i'm not sure if it would be the same case here perhaps because in the store you would be talking about milk in general. Even if 'Where's milk?' is wrong, then why does 'Where's milk in this store' sound right? | I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize? The standard rule you always hear: “If a person knows which item you are talking about then use "the" . . . doesn’t clear things up for me, as I have no idea whether or not they know. |
I have a Linux Mint partition on my windows 10 laptop that a friend set up for me a while back to try Linux. Mint played weirdly with my system putting more strain on it than windows 10 did somehow so I just left it to sit there while continuing to use Windows. I am interested in trying Ubuntu, but I can't just ask my friend to do it this time. I have been trying to look up tutorials or guides, but there are surprisingly few and the ones I have found imply it is easy to accidentally wipe out your windows partition. I have a bare minimum of Linux knowledge. I have played around in Linux a tiny bit, and know how to use a bootable USB on a system that can just be wholesale overwritten. But when it comes to the partitions and how you would replace them it seems foreign to me. If nothing else I'd like to find what resources would help someone who has no idea what they are looking at, and I apologize if this is written poorly. This is my first post on the forum. | I'd like to see the full How-To on how to use manual partitioning during Ubuntu installation. The existing guides (at least those I found here) cover only automatic part and leave untouched the manual part (or extremely short and contain no pictures). I'd like to cover such situations: If your disk contains other systems: |
I have an array like $value = array('key1'=>'value1','key2'=>'value2','key3'=>'value3'); I want to convert this array to the following string. key1=value1&key2=value2&key3=value3 I have tried with implode function, but it returns only values of the array implode($value,"&"); // returns value1&value2&value3 Is there any simple way to achieve this ? | I'm looking for the name of the PHP function to build a query string from an array of key value pairs. Please note, I am looking for the built in PHP function to do this, not a homebrew one (that's all a google search seems to return). There is one, I just can't remember its name or find it on php.net. IIRC its name isn't that intuitive. |
I am trying to build the Linux kernel using make xconfig but I get : $ make xconfig CHECK qt * Unable to find the QT4 tool qmake. Trying to use QT3 * * Unable to find any QT installation. Please make sure that * the QT4 or QT3 development package ts correctly installed and * either qmake can be found or install pkg-config or set * the QTDIR environment variable to the correct location. * make[1]: *** No rule to make target `scripts/kconfig/.tmp_qtcheck', needed by `scripts/kconfig/qconf.o'. Stop. make: *** [xconfig] Error 2 So I used Synaptic package tool to install Qt, now there are some of Qt things installed already and some are not. It specifically said to have qmake, I installed from Synaptic, again the same error as above. How can I know which packages xconfig needs? | Not for any specific program, just in general if I wanted to install something via APT how do I know what packages I need to "apt-get install" for that program |
So I just started using bodegraph but no graph at all. Always from this pdf . \documentclass{standalone} % \usepackage[utf8]{inputenc} %% % \usepackage{pgf} % \usepackage{tikz} \usepackage{bodegraph} % per i diagrammi di Bode \begin{document} \begin{tikzpicture}[xscale=7/4] \begin{scope}[yscale=3/40] \semilog{-2}{2}{-20}{20} \BodeGraph[asymp lines,samples=100]{-2:2} {\POAmpAsymp{6}{0.3}} \BodeGraph{-2:2}{\POAmp{6}{0.3}} \end{scope} \begin{scope}[yshift=-2.5cm,yscale=3/90] \semilog{-2}{2}{-90}{0} \BodeGraph[asymp lines,samples=100, const plot]{-2:2} {\POArgAsymp{6}{0.3}} \BodeGraph{-2:2}{\POArg{6}{0.3}} \end{scope} \end{tikzpicture} \end{document} but it only show me the empty grid. As @Marijn suggested in a previous post, I tried only with the code for the bodegraph. Still the same... And the result shoul look more o less like this: Tanks in advance Fr3d | I'm using pdfLatex (with --shell-escape option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: . After correcting that error the code compiles smoothly but just displays the logarithmic grids, not the function. The gnuplot files are created in the right place, but the graphic doesn't come out in the PDF. Code from : \documentclass{article} \usepackage{tikz} \usepackage{bodegraph} \begin{document} \begin{tikzpicture}[ gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before) ] \begin{scope} \UnitedB \semilog{-1}{2}{-50}{60} \BodeAmp{-1:1.35}{\POAmpAsymp{4}{2.0}+\IntAmp{1}} \end{scope} \end{tikzpicture} \end{document} Any clues? |
I'm new to Xcode and am trying to make a simple application where I enter a value hit a button and the value is passed to the next view and displayed. I am having trouble finding content on the internet on how to do this. I created a Single View Application and another view controller, then connected them with a modal but cannot figure out how to pass values between the two. Any pointers or good references would be awesome. | Being new to objective-c, cocoa, and iPhone dev in general, I have a strong desire to get the most out of the language and the frameworks. One of the resources I'm using is Stanford's CS193P class notes that they have left on the web. It includes lecture notes, assignments and sample code, and since the course was given by Apple dev's, I definitely consider it to be "from the horse's mouth". Class Website: Lecture 08 is related to an assignment to build a UINavigationController based app that has multiple UIViewControllers pushed onto the UINavigationController stack. That's how the UINavigationController works. That's logical. However, there are some stern warnings in the slide about communicating between your UIViewControllers. I'm going to quote from this serious of slides: Page 16/51: How Not To Share Data Global Variables or singletons This includes your application delegate Direct dependencies make your code less reusable And more difficult to debug & test Ok. I'm down with that. Don't blindly toss all your methods that will be used for communicating between the viewcontroller into your app delegate and reference the viewcontroller instances in the app delegate methods. Fair 'nuff. A bit further on, we get this slide telling us what we should do. Page 18/51: Best Practices for Data Flow Figure out exactly what needs to be communicated Define input parameters for your view controller For communicating back up the hierarchy, use loose coupling Define a generic interface for observers (like delegation) This slide is then followed by what appears to be a place holder slide where the lecturer then apparently demonstrates the best practices using an example with the UIImagePickerController. I wish the videos were available! :( Ok, so... I'm afraid my objc-fu is not so strong. I'm also a bit confused by the final line in the above quote. I've been doing my fair share of googling about this and I found what appears to be a decent article talking about the various methods of Observing/Notification techniques: Method #5 even indicates delegates as an method! Except.... objects can only set one delegate at a time. So when I have multiple viewcontroller communication, what am I to do? Ok, that's the set up gang. I know I can easily do my communication methods in the app delegate by reference's the multiple viewcontroller instances in my appdelegate but I want to do this sort of thing the right way. Please help me "do the right thing" by answering the following questions: When I am trying to push a new viewcontroller on the UINavigationController stack, who should be doing this push. Which class/file in my code is the correct place? When I want to affect some piece of data (value of an iVar) in one of my UIViewControllers when I am in a different UIViewController, what is the "right" way to do this? Give that we can only have one delegate set at a time in an object, what would the implementation look like for when the lecturer says "Define a generic interface for observers (like delegation)". A pseudocode example would be awfully helpful here if possible. |
I downloaded Greek and Hebrew fonts to add them to Libre Office but after many attempts I do not manage to get them installed. I do it via nautilus and after adding the fonts in a map within truetype and run sudo fc-cache in the terminal but no fonts in Office.What is the right method? | I want to add nepali fonts like kantipur in Ubuntu 12.04.How can I do this. |
I'm often away from PC, and it would be nice to see the moderation queues implemented in the official mobile app. | I would love to have the review and from the website inside the app so that we can review low quality posts, edits and delete requests while we are having some free time when commuting to work or during classes or w/e. |
I made my first application with Java in Eclipse now I need to repackage or create an executable file file from that project. I used a lot of external jar libraries that I would like to export whit the project. Any solution is welcome. | I'm writing a java app using eclipse which references a few external jars and requires some config files to be user accessable. What is the best way to package it up for deployment? My understanding is that you cant put Jars inside another jar file, is this correct? Can I keep my config files out of the jars and still reference them in the code? Or should the path to the config file be a command line argument? Are there any third party plugins for eclipse to help make this easier? I'm using an ant build file at the moment but I'm not sure I know what I'm doing. Is there an equivelent of the deployment projects in Visual studio, that will figure out everything you need and just make an installer? I've used install4j before, and it was powerful if no where near as automated as .Net deployment projects. Cheers. |
Apparently, Aristotle reasoned (without experimentation) that heavier objects must fall to Earth faster than lighter objects. For example, a 1,000 kg ball of iron would fall faster than a 1 kg ball of iron. Galileo is reputed to have disproved this experimentally by dropping two differently heavy objects from the Tower of Pisa, and they were observed to hit the ground at the same time. Case closed, right? Well, it suddenly occurred to me this morning that Aristotle was actually correct, and Galileo's experiment was incapable of discerning any difference in arrival times between the two weights he dropped. And I wonder if our measuring devices today could discern the difference in arrival times in this case? The formula for force due to gravitational acceleration is: $$F = \frac{Gm_1m_2}{d^2}$$ For both the 1000kg and 1kg masses, the product of them both with the Earth's mass is clearly the Earth's mass, so $F$ will be virtually the same for them both. But if we take the 1000kg mass out to the Moon's orbit, and we stop the moon in its orbit so it stands still with respect to the Earth, the force $F$ will clearly be much larger between the Moon and the Earth than between the 1000kg mass and the Earth. The result of this is that the Moon and the Earth will meet much faster than the 1000kg mass will meet the Earth. Am I right, and is Aristotle vindicated, or is there something I'm missing here? | The common understanding is that, setting air resistance aside, all objects dropped to Earth fall at the same rate. This is often demonstrated through the thought experiment of cutting a large object in half. The halves clearly can't then fall more slowly just by being sliced in two. However, I believe the answer is that when two objects fall together, attached or not, they do "fall" faster than an object of less mass alone does. This is because not only does the Earth accelerate the objects toward itself but the objects also accelerate the Earth toward themselves. Considering the formula: $$ F_{\text{g}} = \frac{G m_1 m_2}{d^2} $$ Given $F = ma$ thus $a = F/m$, we note that the mass of the small object doesn't seem to matter as when calculating acceleration the force is divided by the $m$ term, its mass. However, this overlooks that the force is actually applied to both objects, not just to the smaller one. The acceleration on the second, larger object is found by dividing $F$, in turn, by the larger object's mass. The two objects' acceleration vectors are exactly opposite, so closing acceleration is the sum of the two: $$ a_{\text{closing}} = \frac{F}{m_1} + \frac{F}{m_2} $$ Since the Earth is extremely massive compared to everyday objects, the acceleration imparted on the object by the Earth will radically dominate the equation. As the Earth is $\sim 5.972 \times {10}^{24} \, \mathrm{kg} ,$ a falling object of $5.972 \, \mathrm{kg}$ (just over 13 pounds) would accelerate the Earth about $\frac{1}{{10}^{24}}$ as much, which is one part in a trillion trillion. Of course in everyday situations, we can for all practical purposes treat objects as falling at the same rate because of this negligible difference—which our instruments probably couldn't even detect. But I'm hoping not for a discussion of practicality or what's measurable or observable, but what we think is actually happening. Am I right or wrong? What really clinched this for me was considering dropping a small Moon-massed object close to the Earth and a small Earth-massed object close to the Moon. This made me realize that falling isn't one object moving toward some fixed frame of reference, but that the Earth is just another object, and thus "falling" consists of multiple objects mutually attracting in space. |
Below are the first few lines of my groovy file. When i try to run it from the server, i get the null Pointer Exception: Cannot invoke method addURL() on null object I am not sure how the code needs to be changed here to fix the above error: package groovy; def localFile = new File("/tmp/sqljdbc4.jar"); this.class.classLoader.rootLoader.addURL(localFile.toURI().toURL()); import java.sql.Connection; import java.sql.DriverManager; import com.microsoft.sqlserver.jdbc.*; import groovy.sql.Sql; Connection ret = null; try { SQLServerDataSource ds = new SQLServerDataSource() ...... | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I have an “other” login on my computer that I can’t seem to get rid of. I try to delete it by clicking on the minus in the groups and users section and it won’t let me. It’s greyd out. What’s odd is the login for it is the same as my husband’s login. I’m the administrator but typing in his name and password for his own login works for it. It’s like a duplicate of his profile on my computer. The wallpaper is even the same. But the login screen has it listed as other. I also have been trying to get rid of this stupid websearchstride pop up problem. Idk if it’s all related or not. The system has been updated. I tried to get Bitdefender to scan my computer. Said it got rid of stuff but I’m steal dealing with issues. TIA. | I've just upgraded to El Capitan from Mountain Lion, and now an Other... icon appears right next to my usual user-account (admin account) on the login screen. When I click on it, I can log in, as another user, but I only have one. My first thought was, that it could be the root user, which could have been enabled (I don't know how though). But from the Edit menu, in the Directory Utility, it only says "Enable root user", which should indicate that the root user is disabled. I then tried to enable it, and disable it again, but the Other... still appears on the login screen. I've even tried to disable it from Terminal using this command, with no luck: dsenableroot -d After some search on Google, I found a thread with people having the same problem. A lot of them solved the problem by following this guide: Enable the root user from Directory Utility and then log out. Log in as the root user account and change the password. Still on the root user account, disable and then enable root user from Directory Utility. Log out from the root user account, and log back it to the usual account. Now disable the root user once again. I have done all this, but it still doesn't work, and I am almost going mad about it. Anyone have any idea why this is happening, and how to fix it? |
I installed Ubuntu 14.04 and whenever I plug an USB drive it automounts it normally and opens a Nautilus window. However, when I change to another window and then try to return to my files by clicking the Nautilus button on the Unity panel it opens a new window pointing to my home directory. Only when I Alt+Tab to the previously opened window can I access the USB files. Is there some sort of configuration associated with this? Thanks in advance. | There is some behavior I can't understand in the Unity Desktop. Open nautilus via. clicking in the launcher onto the home-button Navigate to for example the windows-partition in nautilus Minimize nautilus Click on nautilus in the launcher doesn't open the nautilus with windows-partition, instead it opens a new window with the home folder. Is there a workaround for this strange behavior? Regards, Arthur |
The faces when I'm in Object/Edit mode look... messed up, like half of the normals are facing the wrong way. I checked the normals and they are all facing out like they should be. I was messing with some camera settings when I pulled out of the camera view. When I render the scene, everything looks normal. Let me know if you need more info on anything. Any help is much appreciated. I apologize if this has been asked before, but I really don't know what to call this conundrum in order to search for it. Uploaded: | I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did. Here is an image of what I mean The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows. Also, occluded vertices partially show through the model. Occlusion doesn't work properly. In orthogonal view small darkened triangles appear along the the edges. I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks. |
I am from a reputed university in India and despite informing the department professors and higher authorities of the rampant cheating in the online exams, they haven't taken any steps to curb it (they use Google Meet/Zoom proctoring which is basically useless because students can still text and make excuses). They don't even reply to the emails that raise these concerns. They made no effort to change their examination mode for the online semester - by increasing the weightage of take-home/research assignment components in the syllabus. This has taken a toll on the mental health of students like me who did not use unfair means but are now suffering because the university follows relative grading and the skyrocketing averages of the exams have made it next to impossible for us to get grades proportional to our efforts. What should a student do in such a situation? Should he/she start cheating too? Edit: Switching the institute is not possible because this is India — students have to go through a gruesome procedure to get admitted into these reputed institutes in the first place. Secondly, the jobs and higher education somewhat depend on the grades of the student so this unfair disadvantage for 2 semesters straight without cheating would be hell for any honest person. | Context: A friend of mine is ending their first year in a community college (in France, called IUT, 2-year diploma) near my school, and apparently the school administration is quite lenient about cheating during exams ; I asked a few other friends of mine that are currently in second year there, and they have confirmed that nearly everybody cheats during exams, mostly because the questions don't change from one year to the other, allowing students to get the exams in advance and preparing for the questions. An important part of the exams are Moodle quizzes, which show the correct answers after submitting, and don't get modified from year to year either. Problem: My friend does not want to cheat, for obvious reasons. The problem is that the way this kind of college works (in France) puts students in competition with each other ; your ranking among the other students is very important and is a determinant factor in your chances of being accepted in engineering schools after your second year (which is what most people in that community college do). Multiple people have already tried reporting the cheating to professors and the college's administration, to no avail. Most professors don't seem to care, and the few that say they do care about cheating never act upon it. This results in mediocre (excuse the harsh term) students having an unfair advantage over good students trying to keep their integrity. This whole situation, combined with the Sars-Cov-2 lockdown has had quite a toll on her mental health. My stance is to never cheat, but I'm having more and more trouble telling her to stay strong and do the same. It's gotten to the point that not cheating can have a significant negative impact on her future, and I couldn't help but feel responsible if she were to fail her year because of other people's dishonesty. What is the best behavior to adopt here? |
In my wpf application, I have a requirement to format the textblock to show code snippet. Is there anything out there that already does this? So return VSConstants.S_OK; should in the textblock show up as, | I want create my own IDE but I want a code editor that would syntax highlighting. I want to embed it as a control into a WPF window. Malcolm |
In the middle of a battle, whilst I'm wild shaped into a brown bear, I take 20 damage and drop to 14hp. I then wildshape into a dire wolf form. Does the damage carry over to my wolf form, or am I at full health again in wolf form? It's very confusing to my players and me since it doesnt say in the PHB. | Let's say I've used wild shape to assume the form of a mammoth that has 126 hit points. I take 26 points of damage, putting me at 100 hit points. If I use my next turn to take a bonus action to exit wild shape then an action to use wild shape to assume the form of a mammoth again, do I now have 126 hit points or 100 hit points? |
I heard that does not really exist; that it is made as opposite substance to . Is it true? Could someone define for me what centrifugal force is in terms of vectors and common sense? | Currently in my last year of high school, and I have always been told that does not exist by my physics teachers. Today my girlfriend in the year below asked me what centrifugal force was, I told her it didn't exist, and then she told me her textbook said it did, and defined it as "The apparent force experienced towards the outside of a circle is the centrifugal force and is due to the mass of the object resisting the inward centripetal acceleration that the object is experiencing". I was pretty shocked to hear this after a few years of being told that it does not exist. I did some reading and found out all sorts of things about pseudo forces and reference frames. I was wondering if someone could please explain to me what is going on? Is it wrong to say that centrifugal force does not exist? This has always nagged me a bit as I often wonder that if every force has a reaction force then a centripetal force must have a reaction centrifugal force, but when I asked my teachers about this they told me that centrifugal force does not exist. |
How to fill the gap between classical physics and quantum physics? | I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course. In particular, I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay? I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds. I understand that certain aspects of quantum mechanics to address these problems, and that there are of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it. |
I installed ubuntu 12.04 in an Asus 8gbram i7 sharing drive with windows 7. tried many options as setnomode, ro, ro quiet, deleting msdos6 and replacing it with6 at set root=(hd0,6) was appearing as set root=(hd0,msdos6) at booting time and get crazy try many combinations I realized that the problem is that even the same options get sometimes to boot, sometimes to a purple screen and sometimes to a smtp message and gets freezed there. in my bios i have uefi disabled as it was by default in this machine. dmesg for error just this line when im able to boot: EXT4-fs (sda6): re-mounted. Opts: errors=remount-ro Also Im quite suprised as i was expecting the installation to go smooth and suddenly menu.lst is deprecated and my knowledge is old. Anyone facing/faced similar behaviour? found this answer and solved the problem, just turn of vt-d from the BIOS | The laptop is dual booting with windows 7 and ubuntu 11.10. For 11.10 to boot, I had to add 'nolapic' in GRUB boot options. I downloaded 12.04LTS LiveCD yesterday and made a CD and a bootable USB stick. With both USB and LiveCD, occasionally I can boot into 12.04. But many times, the boot process stuck at some point. For USB boot, sometime it works. But other times, it seems to stuck right after seeing the message: NMI watchdog enabled. takes one hw-pmu counted [0.408590] #2 The number in [] changes. Some times it stuck at #2, and sometimes at #3. For LiveCD boot, sometime it works. But when it stuck, it stuck at different places. At times, the boot process go directly to a blank screen with a blink '_' at up left corner. Sometime it went a bit further, after showing options to try/install ubuntu then stuck with a blank screen with blink '_'. Anything I can do to get around of this? |
The following while loop within the program I'm writing is not being entered into, even though the condition within parentheses would evaluate as true (as far as I can tell). Here is the loop with the assignment before it: String choose = "y"; while(choose=="y"); { System.out.println("Enter 4-digit time: (0000 - 2359)"); String time_ = s.nextLine(); System.out.println("Angle between hour hand and minute hand is: " + timeToAngle(time_) + " degrees"); System.out.println("Would you like to calculate the angle for another time? (y/n)"); choose = s.next(); } Please could somebody give me a pointer in the right direction? This is driving me crazy | 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? |
If $\sum a(n)$ and $\sum b(n)$ are convergent series with positive terms,can I say that $\sum a(n)b(n)$ is also convergent? | Given $a_n, b_n$ such that $\exists N \forall n>N a_n, b_n \geq 0$ I want to show that if $\sum_{n=0}^{\infty}a_n$ and $\sum_{n=0}^{\infty}b_n$ converge then $\sum_{n=0}^{\infty}a_n b_n$ also converges. I tried to show it in the following way, if $\sum_{n=0}^{\infty}b_n$ converges, then $\lim_{n\rightarrow\infty}b_n=0$, so there exists $n_0$ such that $b_{n_0}\geq b_n$ for all $n\gt n_0$, therefore $a_n b_{n_0}\geq a_n b_n$, so that $\sum_{n=0}^{\infty}a_n b_n\leq \sum_{n=0}^{n_0}a_n b_n+b_{n_0}\sum_{n=n_0+1}^\infty a_n$, and as my series is bounded by sum of finitely many terms and tail of convergent series multiplied by a constant it's also convergent. Is my proof correct, or are there any flaws in my reasoning? |
I'm not really sure how to approach the problem, since I'm not really sure I understand the mechanisms why it is true aside from putting some numbers in and see that it works. Qualitatively, I'd try a proof by contradiction, trying to show that $\gcd(a-bc, b) \neq \gcd(a,b)$ and use some prime attribute to contradict the assumption. | Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so? Addendum by LePressentiment on 11/29/2013: (in the interest of and averting a duplicate) What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally. |
is there a way to get access to a number of empty seats at different airlines? how do I get this data? Edit: my question is if the OTA's have this access? do they know at every moment how many tickets are left in each class? do they get this data from the GDS? if not - how can I get (as an OTA) this access? | Is it possible to know how many seats on a particular flight have been booked? If not, is it possible to know in which months of a year the flights usually are not fully booked? |
i'be looked some same topics but havn't find what i'm looking for I should use flag enum flag atribute and check if my data is in one of the collections of this enum For example, enum: [Flags] private enum MyEnum { Apple, Orange, Tomato, Potato Melon, Watermelon, Fruit = Apple | Orange, Vegetable = Tomato | Potato, Berry = Melon | Watermelon, } In the method i should check a input data. How can i do it? private void Checking(string data){ if(MyEnum.Fruit contains data) MessageBox.Show("Fruit"); if(MyEnum.Vegetable contains data) MessageBox.Show("Vegetables"); if(MyEnum.Berry contains data) MessageBox.Show("Berry"); } What should be instead of "contains data"? UPDATE private void ZZZ(){ Cheching("Apple"); } | From time to time I see an enum like the following: [Flags] public enum Options { None = 0, Option1 = 1, Option2 = 2, Option3 = 4, Option4 = 8 } I don't understand what exactly the [Flags] attribute does. Anyone have a good explanation or example they could post? |
I know SO allows to share knowledge Q&A style. Do you think it is a suitable place to write a tutorial? I tried searching for similar questions, but the answers were not conclusive. I am struggling with creating ASP.NET MVC 6 app with Angular2. There are blog posts about this, but they don't cover latest Angular2 RC release, which changed things a bit. I have it almost figured out, so I thought of sharing my knowledge. I do not own a blog and there is no point in starting one since I don't know when I'll have something else to share with the community. Do you think it would be ok to write an article explaining in details how to setup ASP .NET MVC 6 project with Angular2 RC on StackOverflow? | After a brief discussion with @MonicaCellio (In the comment) - It has come to my attention that perhaps I chose the wrong words to describe my original idea (In the edit history). When I wrote "social features" I was actually suggesting an alternative way to for users to share their knowledge using a new type of post and articles and not just by questions and answers. The basics of my idea was to allow users to write articles on topics relevant to the community on the SE websites just as any answer posted is expected to be too. Allowing users to write their own content (I.E posts/articles/etc..) will be granted as a privilege for advanced users so that not anyone could write stupid things, users that will write content must be established and well-familiar with the rules of SE. I know anyone can start a blog, but it's require frequent maintenance and content updates, while writing on SE ensure that it addressed to a large, well-established community, with a similar fields of interest. Posts writing will follow the same guidelines as asking and answering questions does, but it will provide an alternative for users that are mostly answering specific questions, as a new method to contribute to the community. By writing, one may also reveal more about their personality, wit, way of thinking, ETC. That's when the "social" takes place - You'll also have "authors" and not just "users" you can remember by their catchy name, but people that you can remember by the field of interest they are writing content about. They key points will be: Users will be able write rich content with advanced WYSIWYG HTML editor, content that doesn't require a question to answer, but that is still relevant to the SE website it is writing on. Users will be able to Upvote/Downvote other users posts. Posts will be listed on their author profile, so it will not just show the activity, but additional layer of user generated content. Popular posts with high reputation could be associated to tags making the information of tags richer with user generated content Users will be able to include links in answers not only to other questions, but also to posts. User will be able to comment on post to allow the author to correct and improve it. It will improve the interaction and offline discussions (Which are prohibited when it come to long discussions on questions and answers). I believe that users will be happy to share their own tutorials, tips and tricks - Because they are already doing so when answering questions, but before the can start, they'll have to earn enough reputation to ensure that only high profile users will be able to write high profile content, and not just any rubbish. It will provide another type of method for voting and getting earning reputation Users will be able to include content in their CVs on SO Jobs. Opportunity to earn some new badges. So it's a Mega feature request and it require some detailed design work, but I do think that it will invite a new type of activity for users on SO (and the rests of the sites of-course). |
We are having an error with the flag as duplicate radio box. It never fills out, but just says 404. If one of the developers could take a look at this, that would be great. | This is maybe a duplicate like , but the error still appears. When I try to click "mark as duplicate" a HTTP 404 error occur. I'm using Firefox 16.0.2 with Firebug on Mac OS X 10.5.8 |
Using JavaScript I want to match everything between the words "user test" but for some reason it's not working. What am I doing wrong? text = "start user test end user test end" var matches = text.match(/^user.+est$/g); Need results: matches[0] = "user test"; matches[1] = "user test"; | I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}: The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}? |
Why do charged particles only produce magnetic fields while in motion? | I'm tutoring high school students. I've always taught them that: A charged particle moving without acceleration produces an electric as well as a magnetic field. It produces an electric field because it's a charge particle. But when it is at rest, it doesn't produce a magnetic field. All of a sudden when it starts moving, it starts producing a magnetic field. Why? What happens to it when it starts moving? What makes it produce a magnetic field when it starts moving? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.