What's the best way to find outliers in the time-series like the one attached? Just using the knowledge that it is a measurement of a continuous physical process. The data is quite short (200-500 samples) and it is not really periodic.  Thanks

What's the best way to find outliers in the time-series, encountering continuity? I attached two time-series that I'm interested to filter. One is less noisy, and one is a bit noisier. I'm mostly interested in the first one. BTW the data looks like it is periodic, however, it is not and it is quite short (200-500 samples). Also, I don't know much about the process Thanks


I am trying to find out the correct way to initialise an array to all zeros (i.e. as if you have done a memset on the array).  I have found the following methods from various areas in stack overflow (and other sources):  char myArray1[10] = {0}; char myArray2[10] = {0,}; char myArray3[10] = {[0 ... 9] = 0}; char myArray4[10] = {0,0,0,0,0,0,0,0,0,0};   I would prefer the simplest syntax variant... I was using {0}, but I have not found any proof this actually is correct.

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


On some Stack Exchange sites it is unclear to me which answer to accept as correct. For example, sites such as lifehacks, scifi and personal productivity, give theories and tools, several which (or a combination) may be right. In this example  however I used solutions from multiple answers at some point in time.  Which answer, if any, should be marked as correct? Is there pressure to mark any answer as correct? I guess I always assumed the correct answer is the one actually used. IMO there shouldn't be pressure on accepting an answer, however there often is from those who posted the answer as they would get more points for an accepted answer.

I asked  that turned out to have multiple correct answers. How do I pick between them to determine which to accept?  All of the answers were different. They were not the same answer given multiple times.


For example, my site: http://abcde.foobar.com is protected by a "single sign on" login page hosted at http://sso.foobar.com, so when a user visits "abcde", they get redirected to the "sso" login page always, and they have to login to access "abcde".  It seems Google does not know about my "abcde" site at all, how do I make google know about my "abcde" site? Because a lot of my users are trying to search for "abcde" in google and the site doesn't come up. (my "abcde" url is very obsecure and not a word, so google should put my site on top if it had known about it)

I have a real estate site that we require the user to login after viewing 3 properties.  Is it possible for Google to index these property listings while still keeping that functionality in place?  What is the best way to handle this on the up and up with Google?  Thanks!


Let $K$ be a subfield of $\mathbb C$ not contained in $\mathbb R$. Is $K$ always dense in $\mathbb C$?   I have studied to show a set $A$ is dense in $B$  we will have to show that for any element $x$ in $B$ there exists a sequence in $A$ converging to $x$.But dont know what should be my approach here?

Let $K $ be a subfield of $\mathbb C$ not contained in $\mathbb R$. Is $K$ dense in $\mathbb C$?   My problem is I have never used the concept of dense set in algebra and neither have any idea about using sequences here. Please give some hints


i add the "sudo add-apt-repository ppa:qbittorrent-team/qbittorrent-stable" comand put the password and hit enter but in the 13º processe get error "http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu focal Release 404  Not Found [IP: 91.189.95.85 80]" and  "Err:14  focal Release 404  Not Found [IP: 91.189.95.85 80]" i think have todo with the vesion of Ubuntu that i im using, (ubunto focal 20.04),in the end have the mensage: "E: The repository 'http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/morphis/anbox-support/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details." What should I do? full processes: (i cant post because have too many links)

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


If I install Ubuntu as an OS on a Windows XP system (not as dual-boot), what happens to the functionality of the other programs already installed inside Windows XP? Do they continue to function on Ubuntu or will I need to reinstall them on Ubuntu?  I've seen questions regarding partitions, but not about the programs themselves.

I would like to see a full how-to guide on how to install Ubuntu.


I have one Bitmap A and one array of Bitmap, in the array there is a Bitmap that looks the same as Bitmap A. I'm using the code below but it sometimes doesnt work, it iterates the entire array without finding it, it seems there are some minor differences, is there a way to change the function to return true if its 90% similar or pick the most similar image in the array? The array has only 6 images.   for(int i = 0; i < list.Count;i++)     {         if(ImageCompareString(image,list[i])         {             answerIndex = i;             break;         }     }  private static bool ImageCompareString(Bitmap firstImage, Bitmap secondImage) {     MemoryStream ms = new MemoryStream();     firstImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);     String firstBitmap = Convert.ToBase64String(ms.ToArray());     ms.Position = 0;      secondImage.Save(ms, System.Drawing.Imaging.ImageFormat.Png);     String secondBitmap = Convert.ToBase64String(ms.ToArray());      if (firstBitmap.Equals(secondBitmap))     {         return true;     }     else     {         return false;     } }

I would like to compare a screenshot of one application (could be a Web page) with a previously taken screenshot to determine whether the application is displaying itself correctly. I don't want an exact match comparison, because the aspect could be slightly different (in the case of a Web app, depending on the browser, some element could be at a slightly different location). It should give a measure of how similar are the screenshots.  Is there a library / tool that already does that? How would you implement it?


So I have finally figured out how to record videos without any frame drops and such. Now my problem is the video editing software.  So far, every one that I have tried has just not worked. Everyone who has answered questions like mine have said that the best ones to use are openshot and Kdenlive, neither of which are working for me. Openshot crashes frequently and Kdenlive just freezes.    What I am looking for is either a way to fix said crashes and freezes, or some other program for editing, that doesn't have to be fancy, as long as it works fine. I don't need any special features, all I need is to be able to cut and merge audio and video.

What video editing software would you recommend on Ubuntu (or Linux in general) and why?  It can be for either beginners or experienced users.  Please only place one piece of software per response and include details to what makes it great!


My laptop is running Windows 10, build 1607, and no longer allows remote desktop connections to be made. When it was running Windows 8 and the previous versions of Windows 10 (before the major updates) remote desktop connections worked perfectly fine. The machine can still make remote connections to other computers, but other computers (both Windows 7 and 10) can no longer 'see' it.  I have done all the obvious fixes and checks, ensuring my computer is on a local network, ensuring firewalls from both machines are disabled, checking to see if remote assistance is permitted on the machine (it is, at the option is enabled) and trying to access the computer via IP and computer name.  The problem is baffling- and the menu the lists the options for remote access seems to have changed from previous versions (screenshot attached)

I'm trying to setup remote connection to my Windows 10 machine. During the setup I noticed that my installation is missing some settings all the tutorials have. Can anyone tell me why I'm stupid and what I should do? Below you can find a screenshot of what I'm talking about. The first image is how it should be. The second picture is a screenshot on my machine.      Edit: After popular request, my windows version:


I have an Ubuntu based Droplet on DigitalOcean which has 25GB of Storage. I am using it to run Backups from 2 different Machines.    Backup 1 is going to /home/server1/ (should have a total of 25GB of disk available) Backup 2 is goint to /mnt/volume_sgp1_01/server2/ (this should be the VOLUMES part of 200GB)   Since 25GB are not enough for my scope I have added a VOLUMES plan, which gave me an additional 200GB on a mounted drive, the problem now however seems that the mounted device also takes up space on the main droplet. Here an example:      4.0K    lib64     4.0K    media     4.0K    opt     4.0K    srv     8.0K    snap     16K     lost+found     32K     root     40K     tmp     608K    run     5.3M    etc     15M     bin     15M     sbin     76M     boot     171M    lib     855M    usr     1.3G    var     6.5G    home     14G     mnt     23G     total   The 14GB of mnt seem to be used / allocated on my Droplet as well, however that should not be the case.  I have added the SPACES (mnt) using the original instructions being:      # Create a mount point for your volume:     $ mkdir -p /mnt/volume_sgp1_01      # Mount your volume at the newly-created mount point:     $ mount -o discard,defaults,noatime /dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /mnt/volume_sgp1_01      # Change fstab so the volume will be mounted after a reboot     $ echo '/dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /mnt/volume_sgp1_01 ext4 defaults,nofail,discard 0 0' | sudo tee -a /etc/fstab   I am not really a LINUX expert, however I think there is definately something wrong here, perhaps I mounted it incorrectly or why is mnt using up disk space on my 25GB? Some expert help would be really appreciated. Thank you!

I have a SCSI disk in a server (hardware Raid 1), 32G, ext3 filesytem. df tells me that the disk is 100% full. If I delete 1G this is correctly shown.  However, if I run a du -h -x / then du tells me that only 12G are used (I use -x because of some Samba mounts).  So my question is not about subtle differences between the du and df commands but about how I can find out what causes this huge difference?  I rebooted the machine for a fsck that went w/out errors. Should I run badblocks? lsof shows me no open deleted files, lost+found is empty and there is no obvious warn/err/fail statement in the messages file.  Feel free to ask for further details of the setup.


Our eyes contain 3 photoreceptor cells (cones) to perceive three wavelength ranges of light. Here is a visual representation of the wavelengths by these receptors (S, M and L).    So if we have light of 440 nm, it results in the color blue. If we have light of 540 nm, it results in the color green. If we see light of 650 nm, it results in the color red.  I think I understand our ability of the brain to mix the results of the signals of these receptors, producing colors like yellow. However, what I do not understand is how the color spectrum is displayed like this:    Given that spectrum, I would suggest that the color 'blue' is actually a mix between the receptors S and M. And the pure result of activating the S-receptor would result in the color 'purple' (I would describe the color in the left of the image as purple, right). Therefore, the receptor colors should instead be RGP (red, green, purple) instead of RGB (red, green, blue).  However, there is one problem with this which I cannot explain. How come that mixing red light with blue light also results in purple light? How is it possible that purple light can be achieved through mixing (additively) blue and red light, just as going to the shortest wavelength boundary of what we can see (from blue to ultraviolet via purple)?  So the actual problem here is:   Purple is the color at the very shortest wavelength we can see. Purple is an additive mix between what we see as red light and blue light.   That just doesn't make any sense. I don't see how our brain can possibly perceive this as being the same color. Shouldn't both purple colors actually be different colors (thus we would have a new different color for that)?  UPDATE: Pure activation of the S-cone (blue) may actually give violet instead of blue. That means that the color blue contains also a bit activation from the M- and L-cones (green and red). So then the "blue-est blue" is actually violet, not blue. This confusion originates from the RGB-system (and other sources) that assume blue as being a primary color, whereas violet would perhaps be more accurate! Further details can be found in the accepted answer.  The  may further help to understand what purple/magenta/violet really is.

