body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
My ZMAX Z970 can't be rooted, at least by me. I can't find where to do that. I accidentally deleted some videos which were on my sd card. I have not used the card too much since then and don't plan to until I get this resolved. I can't find any undelete utility or method that a) is not a scam b) doens't need root access and c) actually works. How can I do it? Meta: If you think this is a duplicate question, please make sure the duplicate actually has a viable answer to my question. Thanks! The question pointed to as duplicate does not explain how to use the software on an Android phone or make it see the disk from the PC. I tried the software mentioned in that article and it does not see my phone, only local PC disks. Please enable a fresh answer that breaks it down step by step for SD card on no root android phone. Thanks. | Background: I put in a friend's SD Card to format it because it was having problems. Then I put mine back in and I think my phone formatted my SD Card. I had a ton of pictures on there that are now gone! I put the card into the computer and there's only 2mb of cache files on there and none of the original directories. I already tried the following freeware recovery applications: Neither of them were able to retrieve any files. Undelete took 1minute to scan for files and came up with 0 files. Recuva took 10 minutes for their "deep scan" which doesn't seem thorough enough at all for this 8GB SD Card. I need something that's a lot more heavy duty. I don't mind paying for an application to get the data back if necessary... Questions: Which application can I use to recover my deleted picture files from my 8GB HD Micro SD Card? Why did Anroid format my SD card? How can I tell if it's a phone problem, data problem, or SD Card problem? |
How to describe an element of the Ring $\Bbb Z[x]/(x^2-3,2x+4)$? Or is it isomorphic to any well known ring? What is meant by quotienting $\Bbb Z[x]$ by a kernel like that? | I need to describe a ring $R=\mathbb{Z}[X]/(X^2-3,2X+4)$ I know that its element would be of the form $\{f(x)+(X^2-3,2X+4)|f(x)\in \mathbb{Z}[X]\}$ After that will i divide $f(x)$ by $X^2-3$ first and then by $2X+4$ to reduce the elements in $R$? |
For those don't know, Khanacademy is an education site that also has lessons on simple computer programming and allows you to publish your own games that are made on the website. | Most games build on other games' successes and many are downright clones. Where is the limit of imitation before legal issues come into play? Is it down to literary or graphic work like characters and storyline that cause legal problems, or can someone actually claim to own gameplay mechanics? There are so many similar clone games out there that the rules are probably very slack or nonexistent, but I'd like to hear the views of more experienced developers / designers. |
The default function in raster::rasterize is to see if a point is within a polygon and if yes, make a cell. This results in that some of the outer parts of the polygon is not covered by the new raster. Is it possible to use rasterize (or fasterize or whatever) in a way, so that the entire polygon is covered? | I want to mask out a raster based on the values of a polygon: i.e., set to NA all values of the raster that are not covered by the polygons. However, it seems that raster::mask() masks out cells (i.e. set them to NA) even if they are partially covered? This is similar to the question: , but unlike crop(), mask() does not have the snap="out" option. Check: here the right point of the triangle touches a cell, yet that cells is masked out. library(raster) library(sp) r <- raster(xmn=1, xmx=5, ymn=1, ymx=5, nrows=4, ncols=4) r[] <- 1:length(r) Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(4.1,4,2),c(2,3,2))) SpP = SpatialPolygons(list(Polygons(list(Sr1), "s1"), Polygons(list(Sr2), "s2")), 1:2) plot(mask(r, SpP)) plot(SpP, add=TRUE) |
Let $p(z) = z^n+ a_{n-1} z^{n-1}+...+a_0,$ where $a_i \in \mathbb{C} $. If $|p(z)| \leq 1$ for all $z$ with $|z| \leq 1$, then show that $p(z)=z^n, \forall z\in \mathbb{C}$. Now by maximum modulus principle , we can deduce that $|p(z)| \lt1 \ for \ |z| \lt 1 $. Then in particular if we take $a_0=0$ then also $p(0)=0$. So by Schwarz's Lemmas we have $|p(z)|\lt |z|$. I can only deduce this far, and still confused about the usability of my deductions. How can I proceed further. | Let $p(z)=z^n+a_{n-1}z^{n-1}+a_{n-2}z^{n-2}+...+a_0$ be a complex polynomial satisfying $|p(z)| \leq 1$ for $|z|\leq 1$, then prove that $p(z)=z^n$ I tried with Cauchy integral formula for $n$th derivative to get $$n!=\frac{n!}{2\pi}\int_0^{2\pi}p(e^{i\theta})e^{-in\theta}d\theta$$ implies $$1\leq \frac{1}{2\pi}\int_0^{2\pi}|p(e^{i\theta})e^{-in\theta}|d\theta$$ and thereby $|p(e^{i\theta})e^{-in\theta}|=1$. (since $|p(e^{i\theta})e^{-in\theta}|$ is a non negative real continuous function $\leq 1$) ie., $|p(z)|=|z^n|$ for $z=e^{i\theta}$, i stucked here and how can we procced? |
I am trying to understand what neural nets have in common with multiple linear regressions. Is is correct that every node in every layer (not counting the input layer) is just a multiple regression with the variables being the nodes in the preceding layer? I've included a to show what I mean. How is this understanding wrong/right? | I want to know the difference between linear regression in a regular machine learning analysis and linear regression in "deep learning" setting. What algorithms are used for linear regression in deep learning setting. |
I've had Fallout shelter on my android phone from release on the 13th of Aug and all worked well. That was until I went to a mates wedding in Greece and changed the time on my phone to +3 and then back when I returned. All the timers on the rooms, rush options and training times went screwy. I have managed to reset the timers, the majority of which were fixed by rushing in each room or sending dwellers to train elsewhere or like the countdown for the radio room which went up to around 5 or 6 hours, they simply timed out and reset... But I have been left with a one remaining issue. Now whenever I send a dweller out to explore nothing happens. They just head out into the wilderness and report nothing. I've sent every dweller in my vault out to explore for hours and hours and still they all report nothing. Any ideas how I might resolve this issues? Clearing the Cache didn't help. | I tried out the clock setting cheat on a throw-away vault but somehow it also messed up my real one so now they both have 3000+ hours on radio station and 70d+ on returning wastelanders.. Any way to reset all the timers to default? For some reason my phone refuses to change time at all anymore.. |
A dispenser can simulate dice of up to nine sides by random choice, and there are redstone circuits for simulating six-sided dice. But how do you simulate, say, ten-sided, twelve-sided or twenty-sided dice in Minecraft? | I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the "correct" output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need. The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here |
I have the exact same question as this one . Only difference is I have 3 columns only and I am trying to move the 1st column to the end. The original file looks like this: col1,col2,col3 2,2015-01-04,23 196,2015-01-20,36 I didn't make the mistake that other questioner did (i.e. not put comma after F or after OFS=). So, my code is awk -F, '{print $2,$3,$1}' OFS=, old.csv > new.csv But I am getting the 3rd column (which used to be the first) in a new line: col1,col2,col3 2015-01-04,23 ,2 2015-01-20,36 ,196 Why is awk sending the 3rd column data to a new line? I am using awk on Linux Bash Shell (Ubuntu) on Windows, downloaded from . | I've created a bash script but when I try to execute it, I get #!/bin/bash no such file or directory I need to run the command: bash script.sh for it to work. How can I fix this? |
I was having issues getting SSH to work under my WSL Ubuntu 18.04.3 LTS, I was getting connection refused all the time, so I found , which is to just: sudo apt-get remove openssh-client openssh-server sudo apt-get install openssh-client openssh-server remove works, but install gives me: sudo apt-get install openssh-client openssh-server Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: openssh-sftp-server ssh-import-id Suggested packages: keychain libpam-ssh monkeysphere ssh-askpass molly-guard rssh E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success I tried, as suggested : sudo dpkg --force depends -P lxd sudo dpkg --force depends -P lxd-client But it didn't work. How can I fix this and what is going on? | I am having problems with apt on my WSL installation of Ubuntu 18.04. Whenever I try to install a package with apt I get this: Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: [...] E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success E: Could not read response to hello message from hook [ ! -f /usr/bin/snap ] || /usr/bin/snap advise-snap --from-apt 2>/dev/null || true: Success I believe snapd/snappy is the culprit here, but I have not been able to find a way to solve this. Afaik snapd is not supported on WSL and I assume it's been installed in an update. I am hoping to find a solution that won't require me to nuke the whole installation and having to spend hours setting everything up fresh. Thanks in advance. EDIT: original output from apt --version was apt 1.6.8 (amd64). An upgrade to 1.7.0 (amd64) did not seem to fix the issue. |
How do I make the Video Sequence Editor (VSE) playback in real time? I have some 4K video clips that I want to edit, however, I'm unable to do so because when I hit play I get about 2 FPS playback (even without any effects/Modifiers applied) instead of the video clips/timelines 25 FPS. I have a pretty powerful computer, and these clips have no problem playing back in, for example, Premiere. I know Blender's VSE isn't the best or most powerful, but there's gotta be a way to playback the video and audio clips you edit in real time? | How to import footage in VSE for optimal playback and organization, using proxies and workarounds? |
I have asked 9 well-received questions over 8 days, yet my count is still 6/30 on the Inquisitive badge: I've had this problem before: The answer, it turns out, was some kind of caching issue. Is that still the case? | A couple of months ago, I suggested a set of badges for . The responses were... mixed. The can be summarized: In practice, all this would do is encourage people to ask yet more stupid, worthless questions and we have quite enough of that as it is. We believe that one of the main things holding back many of our beta sites is that when people have questions they aren't in the habit of asking on the site. Even our flagship site, Stack Overflow, doesn't get many questions from its most knowledgeable users. Perhaps they don't have questions, but far more likely they find answers without needing to ask. Our subtle bias against asking (questions => clueless) means we lose out on what might be our best source of excellent questions. So we went back to the drawing board and designed a badge set that should not encourage worthless questions: Asked a well-received question on X separate days, and maintained a positive question record. In order to award badges, we need to define our terms: positive question record (total questions - negative questions - closed - deleted)/total questions >= 0.5 It triple counts a question that is downvoted, closed, and deleted. If you ask one that hits that trifecta, you'll need to ask three better questions to dig yourself out. My own record of asking does not meet the criteria: (44 - 0 - 12 - 12)/44 = 0.4545... My looks a lot better; I had a bunch of questions from the beta period that have been subsequently (and rightfully) deleted. With care, I could bring my record into positive territory with 4 questions. The takeaway is that people can't sweep past indiscretions under the rug by deleting them. And they can recover from a bad start as long as they don't ask more bad questions. well-received question on X separate days A well-received question is one that's open, not deleted, and has a score > 0. If you ask at least one well-received question in a and none of your questions that day are deleted, downvoted, or closed, you get one more day of credit toward the badge. Whenever the badge criteria is checked, previous asking days are re-evaluated so that there's an incentive to fix downvoted and/or closed questions. The no-deleted-questions criteria is to prevent people from asking several questions at once and deleting any that aren't upvoted or answered to ask another day. (Though this is a losing strategy in the long run.) My proposed badge names and levels: Asked a well-received question on 5 separate days, and maintained a positive question record. Asked a well-received question on 30 separate days, and maintained a positive question record. Asked a well-received question on 100 separate days, and maintained a positive question record. In addition, since some outstanding individuals ask on more than 100 days, the gold badge may be awarded multiple times. Over on English, Oishi-sama (now a ) would have a remarkable . Bronze and silver badges are only awarded once. We've decided to hold off on multiple awards for now. See the . Neither the names nor the levels nor even the descriptions are set in stone. Please play around with to get an idea of how the badge works using our public data. Since the query does not account for deleted questions, it's a bit more generous than the actual badges would be. This version of the badge set should encourage a habit of well-received questions over time and encourage people to fix poorly received questions. I'd like to express my gratitude to the Parenting community for participating in our . |
I have marked few questions as favorite by highlighting star mark. But I do not see any link to see favorite questions. Is there any way to see it ? | What does bookmarking a question mean? How do you bookmark a question? Do users get updates on their bookmarked questions? Are my bookmarks publicly visible? How do you see your own bookmarks? How do you see other users' bookmarks? How do you see which users have bookmarked a particular question? What impact does the bookmark system have on the voting system? Can I "un-bookmark" a question? Can I search within my bookmarks? |
I understand that uni-variate polynomial rings with coefficients in a field only have principal ideals. For example, $\mathbb{C}[x]$. But how can I tell if an ideal of integer polynomial ring is principal, please? For example, a textbook claims that "the kernel of the map $\mathbb{Z[x]} \rightarrow \mathbb{Z[i]}$ sending $x \mapsto i$ is the principal ideal of $\mathbb{Z}[x]$ generated by $f=x^2+1$" without any justification. How to show this is true, please? | I understand that uni-variate polynomial rings with coefficients in a field only have principal ideals. For example, $\mathbb{C}[x]$. But how can I tell if an ideal of integer polynomial ring is principal, please? For example, a textbook claims that "the kernel of the map $\mathbb{Z[x]} \rightarrow \mathbb{Z[i]}$ sending $x \mapsto i$ is the principal ideal of $\mathbb{Z}[x]$ generated by $f=x^2+1$" without any justification. How to show this is true, please? |
For example,$ f (2) = 2$, and $f(3) = 6$. I don't know what kind of technique I should use. By putting $n = 1, 2, 3, \cdots$ it's even hard to know if $f(2) = 2$ for ALL integer $n$. | Prove that $2730$ divides $n^{13} - n$ for all integers $n$. What I attempted is breaking $2730$ into $2, 3, 5$, and $7, 13$. Thus if I prove each prime factor divides by $n^{13} - n$ for all integers $n$, it will prove the original problem. I already proved $2, 3$, and $5$ work. Struggling with how to do $91$? Other solutions are welcome, but they should be associated with mod and solutions of this kind, because my answer should pertain to what was learned in class. (Edit: Fixed the 91 problem, being slow today...In any case, I've got this problem now, so no answers are necessary. Posting my own soon.) |
For a few days now, I can get no sound out of my Dell laptop on Ubuntu 18.04.4. The 'Sounds' settings only shop the option 'Dummy output'. I have checked with headsets, it is the same. I have a Windows on my laptop in dual-boot, and the sound is just fine there, so I believe it is not the fault of the hardware. In the last few days I've been Googling all possible ways to fix this issue, and I've found the followings: Disabling the sound in BIOS the re-enabling it does nothing Force-reloading alsa in various ways (e.g. pulseaudio --kill; sleep 2s; sudo alsa force-reload ; pulseaudio --start) does nothing Reinstalling all soundbases e.g. with sudo apt-get --purge remove linux-sound-base alsa-base alsa-utils && sudo apt-get install linux-sound-base alsa-base alsa-utils also with sudo apt install --reinstall pulseaudio pulseaudio-module-x11 does nothing For the troubleshooting : The command lsmod | grep snd_hda_intel shows that I indeed have the intel module: snd_intel_nhlt 20480 2 snd_hda_intel,snd_soc_skl snd_hda_codec 131072 5 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek,snd_soc_hdac_hda,snd_soc_skl_hda_dsp snd_hda_core 90112 11 snd_hda_codec_generic,snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_hda_codec_realtek,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_hdac_hda,snd_soc_skl,snd_sof_intel_hda,snd_soc_skl_hda_dsp snd_pcm 102400 10 snd_hda_intel,snd_hda_ext_core,snd_hda_codec,snd_sof,snd_sof_intel_hda_common,snd_soc_hdac_hdmi,snd_soc_core,snd_soc_skl,snd_hda_core,snd_pcm_dmaengine snd 86016 12 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_compress,snd_soc_core,snd_pcm,snd_rawmidi```` lspci -nnk shows nothing related to audio aplay -l and pacmd list-cards both fail to find any sound card The sudo lshw -c sound command finds the card alright: multimedia description: Multimedia audio controller product: Cannon Lake PCH cAVS vendor: Intel Corporation physical id: 1f.3 bus info: pci@0000:00:1f.3 version: 10 width: 64 bits clock: 33MHz capabilities: pm msi bus_master cap_list configuration: driver=snd_soc_skl latency=32 resources: irq:17 memory:ed318000-ed31bfff memory:ed100000-ed1fffff Now I also tried to open alsamixer with sudo alsamixer, however I get the result cannot open mixer: No such file or directory. I do not know if this is a normal error message or is it because I've been messing up a few things during trying everything in the last few days. Maybe somebody can help me out how to get my Ubuntu to find my sound card again? | I've been using Ubuntu 18.04 on my Thinkpad X1 Carbon 7th gen for some time now with the audio working just fine, but after running some updates yesterday it seems like the audio card has stopped working when I rebooted this morning, could this be related to each other? dmsg output: [ 32.624585] skl_hda_dsp_generic skl_hda_dsp_generic: Unsupported HDAudio/iDisp configuration found [ 32.624590] skl_hda_dsp_generic: probe of skl_hda_dsp_generic failed with error -22 output from /var/log/apt/history.log: Start-Date: 2020-03-17 09:30:06 Commandline: aptdaemon role='role-commit-packages' sender=':1.214' Install: linux-image-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1, automatic), linux-headers-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1, automatic), linux-modules-extra-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1, automatic), linux-headers-5.3.0-42:amd64 (5.3.0-42.34~18.04.1, automatic), linux-modules-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1, automatic) Upgrade: gir1.2-nm-1.0:amd64 (1.10.6-2ubuntu1.2, 1.10.6-2ubuntu1.4), linux-libc-dev:amd64 (4.15.0-88.88, 4.15.0-91.92), linux-headers-generic-hwe-18.04:amd64 (5.3.0.40.97, 5.3.0.42.99), libnm0:amd64 (1.10.6-2ubuntu1.2, 1.10.6-2ubuntu1.4), network-manager:amd64 (1.10.6-2ubuntu1.2, 1.10.6-2ubuntu1.4), linux-image-generic-hwe-18.04:amd64 (5.3.0.40.97, 5.3.0.42.99), linux-signed-generic-hwe-18.04:amd64 (5.3.0.40.97, 5.3.0.42.99), linux-generic-hwe-18.04:amd64 (5.3.0.40.97, 5.3.0.42.99), network-manager-config-connectivity-ubuntu:amd64 (1.10.6-2ubuntu1.2, 1.10.6-2ubuntu1.4), code:amd64 (1.42.1-1581432938, 1.43.0-1583783132), linux-firmware:amd64 (1.173.15, 1.173.16), docker-ce:amd64 (5:19.03.7~3-0~ubuntu-bionic, 5:19.03.8~3-0~ubuntu-bionic), docker-ce-cli:amd64 (5:19.03.7~3-0~ubuntu-bionic, 5:19.03.8~3-0~ubuntu-bionic) End-Date: 2020-03-17 09:31:51 Start-Date: 2020-03-18 06:58:27 Commandline: /usr/bin/unattended-upgrade Remove: linux-headers-5.3.0-28:amd64 (5.3.0-28.30~18.04.1), linux-headers-5.3.0-28-generic:amd64 (5.3.0-28.30~18.04.1) End-Date: 2020-03-18 06:58:27 Start-Date: 2020-03-18 06:58:30 Commandline: /usr/bin/unattended-upgrade Remove: linux-modules-extra-5.3.0-28-generic:amd64 (5.3.0-28.30~18.04.1) End-Date: 2020-03-18 06:58:31 Start-Date: 2020-03-18 06:58:36 Commandline: /usr/bin/unattended-upgrade Remove: linux-modules-5.3.0-28-generic:amd64 (5.3.0-28.30~18.04.1), linux-image-5.3.0-28-generic:amd64 (5.3.0-28.30~18.04.1) End-Date: 2020-03-18 06:58:40 Start-Date: 2020-03-18 06:58:48 Commandline: /usr/bin/unattended-upgrade Upgrade: libcephfs2:amd64 (12.2.12-0ubuntu0.18.04.4, 12.2.12-0ubuntu0.18.04.5) End-Date: 2020-03-18 06:58:49 Start-Date: 2020-03-18 06:58:53 Commandline: /usr/bin/unattended-upgrade Upgrade: libicu60:amd64 (60.2-3ubuntu3, 60.2-3ubuntu3.1) End-Date: 2020-03-18 06:58:55 Start-Date: 2020-03-18 06:59:01 Commandline: /usr/bin/unattended-upgrade Upgrade: librados2:amd64 (12.2.12-0ubuntu0.18.04.4, 12.2.12-0ubuntu0.18.04.5) End-Date: 2020-03-18 06:59:02 Start-Date: 2020-03-18 06:59:08 Commandline: /usr/bin/unattended-upgrade Upgrade: python3-apport:amd64 (2.20.9-0ubuntu7.11, 2.20.9-0ubuntu7.12) End-Date: 2020-03-18 06:59:09 Start-Date: 2020-03-18 06:59:14 Commandline: /usr/bin/unattended-upgrade Upgrade: python3-problem-report:amd64 (2.20.9-0ubuntu7.11, 2.20.9-0ubuntu7.12) End-Date: 2020-03-18 06:59:15 Start-Date: 2020-03-18 06:59:18 Commandline: /usr/bin/unattended-upgrade Upgrade: apport:amd64 (2.20.9-0ubuntu7.11, 2.20.9-0ubuntu7.12) End-Date: 2020-03-18 06:59:21 Start-Date: 2020-03-18 06:59:24 Commandline: /usr/bin/unattended-upgrade Upgrade: apport-gtk:amd64 (2.20.9-0ubuntu7.11, 2.20.9-0ubuntu7.12) End-Date: 2020-03-18 06:59:25 |
I need to write a code for a bad chemistry example, so when i try to separate the string of a compound into elements with the numbers next to them, using an array, it returns this error. Note that the "jelibroj" and "element" are methods that I didnt include in the post, but they all work. Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.util.Arrays.copyOf(Unknown Source) at java.util.ArrayList.grow(Unknown Source) at java.util.ArrayList.ensureExplicitCapacity(Unknown Source) at java.util.ArrayList.ensureCapacityInternal(Unknown Source) at java.util.ArrayList.add(Unknown Source) And here is the code. public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc=new Scanner(System.in); String s= sc.nextLine(); s=s.replace("+", " "); String [] jedinjenja = new String [(s.split(" ").length)]; jedinjenja = s.split(" "); ArrayList<String> elementi = new ArrayList<String>(); int poc=0; for (int i=0; i<jedinjenja.length; i++){ for (int j=0;j<jedinjenja[i].length();j++){ if(j>1){ if(jelibroj(jedinjenja[i].charAt(j))==true && element(jedinjenja[i].charAt(j-3))==true){ elementi.add(jedinjenja[i].substring(poc, j-2)); elementi.add(jedinjenja[i].substring(poc+1, j)); j=poc; } else if(jelibroj(jedinjenja[i].charAt(j))==true && element(jedinjenja[i].charAt(j-3))==false){ elementi.add(jedinjenja[i].substring(poc, j)); j=poc; } } if(jelibroj(jedinjenja[i].charAt(j))==true){ elementi.add(jedinjenja[i].substring(poc, j)); j=poc; } } } String[] stockArr = new String[elementi.size()]; stockArr = elementi.toArray(stockArr); for(int i=0;i<stockArr.length;i++){ System.out.println(stockArr[i]); } } | I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found and others saying on Windows machine the JVM defaults max heap size as 64MB. Given this situation, how should I deal with this constraint? I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue. I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too. If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great. |
For years I have been trying to find a anime scifi movie that I saw as a child. First and foremost, it is a movie. It is somewhat dark, maybe even towards horror but somewhat also adventurous. The main protagonist is a woman. A specific detail I recall that might help you identify this is that in a particular scene, this woman is isolated in a spaceship and there are odd things there, because first you see her I believe floating but asleep, and a scene later she has this weird headcrab (similar to ) on her face, but it looks more like a scrambled egg monster, really weird stuff. That is all that I can sort of recall. I have seen this in Europe around 1992-1995 ish, but back then in Europe we usually had movies and anime etc that were considerably older (late 70s, 80s), that is why I suggested even late 70s, 80s to early 90s. It was definitely dark, weird, had odd monsters like this headcrab thing that was suddenly on the girl’s head inside the space ship where she appeard to be completely alone. | What is the name of an anime from 80s-90s movie/series in which there is a scene, maybe the end, where a girl (who has an armor) exchanges age with a dying man in a beach, so the man transforms into a baby and the girl grows to a woman? |
I find myself constantly writing this statement MyObject myObject = something.getThatObject(); if( myObject !=null && myObject .someBooleanFunction()){ } in order to prevent a null pointer exception. Is there a shortcut to this in Java? I'm thinking like myObject..someBooleanFunction()? | I use object != null a lot to avoid . What is an alternative to: if (someobject != null) { someobject.doCalc(); } |
The title says it all. Since a few months, on every Windows 7 workstation I reinstall, the first check for updates takes several hours, during which there is no disk nor network activity but an svchost process is maxing out an entire CPU core and takes up about a GB of RAM. Eventually once I let it run for several hours it finds the updates and starts installing them, so it's not an actual problem but still a big annoyance when I need to reinstall a machine for which I don't have an image ready. Resetting Windows Update by stopping the services and deleting the SoftwareDistribution folder doesn't have any good effect and just makes the slow process restart from the beginning. Installing them manually via WSUSOffline still exhibits the same issue - it hangs for hours on "Listing IDs of installed updates" while svchost starts going crazy with CPU and RAM usage again. There doesn't seem to be anything relevant in the event viewer - in the "Setup" category the last event is from "Servicing" saying that "KBWUClient-SelfUpdate-Aux" was successfully installed; there are no update-related errors of any kind. There is however a CAPI2 error saying "Failed extract of third-party root list from auto update cab at ... authrootstl.cab ... A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file", but I'm not sure whether it affects Windows Update. Needless to say, the system clock is correct. This issue has been going on for months (including the CAPI error) and wastes hours of mine & my clients' time. Does anyone have a solution ? | I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen. I tried running the tools in , but this did not fix the issue either: No matter what I do it just hangs on the "Checking for updates..." screen and goes no further. |
When we want to get the eigenvalues of a square matrix $A$ we calculate $$ det(A - \lambda I) = 0$$ What I don't understand is that what we do here in basic terms. Like, for a simple, square matrix M, if determinant is 0 then the vectors are linearly dependent and the equation system described by M does not have a unique solution (it either has . But what about $A - \lambda I$, how can I describe what happens in $det(A - \lambda I) = 0$ in basic terms? I am trying to understand how the eigenvalues relate to this determinant. I know that eigenvectors S and eigenvalues $\lambda$ are related by $AS=\lambda S$. Please don't overwhelm me with proofs and math-heavy reasoning, I have a very basic understanding of linear algebra. | I understand that the eigenvectors of a linear transformation are the vectors that, when transformed, are simply scaled by a factor of the corresponding eigenvalue. Therefore $$ A\vec{x}=\lambda\vec{x}. $$ We can replace the scaling of the vector $\vec{x}$ by $\lambda$ with its equivalent linear transformation, $\lambda I$. Then we can rearrange this equation as follows: $$ A\vec{x}-(\lambda I)\vec{x}=\begin{bmatrix}0\\0\end{bmatrix}\\ (A-\lambda I)\vec{x}=\begin{bmatrix}0\\0\end{bmatrix}\\ $$ For this to be true either $\vec{x}$ must be a zero vector or the transformation $A-\lambda I$ must have $\vec{x}$ in its null-space. The course I'm following says that we can solve for $\lambda$ by finding when the determinant of $A-\lambda I$ is zero, but why does that guarantee that $\vec{x}$ will become the zero vector when transformed by $A-\lambda I$? I understand that for $\vec{x}$ to be an eigenvector this transformation must have a determinant of zero, but I don't see how the inverse can be true; having a determinant of zero doesn't gaurantee that $\vec{x}$ will be transformed into the zero vector. For example, let $$ (A-\lambda I) = \begin{bmatrix}1&2\\0&0\end{bmatrix}, \vec{x}=\begin{bmatrix}1\\1\end{bmatrix} $$ Then, although $\det\begin{bmatrix}1&2\\0&0\end{bmatrix} = 0$, it does not gaurantee $(A-\lambda I)\vec{x}$ to be the zero vector. $$ \begin{bmatrix}1&2\\0&0\end{bmatrix}\begin{bmatrix}1\\1\end{bmatrix}=\begin{bmatrix}3\\0\end{bmatrix} $$ We can see that the transformation gives us $\begin{bmatrix}3\\0\end{bmatrix}$ and not the zero vector. Why does finding when the determinant of this transformation is equal to zero help us find the eigenvectors? Am I missing something? |
I have implemented working template class LList< T> and now I want object of this template class to be a property of a new class called Factory2. Here is how my Factory2 class looks like #include "LList.h" template<typename T> class Factory2 { public: Factory2(); ~Factory2(); private: LList<T> arr; }; I have defined the constructor and destructor of Factory2 but how should I implement them for the LList< T> arr object? The LList< T> class has it's own constructor and destructor. I get the error:undefined reference to the constructor of LList<int>::LList() and LList<int>::~LList() | Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) |
I am flying from London to India with a layover of 1 hour 30 minutes at Muscat Airport. My flight from London to Muscat, as well as the connecting flight from Muscat to Bangalore, is Oman Air. Is 1:30 hours enough for me to catch my connecting flight from Muscat to Bangalore? Do I need to re-check in my luggage? Am I taking a risk or is this time is enough to catch my connection flight? | I am travelling from Hyderabad (India) to Paris (France) via Muscat and the transit time there is only 2 hours. Is this sufficient to make the connection? |
Let's get to the point. I'm using a LinkedList to store some info about the objects it store. The thing is, I can't set all the attributes of the objects right when I create it, so I need to access them later. In fact, this is the piece of code where I access it. listaNodos.get(esteNodo(nodoActual)).caminoVuelta.getLast().setFin(currentGrid); listaNodos.get(esteNodo(nodoActual)).caminoVuelta.getLast().setPath(caminoVuelta); Just as a clarification: caminoVuelta is also a LinkedList. So, can I modify the atributes of the instances stored in caminoVuelta by simply accessing them with getLast() method from LinkedList and then using the set() methods? Or will this change never happen to the original object? For some reason, (and it only happens for the first node(Nodo) I create) it returns a NullPointerException. I hope it's clear enough. Thanks. | 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? |
Is it correct that a long in C has a size of 4 bytes for a 32-bit platform and 8 bytes for a 64-bit platform? | Not to long ago, someone told me that long are not 64 bits on 64 bit machines and I should always use int. This did not make sense to me. I have seen docs (such as the one on Apple's official site) say that long are indeed 64 bits when compiling for a 64-bit CPU. I looked up what it was on 64-bit Windows and found Windows: long and int remain 32-bit in length, and special new data types are defined for 64-bit integers. (from ) What should I use? Should I define something like uw, sw ((un)signed width) as a long if not on Windows, and otherwise do a check on the target CPU bitsize? |
Yes, yes, yes, I have seen , but it doesn't seem to be the case for me. marking it as dupe because @Animuson . I am getting this message when I click flag on Stack Overflow: However, my last declined flag is from feb 28 - a month has passed already. Since that moment I had 32 helpful flags, 5 aged away, and 3 pending - and no declined. What's the reason behind this notice being shown for me? | I am seeing the warning that "Some of your recent flags have been declined." on Stack Overflow. However, looking at my flag history, this is how it is laid out: 38 Flags overall 7 Active Flags 1 Declined yesterday 1 Declined 2 days ago 1 Declined on Jan 23rd 1 Disputed on Feb 18th 27 Helpful since Jul 19, 2013 Do 2 declined flags within 2 days really trigger this warning? It seems like if I had a larger string of declined flags that this would trigger it, but 2 in a row shouldn't trigger it IMHO. |
Let $x$ is a real number such that $n^x\in\Bbb Z,$ for every positive integer $n.$ Prove that $x$ is an integer. I got that problem and it looks difficult, I tried writing $x$ as $\lfloor x\rfloor+\{x\}$ (where $\lfloor x\rfloor$ and $\{x\}$ are the floor and the fractional part of $x,$ respectively), then $$n^x=n^{\lfloor x\rfloor}n^{\{x\}}.$$ Since $n^{\lfloor x\rfloor}>0,$ then $$n^{x-\lfloor x\rfloor}=n^{\{x\}},$$ so that $n^{\{x\}}$ must be a rational number for every positive integer $n,$ but I don't know how to prove that $\{x\}$ must necessarily be $0$ ($0\leq\{x\}<1$). Any help is really appreciated! | My apologies if this has been asked already, I've searched but couldn't find it... Let $x$ such that for every $y \in N$, $y^x$ is an integer. Does that necessarily mean that $x$ is an integer? |
I see this message across my screen from time to time stating (roughly): You have lost your service field upgrade. I know that field upgrades are given to squads from their commander, but why did I lose it? Did my commander demote our squad? Or do I have to accept the field upgrade as Squad Leader? | When playing in a squad, you can get "Field Upgrades". However, sometimes when I die, it tells me that I have lost the "Field Upgrade Score". Where can I see this score and what are the events that make me lose it? |
All the points in the plane are coloured using 3 colours. Prove that there exists a triangle with vertices having the same color such that either it is isosceles or its angles are in geometric progression | Prove: If we color the plain with three different colours, then there will always be an equilateral triangle which has three vertices of the same colour. I have proved it for two colours but I just can't solve this one. |
Does a $\limsup_{n\to\infty}$ exist for $\overline{\dfrac{n}{\phi (n)}},$ where $\phi$ is the Euler totient function, and the overbar represents the mean. Of course $\dfrac{n}{\phi (n)}$ is unbounded, as it grows like $e^{\gamma } \log (\log (x))+\dfrac{\text{c}}{\log (\log (x))}$ for some $c\approx 3,$ where $c\rightarrow 0$ as $n\rightarrow \infty,$ but I was wondering whether the set of (mostly, priomorial multiples) is dense enough to impose a limit on the function. Numerical tests suggest $\limsup_{n\to\infty}\overline{\dfrac{n}{\phi (n)}}\approx 2,$ but I can't find any references to the subject. Is this realistic, or is the function unbounded? | There is a second part of the problem posted in , from Apostol's book, but I can't figure it out. It asks the reader to prove that if $x \geq 2$ then $\sum\limits_{n\leq x} \frac{n}{\phi(n)} = O(x)$, where the right hand side of the equation uses the Big-O notation. I've tried using the prior result, but I always end up with $O(x^2)$ . Any insights? |
A continuous function $f:S^1\to R$ then $\exists z\in S^1$ such that $f(z)=f(-z)$ My attempt: On contrary suppose $f(z)-f(-z)\neq 0$ so either it is $>0$ or $<0$ WLOG $f(z)-f(-z)>0$ But I could not proceed further . Please give me hint. | Question is to prove : $f : S^1 \to \mathbb R$ is continuous then $f(x)=f(-x)$ for some $x\in S^1$ I guess it would be helpful to use intermediate value theorem Assuming $f(x)\neq f(-x)$ then given any $p\in (f(-x),f(x))$ (assuming $f(-x)<f(x)$) there exists $y\in (-x, x)$ such that $f(y)=p$ I am not very sure of how to use this.. It would be helpful if someone can give some hint which would help me to solve this.. Thank you. |
I would like to show an idea on how to make real numbers infinitely countable. It is quite simple, too simple for me to believe it has been overlooked. So my question is, what have I overlooked? So the "countable" list would start like this {0.1, 0.2, 1.1, 2.1, 1.2, 0.3, 0.4, 1.3, 2.2, 3.1 ...}, the way Cantor diagonally counted the list of rational numbers and potentially covering every real number there is. And for the numbers after the decimal point, you go down a column and count normally after the decimal point but reverse the number. | The proof that the set of real numbers is uncountably infinite is often concluded with a contradiction. In the following argument I use a similar proof by contradiction to show that the set of rational numbers can be shown to be uncontably infinite: Let us assume that the set of rational numbers is countable. This implies that we can write all the rational numbers between 0 and 1 in a list. Let us say, it looks something like this: $ 0.\color{red}0000000001000000...\\ 0.0\color{red}10000001110000...\\ 0.10\color{red}000001000000... \\ ....$ ans so on. Now, create a new number that picks $n^{th}$ digit from $n^{th}$ number and changes it to $0$ if it is $1$ and vice versa. $0.101.... $ This number, say $x$, is between 0 and 1, and so it must appear in the list. Suppose it appears at the $n^{th}$ position in the list. However, based on how we constructed $x$, we know that the $n^{th}$ digit of $x$ is different from the $n^{th}$ digit of the $n^{th}$ number in the list. So, $x$ should be different from the $n^{th}$ number in the list at the $n^{th}$ digit and hence, this is a contradiction. We can conclude that such a list of the rational numbers does not exist and hence, the set of rational numbers is uncontably infinite. I know that there is another mapping between the set of rational numbers and natural numbers that can show that there is one-to-one mapping between the two sets (). However, the above proof in that sense is not really conclusive and that the set of real numbers might also be countably infinite and it is just that we are not yet aware of the mapping. Please provide your comments if the above proof is somehow flawed for rational numbers or if I'm missing something. |
I need help with proving / disproving something: Look at the map $$\Phi: (C([0,1], \mathbb R), ||\cdot||_{\infty}) \to (\mathbb R, |\cdot|); \,\,\,\,\,\,\Phi(u) := \int_0^1 u²(t) dt$$ a) Is it continuous? b) Is uniformly continuus? c) Can one find a non-empty subset of $C([0,1],\mathbb R)$ in which $\Phi$ is Lipschitz-continuous? Can you help me with this? | $\phi: (C([0,1];\Bbb R ),||\cdot||_\infty )\to (\Bbb R, |\cdot | ); \: \: \: \: \: \: \phi(u):=\int_0^1 u^2(t) dt $ Is this function continuous or even uniformly continuous? (I know that the function $g: M\to \Bbb R , g(x) := x^2$ is continuous but not uniformly) Also, is there a non-empty subset of $ C([0,1];\Bbb R )$ so that $\phi$ is Lipschitz-continuous on that set? Thanks in advance! |
How can I prove that there is no continuous function $f:\mathbb{R}\to \mathbb{R}$ satisfying $f(\mathbb{Q}) \subset \mathbb{R}\backslash \mathbb{Q}$ and $f(\mathbb{R}\backslash \mathbb{Q} ) \subset \mathbb{Q}$? | Is there a way to prove the following result using connectedness? Result: Let $J=\mathbb{R} \setminus \mathbb{Q}$ denote the set of irrational numbers. There is no continuous map $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $f(\mathbb{Q}) \subseteq J$ and $f(J) \subseteq \mathbb{Q}$. |
I want to put a ship over a city but make it look really big and have that white hazy look to it, like the death star has here. See how it's transparent-ish and kind of smokey white? How do I do this in blender(cycles)? | I've been trying to tackle this challenge for a week or two now and I'm still somewhat stumped. I am trying to create the effect of a moon or large planet seen in orbit from the surface during daylight, when the darker values fade behind the blue sky and the brightest values shine through. I'm trying to make this effect with RenderLayers compositing nodes, which I still don't really understand compared to shader nodes. I know the solution should involve mix nodes and color ramps, but I haven't been able to get anything close yet. I've tried mixing the environment socket of the layers node with the image socket in various ways but I'm still stuck. Can someone point me on the right path? |
I am currently using a laptop and would like to keep my laptop running Windows 7. I want Ubuntu on my new desktop I just built because (at the moment) I don't have ~150 dollars to dish out for an OS. I don't have a disk drive, so I will be using USB. I know it involves burning a .ISO file to a USB , but I'm not sure how. Thanks! | I would like to see a full how-to guide on how to install Ubuntu. |
I'm trying to get a model I've made into Adobe dimension. I've exported all different options, the closest to blender is exported as an obj. However, there's one part that is causing me grief. I've used a boolean in Blender and applied it to the model (so it's destructive) but it's filling in the hole in Dimension. When I look at it closer in blender, the model has two pieces which I've tried to join with no success. I'm sure this must be a easy fix for someone who knows what they are doing (unlike me). Thanks in advance. | So, I'm working on a control station that has buttons. It is a one-mesh creation, that means, I don't want to create buttons and things like that separated from the main mesh, but as you can see, I have problems. I would like to make the highlighted parts to be one with the main part around them. I've tried everything, and I have this problem on multiple creations. Any idea? Update: I've added another example of the problem. I want them to be one face, instead of two. (2nd picture) |
Evaluate the convergence of the following infinite sum. I am so bad when it comes to parameters. I don't know where to start. $\sum_{n=1}^{\infty}\dfrac{(n+1)^a-n^a}{n^b}$, where $a,b\in\mathbb{R}$. | I was wondering how the convergence of the series $$\sum_{k\geq1}\frac{(k+1)^y-k^y}{k^x},$$ depends on $x$ and $y$, where $x$ and $y$ are real numbers. I've been able to show that it converges if and only if $y\leq x$, by distinguishing nine cases; whether $x$ and $x-y$ are positive, negative or zero. If desired I can include a sketch of my proof. My question is whether there is a proof that works for all real $x$ and $y$? Or at least a proof that seems less artificial? |
I would like to prove the following statement $$x^n-a^n=(x-a)\sum^{n-1}_{k=0}x^ka^{n-k-1},\qquad\forall n\in\Bbb N_0$$ I can easily prove it by induction using polynomial long division or series expansion however I am unsure whether or not these are "rigorous enough". I have thought about this for a while but is there a way to prove this statement in a more rigorous way? I think that the use of ellipses and "do this for the remaining $n$" gives me this uncertainty. Therefore I pose my question as follows: Is there a rigorous way to prove this statement, or is the use of ellipses rigorous enough? Thank you. | This question is from [Number Theory George E. Andrews 1-1 #3]. Prove that $$x^n-y^n=(x-y)(x^{n-1}+x^{n-2}y+\ldots+xy^{n-2}+y^{n-1}).$$ This problem is driving me crazy. $$x^n-y^n = (x-y)(x^{n-1}+x^{n-2}y+\dots +xy^{n-2}+y^{n-1)}$$ $(x^n-y^n)/(x-y) =$ the sum for the first $n$ numbers and then I added $(xy^{(n+1)-2}+y^{(n+1)-1})$ which should equal $(x^{n+1}-y^{n+1})/(x-y)$ but I can't figure it out This is a similar problem in the book and I tried this method but it wasn't working out $\quad$Thereom $\bf1$-$\bf2$: $\,\,\,\,$ If $\,x$ is any real number other than $1$, then $$\sum_{j=0}^{n-1}x^j=1+x+x^2+\ldots+x^{n-1}=\dfrac{x^n-1}{x-1}.$$ $\quad$Remark: $\displaystyle\sum_{j=0}^{n-1}A_j$ is shorthand for $A_0+A_1+A_2+\ldots+A_{n-1}.$ $\quad$Proof: Again we proceed by mathematical induction. If $n=1$ then $\displaystyle\sum_{j=0}^{1-1}x^j=x^0=1$ and $(x-1)/(x-1)=1$. Thus the theorem is true for $n=1$. $\quad$ Assuming that $\displaystyle\sum_{j=0}^{k-1}x^j=(x^k-1)/(x-1)$, we find that $$ \eqalign{ \sum^{(k+1)-1}_ {j=0}x^j & = \sum^{k-1}_ {j=0}x^j+x^k=\dfrac{x^k-1}{x-1}+x^k \\ &= \dfrac{x^k-1+x^{k+1}-x^k}{x-1}\\ &= \dfrac{x^{k+1}-1}{x-1}. }$$ Hence condition $(\rm ii)$ is fulfilled, and we have established the theorem. $\quad$Corollary $\bf1$-$\bf1$: $\,\,$ If $\,m$ and $n$ are positive integers and if $m>1$, then $n<m^n.$ |
I have many images captured from my webcam and their name are: 2021-03-29_06-00 2021-03-29_06-02 2021-03-29_06-04 2021-03-29_06-06 2021-03-29_07-00 2021-03-29_08-00 2021-03-29_09-00 etc.. I want to delete images shooted by night. I found script to obtain sunrise (and sunset) times, now I have to filter my files and delete. I start to try with ls command. If I use: ls *_{00..06}*.jpg the result is correct. By if I insert a variable with the time of sunrise, encounter of problems. SUNRISE="06" ls *_{00..$SUNRISE}*.jpg But the result are: ls: cannot access '*_{00..06}.jpg': File or directory does not exist | Below is some sort of pseudo-code for what I'm trying to accomplish: #!/bin/bash # I already have the variable below figured out (positive integer): numlines=$([returns number of lines containing specific characters in a file]) # This is basically what I want to do with it: for i in {1..$numlines}; do # the part below is already figured out as well: do some other stuff done I can execute it fine from the command line by inserting the actual number in the `{1..n}' sequence. I just need to know if it's possible to include a variable here and how to go about doing it. I have tried exporting it I have tried putting the variable itself in curly braces inside the sequence: {1..${numlines}} I have tried putting it in double-quotes hoping it would expand: {1.."$numlines"} I have tried escaping the $: {1..\$numlines} Do I need to use a set -[something] command in order for this variable to get expanded? I have even tried some forms of using eval...all to no avail. I just need to know if there is something simple or obscure that I am missing or if this is even possible before I waste anymore time on it. I could throw together a really, really hackish way of doing it to make it work as needed, but I'd like to avoid that if at all possible and learn the right way to go about doing it. |
Why do fonts look thinner in adobe and different and richer in sumatra pdf. Sumatra Adobe Adobe reader settings: | When I open a PDF in a non-Acrobat PDF viewer, they look fine, but when I open one in Acrobat, the fonts look absolutely terrible. They look very low resolution and I'm not sure how to increase them. I've tried PDFs from internet, exporting from Word, and making LaTeX documents. How can I correct this problem? |
I have a 12 item Likert scale for my predictor variable [IV], and a 9 item Likert scale for my dependent variable [DV]. I used SPSS and did factor analysis on both scales, and found that the IV had 3 components, while the DV had 2. I would like to report the relationship between the IV and the DV using regression analysis. How to accomplish this based of the finds of the factor analysis? Thanks in advance. | I have a question about how to interpret a regression analysis I did following a factor analysis. I did principal axis factoring (direct oblimin) I got a 3 factor solution. The three factors were (1) feelings (2) kinship and (3) interactions. (I'm looking at father-child relationships) Regarding factor loadings, (1) feelings had all positive factor loadings, (2) kinship had all negative factor loadings and (3) interactions had all negative loadings. I did a multiple regression analysis using the factor scores - saved as regression scores - as outcome variables. I'm not bringing them together to form a total scale, so I don't think I need to do a MANOVA instead, or adjust the p-value. For (1) feelings, all of my predictor variables have positive beta weights For (2) kinship, one of my predictors (participation in healthcare) has a negative beta weight For (3) interactions, again, one of my predictors (participation in healthcare) has a negative beta weight I'm confused about whether the predictors with negative beta weights actually imply that less participation in healthcare means a higher score on kinship and on interactions. Or whether, because those two outcome variables have all negative factor loadings, should the negative beta be interpreted as a positive beta? (i.e. do the negatives cancel each other out?). If the latter is the case, do the predictors with a positive beta for outcome variables (2) and (3) actually have negative betas? |
Playing shooting games are/is my forte. Watching movies is/are fun. Reading books is or are good for you. Do we use is or are for these sentences? | Making adult decisions are/is really not fun. What is the proper answer and why? My gut says "is" but I can't explain why. |
So, when I installed jetpack joyride the rainbow jetpack was in the game. I played the game so I could get it. But it suddenly was not in the game. Now I can't get the achievement Hippie. Please help. | When I first started playing Jetpack Joyride I recalled the Rainbow Jetpack, but at some point it seems to have disappeared from the store and now I can't get the Hippy Achievement. Any idea how to get it? I thought perhaps installing an older version might still have it, but I don't have a copy in iTunes to roll back to. Has it ever come up on sale in the store? FYI, the doesn't seem to give any more info either. |
Given $(X,Y)$ normal vector with: $$ E\left(X\right)=0,\,E\left(Y\right)=0,\,Var\left(X\right)=4,\,Var\left(Y\right)=1 $$ and $Cov\left(X,Y\right)=-1$, I was asked to to calculate $f_Z(2)$ where $Z=X+2Y$. In the solution they said that: $$ Z\sim N(E(X+2Y),Var(X+2Y)) $$ It made me think - Is it true to say that the sum of two random variables $X$ and $Y$ that have normal distribution is also normal distribution? I know that if $X$ and $Y$ are independent that is true and even $X+Y\sim N(\mu_X+\mu_Y,\sigma_X^2+\sigma_Y^2)$ but can we says the $X+Y$ is normal if we don't know that they are independent? If not, how did they got $Z\sim N(E(X+2Y),Var(X+2Y))$? If yes, is there a general formula of $X+Y\sim N(\mu_X+\mu_Y,\sigma_X^2+\sigma_Y^2)$ or something similar? | I know how to prove the statement when two r.v. are independent. But how to prove it when the r.v. are correlated? Edit:or counter example? |
I have my portable drive encrypted with Bitlocker. However, every time I connect with computer it doesn't appear a window to type in password to unlock rather than a recovery key. Unfortunately, I lost my recovery key so I can not solve this problem | I have a .vhd image of a BitLocker encrypted drive. When I mount and double click the drive, BitLocker wants me to enter a 48-digit recovery key and doesn't ask for a password. Why is that so and how can I enter a password instead? Note: I don't have either the key or the password of this drive. I'm trying to brute force the password using forensic software. |
I am 18 years old and a freshman in college living at home. I have 0 expenses except $3,000 a year for college and gas for my current car. I am currently looking into purchasing a brand new honda civic type R for around $38,000. I work full time making around $3,000 a month and have $15,000 saved up. I plan to put the $15,000 as down payment, finance for 3 years, and put aside $1000 a month for all the cars expenses (payment, insurance, gas, repairs). What would your opinion on this be and whether its a good idea? | I'm from Arizona and I will be 18 in 4 months. I make about $1,200 a month from my job. I have $600 in my bank account and I don't plan to spend any of it until I'm 18. I'm looking to get a brand new Jeep Wrangler Rubicon that costs about $43,000. The down payment is 10% (about $5,000) with an APR of 4.28%. The duration is 60 months with a monthly payment of $800. I don't have any credit. My friend suggested that I ask my parents to put my name on one of their credit cards so that I can build some credit. I'm not sure how that works. Can someone suggest a good way of going about this so I can get this car on or around my birthday? My mom does finance work for a big company and she told me that I should get a cheaper car. I really want this one and I'm willing to work for it. I'm getting a second job to get more money rolling in. My mom said that the only way that this would work is if I have a down payment of $15-20k. She also said that not everyone qualifies for a car like this one. What can get me to qualify ASAP when I turn 18? |
I'm a Filipino passport holder. If I book a flight via Turkish Airlines. What time zone should we follow? My country, Philippines? Turkey? Or Vietnam? Coz we will be departing from Vietnam. I'm super confuse coz those countries have different time zone. So, I don't know which time zone should I follow during our flight. So, if our departure time in Ho Chi Minh, Vietnam is 21:10 or 9:10pm, we depart in Ho Chi Minh by 9:10pm on their time? And then arrival is 4:15am, Sept 16 in Istanbul. But, in Istanbul they're 4 hours late to Ho Chi Minh's time. So, 4:15am in Ho Chi Minh, In Istanbul it's 12:15am. So, we just still use Vietnam time for our next departure to Sao Paulo from Istanbul? Please check the time and date on the photo. I'm really confuse!! | I was wondering whether the time shown is the time I would be arriving in France so its time zone etc. I know France is an hour ahead so not sure if I'm right in my assumption... It would be useful to know as I plan on traveling to the States and other European countries soon as well. |
As we all know, all academic professors or students who want to submit an article (research or review) to a journal should write their affiliations (their institute name and job there) on the first page of the article. All of the articles I have read till now were from academic authors and I haven't met a single article from an independent researcher yet. | Recently my paper is reviewed (by a professor from independent third party) and accepted by a journal. But, my employer allows me to publish this paper only without its name there. Publishing house is expecting affiliation for each author, i.e. I can not leave affiliation as blank. What should I write as the affiliation? |
We currently have a ESX Environment which has 1x Physical vSphere Server, 1x SAN (Another coming soon) 2x ESXi Hosts. We currently have licensing for vSphere and ESX Essentials. I need to add 2 more ESX Hosts and I know in Essentials / Essentials Plus there is a Max limit of 3 physical hosts. I need to find out which version would be able to allow me to run vSphere server with 4x ESX Hosts. I have tried to find out for Standard Edition but a straight forward answer to this has alluded me and my Google searches. Are any of you able to help on this matter? Thanks, | This is a about Licensing. Questions on licensing are off-topic on Server Fault. If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to. I have a question regarding software licensing. Can the Server Fault community please help with the following: How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y? |
I have set shared preferences in Activity: SharedPreferences sp = getSharedPreferences("your_prefs", Activity.MODE_PRIVATE); SharedPreferences.Editor editor = sp.edit(); editor.putInt("your_int_key", 14); editor.commit(); and in get preferences in Fragment if (getActivity().getSharedPreferences("your_prefs", Activity.MODE_PRIVATE) != null) { SharedPreferences sp = getActivity().getSharedPreferences("your_prefs", Activity.MODE_PRIVATE); myIntValue = sp.getInt("your_int_key", -1); } textTv[i] = (TextView) v.findViewById(nizTekstaID[i]); textTv[i].setVisibility(View.VISIBLE); textTv[i].setText(result.get(i)); textTv[i].setTextSize(myIntValue); but i get NullPointerException, here is Logcat: 05-01 04:46:01.298 10968-10968/com.example.bolt.automagazin E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.bolt.automagazin, PID: 10968 java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.support.v4.app.FragmentActivity.getSharedPreferences(java.lang.String, int)' on a null object reference at com.example.bolt.automagazin.FragmentGdeSeUcitavajuVestiScroll1$asyncTekstovi.onPostExecute(FragmentGdeSeUcitavajuVestiScroll1.java:988) at com.example.bolt.automagazin.FragmentGdeSeUcitavajuVestiScroll1$asyncTekstovi.onPostExecute(FragmentGdeSeUcitavajuVestiScroll1.java:829) at android.os.AsyncTask.finish(AsyncTask.java:651) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) in this line: if (getActivity().getSharedPreferences("your_prefs", Activity.MODE_PRIVATE) != null) { | 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? |
My host sent a notification that says server is infected with a malware, it doesn't seem very popular. The Symantec site about this malware shows windows machines as targets, but not CentOS. Anyone knows what this malware does exactly ? What are the chances that this is a false alarm? Can I install any easy-to-use tool that can safely scan my system from SSH without breaking any system files ? In the last 24 hours, Symantec analysts have identified malware configured to communicate with resources on your network. The malware and your related resources are listed below. MD5 Detection ASN Description b83ff89585d668c3ca96b34b44da4093 Backdoor.Graybird!Gen 16265 www.dymll.com, 82.192.XXX.XXX, 82.192.XXX.0/19, ripencc, NL, FIBERRING LeaseWeb B.V.,NL Please use this information to investigate the potential abuse of your network, and take corrective actions based on your own internal procedures. | This is a about Server Security - Responding to Breach Events (Hacking) See Also: Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism: What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning? Original Version 2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a attack on our provider. The servers access to the Internet has been shut down which means over 5-600 of our clients sites are now down. Now this could be an FTP hack, or some weakness in code somewhere. I'm not sure till I get there. How can I track this down quickly? We're in for a whole lot of litigation if I don't get the server back up ASAP. Any help is appreciated. We are running Open SUSE 11.0. 2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed to resolve this problem, although it may not apply to many others in a different situation. I'll detail what we did. We unplugged the server from the net. It was performing (attempting to perform) a Denial Of Service attack on another server in Indonesia, and the guilty party was also based there. We firstly tried to identify where on the server this was coming from, considering we have over 500 sites on the server, we expected to be moonlighting for some time. However, with SSH access still, we ran a command to find all files edited or created in the time the attacks started. Luckily, the offending file was created over the winter holidays which meant that not many other files were created on the server at that time. We were then able to identify the offending file which was inside the uploaded images folder within a website. After a short cigarette break we concluded that, due to the files location, it must have been uploaded via a file upload facility that was inadequetly secured. After some googling, we found that there was a security vulnerability that allowed files to be uploaded, within the ZenCart admin panel, for a picture for a record company. (The section that it never really even used), posting this form just uploaded any file, it did not check the extension of the file, and didn't even check to see if the user was logged in. This meant that any files could be uploaded, including a PHP file for the attack. We secured the vulnerability with ZenCart on the infected site, and removed the offending files. The job was done, and I was home for 2 a.m. The Moral - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole world is made aware of the vulnerability. - Always do backups, and backup your backups. - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server Fault. |
Sometimes I see that, during a $u$-substitution in an integral (which is something I hardly understand), once $u$ is chosen it is differentiated to obtain $du/dx$. I understand this. After, however, people solve for $dx$ as though it is a regular variable, and treat $du/dx$ as though it is a regular fraction. My googling has told me that $du/dx$ isn't a fraction and that $dx$ or $du$ aren't really regular variables, as one is dependent on the other. So why can they behave like what they are not? For example, if $u$ is $x^2$, then $du/dx$ ends up being $2x$, and so $du = 2x dx$ and $dx = du/2x$. What my question is, why is this allowed? (Also, sorry that I haven't properly formatted the previous equations using latex or whatever it should be, as i don't know about any of that right now.) | In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio. I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe? |
I have read several previous posts. But am unable to see what is wrong with my line 49 in the sources list. My line 49 reads "deb artner" | I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that. I just tried to upload a screen shot but since I'm new it won't allow me to. I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following: COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse) E: The list of sources could not be read., E: The package list of status file could not be parsed or opened. How do I report bugs? What can be done about this. I have searched and everything everyone says to do leads me back to the same line error message. So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software. |
The NullPointerException only comes about when I click the 'next' button. I'm trying to get the frame to transition to another panel using cardlayout, but I have failed to do so. Second question: How do I get my current panel to transition to the next panel (LoginPanel) in another class? I've already created an instance of it public class InsuranceMain extends JFrame { private CardLayout cardPanel; private JPanel buttonPanel; private JButton next; private JLabel label; public InsuranceMain() { buttonPanel = new JPanel(); JPanel card1 = new JPanel(); JPanel cards = new JPanel(cardPanel); LoginPanel loginPanelA = new LoginPanel(this); CardLayout cardLayout = new CardLayout(); cards.setLayout(cardLayout); next = new JButton("Next"); // Button label = new JLabel("Test"); // Main frame settings setTitle("Travel Insurance Application"); setSize(300, 300); setLayout(new FlowLayout()); setVisible(true); setLocationRelativeTo(null); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); buttonPanel.add(next); add(buttonPanel); card1.add(label); cards.add(card1, "card1"); cards.add(loginPanelA, "loginPanelA"); next.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(e.getSource() == next) { cardLayout.show(cards, "loginPanelA"); }} }); } public static void main(String[] args) { InsuranceMain test = new InsuranceMain(); } } Here's my LoginPanel code. I apologize if it's very disorganized public class LoginPanel extends JPanel { private JButton loginB, registerB, clearB; private JTextField nricTextField, passwordTextField; private JLabel nric, password, loginTitle; private JPanel centerPanel, southPanel; private InsuranceMain main; public LoginPanel(InsuranceMain main){ this.main = main; // JLabels loginTitle = new JLabel("Insurance Login", JLabel.CENTER); nric = new JLabel("NRIC: "); password = new JLabel("Password: "); // JTextField nricTextField = new JTextField(""); passwordTextField = new JTextField(""); // JButton loginB = new JButton("Login"); loginB.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if(e.getSource() == loginB) { //cardLayout.show(cards, "card1"); }} }); registerB = new JButton("Register"); clearB = new JButton("Clear"); // North Panel setLayout(new BorderLayout()); // main panel's layout add(loginTitle, BorderLayout.NORTH); // Center Panel centerPanel = new JPanel(); centerPanel.setLayout(new GridLayout(2,2)); centerPanel.add(nric); centerPanel.add(nricTextField); centerPanel.add(password); centerPanel.add(passwordTextField); add(centerPanel, BorderLayout.CENTER); // South Panel southPanel = new JPanel(); southPanel.setLayout(new FlowLayout()); southPanel.add(loginB); southPanel.add(registerB); southPanel.add(clearB); add(southPanel, BorderLayout.SOUTH); } } | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I have a ton of the items stuck in my inventory. It was a long evening, and I have lost the chance to go back to a save point before I picked up the quest. These stupid rocks are taking up 12 "pounds" in my inventory and I have no interest in completing it. Is there any way for me to drop this quest or lose the super-heavy quest items? A game mod? A dirty-letter campaign to the game designer? Voodoo witchcraft? Anything? | Someone said that quest items don't count against your carrying capacity in Skyrim, even if they have a weight listed. Is this false? |
In the mid-late 90s I caught a show on the now long gone British TV channel "Super Channel". It was a show that took place in our solar system (I specifically remember a base in orbit around Jupiter) that seemed to be about two factions fighting for control. The quality of the animation was "Transformers +". I also remember the lasers on the ships' wings being orange and attached to discs, making them movable. That color made me think at the time that they were part of a toy line, but I never saw any in the shops. | I am looking for the name of a sci-fi cartoon. Key plot points There were Space ships flown by some American voiced crew. They were some kind of rescue squad or maybe space police. In one episode they went to an orange tree farm in a canyon which used mirrors on the canyon walls to direct sunlight to the oranges. They had a force field that protected the canyon but some bad guys came and shot the mirrors. The heroes came back and saved the day. Another episode was set in an underground ancient tomb of some kind that was covered by a sandstorm once they escaped. Chronology and other relevant information It had kind of 80s or 90s animation. I don't think I ever saw it on TV. I only ever watched the same 3 episodes on VHS. |
I have three servers with own databases, and database schemas are same. Let's call them servers A, B and C. All three servers will be operational, which means that all three servers will serve for its region. Data from servers B and C need to be replicated on server A, so that server A will contains data from all servers, but other two servers contain just own data. I need to implement some replication solution to achieve this goal, and I am asking if it is possible to have two publishers (server B and C) and one server with two subscription (server A)? Is there any better solution? Which replication model will be the best? | I have 8 individual SQL Server 2008 R2 machines, each hosting 1 database. Each database has an identical table structure and schema, and entirely unique data. I would like to establish a reporting server (may be 2008 or 2012), that consolidates the rows from selected tables across the 8 source servers into a single instance of those tables on the reporting server. This is one-way replication (no changes will be made to the reporting server). I will need to replicate changes from the source databases with relatively low latency (say 20-30 seconds). Furthermore, I'd like to find methods to achieve this with as little impact to the source servers as is practical. 3rd-party agents, triggers, or schema mods to those servers are difficult in my environment. My questions: What are promising architectures and technologies for achieving this goal? I've looked at SQL Server Merge Replication, but I am concerned about latency. Is this an appropriate technology for this goal? Are there many-to-one architectures for transactional replication? Should I be looking at 1-to-1 replication into 8 databases on my reporting server, followed by some custom merge function (a 2-step replication)? Thanks, John |
Using importHTML in Google sheets is it possible to shape the following Sheet1:Rows 1-30 only Sheet2:Rows 31-61 only This would increase the data limit from 50 to 60 but with two sheets. I understand it is possible to use query Limit and offset Limit the number of rows Offset skips a number of rows "Select* LIMIT 2 OFFSET 4" This maybe a solution | , upon which I'm trying to use importxml() but it just won't work properly. Until moments ago, not a single one of the formulas on this sheet would load at all, they just hung on "Loading...", but just as I began this question, some of the cells began populating with data. This is the follow-on that turned out to be an issue with the XPath and how importxml() handles it. But that led me to this issue. Can anyone see what is wrong with and why the function won't behave properly? |
Should I follow up the first sentence with the word ready? And if so, why is this so? | I heard this lyric in a song the other day and it just sounded so wrong that I assumed it must be incorrect grammar, but I can't find any specific prohibition that applies. That's what it's. That rolls off your tongue with the grace of a moose in a tutu, but I can't figure out why. There is clearly no problem with ending other sentences with a contraction. These sound fine. I thought I could, but I can't. Stop touching that, it will fall off if you don't. You say that the sky is green, but it isn't. Also, it sounds just fine if you remove the contraction: That's what it is. So what's up with this construction? Should it be avoided? |
I answered and just after commenting "Yep that seems to be working! Thank you so much!" the question author deleted the question (and, thus, my answer). Is this behavior considered appropriate on SO? Shouldn't it be discouraged? | This has happened to me at least 3 times in the past few weeks. Basically, a user asks a question. I put some time and thought in an answer and reply to their question. I come back a bit later to see if they have commented on my answer and I don't have any notifications. Fine then, I check my list of recent answers but I can't find it in there. Perplexed, I check my browser history and retrace the question I'm not sure what the purpose of this is, but perhaps someone could clear it up for me? Why do people do that? Is it because they realized what the answer was themselves? In this case, they should probably post an answer and accept it, to help other people who will encounter the same problem? Maybe from the answers they were given, they realized that the question's answer was obvious, and are ashamed of having asked it? Even in this case, I still don't think they should delete the question, but instead accept an answer and thus reward those who gave time answering their question, and maybe help others with the same problem in the future. Am I the only one seeing this or is this a common problem? I wish I could retrace all the times this has happened to me. Is there something that can be done against this? |
This appeared in the Area Level of the 19th Philippine Mathematical Olympiad. Electronic calculators were not allowed during the competition of course. The closest I got to was to express it as: $$ \dfrac{1}{\sqrt[6]{2}(\sqrt[6]{7813}-\sqrt[3]{6}\sqrt[6]{217})}. $$ The answer using an electronic calculator is 9375. Can anyone show how this can be approximated without the use of electronic calculators? | Find the integer which is closest to the value of $\frac{1}{\sqrt[6]{5^6+1}- \sqrt[6]{5^6-1}}$ I have tried putting them between n and n+1 and tried manipulating n but I cant seem to find a strategy. |
I need to create MAX file for using it in Xerox FreeFlow Process Manager. Most of the data is static, and is just poped out of the mssql database. (And it has nothing to do with Excel.) What is better in this situation to use? some tools like CSVReader/CSVWriter? Or is it more useful to handle it with the Apache Velocity? | Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it. A quick google has found which looks promising. I just wanted to check what others are using before I couple myself to this API. |
I I live in India and I have noticed that in Indian English it is normal to use the noun "doubt" as one would use the noun "question" in Western English. Examples: "He had many doubts regarding the subject, so he asked his teacher to answer those doubts." "Sir, I have a doubt, what is the square root of 64?" Is this usage of the noun "doubt" unique to Indian English, or is it also acceptable in Western English? | I have a doubt about having a doubt. I learned from that in Indian English the word doubt is used to mean question, that is, as a countable noun. If my understanding is correct, the following is grammatical in InE: I have two doubts about SQL. 1. Can I type in lower-case? 2. Does null equal null? I’m curious about what other usages this has. Can you ask a doubt? ? I captured a spy and asked him many doubts. Is it a verb? ? I captured a spy and doubted him for hours. Are there other uses that are possible or things you’d think should be possible but in fact are not possible? |
What is the argument behind: 1/(1+x) can be approximated by 1-x if x<<1 ? I couldn't find where this approximation comes from/derived. | A good approximation of $(1+x)^n$ is $1+xn$ when $|x|n << 1$. Does this approximation have a name? Any leads on estimating the error of the approximation? |
def Arithmetic (n): for i in range (1, n): for j in range (1, (i + 1) / 3): a = n^i - j/3 return a How do I determine the Big O for this algorithm? Given that the second loop has a maximum with the first loop result. | Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales. But I'm curious, how do you calculate or approximate the complexity of your algorithms? |
Let $(X,\mathcal{M},\mu)$ be a measure space and $f$ be a nonnegative measurable function on $X$. Let $1\le p<\infty$. Show that, the function $|f|^p$ is integrable with respect to $\mu$ precisely when the function $$t\mapsto t^{p-1}\mu({x:|f(x)>t})$$ is integrable on $[0,\infty)$ with respect to Lebesgue measure. In addition prove that $$\int_X |f|^p=p\int^{\infty}_{0} t^{p-1}\mu({x: |f(x)>t}) dt\,$$ I solved this problem for the case when space is sigma finite but don't know how to solve for general case. | Let $({\Bbb R},{\mathcal A},\mu)$ be the measure space where ${\mu}$ is the Lebesgue measure. Assume that $\int_{\Bbb R}|f|^pd\mu<\infty$ ($p\geq1$). There is an exercise for proving that $$\int_{[0,\infty)}pt^{p-1}\mu(\{x:|f(x)|\geq t\})d\mu(t)=\int_{[0,\infty)}\mu(\{x:|f(x)|^p\geq s\})d\mu(s).$$ If one formally let $s=t^p$, then $ds=pt^{p-1}dt$ and one would immediately get the equality above. However, how can I justify it rigorously in the sense of Lebesgue integration? [Edited] What puzzles me is that I have the "change of variable" theorem for Riemann integration, but all the integrations here are in the Lebesgue sense. Unless one has shown that the integrands are also Riemann integrable, how can I directly use "change of variable"? |
I was cleaning out my steam library today and noticed something weird. Dozens of games of the format, SteamAppXXXX, which don't seem to do anything. Given their... questionable nature, I haven't tried to install or run them. What's going on here? | I just browsed through my steam games library and saw 'Steam App 210890' as something I could install. When I tried to install it, to see what it was, steam told me that it would be downloading now, yet nothing happened. Now I'm just wondering, what is that? |
There should probably be an Ant keeping Stack Exchange, as we would probably get more traffic, because there are many Ant keeping forums out there, but they all seem to be outdated, while Stack Exchange stays alive. I'm sure there are a lot of ant keepers out there who could be helped by other ant keepers and ant experts, and the Stack Exchange community in general. If this request is denied, could anyone please link me to a good Ant keeping forum where I could post my questions? | I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this? Related: |
I installed synaptic package manager to manage my packages and, I see many kernels, that are not being used, can I delete them? There are 2 - 3 using kernels and many non using. | My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates. After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images? Here is a list of files that are on my /boot partition: :~$ ls /boot/ abi-2.6.31-21-generic lost+found abi-2.6.32-25-generic memtest86+.bin abi-2.6.38-10-generic memtest86+_multiboot.bin abi-2.6.38-11-generic System.map-2.6.31-21-generic abi-2.6.38-12-generic System.map-2.6.32-25-generic abi-2.6.38-8-generic System.map-2.6.38-10-generic abi-3.0.0-12-generic System.map-2.6.38-11-generic abi-3.0.0-13-generic System.map-2.6.38-12-generic abi-3.0.0-14-generic System.map-2.6.38-8-generic boot System.map-3.0.0-12-generic config-2.6.31-21-generic System.map-3.0.0-13-generic config-2.6.32-25-generic System.map-3.0.0-14-generic config-2.6.38-10-generic vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic vmcoreinfo-3.0.0-12-generic extlinux vmcoreinfo-3.0.0-13-generic grub vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic vmlinuz-3.0.0-14-generic Currently, I'm using the 3.0.0-14-generic kernel. |
Terminal Text $ cd LALALA ~/LALALA $ dir la\ la\ 1 la\ la\ 2 ~/LALALA $ Directory Image When I use dir command in terminal, the list of file show \ (backslash) to separate their word (see: Terimanal Image). Whereas in the origin, there is no '\' (backslash) (see: Directory Image). How do I change this back to normal? NB. I think the reason is because of the pwd command on the terminal. After I use the PWD command, this happens. | I've been trying to find the difference between using the dir and ls commands in terminal. I know ls is the traditional UNIX method of viewing the files in a directory, and that dir is the windows command prompt equivalent, but both commands work in terminal. If I type in dir, it displays the files and folders in the directory, and if I type ls, it does the same, except with content highlighting. Both commands accept options (i.e. ls -a and dir -a both return all files and folders and hidden files. So does anyone know what the difference is and why both dir and ls are used? |
I've been designing (my personal projects) for the past 6 years and recently I started designing logos for clients. Now, there is this client who wanted a logo. I took 6 days to submit 1 logo and 1 day to submit 5 variations (totally different) of that logo upon rejection (PS. all 6 were standard). Finally, he selected the last one (IT'S STILL THERE AS HIS LOGO IN HIS WEBSITE) and when I asked for my payment, he started "abusing" me over phone claiming that I delayed his project (He never mentioned any deadline). Since I'm a beginner, I didn't know that I had to sign an agreement before hand. But, I have the PSD file, whatsapp conversation with him and a screen shot of the logo in his website. How do I deal with this? | I recently had an experience with a client that was a bit messy, and now they don't want to pay for the work I did. They needed some presentation decks, one of which needed to be editable (text to go on top of graphics) in PowerPoint. I told them that I do not work in PowerPoint as a graphic designer, what I can do is create images that can serve as a background template onto which text boxes on PowerPoint can be created. From there, my time was highly mismanaged. The person kept directing me to figure out different ways of working around what I proposed and seemed resistant to it. All the research I did, and later confirmed with graphic designers- told me that this was the way to go from Adobe to PowerPoint. I initially did not want to invoice for this time, but they directed me to look into things after I told them I didn't work in PowerPoint. They fired after I spent days on end working and researching to appease the woman and see if I could find other ways around around her reticence about working with the approach I outlined about. They then sent me an email that my work was incomplete and unusable and would not pay me (p.s. they fired me before they even reviewed all of it, and what was reviewed was never stated to be incomplete or un-useable). I explained to them that my time was 1) mismanaged and redirected to research and this delayed design time and 2) that I did everything I was directed to and they fired me before any revisions or edits could be made. If they needed something to be created in PowerPoint from the start, they should have told me. So I was hoping to get advice- it is my understanding that designers don't work in PowerPoint and that I worked around this in the way that it seems everyone I talked to would. Can they do this? We agreed to freelancing per hour, not per project, I did not have a contract unfortunately. |
What is low latency kernel? When do we need to use it? Any something may be affected when we use low latency kernel? | After installing Ubuntu Studio 12.04, I have found that it uses a low latency kernel. I searched for an explanation and how to change back it to a real-time or generic one. However, it looks like this part of Linux hasn't been covered to explain the details. Q: Why choose a low latency kernel over a generic or real-time one? PS: I have already read the answers from question and post. |
I need to horizontally center the child element of an inline block. The issue is that the child sub menu is variable width and can be wider than its parent. My initial solution was to set the child element a left & right of -50px but this is not really a variable width and instead statically sets it to be 100px wider than its parent. .main-menu { text-align: left; margin: 0; padding: 0; font-size: 0px; font-size: 0rem; } .main-menu li { font-size: 18px; font-size: 1.8rem; line-height: 1em; list-style-type: none; text-align: center; display: inline-block; zoom: 1; padding: 0 25px; position: relative; } li > a { display: inline-block; zoom: 1; padding: 21px 0 19px; font-family: "Open Sans", sans-serif; font-weight: 400; color: #282828; font-size: 16px; font-size: 1.6rem; line-height: 1.2em; text-decoration: none; -webkit-transition: all .25s ease-in-out, background-image 0s, background-position 0s; transition: all .25s ease-in-out, background-image 0s, background-position 0s; } .sub-menu { position: absolute; top: 100%; left: -50px; right: -50px; max-width: 250px; margin-left: auto; margin-right: auto; margin-bottom: 0; min-width: 150px; background-color: white; text-align: left; padding: 17px 0; box-shadow: 0 2px 5px #dcdcdc inset; border-top: 18px solid #ffdd00; } <ul class="main-menu clearfix"><li id="menu-item-657" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children first menu-item-657"> <li id="menu-item-657" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children first menu-item-657"><a href="link">Solutions</a> <ul class="sub-menu"> <li id="menu-item-220469" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-220469"><a href="link">Solutions</a></li> <li id="menu-item-18009" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-18009"><a href="link">How It Works</a></li> <li id="menu-item-10344" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-10344"><a href="link">Why Use It</a></li> <li id="menu-item-3375" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-3375"><a href="link">Products</a></li> </ul> </li> </ul> | How can I horizontally center a <div> within another <div> using CSS? <div id="outer"> <div id="inner">Foo foo</div> </div> |
I am porting a program from Perl to C++ as a learning objective. I arrived at a routine that draws a table with commands like the following: Perl: print "\x{2501}" x 12; And it draws 12 times a '━' ("box drawings heavy horizontal"). Now I figured out part of the problem already: Perl: \x{}, \x00 Hexadecimal escape sequence; C++: \unnnn To print a single Unicode character: C++: printf( "\u250f\n" ); But does C++ have a smart equivalent for the 'x' operator or would it come down to a for loop? UPDATE Let me include the full source code I am trying to compile with the proposed solution. The compiler does throw an errors: g++ -Wall -Werror project.cpp -o project project.cpp: In function ‘int main(int, char**)’: project.cpp:38:3: error: ‘string’ is not a member of ‘std’ project.cpp:38:15: error: expected ‘;’ before ‘s’ project.cpp:39:3: error: ‘cout’ is not a member of ‘std’ project.cpp:39:16: error: ‘s’ was not declared in this scope #include <stdlib.h> #include <stdint.h> #include <stdio.h> #include <string.h> #include <iostream> int main ( int argc, char *argv[] ) { if ( argc != 2 ) { fprintf( stderr , "usage: %s matrix\n", argv[0] ); exit( 2 ); } else { //std::string s(12, "\u250f" ); std::string s(12, "u" ); std::cout << s; } } | I want to insert 'n' spaces (or any string) at the beginning of a string in C++. Is there any direct way to do this using either std::strings or char* strings? E.g. in Python you could simply do >>> "." * 5 + "lolcat" '.....lolcat' |
I've been working for a couple of years still living in my parents home with no outgoings, meaning all my money goes straight to the bank. I've saved around £30'000+ but I'm unhappy with money sitting there as I feel there would be a better way to make use of it such as private equity or investments after some research - could it be used to kickstart some sort of business? I guess my question is: How could this money best be invested for me to improve my revenue / increase revenue streams? | I am in my late 20s, living in the UK, and in my third year of professional work (one year industrial placement, two years since graduating from University). I have very little in the way of monthly expenditure at the moment- living in a house share (with very cheap rent), most bills included in rent, and have pretty much reached the limits on which the various bank accounts I have open will pay interest. Since graduating, I have been saving using a few different current accounts which pay interest on balances up to a certain limit (a few of which have conditions that you have a number of Direct Debits going out from those accounts in order to receive interest on the balance of the account). But since I am now at the point where I am earning interest on the maximum balance for most of these accounts, I am starting to look at other ways to save/ invest, but I'm just not really sure what to look into/ what the best options to explore are. I have already opened: Santander 123 account, Bank of Scotland Classic Account with Vantage, TSB Classic Plus account and a Club Lloyds account, as well as having an ISA and one or two Regular Savers on-going. I am maintaining the maximum balance that you can receive interest on in each of these current accounts. My ISA matured recently (3 years paying 3.75%), and that balance is now sat in a Flexible ISA (earning 0.8%) while I explore what's best to do with it. I take home roughly 1k per month after tax, rent and other regular outgoings such as food, travel, leisure, student loan repayments, phone/ broadband, etc. I am at the point financially where I have saved enough to have a reasonable deposit on a house, but am not at the point in life where I want to commit to being a home-owner for a couple of reasons: My work is contract based, so there's no guarantee that I will be working in the same location as I am at the moment, this time next year (in fact that's looking less and less likely, as the current contract is coming to an end, and there's some uncertainty as to when the client will begin the next contract- government projects). It would not be unrealistic to think that I may be in the situation where I don't have any work at all in a few months time, and so I am currently applying for other jobs. Having gone through the usual cycle of school- university- job, etc... I am thinking that now would potentially be a good time to look into doing some travelling, so I would rather not pursue buying a house for the moment, in case I do decide to do some travelling for a year or so. I have recently started watching the stock prices of a few companies to get an idea of investing in the stock market, but feel like I need to research this & watch the values for a while before I go ahead and invest in any shares. I have a credit card, which I pay off monthly, but other than that, the only debt I have is my student loan (approximately £25,000). So, given my situation, are there any other ways that I can save/ invest that I am not currently doing? Or would it be best to start using any excess funds, that I won't earn any interest on, to pay off my student loan quicker? The interest that my student loan is incurring is currently 0.9%. |
This may be a duplicate question but it seems the bad guy has improved its technology and known methods don't work so far. Anyway, started recently, my phone shows a notification every few days. Addons Detector and AirPush Detector didn't find anything related. Using: adb shell dumpsys notification I got this: NotificationRecord{40c413b0 pkg=com.google.android.gsf id=1 tag=null} icon=0x1080077 / android:drawable/stat_notify_chat contentIntent=PendingIntent{40d4f178: PendingIntentRecord{40d62628 com.google.android.gsf startActivity}} deleteIntent=PendingIntent{40d4f148: PendingIntentRecord{40d45710 com.google.android.gsf broadcastIntent}} [email protected] wants to be able to chat contentView=android.widget.RemoteViews@40cd0b38 defaults=0x4 flags=0x1 sound=content://settings/system/notification_sound vibrate=null ledARGB=0x0 ledOnMS=0 ledOffMS=0 My question is what else can I do to find out which app is pushing ads? I don't want to try airpush opt out for two reasons: I wouldn't trust people doing this at the first place. I want to find out which app is doing this and add the company/developer behind it to my black list. UPDATE My phone is a rooted Samsung Captivate Glide, Android 2.3. UPDATE Updated to 4.0.4 Thanks | Possible Duplicate: Recently advertisements have started appearing as notifications in my phone's notification bar. The icon on the ad are either a green plus sign or a white star with a red circle inside it. There is no indication in the notification as to which app it came from. I haven't installed any new applications, so I assume that some application updated to include this intrusive new ad system. Ads only show up at irregular intervals once every few hours, so removing all my apps one by one until the ads stop is not really a viable option, since I would have to wait several hours in between each uninstall to see if another ad appears. (I'm sure this is by design.) So is there any way to figure out the source application of these notification ads? My phone is a rooted/unlocked/whatever HTC Droid Incredible running MIUI. |
I have an excel dataset of 24-hour moving averages for PM10 air pollution concentration levels, and need to obtain the individual hourly readings from them. The moving average data is updated every hour, so at hour t, the reading is the average of the 24 readings from t-23 to t hours, and at hour t+1, the reading is the average of t-22 to t+1, etc. I do not have any known data points to extrapolate from, just the 24-hour moving averages. Is there any way I can obtain the individual hourly readings for time t, t+1, etc, from the moving average? The dataset contains data over 3 years, so with 24 readings a day (at every hour), the dataset has thousands of readings. I have tried searching for a possible way to implement a simple excel VBA code to do this, but come up empty. Most of the posts I have seen on Stackoverflow and stackexchange, or other forums, involve calculating moving averages from discrete data, which is the reverse of what I need to do here. The few I have seen involve using matrices, which I am not very sure how to implement. () () Any suggestions would be greatly appreciated! | Is it possible to extract data points from moving average data? In other words, if a set of data only has simple moving averages of the previous 30 points, is it possible to extract the original data points? If so, how? |
Software updater isn't working, saying it can't download repository information. I've switched the download site to Main Server from a Canadian academic site. Please explain like I'm five. Boxes tell me this: The information about available software is out-of-date To install software and updates from newly added or changed sources, you have to reload the information about available software. Updating cache: Failed to download repository information: Details: W:The repository 'http://deb.bitmask.net/debian xenial Release' does not have a Release file. W:Data from such a repository can't be authenticated and is therefore potentially dangerous to use. W:See apt-secure(8) manpage for repository creation and user configuration details. E:Failed to fetch http://deb.bitmask.net/debian/dists/xenial/main/binary-amd64/Packages 404 Not Found E:Some index files failed to download. They have been ignored, or old ones used instead. In terminal, apt-secure & apt-secure manpage give command not found. I haven't been able to do Software Update for two days. Yikes, I need patches re: Spectre and co.! | When I run software updater it says that it failed to download repository information and to check Internet connectivity. I have Internet connectivity. How do I fix this? editing to add content of sources,list: sorry I can't figure out how to paste in the content of sources.list without making a huge mess. Some of it previews as really large bold print. I tried to follow the block quoting and code rules but it is a huge mess anyway. |
Is there a way I can change the amount of time before I am logged out? I use gnome-session-quit. It is currently set for 1 minute. I would like to set time to less than 60 seconds. | I would like to change the timer on the "The system will power off automatically in 60 seconds" dialog. The battery on my device dies about 30 seconds into this message. There doesn't seem to be a setting for this in the usual places (gsettings, dconf, system settings, etc). I am not interested in removing this dialog or changing the shutdown behavior, I just want to change the amount of time that it waits. |
I have learnt that there are 2 types of hormones: peptide hormones (hydrophilic, mostly bind to receptors on cell membrane) steroid hormones (hydrophobic, can pass through cell membrane and bind to receptors on nucelus membrane) I know that steroid hormones are enclosed by a protein (Is it lipoprotein or others?) when transported in blood. But I think the protein should be relatively big outer layer should be hydrophilic (since it can dissolve in blood easily). If these 2 descriptions are true, then how can it EASILY pass through the cell membrane and enter cytoplasm directly? | I get that steroid hormones need hydrophilic plasma protein carriers (eg albumin, TBG) to travel in the plasma because they're not soluble in the plasma. However, I don't see any sources talking about how these hormones can then traverse through the (presumably also hydrophilic) cytoplasm to get to their receptors either in the cytoplasm or nucleoplasm. Anyone have any clarifications on this? |
I was reading about telescoping series and saw this example and was interested in its result. But I was a little confused because some of the steps to the derivation were skipped. In particular, I am interested in knowing why $r$ was removed from $u_{n}$ and how it was decomposed to yield $\frac{1}{k(k+1)...(k+r-1)} - \frac{1}{(k+1)...(k+r)}$. Some explanation as to how the final result was determined would also be greatly appreciated. Thank you! $$\sum_{k=1}^nu_n=\sum_{k=1}^n \frac{1}{k(k+1)...(k+r)} = \frac{1}{r} \sum_{k=1}^n \left( \frac{1}{k(k+1)...(k+r-1)} - \frac{1}{(k+1)...(k+r)} \right) = \frac{1}{r} \left( \frac{1}{r!} - \frac{n!}{(n+r)!} \right).$$ | I have the following series $$\sum_{k=1}^\infty \frac{(k-1)!}{(k+N)!},\quad\text{where }N \in \mathbb{N}. $$ I have found out that the series is equal to $$\sum_{k=1}^\infty \biggl(\frac{1}{k}\cdot \frac{1}{k+1}\cdot _{...} \cdot \frac{1}{k+N}\biggr)$$ I also know that for $N=1$ we can use partial fraction expansion and we get a telescoping sum of $1 + \frac{1}{2} - \frac{1}{2} + \frac{1}{3} - \frac{1}{3} + ... + \frac{1}{k+1}$ which leaves $1$ if $k$ is heading to $\infty$. Does anyone have any idea how I can go about doing this ? |
Can someone please help me understand the above formula for prediction interval in the multi-variate context. seems to me X'X should be (X- \bar_X)'(X-\bar_X) where \bar_X is the mean vector. Since there are plenty of references for the formula when the number of "X" is "1". Also, seems like x_0 should be (x_0 -bar_X) as well. Is \hat_V_f missing an additional term "s^2/n"? | What is the algebraic notation to calculate the prediction interval for multiple regression? It sounds silly, but I am having trouble finding a clear algebraic notation of this. |
I have a 4 GB RAM memory. In task manager you can see tha Committed memory is 5,6/7,9 GB RAM. Why that if In use memory is just 3,1 GB ? Is Windows using the Page File ? | In Windows 7's task manager, I can select different columns to show. There are a bunch that are related to memory and memory usage, but I'm not sure what it all means. I have a Dutch installation of Windows, so I'll try to translate them; as I'm not sure of the English names. In order: Working set Peak working set Private working set Commit charge Paged pool Not-paged pool |
i have a class with a constructor that returns objects. I'm adding these objects to a list but having trouble because every time i add a new element it replaces the previous ones with the current element that i am adding. Here is the list and output: Objects a = new Objects("test1"); Objects b = new Objects("test2"); List<Objects> c = new ArrayList(); c.add(a); c.add(b); System.out.println(c.get(0).getTest()); System.out.println(c.get(1).getTest()); Here is the output: test2 test2 Here is the class creating/returning the objects: public class Objects { public static String test; public Objects (String test) { this.test = test; } public String getTest() { return test; } } | To be specific, I was trying this code: package hello; public class Hello { Clock clock = new Clock(); public static void main(String args[]) { clock.sayTime(); } } But it gave the error Cannot access non-static field in static method main So I changed the declaration of clock to this: static Clock clock = new Clock(); And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object? |
Yesterday I wanted to comment on a question on Stack Overflow, but I don't have 50 reputation points. The question is that I referred in my answer to another Stack Overflow question, and my response had showed as a comment. It is correct?? I don't know if this is a bug. This is the question: And now my rep is 47. | I posted an answer (pointing to another question already asked) but when I hit submit, I saw my answer appear as a comment to the question instead. I tried it a couple of times and still the same result. The answer gets eaten up and is transformed into a comment. Is this a bug? |
I'm having issues when trying to connect my new MacBook Pro to my iPhone 4 via Bluetooth. I'm trying to connect my iPhone to my MacBook so that I can use the iPhone as a hotspot through Bluetooth and not wi-fi or a cable. Things I've done: I start off by clicking the Bluetooth icon, then go to "Set Up Bluetooth Device..." I then select my iPhone when it appears. The pairing popup comes up on my iPhone but it never does pair... I get a popup on my phone later on stating the MacBook Pro was not compatible. What can be done to troubleshoot tethering over bluetooth? | I can successfully tether my Mac (10.7.3) to my iPhone4 (5.0.1) via wifi, no problem, been doing it for months. However, when I try to tether via bluetooth instead, I can't seem to see the internet from my mac. Network Settings reports a green light for Bluetooth PAN, but my browser can't connect to anything at all. My Mac reports very similar IP addresses for both, starting with 172.20.10 and differing only in the last octet. Any idea why I can't successfully tether via bluetooth? |
My starting point is a covariance matrix (Not raw data) and I want to calculate the regression weights. I may have as many as 6-8 independent variables and 1 dependent variable so looking for a matrix solution. Been 20 years since I have done matrix algebra so any instructions for how to do this in Excel are appreciated. | For simple linear regression, the regression coefficient is calculable directly from the variance-covariance matrix $C$, by $$ C_{d, e}\over C_{e,e} $$ where $d$ is the dependent variable's index, and $e$ is the explanatory variable's index. If one only has the covariance matrix, is it possible to calculate the coefficients for a model with multiple explanatory variables? ETA: For two explanatory variables, it appears that $$\beta_1 = \frac{Cov(y,x_1)var(x_2) - Cov(y,x_2)Cov(x_1,x_2)}{var(x_1)var(x_2) - Cov(x_1,x_2)^2} $$ and analogously for $\beta_2$. I'm not immediately seeing how to extend this to three or more variables. |
I have an IEnumerable for multiple sort order specification where: public class Specification { public string Column { get; set; } public OrderByDirection Direction { get; set; } public int Priority { get; set; } } Then I have another IQueryable that I would like to lazy sort on the basis of the given IEnumerable respecting the direction and the priority. What would be the best approach to do this? are there any libraries out there that currently do this? Can someone explain how something like this can be approached with dynamic queries (expression trees)? Note: Assume the column specified do exist in the IQueryable. | I found an example in the for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>? |
Let $(S,*)$ be a finite semigroup with identity. Prove that $S$ is a group iff $S$ has only one element $x$ such that $x^2=x$. Attempt: Does this approach true? $(\Rightarrow)$ Let $S$ be a group. Denote $e_S$ be an identity element in $S$. Clearly, $e_S$ is idempotent since $e_S^2 = e_S$. Suppose that there is another idempotent in $S$, say $x$. Then, $x^2 = x$. So, \begin{equation*} x^2=x \Leftrightarrow x^{-1}x^2 = x^{-1}x \Leftrightarrow x = e_S. \end{equation*} Hence, $x=e_S$. Thus, the only idempotent in $S$ is $e_S$. $(\Leftarrow)$ First, to show for any $x \in S$, there exist $n \in \Bbb N$ such that $x^n$ is idempotent. I found this proof in the ProofWiki. Next, since the only idempotent in $S$ is $e_S$, then $x^n$ must equal to $e_S$. I have proved this already. But, I am still confused. If $n=2$, then $a^2 = e_S$ i.e. the inverse of $a$ is itself. But, what about $n=3$? $a^3=e_S$, does it implies that the inverse of $a$ is $a^2$? | Let $G$ be a finite semi-group with identity such that it has only one idempotent.Is $G$ a group? It only remains to show that for any $a\in G$ $\exists b\in G$ such that $ab=ba=e$ where $e$ is the identity of $G$ Also $e$ is the only idempotent of $G$ .How to proceed next? |
I read in a book that in a situation where you are asked to join a club activity so politely that you cannot turn it down, “Could you join us?” is more polite than “Would you join us?”. Why is that? I’ve never thought which is more polite. | Could you write your name? Would you write your name? When you are asked to do this, are there any situation in which you hear weird if either is used (but the other sounds pretty natural .) |
Is there a free way possible to open an image in a PC environment, click on the image, and obtain the RGBA value on the pixel that you clicked? I'm looking for a way to do this in a PC Windows environment. Edit: This question asks specifically about RGBA, which is not addressed at the marked duplicate . I don't believe any of the answers there have a way to obtain an alpha value. (RGBA as opposed to RGB). | How can I pick a color from an image? When I move the cursor to any particular point in the image, I want the hex code of the color at the cursor to be displayed. I would like to be able to do that with anything displayed on the screen even if it is not an Image, say I am working on any Windows application having various colors. Is there a way to do that? |
I was reinstalling Windows (namely installing Windows 8 instead of Windows 7). But then Chrome suddenly closed. When I started it again, it had that annoying home page. I don't know how to get rid of it. I tried removing the argument in Chrome's shortcut and changing Chrome settings (Set pages). Also, it made itself the default search engine and who knows what else. I thought that it must be µTorrent's doing. So I decided to: Reinstall Windows once again Give Tixity a try. To my surprise, just after installing Windows 8 and running Internet Explorer, I saw that very page again. I'm now going to reinstall Windows once again, but move the content of the disk into a folder first, so that Windows doesn't inherit anything, if that's what's happening. I'm open to your suggestions. I doubt reinstalling windows will do any better. Also, do you know by any chance what it is and where it came from? I saw a on µTorrent's forum. UPDATE I reformatted the hard drive, installed Windows and I can't see anywhere now. | What should I do if my Windows computer seems to be infected with a virus or malware? What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware? This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits. |
Are there particular instances where I should (or shouldn't?) be using "using" blocks: using(SomeType t = new SomeType()){ ... } | User answered the wonderful question by mentioning the using keyword. Can you elaborate on that? What are the uses of using? |
I want to write a shell program which will go through all folders whose names match a pattern like this: sudo sh shell.sh pub When run, the script will look for all folders whose name contains pub and print its modification date. I wish to have code which will print results like in this image: I have this code but it is not giving me the result I expect. echo 'the folder '$1' was modified at '; find -type d -name 'kam*' -exec stat -c '%y %n' '{}' \; I must go through every folder and output text echo 'the file '$1' was modified at '; and print the date like in the image. I would like a result like this: netcom@hotspot:~$ bash script.sh testRegex Pub the folder testRegex was modified on may 15 01:19 the folder Public was modified on may 19 01:19 the folder Pubos was modified on may 19 01:19 | I can easily find files with given string in name: me@comp:/usr/local/hydra/hydra-7.4.2$ find -D stat -name "*hack*" ./hack881663129.txt ./hack881663129_7.txt ./hack881663129_5.txt ./hack881663129_4.txt ./hack881663129_4_7.txt ./hack881663129_6.txt ./hack881663129_1_6.txt ./hack881663129_8.txt How can I also print file details, like size, date of creation etc.? |
good afternoon every. as it's said in the title, I have Windows 8 and Ubuntu on my laptop (EFI) and it boots automatically on Windows 8. To boot on Ubuntu, I have to change the boot order with the F9 key. it's annoying so I want Grub manage it, what must I do? | I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu? |
I wrote and ran this code to practice the basic algorithm. but this program operation is stopped. What is the problem? #include <stdio.h> #include <stdlib.h> int bans(const void *a, const void *b) { return (*(int *)a - *(int *)b); } int main() { int m, i; int* arr; scanf("%d", &m); arr = (int*)malloc(sizeof(int) * m); for (i = 0; i < m; i++) { scanf("%d", arr[i]); } int n = sizeof(arr)/sizeof(arr[0]); for (i = 0; i < n; i++) printf("%d ", arr[i]); qsort(arr, n, sizeof(arr[0]), bans); for (i = 0; i < n; i++) printf("%d ", arr[i]); free(arr); return 0; } | First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\n", sizeof(ptr)); return 0; } Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)? |
From your comments below I think there are some points in my question that needs clarification: By downvote I mean the negative rep on the question starting from (-1) that conveys that the question is of low quality and not every downvote he gets; its sufficient to notify the OP once for the first negative rep. This question is not duplicate to the above two though they seem to convey the same meaning(I prefer similar than duplicate.) I am not saying :"it would be nice to notify us" I am saying :"it is crucial to notify us"; bringing each question alone may seem a suggestion for improvement while I'm talking about a solution for a problem.. You really seem to contradict yourselves: You don't want to bother the downvoter to write a small sentence while you expect the OP to check the reputation changes every now and then to every question in every account he has on the site just to make sure he didn't ask a low quality question! You say the many notifcations will bother many users. They aren't that much; few low quality questions and you will be banned Note that I ask to be notified about the low quality questions and not answers fir there is a difference: a low quality question will never be asked again(other questions will be always marked as a duplicate) while it's possible to have many similar answers to the same question. Questions are usualy fewer than answers so it won't hurt the OP to get 5 extra notifications I see the same system applyed to the flags and I don't see anyone nagging about why he should write something to inform the moderator. watching for the decrease in rep points isn't always helping though. Take this question as an example :I get 11 downvotes but still my rep is 12 that's +9 to me. So if I didn't really see the question I would think I did a great job. What about those who answer too many question; A '-20' wouldn't even be noticed. I hope there is no more ambiguity in the problem I proposed. And please don't get me wrong I'm only posting for the sake of this site or else I wouldn't risk myself to get downvotes. | I don't know if people don't explain why they up or down vote because they don't care or because they don't want the person to know they voted on an answer (or question)... But, it might be nice to be able to leave a comment anonymously as to why it was voted. It could give us more insight as to people's thoughts on posts. Really, I think this would come into play a lot more dealing with down votes more than up votes, but I could see it being beneficial in both situations. See also |
I have a simple script, that is essentially a list of dpkg -i ... commands in a chroot. It looks something like this: chroot /path/to/chroot /bin/bash -e << EOF cd /opt dpkg -i package1_* dpkg -i package50_* dpkg -i package51_* dpkg -i package100_* EOF The problem is, when I call the script like, bash -c "script here" or bash <( echo "script here" ), i get an error message. The error message looks something like: Selecting previously unselected package libss2:i386. (Reading database ... 1376 files and directories currently installed.) Preparing to unpack libss2_1.42.9-3ubuntu1_i386.deb ... Unpacking libss2:i386 (1.42.9-3ubuntu1) ... Setting up libss2:i386 (1.42.9-3ubuntu1) ... Processing triggers for libc-bin (2.19-0ubuntu6.5) ... /bin/bash: d: not found It seems like the code is cut off at d(pkg -i ...). I changed the dpkg that is being cut off to an echo. The error message stayed the same, only that now e is not being found. I could of course save the script in a temp file and call it, since that works. But I would like to know what is happening here. The cutoff mark (including the 'd') is at the 1048 byte point. | I'm running the following script on Ubuntu 14.04: #!/bin/bash apt-get purge -y nginx apt-get install -y nginx date When I run it like cat /tmp/script | bash, apt-get starts installing, then "date" is printed (not the actual date, but the command name), then the remaining apt-get output is printed. If however I run the script like /tmp/script, it works as expected: printing the date after apt-get finished. Why does this happen and how can I force bash to work when being piped to the same way it does when invoked directly? |
I have many processes running on my Ubuntu. One day later, I find that one file has been changed. Now I want to know which process touched my file. What can I do? (I can not modify the running processes) | Three files have suddenly appeared in my home directory, called "client_state.xml", "lockfile", and "time_stats_log". The last two are empty. I'm wondering how they got there. It's not the first time it has happened, but the last time was weeks ago; I deleted the files and nothing broke or complained. I haven't been able to think of what I was doing at the time reported by stat $filename. Is there any way I can find out where they came from? Alternatively, is there a way to monitor the home directory (but not sub-directories) for the creation of files? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.