body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I read that the number of atoms in the entire observable universe is estimated to be within the range of $10^{78}$ to $10^{82}$. Does the Universe have finite number of particles? If so, how could it be determined?
It is often quoted that the number of atoms in the universe is 10$^{70}$ or 10$^{80}$. How do scientists determine this number? And how accurate is it (how strong is the supporting evidences for it)? Is it more likely (logically >50% chance) that the numbers are right, or is it more likely that the numbers are wrong?
I'm kinda new to Blender and I was asked for help for my event to make an animation. I want to make something like a box falling from the sky. I went through some tutorials and i did make it right. What is not right is, the object (which is a box with a rigidbody) quite not in focus as in a camera. Here's the screenshot of the object showing it's out-of-focus. How do i make the image to be in focus in such way that the object didn't look like it's being blurred by the camera?
I was trying to render my scene, and the render turned out very blurred. (It is not supposed to be blurred). Is there a setting that I am missing somewhere which is making it look like this?
was deleted. And only users with required privileges can see it. So, the modification date can be confusing for users without requiring privileges. Could you change the behavior to show the date of the last change that could be viewed?
When an answer has been deleted the information on unanswered question tabs still says that users modification was the last to the thread. For instance on Stack Overflow right now the top two are listed as having been modified by . While waiting for a moderator Zerkms, modified several answers in an effort to remove spam. However, once these answers were removed Zerkms still appears as the last person to modify the thread. While I imagine the hidden/deleted answers still exist somewhere causing this to occur, it can be confusing if you don't know why Zerkms is listed, as his modification is found nowhere within the linked question. I would propose that when an answer / modification is deleted / rolled back, that the associated user is removed as the last modifier.
I'm playing around with applying texture diffuse, normal maps and speculars to 3d models. So I have downloaded a premade one and tried to play around with it. However i can't seem to apply the textures properly to the model. I found it here Everything is in the zip file, just need some help with applying the texture, normal & specular in blender. Thanks.
I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have: - Diffuse - Normal - Height - Specular - Gloss - Self Illumination - Reflection - Ambient Occlusion MindTex (left) vs. Blender (right) As you can clearly see it's a pretty big difference. is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful.
I've read a lot of threads about gksu being removed from many Linux flavours, including Ubuntu 18.04. Many state that gksu is an abomination and no user should ever need to use anything like it. I have 2 examples where, as far as I know, I must have something that allows me to run as root (not just for editing files). First, I have a need to start mysql only after an encrypted folder is opened on (GUI) command. This means having a script run by the encryption system that starts the mysql service. That has to be done as root, so I use gksu in that startup script which asks me for a password. How else can I start a service from a GUI system? I also run Ubuntu system backups as root, otherwise many system files can't be backed up. So the desktop file uses gksu to start the backup. pkexec looks complicated, needing policy files. Is that the only alternative, and if so, why is it any safer? Other answers to similar questions don't seem to address individual issues that people have now that gksu is no more (or harder to find...). I think such questions from non-expert users would benefit from more detailed answers. I now have some, and so would like to answer my own question.
I have always recommended pressing ALT+F2 and typing for example gksu nautilus or gksudo nautilus both are equivalent; to run graphical programs with root privileges. However, I have just installed raring on a test system and this no longer works. gksu and gksudo are not installed as part of a default raring install; though they are in the repositories. In 12.04 at least gksudo was just a symbolic link to gksu The reasons I have always done this are because while it is often safe to use sudo under some circumstances it can cause problems with graphical applications because gksu has you running the program as root while with sudo you are running as yourself but with elevated privileges. This can mean you inadvertently change the owner of critical system files. This can cause problems. This reasoning is explained better here: Why was command removed from a fresh install and what should we be using instead?
I have a Windows software with a GUI that does cool things but too quickly (I cannot figure see all the editing it does in realtime because it goes too fast). How to reduce the CPU speed to 1% of actual CPU speed for a specific Windows process myprogram.exe ?
I am using an old laptop and doing heavy processing that needs high CPU usage for a long time (~30mins - 2hours). When the process puts heavy load on CPU for a long time, CPU overheats and computer shuts down. I don't want to use a cooler/stand because I am carrying this laptop around and working outside home. Is there a way/application that I can limit CPU usage of a process in Windows? Note: Setting the priority of the process from task manager does not work. Note 2: Fans are clean.
People. Sorry about the English language. I created an environment with some help here, and now I need help with the counter. \newcounter{examplecounter} \newenvironment{exemplo}{\begin{framed}\noindent \refstepcounter{examplecounter} {\textbf{Exemplo \arabic{examplecounter}.}} }{\end{framed}} I'm using this environment on a large book, so i need to reset the counter by part, by section, or (if possible) even make it just like the part numbering, like example part.chapter.# How can I do that?
Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)? And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering? \documentclass{book}% for "vice versa" variant, replace `book` with `article` \begin{document} \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section` \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document} Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?
I found this code since it's exactly what I need to use, but also I need a caption under both of them. There is an example for a subcaption but that's not it. I simply tried to add the caption command but it doesn't work. Can someone tell me how to modify it? Thanks. \begin{center} \resizebox{1.0\textwidth}{!}{ \includegraphics[height=3cm]{pic1} % \caption{Picture 1} \label{fig:pic1} \quad \includegraphics[height=3cm]{pic2} % \caption{Picture 2} \label{fig:pic2} } \end{center}
I tend to use \subfloats[]{} in my figures when I want to list multiple labelled figures of similar content in one bigger picture. However, I see that some people use \subfigure. What is the difference between these two options? Is one better than the other? \documentclass{article} \usepackage{float} \usepackage[caption = false]{subfig} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfloat[caption]{\includegraphics[width= 2in]{something}}\\ \subfloat[caption]{\includegraphics[width= 2in]{something}} \end{figure} \end{document} Or \documentclass{article} \usepackage{subfigure} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfigure[caption]{\includegraphics[width = 2in]{something}}\\ \subfigure[caption]{\includegraphics[width = 2in]{something}} \end{figure} \end{document} Since is two years old, does Axel's solution still apply? By this I mean, has nothing changed with subfig? Are there only 2 'biased' pros for the use of subfig? Is the outcome still it is more advisable to use subcaption over subfig where I am using the latter subfig?
I have this program #include <stdio.h> #include <stdlib.h> int main() { char text[30]; int i,j,n; puts("Enter the Text:"); gets(text); n=strlen(text); for(i=n;i>=0;i--) { if(text[i-1]==' '||text[i-1]==NULL ) { for(j=i;text[j]!=' ';j++) { printf("%c",text[j]); } } printf(" "); } getche(); } Suppose if i input is "I am Happy" then my output is "Happy am I" I am not sure where i went wrong in this program, i am not getting all the words , I am getting result as "happy [=w am " .Please programmers help me. Thanks In Advance. i have found the answer , thanks for your helps, Below is my code #include <stdio.h> #include <stdlib.h> int main() { char text[100]; int i,j; puts("Enter the Text:"); gets(text); strrev(text); for(i=0;text[i]!='\0';i++) { if(text[i+1]==' ' || text[i+1]==NULL) { for(j=i;j>=0 && text[j]!=' ';j--) printf("%c",text[j]); } printf(" "); } getche(); }
Given an array of characters which forms a sentence of words, give an efficient algorithm to reverse the order of the words (not characters) in it. Example input and output: >>> reverse_words("this is a string") 'string a is this' It should be O(N) time and O(1) space (split() and pushing on / popping off the stack are not allowed). The puzzle is taken from .
Let $\frac{a}{b} = 1 - \frac{1}{2} + \frac13 - \frac14 + ... - \frac{1}{1318} + \frac{1}{1319}$. Show that $1979 | a$. Given that , $a$ and $b$ are coprimes. I tried to compute in pairs , but I don’t know how to do next. Any hints or solutions would be appreciated.
The question is $$\text{If }\, p, \ q\in \mathbb{N}, \;1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}=\frac{p}{q}.\qquad \text{Prove that } 1979\mid p.$$ So my solution went like this: $$S=1-\frac12+\frac13-\frac14-\dotsb-\frac{1}{1318}+\frac{1}{1319}\Rightarrow S=\sum_{k=1}^{1319}\frac{1}{k}-2\sum_{k=1}^{659}\frac{1}{2k}=\sum_{k=660}^{1319}\frac{1}{k}$$ Now this is equivalent to finding the sum of the roots of the equation $$\left(x-\frac{1}{660}\right)\left(x-\frac{1}{661}\right)\dots \left(x-\frac{1}{1319}\right)=0$$. Rewriting this equation, we get $(660x-1)(661x-1)\dotsc(1319x-1)=0$ (we can discard the $\displaystyle \frac{1319!}{659!}$ since $1979$ is a prime). Calculating the sum of the roots, we get the required value to be equal to $(1320+659)\times 330$ which is obviously divisible by $1979$ (again discarding the coeffecient of $x^{660}$). Now my question is: Using the same method of converting the problem into finding the sum of roots of a polynomial, we get from the original equation something like this: $$(x-1)\left(x+\frac{1}{2}\right)\dots \left(x-\frac{1}{1319}\right)=0 \Rightarrow (x-1)(2x+1)\dotsc(1319x-1)=0$$ So, the sum of roots would be $-1+2-3+4-\dotsc+1318-1319=-660$ But this is not divisible by $1979$. Why does the former solution work while the latter doesn't? Is there a flaw in my reasoning? Note: I know that the question can be solved by some other methods. Please only explain my given doubts and don't instead give another solution I realised my mistake after some hours of pondering over it. (In the 1st equation) To get the required sum I would need to take calculate $\displaystyle -\frac{\text{coeffecient of }x^{659}\,}{\text{coeffecient of }x^{660}}$. However what I've done is calculate this: $\displaystyle -\frac{\text{ coeffecient of }x}{\text{coeffecient of }x^{660}}$ which is actually equal to $\text{sum of roots taken }659 \text{ at a time} $. It was just a coincidence that the value I calculated was divisible by $1979$. The correct way, indeed, would be through the link supplied
Given this data model images = { "auto-init-container/auto-init-container": [ { "tag": "c", "creation_date": "2020-01-09T21:04:12.351550522Z" }, { "tag": "a", "creation_date": "2019-05-20T19:52:55.761775039Z" }, { "tag": "b", "creation_date": "2019-06-20T21:32:44.427162163Z" } ] } How do I sort this in python so that it would sort by latest and get the results below images = { "auto-init-container/auto-init-container": [ { "tag": "c", "creation_date": "2020-01-09T21:04:12.351550522Z" }, { "tag": "b", "creation_date": "2019-06-20T21:32:44.427162163Z" }, { "tag": "a", "creation_date": "2019-05-20T19:52:55.761775039Z" } ] }
I have a list of dictionaries and want each item to be sorted by a specific value. Take into consideration the list: [{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}] When sorted by name, it should become: [{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]
I'm planning a hardware design, where I have a main board and multiple peripheral boards. On each of these boards is a microcontroller with I2C, which is the communication bus for the boards. The same kind of a peripheral board can be attached multiple times to the bus. The microcontroller (will be an ARM, not specified yet) supports dual address. My idea now is, to set one address to an unique address (with switches for example) and the second to a "group" address, which will be the same for one kind of peripheral. Is it possible to send commands from my main board to the peripheral, as long it doesn't need a "read back" (only master -> slave)? For me, it looks like the same functionality as for the general call with address 0x00 except it allows me to make "grouped" general call. But I don't know for sure, if this will work.
I am currently designing a board where I need to include a whole bunch of I2C devices. Since the number is quite high, address clashing is an issue, that of course we can solve implementing different bus segments, or with translators. There is a particular situation though, where I had an idea. I have two arrays of 8x, and I want them to be configured in the exact same way. The I2C-compliant solution is to use a bus isolator, or an address translator, and get over it, but I was wondering if it is advisable to just hook them all to the same bus, and hope for the best. To abstract a bit: I have two identical devices, with an I2C slave interface, with the same address. I want to send them the same packets, in the same order and so on. Can I just connect SDA and SCL in parallel, and get away with it? I do not need to read from the devices, and I am aware that a NACK would be hidden. Also, the devices do not support clock stretching. Edit, to clarify some comments: Yes, I do not care if a device stops working and understand I have no way of knowing The master we are using does not resend data on a NACK, but raises the error to the host. The board we are designing is meant to be used in an electronics lab environment, as a support to evaluate a product that my company is making. We expect to make ~20 boards, no mass production, no board will be sent to a third party.
After reading on the subject, in one of the many, many Q&As and comments on it, I noticed the original link is now a 404 page (). What gives? I understand it experienced a record-level downvote; yet at the same time, it would certainly be interesting from a community history standpoint, especially as passions wane as it becomes bygones. Perhaps disable answers, edits, and lock it?
Recently, Sara Chipps posted her message . After reading it, I wanted to compare it with . It turns out that she deleted it. Does anyone know why? It looks strange since (as far as remember) it was a sort of official position of SE. Why would such a statement be deleted?
Hello guys for years I've been installing AMD drivers and usually no problems at all. I usuallu compile few .deb files with --buildpkg but today after installing latest Ubuntu 14.04 I got an error. UBUNTU-MAIN:~$ sh omega.run --buildpkg Ubuntu/trusty Created directory fglrx-install.Jjz0kw Verifying archive integrity... All good. Uncompressing AMD Catalyst(TM) Proprietary Driver-14.501.1003................... ===================================================================== AMD Catalyst(TM) Proprietary Driver Installer/Packager ===================================================================== Generating package: Ubuntu/trusty Resolving build dependencies... Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package (> E: Unable to locate package 2 Unable to resolve xserver-xorg-dev (>= 2. Please manually install and try again. ^CSignal caught, cleaning up xakep@UBUNTU-MAIN:~$ So okay no problem because of new installation even core xorg is not there so I decided to install them UBUNTU-MAIN:~$ sudo apt-get install xserver-xorg-dev Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed Depends: gstreamer1.0-clutter but it is not going to be installed libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. xakep@UBUNTU-MAIN:~$ As you can see another set of errors. I mean whe way I see it it's a damn standard library that is not installing automatically as depended for some reason. Does anyone know why this is happening ? I mean this is a clean installation and I really havn't done anything diffirent this time around but I can;t install driver. Same error btw when installing steam, actual steam installed but on first boot you know how it installs all library it gave me exact error. some cheese-gtk23 and stuff can;'t be installed. I am clueless on what is happening. Please help.
I'm getting the following error message when attempting to install libglew-dev, Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed Depends: gstreamer1.0-clutter but it is not going to be installed libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. All those packages are however apparently already installed. I have tried all possible solutions in post, without any luck. I have not added any PPAs. The version of ubuntu is 14.04.2. I have looked at similar posts, and tried the following: Running dpkg --get-selections | grep hold prints nothing. sudo apt-get -oDebug::pkgProblemResolver=true install -f Gives me nothing of interest, 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Please help me figure out what is wrong I can't find anything about this and haven't found the definition of this function C# keeps coming up and it doesn't apply. for (auto& p: fs::recursive_directory_iterator("c:")) { richTextBox1->AppendText("This works fine\n"); } for (auto& p: fs::recursive_directory_iterator("c:")) { std::string pathString; fs::path path = p.path(); pathString = path.string(); //I don't know why it doesn't work like this VS won't compile if I try this. I have tried //multiple different formats of string to no avail richTextBox1->AppendText(pathString); }
How can I convert an std::string to a char* or a const char*?
How can I tell which application is trying to access my thumb drive? The drive happens to be locked and an Access is Denied notification keeps popping up again and again. The PC has Windows 10 Pro installed on it.
I've noticed the hard drive use light flashing like crazy and I'm not using this PC (hardly ever do). How can I log what's going on for a time period? For example: what files are being created/accessed/deleted/moved/copied etc, what folders or programs are being used/accessed. If an external device/site is doing the access (I do have a Cloud/NAS), note that, perhaps a MAC ID, IP address, etc. I've seen a number of software apps to take a snapshot of disk usage, but I want to see what's going on without my (seeming) intervention.
I'm thinking of travelling to the UK, from a EU country, on the 29 Jun to 3 of July 2019. Shall I need a Visa, or is my National Identity Card enough?
I am traveling as a Belgian citizen after 28 March (brexit). Can I still enter with my identity card?
The question asked mentions: When the polynomial ring Z[x] is quotiented by the ideal (2,x) we get a field as $\mathbb{Z}[x]/(x,2) \cong \mathbb Z/(2) \cong \mathbb{Z}_2$ which is a field. I am not being able to flesh out my answer and connect the dots. I know that $\frac{\mathbb Z[x]}{\langle x,2 \rangle }= \frac{\frac{\mathbb Z[x]}{\langle x \rangle }}{\frac{\langle 2,x \rangle}{\langle x \rangle}}$. From here, I can individually show that: $\frac{\mathbb Z[x]}{\langle x \rangle} \cong \mathbb Z,$ and that, $\frac{\langle 2,x \rangle}{\langle x \rangle} \cong \langle 2 \rangle.$ How do I conclude that, $\frac{\frac{\mathbb Z[x]}{\langle x \rangle}}{\frac{\langle 2,x \rangle}{\langle x \rangle}} \cong \mathbb Z_{2}$? It seems like I am trying to prove something in this format: $\frac{I}{J} \cong \frac{K}{H}$ because $I \cong K$ and $J \cong H.$ (I believe, this basic concept is essentially what my doubt is) Am I thinking about this the wrong way?
I still struggle with elementary knowledge about quotient rings. For example, why can I just write down the second following isomorphism: $$\frac{\mathbb{C}[x, y, z]}{(x^2 + y^2 - 1, y \pm iz)} \simeq \frac{\frac{\mathbb{C}[x, y, z]}{(y \pm iz)}}{\frac{(x^2 + y^2 - 1,y \pm iz)}{(y \pm iz)}} \simeq \frac{\mathbb{C}[x, y]}{(x^2 + y^2 - 1)} $$ I know the first isomorphism is right by the third isomorphism theorem. But why can I write down the second one?
I am trying to solve: $x = 1(\mod13), x = 2(\mod31)$. Using the chinese remainder theorem, I got $x = 31*8 + 13 *y$, where I don't know what $y$ is, since I don't know how to solve $x = 13(\mod31)$. Please help!
I understand there is a method for solving simultaneous modular equations. For example; $$x = 2 \mod{3}$$ $$x = 3 \mod{5}$$ $$x = 2 \mod{7}$$ We find numbers equal to the product of every given modulo except one of them - giving $5 \cdot 7$, $3 \cdot 7$ and $3 \cdot 5$. We then find the multiplicative inverses of these numbers with modulo equal to the number missing from the product. The numbers found are then 2, 1 and 1 in this case. The value of x is then given by: $$x = 2 \cdot (5 \cdot 7) \cdot 2 + 3 \cdot (3 \cdot 7) \cdot 1 + 2 \cdot (3 \cdot 5) \cdot 1 = 233 = 23 \mod{3\cdot5\cdot7}$$ But I do not understand how this method correctly gives the value of $x$. I understand that the Chinese remainder theorem proves that there is a unique value of $0\le x \lt 3\cdot5\cdot7 \mod{3\cdot5\cdot7}$ but can someone please explain why this method finds this value of x?
I can not solve this question $$ \lim_{x\to0}\frac{\sin\frac{1}{x}}{\sin\frac{1}{x}} $$ Because I am getting two different answers for different situation. Situation - 1 ) If $\sin(1/x) = 0$ then the answer will be indeterminate. Situation - 2 ) If $\sin(1/x) \neq 0$ then the answer will be "one". Which one is correct and why?
What is the value of the limit: $$\lim_{x \to 0} \frac{\sin(\frac{1}{x})}{\sin(\frac{1}{x})}$$ I think the answer should be $1$, but one I overheard one of my teachers saying that it is actually undefined.
I have a math, that is too long for only one line. Now I want it to break like this: f(x) = x + ... Or what is the mathematic right way to break such a long formula into several line? Thanks for your help!! P.S.: Its not an equation like f(x) = x + ... = ....
I have an equation long enough to occupy two lines. I want to break it to improve readability. How can I break it? \begin{equation} F = \{F_{x} \in F_{c} : (|S| > |C|) \cap (minPixels < |S| < maxPixels) \cap (|S_{connected}| > |S| - \epsilon) \} \end{equation} I want to break it in 3 lines after \cap. But \\ or \n didn't work.
I'm trying to apply changeset to an org, but the following line of code in my test class: List<sObject> cmpn = Test.loadData(Campaign.sObjectType, 'testCampaigns'); and others similar to it, gives the following error during validation of the changeset. This error does not show up in the Developer console when tests are run. System.SObjectException: ORA-20001: ORA-06512: at "DOC.CACCESS", line 4277 ORA-06512: at "DOC.SSHARING", line 7654 ORA-06512: at "DOC.CSAVEUTILS", line 202 ORA-06512: at "DOC.MCAMPAIGN", line 689 ORA-06512: at line 1 {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} {call mCampaign.insert_campaigns(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)} Stack Trace: Class.System.Test.loadData: line 53, column 1 Class.DailyLeadTaskUpdateBatchJobTest.testDailyLeadTask: line 35, column 1
I am getting the below error while uninstalling a package using metadata service. This issue is coming sometimes Error:- . common.exception.SfdcSqlException: ORA-20011: 10743448001074344800126 ORA-06512: at "DOPEY.CLOCK", line 34 ORA-06512: at "DOPEY.CLOCK", line 217 ORA-06512: at "DOPEY.CLOCK", line 261 ORA-06512: at "DOPEY.CLOCK", line 272 ORA-06512: at line 1 SQLException while executing plsql statement: {call cLock.acquire_lock(?)}(PKG)
Creating the node class Node{ int data; Node left; Node right; Node(int data){ this.data = data; left = null; right = null; } } Creating the tree //create tree class Tree{ Node root = null; void insert(Node temp, int data){ Node NewNode = new Node(data); if(temp == null){ temp = NewNode; } else{ if(data<temp.data){ insert(temp.left,data); } else{ insert(temp.right,data); } } } } Main function public class test{ public static void main(String[] args) { Tree t = new Tree(); t.insert(t.root,3); // t.insert(t.root,1); System.out.println(t.root.data); } } Upon running I get t.root is null. I don't understand why. Need some help. I am passing t.root as temp, so when temp gets modified doesn't that mean t.root does too?
I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
Is there a difference in these two sentences, and if so, what is the difference? Immediately afterwards I remembered having met her. I remembered having met her immediately afterwards. I think there is a difference but cannot identify what it is.
For example: Ever wish you could share information broadly Could it be rewritten to: Ever wish you could broadly share information Are there any rules for the position of the adverbs.
Let $X$ be a non-empty set, and suppose that $*:X^2\to X$ is a function with the associative property, that is, $$(x*(y*z))=((x*y)*z),$$ for all $x,y,z\in X$, where we write the image under the function of the pair $(a,b)$ in $X^2$ as $(a*b)$. Let $x_1,x_2,...,x_n$ be elements of $X$ and suppose that the brackets and $*$s are inserted into the string of symbols $x_1x_2...x_n$ to give an expression which can be computed using the function $*$ to give an element of $X$. Show that the computations of all such expressions (for the same $x_1x_2...x_n$ in that order) will result in the same element of $X$. [Hints: Use induction on $n$ with the hypothesis that each such expression equals both of $$(x_1*(x_2*(...*(x_{n-1}*x_n)...)))$$ and $$(((...(x_1*x_2)*...)*x_{n-1})*x_n).]$$ I'm very confused about what exactly I'm doing induction on. My attempt is as follows: First let $n$ be the number of $*$s appearing the the expression. Then, the base case $n=2$ is given to us. That is $((x_1*x_2)*x_3)=(x_1*(x_2*x_3))$, is the same element of $X$. Now suppose that we have the string $x_1x_2...x_n$, and we insert the $*$s and brackets into the string, so that the resulting expression is computable via the function $*$. We suppose that each expression equals both of $$(x_1*(x_2*(...*(x_{n-1}*x_n)...)))$$ and $$(((...(x_1*x_2)*...)*x_{n-1})*x_n).$$ We note that $n$ is at most $n-1$ here. We wish to prove for the case where $n=n$... I'm not sure if what I'm saying is making any sense here.
I've always heard this reasoning, and it makes obvious sense, but how do you actually show it for some arbitrary product? Would it be something like this? $$(a(b(cd)))e=((ab)(cd))e=(((ab)c)d)e=abcde?$$ Do you just say that the grouping of the parentheses now corresponds to just multiplying straight through? Thanks.
After the last Windows update (), I got this weather icon on the taskbar and clicking on it shows the news, weather and traffic information. How can I remove it?
On Windows 10 version 1909 and newer releases, Microsoft has added a "News and Interests" widget on the Taskbar (see ): How can I remove this Widget from the Taskbar?
Some of my apps having GUI are not working on Ubuntu 19.04 and I suspect it is due to them not supporting wayland. How do I switch it to X11? EDIT: It is not similar to a solution that was suggested. Infact, uncommenting the statement WaylandEnable = false did not even boot up my Ubuntu( I later restored my Ubuntu another way)
Some of my applications don't work on Ubuntu 17.10 Wayland. How can I switch back to Xorg?
What makes better sense for situations like: low light, sports/action, wild life? More cross-type sensor on AF (like Canon does) Or more sensitive cross-type sensors (like Nikon does)
Canon claims that EOS 6D has special capability to focus in low light, but it has only one cross-type sensor and overall only 11 focus points. Does only one cross-type focus point in the Canon EOS 6D affect its ability to focus in low light? Is it correct to assume that more cross-type focus points produce more accurate and sharper focus?
Watching it again today, I noticed the scars on his neck. What's the backstory on those?
In Inglourious Basterds First Lieutenant Aldo Raine (Brad Pitt) had a scar that made it look as though someone had tried to cut his throat. Is there any reason mentioned for that scar (in the movie that I missed, or in interviews with Tarantino etc.)? I kept expecting someone to ask about it, and get some background story. Scar across throat Scar continuing up behind left ear
I have one WordPress site using MySQL for the database, normally each post is attached with a lot of photos and daily traffic is about 5,000-8,000. My current Database size is 750MB and wp-content/uploads = 2.75GB My question is in the future if my website grows to have 10,000 posts, will it be possible to be running? (in case of the disk space is enough) or will my site be very slow? Thank you
What is the maximum size for a MySQL table? Is it 2 million at 50GB? 5 million at 80GB? At the higher end of the size scale, do I need to think about compressing the data? Or perhaps splitting the table if it grew too big?
Say that I developed an hardware source of randomness, which I would like to use to seed a cryptographically secure random number generator. How would I go about testing it? Are there standardized tests that one can use to check wether or not his source of entropy is reliable enough to seed cryptographic random number generation? For example, the guys at onerng.info claim to generate the entropy any user needs to protect his privacy and blablabla. How do they substantiate their claim? How can random number generators be verified?
In the past I have used the Chi-squared test to check the statistical randomness of my generator. Is this a good test to use? Are there other tests?
I would like to know math websites, that are useful for students, PhD students and researchers (useful in the sense most of the students or researchers -of a particular area- are using it). Maybe you can share which math websites you sometime use and why you use it. Let me give my websites and why I use them: MathOverflow and StackExchange: Very good to look up questions about how to do mathematics, what mathematics is, how it evolves, and of course to have an exchange with smart people, who can help you if you stuck at something. arXiv: I don't use it now, but I think that's the main website to read papers and to publish (research level) The Stacks Project: It is very useful for me to loop algebraic things ups with more explanation as in some lectures... MathSciNet: To search for papers, that may help you. Number Theory Web: Since I want to become a number theorist, this site helps me to see which kind of things exist. Have you more websites, that help you to understand maybe mathematics, or just to connect to other mathematicians? Everything is welcome, just post it as an answer and not a comment. Thank you in advance!!
What are some of the web-tools which must be a part of every mathematician's arsenal? Tools which help mathematicians research, solve problems or even collaborate together! Here is a list I gathered. Many among you may already know these, But still, in case. -- This is a great website for easy typing in LaTeX. and the -- Especially useful when one wants to crack a tough indefinite question. Steps included for those who need them! --A list of all mathematically interesting sequences that contains over 3 million of such. Many things are discovered thanks to OEIS. --One of the best online graphing tool with loads of computing power. and -- Who doesn't know them! A unique engine for computing answers and providing knowledge. --Math. Graphics. Programming. Whether you’re analyzing data, developing algorithms, or creating models, MATLAB is designed for way you think and the work you do. Software such as Maple, MATLAB, Mathcad, Pari/GP, R, and the WolframAlpha website, etc are famous, and this question is not asking for similar software alternatives. I haven't added to this list for obvious reasons :~) Thanks in advance to all for the over-enthusiastic help :-) You might want to check out PS-No intention of advertisement or promotion of any website or software.
I am trying to install Ubuntu for the first time and have been unsuccessful. I am using Unetbootin. First i used the 14.04_Live distribution and was told i had a corrupt kernel. I then used 14.04_HDMedia. it trys to boot up, scrolls rapidly through several pages of notifications about what it is doing and such. It then hangs on a dark blank screen. I welcome advice, but my first thought is, maybe I'm using the wrong distribution for my laptop. Which distribution should I use for the following PC HP Pavillion DV-5000 32 bit XP windows media center. Thanks.
What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them. If so, why not promote 64-bit over 32-bit?
I was trying out different desktop environments on Ubuntu 16.04 LTS and ran sudo apt install ubuntu-mate-desktop. It worked, but when I restarted my computer Ubuntu MATE took over start up and the login screen. After uninstalling ubuntu-mate-desktop nothing changed, so I ran sudo apt purge --auto-remove mate* and sudo apt purge --auto-remove *mate*. Now there is no loading screen when shutting down or starting up, and the login still has the layout from Ubuntu MATE. How can I revert the start up and login back to Ubuntu default? Edit: I tried tried the accepted response from the question . This got the splash screen back, but the login screen still has the Ubuntu MATE default not including the background. I also ran sudo apt install ubuntu-desktop, but that didn't do anything because it is already installed. For more detail, startup appears slower, especially getting into the default DE from the Ubuntu MATE login. Once in the default DE, after timeout it goes to the default login, but if I logout it goes to the Ubuntu MATE login.
I have done this in the past in 16.04 and 17.10 but in 18.04 I can not get plymouth manager to work. Downloaded it from the software center but it doesn't work. Is there a guide available that will let me do it in terminal?
I need to find all FieldItemList's with a certain field type. /* @var FieldItemList $field */ foreach ($p->getFields(FALSE) as $field_name => $field){ kint($field->getPluginId()); //NOPE kint($field->getFieldDefinition()); //NOPE kint($field->equals(array('MY_FIELD_TYPE'))); //NOPE } I would expect there is a simple way of finding out the field type of a FieldItemList.
I'm able to get a list of the field types with the following code. $defs = \Drupal::service('plugin.manager.field.field_type')->getDefinitions(); I want to get the field type of a specific field. How do I get it? For example, I'd like to check if the field type of field_image is _image. Is there code similar to the following one? $fieldType = \Drupal::service('plugin.manager.field.field_type')->getDefinition('field_image');
I was reading a book where the dialogues of the actors were written in paragraphs. The dialogues, were broken down by the author into pieces of sentences, and between the pieces, the author inserted his thoughts/facts/humour, and then proceeded with the dialogue. For example, He continued, “Just after the Independence,” and rose from his chair. Should this have been typed as ”, instead of ,”? Or take a second example, He said, “I am a good boy.” This is how it is generally written. But it seems to me that there should be another fullstop at the end of the sentence to mark the end of He said, “———”. sentence. How should inverted commas be closed?
Possible Duplicate: I've heard that you should always place ending punctuation inside of quotes, no matter what. Are there any cases where it is appropriate for a sentence to end with ".?
This should be an easy one... I have the following situation in my ubuntu server (ftpuser is not in the root group): ftpuser$ ch /var/www/ ftpuser$ mkdir test ftpuser$ chmod 775 test now login with root user root$ cd var/www/test root$ touch a.txt root$ chmod 644 a.txt now login with ftpuser again ftpuser$ cd /var/www/test ftpuser$ rm a.txt This works. And this is my question, why does this work? The file a.txt is created by root and has permission 644, so only root should be able delete it. Or is everything in folder test now fully accessible by "ftpuser" user? Thanks for the help.
From the post I understand that rm just needs write permission on directory to remove the file. But I find it hard to digest the behaviour where we can easily delete a file who owner and group different. I tried the following mtk : my username abc : created a new user $ ls -l file -rw-rw-r-- 1 mtk mtk 0 Aug 31 15:40 file $ sudo chown abc file $ sudo chgrp abc file $ ls -l file -rw-rw-r-- 1 abc abc 0 Aug 31 15:40 file $ rm file $ ls -l file <deleted> I was thinking this shouldn't have been allowed. A user should be able to delete only files under his ownership? Can someone shed light on why this is permitted? and what is the way to avoid this? I can think only restricting the write permission of the parent directory to dis-allow surprised deletes of file.
I logged out from programmers.SE and have no intention to log back in, yet PSE is very insistent on logging me in whenever I accidentally visit the web site. I'm using Chrome Sync but I don't think that synchronizes cookies. I'm logging in to other SE sites obviously and I just don't want to login to PSE. The interesting thing is that I actually revoked access of PSE in my Google Accounts page. It's not listed there yet I keep getting logged in to the web site. This makes me think that there is something wrong with how OAuth is implemented somewhere. I'm only using Google OAuth to login to SE sites.
When I tried to log out by clicking the logout link at the top (first time for me because I don't really log out of S[OFU] unless I clear my browser's session data), I got the following message: You're a registered user. You can log in or out at any time using the OpenID you've already associated with your account. And when I clicked on the parts of the site, it seems that I'm still logged in (see, i'm creating this question after I logged out and this question would probably appear in the list of the questions I asked) and my name is still appearing at the top of the page. Is this by-design or is this a bug?
if I ge ArrayList<String> myList; // add some stuff to myList ArrayList<String> copyOf=myList; copy will be a reference to myList, thus if I change copyOf, myList will change to. Hpw can I make coyyOf be a copy of myList, so if copyOf chnages, myList will not change.
How can I clone an ArrayList and also clone its items in Java? For example I have: ArrayList<Dog> dogs = getDogs(); ArrayList<Dog> clonedList = ....something to do with dogs.... And I would expect that objects in clonedList are not the same as in dogs list.
I had given a pen drive of mine to a friend with some data on it. He plugged the pen drive into the Windows 7 powered Acer netbook, didn't eject (unmount) it before pulling it out. When I again plugged in my pen drive on his netbook or on my desktop, it shows that its write protected. Even in Ubuntu, it mounts as write protected. I have read these posts and none worked: The Problems I'm facing: I have no write protection switch on the Pen Drive. I have no registry in the Registry Editor called "StorageDevicePolicies", I'm using Windows 7. I can't format it using EASEUS Partition Manager on Windows 7 or with gPartEd on Ubuntu. Note: I have Windows 7, Ubuntu 11.10 and Mac OS X Lion available to me. Is there any way to format the pen drive so I can use it again? Or is the only way now, to throw it?
When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch. Why did this happen and what can I do about it? Is there a way to remove the write protection? (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.) This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.
THIS IS NOT THE DUPLICATE OF ABOVE BECAUSE:I require pigeonhole principle argument to my doubt which is not stated in the answer to above question... I missed my lecture the day the following theorem for ramsey numbers was proved in the class: If $m,n$ are integers $\gt 2$ then $R(m,n) \leq R(m-1,n)+R(m,n-1)$ Proof: $R(m,n)=$ smallest possible size of group of persons s.t. among these either $\exists \,m$ persons mutual friends or $\exists \,n$ mutual enemies. Let $p=R(m-1,n)\,,q=R(m,n-1)$ and $r=p+q$. Consider the group $\{1,2\ldots,r\}$ of $r$ persons. Let L=$\{$set of persons friends with '$1$'$\}$ and M=$\{$set of persons enemies with '$1$'$\}$ Then $L\cap M=\phi$ .So, we have $|L|+|M|=|L\cup M|=r-1=p+q-1$ We cannot have $|L|\leq p-1$ and $|M|\leq q-1$ . $\therefore$ either $|L| \geq p$ or $|M|\geq q$. This the starting paragraph of the proof which I have stated above. and later the proof is divided into two cases ,(1. when $L$ has atleast $p$ elements. 2.when $M$ has atleast $q$ elements),which I understood... But what I can't understand is the step at begining of proof that: We cannot have $|L|\leq p-1$ and $|M|\leq q-1$ . $\therefore$ either $|L| \geq p$ or $|M|\geq q$. The above statement makes the use of pigeonhole principle but I don't know how.Please anyone who can help me with this ,as I have no idea for this.....
I was reading up on a proof of Ramsey's Theorem and I can't understand this part of the proof: Pick a vertex $v$ from the graph, and partition the remaining vertices into two sets $M$ and $N$, such that for every vertex $w$, $w$ is in $M$ if $(v, w)$ is blue, and $w$ is in $N$ if $(v, w)$ is red. Because the graph has $R(r - 1, s) + R(r, s - 1) = |M| + |N| + 1$ vertices, it follows that either $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$. Why is that $|M| \geq R(r − 1, s)$ or $|N| \geq R(r, s − 1)$? I know from the proof of $R(3,3) = 6$ that given a vertex, at least $3$ are guaranteed to be either red or blue, so what is the pigeonhole argument for the general case?
my question is can the word "or" follow the word "never" in a sentence - see below example. "I have never wished you to hurt me or anyone..." or should it be "I have never wished you to hurt me nor anyone"? Thanks.
This document does not cover the SDK interfaces nor any other reference material. I think the above is correct, but my grammatical checker in Microsoft Word underlines nor and suggests or. Why?
Okay, I've spent too much time looking for this book, it's time to ask for help. Around 10 or more years ago I've read a book about a young person (possibly a girl but I'm not sure). The main theme of the book was that the world's culture was based on magic, which was based on the runes. There was some kind of an earthquake (?) after which the magic stopped to work. It was really weak and had no more use of it. Eventually the hero found out that the runes were basically the map of the world (city?) with added lines, and that the earthquake created an abyss which had to be represented on the 'map' for runes to work. At the end of the book was awesome list (dictionary) of those runes with drawn symbols and written spells. I tried everything and can't find this book. I'm desperate. Sorry for any grammar mistakes, not a native speaker.
I think the main character was a prince or high born person, who one day wakes up and looks in the mirror and his hair is turning white, I think his skin bleaches out too... His servants notice and try to sneak him out, but he ends up being put into a compound with others with the same affliction. Are they dead? There were lots of chases in the novel; running and hiding; learning to survive in the compound... I remember being disappointed with the ending (or maybe just hungry for more) and thinking that there must be another book coming. But I forgot the book title and don't know the author so I can't track down any sequels ;) Read it at least ten years ago. Any help is appreciated!
Let V= Mat2×2(K) be a 4-dimensional vector space with the basis: v1=[1 0; 0 0], v2=[0 1; 0 0], v3=[0 0; 1 0], v4=[0 0; 0 1]. Let A=[a b; c d] ∈ Mat2×2(K). We define the linear map T:V→V, M→A·M, for M∈V.Find the matrix associated with T with respect to the standard basis. My attempt: A*{v1 v2 v3 v4} to get a 2x8 matrix but i dont know where to go from here? i tried to put them together and got: [a 0 b 0; c 0 d 0; 0 a 0 b; 0 c 0 d] I have no idea if this is even correct?
I am having difficulty solve this problem in my homework: (In my notation, $[x;y]$ represents a matrix of 2 rows, 1 column) Let $\mathbf{x}=[x_1;x_2]$, $v_1$=[−3;5] and $v_2=[7;−2]$ and let $T\colon\mathbb{R}^2\to\mathbb{R}^2$ be a linear transformation that maps $\mathbf{x}$ into $x_1v_1+x_2v_2$. Find a matrix $A$ such that $T(\mathbf{x})$ is $A\mathbf{x}$ for each $\mathbf{x}$. I am pretty clueless. So I assume that I start off with the following: $x_1v_1 + x_2v_2 = x_1[−3;5] + x_2[7;−2]$ But I do not know what to do from here, or if this is even the correct start!
I written the following script which gets name of a file and then assemble and link the file. But it doesn't work. What is the problem with it? EXPECTED_ARGS=2 if [ $# -ne $EXPECTED_ARGS ] then echo "[+] Assembling with Nasm." nasm -f elf32 $1 -o $1.o echo "[+] Linking ..." ld $1.o -o $1 echo "[+] Done!" else printf "\nInvalid number of arguments, please check the inputs and try again\n" fi; When I run it without passing any args, it doesn't shows following error: printf "\nInvalid number of arguments, please check the inputs and try again\n"
Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?
I have used live() to create a click event, on the table row, but the data in the table was getting cached, and then after some googling, I discovered that on() is the correct way to add an event to the selector. $('#landingContactTable tbody tr').on("click", function(e) { . . Table is showing 25 records, but has more records that can be viewed by clicking the "next" at the bottom of the table. But when I go to next set of records, I cannot select on the table rows, the click event somehow seems not working on the second set or records. When I was using live(), it was caching the data and I was able to select the rows on the second set of records, but then I need a way to remove the "click" event if the user clicks "rest"? Please let me know how to achieve this? Thanks
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 would like to have three screens connected to my Mac Mini, so far I have one screen connected via HDMI and one screen connected via thunderbolt. The only ports I have left are USB and firewire, would there be any way for me to connect a third monitor?
It seems the new Mac Mini uses both HDMI and Thunderbolt, but bandwidth limitations of Thunderbolt may prevent using 3 daisy-chained Thunderbolt high resolution monitors such as the newly released Apple Thunderbolt 27" Display, limiting you to two instead of three. If this correct: 1. What occurs to the 3rd monitor in a triple daisy-chain? Black screen? Reduced available resolution up to the bandwidth limit of Thunderbolt? 2. Are there HDMI to mini-displayport adapters for connecting the HDMI output of the Mini to the Thunderbolt input of an Apple Thunderbolt 27" Display? Would that even work?
We have below describe call to get the record type id by name. Id recordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get('RECORD_TYPE_NAME_NOT_DEVELOPER_NAME').getRecordTypeId(); This gives the id of the record but this logic is based on label of the record type instead of developer name. That means if we change the Label of record type then any code using such mechanism will break. I know we can make a query to get the record type id by developer name but that will cost me a SOQL which I don't want to. Is there any describe call to get the record type id by developer name without making the SOQL?
I want to get Developer Name of record Type without using SOQL query. With the below code, I'm able to get the "Name", but I want the DeveloperName. Let me know. string recordTypeName = Schema.SObjectType.Account.getRecordTypeInfosById().get(Account.RecordTypeId).getName();
I am trying to create a graphic with pstricks and want to include a logo which has some white colored background. But I want this white background to be transparent. I have tried to change the white background to transparency with gimp and save it as ps file but I think ps cannot deal with transparency. Unfortunately I cannot use png or pdf as far as I know, because I have to use latex -> dvips -> ps2pdf when using pstricks. Hopefully somebody can help me. \documentclass{standalone} \usepackage{pstricks} \usepackage{graphicx} \begin{document} \begin{pspicture}(0,0)(1,1) \psframe[fillcolor=red, fillstyle=solid, linecolor=red](0,0)(1,1) \rput[lb](0,0){\includegraphics[width=1cm]{logo.ps}} \end{pspicture} \end{document} Since my background is not a simple red filled rectangle, it does not help me to color the white background of the logo in gimp (which would be the most simplest solution).
I thought that PSTricks package was not possible to use in pdfLaTeX but . How can I force pdfLaTeX to use PSTricks then?
I need to start a sentence by saying that something has been known for a long time. What is the most elegant way of writing that? Two possibilities that come to my mind are: 1) It has been known since long time that ... 2) Since long, it has been known that ... Personally, I prefer the second option. The first sounds ugly to me. But since I'm not a native English speaker, I would like to ask for suggestions of what would be the best way of saying that. Please feel free to suggest other forms.
Which of these is grammatically correct? 1. a) He has been working under my direct supervision since the last two years 1. b) He has been working under my direct supervision for the last two years 2. a) He has not met her since a very long time 2. b) He has not met her in a very long time Which of the above are correct? Are all of them correct? My friend says 1.b and 2.b are correct, but I am not sure. Or is this an American English and British English thing? (He mostly goes by American English)
Ok guys I can't understand something. Say that I have this circuit: Assuming that I apply at the antenna 5V, how can I calculate how much power I will trasmit? I found on internet that the current that will flow on the antenna radiation resistance, but if for example I go on ebay for try to find antenna no one quote the antenna radiation resistance, so how can I choose my antenna? Moreover I want to know what capacitor C1 and C2 do in this circuit.
I made a simple FM transmitter following and it worked! Now I need some help to understand how. My coil is made of 1 mm copper wire has 6 turns and 8 mm wire diameter. According to this online calculator: this means that: L = 3.9e-7 H I did not have any 5 pF trim capacitor so I used a 3 pF capacitor instead. Am I correct in assuming that the frequency this will transmit on can be found by looking at the L1 C2 as a LC oscillator and using the frequency formulae: fR = 1/(2*pi*sqrt(LC)) ? If so I should get fR = 147 MHz. Which is strange since I received the signal on 91.5 MHz on my radio. In a LC circuit I understand that the signal decays exponentially over time. That is hopefully not happening here. Why? Because of C4 maybe? Also what is the purpose of C1? If I want to increase the range of this FM transmitter somewhat can I do this by simply replacing R2 with a 470 Ohm resistor? Are there free simulator programs that let me see the resulting spectrum at the antenna?
Many of my apps crash right after I try to start them. This issue started about 24h ago. This includes: Gmail Microsoft Outlook Screenshot Touch I use Android 10 with Samsung Galaxy S9. I didn't install any new apps or OS upgrades. I do have the app auto-update on Play turned on. What could be the issue?
Recently, apps that are fine an hour ago now crash when I open them. The crash report message seems to be caused by a null pointer exception (NPE) in com.google.android.trichromelibrary. Apps affected for me: Gmail Dashlane Is it just me, or is there actually something wrong with the library? How can I fix these affected apps? Crash report: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** Build fingerprint: 'Xiaomi/polaris/polaris:10/QKQ1.190828.002/20.9.4:user/release-keys' Revision: '0' ABI: 'arm64' Timestamp: ... pid: ..., tid: ..., name: com.dashlane >>> com.dashlane <<< uid: ... signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 Cause: null pointer dereference ... backtrace: #00 pc 00000000038621f0 /data/app/ com.google.android.trichromelibrary 438909034-YaxP9ttrIDcQBfleP5vm7Q==/base.apk! libmonochrome_64.so (offset 0x646000) (BuildId: ... ) (click for the screenshot of the bug report)
I am trying to prove that if $f : \mathbb R \to \mathbb R$ is locally increasing at every point , i.e. if for every $x\in \mathbb R , \exists r_x >0$ such that $f(a)\ge f(b) , $ whenever $ x+r_x >a>b>x-r_x $ , then $f$ is increasing everywhere . I have proceeded as : Let $a,b \in \mathbb R , a<b$ ; we want to show $f(a) \le f(b)$ ; now for each $p \in [a,b]$ , there is an open n.b.d. of $p$ in which $f$ is increasing , so by these open intervals , we get an open cover of $[a,b]$ and since $[a,b]$ is compact we can get a finite subcover ; but then I am stuck ; can the proof be finished in this way ? Or is there any better way ? Please help . Thanks in advance
A function $f : \mathbb{R} \to \mathbb{R}$ is locally increasing at a point $x$ if there is a $\delta > 0$ such that $f(s) < f(x) < f(t)$ whenever $x-\delta < s < x < t < x+\delta$. Show that a function that is locally increasing at every point in $\mathbb{R}$ must be increasing, i.e., $f(x) < f(y)$ for all $x < y$.
I have 2 scenarios where the verdict results into a runtime error, but with 2 different messages: Scenario 1: def a(): print(aa+bb) #aa=10 #bb=20 print(a()) Verdict for Scenario 1: Traceback (most recent call last): File "Solution.py", line 6, in <module> print(a()) File "Solution.py", line 2, in a print(aa+bb) NameError: name 'aa' is not defined Scenario 2: def a(): print(aa+bb) aa=10 bb=20 print(a()) Verdict for Scenario 2: Traceback (most recent call last): File "Solution.py", line 6, in <module> print(a()) File "Solution.py", line 2, in a print(aa+bb) UnboundLocalError: local variable 'aa' referenced before assignment Now, if the interpreter executes the code line by line and immediately halted after it encountered an error on line 2, how did it generated 2 different error messages.
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?
In I asked for a practical reason to lock votes after 5 minutes and Bill the Lizard and Arjan were very nice to explain the mystery. Well, vote locking seems to deal with strategic downvotes fine, yet vote locking isn't a useful feature in itself. If it was the code, I would call it 'ugly hack', in a sense that it deals with a problem by creating another problem. It deals with few 'reputation optimizers' by annoying the whole community. There's probably no need to illustrate my previous point: I've provided an example in the linked post, and there're many more complaints about it in the meta. Sure, in 99% cases you have no urge to change your vote, yet the remaining 1% is very annoying. So, how can we adjust vote locking to reduce collateral damage? I see two options right off the bat Simple tweak. Lock downvotes only for the users who have answers in this question. Radical. Allow no downvotes in the question where user has posted answer himself. As Kyle Cronin , This has some drawbacks, but can you really trust someone who posted their own reply to be objective about judging the other peoples' replies?. Any ideas?
As we know, the tactical downvoting (I'm talking especially about SO, as I don't know about other sites) is more and more becoming a serious problem, as I see, the community can't stop this behavior without some sacrificing. As a suggestion, I think it makes sense to prevent an answerer from downvoting any answer on the same question, this -sure- has a harm, but IMO, it's less harmful than the tactical downvoting issue, and to make the things a bit more easier, we can prevent an answerer from downvoting a question without posting a comment to that answer before. And vice versa, if a user downvoted an answer, he shouldn't be able to post another one unless he posted a comment first, to prevent working-around that system, so a user can't downvote other answers before posting his own to avoid posting comments. EDIT, more clarification: I don't say wrong answers shouldn't be downvoted, BUT if you want to downvote an answer and post your own, you'll have to post a comment, so we make sure you're not just downvoting right answers tactically.
Like the Title, is there a way to hook an object to another object's vertex(s) ? or any other method that produce the same result.
I just created a plane and added a wave modifier to it, to simply make it look like something fluid. Now, I have an Object that I want to place on the surface of this fluid plane. But how do I do that? I thought of adding a driver to my Objects location, but I have no clue how to get the location of a certain vertex in runtime.
hello guys i need some help on how to model ponies, i couldn't start because i don't know what to do. Reference image is there, now what? YouTube is lacking of tutorial about modeling ponies. Hope to get some answer
I have a cartoon character (a lion) that is part of my business logo that I want to put into Blender and animate it somehow. Is there any way I can take a flat picture (JPEG) and transform it into a 3D image and then animate it in Blender?
I've noticed a window that pops open and then immediately closes at random on my Windows 10 system. I haven't been able to figure out yet how to figure out what is causing that. My malware scans haven't turned anything up yet. I've tried using the Event Viewer however the search fails to run for events that happen in the specified time period. Apparently the query is too long. How can I go about logging what processes open/close or what windows are created? Thanks!
I keep seeing a console window pop up for a fraction of a second every couple of hours. Seems random, I can't pin it to any one particular event. Is there any way I can trap the window and see what it's doing? I'm on Win 10, latest updates, Norton.
In JavaScript, variables created within a function only have scope only within that function: if that's the case, why does the following code produce the output 1? Surely x cannot be accessed from outside of foo ? function foo(){ x = 1; } foo() console.log(x) // '1'
What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?
Here is the screenshot from the Apple Calendar event quick preview: Why it is not a Alert at THE time of event or Alert at time of THE event or even Alert at THE time of THE event I suppose there are definitely no place for "A" article in reason the subject of the question is specific and known - we know what is the time and the event. But why there are no definite article? And is it correct to say "Alert at time of event" in conversation?
Is there a particular term for the abbreviated language used in headlines (the removal of at least articles and conjunctions)?
I've got a table with data and to edit its fields I use this function var tabM = $('table#trips_info'); $('tr',tabM).dblclick(function(){ var tr_HL = $(this); tr_HL.addClass('highLight_edit'); $('td',tr_HL).each(function(){ $(this).attr('contenteditable','true'); }); var sibls = tr_HL.siblings('tr'); $('html, '+ sibls +'' ).on('click',function(){ console.log(tr_HL.text()); tr_HL.removeClass('highLight_edit'); }); event.stopPropagation(); }); especially this part is used to quit editing the current, but I cant make it work properly $('html, '+ sibls +'' ).on('click',function(){ console.log(tr_HL.text()); tr_HL.removeClass('highLight_edit'); }); I want the function to quit editing when user clicks NOT THE current tr but siblings tr or outside the tr an table area Thx in advance
I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area. Is something like this possible with jQuery? $("#menuscontainer").clickOutsideThisElement(function() { // Hide the menus });
Suggestion when you are browsing in the tags screen: When you select a TAG, and then a question, when you press back button, back to select TAG again when should be to the questions about the TAG you selected previously as you do on the other options.
This looks a little bit like a variation on but specific to the tags view. Reproduction (app version 1.0.71): Select any site (say Meta) from the sidebar Switch to the tags view using the top bar Choose a tag, any tag ( is nice) optionaly refine your search with more terms Go to any question found, go back you end on the unfiltered tags view Go back again lucky you, your search is here
My goal right now is to gain a deep understanding of how to talk about mathematical objects formally. The presentation of how to do this in most books is generally to "assume some basic set theory," and then go about developing logic, or "begin with basic notions from logic," and develop set theory. I'm wondering if there is a blended approach, which would first, perhaps, define a little set theory, then a little logic, then a little more set theory, etc., and eventually you'd have enough to go on where it wouldn't be so hard just build out the topics separately. I know that this is going to be a less direct, and probably far uglier way, of going about the development of the very foundations of mathematics, but it is intellectually satisfying to me to know that it has been done. I also believe it appeals to the general mathematical ideal of rigor. The qualities of such a presentation I'm looking for is: Use the fewest "basic notions"/assumptions as possible Only build off notions that have not been assumed or derived (e.g. do not invoke the general "basic notions of set theory" "basic logical notions" unless those notions have been clearly laid out on the table) Thank you!
I am trying to understand what mathematics is really built up of. I thought mathematical logic was the foundation of everything. But from reading a book in mathematical logic, they use "="(equals-sign), functions and relations. Now is the "=" taken as undefined? I have seen it been defined in terms of the identity relation. But in order to talk about functions and relations you need set theory. However, seems to be a part of mathematical logic. Does this mean that (naive) set theory comes before sentential and predicate logic? Is (naive)set-theory at the absolute bottom, where we can define relations and functions and the eqality relation. And then comes sentential logic, and then predicate logic? I am a little confused because when I took an introductory course, we had a little logic before set-theory. But now I see in another book on introduction to proofs that set-theory is in a chapter before logic. So what is at the bottom/start of mathematics, logic or set theory?, or is it circular at the bottom? Can this be how it is at the bottom? naive set-theory $\rightarrow$ sentential logic $\rightarrow $ predicate logic $\rightarrow$ axiomatic set-theory(ZFC) $\rightarrow$ mathematics (But the problem with this explanation is that it seems that some naive-set theory proofs use logic...) (The arrows are of course not "logical" arrows.) simple explanation of the problem: a book on logic uses at the start: functions, relations, sets, ordered pairs, "=" a book on set theory uses at the start: logical deductions like this: "$B \subseteq A$", means every element in B is in A, so if $C \subseteq B, B \subseteq A$, a proof can be "since every element in C is in B, and every element in B is in A, every element of C is in A: $C \subseteq A$". But this is first order logic? ($(c \rightarrow b \wedge b \rightarrow a)\rightarrow (c\rightarrow a)$). Hence, both started from each other?
This is my Ubuntu version. # uname -a Linux psh-VirtualBox 5.3.0-42-generic #34~18.04.1-Ubuntu SMP Fri Feb 28 13:42:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux I did the same experiment after setting the swappiness values ​​1 and 100. The test is to fill the cache area and then allocate more than free memory in the new process. However, none of them used the SWAP area. Even if the swappiness value is 100, isn't the SWAP area used? When swappiness = 1 # sysctl -w vm.swappiness=1 vm.swappiness = 1 swapoff -a swapon -a echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches # free total used free shared buff/cache available Mem: 8152876 995524 7036300 20760 121052 6951560 Swap: 3067108 0 3067108 # dd if=/dev/zero of=./file_1 bs=1024 count=6500000 # free total used free shared buff/cache available Mem: 8152876 994732 356972 20760 6801172 6833516 Swap: 3067108 0 3067108 # ./memory_allocate_2G # Another Session # free total used free shared buff/cache available Mem: 8152876 3055936 129096 20760 4967844 4775416 Swap: 3067108 0 3067108 When swappiness = 100 # sysctl -w vm.swappiness=100 vm.swappiness = 100 swapoff -a swapon -a echo 1 > /proc/sys/vm/drop_caches echo 2 > /proc/sys/vm/drop_caches echo 3 > /proc/sys/vm/drop_caches # free total used free shared buff/cache available Mem: 8152876 995892 7049160 20760 107824 6957692 Swap: 3067108 0 3067108 # dd if=/dev/zero of=./file_1 bs=1024 count=6500000 # free total used free shared buff/cache available Mem: 8152876 995236 366380 20760 6791260 6832984 Swap: 3067108 0 3067108 # ./memory_allocate_2G # Another Session # free total used free shared buff/cache available Mem: 8152876 3055936 129096 20760 4967844 4775416 Swap: 3067108 0 3067108 Would my test be wrong? thank you. And Our Live Server free info ( Why use swap when there is enough free space? ) swappiness is 10. Linux Server 3.2.0-29-generic #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ free total used free shared buffers cached Mem: 32901680 29978376 2923304 0 193676 9317964 -/+ buffers/cache: 20466736 12434944 Swap: 7812092 6379492 1432600
We have a RHEL 7 machine, with only 2G of available RAM: free -g total used free shared buff/cache available Mem: 31 28 0 0 1 2 Swap: 15 9 5 so we decided to increase the swappiness to the maximum with vm.swappiness = 100 in /etc/sysctl.conf instead of 10, and used sysctl -p to apply the setting. After some time we checked the status again: free -g total used free shared buff/cache available Mem: 31 28 0 0 2 2 Swap: 15 9 5 as we can see despite the new swappiness setting, we see from free -g that the available RAM stays at 2G. Why? What is wrong here? We expected to see 15G of used swap. We also checked: cat /proc/sys/vm/swappiness 100 so everything should work according to the new settings BUT free shows the same situation. What is going here?
There seem to be many different ways of organizing methods in a class. I could group methods by access, and order them alphabetically. I could group related methods together. I could use a mix of the two, or something else entirely. Is there a standard way to approach this? If not, how do you approach it?
Is there an official C# guideline for the order of items in terms of class structure? Does it go: Public Fields Private Fields Properties Constructors Methods ? I'm curious if there is a hard and fast rule about the order of items? I'm kind of all over the place. I want to stick with a particular standard so I can do it everywhere. The real problem is my more complex properties end up looking a lot like methods and they feel out of place at the top before the constructor. Any tips/suggestions?
I'm not a native English speaker, and the use of could and would always confuses me. Could someone please explain it to me?
Most people say I wish I could, I wish you would. Can we use I wish I can, I wish you will? I'd like to know what the main differences between the usage of can/will and could/would are when wishing. Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will? Or is it something else entirely?
I am trying to import python files programmatically using importlib. For instance, given a file "a/b/some_file.py", and given also there are no __init__.py files in any of those directories (nor can I add them), what is the best way to import it? What I tried doesn't seem like it's correct: (After lunching the prompt from "a"'a parent directory and adding it to the path) >>> importlib.import_module('a.b.some_file') ImportError: No module named a.b.some_file I also tried a relative import but the result is the same.
How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option.
What does the small stamp/picture (usually in the upper left hand corner) on comic book covers indicate? The Hulk below is the best example of what I am referring to (where he appears just below the "35¢" stamp). I was wondering if it was related to who was in the issue, or maybe a preview of who would be in the next issue.
I've noticed a Spider-man symbol on several of my Marvel comics from the 80's. Any ideas on what it could mean?
I want to run a small Windows program that has no reputation. I can always scan it, but I can't get feedback from other users on its performance or if it is at all malicious. Rather than go through the pains of creating a virtual machine, would installing the program in WINE be safe? Would the program be sandboxed from the rest of my system? Can a malicious Windows program even harm a Ubuntu system?
The Story I installed wine some time ago, and after trying out some versions of Cinema 4D that were "free", I looked in the comments of the videos, and saw some people complaining about viruses. I got worried, downloaded and installed MalwareBytes, and scanned my "system". Of course, since MalwareBytes was runnning through Wine, it only scanned ~/.wine/C:. It found many viruses/trojans and I opted to delete them. I did so. Questions: Assuming there is any malware left, can this malware spread into my OS? Tell me the entire truth on what can happen. I deleted my entire .wine directory and am planning to uninstall wine later. I am the only user out of the three on this system that runs wine programs, but wine is installed for all. Is that enough, or must I do more? Please be specific on what I should do because I want to be 100% sure that there are no viruses. I am sure that many others have these questions too, so please answer this question to the point. Additional information: Wine was installed with sudo-apt get. The exact commands can be found here: Commands: sudo add-apt-repository ppa:ubuntu-wine/ppa -y sudo apt-get update sudo apt-get install wine1.6 -y I did try to install a font that was a ttf font. I tried to convert it to otf with no success. Then, I placed it in the fonts directory directly. I then saw that some people said it was malicious, and I removed it. This question was flagged as a duplicate of this question: It is not the same. This question is more precise, as it specifies two scenarios involving viruses, not risks of viruses. The other question talked about Internet Explorer; this one does not mention the installation of any programs. Note: wine was installed with sudo privileges, so does that mean it runs with sudo privileges?
I am looking to use my existing WD harddrive but use thunderbolt 2 instead of the usb3 A connection. I have looked for cables but all I find is type c ones.
I have the Late 2013 Macbook Pro, which has two USB 3.0 ports and two Thunderbolt 2 ports. I currently use both USB 3.0 ports and one TB2 port. I want to connect a third USB 3.0 device to the machine, but I don't want to use a USB splitter on one USB port as I'm concerned the devices would draw too much power from the bus. I have no current use for the second TB2 port and I would love to be able to use it for this purpose. Browsing extensively online, I've found numerous docks, such as , that connect via a Thunderbolt cable. This would work, but it's an expensive, 'bulkier' solution (and not the one I'm looking for). I'm aware that a USB 3.0 device wouldn't be able to take advantage of Thunderbolt's I/O speeds, but it's certainly compatible, which is all I'd need. After all, Apple even sells a . I also know that Thunderbolt is not only used for digital video purposes (along with the TB > Firewire option, there exists ). There are almost no Thunderbolt to USB 3.0 cables/adapters on the market. I'd think this hardware would be more prevalent given the prominence of USB devices out there. What adapters are available for OS X?
Before I begin, here is what I'm working on a class named "Zoo" which contains the main method an abstract class named "Animal" Several extended classes for class "Animal" I have the code for "Zoo" posted at the bottom. I keep getting the following error when I run it Exception in thread "main" java.lang.NullPointerException at zoo.Zoo.add(Zoo.java:27) at zoo.Zoo.main(Zoo.java:90)" If I comment out the second zoo part it works fine. Why am I getting an error for the 2nd zoo? And what can I do to fix it? public class Zoo { private int actual_num_animals; private int num_cages; private Animal[] animals; Zoo() { actual_num_animals = 0; num_cages = 20; animals = new Animal[num_cages]; } Zoo(int num_cages) { this.num_cages = num_cages; } // adds an animal to Zoo public void add(Animal a) { for(int i = 0; i < num_cages; i++) { if(animals[i] != null && animals[i].equals(a) == true) { System.out.println(a.getName() + " is already in a cage!"); break; } else if(animals[i] == null) { animals[i] = a; actual_num_animals++; break; } } } // returns the total weight of all animals in zoo public double total_weight() { double sum = 0; for(int i = 0; i < actual_num_animals; i++) { sum += animals[i].getWeight(); } return sum; } //Print out the noises made by all of the animals. public void make_all_noises() { for(int i = 0; i < actual_num_animals; i++) { animals[i].makeNoise(); System.out.println( animals[i].makeNoise()); } } //prints the results of calling toString() on all animals in the zoo. public void print_all_animals() { for(int i = 0; i < actual_num_animals; i++) { System.out.println(animals[i]); } } public static void main(String[] args) { Zoo z = new Zoo(); Snake sly = new Snake("Sly", 5.0 , 2, 2); Snake sly2 = new Snake("Slyme", 10.0 , 1, 2); Cow blossy = new Cow("Blossy", 900., 5, 10); Horse prince = new Horse("Prince", 1000., 5, 23.2); // Following not allowed because Animal is abstract //Animal spot = new Animal("Spot", 10., 4); z.add(sly); z.add(sly2); z.add(blossy); z.add(prince); z.make_all_noises(); System.out.println("Total weight = " + z.total_weight()); System.out.println("**************************"); System.out.println("Animal Printout:"); z.print_all_animals(); System.out.println("********* Now we will make the Second Zoo"); Zoo z2 = new Zoo(5); z2.add(sly); z2.add(sly2); z2.add(blossy); z2.add(prince); z2.add( new Horse("Warrior", 1200, 6, 25.3)); z2.add( new Horse("Harry", 1100, 4, 21.3)); System.out.println("Total weight of z2="+z2.total_weight()); z2.make_all_noises(); z2.print_all_animals(); } } If needed I can post the "Animal" class and the other classes that extend from it.
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?
So I ran three paired samples t-tests to see if people did a certain action more after hearing a target stimulus. my prediction is that they would do the action more. All tests were one-tailed as i was only looking at one direction: did it increase after x. n = 29 for each test. the p values for tests were, First test:.061, one-tailed, Second test:p = .098, one-tailed and third test: p = .13, one-tailed. But in every result the mean was higher in the group I predicted would be higher after the stimulus. So, when I report this what can I say? Should I say that while not 'significant' they were in the 'expected direction' and that repeating the test with a larger sample is needed? In other words that there is an interesting trend and deserves more investigation? Thanks so much!
The general consensus on a similar question, is that "highly significant" is a valid, though non-specific, way to describe the strength of an association that has a p-value far below your pre-set significance threshold. However, what about describing p-values that are slightly above your threshold? I have seen some papers use terms like "somewhat significant", "nearly significant", "approaching significance", and so on. I find these terms to be a little wishy-washy, in some cases a borderline disingenuous way to pull a meaningful result out of a study with negative results. Are these terms acceptable to describe results that "just miss" your p-value cutoff?
I installed the latest kernel (4.1) and want to boot into it instead of 3.9. How can i do this on ubuntu 15.04?
Currently I'm running Linux-3.0 and I want to update it to Linux-3.3.1 the latest stable kernel release as mentioned at . Can I update to 3.3.1 in Ubuntu without any risk of crashes? I'm updating my kernel regularly as provided by the Update Manager..Currently I have Linux-3.0.0.17..Can I update? NOTE: The latest kernel version any user is supposed to use in Ubuntu is updated automatically via the Update Manager, so no action is normally required by user regarding kernel upgrades. What the question author is referring to is mainline kernel, see:
How can I use regex to replace all the characters in a string that are either alphabetic, a forward slash, a period or double quotations? I am able to do letters: "abcd123/./"".replace(/([^\x00-\x80]|\w)/g, "someReplacementText"));
I don't really understand regular expressions. Can you explain them to me in an easy-to-follow manner? If there are any online tools or books, could you also link to them?
Is there any way to find out the motherboard for my dell e6420 without opening the machine? I want to find out the maximum and type of ram.
I want to find out the exact model of my computer's motherboard so that I can see what sort of memory chip, graphics cards and other components it supports. I'm using Windows 7 Ultimate 64-bit.
My dad died, and I loved him very much but he restricted parts of my life that are no longer restricted. Is there a word for the uncomfortable and sometimes disturbing feeling of enjoying that?
I frequently find myself needing a word to express happiness that acknowledges a tragic or unfortunate circumstance underpinning that happiness. Preferably the word could have both adjective and verb forms. For example, "Gregory [verb-ed | felt adjective about] the balmy February day, suspecting it was yet another consequence of catastrophic and irreversible climate change." "Bittersweet" is close, but not precisely right. It implies ambivalence rather than genuine gladness. "Schadenfreude" is also in the neighborhood, but I don't want to imply that the tragic part of the situation is what causes the pleasure. (Also, I recognize that the word may not quite exist in English, and I don't know if this is forbidden for this forum, but I'd welcome a loan word or phrase if there's a better one.)
How can I determine the version of the running kernel?
The path to previous driver is usually /lib/modules/<kernel-version>/kernel/net/wireless I need this info so I can finish updating my STA Broadcom wireless. However, I'm a noob at Ubuntu and I'm not sure how to find the kernel version or kernel. I checked /lib/modules/ and found this: 2.6.27-10-generic 2.6.32-30-generic 2.6.32-34-generic 2.6.32-38-generic 2.6.27-7-generic 2.6.32-31-generic 2.6.32-35-generic 3.2.0-54-generic 2.6.28-19-generic 2.6.32-32-generic 2.6.32-36-generic 3.2.0-54-generic-pae 2.6.31-23-generic 2.6.32-33-generic 2.6.32-37-generic Which one is the running kernel? Another question. Is there a snippet so I don't have to cut and paste? Thanks for your time! :)
I love playing Minecraft servers on my phone, but it usually baffles me that when I want to play my most favorite server, CubeCraft, has higher ping than the rest of the servers. Now, to put it simply, I'm from GMT+8, so I'm somewhere at Asia, and the only server that has normal ping is The Hive, the only featured server with an Asian region. The others are from either NA (Lifeboat, Mineplex, Mineville, Galaxite) or EU (CubeCraft, Galaxite), and they give around 200 ping, whereas EU servers give 300 ping. In Hive AS, the ping is usually 69. So why does servers in foreign regions give higher ping?
I've seen the term used in many online games but I'm not sure what it means. What does 'ping' mean? Is it better to have high or low ping?
I have a table called cc_calls and there I have many call records I want to count them and group them in months I have a timestamp called starttime and I can use that row to extract the month, also limit the count for 12 months the results should be like: Month Count January 768768 February 876786 March 987979 April 765765 May 898797 June 876876 July 786575 August 765765 September 689787 October 765879 November 897989 December 876876 Can anyone guide me or show me the mysql query that I need to get this result.
Is it possible to make a simple query to count how many records I have in a determined period of time like a year, month, or day, having a TIMESTAMP field, like: SELECT COUNT(id) FROM stats WHERE record_date.YEAR = 2009 GROUP BY record_date.YEAR Or even: SELECT COUNT(id) FROM stats GROUP BY record_date.YEAR, record_date.MONTH To have a monthly statistic. Thanks!
I'm trying to make a minigame where you have different kits. You step on a pressure plate and get all your armor and effects added. That's all working fine. I'm trying to make it so it places a sign above the pressure plate saying "TAKEN" "BY" "[PLAYERWHOHASTHATKIT]" In bold dark red Is this possible? I've tried /blockdata ~ ~-1 ~ {"Text3":"@p"}with all the other text I want. Is this possible?
So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command. How do I do that?
I recently had this error, and surely other people also are going to have when they update the POSTGIS and POSTGRESQL, so I want to share the solution. OS: CENTOS 6 (x86_64) Installed: postgresql-9.6 from yum install postgresql96-server postgresql96 installer: postgis2_96 yum install postgis2_96 problem/error when start to enable POSTGIS using psql or pgAdminIII : psql (9.6.3) postgres=# \connect SANTANDER You are now connected to database "SANTANDER" as user "postgres". SANTANDER=# CREATE EXTENSION postgis; ERROR: could not load library "/usr/pgsql-9.6/lib/postgis-2.3.so": /usr/pgsql-9.6/lib/postgis-2.3.so: undefined symbol: pj_get_spheroid_defn I checked the PROJ version: $ yum list installed | grep proj proj.x86_64 4.7.0-1.el6 @epel the problem is solved upgrading the PROJ $ yum upgrade proj Updated: proj.x86_64 0:4.8.0-2.rhel6
OS is openSUSE 12.1, PostgreSQL - 9.1, PostGIS - 2.0. Postgre/PostGIS are installed from Application:Geo repository. After recent updates when I try to connect to my database I get the following error: ERROR: could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so": /usr/lib/postgresql91/lib64/postgis-2.0.so: undefined symbol: pj_get_spheroid_defn I searched the web for this error (, ) and seems that it may have something to do with ld.so.config (or ldconfig command). But I can't figure out what I have to do in my case.
After I made a system upgrade (apt-get upgrade) on a Debian box, I get an error every time I try to use apt-get. Example: # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: initscripts E: Sub-process /usr/bin/dpkg returned an error code (1) I have tried to find a solution, but can't find anything that looks like this. First of all I have this packet which is "not fully installed or removed". But I can't find the command to locate it. But it lists about 20 packets, so there must be a better way to find this packet. To fix the packet system I have tried normal procedures, like: apt-get clean && sudo apt-get autoremove apt-get -f install dpkg --configure -a The clean command is good, but the install command will fail with as shown above. In a desperate try, I tried to reinstall insserv (not sure it's the packet which is broken), but it fails the same way: # apt-get install --reinstall insserv Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. Need to get 63.8 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main insserv armel 1.14.0-5 [63.8 kB] Fetched 63.8 kB in 0s (85.5 kB/s) Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: initscripts E: Sub-process /usr/bin/dpkg returned an error code (1) Hope some of you can help me fix the issue. Edit Got a bit further: dpkg --audit The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect: initscripts scripts for initializing and shutting down the system The following packages are missing the list control file in the database, they need to be reinstalled: insserv boot sequence organizer using LSB init.d script dependenc ssmtp extremely simple MTA to get mail off the system to a mail The following packages are missing the md5sums control file in the database, they need to be reinstalled: insserv boot sequence organizer using LSB init.d script dependenc ssmtp extremely simple MTA to get mail off the system to a mail binutils GNU assembler, linker and binary utilities But I'm still not able to fix anything: # dpkg-reconfigure initscripts /usr/sbin/dpkg-reconfigure: initscripts is broken or not fully installed and: # apt-get install --reinstall initscripts Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. E: Internal Error, No file name for initscripts:armel
After I made a system upgrade (apt-get upgrade) on a debian box, I get an error everytime i tries to use apt-get. Example: # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: initscripts E: Sub-process /usr/bin/dpkg returned an error code (1) I have tried to find a solution, but can't find anything that looks like this. First of all I have this packet which is "not fully installed or removed". But I can't find the command to locate it. Have tried: dpkg -l | grep rc But it list about 20 packets, so there must be a better way to find this packet. To fix the packet system I have tried normal procedures, like: apt-get clean && sudo apt-get autoremove apt-get -f install dpkg --configure -a The clean command is good, but the install command will fail with as shown above. In a desperate try, I tried to reinstall insserv (not sure it's the packet which is broken), but it fails the same way: # apt-get install --reinstall insserv Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 8 not upgraded. 1 not fully installed or removed. Need to get 63.8 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://ftp.us.debian.org/debian/ wheezy/main insserv armel 1.14.0-5 [63.8 kB] Fetched 63.8 kB in 0s (85.5 kB/s) Setting up initscripts (2.88dsf-41+deb7u1) ... insserv: Service killprocs has to be enabled to start service single insserv: exiting now! update-rc.d: error: insserv rejected the script header dpkg: error processing initscripts (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: initscripts E: Sub-process /usr/bin/dpkg returned an error code (1)
I have just reviewed about 8 suggested edits. Out of those, 5 were edits where nothing was changed besides one word "debuging" in the title was changed to "debugging". I think there are probably other common programming words that people constantly typo. If it's in the post it's minor, but maybe an auto-correct for the title? A very small suggestion, but I thought I'd throw it out there anyway. Update I'm sorry, but I don't agree with the closing decision or the downvotes. First of all, this post isn't a duplicate of the linked for two reasons: The problem I'm pointing to isn't with bad grammar. I'm talking about having a list of specific programming words that are constantly being typo'd I'm only referencing mistakes in titles, and not in posts. To quote @AlienArrays comment: I just searched this stackoverflow.com/search?q=boostrap, got over 1100 results! Maybe we should hold a rally or something and go through one word a day! I find it hard to believe that autocorrecting those manually is anything but a waste of time. With all the due respect to community fixing, I'm talking about specific typos that happen again and again and again. There's no point in not auto-fixing them. Now with questions it makes sense to me to leave editing to other users, because if it's a well written post, changing an i to an I is minor, and most users will avoid editing and it doesn't really matter all that much. If a post is written badly, either it will be ignored because it doesn't deserve the attention or the typos will be fixed along with other more important edits. My point is, they get treated in the context of the rest of the question, which varies. But titles? Anyone can make a stupid typo like writing debuging instead of debugging, regardless of the quality of the post. I find it surprising that suggesting to automatically fix that (which will probably save a ton of time, and make for better search results) receives such negative responses. Another update I'd like to quote the answer of the @ire_and_curses which I think says everything (emphasis mine): I think some automated cleanup would be beneficial [...] Despite what users on meta claim, manual community cleanup is not sufficient to keep up with the incorrect grammar and typos. Take a look through any random selection of questions on Stack Overflow. You'll find them full of errors, even ones with lots of votes and answers. In a related way, I also think a lot of tag cleanup tasks could be automated [...] One thing that does surprise me is how ambivalent/negative the reaction seems to be to this sort of proposal. On a website dominated by people whose job it is to automate things, I find the answer 'we have people to do that manually' difficult to understand. I couldn't have said it better myself. Even if you still think my post is a duplicate, it doesn't seem like the previous post received a canonical answer that closed the subject for good. I think it's important this issue deserves some more attention and debate, and as you can see from the quote, I'm not the only one to think so. Suggested solution @Shog9 mentioned in comments that there are no alternatives. I'd like to respond to that with my suggested solution: have a dictionary for common cases. I can think of two good ways to populate it: Recognize common edits (if word 'a' as changed to 'b' more than 20 times, the next time it will be replaced automatically). Let users higher than 2K populate and change the list as they please. Obviously, this sort of thing needs to be done with caution, but I think it's solvable (either with my suggestion, or using a different auto-correcting tools). Even still, we can solve this without actually autocorrecting automatically - here's another suggestion: Have a small warning pop up to users when the autocorrecting tool recognizes a possible mistake in the title. You still leave it to the users to fix, but you are doing something to maybe prevent too much mistakes and tons of repeated edits. How's that?
I have noticed this in hundreds of questions. Most of the users use invalid lower case letters. "i" instead of "I" and "how to do..." instead of "How to.." Other than that I can see a lot of abbreviated words like "plz", "thx", etc. However, they are not nice to see on a Q&A site. And these are the things that can be corrected by a bot (or even when submitting the question). I just wanted to add this as a new idea.
I believe that I was in the shading tab. I entered into editing mode to resize the plane. When I was done, I noticed that the plane was in a completely different location in the viewport mode and cut off in the corner. Also, most of the objects were not visible. However everything is still visible in render mode. The only things that I can get to show in the viewport are: the reference image, a piece of the camera, and the plane, but it's in the wrong position and also missing a corner. Copy of the project file:
When looking at my objects in 3d view I'm seeing a gray cone that seems to be hiding other objects. Can anyone help me turn this off and explain what it is please. Screenshots attached.
In settings, I don't see a way to stop the PC from going to sleep.
I've been fiddling with my new Haswell macbook air (with Mountain Lion), and there's a difference between the "energy saver" settings on my macbook vs my 2011 iMac. On my iMac, there's a "Computer Sleep" as well as a "Display Sleep" setting, but the macbook air only has "Display sleep": When I don't use the computer for an hour or so, I want the display to go to sleep, but the computer should still be on, and shouldn't e.g. disconnect me from my chat sessions. How can I do this? Thanks for your help.
I'm on a rather old version of ubuntu, zesty 17.04. I am trying to update / upgrade. Firstly, is it correct to be upgrading to 17.10 and then 18.04? The process I have followed to get to the errors below, I'm not sure if its the W, N or E's in the errors that are the problem. /etc/apt/sources.list file contains only this deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ ARTFUL-security main restricted universe multiverse I have removed all files from /var/lib/apt/lists and /etc/apt/sources.list.d/ I then run this: sudo apt update --allow-insecure-repositories --allow-unauthenticated this is the last part of the output, where the errors / warnings start. Ign:57 http://old-releases.ubuntu.com/ubuntu ARTFUL-security/universe all Packages Reading package lists... Done W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL-updates Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. W: The repository 'http://old-releases.ubuntu.com/ubuntu ARTFUL-security Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL/main/binary-i386/Packages 404 Not Found E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL-updates/main/binary-i386/Packages 404 Not F ound E: Failed to fetch http://old-releases.ubuntu.com/ubuntu/dists/ARTFUL-security/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.
Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found: $ sudo apt-get install vlc Reading package lists... Done Building dependency tree Reading state information... Done E: Couldn't find package vlc
While using INDEX and REGEXEXTRACT, how can I change this formula to return a blank cell (instead of 0) when all of the cells in that section are blank?
I am using the following formula in a Google Sheets to calculate the number of days between two dates (dates are in columns G and AL): =ARRAYFORMULA(if(row(A:A)=1, "Readmission Days", (G:G)-(AL:AL))) It has to be an array because I am working with a Google Forms and entries are automatically populated into new rows. The problem is that some of the cells in col AL are blank, so the formula is reading those dates as something else and returning a very large number. Also, when both cells are blank, the formula returns a 0, messing up my data. How can I include something to ignore blank cells or just return a blank when one or both cell references is blank?
I'm looking for an application/service that provides a usable desktop (icons, etc.) and takes its directory from ~/Desktop (running a custom Ubuntu installation where Nautilus was broken and so removed). Any suggestions are welcome.
Are there any good alternatives to Nautilus? I'm looking for something lightweight, with a cleaner interface, but the ability to manually enter file paths is still important. Any suggestions?
I am a middle school student and I want to learn more about physics from A - Z but I don't know any book or website that is useful. Can you share me some suggestions?
Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start. All the questions linked below, as well as others which deal with more specialized books, can be found under the tag (formerly ). If you have a question to add, please edit it in. However, make sure of a few things first: The question should be tagged It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list Related Meta:
Prove that a finite group $G$ is nilpotent if and only if whenever $a, b \in G$ with $gcd(o(a), o(b)) = 1$, then $ab = ba$. I know that a finite group G is nilpotent iff it is a direct product of its sylow subgroups. $(\implies)$ Let G be nilpotent. So, it is a direct product of its sylow subgroups. $\therefore G=P_{1}\times P_{2}\times \ldots \times P_{k}$ i.e. $G=P_{1}P_{2}\ldots P_{k}$ where each $P_{i}\lhd G \;\forall\,i\in \{1,2,\ldots,k\}$, and $(P_{1}P_{2} \ldots P_{i})\cap P_{i+1}=\{e\} \;\forall\,i\in \{1,2,\ldots,k\}$. Consider $a,b \in G$ such that $gcd(o(a),o(b))=1$ Case 1: If $a=e \;\; or \;\; b=e$ There is nothing to prove in this case Case 2: If $a\neq e\neq b$ If $a,b\in P_{i}, \; sylow\;p_{i}-subgroup$ for some $i$, then $gcd(o(a),o(b))\geq p_{i}>1$. Hence, a contradiction. $\therefore a\in P_{i}, b\in P_{j},\; i\neq j$ Also, $P_{i}\cap P_{j} = \{e\}$ So, $aba^{-1}b^{-1}\in P_{i}\cap P_{j} $. Hence, $ab=ba$ $(\impliedby)$ Here if I prove that each of the sylow subgroups of G is normal in G, and I already have trivial intersection for each sylow subgroup of distinct primes. So, I would have G as the direct product of sylow subgroups which would imply G is nilpotent. I am not able to think how to prove the normality part. Please give some hints. Also, please check the forward implication. Thanks!
(Question 9 in chapter 6.1 of Dummit and Foote). Prove that a finite group G is nilpotent if and only if whenever $a, b \in G$ with $(|a|, |b|) = 1$ then $ab = ba$. It says to use the following theorem: Let G be a finite group, $p_1$, $p_2$, ... $p_s$ be the distinct primes dividing its order, and $P_i \in Syl_{p_i}(G)$. Then G is nilpotent iff $G \cong P_1 \times P_2 \times ... P_s$. I believe I know the if direction: an element $a \in G$ corresponds to an element $(g_1, g_2, ... g_s) \in P_1 \times P_2 \times ... P_s$ and $|a| = lcm(|g_1|, |g_2|, ... |g_s|)$. If $b$ corresponds to $(h_1, h_2, ... h_s)$ then $(|a|, |b|) = 1$ implies each $(|g_i|, |h_i|) = 1$. Since the order of the elements divides $|P_i|$ a prime power, $|g_i|$ or $|h_i|$ has to be 1 or their gcd would not be 1. So one of every pair $g_i$ and $h_i$ has to be 1, so they commute, so $a$ and $b$ commute. I'm not sure how to do the only if direction. Any pointers? Thank you
After installing Ubuntu 12.04 on my system, Windows XP won't boot any more. Ubuntu starts ok however. When starting Windows in the Grub menu, it give's an error: ERROR: UNKNOWN FILESYSTEM. GRUB RESCUE I've tried to resolve it using boot-repair but with no result. Also tried the booterrorfix as suggested but no result. Boot-repairs logs the following info: Your support is much appreciated.
So I installed Ubuntu 12.04 alongside Windows XP, and I played with it for a like an hour. When I wanted to go back to Windows, I chose the Windows option in the GRUB screen. It just gives a black screen and goes back to grub. I tried boot-repair as I've seen in some other post that it could resolve the problem, but it's all the same. Nothing changed. I can use Ubuntu but not Windows. Can someone please tell me how I can solve this? Thanks.
I have a rectangle that i want to fill with a color. When i write Fill = "#FFFFFF90" it shows me an error: Cannot implicitly convert type 'string' to 'System.Windows.Media.Brush Please give me some advice.
I have a configuration file where a developer can specify a text color by passing in a string: <text value="Hello, World" color="Red"/> Rather than have a gigantic switch statement look for all of the possible colors, it'd be nice to just use the properties in the class System.Drawing.Brushes instead so internally I can say something like: Brush color = Brushes.Black; // Default // later on... this.color = (Brush)Enum.Parse(typeof(Brush), prasedValue("color")); Except that the values in Brush/Brushes aren't enums. So Enum.Parse gives me no joy. Suggestions?
I'm trying to repair damaged power supply. I've already replaced some burned/shorted diode and mosfets. Now I'm struggling with resistor connected between main mosfet's drain and ground. It should be probably 0.5 - 1 ohm one. My meter is reading 0.1 ohm, which is probably too low. I'm not able to read the value from the color stripes properly. They're probably violet, green, white (silver?), red and black. I'm guessing 0.75 ohm ww. Can somebody please help me to confirm this? I've tried to search similar questions, but the white stripe is confusing me. I've temporarily tried to replace it by two 3.9 ohm 2 watts ones in parallel. Power supply seems to be starting ok with them. Haven't tried with higher load yet. With the original resistor, the main fuse gets burned immediately after powering on.
I am currently in the process of trying to repair a power supply that has had one of its DC rails fail. A resistor in the PSU has exploded and I am trying to find what value it is. Band 1: White Band 2: Brown Band 3: Silver (Possibly Grey?) Band 4: Gold Band 5: Green The weird thing is that the middle band appears to be silver, which should be invalid as far as I can tell. If you assume the silver is grey (although this is unlikely, as there still needs to be a grey colour as well and the band is metallic), it produces a value of resistor which is incredibly uncommon to the point it does not exist (91.8 Ohms 0.5%). Apologies for the noobie question, I'm just stumped after hours of trying to understand why this is and coming up short :).
I want to group all pharmacies present in the same night in a unique row following this night. select days.day, pharmacy.name from days, pharmacy, pharmacy_night where (pharmacy.Id_pharmacy in (SELECT Id_pharmacy FROM pharmacy_in_region(@idregion)) and pharmacy.Id_pharmacy = pharmacy_night.Id_pharmacy and days.Id_day = pharmacy_night.Id_day) The desired output: row 1: Monday Pharmacy1_pahrmacy5- row 2: Tuesday pharmacy9_
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life). In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently. group_concat, by the way, does this: given a table of, say, employee names and projects... SELECT empName, projID FROM project_members; returns: ANDY | A100 ANDY | B391 ANDY | X010 TOM | A100 TOM | A510 ... and here's what you get with group_concat: SELECT empName, group_concat(projID SEPARATOR ' / ') FROM project_members GROUP BY empName; returns: ANDY | A100 / B391 / X010 TOM | A100 / A510 So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat? I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)
In JVM float value stores in binary system. But how it exactly stored? In example. int value = Math.pow(10,8) + 1; float f = value; int back = (int)f; back value is equal to 10^8. Where is 1
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
I see the following code in HPUX C program: extern int fcntl __((int, int, ...)); _LF_EXTERN int creat __((const char *, mode_t)); These lines are compiled using aCC. Could somebody let me know the meaning of 2 underscores after fcntl and creat in the above code?
I was taking a look through some open-source C++ code and I noticed a lot of double underscores used within in the code, mainly at the start of variable names. return __CYGWIN__; Just wondering: Is there a reason for this, or is it just some people's code styles? I would think that it makes it hard to read.
I have a target string like: "addr: line1 line2 tel:12345678" note: between line2 and tel, there might be 1 or multiple new lines:\r\n or \r\n\r\n or more. The result I want to get is as below: "addr: line1 line2" no \r\n under line2. My questions are: 1)If I use /addr[\s\S]+(?=(\r\n)+tel)/ , i will get the addr without tel, but I can't get rid of "\r\n"s under "line2", how could I do that? 2)I know [\s\S] represents any characters including \r,\n, and (.|\n|\r) can do that too. But why [.\n] can't? It's just like the syntax of[\s\S] isn't it? Thank you very much!
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 does reanimated Itachi bleed while using Ametarasu (Naruto, killerbee vs reanimated Nagato, Itachi fight), while no other reanimated shinobi bleed when attacked? For example, Minato didn't bleed when his arm got chopped off, and third Raikage didn't bleed when he got struck by Naruto.
In the Fourth Great Ninja War, when Obito makes the Ten-Tails transform the into God Tree that devoured the chakra of all the shinobi it touched (or its branches), where you will see Sarutobi Hiruzen cutting/destroying the branches of the Ten-Tails' tree form, and he does that with the help of Enma's transformation - Adamantine Staff. When Sandaime Hokage is summoned using the "Impure World Reincarnation", you aren't supposed to have any blood in you to summon Enma. So, now if you check the naruto wiki, to summon a contract animal, first of all we would need to have a blood contract with the summoning animal, Afterwards they only need to offer an additional donation of blood on the hand they signed the contract with, mould their chakra with hand seals and then plant the hand they signed the contract with at the location they wish to summon the creature. So, was it a flaw to show Sandaime Hokage with Adamantine Staff or is there any other technique this is used to summon a contract animal. Or was this explained in Manga..
There was this movie I saw around ten years ago where some children play a board game and then experience whatever happens on the board. There was this one scene I remember in which one child gets trapped inside an elevator. The movie happens when the parents go out somewhere and the children start playing this board game. The board game ends just before the parents arrive back home. The children in the movie were kids of around ages 8 or 9.
I can't remember the title. It's a board game where two brothers played it. When they played the board, it sent them to space? It's a board where I think it has different levels,each levels has a card, and each levels has different obstacles in space? One level in there, they even put their house being pulled by the sun? And there is also a part there where there is an astronaut.
Can i copy the Question from stack overflow and answer it in my blog and place the blog link in stack overflow? By doing this, Am I violating any of the terms & conditions? Please let me know? Thanks
I just found http://programmingfaq.w3ec.com/faq/4761/whats-the-hi-lo-algorithm which has an exact copy of this Stack Overflow question, , with all its answers and no difference in a single character. There is no reference to Stack Overflow. Is this legal, or at least tolerated? Is this impertinent theft of information? I just can't see any sense in copying whole pages, particularly when not referencing the source.