In computer science, we reference colours using the RGB system and TVs have pixels which consist of groups of red, green and blue lines which turn on and off to create colours.  But how does this work? Why would certain amounts of red, blue and green light make something seem yellow? Is this a biological thing, where our brain performs some kind of averaging operation, or are the waves actually interacting to make light of a new wavelength?  It seems RGB is a "universal triplet", as every colour within the visible spectrum can be created by combining the three in different intensities. Is RGB the only such triplet? If so, why? If not, what features must a triplet of colours have to be universal?


I try to self-learn Bayesian machine learning (mostly by studying Bishop and Kevin Murphy's books).   While working with formulas I was puzzled by the quote that "Note that the likelihood function is not necessary a density function".  The Bayes formula stated in terms of data $D$ and hypothesis $h$ is:  $$ p(h|D) = \frac{p(D|h)p(h)}{p(D)} = \frac{likelihood \times prior}{evidence} \propto likelihood \times prior$$  I can see the previous formula simply as a formula between probabilities of some events. This looks not so useful since it does not incorporates the uncertainty, and I can agree with that.  The second interpretation, which I believe it incorporates the uncertainty is to look at the posterior probability as a probability density. In this way we might take a look at "which is the shape of the uncertainty", if I am allowed to state that. Considering the chaining of learning which happens in Bayesian learning, where posteriors might be used as prior for further learning, a normal consequence is to have the prior also as a density.  Now my question is what about the likelihood and evidence? If I am free to consider as likelihood any function of $D$ and $h$, than the evidence is simply a constant. The purpose of the evidence is diminished to a constant in order to be used for making the prior a density function. (I think so because a density function has to have its integral equal with 1). So working on this line the evidence is simply a constant which depends only on the integral of the product between likelihood and prior. If we g even further we might think that we can incorporate the evidence value in likelihood so we need no evidence there. Even the name evidence become meaningless.   On the other side if we consider likelihood a density itself, I have difficulties with the math.   Can you provide me with some insights regarding why that happens (likelihood is not necessary a density)?

I'm reading  where the authors are leading from a discussion of maximum likelihood estimation to Bayes' Theorem, ostensibly as an introduction for beginners.  As a likelihood example, they start with a binomial distribution:  $$p(x|n,\theta) = \binom{n}{x}\theta^x(1-\theta)^{n-x}$$  and then log both sides  $$\ell(\theta|x, n) = x \ln (\theta) + (n-x)\ln (1-\theta)$$  with the rationale that:     "Because the likelihood is only defined up to a multiplicative constant of proportionality (or an additive constant for the log-likelihood), we can rescale ... by dropping the binomial coefficient and writing the log-likelihood in place of the likelihood"   The math makes sense, but I can't understand what is meant by "the likelihood is only defined up to a multiplicative constant of proportionality" and how this allows dropping the binomial coefficient and going from $p(x|n,\theta)$ to $\ell(\theta|x,n)$.  Similar terminology has come up in other questions ( and ), but it still not clear what, practically, likelihood being defined or bringing information up to a multiplicative constant means. Is it possible to explain this in layman's terms?


I understand the difference between #include <filename> and #include "filename" as answered in . Is there any performance difference between them? If yes, how do you prove the performance difference in this case? What is the best use case for each?

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


A professor of one of my courses introduced us to a game to play during down-time, we start with 1000, then we take turns subtracting the powers of 2 (1 to 512), from 1000, we can use the same power of 2 multiple times, but you cannot end up with a negative difference, or a difference of zero. That is, the winner reaches a difference of 1, from which the next player has no moves (cannot subtract 1 from 1 to leave a difference of zero).  He asked us if we could have any strategies and if it matters what player goes first. Now, I have simulated many games and come to conclusion that it might not matter who goes first, but any strategy I seem to come up with seems flawed.  Has anyone else heard of this game? Is there a winning strategy, and does it matter who goes first or not? Furthermore, is there any generalized version of this game, say maybe with powers of n, or starting with an integer total m?

Two players, Alex and Brad, take turns removing marbles from a jar which initially contains $2015$ marbles. Assume that on each turn the number of marbles withdrawn is a power of two.  If Alex has the first turn and the player who takes the last marble wins, is there a winning strategy for either of the players?    I try to solve it like the follow:  First) I assume that both player know the amount of marbles they took each other  Second) The problem say they pick power of 2 then the possible picks are $[1 , 2 , 4, 8, 16 ,32,64 128 , 256 , 512 , 1024]$ there are only $2015$ marbles.  Third) the game has 2 players.  Continue:  a)  The only odd pick is $1$ due to $2^0$ is $1$. The rest are odds  If player A pick odd (1) B must pick an even number and A continue pick even and also B until complete the $2015$.  And  If player A pick even (2, 4, etc) B must pick an odd (1) number and A continue pick even and also B until complete the $2015$.  I cannot see how can I use 2015 to set a winning rule, I also try use binary but I couldn’t do any advance.  Please, let me know what I am doing wrong and how I can continue. Thanks, Greg Martin and Shailesh for your help.  Note: I try to use brute fore (excel ;-) ) but I see that multiple of 3 are the wining but I can’t not put my assumption in words with the $2015$ number.  Thanks again.


I have a pretty large table (~114 million rows) containing OS MasterMap data. This is freshly loaded data in a new table. When trying to set the primary key, I get this error:  ERROR:  could not create unique index "tbl_os_mmap_topoarea_pkey" DETAIL:  Key (toid)=(1000000004081308) is duplicated.   Somehow, I have ended up with an exactly duplicated row. Every field is the same in these two rows. I want to delete one row, but keep the other. As there is no way to distinguish between the two, how can this be done?  I would like to do this as quickly and simply as possible. Creating temporary tables etc. is not really an option as it would take too long on a dataset of this size. Creating a new unique ID column would be quicker I guess, but also probably take some time.  After a bit of research, I have learned that all records in postgres have a hidden unique id, the ctid. Can I use this to delete one of the duplicate rows?

I have a table that has a schema like this:  create_table "questions_tags", :id => false, :force => true do |t|         t.integer "question_id"         t.integer "tag_id"       end        add_index "questions_tags", ["question_id"], :name => "index_questions_tags_on_question_id"       add_index "questions_tags", ["tag_id"], :name => "index_questions_tags_on_tag_id"   I would like to remove records that are duplicates, i.e. they have both the same tag_id and question_id as another record.  What does the SQL look like for that?


Finding value of $\lim_{n\rightarrow \infty}\sqrt[n]{\frac{(27)^n(n!)^3}{(3n)!}}$  what i try  $\displaystyle l=\lim_{n\rightarrow \infty}\bigg(\frac{(27)^n(n!)^3}{(3n)!}\bigg)^{\frac{1}{n}}$  $\displaystyle \ln(l)=\lim_{n\rightarrow \infty}\frac{1}{n}\bigg[n\ln(27)+3\ln(n!)-\ln((3n)!)\bigg]$  How do i solve it help me please

Find $$\lim_{n \to \infty} \left( \frac{3^{3n}(n!)^3}{(3n)!}\right)^{1/n}$$ I don't know what method to use, if  we divide numerator and denominator with $3^{3n}$, I don't see that we win something. I can't find two sequences, to use than the squeeze theorem. I'm stuck.


Just installed my first Linux Distro; Ubuntu 14.04 and I couldn't access the wifi. I tried following some other guides but all of them didn't and gave me Errors. Can I have some clear instructions as to what I should do? (considering I have no idea how to code let alone use Ubuntu efficiently) I'm not allowed to post screenshots/images but I don't have any wifi options in the drop down menu on the top right of the bar.  lspci -knn | grep Net -A2 gives:  06:02.0 Network controller [0280]: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller [14e4:4318] (rev 02)     Subsystem: Hewlett-Packard Company Broadcom 802.11b/g WLAN [103c:1356]     Kernel driver in use: b43-pci-bridge

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I'm trying to get an image or movie inside some text to achieve something like this :  HOWEVER I'm aiming for the the text to be on a transparent background so i can re-purpose the text for any project.  I've found a tutorial on BlenderDiplom's channel that shows you how to add animated fire in the 3D view and then use the compositor to have it become the text- this is achieved in Cycles. The link to the video is here:    But my problem with this method is that 1. The black background is present when rendered out and 2. I prefer working within Blender Render engine.   Now I know i can add an colour key node in the compositor to get rid of the black background but it also removes the any black in the image that's 'inside' the text.  I'm sure there's a super simple solution but I can't seem to crack it.   Any help will be much appreciated!  So i'm following Edgel's answer and tried to unwrap the text with the Smart UV Unwrap and Project from View and entered render view and the text remains white instead of showing the image inside the text:    And here is the text in the 3D view in edit mode:

Does anyone know if there are any video formats (besides the HUGE uncompressed avis) that you can render in that maintain the alpha channel? (i.e. for after FX etc.)   I used to use quicktime, but that's no longer an option.  I know you can render in png. or other image formats, but video is significantly smaller, and I often work on machines with less space & resources.


I need to use an older version of php for my project (I know that it isn't supported). I have tried adding PPA ppa:ondrej/php , but it doesn't work - It couldn't find the package. Is there another way? Simple  sudo apt-get install php5   doesn't work either; it returns no installation candidate

I am trying to update to install PHP 5.5, 5.6 or 7.0 in Ubuntu 12.04/14.04/16.04 LTS, and I can only get PHP 5.3.10 for Ubuntu 12.04, PHP 5.5.9 for Ubuntu 14.04 or PHP 7.0.4 for Ubuntu 16.04 using official repositories (using apt-get).  I'm not really sure how to do a manual update – as I need:   to play around with the new(est) PHP features to install older PHP version due support in the software


Let $\Gamma$ be any set of formulas of P. Show that the following are equivalent:   (1) $\Gamma$ is consistent and complete.  (2) There is exactly one truth assignment that satisfies $\Gamma$  I have proved from (2) to (1).   But from (1) to (2), so far (1) can prove that for any truth assignment $\phi$, then $\phi(A)=T$. But how should we prove there is only one truth assignment?

I am struggling with the following problem.  nb: this is all in propositional logic (P).    Show that the following are equivalent:  (1). $\Gamma $ is consistent and complete.  (2).  There is exactly one truth assignment that satisfies $ \Gamma $.   My weak attempt:  $\Rightarrow$ Direction:  As $ \Gamma $ is consistent, we have that $ \not \exists A, \text{formula}, st ~\Gamma \vdash A ~\text{and}~\Gamma \vdash \neg A $   As $ \Gamma $ is complete, we have that $ \forall A, \text{formula}, \Gamma \vdash A ~\text{or}~ \Gamma \vdash \neg A $  truthfully,I struggle with moving past these definitions! Especially getting from he syntax to the semantics of it all, in order to incorporate truth assignments.    Please Help!  thank you:)


