body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I feel like this should be easier to find. Aug '19, I've searched google and stack with no easy answers. In Blender 2.8: I'm looking for the code similar to Print("MY_MESSAGE") into the Info window. Obviously it's easy to use Print('...') into the System Console - sys console unrelated to this question. I'm looking for any sample code I can literally copy paste into my Blender Text Editor window and run with results. tldr: one-liner print shit to Info window, pls how?!
|
I wonder if it is currently possible to print or send messages to the Report window in the Info view? this would be quite useful sometimes.
|
I have a shell script app1.sh and a tree of folders, but I don't know how to execute this shell inside each folder. Here is This script recieves an string, an integer and a file as arguments to work. The idea is to execute it in 4 folders inside a directory. Thanks all for your help :)
|
I'm attempting to write a script that will be run in a given directory with many single level sub directories. The script will cd into each of the sub directories, execute a command on the files in the directory, and cd out to continue onto the next directory. What is the best way to do this?
|
I found an example of a function $f: \mathbb{R}\to\mathbb{R}$ that is continuous and bounded, but is not uniformly continuous. It is $\sin(x^2)$. I think it's not uniformly continuous because the derivative is bigger and bigger as $x$ increases. But I don't know how to prove this is uniformly continuous. Is $\sin(x^2)$ uniformly continuous then? if it isn't, can you guys think of any other examples? thanks
|
If I want to prove that the function$\ f(x)=\sin(x^2)$ is not uniformly continuous on the domain $\mathbb{R}$, I need to show that: $\exists\varepsilon>0$ $\forall\delta>0$ $\exists{x,y}\in\mathbb{R}\ : |x-y|<\delta$ and $|\sin(x^2) - \sin(y^2)|\geq\varepsilon$. So let's take $\varepsilon = 1$. Then I want $|\sin(x^2)-\sin(y^2)|\ge1$. That's the case if $\sin(x^2)=0$ and $\sin(y^2)=\pm1$. Thus $x^2=n\pi$ and $y^2=n\pi + \frac{1}{2}\pi$. Now I'm stuck on expressing x and y, which I want to express in $\delta$, to ensure that $|x-y|<\delta$. Thanks in advance for any help.
|
The feature states: Starting at 2nd level, your quick thinking and agility allow you to move and act quickly. You can take a bonus action on each of your turns in combat. This action can be used only to take the Dash, Disengage, or Hide action. Player's Handbook, p. 96 If I somehow could take more than one Bonus Action within a single turn, could Cunning Action be used twice? My concern is that it says "on each of your turns" (emphasis added) and I am unsure if that means it can only be used once per turn irrespective of available actions or if I'm reading too much into that phrasing.
|
We were trying to understand how the "Action Surge" rule works, and after some discussion we came to a standstill. Starting at 2nd level, you can push yourself beyond your normal limits for a moment. On your turn, you can take one additional action on top of your regular action and a possible bonus action The keyword "possible" is what threw us off. Half the group thought it meant "additional action or bonus action", and the other half thought it was "additional action and bonus action". So which is it?
|
i'm practicing creating apps and i have a problem that i don't understand : why i'm getting this error with this code : java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.List com.baziremartin.pyramideapp.paquet.getCartes(int)' on a null object reference the code : mTestBTN.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { List<joueur> currentPlayers = new ArrayList<>(); for(int i = 0; i < allPlayers.size(); i ++){ currentPlayers.add(new joueur(allPlayers.get(i))); currentPlayers.get(i).setHand(paquet1.getCartes(4)); } } }); I've already search and i think it is a reference syntaxe error but i don't understand whats is the good syntax.. (i have try a lot of differents things). Thanks for help i'm beginner in java.
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
The gets the Faithful Summons feature at 14th level (XGtE, p. 24): If you are reduced to 0 hit points or are incapacitated against your will, you can immediately gain the benefits of conjure animals as if it were cast using a 9th-level spell slot. Can you gain the benefits of the Faithful Summons feature if you are in Wild Shape and your new form's HP is reduced to 0?
|
So a druid is in Wild Shape and takes damage over the threshold by a gnoll. So she turns back into her real form and takes the remaining damage in real form. The gnoll has a trait called Rampage, meaning when it reduces a creature to 0 HP, it gets another attack. Would taking a wild-shaped druid down count as taking a creature down to 0 HP?
|
I'm trying to extract climate variables in QGIS 3.10.2 for sample points with a raster dataset. The raster comes from ClimateNA () and is available as in ASCII grid (.asc) and NetCDF (.nc) formats. The raster uses the Projection: Lambert Conformal Conic and Datum: D WGS 1984. The best matching CRS seems to be North_America_Lambert_Conformal_Conic, EPSG:102009 I've set the project CRS to this and verified it for all layers. The raster loads with the CRS undefined and must be set manually, and the sample points, which are actually located in California, are displayed at (0,0). The Google base map appears to be correct. Does anyone know how I can resolve this? Another user was able to load it correctly, so hopefully its just a simple step I'm doing incorrectly.
|
I am a history teacher and I like to make my own maps (I can never find exactly what I want). I am using QGIS 1.8 and . I want to reproject their cross-blended hypso rasters into projections that are more familiar looking to my students, like Lambert Conic Conformal. I have tried changing the crs for the whole project, and the warp and assign functions from the raster menu, and changing the crs for the raster layer itself. None of these seem to work properly - the resulting maps are unrecognizable and extremely large (file size). I feel like I am making some kind of basic mistake but I don't know where to begin with this. Any help would be appreciated.
|
i was curious on how to randomly select an item from a list? for example you want to randomly choose an item from a list to print something. In the example code below i make a list with random items in it and i want the print to say "the random item is" and then a random item from the list. Sorry if this is a bit unclear if you want me to explain it better just ask :) Thanks #Example random = ["random1", "random2", "random3"] print("Random item is " + "Random Item"???)
|
Assume I have the following list: foo = ['a', 'b', 'c', 'd', 'e'] What is the simplest way to retrieve an item at random from this list?
|
I am applying to a university for a PhD position because my girlfriend is a PhD student there. Our affair is quite serious and it is almost surely going to convert into a marriage. We might even get engaged in 2019. I have been in touch with professors from this university. Moreover, I am using some of the results of another professor directly in my masters thesis. I have a lot to write in the statement of purpose from a technical point of view. However, because of my girlfriend, this university becomes a top-priority for me against all other PhD offers I may get and I want to stress this in my PhD application. Should I mention this in my SOP? How should I mention it, if the answer is yes.
|
While writing one's Statement of Purpose for applying to a grad program, should one mention that her spouse is also a grad student in the same university? What are the pro's and con's of that approach - while on one hand, it shows that the candidate is very likely to accept an offer made by the dept, it might also imply that the presence of her spouse is the main reason the applicant wants to get admitted, which might not sit well with the Admissions Committee?
|
I successfully installed phpmyadmin, via apt-get install phpmyadmin However I can't find the directory for phpmyadmin, I want it to appear on /var/www/phpmyadmin so that I can use it via URL. Where is it? Thanks.
|
I just finished installing mysql-server, and then installed phpmyadmin which came with Apache and PHP. It set it up alright and made a phpMyAdmin database, but I can't seem to find the URL to get to it -- I tried going to but it doesn't seem to be there. I can't find the location in any of the manuals, does anyone know where this is located? Thanks.
|
I want to draw a "plain mono amp" in my circuitikz schematic, but I keep getting this error : Package pgfkeys Error: I do not know the key '/tikz/plain mono amp' and I am going to ignore it. Perhaps you misspelled it. I triple checked the manual, this key is supposed to exist, and I don't get what I am actually doing wrong. I am using Overleaf by the way, which should have the latest package of Circuitikz. Here is an example of what is not working : \documentclass{article} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) node[plain mono amp]{}; \end{circuitikz} \end{document}
|
I have a circuitikz that works perfectly on one configuration but not on another one; for example, this: \begin{circuitikz} \draw (0,0) node[dipchip]{CHIP1}; \end{circuitikz} works ok on one computer but gives errors in another one. What's the matter? The error is something like: I do not know the key /tikz/dipchip/ or similar about not existing /tikz/circuitikz/ keys,.
|
I've seen answers to other questions on here and most suggest using a JOIN instead of WHERE in SQL. I'm new to SQL, having started using Oracle around 6 months ago and I've not once used a JOIN. I don't do any complex queries by any means. A query I use quite often is below. What would the equivalent be using a JOIN, should I do that and are there any advantages? SELECT orders.no, orders.created, totals.net FROM orders, totals WHERE orders.no = totals.no I'm using an ancient version of Oracle; 8i so I believe some of the JOIN are using (+) or something, but never understood it.
|
Is there any efficiency difference in an explicit vs implicit inner join? For example: SELECT * FROM table a INNER JOIN table b ON a.id = b.id; vs. SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id;
|
Consider a stationary 10kg bike; if I apply a force of 10J then $KE=\frac{1}{2}mv^2$ so $v=\sqrt\frac{2KE}{m}=1m/s$. If we consider the same example again, but from the point of view of a stationary astronaut looking down from space, the Earth is moving at approximately 30,000m/s, so the KE of the stationary bike would be $KE=\frac{1}{2}10*30,000^2=4,500,000,000J$. If we assume the bike is being pushed in the same direction the Earth is travelling, to get to 1m/s the bike will need a kinetic energy of $KE=\frac{1}{2}10*30,001^2 = 4,500,300,005J$, which is 300,005J more than for an observer on Earth. I understand that conservation of kinetic energy only makes sense if you look at all objects from the same frame, so my question is why it would appear to take so much more energy to accelerate a bike by 1m/s from one observer's point of view than another?
|
The energy of a moving object is $E = mv^2\;.$ That is it increases with velocity squared. I walk at say 3 miles per hour, or lets round that down to 1 meter per second for a slow walk. I weigh less than $100~\mathrm{kg}\;,$ but lets just round that up to $100~\mathrm{ kg}$ for convenience (it is just after Christmas). So when I walk along the pavement, I have $100~\mathrm{kg\; m^2 s^{-2}}$, 100 joules of kinetic energy. Now I get on a passenger jet, which is cruising at around 500 knots, call that 250 meters per second. In my seat I have $100\times 250^2 = 6250000$ joules of kinetic energy. But when I walk down the aisle I have $100\times 251^2 = 6300100$ joules of kinetic energy. The difference between these is: 50100 joules. It feels the same to me, walking down the pavement as walking down the aisle of the plane. I didn't have to make some huge effort to get up to speed on the plane, yet I needed 500 times the energy to do it. How is this possible, and where did the energy come from?
|
I can not solve this "loop" in my learning: Relativistic kinetic energy is usually defined as (see by example ): $$ T = \int \mathbf{v} d \mathbf{p} = \int \mathbf{v} d(\gamma m \mathbf{v}) = (\gamma-1) m c^2 $$ where $\mathbf{p} = \gamma m \mathbf{v}$ is used as premise. (Four) momentum is defined as: a) from mass multiplied by position derivative respect to proper time (something usually deprecated due to the mix of reference frames for $\mathbf{x}$ and $\tau$): $$\mathbf{p}=m\frac{d\mathbf{x}}{d\tau}=m\frac{d\mathbf{x}}{dt}\frac{dt}{d\tau}=m\mathbf{v}\gamma$$. b) from action related to Lagrangian of the free particle (see ): $$ \mathbf{p} = \frac{\partial S}{\partial \mathbf{q}} = \frac{ \partial L}{\partial \dot{\mathbf{q}}} $$ where $ S=\int L dt $ and the Lagrangian $ L = - \frac{ 1 }{\gamma} m c^2 $ is obtained from the total energy $E=\gamma m c^2$ and: b1) total energy from kinetic (loop!) $T=(\gamma-1)mc^2$ plus rest energy $mc^2$ or, b2) from energy-momentum relation $E^2 = p^2c^2+m^2c^4 $ and energy-momentum relation (see ) from four-momentum norm (loop!). I can not find a linear (non-circular) sequence of definitions that allows me to define and evaluate (four) momentum and kinetic energy in relativistic context.
|
Motivating the non-relativistic momentum $$\mathbf{p} = m\mathbf{v}$$ is quite easy: it is meant to represent the quantity of motion of the particle, and since the mass is one measure of quantity of matter it should be proportional to mass (how much thing is moving) and should be proportional to velocity (how fast and to where it is moving). Now, in Special Relativity the momentum changes. The new quantity of motion becomes $$\mathbf{p} = \dfrac{m\mathbf{v}}{\sqrt{1-\dfrac{v^2}{c^2}}}$$ Or, using $\gamma$ the Lorentz factor $$\mathbf{p} = \gamma(v) m\mathbf{v}$$ where I write $\gamma(v)$ to indicate that the velocity is that of the particle relative to the frame in which the movement is being observed. The need for this new momentum is because the old one fails to be conserved and because using the old one in Newton's second law leads to a law which is not invariant under Lorentz transformations. So the need for a new momentum is perfectly well motivated. What I would like to know is how can one motivate that the correct choice for $\mathbf{p}$ is the $\gamma(v)m\mathbf{v}$. There are some arguments using the mass: considering a colision, requiring momentum to be conserved, transform the velocity and then find how mass should transform. Although this work, it doesn't seem natural, and it is derived in one particular example. On my book there's even something that Einstein wote saying that he didn't think it was a good idea to try transforming the mass from $m$ to $M = \gamma(v)m$, that it was better to simply keep $\gamma$ on the new momentum without trying to combine it with the mass. So I would like to know: without resorting to arguments based on transformation of the mass, how can one motivate the new form of momentum that works for special relativity?
|
After I upgraded Windows 7 to Windows 10 in my Samsung laptop, the AC charging stop at 80% and show "plugged in, not charging". Then I downgraded back to Windows 7, problem still exists. I have tried : Shut down Remove battery Boot up on AC power Uninstall the ACPI-Compliant Control Method Battery driver Shut down Reinsert battery Reboot Still cannot fix the problem. I am wondering whether it is a configuration problem?
|
I have a samsung laptop and recently had a pop up message saying for battery to not completely charge to save battery life after doing this my battery does not completely charge. It charges to approx 50% but this does not allow me to use my computer for very long which is very frustrating, Anyone know how I can change the setting of my battery to go back to fully charge as I cannot seem to find anything in my battery options that allows me to do this.
|
Usually when we consider the pressure exerted by gas, there is nothing to do with the weight of the gas. On the contrary the atmospheric pressure is defined as the weight of the gasses. What is the difference here?
|
I know that a gas is made of atoms or molecules moving freely in space. When these particles hit the walls of where they're kept in they cause something called pressure. But these particles never pile up on each other and push a surface down by their weight so that we can measure it as weight, not pressure. So why do gases have weight?
|
As shown in the figure below, I opened three Safais windows. To switch among them, I double click the Safari ico in the dock and select the window. Is there any shortcuts to move these opened windows?
|
If I have 2 windows of the same program open (Google Chrome for instance), and I want to get to the underlying one, how can I do that -- without minimizing the fore window. If I click the Chrome icon, in the bottom tray it justs shows me the window in the front. There is no window in the right of the tray since it it not minimized. If I command+tab, I just get one icon for the application, which focuses the window that is already in front. The only way I know of to get to the rear window is to minimize (or move out of the way) the front window. I find this slightly annoying, (and sometimes even forget I have a second window open because I don't know of anything indicating there is a second window open?) So is there another way?
|
Need help on all steps. Use differentiation to find a power series representation for $$ f(x)=\frac{1}{(1+x)^2} $$
|
This function seemed to be pretty much straight forward, but my solution is incorrect. I have two questions: 1. Where did I make a mistake? 2. I learned that there are shortcuts for finding a series (substitution / multiplication / division / differentiation / integration of both sides). Is there something that I can apply here? $$f(x)=\frac{1}{(1-x)^2} \qquad f(0)=1$$ $$f'(x)=\frac{2}{(1-x)^3} \qquad f'(0)=2$$ $$f''(x)=\frac{6}{(1-x)^4} \qquad f''(0)=6$$ $$f'''(x)=\frac{24}{(1-x)^5} \qquad f'''(0)=24$$ $$f''''(x)=\frac{120}{(1-x)^6} \qquad f''''(0)=120$$ The series is then $$1+\frac{2x}{2!}+\frac{6x^2}{3!}+\frac{24x^3}{4!}+\frac{120x^4}{5!}$$ and when simplified is $$1+x+x^2+x^3+x^4$$ But the correct answer is $$1+2x+3x^2+4x^3+5x^4 $$
|
I am creating a basic shell script to manipulate a database as a college assignment. However, How many times I try, I can't get the sed command fully correct. The functionality where sed is to be used is this: $name is the variable. User will supply the name via the terminal. This name will be looked up in the database and will be deleted if present. The command I used is this: sed -i /$name/d <filename> However, this command only works if the entered value contains no space. I tried out my solution by using what I could salvage from such as sed -i '/$name/d' <filename> However, to no avail. How to go about this?
|
I cannot not use a shell variable in sed in the $NUMBER form. I have this line in my shell script: cat shared.txt sed 's/whatever1/$2 ... whatever2/' > shared2.txt The result in shared2.txt looks like: ...$2.... What did I do wrong?
|
I'm not sure what I pushed, but all of the sudden, all of my materials look like blobs and don't match the edges. Sorry, I'm brand new to Blender and I did try googling this, but my 3d modeling vocab is bad enough that I wasn't sure what question to ask.
|
I'm following and I have applied a material to the body mesh and when I apply the material to the faces to the side of the mesh, I can see the top/bottom material is showing on the top and bottom parts of the side faces. This is the rendered view: and this is the wireframe showing the selected faces which the side material is applied to: I'm not sure why this is happening, can anyone advise? Thanks
|
Let $f$ be a meromorphic function on $\mathbb C$ such that $|f(z)|\ge|z|$ at each $z$ where $f$ is holomorphic. Then which of the following is/are true? The hypothesis are contradictory. Such an $f$ is entire. There is a unique $f$ satisfying the given conditions. There is an $A\in\mathbb C$ with $|A|\ge1$ such that $f(z)=Az$ for each $z\in\mathbb C.$ I think 2 and 4 are correct. But I can't proceed rigorously. Neither do the discussion is complete.
|
Let $f$ be a meromorphic function on $\mathbb{C}$ such that $|f(z)|\geq |z|$ at each $z$, where $f$ is holomorphic. Then, which of the following is/are true. The hypothesis are contradictory, so no such $f$ exists. Such an $f$ is entire. There is a unique $f$ satisfying the given conditions. There is an $A\in \mathbb{C}$ with $|A|\geq 1$ such that $f(z)=Az$ for each $z\in \mathbb{C}$ I think $1$ and $3$ are false but not sure. And what about $2$ and $4$? I am unable to find suitable examples. Please help me here.
|
Two piece of gold are contained in two same-looking black boxes respectively. It is known that one piece weights twice as the other, but do not know which is which. Two persons, say A and B, randomly choose a box. One person, say A, opened his box, but he does not known whether it is lighter or weightier. Question: Is A willing to exchange his box with B? This might be a well-known problem, but I do not know the proper name to search it online. Intuitive, it make no difference to exchange the boxes. On the other hand, if we compute the expectation for A, it seems that A should change the box (the expectation is 1.25 of the current holding). I would like to hear your answer to the question and preferably fuller story about this paradox.
|
Suppose you're given two envelopes. Both envelopes have money in them, and you're told that one envelope has twice as much money as the other. Suppose you pick one of the envelopes. Should you switch to the other one? Intuitively, you don't know anything about either envelope, so it'd be ridiculous to say that you should switch to the other envelope to maximize your expected money. However, consider this argument. Let $x$ be the amount of money in the envelope you picked. If $y$ is the amount of money in the other envelope, then the expected value equals $$E(y) = \frac{1}{2}\left(\frac{1}{2}x\right) + \frac{1}{2}\left(2x\right) = \frac{5}{4} x$$ But $5x/4 > x$, so you should switch! The Wikipedia article says that $x$ stands for two different things, so this reasoning doesn't work. I say this is not a valid resolution. Consider opening up the envelope that you pick, and finding $\$10$ inside. Then you can run the expected value calculation to get $$E(y) = \frac{1}{2} \cdot \$5+\frac{1}{2} \cdot \$20 = \$12.50$$ This means that if you open one of the envelopes and find $\$10$, you should switch to the other envelope. The $\$10$ doesn't stand for two different things, it literally just means $\$10$. But you don't have to open up the envelope to run this calculation, you can just imagine what's inside, and run the calculation based on that. This is what "Let $x$ be the amount in the envelope" means. The problem with the argument is not that $x$ stands for two different things. So what is the problem? Previous questions on stack exchange have given the resolution that I just said I wasn't satisfied by, so please don't mark this as a duplicate. I want a different resolution, or a more satisfying explanation of why $x$ does stand for two different things. Apparently there is still research being published about this problem - maybe it isn't so obvious? I think there's something subtle wrong with the premise. Because there's no uniform probability distribution on $\mathbb{R}$, statements like "random real number" are not well-defined. Likewise, I think "one envelope has twice as much money as the other" assumes some probability distribution on $\mathbb{R}$, and perhaps our expected value calculation assumes that this distribution is uniform, which it cannot be ...
|
I want to run a server with user-written scripts. But these scripts should only use one core (which should be the one with the lowest usage because there will be many concurrent scripts). Also I need to limit time and RAM for them. Is there an easy way to achieve this, or do I need to check which core has the lowest usage and assign it to it via e.g. ulimit?
|
I need to externally limit a process/session to a certain number of cores. Are there any other possibilities than CPU affinity (I don't like the need to specify the actual cores) and cgroups (hard to integrate into our project)?
|
This is only a question regarding which one would be more "pythonic" using if: import os somepath = 'c:\\somedir' filepath = '%s\\thefile.txt' % somepath if not os.path.exists(somepath) and not os.path.isfile(filepath): os.makedirs(somepath) open(filepath, 'a').close else: print "file and dir allready exists" or using try/Except: import os somepath = 'c:\\somedir' filepath = '%s\\thefile.txt' % somepath try: os.makedirs(somepath) except: print "dir allready exists" try: with open(filepath): // do something except: print "file doens't exist" As you can see on the examples above, which one would be more correct on python? Also, On which cases should i use try/except instead if/else ? I mean, should i replace all my if/else tests to try/except? Thanks in advance.
|
What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried: import os file_path = "/my/directory/filename.txt" directory = os.path.dirname(file_path) try: os.stat(directory) except: os.mkdir(directory) f = file(filename) Somehow, I missed os.path.exists (thanks kanja, Blair, and Douglas). This is what I have now: def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.path.exists(directory): os.makedirs(directory) Is there a flag for "open", that makes this happen automatically?
|
I have seen , but that question seems to be obsolete with the 11.10 version. Last week, I upgraded from 11.04 to 11.10. I am usually using gnome desktop clasic (without effects,also called the fail-safe), because my PC is very bad. Since the upgrade, everything is so slow. I also noticed that the temperature of the graphical chip* went from 30-40 C to 60 C, so my guess that the ubuntu 11.10 demands very powerful GPU. So, what can be done to improve the performances of ubuntu 11.10? Logging in using fail safe option is one thing, but it is not enough. *The temperature of the GPU can be seen from the nvidia-settings under the thermal settings.
|
What are your tips for improving overall system performance on ubuntu? Inspired by this I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster. This is not meant to be application specific (e.g. make firefox load pages faster), but system wide. Preferably 1 tip per answer, with enough detail for people to implement it. A couple of mine would be: Install (via Software Center or sudo apt-get install preload); Change value - "which controls the degree to which the kernel prefers to swap when it tries to free memory"; What are yours? PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.
|
My mini ipad was stolen, and I was wondering if they guessed my password and then reset my iPad would I still be able to get it back? Cause I know you can track it, lock it, erase iT, etc. But if they reset it, will it still work? How do I get it back then?
|
If I lose my iPhone, and I use remote wipe to prevent my confidential data from being stolen, then can I still use Find My iPhone to locate it on a map? I'm assuming not (since it resets to factory settings), but I wanted to double-check.
|
I am trying to access IIS through web but unable to do so. Basically I have a router (which functions as router and modem) that is given by ISP and I have another router connected to the router given by ISP. My ISP's router can be visited through 192.168.0.1 and the router that I connected to ISP's router can be visited through 192.168.1.1 Please see my ISP's router: As you can see I have DMZ enabled for my router of 192.168.1.1 Now please see my router of 192.168.1.1: As you can see I added a virtual server for port 80 where 192.168.1.125 is my private IP. I rebooted both of my modems an tried to visit my IP from: and after doing so, when I type my live IP I still see my router of 192.168.0.1 instead of my IIS. What am I missing? Note: I have disabled Firewall on both of the routers. Any help would be appreciated.
|
I am trying to access IIS through web but unable to do so. Basically I have a router (which functions as router and modem) that is given by ISP and I have another router connected to the router given by ISP. My ISP's router can be visited through 192.168.0.1 and the router that I connected to ISP's router can be visited through 192.168.1.1 Please see my ISP's router: As you can see I have DMZ enabled for my router of 192.168.1.1 Now please see my router of 192.168.1.1: As you can see I added a virtual server for port 80 where 192.168.1.125 is my private IP. I rebooted both of my modems an tried to visit my IP from: and after doing so, when I type my live IP I still see my router of 192.168.0.1 instead of my IIS. What am I missing? Note: I have disabled Firewall on both of the routers. Any help would be appreciated. EDIT: When I go to WAN in ASUS I see this: Does that help?
|
Looking at the On page 32, the datasheet says "The MPU-9250 always operates as a slave device when communicating to the system processor, which thus acts as the master. SDA and SCL lines typically need pull-up resistors to VDD. The maximum bus speed is 400 kHz." There's no information about what value pull up resistors to use. Doing a quick search on google for mpu9250 schematics I see this schematic It uses 10k resistors as pull ups. My question is whether this is accurate, and more importantly can I settle for 4.7k resistors since those are what I have lying around?
|
of the 24LC256 EEPROM states that: The SDA bus requires a pull-up resistor to VCC (typical 10 kΩ for 100 kHz, 2 kΩ for 400 kHz and 1 MHz). I thought that any resistor with a kΩ value would do the job (and it seems that my EEPROM works fine at different frequencies with a 10 kΩ resistor). My questions are: is there a correct value for pull-up resistors ? is there a law/rule to determine this value ? how do different resistance values affect the I²C data bus ?
|
I'm a bit paranoid and often want to download from https. Here's via http I could not find it via https. Actually I just need sha256sums via https, download itself don't care. My question is different to another question as I'm interested about ISO sha256sums and ISO itself. I also found that
|
Are repository updates secure? As a bear of little brain from the developer side, I cannot understand why the repository list is http://security.ubuntu.com and the other http(unsecured) sites listed in /etc/apt/sources.list. Without a certificate chain match this appears as "ask any responder for a list of packages to update" instead of "ask the ubuntu.com site..." Can any network choose to spoof the update sites, and is this a common practice to provide a locally cached and vetted copy?
|
I would like to be able to draw points in ArcMap using information provided by an Annexation Ordinance. I use ArcMap 10.3 with a Basic License Not having much experience in working with documents of this kind, the information is difficult for me to "translate" into something I can easily represent on a map. Here is a snippet from one of the documents: Surely there are tools in ArcMap that will make this process much easier on me. I am looking for a way to be able to type in those numbers and bearings and have the program drop a point or vertex there. Can someone explain an "easy" way of doing this?
|
Do you know of a way to take surveyor's calls from an excel file (for example: N35-45-15W 60.0 ft, etc) and have them generate polygon shapefiles point by point in GIS? I know you can easily do this with point features that have coordinates, but I am trying to figure out how to build full polygons (without XY coordinate information, just surveyor's calls).
|
I know how to plot an arbitrary curve using the smooth interpolation, but what I want is to add annotations similar to the ones in the image below in order to illustrate how the learning rate works.
|
I am trying to reconstruct this image here I am not very happy with the code, as it uses hacking and adding white boxes and alike. My problem is now how do I draw the somewhat arbitary function in the figure? I tried to do a polynomial fit, but that did not work. I got dimensions to large, would a spline solution work better? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{patterns} \usepackage{pgfplots} \pgfplotsset{compat=1.6} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=-0.1,xmax=5, xlabel={z}, ymin=0,ymax=4.5, xtick={2.5,4}, xticklabels={$v_1$,$v_2$}, ytick={2.5,3.5}, yticklabels={$u_1$,$u_2$}, xlabel={$u$}, ylabel={$v$}, axis lines=middle] \draw [fill=gray!40!white,thick,dashed] (axis cs:0,0) rectangle (axis cs:4,3.5); \draw [color=black,fill=white,thick,dashed] (axis cs:0,0) rectangle (axis cs:2.5,2); \draw [fill=black] (axis cs:0,0) rectangle (axis cs:0.01,4.45); \addplot+[black,thick,domain=0:5,no marks] {0}; % \node at (axis cs:2.5,0) [anchor=south west] {$A$}; \node at (axis cs:4,0) [anchor=south west] {$A'$}; \node at (axis cs:2.8,2.2) [anchor=north] {$B$}; \node at (axis cs:4.2,4) [anchor=north] {$B'$}; \node at (axis cs:0.25,2.5) [anchor=north] {$C$}; \node at (axis cs:0.25,4) [anchor=north] {$C'$}; \node at (axis cs:0,0) [anchor=south west] {$O$}; % \end{axis} \end{tikzpicture} \end{document}
|
According to Wolfram Alpha, $\int_{-\infty}^{\infty}\sin(x)dx$ does not converge. This makes no sense to me, intuitively, which I'll justify with a plot: As we see, the positive and negative areas 'cancel out', so, for any $\alpha \in \mathbb{R}$, $\int_{-\alpha}^{\alpha}\sin(x)dx=0$ (I'm just thinking geometrically- in no way is this supposed to be a rigourous justification). So, why is is that $\int_{-\infty}^{\infty}\sin(x)dx$ diverges? A natural and intuitive reason, more than a rigourous one, would be best. Thanks
|
I was determining whether $$\int_{-\infty}^{\infty} \sin x \, \mathrm{dx}$$ was divergent or convergent. So, I did the following steps: $$\begin{align} \int_{-\infty}^{\infty} \sin x \, \mathrm{dx} &= \int_{0}^{\infty}\sin x \, \mathrm{dx}+\int_{-\infty}^0\sin x \, \mathrm{dx} \\ &=\lim_{t\rightarrow\infty} \left(-\cos x |^{t}_{0}\right) + \lim_{a\rightarrow-\infty} \left(-\cos x |^{0}_{a}\right)\\ &=\lim_{t\rightarrow\infty} -\cos (t) + \cos 0 + \lim_{a\rightarrow-\infty} -\cos 0 + \cos a\\ &=\lim_{t\rightarrow\infty}1 - \cos t + \lim_{a\rightarrow-\infty} -1+\cos a \end{align}$$ Now, at this point, it would be reasonable to say that both the limits are undefined and therefore, the integral is divergent but then if I try something like the following \begin{align} \quad\quad&=\lim_{t\rightarrow\infty}1 -\cos t + \lim_{a\rightarrow\infty} -1+\cos a \\ \quad\quad&=\lim_{t\rightarrow\infty}-1 -\cos t + \lim_{a\rightarrow\infty} \cos a+1 \\ \quad\quad&=\lim_{b\rightarrow\infty}-1 +\cos b - \cos b+1 \\ \quad\quad&= 0 \end{align} So, as you can see, it was shown before that the integral is divergent but with some manipulation, we came at an answer of $0$ but is that valid? I assume, a similar technique can be applied to $\int_{-\infty}^{\infty} \frac{1}{x} \, \mathrm{dx}$.
|
We know that the ways to go from A to B in a $m×n$ rectangle is $\frac{(m+n)!}{m!n!}$. then find ways to go from $A$ to $B$ just by using this formula.(shortest way) My Attempt:I calculated the $4*4$ square ways there are 70 ways now we should reduce the ways that should'nt calculated.Can you help me please??
|
We know that the ways to go from A to B in a $m×n$ rectangle is $(m+n)!/m!n!$ I want a proof for this formula.(the way should be the shortest. My Attempt:There is a counting way that may help us. Every point is calculated by the sum of two adjacent points.
|
I am using JDK 1.8.0_231 and Apache-Tomcat-8.0.36. I am trying to upgrade Tomcat to version 9.0. After defining the app to use the new Tomcat version, I am getting a NullPointer exception exception when the app calls flushBatch(): java.lang.NullPointerException at org.apache.tomcat.websocket.PerMessageDeflate.sendMessagePart(PerMessageDeflate.java:322) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:284) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendMessageBlock(WsRemoteEndpointImplBase.java:258) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.flushBatch(WsRemoteEndpointImplBase.java:121) at org.apache.tomcat.websocket.WsRemoteEndpointBase.flushBatch(WsRemoteEndpointBase.java:48) This is the code where the app fails: private void sendMessage(String message, int attemptsNum) throws IOException { try { if (session.isOpen()) { RemoteEndpoint.Basic basicRemote = session.getBasicRemote(); basicRemote.sendText(message); basicRemote.flushBatch(); } } catch (IllegalStateException | NullPointerException | IOException e) { ... // handle exception code } } This error doesn't happen in Tomcat version 8.0.36.I also tried to use Tomcat 8.5.50, but got the same exception. Has anyone encountered this issue?
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
I am launching a high-altitude balloon as a part of a physics project I am working on. I know that the amount of helium I need corresponds to about 40 newtons of lift for the launch, which is all I need to know for practical purposes. But if I wanted to account for the ever-changing buoyant force on a weather balloon, I would need a calculus-based model, either an integral or some differential equation. From the derivation on Wikipedia, I have: $$ F_b = \oint \sigma dA $$ where $\sigma$ is the Cauchy stress tensor and $dA$ is the surface area in contact with the fluid, or of the latex balloon, in my case. I am an undergrad student and have virtually no knowledge of tensor calculus. Are there any other calculus-based models for buoyancy? If not, is numeric integration an appropriate strategy for this problem?
|
For a project into balloon simulation I'd like to know how the force on a balloon changes with altitude: I know that the Buoyant force on a balloon is: $F = (\rho_{air} - \rho_{helium})gV$ Using changing air density from the international standard atmosphere and changes in gravitational acceleration I can calculate the buoyant force and add this to the (negative) force of gravity mg. However I know that it isn't this simple, the balloon changes volume with altitude as the air pressure outside the balloon changes. I'd like to know how the balloon inflates - this would be a great help! I think it may be something to do with ideal gas laws - I can calculate air temperature and pressure from the international standard atmosphere but do I use pressure as the air pressure? - or air pressure minus balloon pressure?
|
I wrote this simple python function to calc: def isPrime(number): if number == 2: return True elif number > 1 and number % 2 != 0: for current in range(3, number): if number % current == 0: return False return True And I'm calling it to print out the sum of all prime numbers from 1 to 2 million, as in project However it's terribly slow, and I was wondering if I could tackle the same problem using generators? But I don't really understand generators in python completely.. Any help on how to solve this problem more efficiently would be appreciated! Thanks :)
|
Could someone please tell me what I'm doing wrong with this code? It is just printing 'count' anyway. I just want a very simple prime generator (nothing fancy). import math def main(): count = 3 one = 1 while one == 1: for x in range(2, int(math.sqrt(count) + 1)): if count % x == 0: continue if count % x != 0: print count count += 1
|
My friend pranked me by creating a batch file which opens a YouTube video and added it to the startup folder, so that the batch file launches every time I log in. This is what he wrote in the batch file: TIMEOUT 1 start /min https://www.youtube.com/watch?v=Kob0G2hE8IY On top of that, he scheduled the batch file to run every 10 minutes using Task Scheduler. This is done on a Windows PC. So my question is, how do you do the same thing on a Mac?
|
I want to automatically start my MongoDB Server at startup. The command for it is mongod --dbpath="/Users/prateek/Desktop/Mongo Database" How do I configure this in Mac OSX El Capitan? Note - I have installed MongoDB using Homebrew
|
I'm struggling to solve this problem: Let $f$ be a continuous function defined on $[0,+\infty[$, derivable in every point such that $$ f'(x)=2f(2x)-f(x), \ \ \ \ \ \ \forall x>0, $$ and $$ M_n=\int_{0}^{\infty}x^nf(x)dx<+\infty, \ \ \ \ \ \ \forall n\in\Bbb{N}. $$ Prova that exists a non zero function that satisfies this conditions. For which sequences of real numbers $\{a_n\}$ it's true that $a_n=M_n, \ \ \forall n\in\Bbb{N}$. All I managed to get is that $$ M_n=n!\prod_{i=1}^{n}\frac{2^i}{2^i-1}M_0=n!\prod_{i=1}^{n}\frac{2^i}{2^i-1}\int_{0}^{\infty}f(x)dx. $$
|
Show that there is at least a nonzero function $f$, differentiable on $[0,+\infty)$, satisfying $$f'(x)=2f(2x)-f(x) \qquad \forall x>0 $$ $$M_n:=\int_{0}^{\infty}x^nf(x)dx<\infty \qquad \forall n\in \mathbb{N} $$ My best idea so far is to assume that the solution is a power series, i.e. $$ f(x)=\sum_{n=0}^{\infty}a_nx^n\qquad \forall x>0$$ Then the equation becomes $$ \sum_{n=0}^{\infty}na_nx^{n-1}=2\sum_{n=0}^{\infty}a_n2^nx^n-\sum_{n=0}^{\infty}a_nx^n$$ equating all the coefficients of the same degree I get $$na_n=(2^{n}-1)a_{n-1}\qquad \forall n\geq 1$$ So setting $a_0=1$, I get $$a_{n}=\frac{1}{n!}\prod_{k=1}^{n}(2^k-1) \qquad \forall n$$ But does the power series actually converge? Using Hadamard's formula, and that $2^{k}-1\geq 2^{k-1}$, $$ |a_n|^{1/n}\geq\frac{1}{(n!)^{1/n}}\left[2^{n(n-1)/2}\right]^{1/n}\sim\frac{e}{n(2\pi n)^{1/2n}}2^{(n-1)/2}\to \infty$$ so the radius of converge of the series is $0$, so it doesn't actually define a solution on $[0,+\infty)$.
|
Can someone please elaborate on Gradient Descent vs Newton's Method? I am studying for my ML exam tomorrow and saw this as a bullet point but cannot find many great answers. Can anyone fill me in some details on the both of these, as deep as you would like to go.
|
This is something that has been bugging me for a while, and I couldn't find any satisfactory answers online, so here goes: After reviewing a set of lectures on convex optimization, Newton's method seems to be a far superior algorithm than gradient descent to find globally optimal solutions, because Newton's method can provide a guarantee for its solution, it's affine invariant, and most of all it converges in far fewer steps. Why is second-order optimization algorithms, such as Newton's method not as widely used as stochastic gradient descent in machine learning problems?
|
How to evaluate the following limit? $$\lim_{x \to 0}\frac{(1+x)^{1/x} - e}{x}.$$
|
I tried to evaluate $$\lim_{x\to0}\frac{(1+x)^{1/x}-e}x$$but all my efforts were in vain . L'Hospital rule becomes very complicated.
|
I always thought just plain "present" was proper, but apparently my Filipino teacher prefers "I'm here" which sounds really odd. What's the normal way to say you're present during a headcount, especially in a class?
|
I have two questions. In the UK, to do (or is it read?) a roll call is commonly referred to as "calling out the register". It's been so long since I was a child that I'm not absolutely sure how students responded. I think it was "Present, miss/sir" I also seem to remember students just raising their hands. Are there different responses in the rest of the English speaking world? Secondly, I am experiencing difficulty in pronouncing roll call. I can say each word separately without any trouble but when I join the two together it sounds as if I'm saying "rolkol"; "rolekol" or "rol kol" I've looked in and but neither have the pronunciation. Should I pronounce roll in "roll call" as /rəʊl/ or /roʊl/? EDIT It seems responding to the roll call with "present" has become dated both in the UK and the US whether it holds true for Canada and Australia is unknown. Apparently, British students responded with "Yes, miss/sir" until the 70s but now the simple, "Here" is heard on both sides of the Atlantic. The Longman Contemporary English Dictionary, claims that is old fashioned in the UK, but I wonder if that really is the case, and whether in the US "calling the roll" is becoming dated as suggested by the Google Ngram chart in @bib's answer.
|
I've been reading about WhatsApp getting "end-to-end" encryption, and when reading about it, I've notice something. If I want to send a message from cell $A$ to cell $B$, since there's a public key, I will pass my message through this "algorithm" and send to the cell $B$. My question is, knowing the public key doesn't automatically gives you power to reverse engineer the message sent? How is that possible that knowing the algorithm that created a code and the code itself doesn't get you the original information?
|
I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works. How does it encrypt something with one key and decipher it with another key?
|
Let $p:E \rightarrow X$ be a covering space. It is well known that if $X$ is connected, then all the fibers have the same cardinality. This can be seen as a simple consequence of the fact that the cardinality of $p^{-1}(x)$ is a locally constant map. My question is, assuming $E$ is path-connected, how can I prove that all the fibers have the same cardinality? Can somebody help me? Thanks. -- EDIT -- Idea : If $E$ is path connected, then $X$ is connected and we're done. To see that $X$ is connected, let $x,y\in X$ and let $x_{0}\in p^{-1}(x)$ and $y_{0}\in p^{-1}(y)$. Since $E$ is path connected, let $\sigma$ be a path connecting $x_{0}$ to $y_{0}$. Then, $p\circ\sigma$ is a path connecting $x$ to $y$. Thus, $X$ is path connected and hence, connected.
|
In "Knots and Primes: An Introduction to Arithmetic Topology", the author uses the following proposition Let $h: Y \to X$ be a covering. For any path $\gamma : [0,1] \to X$ and any $y \in h^{-1}(x) (x = \gamma(0))$, there exists a unique lift $\hat{\gamma} : [0,1] \to Y$ of $\gamma$ with $\hat{\gamma}(0) = y$. Furthermore, for any homotopy $\gamma_t (t \in [0,1])$ of $\gamma$ with $\gamma_t = \gamma(0)$ and $\gamma_t(1) = \gamma(1)$, there exists a unique lift of $\hat{\gamma_t}$ such that $\hat{\gamma_t}$ is the homotopy of $\hat{\gamma}$ with $\hat{\gamma_t}(0) = \hat{\gamma}(0)$ and $\hat{\gamma_t}(1) = \hat{\gamma}(1)$. The author then follows with; "In the following, we assume that any covering space is connected. By the preceding proposition, the cardinality of the fiber $h^{-1}(x)$ is independent of $x \in X$." I am not sure why this results is true. This is my attempt at explaining it to myself. Take two different $x_1, x_2$ and their fibers $h^{-1}(x_1), h^{-1}(x_2)$ such that $y_1 \in h^{-1}(x_1)$ and $y_2 \in h^{-1}(x_2)$. Take two paths $\gamma_1, \gamma_2$ such that $\gamma_1(0) = x_1$ and $\gamma_2(0) = x_2$. Then we get two lifts $\hat{\gamma_1}, \hat{\gamma_2}$ with $\hat{\gamma_1}(0) = y_1$ and $\hat{\gamma_2}(0) = y_2$. Now, since our covering space is connected we can continuously deform $\hat{\gamma_1}$ into $\hat{\gamma_2}$ and conclude that every elements in $h^{-1}(x_1)$ is also in $h^{-1}(x_2)$ and vice versa. I feel that this is wrong but cannot figure out the right way to see this. Any help would be appreciated.
|
I've provided an extremely simplified version of the code which reproduces the error. class Shape { public: virtual void func()=0; }; class Circle : public Shape { public: Circle() { } void func() { } }; class Square : public Shape { public: Square() { } void func() { } }; int main() { Circle c; std::vector<Circle> circs; std::vector<Shape*> shapes; shapes.push_back(&c); circs.push_back(shapes[0]); //ie, the Circle object that was just pushed into the 'shapes' vector. } I know that as of right now, this is functionally useless, and that I could just push the Circle object to the vector - however, in keeping with the shape analogy, my project also has triangles, squares, etc. I process data using a function which accepts Shape& as a parameter, so that I can send all shapes to one function, instead of separate functions for each shape. That's besides the point, but gives insight into why I'm doing what I'm doing in the simplified code. The last line in this code will not work. Could anyone tell me why? Or provide me with a solution/work-around? Is this considered bad programming-style? EDIT: So I've solved the Object Slicing issue I was having. For anyone with the same issue, look at fgp's answer in the following thread: I used the following to help allow what I was trying to do (Move a Circle object to a Shape*, compute some things, then push the Circle (which is in the Shape* vector), to its final resting place, a Circle vector: class Shape { public: virtual Shape& operator=(const Shape& s) { assign(s); return *this; } virtual std::string getName() = 0; virtual int getEdges() = 0; protected: std::string name; int edges; void assign(const Shape& s) { this->name = s.name; this->edges = s.edges; } }; class Circle : public Shape { private: int radius; public: Circle() { name = "Circle"; edges = 1; } Circle(int rad) { name = "Circle"; edges = 1; radius = rad; } virtual Circle& operator=(const Shape& s) { if (const Circle* c = dynamic_cast<const Circle*>(&s)) assign(*c); else{ std::cout << "BAD ASSIGNMENT IN CIRCLE."; //THROW ERROR HERE INSTEAD OF THE ABOVE COUT } return *this; } std::string getName() { return name; } int getEdges() { return edges; } int getRadius() { return radius; } void setRadius(int r) { radius = r; } protected: void assign(const Circle& c) { Shape::assign(c); this->radius = c.radius; } }; int main() { std::vector<Shape*> shapes; std::vector<Circle> circs; Circle c2(5); //Creates a circle with 5 for the radius. shapes.push_back(&c2); //Pushing the 5-radius circle into the Shapes* vector Circle c3; //Creates a circle with default constructor (which does NOT define radius) c3 = *shapes[0]; //Now, the overloaded assignment operator. Look at Circle::assign(const Shape&) function circs.push_back(c3); //We push our newly assigned circle to our Circle vector std::cout << "c3 radius: " << circs[0].getRadius(); //This will be 5! } It was a pleasant surprise to see this work! c3 will now know about c2's radius, showing that the overloaded assignment operators work for a Shape->Circle conversion. If anyone has some suggestions, please let me know! (I will be creating a Circle constructor that takes a (const Shape&) param, so I can use Circle c = *shapes[0], instead of having to separate the lines since it cannot find a constructor that accepts that parameter). EDIT2: Also, if you use this, make sure you throw an error (I left a comment where you should).
|
Someone mentioned it in the IRC as the slicing problem.
|
How to solve this : $$ \prod^{\infty}_{n=2}(1-\frac{1}{n^2}) $$ We can write it as follows : $$ \prod^{\infty}_{n=2}\frac{(n-1)(n+1)}{n^2} $$ How can we proceed further please guide.. thanks..
|
Evaluate the infinite product $$\lim_{ n\rightarrow\infty }\prod_{k=2}^{n}\left ( 1-\frac{1}{k^2} \right ).$$ I can't see anything in this limit , so help me please.
|
I'm using XeLaTeX to build my homework but the commas and the parentheses are all messed up. Could someone explain this? Source code: 4). $(1,5,6,2,3,10,4,7,1)$ is a cycle of length 8. 5). Since $\{3,4\}$ is not an edge and $(3,10,4)$ is a path, the length of a shortest path from 3 to 4 is 2. 6). The vertices you can travel to from 8 within 2 edges are 2, 3, 9, 10. Since $(8,3,2,7)$ is a path, the length of a shortest path from 8 to 7 is 3. 7). $(4,7,1,5,2,6)$ is such a path.
|
I just updated my TeX live installation (tlmgr update --all) and now I get some wrong symbols in math mode if I use XeLaTeX or LuaTeX. This MWE for example \documentclass{standalone} \begin{document} $. + , - / $ \end{document} produces the following output: I suppose it is a bug in the new Latex2e version from 2016/02/01. Any ideas how to fix this? EDIT: Adding \usepackage{fontspec} produces a different output. But it is still not perfect.
|
I have following code: class Ideone { public static void main (String[] args) throws java.lang.Exception { CharSequence cs = "5.00"; double danswer = 5.0000; DecimalFormat df = new DecimalFormat("#.00"); if(cs.toString() == String.valueOf(df.format(danswer))) { System.out.println("person"); } else { System.out.println("False"); } } } Why am i not able to compare in this case? As both are string values? How can i compare the values in this case?
|
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
|
I think there are two boolean type we can use bool and BOOL. What's the difference between those two? bool contains true and false; BOOL contains TRUE and FALSE, can they be interchangeable?
|
I saw the "new type" BOOL (YES, NO). I read that this type is almost like a char. For testing I did : NSLog(@"Size of BOOL %d", sizeof(BOOL)); NSLog(@"Size of bool %d", sizeof(bool)); Good to see that both logs display "1" (sometimes in C++ bool is an int and its sizeof is 4) So I was just wondering if there were some issues with the bool type or something ? Can I just use bool (that seems to work) without losing speed?
|
I have a Dell Vostro 1550 laptop with an Intel Core i3 processor running Ubuntu 12.04 64-bit. It shows me the error message: (initramfs) Unable to find a medium containing a live file system. in BusyBox, and it also says: Enter 'help' for a list of built-in commands.
|
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
|
Given two square matrices $A, B$, when is $$\det(A+tB) = 0$$ for all $t\in \mathbb{R}$? An easy sufficient condition is that $A$ and $B$'s kernels have nontrivial intersection. Per Henning's comment below, this is not also necessary. Does there exist a nice necessary and sufficient characterization?
|
I'd like to know if the following problem of elementary linear algebra is already solved / solvable. For two (singular) $n\times n$ matrices $P$ and $Q$, if $\det(\lambda P+\mu Q)=0$ for any $\lambda,\mu\in\mathbb{R}$, what are conditions on $P$ and $Q$?
|
When you (that is, you and not somebody else) suggest an edit to a tag wiki the counter on the suggested edits tab on the review page is increased by one. This seems to be wrong if the function of the counter is to inform of the number of edits you can act on. When you suggested an edit of a tag wiki then you cannot, and rightly so, review that very edit (when you enter the suggested edits page your suggested edit does not appear there).
|
On the new History beta site I have the privilege to approve tag edits already but my own edits still go into the review queue. And the review dashboard displays a different number of pending edits depending on where I am: on I see one pending edit, on I see none. I am pretty sure that the pending edit being displayed is my own - I edited a tag wiki and that edit hasn't been approved yet. It shouldn't be counted no matter where I am.
|
There is a long line of people waiting outside a theatre to buy tickets. The theatre owner comes out and announces that the first person to have a birthday same as someone standing anywhere before him in the line gets a free ticket. Where will you stand to maximize your chance?
|
At a movie theater, the whimsical manager announces that a free ticket will be given to the first person in line whose birthday is the same as someone in line who has already bought a ticket. You have the option of choosing any position in the line. Assuming that you don't know anyone else's birthday, and that birthdays are uniformly distributed throughout the year (365 days year), what position in line gives you the best chance of getting free ticket?
|
I have trouble understanding this, for example:- I have tried connecting to google server(via http process) and also tried connecting to Youtube(again http process), will different sockets be created for each connection? if i have different sockets, will port numbers be different since a socket is a combination of IP and port and IP here is fixed(my computer)?
|
This was a question raised by one of the software engineers in my organisation. I'm interested in the broadest definition.
|
Just as the title says, I have a mini icon when I open Terminal: I would like to hide it if at all possible.
|
I'm trying to hide the app icon from the title bar in GNOME in Ubuntu 18.04. I know there is asking the same thing but it's from 2011 and I can't find what it requires to find in the shell css. I'm also using the Arc-Dark custom theme. Here are two examples of what I want to remove: To be clear, I don't want to resize it to fit, I want to straight away remove it completely.
|
Let $f(x)$ be defined and continuous on the interval $[a,b]$ and differentiable on $(a,b)$. Prove that there is at least one number $c$ such that $$\frac{af(a)-bf(b)}{a-b}=f(c)+cf'(c).$$
|
Let $f(x)$ be differentiable at $(a,b)$ and continuous at $[a,b]$ prove that there exist $ c \in (a,b)$ such that: $$ \frac{af(a)-bf(b)}{a-b} = f(c) + cf'(c) $$ I started with: let $c \in (a,b) $ $$ f'(c) = \frac{f(b)-f(a)}{b-a} $$ But I have no clue how to continue from here, how can I transform it to this form? :S Any suggestions?
|
I read this answer and didn't like it, so I downvoted. I also commented why I left the downvote. Later, the user edited the post to such a degree that I'm willing to revert the downvote (though I still won't upvote). However I can't because: You last voted on this answer 22 mins ago Your vote is now locked in unless this answer is edited But the user did edit?
|
A little background: I do not know what the specifics are, but I've noticed that a quick edit after a post will often times not result in an edit being posted. It's as if there was no edit. Edit: According to Bart this amount of time is five minutes. The problem: A user made a really bad post (said that ~ in C# wrt integers was used for deconstruction). I down-voted said post. Post quickly disappeared (I guess poster realized they screwed up and took back the post). Later, I come back and see my down vote but the answer is now correct (that ~ is the bitwise complement operator). I try to get rid of my down vote because it is no longer appropriate. However, it has been about half an hour and there is no edit posted (presumably the poster made an edit within the non-posting edit window) so I can't take my vote back. Suggested solution: If post gets edited (even within the non-post edit window) mark all the votes as changeable. I would guess that this would either involve an update on a table of votes or adding a column for last edit time which is not bypassed by the grace period. I realize that this may be an entirely non-trivial change, but unless the non-posting of edits is somehow changed to make sure the edit was trivial it seems this is necessary.
|
I have no idea what I am doing here. I was given an IBM ThinkPad with an outdated Ubuntu OS and could not figure out how to upgrade, so I simply downloaded the new 14.04.1-desktop-amd 64 ISO. The download completed. There is an icon on the desktop. But being a PC user for all my computer life... I cannot for the life of me figure out how to install this OS! Can anyone help me?
|
I would like to see a full how-to guide on how to install Ubuntu.
|
I have a command path/to/forticlientsslvpn_cli --server <host>:<port> --vpnuser testpass\101 When I run the script, linux puts a space between testpass and 101. I want the script to see "testpass\101" as the username I hope I make sense
|
I copied a file to my Ubuntu vm with a backslash in the name, and I cannot figure out how to rename the file, e.g. mv .\Dockerfile Dockerfile -- the command line does not like that syntax for the filename but I'm not sure how to escape the .\Dockerfile
|
I want to prove that $(2,4)$ is the only natural solution to $x^y=y^x$. I tried to prove by defining $d=\gcd(x,y), x=d*s, y=d*r$ for some $s$, $r$. Using some algebra, I got that s must be equal to 1. I don't know how to continue from here. My steps: ${ds}^{dr}={dr}^{ds} ->$ $d^rs^r=d^sr^s ->$ $d^{r-s}s^r=r^s ->$ there for $s|r^s$, and because $\gcd(s,r^s)=1$ must be $s=1$.
|
We know that $2^4 = 4^2$ and $(-2)^{-4} = (-4)^{-2}$. Is there another pair of integers $x, y$ ($x\neq y$) which satisfies the equality $x^y = y^x$?
|
I have sample size of 51, number of levels is 71. I used One-way Repeated Measures Anova in SPSS. But, Mauchly's test of sphericity fails to give me a significant value (it gives "." result). Why? Can I still use the result of Greenhouse-Geisser significance test?
|
I'm doing a two-way between-within ANOVA in SPSS. I have two groups with 9 subjects each (so total = 18), and 24 levels of one repeated measure. I understand why Mauchly's test of Sphericity has no meaning when there are are only 2 levels of a repeated measures factor, but I notice (using General Linear Model.....repeated measures in SPSS) that Mauchly's test of Sphericity also appears to be undefined (or gives the useless output of Mauchly's W = '.0' , p = '.') when the number of levels of a repeated measure is equal to or greater than the number of cases (subjects). In these instances, even though Mauchly's statistic is not calculated, Greenhouse-Geisser, Huynh-Feldt, and Lower-Bound Epsilon values are calculated. I would be really happy if someone could provide some insight on why Mauchly's statistic is not calculated in these cases and what should be done to assess sphericity in the absence of Mauchly's statistic.
|
I installed ubuntu on my laptop, there was no option to install it alongside windows 8 so i took the something else option and went to te partitioning option, and took the /sda/devca5 and then 1 tb partitiion hard drive. now my windows are not running, i cannot even refresh my windows to earlier point. how can i uninstall ubuntu
|
I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.
|
I have been trying to do a bulk load of accounts in salesforce and it keeps triggering the following error UpdateCSMTeam:execution of AfterInsertcaused by: System.DmlException: Insert failed. First exception on row 0 with id00rJ000003iFSruIAG; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]Class.UpdateCSM.updateTeam Mem Below I'm including the class and the trigger referenced. APEX CLASS (Update CSM) public class UpdateCSM { public static void updateTeamMember(List<Account> accounts) { SObject[] sobs = new SObject[] {}; for (Account a : accounts) { if (a.Customer_Success_Manager__c != null) { sobs.add(new AccountShare( AccountId = a.Id, OpportunityAccessLevel = 'Edit', CaseAccessLevel = 'Edit', AccountAccessLevel = 'Edit', UserOrGroupId = a.Customer_Success_Manager__c)); } for (Account acc : accounts) { if (acc.Customer_Success_Manager__c != null) { sobs.add(new AccountTeamMember( AccountId = acc.id, UserId = acc.Customer_Success_Manager__c, TeamMemberRole = 'Customer Success Manager')); } } insert sobs; } } } APEX TRIGGER (UpdateCSMTeam) trigger UpdateCSMTeam on Account (After update, After insert){ UpdateCSM.updateTeamMember(trigger.new);}
|
I have a trigger and a class that seem to be causing an insert fail in Dataloader. I am trying to insert 200 records to see if an error is generated before moving these to production. I'm just inserting the mandatory fields such as Name, Owner, Market, Customer_Success_Manager__c, and Business Unit. Each time I get an error: UpdateCSMTeam:execution of AfterInsertcaused by: System.DmlException: Insert failed. First exception on row 0 with id01MJ0000009gXthMAE; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id]Class.UpdateCSM.updateTeamMem . I've listed the class and trigger below. APEX CLASS public class UpdateCSM { public static void updateTeamMember(List<Account> accounts) { List<AccountShare> ashareLIST = new List<AccountShare>(); List<AccountTeamMember> ATM = new List<AccountTeamMember>(); Set<String> rmMember = new Set<String>(); Map<ID, ID> acctToBRepMap = new Map<ID, ID>(); for(Account a:accounts){ AccountShare caSharingRule = new AccountShare(); caSharingRule.AccountId = a.Id; caSharingRule.OpportunityAccessLevel = 'Edit'; caSharingRule.CaseAccessLevel = 'Edit'; caSharingRule.AccountAccessLevel = 'Edit'; caSharingRule.UserOrGroupId = a.Customer_Success_Manager__c; ashareLIST.add(caSharingRule); if(a.Customer_Success_Manager__c!= null){ AccountTeamMember Teammemberad=new AccountTeamMember(); Teammemberad.AccountId=a.id; Teammemberad.UserId=a.Customer_Success_Manager__c; Teammemberad.TeamMemberRole = 'Customer Success Manager'; ATM.add(Teammemberad); if(!ATM.isEmpty()){ insert ATM; insert ashareLIST; if(a.Customer_Success_Manager__c==null){ list<AccountTeamMember> ratm = [SELECT UserId FROM AccountTeamMember WHERE (TeamMemberRole = 'Customer Success Manager') AND AccountId =:a.id]; if(ratm.size()>0) delete ratm; } } } } } } ... APEX TRIGGER trigger UpdateCSMTeam on Account (After update, After insert){ UpdateCSM.updateTeamMember(trigger.new); }
|
How can all events be causally related if there is no initial event?
|
For a number of reasons — including perhaps a desire to feel that we have a complete understanding of where we came from, or at least an understanding which is completely sufficient for all of our purposes — there is a strong tendency to suppose that an infinite regress of causes and effects is impossible. We see this for instance in the . Traditionally in Greco-Roman influenced philosophy, this prime mover has been identified with the notion of a creator god. A more modern formulation comes from the Big Bang theory, which (although we study the question) happened for no reason that we know of; and perhaps occurred for no reason at all. Indeed, if time is a property of the universe, a good argument can be made that . At the same time, we have gotten a lot of leverage in science from the ideas that everything happens for a reason, i.e. because it is caused by something else. This is sometimes described as the . Aristotle also applies this idea, except that the first mover is made an exception, something which exists literally for no reason. Indeed, the emotionally negative way that "no reason" is used in common speech, as something groundless and irrational, indicates how widespread the feeling is that the idea of uncaused events is deeply dissatisfying. Almost all of our modes of critical thinking are infused with both of these ideas: that we may work from first principles, a definite starting point, counting up from zero (or one, historically); but also that we may trace the causes of things to some point, and then later ask how that starting point came to be. But the two ideas are themselves in conflict. Which is true — that infinite causal chains are impossible? Or that they are necessary? Or are they perhaps possible without being necessary? Related questions:
|
Between which two consecutive integer numbers is $\sqrt{2}+\sqrt{3}$? My thoughts: $\sqrt{2}$ is $\approx1,4$ and $\sqrt{3}$ is $\approx{1,7}$ so their sum must be of the interval $(3;4)$. Any more strict approaches? Thank you in advance!
|
How prove that $ \sqrt{2}+\sqrt{3}>\pi$? Maybe some easy way?
|
There are claims that OOP design patterns are irrelevant in functional languages. Are there code demos how each pattern can be implemented in Haskell? In particular, complete demo would also have to show how to represent objects, OO polymorphism etc.
|
Since I started learning and last year, I've read a huge number of articles which insist that design patterns (especially in Java) are workarounds for the missing features in imperative languages. One article I found : Most people I've met have read by the Gang of Four (GoF). Any self respecting programmer will tell you that the book is language agnostic and the patterns apply to software engineering in general, regardless of which language you use. This is a noble claim. Unfortunately it is far removed from the truth. Functional languages are extremely expressive. In a functional language one does not need design patterns because the language is likely so high level, you end up programming in concepts that eliminate design patterns all together. The main features of functional programming (FP) include functions as first-class values, currying, immutable values, etc. It doesn't seem obvious to me that OO design patterns are approximating any of those features. Additionally, in functional languages which support OOP (such as F# and OCaml), it seems obvious to me that programmers using these languages would use the same design patterns found available to every other OOP language. In fact, right now I use F# and OCaml every day, and there are no striking differences between the patterns I use in these languages vs. the patterns I use when I write in Java. Is there any truth to the claim that functional programming eliminates the need for OOP design patterns? If so, could you post or link to an example of a typical OOP design pattern and its functional equivalent?
|
When a portable version of a Windows 7 application is not available, what is an effective way to test it out to see if you like it? I define effective as: Not time consuming Leaves no (or minimal) files and folders behind if uninstalled Leaves no (or minimal) registry entries changed or added if uninstalled Does not remove files or registry entries that were present before evaluating the application I used to take a registry and file structure snapshot before and after trying out any application, and then compare everything after the install or uninstall. This did not satisfy #1 above, and required many judgement calls, especially for registry entries. I then switched to creating System Restore points. But I'm always concerned they will mess something up. And after installing the (disappointing and misleading) free version of Microsoft OneNote 2013, and then removing it by restoring a System Restore point, there was still a significant amount of cleanup that had to be performed by hand (as well as a bunch of new \Windows\assembly folders that I'm really not sure if I should delete). I would prefer a free (as in no cost) solution. The solution can use tools built into Windows 7 or not. The solution must be legal, and must work on a system on which the Windows 7 operating system was pre-installed by the manufacturer (no Windows installation disks included). If the answer includes setting up a VM, please ensure that it will work with this condition. Technically, if the answers others post use tools and techniques that are built into the OS, then this question belongs here in the Superuser site, and if the answers use tools that are not built into the OS, then this question belongs on the Software Recommendations SE site. Since there will likely be complaints if it is crossposted, and I can't predict the answers, I'll post the above question here. If the mods want to crosspost it, they have my permission to do so.
|
I'm looking for Windows 7 software that will allow me to quickly create a "checkpoint", do whatever I might need to do to my computer - install programs/drivers/updates, create/delete personal files, reboot the system multiple times, open questionable attachments - and then revert the entire system back to when the checkpoint was created. Essentially I want Windows Restore Points that save my personal files and partitions, too. It sounds like disk imaging might be the ticket, but creating them is much too slow and the restore process too involved... I'm hoping to sacrifice full disaster recovery for speed. Creating a checkpoint should be as close to one-click as possible, and rolling back should be a matter of selecting a restore point and rebooting. Ding! I'm familiar with Sandboxie, True Image Home "Try and Decide", Returnil, and a number of other "virtual system" apps that actively "catch" changes and allow you to commit or reject them. I'm not interested in these for a number of reasons - I prefer the "cut and dry" restore point approach. Finally, I'll note that I've just recently become aware of . It sounds absolutely perfect, however, a quick skim through the user forums show more than a few horror stories of corrupted, unbootable systems. Any positive personal experience with the software to suppress my superstitions, or suggestions for more established alternatives would be greatly appreciated - Comodo Time Machine seems relatively new. I'm willing to purchase unbloated, quality software. Thanks for your help!
|
To be more specific: Let the random variable X be distributed according to probability density function f(x). Then the pdf of Y=1/X is given by g(y)=1/y^2 f(1/y), . I wonder if there is any citable reference for that. Or is it common knowledge? I'm coming from a different field of mathematics and lack some background in statistics. I looked through some text books, but didn't find any mention of it yet. Thanks a lot!
|
Suppose $X$ is a random variable with pdf $f_X(x)$. Then the random variable $Y=X^2$ has the pdf $$f_Y(y)=\begin{cases}\frac{1}{2\sqrt{y}}\left(f_X(\sqrt{y})+f_X(-\sqrt{y})\right) & y \ge 0 \\ 0 & y \lt 0\end{cases}$$ I understand the calculus behind this. But I'm trying to think of a way to explain it to someone who doesn't know calculus. In particular, I'm trying to explain why the factor $\frac{1}{\sqrt{y}}$ appears out front. I'll take a stab at it: Suppose $X$ has a Gaussian distribution. Almost all the weight of its pdf is between the values, say, $-3$ and $3.$ But that maps to 0 to 9 for $Y$. So, the heavy weight in the pdf for $X$ has been extended across a wider range of values in the transformation to $Y$. Thus, for $f_Y(y)$ to be a true pdf the extra heavy weight must be downweighted by the multiplicative factor $\frac{1}{\sqrt{y}}$ How does that sound? If anyone can provide a better explanation of their own or link to one in a document or textbook I'd greatly appreciate it. I find this variable transformation example in several intro mathematical probability/stats books. But I never find an intuitive explanation with it :(
|
I'm looking for a textbook or online notes or a review article etc on a rigerous formulation of Lagrangian mechanics. I'm well aware of the book by Arnold but I would like something to accompany it. Perhaps something a bit more recent. There are a few things I would like it to have. At least as much differential geometry as Arnold. Even better would be a dedicated section on DG at the start to cover everything needed to read the book. It must use local coordinate systems and not try to do everything in a coordinate free way. The book Foundations of Mechanics by Abraham and Marsden doesn't use local coordinates (and focuses on Hamiltonian mechanics more so than Lagrangian). The book by Spivak is nice too and but there's something about it that doesn't quite suit me.
|
I am a graduate student in mathematics who would like to learn some classical mechanics. However, there is one caveat: I am not interested in the standard coordinate approach. I can't help but think of the fields that arise in physics as sections of vector bundles (or maybe principal bundles) and would love an approach to classical mechanics or what have you that took advantage of this. Now for the questions: Is there a text book you would recommend that phrases the constructions in classical mechanics via bundles without an appeal to transition functions? What are the drawbacks to this approach other than the fact that it makes computations less doable? (if it does that) Are there benefits to thinking about things this way, ie would it be of benefit to someone attempting to learn this material to do it this way?
|
I have Skype installed which I got from the Canonical Partners repository, however after reading I have come to understand that I can get this latest Alpha version from a repository too though no such update has come to me via the partner repository I have activated. So I have several questions on this matter: So from which repository (unless that was just a mistake in the article) do I get it from? Is it available under a different name in the partner repository, or is there another official Skype repository? If it is the case that there is a more official repository to get this from then when it is no longer Alpha but instead Stable, will I be able to upgrade to it via the partner repository I currently have enabled or is it no longer support in there? I am running Ubuntu GNOME 16.04 with GNOME 3.20.
|
I want to install Skype, but I can't locate it in Software Center or by using Synaptic Package Manager. Can anyone help me?
|
Using the Texture Coordinate node, the Camera output almost does it, but there are some weird seams that form: . The Window output works better, but it squishes it based on the width height ratio. The "solution" provided in another is not exactly good. Node setup:
|
I tried using Window Texture coordinate, but it changes scale if I zoom in or out. The Camera Texture coordinate works in with orthographic camera but gets distorted if I use perspective camera. I want the texture to have a fixed scale and not be distorted like on orthographic mode.
|
So I burned ubuntu 16.04 on a live CD. I have a UEFI motherboard, when I booted Ubuntu, it shows the loading screen, then it goes black, not responding at all. I tried a Linux Mint disc, and it just worked fine. But Ubuntu Live CD just refuses to boot up. What I did so far: Turned Fast Boot Off Turned Fast Startup off in Windows. Turned Secure Boot off. Turned iGPU off. (I run two monitors, one in the GPU and one in the iGPU) System specs if needed: core i3 4130 8 GB of RAM GTX 750 Ti Gigabyte GA-H81M-HD3
|
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
|
Find the infinite sum: $\frac{1}{(1)(2)}+\frac{1}{(3)(4)}+\frac{1}{(5)(6)}+\cdots$. I thought of expanding it as $\frac{1}{1}-\frac{1}{2}+\frac{1}{3}- \cdots$, but it would yield nothing useful as this runs into the non-convergence issue.
|
I know that the harmonic series $$\sum_{k=1}^{\infty}\frac{1}{k} = \frac{1}{1} + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5} + \frac{1}{6} + \cdots + \frac{1}{n} + \cdots \tag{I}$$ diverges, but what about the alternating harmonic series $$\sum_{k=1}^{\infty}\frac{(-1)^{k+1}}{k} = \frac{1}{1} - \frac{1}{2} + \frac{1}{3} - \frac{1}{4} + \frac{1}{5} - \frac{1}{6} + \cdots + \frac{(-1)^{n+1}}{n} + \cdots \text{?} \tag{II}$$ Does it converge? If so, what is its sum?
|
Consider $S \in \mathbb{N}$ where $\mathbb{N}$ is the set of natural numbers. I want to obtain $S$ by summing $k$ natural numbers strictly positive. I want to find how many possibilities I have to obtain $S$ by summing $k$ numbers, considering that: 1) order does not matter, e.g. $2+1+3$ is the same as $3+1+2$ 2) repetitions are allowed
|
I want to find the sum of all combination of numbers whose sum is x, for e.g. when x = 3 f(x) = countOf(111,12,21,3) = 4
|
I am setting up a server using Ubuntu Server 16.04 and I have 5 GB of free space on my drive that I want to partition into space used for installing the system. What option should I select under "How to use this partition:"? These options include (but are not limited to) Ext4 journaling file system, FAT16 file system, EFI System Partition and Reserved BIOS Boot Area. There are 15 options, including "do not use the partition". Which should I select?
|
I would like to make a new installation of Lubuntu Core I will use only Lubuntu Core on this machine. I use a I will have very few files on HDD, some poor quality movies and some documents. I would like to partition the HDD like this: HDD 250 GB: 20GB - ext4 - / - for the operating system 4GB - swap The rest of 220 GB on 2 equal partitions of ext4. Is this the best choice of HDD partitioning for speed? Is ext4 the best solution for speed for my hardware configuration and my files? If sometimes I will use some files from Windows should I create a FAT32 partition too? Will the FAT32 partition make the system slower? If yes, will it help in any way if it will be of only a few GB?
|
The google calculator say that $0^0=1$. I'm confused. It's well-known $0^0$ is undefined.
|
Could someone provide me with a good explanation of why $0^0=1$? My train of thought: $x>0$ $0^x=0^{x-0}=0^x/0^0$, so $0^0=0^x/0^x=\,?$ Possible answers: $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined PS. I've read the on mathforum.org, but it isn't clear to me.
|
I am self studying Munkres' Topology and was struck on this exercise question of section 13. I don't have any help from teacher or friends. So, I am asking for any explanation here. The question is Show that if $A$ is a basis for a topology on $X$, then the topology generated by $A$ equals the intersection of all topologies on $X$ that contain $A$. Prove the same if $A$ is a subbasis. The intuition is clear to me but I don't know how to write a proper proof. Can you please tell me for both parts.
|
Show that if $\mathscr{A}$ is a basis for a topology on $X$, then the topology generated by $\mathscr{A}$ equals the intersection of all topologies on $X$ that contain $\mathscr{A}$. This is what I've managed. However, the following stumps me: Prove the same if $\mathscr{A}$ is a subbasis. That is, how to show that the topology generated by $\mathscr{A}$ as a subbasis is the same as the intersection of all topologies on $X$ that contain $\mathscr{A}$? Let $\mathscr{T}$ be the topology that consists of all unions of finite intersections of sets in $\mathscr{A}$, and let $\mathscr{T}^\prime$ be the topology that is the intersection of all topologies that contain $\mathscr{A}$. Now $\mathscr{A}$ is a collection of subsets of $X$ whose union is all of $X$, and each set $A \in \mathscr{A}$ is in both $\mathscr{T}$ and $\mathscr{T}^\prime$. Am I right so far? And if so, then what next?
|
I've got some inquiries while doing exercise. I want to share it and ask advices. Here's the problem. We have uniformly continuous function $f:[0, \infty)$ $\to$ $\mathbb R$ satisfies $\lim\limits_{n\to\infty}$ $f(n+x)=0$ whenever $x \in [0, 1]$ and $n \in \mathbb N$. Show that $\lim\limits_{x\to\infty}$ $f(x)=0$. And if the uniformly continuous condition changes into continuous condition, the statement still holds? In my trial, I approached with the $\epsilon$ - $\delta$ method and made some outcome but little bit unsatisfied. And I have difficulty in finding some easy counter-example of the if-question. I wonder there are any ideas better than $\epsilon$ -$\delta$ method and easy counter-examples. EDIT: Here's the specification about the curiosity I have. In this problem, the difference between limit through natural number and through real number matters. I think because of $\mathbb N$ $\subsetneq$ $\mathbb R$, limit through $\mathbb R$ implies limit through $\mathbb N$ but the converse doesn't. What I had to request was the logical explanation about this difference and background understanding of this theme. This situation is very common in analysis but I haven't seriously thought about it.
|
$f\colon [0,\infty) \to \mathbb{R}$ is uniformly continuous. If $\lim_{n\to \infty}f(n+x)=0$ where $x\in [0,1]$, then $\lim_{x\to\infty} f(x)=0$. every my trying to solve this is wrong :( how can i prove this? and if $f$ is just continuous, what happens to the results
|
Are there words that specify that a number, say 600 was or is to be pronounced 'six double zero ' vs 'six zero zero'? How about six double oh vs six oh oh? Would that be the same word? How about when you are spelling something, e.g. 'double el' rather than 'el el' for 'll'. Also, should you say 'capital double el' or 'double capital el' for 'LL'?
|
501 can be pronounced 'five hundred one' or 'five zero one'. How do I tell someone how it was pronounced without saying the number. The best I've come up with is 'normal style' vs 'zip code style'. How about some proper terms? What about the distinction between 'five zero one' style and 'five oh one' style? I know this bit is a long shot but what the heck.
|
I currently have HDD (500GB) with only 35GB used space. I want to clone the existing HDD to a new empty SSD (256GB). What's the easiest way to do that??
|
I recently installed an SSD into my machine. The machine itself is a Lenovo thinkpad W520, and it previously had an internal HDD. I moved the internal HDD into an expansion bay (replacing the CD-ROM), and put the new SSD into the internal bay. The problem I'm having is that I have my Ubuntu configuration EXACTLY the way I want it - I originally spent many hours configuring it to get it to the way it is now. I'd rather not do this again. But, I'd also like the boot-up gains I would get from the OS being on the SSD. So, what I'd like to do is clone my Ubuntu partition onto the SSD. The catch is that the standard HDD is significantly bigger than the SSD. And it has a windows partition that I don't need on the SSD (I never use Windows, so if it boots off of the other hard drive, that's fine). The layout of my hard drives are as follows: /dev/sda (SSD): Model: ATA M4-CT256M4SSD2 (scsi) Disk /dev/sda: 256GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 147GB 147GB primary ext4 boot /dev/sdb (HDD): Model: ATA ST9500420AS (scsi) Disk /dev/sdb: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 1259MB 1258MB primary ntfs boot 2 1259MB 269GB 268GB primary ntfs 4 269GB 483GB 214GB extended 5 269GB 416GB 147GB logical ext4 7 416GB 475GB 58.9GB logical linux-swap(v1) 6 475GB 483GB 8470MB logical 3 483GB 500GB 16.8GB primary ntfs What I've tried so far: 1) Resizing the partitions /dev/sdb5 and /dev/sda1 to be the same size. 2) Booting into Ubuntu 11.04 (from /dev/sdb5) and running dd if=/dev/sdb5 of=/dev/sda1 (of course this causes problems with booting, so I had to reinstall grub.. I can get it to boot, but then I have problems with initrd not finding some files ... presumably it can't load some partitions I think). Now, I think those two steps are the wrong approach, because it will clone /dev/sdb5 EXACTLY - including references in fstab which point to the wrong hard drive. I'm not sure exactly how to rectify this. I could install Ubuntu 11.04 onto the SSD, then try and copy over all of my configurations, but I'm concerned that I'm going to lose something, or that I'm going to overwrite something like fstab that points back to the original hard drive. Note that currently, I can still boot from the HDD, so it's not imperative that I get this figured out right away, but I do want it to be exactly how it is right now, so that I can maintain my current level of productivity (it's a work laptop). Suggestions on how I might be able to overcome this difficulty? Thanks in advance!
|
i have an error that says line 17: unexpected end of file. i know others have already asked this, i tried to do the solutions given to them but still i am having the error. i am using ubuntu server 16.04 LTS. i used nano editor to write my bash.sh file. and i also downloaded the dos2unix already. did the command sudo dos2unix bash.sh, it says converting file bash.sh to unix format... after i do this i try to run again using sudo ./bash.sh usertest and i still have an error my code is very simple just to test an argument: USER=$1 DATE=`date +%d%m%y` if [ -z "$1" ];then echo "Wrong format" exit 1 else if [ -d "\home\$USERNAME" ]; then echo "correct" fi
|
I have typed out the code for this mychoice.sh bash example and I keep getting the syntax error: unexpected end of file. Am I missing something? mychoice.sh #!/bin/bash E='echo -e';e='echo -en';trap ";exit" 2 ESC=$( $e "\e") TPUT(){ $e "\e[${1};${2}H";} CLEAR(){ $e "\ec";} CIVIS(){ $e "\e[25l"} DRAW(){ $e "\e%\e(0";} WRITE(){ $e "\e(B";} MARK(){ $e "\e[7m";} UNMARK(){ $e "\e[27m";} R(){ CLEAR ;stty sane;$e "\ec\e[37;44m[J";}; HEAD(){ DRAW for each in $(seq 1 13);do $E " x x" done WRITE;MARK;TPUT; 1 5 $E "BASH SELECTION MENU ";UNMARK;} i=0; CLEAR; CIVIS;NULL=/dev/null FOOT(){ MARK;TPUT 13 5 printf "ENTER - SELECT,NEXT ";UNMARK;} ARROW(){ read -s -n3 key 2>/dev/null >&2 if [[$key = $ESC[A ]];then echo up;fi if [[$key = $ESC[B ]];then echo dn;fi;} M0(){ TPUT 4 20; $e "Login info";} M1(){ TPUT 5 20; $e "Network";} M2(){ TPUT 6 20; $e "Disk";} M3(){ TPUT 7 20; $e "Routing";} M4(){ TPUT 8 20; $e "Time";} M5(){ TPUT 9 20; $e "About ";} M6(){ TPUT 10 20; $e "Exit ";} LM=6 MENU(){ for each in $(seq 0 $LM);do M${each};done;} POS(){ if [[ $cur == up ]];then ((i--));fi if [[ $cur == dn ]];then ((i++));fi if [[ $i -lt 0 ]];then i=$LM;fi if [[ $i -gt $LM ]];then i=0;fi;} REFRESH(){ after=$((i+1)); before=$((i-!)) if [[ $before -lt 0 ]];then before=$LM;fi if [[ $after -gt 0 ]];then after=0;fi if [[ $j -lt $i ]];then UNMARK;M$before;else UNMARK;M$after;fi if [[ $after -eq 0 ]] || [$before -eq $LM ];then UNMARK; M$before; M$after;fi;j=$i;UNMARK;M$before;M$after;} INIT(){ R;HEAD;FOOT;MENU;} SC(){ REFRESH;MARK;$S;$b;cur='ARROW';} ES(){ MARK;$e "ENTER = main menu ";$b;read;INIT;};INIT while [[ "$0" != " " ]]; do case $i in 0) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS(w )\n";ES;fi;; 1) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS(ifconfig )\n";ES;fi;; 2) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS(df -h )\n";ES;fi;; 3) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS(route -n )\n";ES;fi;; 4) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS(date )\n";ES;fi;; 5) S=M2;SC;if [[ $cur == "" ]];then R;$e "\nS($e by oTo )\n";ES;fi;; 6) S=M2;SC;if [[ $cur == "" ]];then R;exit 0;fi;; esac;POS;done;
|
Images in posts and user profile seem to fill screen's width when displaying in the iOS app: (The gray highlight is not part of the image, this screenshot was taken by click and holding on the image) This is what it looks like on the web: This snowflake, , displays weirdly in the iOS app as seen above.
|
contains image inside text, but appearance is differ on full site and mobile web/app. iOS app: Full site: Mobile web: Android-app: My thoughts that only full site's and android-app's alignment is correct. App Version: 1.6.1.2 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.1.1 (Build 14B100)
|
Using Windows 10, I notice that each drive on my system has its own recycle bin. Is there any way to override this behavior and put the entire recycle bin on one drive, e.g. a hard drive, so as to avoid taking up valuable space on other drives, e.g. a SSD?
|
I have a SSD as a primary hard drive, and one HDD for storage. I want the recycling bin to be on the HDD. I want is so that even if I delete files from the SSD the end up on the HDD's recycling bin. What is the proper way of going about this?
|
I have a file that I have made a significant amount of changes to. When I try to render it now, it shows an old image from a few weeks ago that I rendered and no file is saved. Does this sound familiar at all? I'm kind of going crazy. I'm not sure if there are any settings I need to show, but if there are, I would be glad to post them. I'm using Version 2.70.
|
Blender is rendering an older version of my project, not the most recent one. I have made it using the Blender Render but it does not want to render in cycles either. A black and grey screen is rendered as if everything is transparent. Checked general camera, lighting and compute devises in case I messed something up but I can't find anything. All my textures and objects look normal, does anybody know what is wrong or what to check? Ok added link:
|
What is the Pythonic way of getting elements from the list in groups? I.e., I want the first 10 elements of a list, then the next 10 elements, then the next 10 elements, etc.
|
I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive. I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators. I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though. Related question:
|
Why do "most" (basically all) statistics text books use $\hat{\sigma}^2=\hat{p} (1-\hat{p})$ as an estimator for the variance of a Bernoulli process which we know is . Should the default not be the bias corrected sample version $s^2 = \hat{p} (1-\hat{p}) \cdot n/(n-1)$, which is the default for non-binary data.
|
$Y_{1...n}\sim \operatorname{Bin}(1,p)$, iid, and I need to find an unbiased estimator for $\theta=\operatorname{var}(y_i)$. I did some calculations and I think that the answer is $p(1-p)-\frac{p(1-p)}{n}$ Is this correct? If not, how can I find an unbiased estimator?
|
I am writing a technical letter for my (and my lab partner’s) senior design project (we are engineering majors) and I would like some help on properly phrasing part of the letter. The project belongs to my partner and I. I was always taught in school that in cases of dual possession, I should always proceed the other possessors. Suppose for a moment that the project was just mine. Then in that case, the sentence below would be grammatically correct. Attached to this email is my project selection. Now if the project only belonged to my partner, this sentence would also be grammatically correct. Attached to this email is my partner's project selection. However, since this project belongs to both of us, I need to phrase the sentence accordingly. The sentence below doesn’t appear to be correct in my opinion. Attached to this email is my partner and I's project selection. This one sounds better, but doesn’t follow the rules I was taught. Attached to this email is mine and my partner’s project selection. So which phrase (if any) should I use to be grammatically correct? Thanks
|
I just stumbled upon a : My wife and I's seafood collaboration dinner. How does it look? Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced : It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our". It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase. That's a rather intriguing argument. Does it hold any water?
|
The problem would be straightforward if the current $I$ were constant through the toroid. However, this is not the case. The current is time dependent according to $I = I_{o} e^{-\gamma t}$. So, if I'm right, a classic Ampere's Law approach doesn't work here. Because the $B$ field through the center of the toroid would change over time, it would cause an electric field, which must be taken into account in the magnetic field. The toroid in question has a cross sectional radius $r$, internal radius $a$, and outer radius $b$. I feel like I am missing something, or approaching the problem incorrectly, as I do not know how to find the $E$ field induced by the changing $B$ field. From there, I do not actually know what the math would look like. I also have to calculate the self-inductance of the toroid after this, which I would do by finding the flux through the cross section of the toroid and comparing it to the current through the same area. But, I can't do that yet, because I don't have the magnetic field to find the flux!
|
Say you have a current $I(t)$ (notice the time dependence) flowing through a Toroid with $N$ total loops and all the usual approximations: $(b-a) \ll r,\; B=0$ outside. (source: ) You are asked to calculate the magnetic field $B$. Could you apply Ampere's Law to obtain the familiar form of $B$ found for example ?: $$B~=~\frac{\mu N I}{2\Pi r}.$$
|
Browser Information I am using Chrome version 32.0.1700.107 m in Incognito mode. Problem While trying to edit the last 2 reviews I've had in the Low Quality Posts queue, once I start editing and the cursor was inside of the edit area, I could not get it out. For example, I would try to click the Edit Summary textbox, yet the cursor remained inside of the edit area. I had to eventually just click Save Edits or some other button to move on. Possible Insight into the Cause of the Issue If you look at the [Editing...] button in the screen shot, it's not disabled. When you normally edit that button is disabled. Reproduced Issue Here is that I ran into. As you can see, it also has the [Editing...] button enabled. It's disabled until you click inside of the edit area, then it becomes enabled. After that, you can't do anything with the cursor inside of the edit area. You can tab out of it, but you then you can't get back into the edit area. You simply have to cancel out of the entire thing.
|
Basically when reviewing a low quality post, if I choose to edit the item, I cannot move the cursor by clicking in the textarea. The keyboard is working fine, but any mouse interaction appears to be disabled. The issue only appears if you review one item first, then the next item is loaded in. Editing this item will have disabled mouse input. I haven't tested other review queues yet but will do so as soon as possible. This seems to only affect low-quality posts. Browsers I've tested: Broken Chrome 33, Win 7 Chrome 34, Win 7 | OSX Mavericks Chrome 36, Win 7 Firefox 28, Win 7 Safari 8, Yosemite Working Safari 7 OSX Mavericks (Intermittent)
|
Sometimes I need to modify some configuration files in installed packages. For example I modified /etc/pam.d/polkit-1 file and after I tried modified file I forgot its original version so I removed it hoping that reinstalling policykit-1 package would replace it, so I did sudo apt-get install --reinstall policykit-1 but it did not replace it though /etc/pam.d/polkit-1 belongs to policykit-1 I also I tried sudo apt-get -o Dpkg::Options::="--force-overwrite" install --reinstall policykit-1 though --force-overwrite option used to override files installed by different packages. Would anybody tell me how to do that with apt-get? I need to know it because I frequently modify files in my system. Though I can fix it manually.
|
I want to revert a file in /etc/ back to its originally-installed form. I have edited the file since it was installed. How can I revert this config file? Apt is smart enough not to overwrite edited config files, so how do I tell it that I want it to do so? For argument's sake, let's say that I want to revert the file /etc/foo.conf from the package foo.
|
The basic license guide for Microsoft SQL Server is 40 pages in length. This document references still more documents on various topics, options, and definitions used for licensing. The license that one selects determines the conditions that will trigger additional costs required to stay functional over time. Is there an accurate application that can be used to determine pricing for the various licensing and project a timeline for potential additional costs as a function of time and growth? This would be a useful tool for proposal writers, legal teams, and planners. It is very clear that licensing has become it's own "career track" that favors large business. A tool or business that could provide an unambiguous set of costs and terms based on list price could be free small to medium sized businesses to move forward on projects with some measure of confidence.
|
This is a about Licensing. Questions on licensing are off-topic on Server Fault. If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to. I have a question regarding software licensing. Can the Server Fault community please help with the following: How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?
|
I have a very simple script to trap signals: #!/bin/bash unlink SigTermRecieved unlink SigIntRecieved #trap " touch SigTermRecieved ; exit " SIGTERM trap " touch SigIntRecieved ; exit " SIGINT echo "pid is $$" while true do sleep 60m done exit BEHAVIOR with both trap lines commented: SIGTERM sent: terminates program. ? SIGINT sent from another terminal window is IGNORED! CTRL C terminates program. with SIGTERM trap uncommented: ? SIGTERM sent: program does not terminate and SIGTERM trap is not executed. ? SIGINT sent from another terminal window is IGNORED! CTRL C terminates program. with SIGINT trap uncommented: SIGTERM sent: terminates program. ? SIGINT from another terminal window is IGNORED! CTRL C executes trap code and terminates program. The behaviors preceded by ? are unexpected or wrong. I'm not too concerned about the SIGINT behaviors. I tried those to see if any traps would work. So, I removed the snooze function and just have: sleep 60m & wait $! Now, kill -TERM -pid kills both processes and executes the trap for SIGTERM. In my application, I'm waiting for SIGTERM from system shutdown, so I can clean up some details. I don't know whether system shutdown uses pid or -pid, both work for me, and the system will eventually kill all the processes. A few dangling sleep processes while I'm testing is no big deal. That fifo solution is quite complicated and I don't understand it. Thanks for the help.
|
I've got the following script: #!/bin/bash echo "We are $$" trap "echo HUP" SIGHUP cat # wait indefinitely When I send SIGHUP (using kill -HUP pid), nothing happens. If I change the script slightly: #!/bin/bash echo "We are $$" trap "kill -- -$BASHPID" EXIT # add this trap "echo HUP" SIGHUP cat # wait indefinitely ...then the script does the echo HUP thing right as it exits (when I press Ctrl+C): roger@roger-pc:~ $ ./hupper.sh We are 6233 ^CHUP What's going on? How should I send a signal (it doesn't necessarily have to be SIGHUP) to this script?
|
Yes, this question has been but only a workaround was ever found, which is not satisfactory for my situation. Neither is satisfactory. The question is, how can I change the default text qualifier in excel, from ", to say, a backtick (`). This would avoid the CSV file breaking, because I have many instances of unmatched double quotes in the text which stand for inches, and must be left as is. Thus with "24"" (24 inches), you can see the boundaries for the text are going to shift - which messes up the entire csv file. You can see that having `24"` solves the problem. But Excel doesn't seem to have an option to set your preferred text qualifier? Edit: I'm well aware that the question has been asked multiple times before - so whilst it is strictly a duplicate, it is justified because all the other questions were already closed cases with accepted answers that were workarounds that are not satisfactory for me. I have certain constraints which I'll elaborate on below, but I opened essentially by clarifying that I needed a different kind of solution, ideally the most direct solution, and if not, something other than the answers already posed elsewhere. For one thing, multiple mass search and replaces is going to increase the workload to something unacceptable. And the CSV files are provided to me already in such a way that I cannot distinguish quotes that stand for inches from quotes that serve as text boundaries in search and replace operations.
|
I have a CSV file which is not properly formatted because one of the columns contains HTML code which use the same character as the Text Qualifier: the double quote. Example: "col1","col2","col3" "01","text","<html><tag attrib="true">" I decided to use another character as text qualifier, the backtick ` which is never present in my original file. My data are like this now: `col1`,`col2`,`col3` `01`,`text`,`<html><tag attrib="true">` Now my CSV is totally valid, but in Excel (2013) I cannot just change the Text Qualifier, it allows me only ", ' or {none} Is there any way to edit this list to add a new text qualifier? I finally found another way to import it but I am just wondering why the Text Qualifier box is not editable.
|
I am unable to grasp the idea of either addition operator or short data-type. It's said that; short a = 1; short b = 2; short c = a + b; which will not compile because addition operator always cast short, chart, byte data-types to int and I understand this. But this; short c = 1 + 2; works totally fine. So, if addition operator auto converts short to int and then apply the result (where result ofcourse will be an int), why this works fine? Edit: This question is not duplicate of since I understand the conversions process. Also, the question talks about conversions of data types where as my question relates to int literals.
|
I have a question about the primitive type short in Java. I am using JDK 1.6. If I have the following: short a = 2; short b = 3; short c = a + b; the compiler does not want to compile - it says that it "cannot convert from int to short" and suggests that I make a cast to short, so this: short c = (short) (a + b); really works. But my question is why do I need to cast? The values of a and b are in the range of short - the range of short values is {-32,768, 32767}. I also need to cast when I want to perform the operations -, *, / (I haven't checked for others). If I do the same for primitive type int, I do not need to cast aa+bb to int. The following works fine: int aa = 2; int bb = 3; int cc = aa +bb; I discovered this while designing a class where I needed to add two variables of type short, and the compiler wanted me to make a cast. If I do this with two variables of type int, I don't need to cast. A small remark: the same thing also happens with the primitive type byte. So, this works: byte a = 2; byte b = 3; byte c = (byte) (a + b); but this not: byte a = 2; byte b = 3; byte c = a + b; For long, float, double, and int, there is no need to cast. Only for short and byte values.
|
I have 4 partitions in my hard drive But when I install Ubuntu, it deletes all partitions and all data Can I recover data? Please help...
|
I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions (C:) Vista (D:) Entertainment (E:) Work (F:) Sources and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB. I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse? I need these data badly as I don't have a backup for them.
|
When I add the picture, the word and pdf is the full page and the Latex moves to the right of the page.How can I solve this problem? \documentclass{article} \usepackage{graphicx} \begin{document} \begin{figure} \includegraphics[scale=1]{8.pdf} \end{figure} \end{document} Latex SS is here: PDF SS is here:
|
When I add the picture, the word and pdf is the full page and the Latex moves to the right of the page. How can I solve this problem? this is my work. this is my work and pdf link: https://we.tl/t-cgDSwDuu8H I couldn't stop the pictures from sliding right. What should I do to make the image look like the original PDF file? If I reduce the scale of the picture is centered but this time it becomes very small. Is a situation caused by page margins? \documentclass [12pt, a4paper]{article} \usepackage{color} %\usepackage[turkish]{babel} \usepackage{graphicx} \usepackage{tabularx} \usepackage{multirow} \usepackage{graphicx} %\usepackage[pass,showframe]{geometry} %\usepackage[T1]{fontenc} \begin{document} \definecolor{renkbir}{RGB}{0,32,96} \begin{tabular}{ m{8,5cm} m{6cm} } \Large{\textbf{MsdasdasdN }} \large{\textbf{\textcolor{renkbir}{Firma Adı }}} &\small {Uçak Mühendisi \newline T.C No: asd \newline asd \newline asd \newline asd} \end{tabular} \ %Uçak mühendisi Tc No kısımını sağa yaslamak istedim fakat yapamadım. \begin{center} \large{\textbf{\textcolor{renkbir}{KİŞİSEL BİLGİLER}}} \end{center} \begin{center} \begin{tabular}{ l l r } Ad & Mehm & \multirow{9}{*}{\includegraphics[scale=0.15]{2.pdf}} \ Soyad & asdasd \ Doğum Tarihi & sanane (23 Yaşında) \ Adres & asd \ Telefon & asd \ Mail & asd \ Sigara Kullanımı & Hayır \ Ehliyet & B \ Askerlik & Tecilli (31.12.2020) \ \end{tabular} \end{center} %\vspace{1cm} Burası boşluk bırakma komutu. \begin{center} \begin{tabular}{ m{4cm} m{6cm} m{5cm} } \multicolumn{3}{c}{\large{\textbf{\textcolor{renkbir}{EĞİTİMLER}}}} \ \hline \multirow{2}{}{Üniversite(YL)} & asd \newline Makine Mühendisliği \newline Özel Öğrenci / Türkçe \newline Durumu : Devam ediyor & \multirow{2}{}{Eylül 2018 / } \ \hline \multirow{2}{}{Üniversite} & asd \newline Uçak ve Uzay Bilimleri Fakültesi \newline Uçak asd \newline Örgün Öğretim / İngilizce \newline Durumu : Mezun & \multirow{1}{}{Ekim 2013 / Haziran 2018} \ \hline \multirow{1}{}{Lise} & asd \newline Anadolu Lisesi (100 / 90,02) & \multirow{1}{}{Ekim 2013 / Haziran 2018} \ \end{tabular} \end{center} \begin{center} \begin{tabular}{ m{3cm} m{4cm} m{4cm} m{4cm} } \multicolumn{4}{c}{\large{\textbf{\textcolor{renkbir}{YABANCI DİLLER}}}} \ \hline \textbf{İngilizce} &\textbf{Okuma:} İyi &\textbf{Yazma:} İyi &\textbf{Konuşma:} Orta \ \end{tabular} \end{center} \begin{center} \begin{tabular}{ m{5cm} m{5cm} m{5cm} } \multicolumn{3}{c}{\large{\textbf{\textcolor{renkbir}{BİLGİSAYAR BİLGİLERİ}}}} \ \hline \multicolumn{3}{l}{Donanım - Ofis Programları} % donann ofis koyu yazmak istedim yapamadım. \ Ms Excel & Çok İyi & +5 Yıl \ MS Word & Çok İyi & +5 Yıl \ Ms Powerpoint & Çok İyi & +5 Yıl \ \hline \multicolumn{3}{l}{Yazılım Geliştirme} % donann ofis koyu yazmak istedim yapamadım. \ Office & Orta & 2-3 Yıl \ Matlab & Orta & 2-3 Yıl \ Phyton & Orta & 0-1 Yıl \ Fortran & Başlangıç & 0-1 Yıl \ C++ & Başlangıç & 0-1 Yıl \ Ansys & Başlangıç & 0-1 Yıl \ Miktex & Başlangıç & 0-1 Yıl \ \hline \multicolumn{3}{l}{Bilgisayar Destekli Tasarım} % donann ofis koyu yazmak istedim yapamadım. \ SolidWorks & Orta & 2-3 Yıl \ AutoCAD & Orta & 0-1 Yıl \ \end{tabular} \end{center} \begin{figure} \includegraphics[width=\linewidth]{2.pdf} \end{figure} \begin{figure} \includegraphics[scale=1]{2.pdf} \end{figure} \end{document} Latex SS is here: PDF SS is here:
|
Resistivity = (Resistance times area ) divided by length $$\rho = (RA)/l$$ now my question is that in order to calculate the resistivity for some metal we have to take into account its length and area then why is it said that the resistivity of a metal is independent of its area or length . i.e. Why does every piece of copper have the same resistivity regardless of its area or length?
|
The formula for resistivity is: $$\rho = \frac{RA}{L}$$ where $\rho$ is resistivity, $R$ is resistance, $A$ is cross-sectional area, and $L$ is the length of the conductor. We can see from the formula that $A$ and $L$ are involved, why then does resistivity not depend on dimensions?
|
What size wire is required to carry 100 amp service from the meter to the panel?
|
I am adding an attached garage to my house. I'm going to be putting in a 100 Amp subpanel which is about 60 feet away and run through the basement joists. What gauge wire do you recommend for either aluminum and copper? Also, do you recommend one or the other?
|
Background: I have a async call, that somewhere deep down throws an exception... In my real application, it is a plugin that is running async, so I would like to wrap the exception and decorate the exception with the plugin name that the exception originates from. But .Net throws away the outer exception, so additional details are lost, I have made an example windows forms application with two buttons, and setup a general exception handler Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Then one button: private async void buttonThrowAndWrapExceptionAsync_Click(object sender, EventArgs e) { _textBoxToSetTextOnGivenLastCall = textBox1; try { await Task.Run(() => ThrowExceptionA()); } catch (Exception a) { throw new Exception("B", a); } } the other button: private async void buttonThrowAndRethrowNewExceptionAsync_Click(object sender, EventArgs e) { _textBoxToSetTextOnGivenLastCall = textBox2; try { await Task.Run(() => ThrowExceptionA()); } catch (Exception) { throw new Exception("B"); } } When I throw new Exception("B", a); in the context, Exception "A" occurs in the Application_ThreadException callback with no trace of 'B'... B does never appear, this is not what I would expect. When I throw new Exception("B"); Exception "B" appears in Application_ThreadException, and Exception "A" does not appear, this is to me understandable In my 'real' application, I am contemplating making a 'hack' and just adding "A".ToString() to my "B" exception, but I know it is pretty bad, and I am sure we have lots of logic expecting to be able to wrap exceptions BTW... using a background worker with exception handling in OnComplete works in the same way as the 'async' code here... The example can be found here: EDIT: After viewing the suggested wich is simelar, and provides an answer to why, I am actually more interested in stopping this behaviour. For now I have made an ugly hack... When Throwing my wrapper Exception, I wrap the wrapper B in a new Exception ProtectedFromASyncUnfoldException throw new ProtectedFromASyncUnfoldException(new Exception("B", a)); This breaks the normal behaviour of InnerExceptions... and is not really what I wan't to do... any better sollutions? Here's the Hack class: public class ProtectedFromASyncUnfoldException : Exception { public Exception InternalException { get; } public ProtectedFromASyncUnfoldException() { } public ProtectedFromASyncUnfoldException(string message) : base(message) { } /// <summary> /// Hack of exception. /// Setting InternalException instead of innerException /// to avoid strange behaviour of async exception handling in windows forms /// that otherwise throws away all but the base exception /// </summary> /// <param name="message"></param> /// <param name="innerException">transformed to InternalException</param> public ProtectedFromASyncUnfoldException(string message, Exception innerException) : base(message) { InternalException = innerException; } public ProtectedFromASyncUnfoldException(Exception innerException) : this(innerException.Message, innerException) { } protected ProtectedFromASyncUnfoldException(SerializationInfo info, StreamingContext context) : base(info, context) { } public override string ToString() { return base.ToString() + Environment.NewLine + Environment.NewLine + "---------------------" + InternalException?.ToString(); } }
|
I'm seeing some wierd behaviour when throwing exceptions and catching them in the Application.ThreadException event handler. Basically whats happening in the sample below is that an exception is thrown in the DoWork event handler of a BackgroundWorker. The RunWorkerCompleted event handler rethrows a new exception with the original as the inner exception. Why does the inner exception show up in the ThreadException event handler and not the acutal exception being thrown? If I do not provide an inner exception in the RunWorkerCompleted event handler, the correct exception will show up. using System; using System.Windows.Forms; using System.ComponentModel; namespace WierdExceptionApp { class WierdExceptionForm : Form { BackgroundWorker worker = new BackgroundWorker(); public WierdExceptionForm() { worker.DoWork += new DoWorkEventHandler(worker_DoWork); worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted); worker.RunWorkerAsync(); } void worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Error != null) { throw new Exception("worker_RunWorkerCompleted", e.Error); } } void worker_DoWork(object sender, DoWorkEventArgs e) { throw new Exception("worker_DoWork"); } [STAThread] static void Main() { Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.Run(new WierdExceptionForm()); } static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { MessageBox.Show(e.Exception.Message); } } }
|
Requested Feature I'd like to get a notification when a question that I've voted to close (but isn't closed yet) is edited, so I can review the changed question and retract my close vote if appropriate. Workings and Rationale Questions can be voted to be closed for a number of (custom) reasons. Those reasons are requests to the OP to adjust their question — to make them less broad, to make them on topic, to provide a test case, and so on. The OP (or another user) may edit the question to address the issue, but the close votes remain. If another user casts the final vote, the question is closed, even though the original issue was resolved. To prevent that, the close voters should be notified that the question was edited, so that they can review the edited question and adjust their vote accordingly. This is for a question in the process of being closed only. Related Feature Requests Not a duplicate, since my request is about questions in the process of being closed, while that request is about questions that are already closed. That could notify users years after they've closed the question. That seems unnecessary and we have the regular re-open process to deal with it anyway. Same request as mine, but (incorrectly, IMHO) closed as a duplicate of the former.
|
When a user votes to close a question (for whatever reason), it would helpful to receive a notification (in the inbox) when the question is edited (either the text, tags, if it closes then is re-opened) so that the user can then modify his or her vote if the question is properly adjusted.
|
can any one tell me how to clear the content of the stringstream..? i tried the following but it didnt work. stringstream ss; ss<<"bala"<<"murugan"; cout<<ss.str(); //Output balamurugan ss.str().clear(); ss<<" hi"; cout<<ss.str(); // output is balamurugan hi my required output is " hi" alone.. Pls tell me
|
I've tried several things already, std::stringstream m; m.empty(); m.clear(); both of which don't work.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.