$2^0+2^1+2^2+...+2^n$ for $n ∈ \mathbb{N} \cup \{0\}$.  I made a conjecture that this is $2^{n+1} - 1$. Now I have to prove it by induction.    I tested the base case where it's equal to zero, and it worked.  Then I did "assume $k∈ \mathbb{N} \cup \{0\}$ and $2^0+2^1+2^2+...+2^k$". I got marked down for saying "Let $n=k+1$", and did a bunch of math for it to become $2^{k+2} -1$ and I was apparently wrong >_>?

$$\sum_{k=0}^nq^k = \frac{1-q^{n+1}}{1-q}$$  I want to prove this by induction. Here's what I have.  $$\frac{1-q^{n+1}}{1-q} + q^{n+1} = \frac{1-q^{n+1}+q^{n+1}(1-q)}{1-q}$$  I wanted to factor a $q^{n+1}$ out of the second expression but that 1- is screwing it up...


How can I assign the Background color of a particular Cell in an Open Office? Likewise greater the Somevalues should having Green, and less than value should having Red background?

How do you automatically set the background color of an entire row based on the value of a specific column in that row in OpenOffice and LibreOffice?  There are similar questions for , but this doesn't completely work in LibreOffice.  I can set a conditional formatting rule using a formula to set the color of a specific cell based on the value in that cell (e.g. =$D5), but how do I apply the formatting to the entire row?


My question may not be clear enough, so here's a specific example. I have an rsync bin\bash script with a ton of option switches. Instead of: rsync --recursive --times --update --chown=root,root --bwlimit=500 I'd like to be able to write my script like this: rsync --recursive  --times  --update  --chown=root,root  --bwlimit=500  That way, I can easily comment out or edit individual options if I need to. Is there any way to do this?

I got a shell script and inside I got the command as below #!/bin/sh sh ../jboss/bin/standalone.sh --server-config=standalone-full.xml -Djboss.node.name=node1 -b 0.0.0.0 -bmanagement 0.0.0.0  How can I break the line to multiple lines for better understanding and management #!/bin/sh sh ../jboss/bin/standalone.sh    --server-config=standalone-full.xml   -Djboss.node.name=node1   -b 0.0.0.0   -bmanagement 0.0.0.0  Tried with backslash at the end of each line and it doesnt work.


Just as the title states, whats the best way to expose current settings like resolution to my classes? (I know this might have been asked, but I couldn't find anything)  I was thinking of the service-locator design pattern, but I am unsure, as I read that it can be abused easily.( I mean it might not fit this particular use-case )

I have a basic 2D tower defense game in C++.  Each map is a separate class which inherits from GameState. The map delegates the logic and drawing code to each object in the game and sets data such as the map path. In pseudo-code the logic section might look something like this:    update():   for each creep in creeps:     creep.update()   for each tower in towers:     tower.update()   for each missile in missiles:     missile.update()   The objects (creeps, towers and missiles) are stored in vector-of-pointers. The towers must have access to the vector-of-creeps and the vector-of-missiles to create new missiles and identify targets.  The question is: where do I declare the vectors? Should they be members of the Map class, and passed as arguments to the tower.update() function? Or declared globally? Or are there other solutions I'm missing entirely?  When several classes need to access the same data, where should the data be declared?


Let $G$ be a finite group. Having a concrete realisation of this finite group as a group of matrices is often helpful for calculations, which motivates the following questions.  Question 1: Is there a good way to obtain the minimal $n$ such that $G$ embedds into $\operatorname{GL}_n(\mathbb{Z})$ (meaning there is an injective homomorphism of G into $\operatorname{GL}_n(\mathbb{Z})$)? Is it possible to obtain such a minimal embedding via GAP?   Question 2: Is there a good way to obtain the minimal $n$ such that $G$ embedds into $\operatorname{GL}_n(\mathbb{Z})$ such that all matrices in the image have only entries 0 or 1 (or entries 0, 1 and -1)? Is it possible to obtain such a minimal embedding via GAP?   Question 3: Is there a canonical such minimal embedding if we impose some further restrictions or nice properties of such maps?

We know that every group $G$ of order $n$ can be embedded into $\mathrm{GL}_n(\mathbb{Z})$, because   $G \hookrightarrow S_n$ (Cayley theorem) $S_n\hookrightarrow \mathrm{GL}_n(\mathbb{Z})$ (via permutation matrices)   Furthermore we can show that $S_n \hookrightarrow \mathrm{GL}_{n-1}(\mathbb{Z})$, but we can't improve Cayley's theorem in general (i.e. we don't have $G \hookrightarrow S_{n-1}$).  For $n>2$, let $k(n)$ the smallest integer $k$ such that all groups of order $n$ can be embedded in $\mathrm{GL}_{k}(\mathbb{Z})$.  We can show easily that $k(4)=2$, $k(5)=4$, $k(6)=2$. From the initial remark we have $k(n)\leqslant n-1$. Let $u_n=\frac{k(n)}{n}$. What can we say about $u_n$ ? It seems hard to fully determine $u_n$. For instance:   Can one extract a subsequence $u_{\varphi(n)}$, such that $\lim_{n\to \infty}u_{\varphi(n)} =1$? Or even stronger: is there infinitely many $n$ such that $k(n)=n-1$? What are the accumulation points of $u_n$? etc


I ran below command:  tar cvf ~/data.tar /home/user/data/   It showed lot of filenames on the screen, after 10 minutes I see:     tar: Exiting with failure status due to previous errors   Where can I see the error log for tar (is it somewhere under /var/log). I can see that there is 100 Mb difference between the tarred version and the original. I want to know the names of missing files from newly created archive.  du -sh data.tar /home/user/data 5.7G     data.tar 5.8G      /home/user/data   Using GNU tar 1.27.1

I want to see the output of a command in the terminal as if there was no redirection.  Also, stderr needs to be redirected to err.log and stdout needs to be redirected to stdout.log.  It would be nice to also have the exact copy of what is shown in terminal, i.e. errors printed as and when it occurs, in a separate file: stdouterr.log.


looking at English magazine, I found a example. Colby grew up "on" a cattle ranch in Texas. why not "in"?  ranch is a place, isn't it?

I am solving the TOEIC workbook, by the way, I faced conflict that doesn't match meaning I knew.  The problem is     The newest branch of the library is located in/on Pine Street.   I think either 'in' or 'on' have the same meaning. But the commentary said that 'be located in' is mainly writing in front of building name and city name.   I don't know what is correct?


I hope everyone is OK  I would like to know if someone knows how to install Viber on Ubuntu 13.10, 32 Bit.  Best Regards,

Is it possible to install Viber VoIP client on Ubuntu? So that I can call people through Viber from my PC.


I'm running Windows 10 version 1909, OS build 18363.900. After upgrading my Win 10 version, my HDD has been almost full, degrading performance.  I now have about 40MB free on my 436 GB C:\ drive (my main partition). System \ Storage says that I have 134 GB in "Temporary files", the same as the 134 GB in "Apps & features".  (Before the upgrade, I had about 100 - 200 GB free.) Opening "Temporary files" only shows 1-2 GB of files (which I do not want to delete). Thus, it looks like "Temporary files" might be mirroring "Apps & features", but in a way that I can't disable/delete. I've deleted C:\Windows.old.  This initially gave me about 10 GB free, but it's filled up again.  Disk Cleanup and malware scans don't find anything. WinDirStat (suggested by @RamHound) shows a 10 GB C:$Recycle.bin with directories like S-1-5-... that I can't delete.  It also shows an 132 GB C:\Windows\Temp<Files> directory containing .evtx files like Microsoft-Windows-Store_Operational_... which I can't even find in Windows Explorer, let alone delete.  These two directories seem to be the problem.

How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.


As you know, some files cannot be compressed when your system is running. How do I enable compression system-wide then? For every single file?    Can I enable it in the recovery console?    Ps.: For example, when you format a new drive in the Disk Management view, it lets you enable NTFS compression partition-wide.

If I just set checkbox for compressing drive C in Windows Explorer, I will get numerous file sharing errors, because many files are opened when Windows is running.  Is it possible to compress drive in monopole mode somehow, so that it compress all files>


I have seen a couple of images in several papers like those attached below. These images are really expressive also nice i.e. look very scientific. I have no idea how to generate such images since I have in the past used powerpoint/excel. I'd appreciate some pointers on the tools for generating such images or even better ones.  UPDATE Just to clarify about duplicated question(s), this question is quite specific to graphs like those that combine several features concisely into a line /bar graph or scatter plot e.t.c. (as provided in the attached images). Some similar questions e.g.  is about illustrations as seen in the answers provided. I think my question is different, so are the answers provided different from those in the referenced question.

I would like to have suggestions of good software for drawing illustrations in research papers. I already know about , but this works only on Linux and is at times, clunky when it comes to text. Moreover the resolution is not always perfect making it difficult to manoeuvre the objects. Besides it is tough to learn and master, with all its weird click procedures.   I would love to know about better alternatives. Not talking about graphs here, just block diagrams and explanatory illustrations.


If magic comes from the body, then how does Voldemort retain his magical abilities when he is regenerated? The potion used to regenerate his body involves the bones of his father, the flesh of Wormtail, and the blood of Harry. However, Voldemort's power came from his mother's side, and none of these have genetic material from her. If magical ability comes from the soul, then Voldemort would surely become weaker after dividing his soul into seven pieces, but this is not the case. Regarding the argument that the soul is like a candle in the sense that it has regenerative capabilities, Voldemort shriveled up soul in Kings Cross Station is evidence enough that this is untrue. So which is it: body, soul, or something else?

What is a wizard that makes them non-Muggle? Or, more directly, what ancestry does the witch/wizard gene follow? Is there a patriarchal wizard (or matriarchal witch) that Muggles have no part in? Elves perhaps? Stop reading here.  Purpose of the Question/History/Don't Read There seem to be solid consequences associated with being Muggle, or Muggle-related. A dominant theme in the novels is discrimination against the non-gifted race, but, when read into, the wizard bloodline doesn't appear all that well defined. JKR indicates that wizard-ness is genetic, or inherited:  "Muggle-borns will have a witch or wizard somewhere on their family tree, in some cases many, many generations back. The gene resurfaces in some unexpected places."  By the above, it stands that a family that produces a squib (non-magical born of magical parents) must be a half-blooded family in some way, since half-blooded only requires one non-magical ancestor. Of course, we are dealing in magic genetics. Any other form of genetics would make this inherited, seemingly recessive trait (or squibs couldn't exist), never appear at all. Unless they were XMen. If it is so important, what does the wizard-bloodline follow? Other Mythos In other literature a wizard can be nearly anything, but magical powers are typically inherited as well as learned. Merlin of the Arthurian Legend (also mentioned in HP) is Cambian, meaning he is born of demonic intervention; this explains his source of enchantment. Gandalf of Middle Earth is a Maiar, as are all Wizards of Middle Earth. Wizards in Harry Potter seem to follow a bloodline, and it has been mentioned (in the question Gabe linked) that genetics have a heavy play in it, meaning that squibs and parents of Muggle-born wizards should have identical genetics. This bloodline must come from somewhere. Magical Creatures In Harry Potter it is common for magical creatures to "mingle" with humans, these beings are typically somewhat magical. Elves have been described to have very strong magic, but are for some unreasonable reason subservient to humans. I may be mistaken, but believe it was hinted that elves and the wizarding lineage had intersected at one time. Maybe I'm imagining this. Genocidal Allusions Voldemort hates muggles, and half-bloods, and whatever else is non-wizard. The presence of this theme, suggests that this wizardly bloodline must be at least defined if the main antagonist is so obsessed with keeping that mysterious bloodline pure. Since Slytherin himself was said to be a supremacist (circa a really long time ago) it suggests that this bloodline should have existed long before he was around, especially if he founded a school with people he was not related to, but were also magical.


Consider a topological space $(X, \mathcal{T})$. Suppose $X$ is compact and $(Y, \mathcal{T}_Y)$ is Hausdorff. Let $\Phi: X \times Y \rightarrow Y$ be the projection map. We show that $\Phi$ is a closed mapping. Suppose $A \subset X \times Y$ is closed. Consider an arbitrary $y \notin \Phi(A)$ i.e $(x,y) \notin {A}$  for all $x \in X$. It follows that $X \times {y} \subset (X \times Y) - A$. As $X$ is compact, by the Tube Lemma there exists an open set $V$ of $y$ such that $X \times V \subset (X \times Y) - A$. This implies that $V \subset Y- \Phi(A)$. Since $Y- \Phi(A)$ is open, $\Phi(A)$ is closed.  Is this correct? Is the Hausdorfness of Y relevant?

Let $\pi: X \times Y \to X$ be the projection map where $Y$ is compact. Prove that $\pi$ is a closed map.   First I would like to see a proof of this claim.  I want to know that here why compactness is necessary or do we have any other weaker condition other than compactness for the same result to hold.


In Hogwarts students learn how to cast every spell, and it takes some tries to cast the spell correctly. But Harry was able to use 'Sectumsempra' just by reading it in a book and without knowing what it does?  Is this possible to cast a spell without learning to cast it?

Students at Hogwarts are taught how to use spells, the correct incantation, pronunciation, tone of voice, wand action/movement, thought etc.  However Harry, who simply read the name of it in the Half-Blood Prince's Potions book, manages to produce the spell with no prior knowledge of how.  How does he know how to use Sectumsempra?


After consulting lots of posts here at tex exchange and other resources, I still can't figure out the problem. Everything looks fine, still alphabetical sorting in working for me. This is the last important step to finish my thesis, and wonder some of the experienced people can help me.  Linked posts:         \documentclass[fontsize=11.5pt,                headsepline,                BCOR=40mm, american, %paper=a4,ngerman,                bibliography=totoc]{scrbook}  # loading natbib \usepackage[round]{natbib}  # using plainnat to sort it alphabetically  \bibliographystyle{plainnat}  # using references from two different files \bibliography{Bibliography/introMethods,Bibliography/resultsDiscussion}   Entries from my reference files (all in bibtex format)  @article{roguev2001saccharomyces,   title={The Saccharomyces cerevisiae Set1 complex includes an Ash2 homologue and methylates histone 3 lysine 4},   author={Roguev, Assen and Schaft, Daniel and Shevchenko, Anna and Pijnappel, WWM Pim and Wilm, Matthias and Aasland, Rein and Stewart, A Francis},   journal={The EMBO journal},   volume={20},   number={24},   pages={7137--7148},   year={2001},   publisher={EMBO Press} }  @article{miller2001compass,   title={COMPASS: a complex of proteins associated with a trithorax-related SET domain protein},   author={Miller, Trissa and Krogan, Nevan J and Dover, Jim and Erdjument-Bromage, H and Tempst, Paul and Johnston, Mark and Greenblatt, Jack F and Shilatifard, Ali},   journal={Proceedings of the National Academy of Sciences},   volume={98},   number={23},   pages={12902--12907},   year={2001},   publisher={National Acad Sciences} }   I calling within text using citep ~\citep{roguev2001saccharomyces}  These entries look fine as someone mentioned in the other post, to reformat the author name.  I using TexLive beta for ElCaptain (MacOSX) complied via pdflatex using TexStudio. I have also deleted .bbl,.blg,.aux files before regenerating the bibliography. There are total of around 250 references in both the files. I mostly used google schlolar to export the citations of scientific papers in the bibtex format.  Please let me know, if I am missing any information and I will add up here. Thanks a lot and have a great day!  How the output looks like   Update:  Thanks to Ulrike for pointing out that the references are already sorted and problem with other references. First two entries have no author name, that's why they are not sorted. But for the third entry (Agger) I want it like this:    Minimal working example  \documentclass[a4paper]{article} \usepackage{amstext} \usepackage{makeidx} \usepackage{graphicx} \usepackage[round]{natbib} \usepackage[hmargin=3cm,vmargin=3.5cm]{geometry} \pagestyle{plain}  \begin{document} Lets cite this reference \citep{roguev2001saccharomyces} and this ~\citep{miller2001compass}. \printindex  \bibliographystyle{plainnat} \bibliography{temp.bib} % Insert the name of your bib file here  \end{document}   Contents of temp.bib  @article{roguev2001saccharomyces,   title={The Saccharomyces cerevisiae Set1 complex includes an Ash2 homologue and methylates histone 3 lysine 4},   author={Roguev, Assen and Schaft, Daniel and Shevchenko, Anna and Pijnappel, WWM Pim and Wilm, Matthias and Aasland, Rein and Stewart, A Francis},   journal={The EMBO journal},   volume={20},   number={24},   pages={7137--7148},   year={2001},   publisher={EMBO Press} }  @article{miller2001compass,   title={COMPASS: a complex of proteins associated with a trithorax-related SET domain protein},   author={Miller, Trissa and Krogan, Nevan J and Dover, Jim and Erdjument-Bromage, H and Tempst, Paul and Johnston, Mark and Greenblatt, Jack F and Shilatifard, Ali},   journal={Proceedings of the National Academy of Sciences},   volume={98},   number={23},   pages={12902--12907},   year={2001},   publisher={National Acad Sciences} }   Generates    I want to change the order of first name and last name and the first author name to be bold, for ex:

\RequirePackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Arter95,     Author = {David Arter},     Date-Added = {2013-08-11 17:38:06 +0000},     Date-Modified = {2013-09-01 15:13:22 +0000},     Journal = {Journal of Common Market Studies},     Number = {3},     Pages = {361-287},     Title = {The {EU} {Referendum} in {Finland} on 16 October 1994:              {A} Vote for the {West}, not for {Maastricht}},     Volume = {33},     Year = {1995}}  @article{Detlef95,     Author = {Jahn, Detlef; Storsved,Ann-sofie},     Date-Added = {2013-08-11 17:14:34 +0000},     Date-Modified = {2013-08-11 17:16:45 +0000},     Journal = {West European Politics},     Number = {4},     Pages = {18-37},     Title = {Legitimacy through referendum? The nearly successful domino‚Äêstrategy of the Eu‚Äêreferendums in Austria, Finland, Sweden and Norway},     Volume = {18},     Year = {1995}} \end{filecontents} \documentclass{article} \usepackage[ngerman]{babel} \usepackage{natbib} \bibpunct{(}{)}{;}{a}{}{,} \makeatletter \renewcommand\@biblabel[1]{} \makeatother  \begin{document}  \cite{Arter95}  \bibliography{\jobname} \bibliographystyle{plainnat}  \end{document}   Please help. I want the author's name displayed like this "Arter, D." instead of David Arter


$(0,1)$ is an open subset of $R$ but not of $R^2$ when we think of $R$ as the x-axis in $R^2$.    How do I prove the above statement?

It's problem #1 of Chapter 2 in Pugh's book.  I think I got the first part by taking $r=1$ and pointing out that $d(p,q) < 1 \implies q \in (0,1)$ for all $p \in (0,1)$ but I have no idea how to show it isn't a subset of $\mathbb{R}^2$.  I tried proof by contradiction and got no where.  I've been working at this problem for hours and not getting anywhere.  How should I do it?


I have 12 li-ion batteries but in different capacities. Half of them is 2000 mAh and half of them is 6000 mAh.  What happen if I parallel them?

I don't understand how cells behave when connected in parallel. So what if I have two Li-Ion cells: one ist "rated" at 15 amps (which means that the cell is able to discharge at 15 amps without problems , right?) The other cell ist rated to 5 amps. Now assume both have appropriate same Voltage to connect them both in parallel. What happens if you connect a load which would draw 10 amps now? Would both cells try to discharge with the same 10A (and thus the 5A-cell would overheat and fail...), or would the current be spread up eavenly? Is it actually forseeable at all what would happen, since it depends on the internal resistance of both cells, doesn't it? Does someone know what would happen?  Then another question: what if you put two cells of different capacity in parallel? Isn't the cell with the higher capacity supposed to give more current? Because the discharge curve of the high-capacity-cell is above the discharge curve of the low-capacity cell. So the high-capacity-cell would have to discharge more of its current until it decreases its voltage to the same level as the low-capacity-cell? So would that mean that the internal resistance gets lower with a higher capacity, is it proportional?  Hopefully my explanations aren't to confusing and hopefully there are people who are bothered by the same question :) Thank you!


I want to select "Apple" then output "John" and "Michelle". I try to run the code but it is not working. Please help.  select @start := title as 'title', id, parent from mytable join  (select @start := 0) temp where parent = @start and title = "Apple";   Link :

Assume you have a flat table that stores an ordered tree hierarchy:  Id   Name         ParentId   Order  1   'Node 1'            0      10  2   'Node 1.1'          1      10  3   'Node 2'            0      20  4   'Node 1.1.1'        2      10  5   'Node 2.1'          3      10  6   'Node 1.2'          1      20   Here's a diagram, where we have [id] Name.  Root node 0 is fictional.                          [0] ROOT                           /    \                [1] Node 1          [3] Node 2               /       \                   \     [2] Node 1.1     [6] Node 1.2      [5] Node 2.1           /            [4] Node 1.1.1   What minimalistic approach would you use to output that to HTML (or text, for that matter) as a correctly ordered, correctly indented tree?   Assume further you only have basic data structures (arrays and hashmaps), no fancy objects with parent/children references, no ORM, no framework, just your two hands. The table is represented as a result set, which can be accessed randomly.   Pseudo code or plain English is okay, this is purely a conceptional question.  Bonus question: Is there a fundamentally better way to store a tree structure like this in a RDBMS?    EDITS AND ADDITIONS  To answer one commenter's ('s) question: A root node is not necessary, because it is never going to be displayed anyway. ParentId = 0 is the convention to express "these are top level". The Order column defines how nodes with the same parent are going to be sorted.  The "result set" I spoke of can be pictured as an array of hashmaps (to stay in that terminology). For my example was meant to be already there. Some answers go the extra mile and construct it first, but thats okay.  The tree can be arbitrarily deep. Each node can have N children. I did not exactly have a "millions of entries" tree in mind, though.  Don't mistake my choice of node naming ('Node 1.1.1') for something to rely on. The nodes could equally well be called 'Frank' or 'Bob', no naming structure is implied, this was merely to make it readable.  I have posted my own solution so you guys can pull it to pieces.


I was reading the comment as usual, then there is a new comment. The app reloaded, and huh, it sorted the comments reversely.      App Version: 1.4.2.2 Device: iPad 2 (GSM) OS Version: Version 9.3.2 (Build 13F69)

Tap "2 more comments..."    SE App 1.4.1 / iPhone 5s / iOS 9.2


I have a dual boot on 2 SSDs: 1)Windows7 (main) 2)Ubuntu 17.10.  After copying a folder from Ubuntu to Windows NTFS partition and rebooting Windows stopped  recognizing this partition as NTFS (DISKPART shows RAW) and can't boot from it at all partition.  Chkdsk shows something like Corrupt master file table... cannot recover.  When I try to mount this partition under Ubuntu - it shows error message:   I tried to use ntfsfix, shows the same input:  sudo ntfsfix /dev/sdb2  Mounting volume... ntfs_mapping_pairs_decompress() failed: Input/output error Failed to load $MFT: Input/output error FAILED Attempting to correct errors... ntfs_mapping_pairs_decompress() failed: Input/output error Failed to load $MFT: Input/output error FAILED Failed to startup volume: Input/output error Checking for self-located MFT segment... OK Unrecoverable error Volume is corrupt. You should run chkdsk.   I tried TestDisk, didn't help  I created windows VM on my ubuntu and installed Acronis Revive on it, Acronis Revive allows to do scan and even quick scanning SHOWS ALL FILES AND FOLDERS and allow to restore it (saving to another drive), but how to restore the partition's MFT instead of cherry picking?  Please help!!!

About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 & Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.


I was curious to find the derivative of $x!$ and tried it myself on a basic level.  This is what I tried :-  (Please forgive me for not writing it in text I am bit slow in that and lazy too!)  My question is whether this answer is correct or not since i find answers which are really beyond my knowledge:-   Please help me figuring out whether my answer is correct or not and if correct then why wolfram shows such answer. (I am student and have no idea about those functions) Thanks!

I wish to extend the factorial to non-integer arguments in a unique way, given the following conditions:  $n!=n(n-1)!$  $1!=1$    To anyone interested in viewing the final form before reading the whole post:   $$x!=\exp\left[\int_0^x\left(-\gamma+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]$$    $$f(x):=\ln(x!)$$  $$f(x)=\ln(x!)=\ln(x)+\ln((x-1)!)=\ln(x)+f(x-1)$$ $$f(x)=f(x-1)+\ln(x)$$ $$\frac d{dx}f(x)=\frac d{dx}f(x-1)+\ln(x)$$ $$f'(x)=f'(x-1)+\frac1x\tag1$$ $$f'(x)=f'(x-2)+\frac1{x-1}+\frac1x$$ $$=f'(0)+1+\frac12+\frac13+\dots+\frac1x$$ for $x\in\mathbb N$:  $$f'(x)=f'(0)+\sum_{n=1}^x\frac1n\tag2$$  Euler has a nice extension of the harmonic numbers to non-integer arguments, $$f'(x)=f'(0)+\int_0^1\frac{1-t^x}{1-t}dt\tag{2.1}$$ from the FTOC we have $$\ln(x!)=\int_0^x\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi$$  $$x!=\exp\left[\int_0^x\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]\tag3$$  And with $f'(0)=-\gamma$, the Euler mascheroni constant, we should get the gamma function.  Or we may just let it sit as an unknown parameter.  My questions are if this captures all possible extensions of the factorial with the given conditions, since, if it did, it'd be a pretty good general extension to the factorial? Given a few more assumptions, it is easy enough to set bounds to what $f'(0)$ might be as well. Notably, this representation fails when considering $\Re(x)\le-1$, but coupled with the first condition, it is extendable to all $x$, except of course the negative integers.  robjohn♦ notes an extension to the harmonic numbers that converges for $x\in\mathbb C$, except the negative integers: $$\int_0^1\frac{1-t^\phi}{1-t}dt=\sum_{n=1}^\infty\left(\frac1n-\frac1{n+\phi}\right)$$  Any suggestions on things I could've improved and flaws in this would be nice.  Edit: Using the second condition and $x=1$, we may have $$1=\exp\left[\int_0^1\left(f'(0)+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]$$ $$\implies f'(0)=-\int_0^1\int_0^1\frac{1-t^\phi}{1-t}dt\ d\phi$$ $$f'(0)=-\gamma$$ where $\gamma$ is the Euler-mascheroni constant. Using this we get a new form of the gamma function(?):  $$\boxed{x!=\exp\left[\int_0^x\left(-\gamma+\int_0^1\frac{1-t^\phi}{1-t}dt\right)d\phi\right]}\tag4$$  $$=\exp\left[\int_0^x\left(-\gamma+\sum_{n=1}^\infty\left(\frac1n-\frac1{n+\phi}\right)\right)d\phi\right]$$  I'm not sure how to deal with trivial manipulations of this expression, as surely someone is gonna say "hey, just multiply everything by $(1+\sin(2\pi x))$ and it will still satisfy the conditions, right?" But regardless, I think this is a pretty cool new gamma function?  Also, references to this if it's not new. If someone could make a graph of this to look at, you would be great.


I am interested in being able to get information about classes, specifically variables, methods etc. I see this can be done by the Tooling API, what I am not clear on is if I need to make an API call to do this even when I am in my developer instance?   In other words, is there no way to directly query this information without the API call? I see in the Query Editor there is a checkbox for "Use Tooling API" right next to the Execute button.  When I select this checkbox I can directly query the symbol table of an object in the query editor, so I am thinking there must be a way to do this from withing a class without the API call?   All the documentation I have found if for using this with the API call however...

In an earlier question  I asked in general about the symbol table for an Apex class.  Using the Tooling API wrapper from  I am able to get part way there. But am unGodly confused.  If I go to the developer console, query editor, check the "Use Tooling API" box and run this query:  Select Id, Name, symbolTable FROM ApexClass Where Name Like '%NewCaseListController%'   I get back an ID, Name and [object Object] for the symbol table, meaning there is a symbol table object there.   But if I try the same query in Apex code in the execute anonymous window I get the error:   System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element location   If I do this in Apex I can get a result back, and according to the code for the class the result should be of type ToolingAPIWSDL.QueryResult. The QueryResult should contain a member consisting of a list of sObject_x records sObject_x[], unless I am mis-reading what that means.  ToolingAPIWSDL.QueryResult result = tooley.query('select Id, Name from ApexClass WHERE Name Like \'NewCaseListController\'');   I can take the result and apparently put the sObject_x object in it like this:  List<ToolingAPIWSDL.sObject_x> objList = new List<ToolingAPIWSDL.sObject_x>(); for(Integer i = 0; i<result.records.size(); i++){     objList.add(result.records[i]); }   At least that does not throw an error and I can write:     System.debug('objList: ' + objList[0]);  And get a result, but how do I access the symbol table? Or more to the point, how can I get a list of methods and variables? I am assuming the symbolTable is the only way?


I want to modify a translation in the german Unity translation.  Where can I find this translation in Ubuntu 14.10?

My friend and i would like to translate Ubuntu. where should we start? where to find translation tools?


Prove by induction that for all integers n that $5^{2n}-1$ is divisible by $8$ and $3$. Explain

Is there any difference in proving "for any integer $n > 0$, $3|(5^{2n}-1)$" and proving "for any integer $n \ge 0$, $3|(5^{2n} -1)$"? Or are they the same?


I had an editor who was very picky about the use of the adverb "also" used with the past tense of "to be." According to her, there was a difference between "was also" and "also was." For example: to say someone "was also" a high school teacher means he or she was a high school teacher in addition to being something else. As in, "The serial killer was also a high school teacher." Whereas, "also was" is the correct usage for saying someone shared an attribute with someone else, as in, "Andrew was a serial killer, and his sister Marie also was a serial killer."  But as anyone who's ever worked with more than one editor knows, they tend to be idiosyncratic, and all have their own little pet peeves. And they go on to become our pet peeves (one of my first editors took umbrage with "over" used to mean "more than" -- to this day I still feel a twinge when I see that usage).   I did some searches on usage of also and did not find any evidence to support her position -- but I know some of the fine points of English usage can be abstruse, so I decided to come here, where the grammar black belts congregate ;)  I read the post on "should also have named" "also should have named" with interest, and it sheds some light. But I'm not convinced this rule (if it really is a rule) applies to all verbs, let alone compound verbs.  Is some of this a matter of just avoiding awkward usages, even if they are technically correct -- or anyway, not blatantly grammatically incorrect?  Thanks!

Out of the two sentences, which one is correct?          You should have also named it the Daily prophet.      You should also have named it the Daily prophet.       My guess is it's the first one.


I have a file called test.txtwith contents like below:  Si  28.086  Si.bhs As   74.90000  As.pz-bhs.UPF   Here is some of my running of grep     I just can't understand, why grep bhs[^\.] test.txt won't grep the first line? Could someone please explain? Doesn't [^\.] represent any character other than dot?

I wanted to list the content of a pwd and display only file starting with dot. I tried ls -a | grep ^\. but I cannot figure out why the output contains also the files which do not start with dot. For example:  Pictures .pip .pki .profile projects Public   I know that I can achieve what I want with ls -ld .* I am just curious about this behaviour of grep which I can't explain.


I have problem with fully disable UAC (User Account Control) in Windows 8. I've never had such problems in Windows Vista, or Windows 7 - just have to disable UAC in Control Panel, reboot, and that's it.  Ok, step by step:  I've just make one account, during installation - account "Namek". In "Control Panel -> Accounts" I see only one account "Namek", and next to the avatar picture, it's:  Namek Local Account Administrator   Using:  cmd -> net users   there are:  Administrator   Guest   Namek   using:  cmd -> net users Administrator   and:  cmd -> net users Namek   the only difference are: Comment - in Administrator it's built-in, in Namek it's empty Account active - Administrator no, Namek yes Password required - Administrator yes, Namek no (because during Windows 8 installation I left password empty).  So I started with:  Control Panel -> Accounts -> Family Safety section   and set slider to value:  Never notify   reboot, and now, I've problem when for example I try to save anything, using Paint, directly on C:\ drive. It says:  You don't have permission to save in this location. Contact the administrator to obtain permission. Would you like to save in the My Pictures folder instead?     Ok, I've read some tutorials on the Internet, and I see that the case isn't as easy as in Windows Vista, or Windows 7 -> just disable UAC in Control Panel... so next step:  In gpedit.msc, I have already set:  Computer Configuration -> Windows Settings -> Security Settings -> Security Options ---> User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode   At value:  Elevate without prompting   So i didn't have to changed it.    In regedit:  HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System   At value:  EnableLUA   I had default 1, so I set it to 0. but again nothing has changed.    On another Windows 8 (on VirtualBox) I've try solution, to acti ve built-in Administrator account, typig: "cmd -> net user administrator /active:yes" and now after start Windows 8 I can login to Administrator account, and now I've got FULLY permissions, but when I'm logout, and login on normal account, with 'administrator' permissions (which I created during installation), I've again problem when for example I try to save anything, using Paint, directly on C:\ drive. It says: "You don't have permission...blabla"  It's annoying, that I always have to right click some program, and click Run as administrator. I do not want to activate in my normal system Administrator account (by net user administrator /active:yes), and work on it, because on Namek account, I've already set a lot of things... Any help, please :(?

I am using Windows 8 Enterprise on my development machine. Most of the time, I need full administrator for debugging, changing system files, etc.  In Windows 7, setting UAC to "never notify" would disable any administrator prompts. In Windows 8 this is no longer the case. Even with UAC disabled I get prompted to grant programs elevated privileges.  Is there a way disable this behaviour?  Note: I am fully aware of the repercussions. I have antivirus, firewall, etc and am generally quite careful about what I download or install on my machine.


I have Windows Server 2012. I faced some slow issue due to Expl0er.exe file and its located in      C:\Program Data\Expl0er.exe   I don't know about the file. its take more CPU usage up to more then 70% CPU, and its take less ram memory. please help anyone let us know its virus or any other file or explain about the file. Thank you

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.


I am wondering if there is a rule for splitting a sentence in English into more lines. For example, I would like to get Tolkien's quote engraved on a tag (necklace).     All we have to decide is what to do with the time that is given us.    But because the size of the tag, it won't be in one line, so that's why I am asking. In my native language for example you can't write preposition at the end of the line and the word on the next line if you read it "together", with one breath.

In Czech typography, some prepositions are not allowed to be at the end of the line, so line break is not allowed between that preposition and the following word.  Are there similar rules in English typography? Are there any situations where a line break is not allowed or discouraged?  Note: I'm not worried about hyphenation, I expect that my typesetting program (LaTeX) will handle that for me.


I have several lenses for my old Pentax K1000 35 MM camera.  I want to get a SLR body can I use these lenses on a Pentax DSLR? If so what model?  I do not want to go to the expense of buying a new camera and lenses as I like these lenses.

Can I use old Pentax lenses from the film days on the newer Pentax DSLRs?  Are there any caveats or exceptions? Are adapters or modifications needed?


I'm using the visa4uk.fco.gov.uk to apply for a UK VISA for myself, my wife and two sons. I assume that I have to fill out separate applications for each of us. Can I just fill out all the applications under one account using the "Apply for Myself" and "Apply for someone else" feature where I would fill out details for my family?

My wife and I are both applying for a UK Standard Visitor visa.  Do we need to fill the visa application form at visa4uk separately?  That would mean we will have to go for biometric appointments separately.  Is that how it works?


I am trying record sharing through apex. But when i am giving sharing setting to Customer Community User it is throwing this exception      FIELD_INTEGRITY_EXCEPTION, field integrity exception: unknown (invalid user or group: 00528000002WuKu):   So how can i Share records for Community User. I am having License Customer Community and I have created one Custom Profile called Hudson Changes

I've a object called myobject__c. This object is private in OWD Setting.  Now when admin create a new record of this object then I want to share this record with a user(community user). For this I've written a code in trigger to create a sharing record of this object (myobject__Share).  But I am getting a problem of :-      FIELD_INTEGRITY_EXCEPTION: field integrity exception: unknown (invalid   user or group: 005XXXXXXXXXXXXX).   how can I solve this problem and second doubt is can we create share record for community user or not.


Evaluate $\lim_{n\to \infty}(\frac{1}{n+1}+\frac{1}{n+2}+\frac{1}{n+3}+\dots+\frac{1}{n+n})$.   I converted the limit of this sum to the sum of limits. Then in each term, I divided the numerator and denominator by $n$. Each limit came out to be zero. Hence I got the answer as $0$. Have I gone wrong somewhere or is my solution correct? I have mixed feelings. Please help.

What is the sum of the 'second half' of the harmonic series?  $$\lim_{k\to\infty}\sum\limits_{n=k+1}^{2k}{\frac{1}{n}} =~ ?$$  More precisely, what is the limit of the above sequence of partial sums?


There are many examples on these forums of people calculating risk ratios from logistic regressions, but none of them seem to match my situation.   I have two predictor variables - one continuous and one binary. I'm interested in how the association between the continuous predictor and the outcome differs for group1 vs group2. I know this information is contained in the model coefficients, but I'd like to present the predicted risk ratio and confidence intervals for group1/group2 as a function of the continuous variable.  Here's some simulated data:  library(tidyr) library(dplyr) set.seed(42) N  <- 1000 dat <- data.frame(X1 = rnorm(N, 0, 1),                   X2 = rbinom(N, 1, .5))  dat$Y <- 0.5*dat$X1 - 0.3*dat$X2 - (0.2*dat$X1*dat$X2) + rnorm(N, 0, 1)  dat$Y <- as.numeric(cut(dat$Y, breaks=c(-Inf, median(dat$Y), Inf)))-1  mod <- glm(Y~X1*X2, family='binomial', data=dat)  newdat <- expand.grid(X1 = seq(-3, 3, .25),                       X2 = c(0, 1))  newdat$y_pred <- predict(mod, type='response', newdata = newdat) newdat %>%   spread(X2, y_pred) %>%   mutate(relative_risk = `0`/`1`) -> newdat   Basically, I would like to know whether it is possible for me to obtain a confidence interval for that relative_risk variable, and if so, how to compute it.  Bonus points if the method can be generalized to multilevel models.

I am using the epitools in R for calculating the confidence interval of relative risk.    There are three methods inside for calculations: namely Wald, Small and Boot.  I want to find some article describing the three methods, but I can't find any, can anyone help? Thanks!


I was playing around with some numbers and it seems that for a lot of numbers that are relatively prime to 800 $$n^{800} = 1 \mod{800}$$ is this true in general, or is it just coincidental? Is it true that $$n^k=1 \mod{k}$$ where $n,k$ are relatively prime?

I am trying to prove that these two definitions of Carmichael function are equivalent.  I am using this definition of Carmichael function:     $\lambda(n)$ is the smallest integer  such that $k^{\lambda(n)}\equiv1 \pmod n\,$ $\forall  k$ such that $\gcd(k,n)=1$.   to prove this one:     $\lambda(n) = \begin{cases}\phi(p^a) & (p=2\text{ and }a\le 2)\text{ or }(p\ge 3)\\\dfrac 1 2 \phi{(2^a)}  & a\ge 3\\ \text{lcm}\left((\lambda(p_1^{a_1}),\cdots,\lambda(p_k^{a_k})\right)& \text{for }n=\prod_{i=1}^k p_i^{a_i} \end{cases}$   Since $a^{\lambda(n)}\equiv 1 \pmod n$,  and $a^{\lambda(m)}\equiv1 \pmod m$ with $\gcd(m,n)=1 \implies a^{\text{lcm}({\lambda(n)},\lambda(m)}\equiv1 \pmod {nm} $   Hence $\lambda (mn)=\text{lcm}(\lambda(n), \lambda(n))$ for $m$ and $n$ coprime to each other.  How can I prove the other relations?


The Sorting Hat is able to look into a person's mind to learn about their talents, and can hear the thoughts of the person as well.     Hmm," said a small voice in his ear. "Difficult. Very difficult. Plenty of courage, I see. Not a bad mind either. There's talent, A my goodness, yes -- and a nice thirst to prove yourself, now that's interesting....   So where shall I put you?"      Harry gripped the edges of the stool and thought, Not Slytherin, not Slytherin.      "Not Slytherin, eh?" said the small voice. "Are you sure? You could be great, you know, it's all here in your head, and Slytherin will help you on the way to greatness, no doubt about that -- no? Well, if you're sure -- better be GRYFFINDOR!"      —Chapter 7: "The Sorting Hat", Harry Potter and the Sorcerer's Stone   Does the Sorting Hat get its mind-reading powers from the use of legilimency (the art of mind-reading)? Could someone skilled in occlumency (the art of closing one's mind against legilimency) be able to prevent the Sorting Hat from working?

The hat was sorting students into houses according to - what seems to be - "what's in their head".  How is that possible? In Harry's case, he spoke to the hat, but most students just sit there silently from what I remember from the books!


I would like the ability, in all SE sites, to sort the lists of questions and answers in a user's profile page primarily by whether that user's question has an accepted answer, or equivalently whether the user's answer was marked as the accepted answer.   It would probably be of value to be able to specify a secondary sort by one of the existing criteria, so this might be an "on/off" criteria that can be toggled. When "on", results are sorted first by this "acceptance status", then by the other specified criteria (votes/newest/activity)

I have few things on my mind:   I viewed my profile and I wanted to sort my answers by  "Accepted Answer, Votes" Wanted to know how many answers I've made that is marked as  the accepted answer. Sort by Most liked Question: I'm referring to my question who  have the most numbers of favorites. I wanted to sort the questions I created order by accepted or  unaccepted questions.    1 & 2 seems useful to me but 3 & 4 I don't think are that useful. But who knows, someone in this site might find it useful one day!  My POV: My answer is only sorted by Votes, I also want to see a list of accepted  answers on my profile probably not just to know how many accepted answers  I have but also to know what are the accepted answers that I have.


I need to replace the Alt+Shift keys combination with CapsLock key, but I'm not sure how to do this. Also, for accessibility reasons I need to replace Ctrl+Shift with RShift key for example.   All I found is  but unfortunately, it only replaces keys and not key combinations.  Is there any way of achieving this type of functionality?

As a Linux user, I'm a heavy workspace user. Windows 10 has that, but I would still like to switch between them the way I do in Linux, where I use ctrl+alt+right or left to switch between workspaces.  However, for Windows 10 it's rather ctrl+windows+right or left.  How do I modify these Windows 10 shortcuts to those of Linux?


I have installed GeoServer 2.6.1 with an Oracle datastore which has some of the tables of the database published - the others will be published in the near future.  The  says that It is possible to access to the published layers of the datastore by REST GeoServer service like following:   http://localhost:8080/geoserver/rest/workspaces/[WORKSPACE]/datastores/[DATASTORE].html  As far as I know, this REST method only lists all layers of the datastore which are published. I would like to know if could be possible to get all layers (published and non published yet) from a specific Geoserver's datastore.

I'm stuck.  I've been using geoserver with python extension gsconfig library for a while now. Almost everything works as it should be. While there are little things like publish raster images are problematic, there is still workaround that isn't written into the catalog.py class.   But there is this where I have no idea how to get around.  How do you get a list of layer resource objects that unpublished? catalog.py provides get_layers and get_resources that return layers that are published but not the unpublished layers in a datastore.   I could list all the layers (publish and unpublished) in a datastore through geoserver interface but wms/wfs/wcs and even rest does not  The wms/wfs/wcs services can return layer information in xml but still no layers that are unpublished. I could understand why that is in this case since it is publish facing but I don't know why REST services have this problem as well.  I have searched a lot of forum with no luck.  Did anyone manage to find a solution for this?


I changed my user profile name with WP-Optimize from 'admin' to 'indie' (not really 'indie', just to show you better) but author page still is available only trough example.com/author/admin - not example.com/author/indie. Is there anything I missed?  Greetings, .wired

Hi to the community, is it possible to change the default username slug to nickname if is available?    By default the url is something like: ) , is it possible to rewrite and change to ) so if a user change his nickname from the profile page the slug it will change also to the new name given by the user?  thanks a lot! Philip


When I cast Counterspell I need to see the spellcaster and be in 60feet. But do I know what he is casting? If not can I at least get the School from which the spell Comes?

I'm not entirely clear on how Counterspell works, when trying to counter higher-level spells: the CS description only talks about disrupting a creature you can see, within 60 feet, casting a spell.   However, when trying to counter a higher level spell:   Do I know what spell is being cast?  Do I at least know (somehow intuit, based on VSM components) the level of the spell? Or can I tell the spell/level of the spell by sensing a disturbance in The Weave? (I.e., if the spell is being cast using Subtle Spell, can I still tell what's going on?)   The point of the question is to determine how fruitful CS can be in combat--if I know what the other guy/gal is casting (or at least the level), I can decide whether I want to spend my L8 slot to counter his/her L8 slot. But if I have no idea, and I end up using a L8 slot to counter a L3 spell... seems a bit painful.  Hope this made sense!


While I install Ubuntu 18.04 on my HP OMEN15T gaming laptop, it just works a few seconds and then the screen freezes and I can't click anything. I have tried to use a another USB, but it still has the same error.

I have HP G56 laptop and it originally came with Windows 7 which microsoft updated to windows 10 for free. I did clean install and so i don't have option to go back to windows 7.   I want to try Ubuntu as after upgrading to windows 10, my laptop runs slow. I have created bootable USB several times but can't make my laptop to boot. I saw tutorials and already setup bios to boot from USB first and also turnoff fast boot from power option. I can however use other USB for windows 10 that i have and that works but not from Ubuntu USB


This question has been irking me for a while and I cannot seem to find any answer. Take something simple such as:  Question:"Did you not enjoy eating at the restaurant?" Response: "No."  Does this mean: "No, I did enjoy eating at the restaurant." or "No, I did not enjoy eating at the restaurant." I've heard both used in the above context and I honestly could see how both could be used as a response depending on the previous context and other variables like the speaker's tone.

I faced a problem to answer a negative question, for example, when someone asks you:      Don't you have any money?   It's a yes/no question but how should one answer the question without ambiguity?  When you answer "yes", does it mean "yes, I don't have any money"? or the other way "Yes, I do have money"? the questioner may think you are agreeing to the negative, that yes, you do not have any money.  I know it's better to answer with "on the contrary" but is it possible to answer yes or no?


When I boot (Ubuntu 14.04) Grub does not load the OS. If I list Advanced Options, grub lists kernels up to 3.13.0-100-generic, however uname -r outputs 3.13.0-96-generic.  I have installed grub Customizer, and it also only sees   linux-image-extra-3.13.0-32-generic         linux-image-extra-3.13.0-92-generic         linux-image-extra-3.13.0-93-generic         linux-image-extra-3.13.0-96-generic       Any idea what is going on?

I went into Live CD and activated Terminal.  Then, I typed gksu nautilus to gain temporary access to my root directory. Once the Manager window opened, I clicked on File System and navigated to the /etc/default/grub directory. I then double clicked on the Grub file to make changes to the TIMEOUT and TIMEOUT_QUIET.  I saved the file after I made the changes. Then I went back to the terminal mode and typed:  gksu update-grub   The error message I got was:     Can not find a device for / (is /dev mounted?)   I'm not sure what to do at this point. How can I run update-grub to update the changes? Thanks in advance for your help. Please be very detailed and specific with your response as I am totally new to this environment.


I want to get the size of the object I built with java.reflection. Here is the code. I don't understand what I'm doing wrong. When I get the object I'm tried to use instrument interface but it doesn't work. Thanks for helping !   public String analayzeData(Object obj) throws IllegalArgumentException, IllegalAccessException{         Class c =  obj.getClass();         System.out.println(sizer.getObjectSize(obj));         String dataText="*************Start of " + c.getSimpleName() + " Class*************\n";         Class superclass = c.getSuperclass();         if(superclass!=null && !superclass.isAssignableFrom(Object.class)){             Field[] superField = superclass.getDeclaredFields();             for(Field field : superField){                 field.setAccessible(true);                 Object fieldVal = field.get(obj);                 dataText+=field.getName() + " = " + fieldVal + "\n";             }         }     //  Instrumentation objectSizes =null;          Field[] fieldType= c.getDeclaredFields();         for(Field field : fieldType){             field.setAccessible(true);             dataText+=field.getName() + ":";             Object fieldVal = field.get(obj);             if(fieldVal instanceof ArrayList){                 ArrayList<?> arrayListField = (ArrayList<?>)fieldVal;                 dataText+="Size of " + field.getName() +" ArrayList = " + arrayListField.size() + "\n";                 for (int i=0; i < arrayListField.size();i++){                     dataText+=analayzeData(arrayListField.get(i));                 }                 dataText+="****End of " + field.getName()  + "List****\n";             }             else                 dataText+= " = " + fieldVal+"\n";         }         dataText+="*************End of " + c.getSimpleName() + " Class*************\n";         return dataText ;     }  } class sizer{     private static Instrumentation instrumentation;      public static void premain(String args, Instrumentation inst) {         instrumentation = inst;     }      public static long getObjectSize(Object o) {         return instrumentation.getObjectSize(o);     }  }

I have an application that reads a CSV file with piles of data rows.  I give the user a summary of the number of rows based on types of data, but I want to make sure that I don't read in too many rows of data and cause OutOfMemoryErrors.  Each row translates into an object.  Is there an easy way to find out the size of that object programmatically?  Is there a reference that defines how large primitive types and object references are for a VM?  Right now, I have code that says read up to 32,000 rows, but I'd also like to have code that says read as many rows as possible until I've used 32MB of memory.  Maybe that is a different question, but I'd still like to know.


When I select a file and right click on it to use the "Open With" option I see a list of the most likely applications for opening that file, but in my case, running 10.9.5, I see three and sometimes four instances of each recommended application for opening that particular file - see attached screenshot. Why is this? Is there a way to reduce that to one instance per app? If so, how?

For whatever reason, the "Open With" context menu in Finder is always listing every app four times (exactly).     I've read about (and tried) rebuilding the Launch Services database to restore the context menu to its initial state, but nothing seems to work. I've also used Onyx.app to clear user and system caches, but I'm still left with four repetitions of each app under the "Open With" service. I have restarted the system a few times just to be sure it was not some temporary corruption of the list.  I'm running OS X 10.6.6 on a 2011 17" MacBook Pro with a fresh install of OS X (i.e. I didn't use Migration Assistant.app or a Time Machine backup). I did, however, sync all my preferences and other files using MobileMe like I always do, so I imagine it's feasible that a preference file somewhere is causing problems? I didn't notice whether this was happening before or after my MobileMe sync.  How can I fix this so one app shows?


I'm not very experienced with ArcGIS, especially not with coding. Here's what I'm trying to do:  I have a .gdb of birds. The file is huge and, everytime I try to do anything, ArcMap either crashes or fails the operation. Therefore, I'd like to make individual layers based on the different bird "orders" (taxonomic groups). In other words, I want to split it into different separate layers based on an attribute.  As an extra, I also want to clip each of those with a shapefile of a country, so that I only have the birds of that country.

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


Just a quick question about how parameters are passed in Java...   ...             if ((index = stdout.indexOf(pattern)) != -1) {                 tidy(stdout, index + pattern.length());                 return true;             } else if ((index = stderr.indexOf(pattern)) != -1) {                 tidy(stderr, index + pattern.length());                 return true; ...      private void tidy(StringBuffer buffer, int i) {         logger.info("Truncating buffer: " + buffer);         buffer = new StringBuffer(buffer.substring(i));         logger.info("Buffer now: " + buffer);     }   In this case, will stdout and stderr (used as parameters in tidy()) have their values changed to new StringBuffer(buffer.substring(i))? My assumption is that they will as object variables(object pointers) are always passed-by-value?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


If I log in into the data SE, it always forgets my login credentials. I have to log in again and again.  I think, the feature is available in the other SE sites, and maybe it wouldn't be very hard to import it into the data SE code as well.

I know that we don't have automatic login for the Data Explorer, but what's with the automatic timeout/logout?  There have been times that I am logged into the site, maybe I walk away for a little bit, and I come back to being logged out.    Is there a reason for logging us out of Data Explorer?  If so, is it possible to either remove the timeout or extend the period of time before timeout?


I have a single-entry Estonian visa which I obtained for my travel to Estonia. But, after acquiring that, my husband got a work permit to Germany coinciding with almost the same dates.   So I have decided to accompany my husband to Germany first, for 4-5 days and then go to Estonia. I also have a valid ticket from Frankfurt to Estonia and proof of accommodation.   Can I do this? Can I enter German with an Estonian Schengen visa and then do my trip to Estonia?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I can't believe I can't see what I'm doing wrong as this is something a beginner like me should already be used to...  I have the following code:  boolean doWhile = true; while (doWhile == true){      String s = sc.nextLine();      if (s == "something"){           doWhile = false;      }      //DoStuff }   Unfortunately, when s == "something", it doesn't break the loop, but instead continues to read the rest of the code.  I've searched around and a lot of people seem to make this mistake, but in their cases they messed up with the = and == things.  I'm pretty sure = is for assigning and == to check equality. I also tried while(doWhile) and while(!doWhile) with the boolean to false, but nothing seems to work and I can't seem to wrap my head around something so simple.  EDIT: .equals() doesn't work either. Also, I've used == in this way before and it worked without a problem. Not sure why it's making a fuss right now. EDIT3: No solution here:  The solution was provided by harold.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Currently microtype package supports only protrusion in XeLaTeX. Is there an option to use other micro-typography features (expansion, kerning, spacing, tracking) in XeLaTeX?  Or should I forget about OpenType fonts and go back to pdfLaTeX?

Is microtype fully supported now by XeLaTeX? If not, how can I keep myself up-to-date on this argument?


I have a Drupal 7 page where some of my content blocks don't show up, if there is a query added to the URL.  Say my block is main_content, and it is shown all all pages except the listed ones, where no page is listed; the block appears correctly on on www.mydomain.com, but not on www.mydomain.com?gclid=xxx.  This is an issue for me because Google AdWords banners are linking to my page with a query attribute, and then the page does not display correctly.  What could be the issue here?

I have a block that I want to show on pages matching news and news?page=1. In the 'only show on these pages' section I have news and news/* but it doesn't match the second url. Is there a way to do this?   Update 1: I have also tried this:  <?php     $url = request_uri();     if (strpos($url, "news")) {     return TRUE;         }     ?>   But even after clearing all the caches it doesn't seem to have worked either.  I also tried the pattern news?page=* but that doesn't work either! Surely somebody considered being able to show blocks on paginated pages?  Update 2: Found the answer   Turns out the block I was trying to display was a View which was also set to display a pager (even though one doesn't appear). Turning the pager off resolved the issue.


I have the following program: str = 'abcd' l = len(str)  str2 = str[l-1:0:-1]   print(str2)  str2 = str[l-1:-1:-1]   print(str2)  Why does the first print() output dcb and the second print() output an empty string ? Why doesn't the second print() output dcba ?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I am new to this so I'm  sorry if this question has been asked before. I have just installed Ubuntu desktop on my old XP machine but it's running very very slow the processor is maxed out. according to the system requirements it should be fine. My PC is running on an AMD sampron 3100+ processor running at 1800MHZ with 1gig of DDR RAM can anyone help

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I have been looking around to turn off "CMD + , (comma)" opening password manager in Safari but there appears to be no option to do so (maybe I missed it). The same shortcut is used as subscript shortcut in Google Docs and it is really annoying during essays. Does anyone knows how to do such thing? Thank you beforehand! PS: The same question is marked as duplicate but the answer is not relevant.

I have been looking around to turn off "CMD + , (comma)" opening password manager in Safari but there appears to be no option to do so (maybe I missed it). The same shortcut is used as subscript shortcut in Google Docs and it is really annoying during essays. Does anyone knows how to do such thing? Thank you beforehand! -It is marked as duplicate but the answer is not relevant.


Let $$ a_{n}=1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}-\int_{1}^{n} \frac{1}{x} d x$$ for all $n \in \mathbb{N} .$ Show that $\left(a_{n}\right)$ converges. Actually $ a_{n}=1+\frac{1}{2}+\frac{1}{3}+\cdots+\frac{1}{n}$ is the Reimann upper sum of $f(x)=\frac{1}{x}$ on the interval $[1,n]$ relative to a partition such that  each subinterval of unit length, But I couldn't prove the convergence. Can we use the fact $\ln (n+1) \leq 1+\frac{1}{2}+\ldots+\frac{1}{n} \leq 1+\ln n$

I'm searching for a really simple and beautiful proof that the sequence $(u_n)_{n \in \mathbb{N}} = \sum\nolimits_{k=1}^n \frac{1}{k} - \log(n)$ converges. At first I want to know if my answer is OK.  My try: $\lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} - \log (n) = \lim\limits_{n\to\infty} \sum\limits_{k=1}^n \frac{1}{k} + \sum\limits_{k=1}^{n-1} \log(k)-\log(k+1) = \lim\limits_{n\to\infty} \frac{1}{n} + \sum\limits_{k=1}^{n-1} \log(\frac{k}{k+1})+\frac{1}{k}$     $ = \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ Now we prove that the last sum converges by the comparison test: $\frac{1}{k}-\log(\frac{k+1}{k}) < \frac{1}{k^2} \Leftrightarrow k<k^2\log(\frac{k+1}{k})+1$ which surely holds for $k\geqslant 1$      As $ \sum\limits_{k=1}^{\infty} \frac{1}{k^2}$ converges $ \Rightarrow \sum\limits_{k=1}^{\infty} \frac{1}{k}-\log(\frac{k+1}{k})$ converges and we name this limit $\gamma$ q.e.d


Given 3^5 (3**5 or 3*3*3*3*3) = 243.  Why/how does Ruby do the following:  n = 243 Math.log(n,3) returns:  4.999999999999999  Math.log(243)/Math.log(3) returns:  4.999999999999999  3**Math.log(n,3) returns: 242.99999999999977   That last one really gets me. Something is going wrong here? I'm missing something? Both?  Thanks!

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


I wanna replace my HDD but before doing that I wanna know where exactly is my Windows 7 Home Premium OEM license located. Into the BIOS or HDD recovery partition, where and how can I know?  I found very interesting articles about how to replace a HDD and a tool that can retrieve your Windows SERIAL KEY number which I don't need because I have the sticker at the bottom of my laptop.  The thing is when I replace the HDD, I don't want to have problems with the license registration. I guess when I change the HDD, Win7 will require me to change the serial number by phone. But I wanna be sure of that.  Thanks in advance.

I purchased a laptop with with Windows 7. The OEM did not provide the disc, but there is a Windows installation with a recovery partition. The Windows 7 machine has not been setup or activated.  I need to install a different operating system for testing. Installing the new operating system side-by-side will cause more trouble than its are worth, so I am going to install the new operating system over Windows 7. That is, I am going to "blow out" the existing Windows 7 installation.  Later, I may want to be able to revert to Windows 7. My question is, how do I backup the current Windows 7 installation, without setup or activation, so I can use it again in the future, if desired?    Many existing questions and answers, like ,  and , presume the machine is setup. (I don't have an HP but I expect the process is similar).  I am trying to avoid the setup process because I want the "cleanest" untainted image as possible.    And so I am clear on what I am asking: I am looking for specific instructions, and not vague advice. For example, call out a tool you have used, and provide the two or three steps needed.  Sorry about this item. Without it, its seems like (1) the question could be vague or broad; and (2) I might create a useless backup image that does not restore (and I won't find out until sometime in the future). And testing a broken backup image will blow out things without a way to restore.