body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
Hi I started in creating an html page with Chinese characters. I used W3 schools try it page as a reference to what i am doing, I simply put the code in their try it window and see my output. The thing is that i used this code <style> .block1 { color: #0000ff; /*display: block;*/ font-family: 宋体:SimSun font-size: 1.41667em; font-weight: bold; line-height: 1.2; margin-bottom: 0.67em; margin-left: 0; margin-right: 0; margin-top: 24pt; /* page-break-inside: avoid;*/ } .calibre { color: #4F81BD; display: block; font-family: "細明體", sans-serif; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-left: 0; padding-right: 0 } .block2 { color: red; display: block; font-family: "細明體", sans-serif; margin-bottom: 3pt; margin-left: 0; margin-right: 0; margin-top: 3pt; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; text-align: justify } </style> <!DOCTYPE html> <html> <head> </head> <body> <h1 class="block1">嗨 hhh</h1> <p class="block2">(卷上)</p> </body> </html> But no matter what i give in font family, the chinese characters are not showing in the output page Somebody please help only 'hhh' is coming, chinese characters are showing as '?'.. Edit to add is that the code is working fine in firefox browser, but not working in chrome, why? because the code has to be independent of browser right? | I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2. |
For work I need to use the IBM Lotus Notes e-mail client. I have installed it without much problem, but I'm having troubles in launching it when I start the pc. The problem is that I can't find how I can launch the client from the terminal, so I can't put it in the startup list. As of right now, I start the client by searching in my Unity for 'Notes' and this brings up the client and I just press enter to start running it. Is there a way I can figure out which command Unity uses to start the client so I can add it to the startup list? | I want to use some applications shown on the Unity Launcher in a terminal, but I need to know the appropriate command to run them. How can I achieve that? |
I am using ArcMap 10.5. I'm have dynamic text box I'm trying to add to the buttom of my legend. The text is about 350 characters so need to resize the text box to fit into my legend. But, the "Preserve Aspect Ratio checkbox is grayed-out. Tried to look in ESRI help with no luck and even found a thread on a forum with the same question, but the answer did not help. How do I make my text box size editable? | How can I word-wrap a text element on an ArcMap layout, when it contains a lot of text? go into Layout mode choose > Insert > Text paste in a long text block eg The text block now stretches across the screen, and there's no apparent way to change the width of the text block. Is there a way to set the text block to the desired width, and have ArcMap automatically enter line breaks? (The way that, um, every other piece of software which handles text does...) The workaround is to enter line breaks manually, which is great until you decide to change the width, font size, etc. |
I use the following code for referring to an equation and table. \let\originaleqref=\eqref \renewcommand{\eqref}{Equation~\originaleqref} \newcommand{\tref}[1]{Table (\ref{#1})} When I refer to an equation, there is no number of chapetr. But when I refer to a table, there is a number of chapter. Here is a small MWE. \documentclass[]{OAGM} %% For the accepted, final version, set this to the correct value: \OAGMarXiv{1404.3538} \usepackage{float} % fix the table \usepackage{bold-extra} \usepackage{amsmath,bm} \usepackage{color} \usepackage{amsmath,amsopn} \usepackage{bbm} %\usepackage{hyperref} \usepackage{mathrsfs} \usepackage{tikz,pgfplots} \usepackage{listings} \usepackage{color} %\usepackage{breqn} \usepackage{caption} \usepackage{subcaption} \usepackage{epstopdf} %\usepackage[titletoc,toc,title]{appendix} \usepackage{mathtools} \usepackage{tabularx} \usepackage{booktabs} \usepackage{natbib } \usepackage{graphics} \usepackage{amsfonts} \usepackage{mathtools} \begin{document} \section{1} \subsection{2} \begin{tabularx}{\textwidth}{XX} \toprule a & b\\\midrule \label{Tab a simple table}\end{tabularx} I have to cite the table ~\ref{Tab a simple table} \end{document} | Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)? And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering? \documentclass{book}% for "vice versa" variant, replace `book` with `article` \begin{document} \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section` \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure} \end{document} Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class? |
After upgrading both a desktop and laptop from Fedora 24 to fedora 25 I had verified that wayland could be set and tested some development code on it. Developer apps and debug repositories were added over time. After the numerous updates that occur when a new version is released I was testing some development code and noticed that the Xserver was being used and tried logging out of the desktop to gdm login screen and set wayland which fails to start. The ps axf command on the desktop now shows 979 ? Ssl 0:00 /usr/sbin/gdm 1272 ? Sl 0:00 \_ gdm-session-worker [pam/gdm-launch-environment] 1294 tty1 Ssl+ 0:00 | \_ /usr/libexec/gdm-x-session gnome-session --autostart /usr/share/gdm/greeter/autostart --debug 1296 tty1 Sl+ 0:01 | \_ /usr/libexec/Xorg vt1 -displayfd 3 -auth /run/user/42/gdm/Xauthority -nolisten tcp -backgr 1305 tty1 Sl+ 0:00 | \_ /usr/libexec/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart --debug 1325 tty1 Sl+ 0:02 | \_ /usr/bin/gnome-shell 1423 tty1 Sl 0:00 | | \_ ibus-daemon --xim --panel disable 1427 tty1 Sl 0:00 | | \_ /usr/libexec/ibus-dconf 1503 tty1 Sl 0:00 | | \_ /usr/libexec/ibus-engine-simple 1452 tty1 Sl+ 0:00 | \_ /usr/libexec/gnome-settings-daemon 1546 ? Sl 0:00 \_ gdm-session-worker [pam/gdm-password] 1572 tty2 Ssl+ 0:00 \_ /usr/libexec/gdm-x-session --run-script gnome-session 1578 tty2 Sl+ 0:21 \_ /usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -back 1595 tty2 Sl+ 0:00 \_ /usr/libexec/gnome-session-binary 1672 tty2 Sl+ 0:18 \_ /usr/bin/gnome-shell Verifying that even gdm has defaulted to X. Which in Fedora 24 was using wayland. Not sure what changed to end up with defaulting to X on two development system computers. No nvidea closed source drivers are in use, just the open source nouveav driver on both laptop and desktop. | For some reason my Fedora 25 FRESH install is not using wayland by default. I know this because of $: loginctl show-session 3 -p Type Type=x11 If I was using Wayland by default that should say wayland or weston. I'm very confused why this fresh install of fedora 25 is not sporting wayland by default. I looked over the arch wiki briefly, and tried to test run wayland by issuing $: weston Also, I have rebooted fedora to multiuser.target, to get just a command line to manually launch a dbus-run-session for wayland, and this is the output: $: dbus-run-session -- gnome-shell --display-server --wayland (gnome-shell:1372): mutter-WARNING **: Can't initialize KMS backend: could not find drm kms device Then I tried: $: startx And my standard gnome desktop popped up no problem. I'm seriously wondering if fedora 25 live installer ever installed wayland to begin with? After looking for the wayland config file weston.ini, I cannot find it in ~/.config/ where it's supposed to be. System info: $:uname -a Linux sark 4.8.10-300.fc25.x86_64 #1 SMP Mon Nov 21 18:49:16 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux I have done a full system update on first login with $: sudo dnf update Also went through the process of using the nvidia drivers for my graphics card; GTX 950 Not using the default pre-my-move-to-nvidia-driver driver :P EDIT: After investigating onto my laptop, my Laptop reports that it is using wayland: $: loginctl show-session 2 -p Type Type=wayland This laptop was a fedora24 upgrade to fedora25, not a fresh install of fedora 25 Laptop info: $: uname -a Linux mcp 4.8.10-300.fc25.x86_64 #1 SMP Mon Nov 21 18:59:16 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux |
Following in Britain this week, we were told that lack of power being generated led to a drop in the AC frequency as shown in this graph: I understand why a stable frequency is important how how nationwide frequency is kept in sync but am not sure what exactly caused the drop in frequency and why. | about the use of battery/freewheel based Frequency Regulators confused me about how the 60hz frequency of the North American power grid was set--saying that it was kept at that frequency by balancing load and supply. I used to think that it was only voltage which was affected by this balance, and that the frequency was determined by the speed of the rotors in the generator. EG see . Can someone help me understand the physics behind this? |
I have a preprocessing pipeline that includes replacing missing values and onehotencoding for the categorical variables. When I try to use my model on the test set, it explains that the number of columns it expects differs. This is due to one hot encoding One option I considered was passing the full dataset into the pipeline and then seperating into test and split. However, this causes data leakage as the missing values it capturing values from the testset. Please let me know how to prevent this. Thanks, | I'm building an app that will require user input. Currently, on the training set, I run the following code, in which data is a pandas dataframe with a combination of categorical and numerical columns. dummified_data = data.get_dummies() train_data = dummified_data[:10000] test_data = dummified_data[10000:12000] Currently, I have a hand-written function that takes user-inputted data and transforms it into a format like dummy data. This doesn't seem sustainable as the number of columns/the size of my categorical variables grows. Is there a way to dummify training data and production data consistently? |
Why is adding a return statement for the main() function in C important if the programs I make runs the same without it? Is there a disadvantage in my programs if I omitted the return statement in the main() function? | What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0? There are numerous duplicates of this question, including: — For C++, with a very good answer indeed. Related: |
So the equation is as follows: $$ 6x^2 -\ 25x \ + 12 \ +\ \frac6{x^2}\ + \frac{25}{x} = 0$$ So one thing that is immediately observable is that pairs of roots will be of the from $$x_1=-\frac{1}{x_2}$$ How do I go about solving this equation systematically ? I have already solved it based on trial error to get roots as 2,3,-1/2,-1/3. But I need to show systematic manipulations to get there. Thanks a lot ! | I simplified to get $6x^4-25x^3+12x^2+25x+6=0$ Or $6 (x^2+1)^2+25x(1-x^2)=0$ Then I substituted $z=x^2+1$, to get $6z^2+25\sqrt{(z-1)}(2-z)=0$ I can't find a way to proceed further. |
I've recently started editing questions. While editing questions I almost always remove the Thanks in advance and Thanks for your help parts of the questions. I've read question which is very similar my question and I notice that the accepted answer and the comments that follow are more of a debate so as to remove the or no. Since most of the questions belong to newbies I am still confused and don't how to go about it. My point being: a) If they are new they might like it if their questions remain friendly. I mean, won't you want a human touch to your questions (the debate and some answers point towards it) b) As the accepted answer states, the reasons for removing them are: It will leave even less room in the question preview so that we have more difficulty gauging what a question consists of by reading the preview. It takes time to read and parse through those questions when I am trying to spend my time more efficiently reading through the actual question and figuring out how to appropriately answer it. If I have to start reading all the little side comments and snarky humor inserted in there it detracts from the overall message. If this is supposed to be a website which is servicing more than just the primary author, we need to think about how we construct messages so that they appear more clearly to those searching on google for questions that match their own. If I am looking for a solution for question X, I want to find someone who had the same problem, not their short autobiography and formalities before getting to that actual question. So, is there any guideline for editing questions? And if not, what do most people who edit questions follow? | I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like: --User Should these items be removed during the editing of the post by an editor? |
I've seen prior discussions of ending a sentence with "etc." and I know there should only be one period. But what if the "etc." comes inside parenthesis which then end the sentence, such as: .....blah blah blah (blah, blah etc.). That looks awkward to me. Because the period inside the parentheses is used for the abbreviation I don't think it suffices to end the sentence with it; so I'm thinking: .....blah blah blah (blah, blah etc.) is incorrect. I know I could always simply write-out et cetera but I'm wondering if there's an actual rule for this. Thanks in advance. Ok, so multiple people have marked this as asked and answered. Could someone please post a link to that, because I can't find it. @tchrist: unicorns??? Never mind. Found the link in the right margin. Thank you. | In Hungarian, when there's a dot both inside and outside parentheses at the end of a sentence, we write it as follows: Sok állatom van (kutya, macska stb.). (Meaning: I've got many animals [dogs, cats, etc.]) I'm not sure though how do we write it in English. I've got many animals (dogs, cats, etc.). I've got many animals. (dogs, cats, etc.) I've got many animals (dogs, cats, etc.) I've got many animals (dogs, cats, etc). |
I am making a custom tool (code generator) for VS2008. I have the wix installer putting in all the registry entries for the visual studio, but what it is not doing is the equivalent of regasm mytool.dll It is getting into the GAC by virtue of the Assembly=".net" attribute of the File element. But I am not even entirely sure that getting into the GAC matters. I think it would work with a regasm /codebase mytool.dll Thanks | There seems to be lots of different ways to register assemblies with the GAC, as in, they 'work'. However, what's the "proper" way of doing it? In response to Lou Franco (and gacutil): I'm using Gacutil for development, but it seems to me to be not the proper way to install it, since gacutil isn't included in the basic .NET utilities past .NET 1.1 - it's only a developer tool. Additional: Gacutil (as seen in responses below) is not redistributable, and therefore should not be used in any app that you intend to give to people who are not developers. AKA, customers. See . In response to using WIX: WIX might be great and all, but how does it work under the hood? What details makes the way WIX installs the assembly the right way to install it? How does it look it up? Is it a system/.NET call? Is there some call in a dll buried somewhere in System32 that needs to be made? (Edit: it looks like WIX uses MSI under the hood. See my comments in the accepted answer.) Final edit: It looks like the correct way to install an assembly to the GAC is using windows installer, and nothing else. I'm going to give Wix a try. Thanks all! |
I have had a Galaxy S2 for 2 years. I just upgraded to the S4 3 weeks ago. Until this morning, I was able to send SMS messages without data mobile being on via my Wi-Fi connection. I have made no alterations to my phone other than trying out various suggestions on given on forum sites. I have tried 3-word messages as a test and even these are converted to MMS. I have loaded both Handcent and Bigsms. They work, but why should I have to have these after 2 years and 3 weeks without a problem? | The Galaxy S I9000 messaging app automatically converts long SMS messages to MMS. How can I disable this? |
I'm using math mode, \begin{enumerate} \item \begin{align*} 3(2x+4)-4x &= 6-x &\text{Initial equation (1)}\\ 6x + 12 - 4x &= 6-x &\text{Distribute (2)}\\ 6x-4x+x &= 6-12 &\text{Rearrange (3)}\\ 3x &= -6 &\text{Combine Like Terms (4)}\\ x &= \boxed{-2} &\text{Simplify (5)} \end{align*} \end{enumerate} When I type this up, I get this: Why is there a giant blank link between "1." and the first line? How can I remove that line? Thank you! | Related (but not the same): Earlier today I asked a question about aligning equations in an enumerate environment and got an answer that seemed to work for the example I gave, but it turns out I wasn't really specific enough for my problem. I'm using align* environments, often as the only part of a list item. (If you're wondering why I'm not using more words to introduce the align*, these are mostly homework solutions where most of the work is algebra, etc.) Here's my code and what it makes (above the middle line): \begin{enumerate} \item \begin{align*} x^2 + y^2 &= x^2 + (iy)^2 \\ &= (x + iy) (x - iy) \end{align*} \item \begin{align*} \frac{1}{n^2-4} &= \frac14 \frac{4}{(n-2)(n+2)} \\ &= \frac14 \left( \frac{1}{n-2}-\frac{1}{n+2} \right) \end{align*} \end{enumerate} I'm trying to make the baseline of the first line of the align* environment the same as the number's baseline—I want the first line of the align* to have the same vertical position (centered horizontally in the same way) relative to its number as in the second half of my picture. (Side question: why is there so much space before the align* starts?) |
I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest=1 and secondary forest=0 I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point). How should I perform the wilcox.test fucntion? I'm doing this way: wilcox.test(DATA$Measurements~DATA$Point) But I notice that are other forms of performing this test: wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE) Which one is more suited for testing my question of interest, and what is the difference between these options? (Is there a difference between points for this given characteristic)? | I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest (Point=1) and secondary forest (Point=0) I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point). How should I perform the wilcox.test fucntion? I'm doing this way: wilcox.test(DATA$Measurements~DATA$Point) But I notice that are other forms of performing this test: wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE) Which one is more suited for testing my question of interest (Is there a difference between points for this given characteristic), and what is the difference between these options?? |
I have a list like: list = [1, 2, 3] I need to convert it to a triple digit like: "123" | I have a list of integers that I would like to convert to one number like: numList = [1, 2, 3] num = magic(numList) print num, type(num) >>> 123, <type 'int'> What is the best way to implement the magic function? EDIT I did find , but it seems like there has to be a better way. |
I wish to add Ubuntu 64 bit to Windows 8, and the installation guide mentions booting from USB or DVD. If I burn the downloaded Ubuntu to an empty USB stick, then put the stick into my computer, what happens next? | I am looking at this: I need to create a boot disk to test Ubuntu to make sure it will run on a PC (Compaq Mini CQ10-120LA) I was given. I can create the boot disk off of a Mac (in English) or Windows (but Windows is in Spanish and foreign to me). Questions: What format do I choose for the USB stick? (I wish the instructions stated this). What is Dash? (Will I know when I run the installer?) Can I do this from a Mac or Windows computer? Or only from Ubuntu? |
In the Dark Knight, Bruce Wayne tracks Melvin White aggravated assault, moved to Arkham twice to his apartment, which is overlooking Commissioner Loeb's funeral parade, where he finds a police honor guard unit tied to a post, blindfolded, mouths taped shut. When Bruce removes the tape from one of the men, Bruce asks: What happened? They took our guns, our uniforms From this we can assume that a substantial portion, if not the entire unit, is full of the Joker's men. Why doesn't anyone realize this? Surely there must be someone familiar with the individuals in the honor guard. Previous answers have stated that a corrupt police force allowed the Joker and his men to blend in, or that there were so many police in uniform that all looked the same, or that Gordon and his men were too busy scanning windows. Still, none of these explanations account for the fact that the honor guard was still a separate part of the procession and had a special role. There is next to no chance they could completely escape detection. | In , when The Joker plans to kill the Mayor at a public gathering. His attempt to shoot the Mayor is foiled by Gordon. After this we see Joker's face in frustration. This is the only time we see Joker without his make up, but the scars on his face are clearly visible. Why is it that no one noticed this highly unusual man dressed up in a police uniform at this function? |
As far as we know, we can make a file run every time after turning on the windows, by putting it in Startup folder or make a key in registry with its path in the value! Now I want to now, is there any way to make a file run right before Windows shutdown? | I was wondering if anyone knows how to configure a Windows 7 x64 Enterprise install that is on a domain to run a script if the user attempts to shutdown the computer - but I dont want the script to run if the user tries to log out. Here is a bit of detail on my situation... I have installed drive encryption software on 5 desktops that are in use by various people in my group. These desktops are installed a few buildings away in a secure lab that very people have access to. People in my group access these machines (8 Core 2600K Intel Sandybridge with 8GB RAM) over RDP to preform tasks that require heavy lifting that laptops are not well suited for. I wrote a shutdown script (.hta file) to warn a user that if he/she shuts the computer down, they will have to get access to the lab and enter the drive encryption password in order to bring the machine back online. The script has a timer that counts down for 1 minute and allows the user to cancel the shutdown command. The script works as expected when a user tries to shutdown the computer, but I just realized that the script seems to run when a user tries to log off. Is there any way to differentiate between a user logging off and a user shutting down a machine? If possible, I would only want the script to run if the machine is shutdown. If the user logs out, I would not want any script to run. If this is possible, it seems like this would be managed via local Group Policy. Let me know if you need any further details. |
If the definition of prime lens says that their focal length is fixed, then how come you can still alter the focal length when focusing? (either MF or AF) | By definition, a is a fixed lens system with a fixed focal length. Then, simple physics tells us that it should be able to focus only on one plane (at a fixed distance) in front of it. But in fact you can focus on objects near as well as far. What am I missing here? |
Find the double integral which represents the intersection of the cylinder and the sphere happened over $$D:\{(x,y):\, -1\le x\le 1 \,\,\text{ and }\,\, 1-\sqrt{1-x^2} \le y\le 1+\sqrt{1-x^2}\, \}$$ The integral is $$2\iint_D \sqrt{f_x^2+f_y^2+1}\, d\sigma$$ where $f(x,y) = \sqrt{4-x^2-y^2}$. First of all I calculated $f_x^2=\frac{x^2}{-x^2-y^2+4}$, $f_y^2=\frac{y^2}{-x^2-y^2+4}$. However, I am not sure how to take into account the region $D$. Any help to finilize calculation are welcomed. | Find the surface area of the part $\sigma$: $x^2+y^2+z^2=4$ that lies inside the cylinder $x^2+y^2=2y$ So, the surface is a sphere of $R=2$. It looks there should be double integral to calculate the surface, but how, which way? |
(i use blender 2.79) in video games, the farther is the object the fewer details it has, and that of course to save memory but how to do it in blender if you have 2 complex objects and one of them is closer to the camera than the other how to make the farther object get less render? | Objective: build a virtual suburb in blender for use in creating exterior shots (not realtime: shots will be rendered in Cycles). The angles of these shots will not be known in advance, so it's impossible to guess in advance which elements need to be high detail and which can be low detail. Large scene becomes unwieldy and incredibly memory-intensive with hundreds or even thousands of high-detail objects, especially when many are not in shot. Scene will be utilized by an artist on home computer, so excessive memory use is not viable. Convenience is the primary objective to maximize efficiency in setting up and rendering shots. Renderer to be used is Cycles. The higher detail of the nearby models would not necessarily be provided by subdivision. A perfect example of the sorts of things I'd be working with are buildings; up close, they would have fully modeled doors, windows, and other small details like flags, while far away, those fine details could be baked into textures, made more rudimentary, or simply omitted altogether. Is it possible to automatically swap out lower detail meshes/materials at long distance for these renders? I am also interested in alternate solutions. Since there are only 20 layers available, the only alternate solution I can come up with would be to divide the suburb into sections and have a high-detail and low-detail version of each section put onto adjacent layers, which the artist will toggle based on the position of the camera and what is visible in the shot, but this would be less than optimal. Any other ideas are welcome. |
The following problem is an exam problem, which I could not do. But I attempted it as far as I can do. Let $y$ be a nontrivial solution of the boundary value problem $$y^{''} + xy = 0, x \in [a, b], y(a) = y(b) = 0.$$ Then $b > 0$ $y$ is monotonic in $(a, 0)$ if $a < 0 < b.$ $y^{'}(a) = 0.$ $y$ has infinitely many zeros in $[a, b].$ It is a Sturm Liouville Problem. If $y$ is a nontrivial solution to the problem, then $y$ is an eigen function corresponding to the eigen value 0. Then we know that the eigen values of a Sturm Liouville Problem can be arranged in an strictly increasing sequence $\lambda_1 < \lambda_2 < ... < \lambda_n < ... $ which tends to infinity. Also we know that corresponding to each eigen value $\lambda_n $, the eigen function $y_n(x)$ has exactly $n - 1$ roots in $(a, b).$ Then the option 4 is False. But I do not know what the $n$ is ? I do not have any idea about other options. I could not even solve the $y^{''} + xy = 0$. Can it be done by Power series method? | Let $y$ be a nontrivial solution of the boundary value problem $$\frac{d^2y}{dx^2}+xy=0,\ x \in [a,b]$$ $$y(a)=y(b)=0$$ Then: $b>0$ $y$ is monotone in $(a,0)$ if $a<0<b$. $y'(a)=0$. $y$ has infinitely many zeros in $[a,b]$ I have no idea how to solve it and which options is/ are correct. please help me. |
I have a *.tex file open in WinEdt which inputs a few other .tex files. Previously, I was able to compile my files by hitting F9 from within any of the files in the Tree panel. But now after any change, I have to go to the main file (at the top of the Tree) and compile from there, which is a bit cumbersome. Any ideas how I can get WinEdt (version 8.0) to compile from anywhere by hitting F9? | I have large LaTeX project (my thesis) with a main TeX file and many subfiles contained in their own subdirectories. The template is available at Cambridge University website Now coming to my question, in WinEdt I can compile the project only when the current document is the main/root document. If I try to run from sub files WinEdt throws an error. Is there any way (like a flag in LaTeXing for Sublime Text) to tell WinEdt to always start compiling from root TeX file. |
Is there any way to configure the "feed" to report only certain specified tags? | I get a lot from Stack Overflow, I want to contribute to others' questions too, but numerous .net, html questions come to the front page, while what I am good at is c and linux. How to filter those questions and just show questions related to my favorite tags? |
So I am writing my thesis in LaTeX for bioengineering, and I have an image of a genetic circuit like so: And I want the caption to read like this: Fig 2.1. Genetic circuit 0x8E. This is a circuit diagram of the circuit 0x8E from the Cello paper. IPTG, aTc and Ara are the input mole.. blah... In where (image of a NAND gate) represents a NAND gate, (image of a AND gate) represents an AND gate, and () represents a NOT gate. Is it possible to add mini-images in the caption itself of an image in LaTeX? | I need to place a small image in the caption of an image, but I don't know how, please help. \begin{figure}[H] \begin{center} \includegraphics[width=9.5cm]{figure.eps}\\ \caption{Some text [SMALL IMAGE HERE].}\label{figure} \end{center} \end{figure} |
I have many hyperlinks to web pages in an Excel file and I want to open those links either in IE or Chrome depending on the link. Most of my links I use I have no issues with opening the default Chrome browser and that is fine but some I wish to open with IE. Is this possible to do with a hyperlink in the Excel file? | A bunch of our network/server/storage hardware uses web interfaces for their administrative portals. I'm currently using an Excel 2010 worksheet to keep track of each device. I have one column set aside to list the URL for each web interface. This makes it easy to simply click the URL to open each administrative portal. My default browser is Firefox. However, some of the administrative portals don't play well with Firefox and require the use of IE. Until now, when I want to open a hyperlink in IE, I have to manually open IE, copy the URL from the Excel worksheet, and paste it into the IE address bar (otherwise it will open in Firefox if I simply click it). It's just an annoying extra couple of steps. So without changing Firefox as my default browser, is there a simple way in Excel 2010 to tell it which hyperlinks to open in IE when they are clicked? I want to choose specifically which links open in which browser (For reference I'm using Windows 7 Enterprise 64-bit) |
How can I rename or open or do anything with this file? Everything I try (rm, mv, cat, less, vi) gives unrecognised option '--.html' So far, only a full ls piped to grep has been useful, or even usable. stewart$ ls -l | grep html -rw-rw-r-- 1 stewart stewart 18262 Mar 13 06:08 --.html | Ok, I have a bunch of files starting with a dash, -. Which is not so good... and I want to rename them. In my particular case I would just like to put a character in front of them. I found the following line that should work, but because of it dash it doesn't: for file in -N*.ext; do mv $file x$file; done If I put an echo in front of the mv I get a bunch of mv -N1.ext x-f1.ext mv -N2.ext x-f2.ext Which is correct, except of course it will think the first filename is options. So when I remove the echo and run it I just get a bunch of mv: illegal option -- N I have tried to change it to for file in -N*.ext; do mv "$file" "x$file"; done but the quotes are just ignored it seems. Tried to use single quotes, but then the variable wasn't expanded... What do I do here? Update: I have now also tried to quote the quotes. Like this: for file in -N*.ext; do mv '"'$file'"' '"'x$file'"'; done And when I echo that, it looks correct, but when I actually run it I just get mv: rename "-N1.ext" to "x-n1.ext":: No such file or directory I have just no clue how to do this now... sigh |
Either my parents or my sisters IS/ARE going to visit... Either my parents or my sister IS/ARE going to visit... Which one is "certainly" correct? | Is it legal to use has in the following question? Would you tell me please whether either my friend Joey or me has to visit the manager tomorrow? Or, instead, should I use have rather than has? |
I created this function to fetch the contents of a url with curl function leggiUrl($url){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); $content = curl_exec($ch); curl_close($ch); return $content; } if I enter a URL whose content is partly generated by a script JavaScript, this text is taken from the function. I would like to grab the text (finished) of any page. Thank you. | I'm looking for a library that has functionality similar to Perl's , but for PHP. Basically, it should allow me to submit HTTP GET and POST requests with a simple syntax, and then parse the resulting page and return in a simple format all forms and their fields, along with all links on the page. I know about CURL, but it's a little too barebones, and the syntax is pretty ugly (tons of curl_foo($curl_handle, ...) statements Clarification: I want something more high-level than the answers so far. For example, in Perl, you could do something like: # navigate to the main page $mech->get( 'http://www.somesite.com/' ); # follow a link that contains the text 'download this' $mech->follow_link( text_regex => qr/download this/i ); # submit a POST form, to log into the site $mech->submit_form( with_fields => { username => 'mungo', password => 'lost-and-alone', } ); # save the results as a file $mech->save_content('somefile.zip'); To do the same thing using HTTP_Client or wget or CURL would be a lot of work, I'd have to manually parse the pages to find the links, find the form URL, extract all the hidden fields, and so on. The reason I'm asking for a PHP solution is that I have no experience with Perl, and I could probably build what I need with a lot of work, but it would be much quicker if I could do the above in PHP. |
I'm making a 3d game, and I have only made games in 2D before, but i have used blender before too. My player can now walk and jump, but he is not limited to only jumping of the ground. In 2D, you separated ground objects in a collision layer, and in the jump method you add an if statement like this if(myCollider.IsTouchingLayers(LayerMask.GetMask("climbing"))) { //do the stuff } Apparently this is designed for 2d only. How do I do this in 3d? | I'm using touch inputs in my game to control the character. I would like to know how to disable my character from jumping again in the air. if (FingerTouchy.phase == TouchPhase.Ended) { charcter.transform.Translate(Vector2.up * speed * Time.deltaTime); float jumpForce = 250; charcter.GetComponent<Rigidbody2D>().AddForce(new Vector2(0, jumpForce)); } Update Im using void OnCollisionEnter (Collision col) { if(col.gameObject.tag == "Ground") { grounded = true; } } And checking if charcter is grounded if(FingerTouchy.phase == TouchPhase.Ended) { float jumpForce=250; if (grounded) continue; charcter.transform.Translate(Vector2.up * speed * Time.deltaTime); charcter.GetComponent<Rigidbody2D>().AddForce(new Vector2(0,jumpForce)); grounded=false; } using collision/collision2d doesn't work too. |
What directions should i be following to use my friends mac to create a bootable usb stick for an old hp pavilion dv4? The hp pavilion doesn't seem to have any operating system, it tries to boot windows but it's 'missing' something and tells me I need to install Windows, but I'd rather install ubuntu. Please help me! | I'd like to create an Ubuntu live USB stick on a Mac to use to install Ubuntu on another machine. How do I accomplish this? |
Sometimes it would be really helpful to ask other users how they would deal with a certain problem, or what best practice would be with regards to solving a problem. This does not involve specific code discussion. Where can I post such questions? From reading the rules StackOverflow doesnt seem appropriate? If there isn't such a place, maybe one should be created? Andy | I just got a question closed because it was rendered subjective by the moderators. The question is important to me and I believe other people would benefit. So, I ask the following non subjective question: on which site of the Stack Exchange ecosystem should I post question? |
Let $M$ be a compact connected $3$-manifold with boundary $\partial M$. If $M$ is nonorientable and $\partial M$ is empty, then how do I see that $H_1(M, \mathbb{Z})$ is infinite? | This is an example from a question sheet (non-assessed) of a university class. If M is a non-orientable, closed, connected 3 manifold, prove $H_1(M;\mathbb{Z})$ is an infinite group. I know that since $M$ is non-orientable it follows that $H_3(M;\mathbb{Z}) = 0$ and since $M$ is connected $H_0(M;\mathbb{Z}) = \mathbb{Z}$. I want to apply a combination of Poincare duality and Universal coefficient theorem to try and find a contradiction if $H_1(M;\mathbb{Z})$ has no free part. However poincare duality doesn't apply here so I'm stuck. I would appreciate any hints as to how to proceed. |
I do understand that this is a common problem, and I have read few of the threads. Here is synopsis of my problem. Logged on to window 8.1, windows installed updates and now grub2 doesn't work Laptop is a Toshiba C55-A Secure boot is disable Turn off fast startup booted with Ubuntu 12.04 LTS Live CD by pressing c accessed grub prompt exited out of grub at which point was able to access boot manager with Windows Boot Manager, Ubuntu, Ubuntu options Selected Ubuntu Booted into Ubuntu sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update sudo apt-get install -y boot-repair && (boot-repair &) Selected recommended repair The output on boot tab from msconfig (windows command prompt) shows only windows 8.1 The output from the bcdedit is as follows Windows Boot Manager -------------------- identifier {bootmgr} device partition=\Device\HarddiskVolume2 path \EFI\Microsoft\Boot\bootmgfw.efi description Windows Boot Manager locale en-US inherit {globalsettings} default {current} resumeobject {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} displayorder {current} toolsdisplayorder {memdiag} timeout 30 Windows Boot Loader ------------------- identifier {current} device partition=C: path \Windows\system32\winload.efi description Windows 8.1 locale en-US inherit {bootloadersettings} recoverysequence {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} recoveryenabled Yes isolatedcontext Yes allowedinmemorysettings 0x15000075 osdevice partition=C: systemroot \Windows resumeobject {xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} nx OptIn bootmenupolicy Standard detecthal Yes Did not see the grub2 menu as expected? Any other ideas References | I have an Ubuntu 13.10 and Windows 8 dual-boot working properly, and upgrading to Windows 8.1 breaks grub2 as expected. However, this time boot-repair was not able to bring grub back for me. My laptop jumps right into windows. I double checked that Windows 8.1 re-enabled fast startup, so I've disabled it. And in my BIOS, UEIF is used for boot and secure-boot is disabled. I have a 500GB GPT partition, in which, sda1 is the efi partion, sda2 is the /boot, sda3 is the / for ubuntu, and sda7 is the swap area. For Windows, sda4 is the msft reserve, sda5 is c://, and sda6 is Windows recovery. Those are (at least) my original setup. Here's the boot info: I also tried mount my hard drive from a live ubuntu session, then re-install grub on /dev/sda, which didn't work either. Is there any other thing I could try to bring my Ubuntu back? |
It is possible to make the caption of a figure in CAPS (versalitas) typeface format? Like as image below. But I want to change only the 'FIGURE 1.1'. Descriptive text label that is invariant. That has not been answered in another post I also want to ask if it is possible to write in bold the test in CAPS format? Code (false) right here for either case: \documentclass{article} \usepackage{mathtools,amsmath} \usepackage{amsthm} \begin{document} \begin{center} \fbox{\parbox[b]{.3\linewidth}{ \begin{center} .......\\This is a figure\\******* \end{center} } } \end{center} \begin{center} \textsc{Figure 1.1:} Solution of $x^2\leq 4$ \end{center} \end{document} | I would like to italicize my figure captions and make them smaller. How can I do that? |
According to an answer in Quora to the question: there is a specific way to position adjectives based in their type, how accurate is this? Ordering of Adjectives#3: Ordering of Adjectives If you have more than one adjective to describe a noun, there is a specific order you put them in, or else the clause will sound very awkward. That order is: Opinion-size-age-shape-colour-origin-material-purpose-noun. The most common example of this is "the lovely little old rectangular green French silver whittling knife." If you put any of those adjectives out of order, the phrase will sound extremely confusing How confusing will sound to mix that order? I mean, would it just sound a little like a non-native speaker or it will mess the sentence meaning completely? Doing a little research on the subject it seems that there is not even a consensus for the right order, so I wonder how important is this or under what conditions it may change (American English has the same order of Brithis English?, etc). Example Order 1: Example Order 2: | When learning the order of adjectives in a sentence, I thought up a word "saSHcomp" standing for the order. Later, I found out that there's a slightly where the shape of a noun comes before its age. So, both "an old round thing" and "a round old thing" are correct and the order of the adjectives depends on the variant of the English one's using, British or American. My question is as follows: Might the confusion of these orders influence negatively the results of English grammar level tests taken in Great Britain or in the USA? Can the use of this or that order manifest, in one single sentence, the origin of the writer, British or American, or, to be more exact, where they lived when they came to school? Do native English speakers themselves ever confuse this order in the writing? What's the order of these two adjectives that is used in the English-speaking world beyond GB and the USA — especially in Canada, Australia, and South Africa? |
My schema 'test' has 3 tables: 'user', 'post' and 'revision'. CREATE TABLE IF NOT EXISTS `test`.`user` ( `iduser` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, PRIMARY KEY (`iduser`)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `test`.`post` ( `idpost` INT UNSIGNED NOT NULL AUTO_INCREMENT, `iduser` INT UNSIGNED NOT NULL, `content` VARCHAR(4000) NOT NULL, `revision_count` INT NOT NULL DEFAULT 0, PRIMARY KEY (`idpost`), INDEX `fk_post_user1_idx` (`iduser` ASC), CONSTRAINT `fk_post_user1` FOREIGN KEY (`iduser`) REFERENCES `test`.`user` (`iduser`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `test`.`revision` ( `idrevision` INT UNSIGNED NOT NULL, `iduser` INT UNSIGNED NOT NULL, `idpost` INT UNSIGNED NOT NULL, `content` VARCHAR(4000) NOT NULL, UNIQUE INDEX `index1` (`idpost` ASC, `idrevision` ASC), PRIMARY KEY (`idrevision`, `iduser`), INDEX `fk_revision_user1_idx` (`iduser` ASC), CONSTRAINT `fk_revision_post` FOREIGN KEY (`idpost`) REFERENCES `test`.`post` (`idpost`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_revision_user1` FOREIGN KEY (`iduser`) REFERENCES `test`.`user` (`iduser`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; And there is the script creates data: INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (1, 'Ann'); INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (2, 'Bob'); INSERT INTO `test`.`post` (`idpost`, `iduser`, `content`, `revision_count`) VALUES (1, 1, 'this is first post', 1); INSERT INTO `test`.`revision` (`idrevision`, `iduser`, `idpost`, `content`) VALUES (1, 1, 1, 'this is old content of first post'); I create 2 sessions work concurrently. Session 1 works with query: BEGIN; INSERT INTO revision (idrevision, idpost, iduser, content) VALUES ((SELECT max_idrevision + 1 FROM (SELECT max(idrevision) AS max_idrevision FROM revision WHERE idpost = 1) AS anon_1), 1, 2, 'abc xyz'); Now session 2 works: BEGIN; UPDATE revision SET idrevision=3 WHERE idpost=1 AND iduser =1; -- will hang by lock -- but with this update UPDATE revision SET content='nwe asdfs' WHERE idpost=1 AND iduser=1; -- not hang I don't know what's lock mysql used with query insert in session 1? Is it row lock or table lock or anything else ? | My schema 'test' has 3 tables: 'user', 'post' and 'revision'. CREATE TABLE IF NOT EXISTS `test`.`user` ( `iduser` INT UNSIGNED NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, PRIMARY KEY (`iduser`)) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `test`.`post` ( `idpost` INT UNSIGNED NOT NULL AUTO_INCREMENT, `iduser` INT UNSIGNED NOT NULL, `content` VARCHAR(4000) NOT NULL, `revision_count` INT NOT NULL DEFAULT 0, PRIMARY KEY (`idpost`), INDEX `fk_post_user1_idx` (`iduser` ASC), CONSTRAINT `fk_post_user1` FOREIGN KEY (`iduser`) REFERENCES `test`.`user` (`iduser`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `test`.`revision` ( `idrevision` INT UNSIGNED NOT NULL, `iduser` INT UNSIGNED NOT NULL, `idpost` INT UNSIGNED NOT NULL, `content` VARCHAR(4000) NOT NULL, UNIQUE INDEX `index1` (`idpost` ASC, `idrevision` ASC), PRIMARY KEY (`idrevision`, `iduser`), INDEX `fk_revision_user1_idx` (`iduser` ASC), CONSTRAINT `fk_revision_post` FOREIGN KEY (`idpost`) REFERENCES `test`.`post` (`idpost`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_revision_user1` FOREIGN KEY (`iduser`) REFERENCES `test`.`user` (`iduser`) ON DELETE NO ACTION ON UPDATE NO ACTION) ENGINE = InnoDB; And there is the script creates data: INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (1, 'Ann'); INSERT INTO `test`.`user` (`iduser`, `name`) VALUES (2, 'Bob'); INSERT INTO `test`.`post` (`idpost`, `iduser`, `content`, `revision_count`) VALUES (1, 1, 'this is first post', 1); INSERT INTO `test`.`revision` (`idrevision`, `iduser`, `idpost`, `content`) VALUES (1, 1, 1, 'this is old content of first post'); I create 2 sessions work concurrently. Session 1 works with query: BEGIN; INSERT INTO revision (idrevision, idpost, iduser, content) VALUES ((SELECT max_idrevision + 1 FROM (SELECT max(idrevision) AS max_idrevision FROM revision WHERE idpost = 1) AS anon_1), 1, 2, 'abc xyz'); Now session 2 works: BEGIN; UPDATE revision SET idrevision=3 WHERE idpost=1 AND iduser =1; -- will hang by lock -- but with this update UPDATE revision SET content='nwe asdfs' WHERE idpost=1 AND iduser=1; -- not hang I don't know what's lock mysql used with query insert in session 1? Is it row lock or table lock or anything else ? If it's row lock, why does second update query in session 2 not hang ? |
<div class="first"></div> <div class="second"></div> I've tried doing this with CSS changing them from float:left & float:right and reversing it under a @media (max-width:820px) query which I'm sure has worked in the past but didn't work. Tried a simple JQuery: if ($(window).width() < 820) { $( ".first" ).insertAfter( $( ".second" ) ); } else { $( ".first" ).insertBefore( $( ".second" ) ); } I know this should be so simple but it's just not playing ball, what am I doing wrong? | Given a template where the HTML cannot be modified because of other requirements, how is it possible to display (rearrange) a div above another div when they are not in that order in the HTML? Both divs contain data that varies in height and width. <div id="wrapper"> <div id="firstDiv"> Content to be below in this situation </div> <div id="secondDiv"> Content to be above in this situation </div> </div> Other elements Hopefully it is obvious that the desired result is: Content to be above in this situation Content to be below in this situation Other elements When the dimensions are fixed it easy to position them where needed, but I need some ideas for when the content is variable. For the sake of this scenario, please just consider the width to be 100% on both. I am specifically looking for a CSS-only solution (and it will probably have to be met with other solutions if that doesn't pan out). There are other elements following this. A good suggestion was mentioned given the limited scenario I demonstrated—given that it might be the best answer, but I am looking to also make sure elements following this aren't impacted. |
I was using a head of garlic (from China, if that helps), And the entire thing seemed healthy and fine, but I got to one of the inner cloves and it had turned ENTIRELY into a very soft powder, I was afraid of breathing it in because some puffed out when I got to it!! I am so confused, it’s such a fine, dry dust-like powder yet the rest is totally fine! Does ANYONE know what this is?? And do I have anything to worry about health-wise now? | Today I cut open a garlic bulb only to discover that the core was mostly black powder. What on earth was that? I've never seen it before in my life. From the outside the bulb seemed to be fine. It wasn't obviously rotten or dark or anything like that. |
Let's say that I have some type of long bar. It is perfectly incompressible. On one side I have a sensor that detects any force. On the other end, I hit the bar with a hammer. From the moment my hammer hits this bar and the moment my force transducer picks up the force on the other end should be instantaneous right? Why would this scenario be any slower than the speed of light? | Is it possible for information (like 1 and 0s) to be transmitted faster than light? For instance, take a rigid pole of several AU in length. Now say you have a person on each end, and one of them starts pulling and pushing on his/her end. The person on the opposite end should receive the pushes and pulls instantaneously as no particle is making the full journey. Would this actually work? |
A page is on HTTPS and all content on it is served from HTTPS, however, this page contains a video player, and once user hits a PLAY button in it, it starts playing a video, that is served from HTTP. 2 questions: Will this page show a broken padlock and get insecure? Will this page get SEO boost from Google (HTTPS factor)? | Google Chrome is probably one of the stricter browsers out there in terms of highlighting SSL errors. Most browsers will point out when you are viewing an HTTPS page which loads insecure images/Javascript, I understand how this is a security issue - an attacker could have modified the non-SSL content in a way which gives them access to the secure content, injected some javascript for example. However once you have viewed an HTTPS page with mixed content, Google Chrome will continue showing you the mixed content warning (a red line through the 'https://') for as long as you stay browsing the same domain, even for subsequent pages which only include other HTTPS resources. Only once you navigate to another domain, or open a fresh tab does it tell you you're secure again. What is the danger it's protecting you from here? How could mixed content on a previous page actually affect the security of subsequent secured pages? I understand that mixed content should be flagged up, but there must be a specific reason that Google is persisting this warning, other than "Well you still need to know about it" |
How can I minimize any browser window using a code (for example 'javascript') ? I would like to minimize browser in infokiosk. | Is there a Javascript or jQuery method to minimize the current browser window? |
I have an unrooted Nexus 4 and running Android 5.0. When the 5.0.1 OTA update came out I could download it and start installing it and then get screen that said error with the android robot on it's back but with no helpful information. I just tried again with 5.1 and I got the same problem. I factory reset my phone and it still doesn't work! Please can someone advise on what to do? Thanks in advance. | I updated to 5.0.1 via OTA sometime ago, and it worked fine. Now I got a notification that 5.0.2 is ready but when Android shuts down to install update it returns error (with no other message. My Nexus 7 is rooted but has the stock recovery. Is there an easy fix that doesn't require factory reset or installing recovery? |
I've downloaded a driver for a video card (*.run) and tried to install within a terminal. When I started the installation process I got this error: ERROR: nvidia-installer must be run as root. I'm logged in with my own profile. | My PC has both Ubuntu and Windows 7 installed. I have installed all my drivers in Windows like Nvidia graphics, motherboard etc. Shall I install them in Ubuntu too? I looked on the web for my Nvidia drivers and I have found a .run file. How could I install it on my Ubuntu? |
I have the following data, i want to define in a elegant way and fast access. Dictionary<string, string> myDictionary = new Dictionary<string, string> { {"a", "1"}, {"b" "2"} }; Now the "1" and "2" defined in 2 different modules x and y. I'm thinking of nested dictionary here. I'm looking for elegant way to define. My thinking: //FileA - Namespace1 Dictionary<string, string> dcA = new Dictionary<string, string> { {"LOC1", "ADDR1"}, {"LOC2", "ADDR2"} }; //FileB - NameSpace1 Dictionary<string, string> dcB = new Dictionary<string, string> { {"LOC3", "ADD3"}, {"LOC4", "ADD4"} }; //FileX - NameSpace 2 static Dictionary<string, string> dc1 = new Dictionary<string, Dictionary<string, string>> { {"LOC1", dcA.GetValue("LOC1"}, {"LOC2", dcA.GetValue("LOC2"}, {"LOC3", dcA.GetValue("LOC3"}, {"LOC4", dcA.GetValue("LOC4"}, }; string myString; string key = "LOC1"; if (!dc1.TryGetValue(key, out myString)) { throw new InvalidDataException("Can't find the your Addr for this LOC"); } Console.WriteLine("myString : {0}", myString) //Expected output as myString : ADDR1 Yes i want to combine 2 dictionary to a new dictionary. The problem is i can access value of new dictionary like this dcA.GetValue("LOC1"}. Trying to see if there a better solution or data struct which i'm not thinking at all. | What's the best way to merge 2 or more dictionaries (Dictionary<T1,T2>) in C#? (3.0 features like LINQ are fine). I'm thinking of a method signature along the lines of: public static Dictionary<TKey,TValue> Merge<TKey,TValue>(Dictionary<TKey,TValue>[] dictionaries); or public static Dictionary<TKey,TValue> Merge<TKey,TValue>(IEnumerable<Dictionary<TKey,TValue>> dictionaries); EDIT: Got a cool solution from JaredPar and Jon Skeet, but I was thinking of something that handles duplicate keys. In case of collision, it doesn't matter which value is saved to the dict as long as it's consistent. |
I have been struggling now for an inordinate amount of time trying to get the brightness adjustment working in Ubuntu. I am running Ubuntu 12.04 on a Lenovo V570 Laptop. I have tried all of the adjustments I can find to "fix brightness control" in the /etc/default/grub file with the following results (before you ask, yes I did run sudo update-grub and sudo reboot after each change): GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=" Result: No response to buttons, slider has no affect. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux acpi_backlight=vendor" Result: No response to buttons, slider has no affect. GRUB_CMDLINE_LINUX_DEFAULT="splash quiet acpi_osi='!Windows 2012'" Result: Limited response to buttons from OS (slider only moves down one tick, then sticks), no dimming, slider has no affect. GRUB_CMDLINE_LINUX_DEFAULT="splash quiet" Result: OS responds to buttons, but screen does not dim. Slider has no affect. Am I missing something? What can I do to adjust the brightness? Update: I did more searching, and I found that in /sys/class/backlight I have both acpi_video0 and intel_backlight. By changing the "brightness" file in each of these folders, I discovered, that editing the /sys/class/backlight/intel_backlight/brightness changed the actual brightness setting on my screen. How do I get Ubuntu to adjust this setting? Any hope of getting my function keys to also adjust it? Update2: As requested, here is the output from lspci: $ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09) | My Lenovo Z570 has two GPU's, nVidia and Intell. Brightness control has no effect what so ever over the screen brightness, and because I've had some major issues in the past when I was trying to fiddle with nVidia drivers and settings, and I wanna be cautious now. I haven't find similar questions referring 14.04 LTS with similar configuration as mine. I've read that it could be fixed by adding/changing content in xorg.conf but when I run sudo gedit /etc/X11/xorg.conf the file comes out to be absolutely empty. What do I need to do, what do I need to add to it and not get my laptop screwed with a black screen again? |
I have equipped and charged the axii sign of the puppet type and it does always make the enemy (drowner, bandit or alghoul) a friend. But with the exception of a group of drowners it never resulted in the puppet attacking the rest of the monsters. I have not been able to repeat the situation so far. Do I have to attack the mob beforehand? Or afterwards? Does it have to be a melee attack? I tend to do the sign right before the fight, as it takes awfully long. For instance, I axii puppeted one of two alghouls, and then walked towards them to make them aggressive. I had the advantage of just one alghoul following me, but never did I see them fighting amongst themselves. My situation differs from the one in , which appears to be a problem of casting. My situation is like the one described . I haven’t equipped delusion. | The Axii sign should allow Geralt to get one enemy to fight on his side for a short while. This sound extremely useful for fighting groups, but I was unable to get it to work so far. What happens when I use it on an enemy is that he gets distracted for a second and some visual effect is visible on the enemy. But he doesn't attack other enemies and the whole thing lasts only a second or so. Am I doing something wrong, or does the Axii sign just not work on many enemies? |
How would you code direction to bearing in Java? For example: Enter compass direction: N Enter compass angle: 30 Enter compass direction: W The code should output 330. My code so far isn't outputting anything (I have not completely finished because I would like to find out what I am doing wrong first) {System.out.println("Do you have either - " + "1: A bearing OR 2: A direction? (Enter number 1 or 2)");} int number; Unit2LastAssignment In1 = null; number = In1.getInt(); if (number == 2) {System.out.println("Enter Compass Direction: ");} String direction1; Unit2LastAssignment In2 = null; direction1 = In2.getString(); {System.out.println("Enter Compass Angle: ");} int angle; Unit2LastAssignment In3 = null; angle = In3.getInt(); {System.out.println("Enter Compass Direction: ");} String direction2; Unit2LastAssignment In4 = null; direction2 = In4.getString(); {if (direction1 == "N") {System.out.println("360");} else if (direction1 == "E") {System.out.println("90");} else if (direction1 == "S") {System.out.println("180");} else if (direction1 == "W") {System.out.println("270");} else if (direction1 == "NE") {System.out.println("45");} else if (direction1 == "SE") {System.out.println("135");} else if (direction1 == "SW") {System.out.println("225");} else if (direction1 == "NW") {System.out.println("315");} else if (direction1 == "N" && direction2 == "E" && angle > 0 && angle < 45) {System.out.println(angle);} else if (direction1 == "E" && direction2 == "N" && angle > 0 && angle < 45) {int angle1; angle1 = 180 - angle; {System.out.println(angle1);}} | 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 was reading and came across this explanation: By using mount -t iso9660 /dev/cdrom /media/cdrom, you tell the system: "take this very long string of bytes that you have in /dev/cdrom, interpret it as a directory tree in the iso9660 format, and allow me to access it under the location /media/cdrom" and other answers along this line. This makes sense and from this logic, I understood that mounting essentially couples a filesystem to a device which interprets the contents of the device in a way that the kernel can fit it into the existing filesystem hierarchy. If this is indeed the case, why is a loop mount needed? Since a mount -o loop is technically identical to the operation mount is meant to do: read a file and interpret its content in the context of a filesystem, why can we not generalize the mount operation without creating a special device? Edit: I understand that a loop device provides a block-device API to a file. My question is, however, more general. How is reading from a regular file (iso or similar disk image formats) different from reading from a special file, if they contain the same data? My mental model of how mount works is this: given an arbitrary set of bytes exposed by a /dev/device file which are consequently interpreted by a filesystem driver (ext4, for example), the mount command associates it with the root hierarchy so that it appears transparent to the end user. However, this arbitrary set of bytes can occur anywhere. If interpreted by a filesystem driver they should be recognized as a valid filesystem. What constrains a filesystem driver to read only from a special file and not a regular file? | I am mounting an ISO file, and looking at . They use the command: $ mount -o loop disk1.iso /mnt/disk I'm trying to understand the use of -o loop. I have two questions: When I look at the long man page for mount, it takes time to find that -o option. If I do man mount | grep "-o" I get an error, and when I look in the file I do not find any info that "loop" is a command text for option -o. Where is that documented? Also, what is the "loop device" concept for mounting? |
Does anyone here know how to print elements from the array one by one? I have this code here: import java.util.ArrayList; import java.util.Iterator; public class SimpleCollection { private String name; private ArrayList<String> elements; public SimpleCollection(String name) { this.name = name; this.elements = new ArrayList<>(); } public void add(String element) { this.elements.add(element); } public ArrayList<String> getElements() { return this.elements; } public String toString(){ String printOutput = "The collection "+ this.name+ " has "+ elements.size()+ " elements: "; String e = ""; if(elements.isEmpty()){ return(printOutput+ " is empty."); }if(elements.size()==1){ return "The collection "+ this.name+ " has "+ elements.size()+" element:"+ "\n"+ elements.get(0)+ "\n"; } e = printOutput + "\n"+ getElements() + "\n"; return e; } } The toString method of mine prints elements as an array: how can i print them one by one? Something like: The collection characters has 3 elements: magneto mystique phoenix | In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the of the array, as defined by Object.toString(): int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray); // prints something like '[I@3343c8b3' But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs: // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5] // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob] |
I cannot find the JavaScript equivalent of PHP array_keys() / array_values(). For people unfamiliar with PHP given the following JavaScript hash: var myHash = {"apples": 3, "oranges": 4, "bananas": 42} How can I get an array of keys, i.e., ["apples", "oranges", "bananas"] The same question with the values, i.e., [3, 4, 42] jQuery can be used. | I know in JavaScript, objects double as hashes, but I have been unable to find a built-in function to get the keys: var h = {a:'b', c:'d'}; I want something like var k = h.keys() ; // k = ['a', 'c']; It is simple to write a function myself to iterate over the items and add the keys to an array that I return, but is there a standard cleaner way to do that? I keep feeling it must be a simple built in function that I missed but I can't find it! |
I have sample string as below : input - {"page":1,"per_page":10,"total":76,"total_pages":8,"data":""} I want to filter out the total_pages as 8 in a sample Java program. For that I thought to build a regex to filter out substring as "total_pages":8, Below is code . **String regex = "/(.*total_pages.*?,/)"; String res = "{\"(page\":1,\"per_page\":10,\"total\":76,\"total_pages\":8,\"data\":)"; System.out.println(res); System.out.println(Pattern.matches(regex,res));** Please tell why It never matches with the substring. | I have several strings in the rough form: [some text] [some number] [some more text] I want to extract the text in [some number] using the Java Regex classes. I know roughly what regular expression I want to use (though all suggestions are welcome). What I'm really interested in are the Java calls to take the regex string and use it on the source data to produce the value of [some number]. EDIT: I should add that I'm only interested in a single [some number] (basically, the first instance). The source strings are short and I'm not going to be looking for multiple occurrences of [some number]. |
How do I find sum of $\sum_{r=2}^\infty \frac{1}{r^2-1}$? The answer given in my book is 3/4. I can decompose the general term into $(\frac{1}{r-1}-\frac{1}{r+1})$ multiplied by 1/2 but since it is infinite I don't know what to do next. How should I do this? | $$\sum_{k=2}^{\infty}\frac{1}{k^2-1}$$ I found that: $$\sum_{k=2}^{\infty}\frac{1}{k^2-1}=\sum_{k=2}^{\infty}\frac{1}{2(k-1)}-\frac{1}{2(k+1)}$$ and $\sum_{k=2}^{\infty}\frac{1}{2(k-1)}-\frac{1}{2(k+1)}$ is a telescopic series so we need $lim_{n \to \infty} \frac{1}{2}-\frac{1}{2(n+1)}=\frac{1}{2}$ but the answer is $\frac{3}{4}$ |
Colors like red and green are not visible to people with colour blindness.So is it a good idea to use red or variations of red as a user interface colour? | I want a green for "correct answer" and a red for "wrong answer". My current choice is rgb(144, 238, 144) for the green and rgb(250, 128, 114) for the red. (See wikilearner.net/wiki for the colours in action.) I have been told that these colors are very close in contrast, making it difficult for a person with red-green color-blindness. What would be a better choice? |
string = (input("Enter your own string: ")) if string == string[::-1]: print("This is a Palindrome") else: print("This is not a Palindrome") I want this code to not care about lower or upper case please | How can I do case insensitive string comparison in Python? I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings. |
Just wondering. How can there have been one thousand avatars in the course of 10,000 years. Must have had pretty long lifespans. Quote to back this up. Jeong-Jeong saying to Aang: You Are Weak Avatar Roku says You think i am weak? Jeong-Jeong says No, no. I did not mean that Avatar Roku says I have mastered the elements a thousand times and now I must do it again. You will teach the Avatar firebending. Jeong-Jeong says | If Avatar Wan lived 10,00 years prior to Korra's lifetime, then how many Avatars have there been? |
I'm writing a Java code that would run a simple automation scenario in Chrome or Firefox - depending on the user's input. It starts running (opens a browser), but then throws java.lang.NullPointerException. I thought then the null I assigned the driver variable would later be overridden, but it isn't. How can this be fixed? Thanks! package com.selenium; import java.util.Scanner; import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class Main { public static void main(String[] args) throws InterruptedException { // environment variable System.setProperty("webdriver.chrome.driver", "C:\\Automation\\libs\\Drivers\\chromedriver.exe"); //WebDriver chromeDriver = new ChromeDriver(); System.setProperty("webdriver.gecko.driver", "C:\\Automation\\libs\\Drivers\\geckodriver.exe"); WebDriver driver = null; Scanner scanner = new Scanner(System.in); int option = scanner.nextInt(); System.out.println("Please enter 1 for Chrome or 2 for Firefox " + option); if (option == 1) { WebDriver driver1= new FirefoxDriver(); } else if (option == 2) { WebDriver driver2 = new ChromeDriver(); } else System.out.println("Please enter a correct number " + option); String baseURL = "https://login.salesforce.com/?locale=eu"; driver.get(baseURL); WebElement userName = driver.findElement(By.id("username")); userName.sendKeys("Yan"); WebElement password = driver.findElement(By.id("password")); password.sendKeys("123456"); WebElement rememberCheckbox = driver.findElement(By.id("rememberUn")); rememberCheckbox.click(); WebElement bLogin = driver.findElement(By.id("Login")); bLogin.click(); } } | 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? |
During making of new variants performing steps. node edit form->add new variant->variant type ->panel->selection rules->node type->context continue->choose layout 2 column->continue->render->standard->continue after this white display occur,i am stuck here.what is the problem. | I have a issue with my Drupal installation, for example: when I enable or disable the modules, It redirects me to a blank page, when I create a new content type and save it, redirects me to a blank page, when I add a new view and save it, it redirects me to a blank page, when I try to clear the cache, it redirects me back to a blank page, or in similar cases. Basically all the confirmation pages redirect me to a white screen. When I refresh it again, it shows me the page. I tried to increase the PHP memory value but it doesn't help. Are there any other solutions for this? The error which I'm having: Fatal error: Allowed memory size of 100663296 bytes exhausted (tried to allocate 8192 bytes) in sites/all/modules/views/plugins/views_plugin_localization_none.inc on line 1 |
I created an animation in blender, exported it as a series of png files, used the blender video editor to merge them as frames in a clip, and continued to add sounds, transitions, etc. to complete the scene. When I attempted to export the final product to a video file, all of the frames were re-rendered, but instead of the correct color view they rendered as greyscale scene view (essentially not even rendering anything). All of the images were overwritten instantly, and the previous hours spent rendering were wasted. Now, I'm trying my hardest to re-render the entire scene, but every time I try to render the animation (or even just a still image), it keeps rendering the greyscale image scene as opposed to the actual product. How can I fix this? Also, once this is fixed, what is the proper way to render the final video? | 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: |
I've been lurking Stack Overflow whenever I had a problem for at least the last 2+ years. More times than not, I find my solution (or cobble one together) before I get frustrated enough to have the innernets help me with my specific custom problem. Many times, the only commentary I would be able to add would be "thanks!" which really only wastes bits and bandwidth. I understand implementing measures to keep the bots and SEO kids out, but sometimes it's a PITA to start participating in a community. If you couldn't extract my question from the above rant (or title), this might be a little more clear: Why do I require 15 reps to just up-vote something? I feel like it's kinda silly. Additionally, I noticed the quote off to the left: We prefer questions that can be answered, not just discussed. yet I have looked around here and haven't been able to find any justifiable explanation. | I think more reputation points should be required to add a new answer than to upvote an existing answer. I don't continually watch for new questions, so usually when I find a question it has already been answered. It seems bit inappropriate to answer an already-answered question in order to contribute to the conversation, but until you earn reputation, you can't upvote or comment; you can only add new answers, which prevents me from contributing at the moment as much as I would like to. This seems backwards to me. If someone incorrectly upvotes a bad answer, the damage is minimal, as other users can down vote it and upvote the correct answers. On the other hand, an incorrect answer wastes the time of everyone who reads it. So, IMHO, it should require more reputation points to add an answer than to upvote or comment on an existing answer. I wouldn't say say that users should be prevented from answering unanswered questions until they have x reputation points, as that might prevent users who have answers from providing them, but perhaps it should be required if the question is already answered, to discourage users from reiterating previously given answers. What do you think? |
My 5 year old pristine laptop decided to die. Every time I plug in the power it shorts the adapter so I think my motherboard is gone. Is it possible in anyway to boot into that install from another different Intel based laptop? Through a virtual machine? Or some sort of safety mode? I know there is naturally a driver issue here but it's there any way to overcome it? I'm running fedora 25. | I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle? Obviously xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of? Assume the 2 computers are from the same era, ie both i7s but slightly different hardware. Update: Thanks for the answers. This is mostly for my own curiosity. I have my linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than 2 monitors. But not any time soon |
To have text and images on the same slide, I use this kind of code: \frametitle{My title} \begin{tabular}{l} \parbox{0.5\linewidth}{ \begin{itemize} \onslide<2->{\item Item 1} \onslide<3->{\item Item 2} \end{itemize}} \end{tabular} \begin{tabular}{c} \only<2>{\includegraphics[height=3cm]{Image1}} \only<3>{\includegraphics[height=3cm]{Image2}} \end{tabular} I'm pretty happy with the output, except for this small detail: even if Image1 and Image2 are the same dimensions in pixels, Image2 is slightly shifted to the right compared to Image1. Any idea how to fix this ? | I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines? |
I’m loading a JSON file a reading the values into an array using a for loop I’m concerned that sometimes the JSON file might become corrupted ie the values Im reading in might become ASCII letters ie 1t3 where the value should of been 123 Is there a test case where you could say if values[a] does not equal a number then set it to “ “ or blank Thanks, Ben | What's the cleanest, most effective way to validate decimal numbers in JavaScript? Bonus points for: Clarity. Solution should be clean and simple. Cross-platform. Test cases: 01. IsNumeric('-1') => true 02. IsNumeric('-1.5') => true 03. IsNumeric('0') => true 04. IsNumeric('0.42') => true 05. IsNumeric('.42') => true 06. IsNumeric('99,999') => false 07. IsNumeric('0x89f') => false 08. IsNumeric('#abcdef') => false 09. IsNumeric('1.2.3') => false 10. IsNumeric('') => false 11. IsNumeric('blah') => false |
When a user votes, but they have under the rep requirement. Upvoting - less than 15rep; Downvoting under 125rep - () They get this message: Thanks for the feedback! Votes cast by those with less than 125 reputation are recorded, but do not change the publicly displayed post score. My question is, where exactly are they "recorded"? What happens to them? | On many stackexchange sites I haven't enough reputation to cast an up-vote. Always I get the message "Thanks for the feedback! Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score". What does recorded mean exactly? Can the owner of the up-voted question/answer see in any kind, that he/she got my up-vote? Does he/she get rep for this? What happens with these votes, if I reach the 15 rep? Will they take effect subsequently? Or are they just recorded for my "vote-history"? |
Let k ≥ 1 be an integer and consider a sequence $n_1, n_2, . . . , n_k$ of positive integers. Use a combinatorial proof to show that $\binom{n_1}{2}$ + $\binom{n_2}{2}$ +...+ $\binom{n_k}{2}$ $\le$ $\binom{n_1 + n_2 + ...+ n_k}{2}$ For each $i$ with $1 ≤ i ≤ k$, consider the complete graph on $n_i$ vertices. How many edges does this graph have? Stuck on this problem and I don't know how to start. Was wondering if someone can point me to the right direction. | Let k ≥ 1 be an integer and consider a sequence $n_1, n_2, . . . , n_k$ of positive integers. Use a combinatorial proof to show that $\binom{n_1}{2}$ + $\binom{n_2}{2}$ +...+ $\binom{n_k}{2}$ $\le$ $\binom{n_1 + n_2 + ...+ n_k}{2}$ |
What is a regular expression for a positive integer? I need it in an if clause in a bash script and I tried [[ $myvar == [1-9][0-9]* ]] and I don't get why it says, for instance, that 6 is not an integer and 20O0O0 is. | I want to check if a variable has a valid year using a regular expression. Reading the I understand I could use the operator =~ Looking at the example below, I would expect to see "not OK" but I see "OK". What am I doing wrong? i="test" if [ $i=~"200[78]" ] then echo "OK" else echo "not OK" fi |
A user in the comment section of noticed that the question also appeared on another website: Actually, it appears that this website is actively copying posts from Mathematica SO and pasting them there. Is there something that SE can do in such a situation? | of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means: Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow: You have to provide . Simple links to the original post and author info are just fine. You have to and allow other people to use your content, as long as they follow these very same rules. How meta! (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.) There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short). In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery. So, the question is: what can you do if you spot a SCRAPER? |
I've heard that the $\alpha$ and $\beta$ parameters of the Beta distribution intuitively represent the number of successes and failures, respectively. 1) If so, what's the purpose of subtracting $1$ from them in the exponent? 2) If so, why would then $\alpha=1$ and $\beta=1$ represent a uniform distribution? Do we assume that there is one success and failure initially? Does this have anything to do with Laplace's Rule of Succession? 3) How can we intuitively understand positive real-valued shape parameters for the distribution? | Disclaimer: I'm not a statistician but a software engineer. Most of my knowledge in statistics comes from self-education, thus I still have many gaps in understanding concepts that may seem trivial for other people here. So I would be very thankful if answers included less specific terms and more explanation. Imagine that you are talking to your grandma :) I'm trying to grasp the nature of beta distribution – what it should be used for and how to interpret it in each case. If we were talking about, say, normal distribution, one could describe it as arrival time of a train: most frequently it arrives just in time, a bit less frequently it is 1 minute earlier or 1 minute late and very rarely it arrives with difference of 20 minutes from the mean. Uniform distribution describes, in particular, chance of each ticket in lottery. Binomial distribution may be described with coin flips and so on. But is there such intuitive explanation of beta distribution? Let's say, $\alpha=.99$ and $\beta=.5$. Beta distribution $B(\alpha, \beta)$ in this case looks like this (generated in R): But what does it actually mean? Y-axis is obviously a probability density, but what is on the X-axis? I would highly appreciate any explanation, either with this example or any other. |
How is Yongnuo allowed to copy Canon, and why does Canon allow it? Does Canon see a significant loss in sales to Yongnuo? | Yongnuo has recently released their 50 mm f/1.8 lens that is almost identical to the Canon 50 mm f1.8 in their external design. They've also created a lot of clones of Canon flashguns and accessories like YN600EX-RT (Canon 600EX-RT) and the YN-E3-RT Radio Transmitter (ST-E3-RT Speedlite Transmitter) that are actually not that easy to tell apart from the Canon counterparts. I guess that the patents regarding the 50 mm lens might be outdated, but the 600EX-RT was released in March 2012 so surely its protection must still be valid. How can these products be legal to sell, and perhaps more important to photographers, are they legal to buy? I realise that law may differ a lot between countries, but a general answer would be helpful too. |
With the death of Chrome for 32-bit Ubuntu, is there a way to watch Netflix using Chromium? The old Firefox/pipelight solution works, but performance is much worse than native Netflix on Chrome. The solution at has not worked for me. Updating to 64 bit hardware is not an option for me at this time. | Just got the Firefox 49 update (yay!) But Netflix still wants to install Silverlight (boo!) How can I watch Netflix in Firefox, as ? |
I have a piece of code here that theoretically should work, but in fact it doesn't. Extras = getIntent().getExtras(); if(Extras!=null) if(Extras.getString("startup")!=null) StartUp = Extras.getString("startup"); else StartUp = "0"; prefs = this.getSharedPreferences("runonstartup", 0); start.setChecked(prefs.getBoolean("yesorno", false)); Toast.makeText(getApplicationContext(), "Start-up: "+StartUp+"\nChecked: "+String.valueOf(start.isChecked()), Toast.LENGTH_LONG).show(); if(StartUp=="1"&&start.isChecked()) { new PostTask3().execute("testing"); } The toast there shows: Start-up: 1 and Checked: true. Yet "if" fails to evaluate the expression as true and run PostTask3. Help ... ? | 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? |
Q) $x^{2}+x+1$ is a factor of $(x+1)^{n} - x^{n} - 1$, whenever (A) $n$ is odd (B) $n$ is odd and a multiple of $3$ (C) $n$ is an even multiple of $3$ (D) $n$ is odd and not a multiple of $3$ My Attempt :- I don't know the formal approach to prove it. I have taken some small values of $n$ and I have eliminated options (A),(B) and (C) as :- Here, I can rewrite $(x+1)^{n} - x^{n} - 1$ as :- $[\binom{n}{0}x^{n} + \binom{n}{1}x^{n-1} + \binom{n}{2}x^{n-2} +......+\binom{n}{r}x^{n-r}+.....+\binom{n}{n-1}x^{1} + \binom{n}{n}x^{0}] – x^{n} - 1$ $\binom{n}{1}x^{n-1} + \binom{n}{2}x^{n-2} +......+\binom{n}{r}x^{n-r}+.....+\binom{n}{n-1}x^{1}$ Now, if $n=3$ then it becomes $3x^{2} + 3x$. Since , $x^{2}+x+1$ does not divide it. So, $x^{2}+x+1$ is not a factor of $(x+1)^{n} - x^{n} - 1$ when $n=3$ , So, I have eliminated options (A) and (B) Now, when $n=6$ then it becomes $\binom{5}{1}x^{5} + \binom{6}{2}x^{4}+\binom{6}{3}x^{3}+ \binom{6}{4}x^{2}+\binom{6}{5}x^{1}$ $=6x^{3}(1+x+x^{2}) + 6x(1+x+x^{2}) + 9x^{4}+8x^{3}+9x^{2}$.So, $x^{2}+x+1$ is a not a factor of $(x+1)^{n} - x^{n} - 1$ when $n=6$. So, I have eliminated option $(C)$. So, I am getting answer as $(D)$ but I don't know how to prove it formally for all $n$=odd which should also not be multiple of $3$. Please help. | I have to find the form of n i.e. whether n is even or odd and whether it is multiple of 2 or 3 such that: $x^2 + x + 1$ is a factor of $(x+1)^n - x^n - 1$ What I tried: $$x^2 + x + 1 = (x + 1)^2 - x $$ also, $$(x+1)^n-x^n-1= \binom{n}{o}x^n + \binom{n}{1}x^{n-1} + ... + \binom{n}{n-1}x + \binom{n}{n}.1 - x^n - 1$$ $$=\binom{n}{1}x^{n-1} + ... + \binom{n}{n-1}x$$ after getting this far I tried with taking x and n common but still couldn't able to find the right direction. I need extra hints to solve this. |
Suppose $\mathbb{F}$ is an infinite field. Define $p:\mathbb{F}\to\mathbb{F}^2$ as $p(t)=(p_1(t),p_2(t))$ where $p_1,p_2:\mathbb{F}\to\mathbb{F}$ are polynomials. Show that the image of $p$ lies in the zero set of some polynomial $q:\mathbb{F}^2\to\mathbb{F}$. (Bonus) Give a lower bound to the degree of $q$. Any polynomial $q:\mathbb{F}^2\to\mathbb{F}$ of degree $D$ looks like $$q(x,y)=\sum_{0\leq i+j\leq D}c_{ij}x^iy^j\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;(1)$$ where $c_{ij}\in\mathbb{F}$. Now finding $q$ is solving the equation $$q(p(t))=q(p_1(t),p_2(t))=0.(2)$$ Plugging (1) in (2) we will have the equation $$\sum_{0\leq i+j\leq D}c_{ij}p_1(t)^ip_2(t)^j=0,\;\;\text{ for all }t\in\mathbb{F}.$$ Since this is true for all $t\in\mathbb{F}$ and the field is infinite, we can choose $t_1,t_2,\ldots,t_{N=\frac{(D+1)(D+2)}{2}}$ values for $t$ from $\mathbb{F}$ so that we get a system \begin{cases} \sum_{0\leq i+j\leq D}c_{ij}p_1(t_1)^ip_2(t_1)^j=0\\ \vdots\\ \sum_{0\leq i+j\leq D}c_{ij}p_1(t_N)^ip_2(t_N)^j=0 \end{cases} So now we want to show that there exists those $t_1,t_2,\ldots,t_N$ that make this system not invertible. How to do that? | I have started working through the textbook Ideals, Varieties, and Algorithms by Cox, Little, and O'Shea and I am stuck on one part of an introductory question. The question begins by getting one to show (1) If $f(t)$ and $g(t)$ are polynomials of degree $\le n$ in $t$, then for $m$ large enough, the monomials $$[f(t)]^e[g(t)]^f$$ with $e+f\le m$ form a linearly dependent set in $k[t]$. The next part of the question asks one to deduce (2) If $C\,:\,x=f(t),\,y=g(t)$ is any polynomial parametic curve in $k^2$, then $C$ is contained in $\textbf{V}(F)$ for some $F\in k[x,y]$. I have demonstrated (1), but I am at a loss as to how to use that fact to prove (2). It doesn't seem like it is supposed to be a hard problem, but never the less I am having trouble wrapping my head around it. Additionally I assume that for (2) we are not interested in the trivial solution $F=0$. [Added for completeness] To do part (1), we recognize that if $\deg(f),\deg(g)\le n$, then $$\deg\left([f(t)]^e[g(t)]^f\right)\le ne+nf\le nm$$ Hence if we have more than $nm+1$ polynomials of the form $[f(t)]^e[g(t)]^f$ then we have a dependent set (since $d+1$ is the dimension of the vector space of polynomials of degree less than or equal to $d$). Now we simply count the number of polynomials in this form (this was an exercise before the problem) - it is $\binom{m+2}{2}=\frac{1}{2}(m+1)(m+2)$ from a standard application of . Ensuring $m$ large enough (specifically $m>2n-3$) gives us the conclusion. |
I have a expired Indian Passport with a Valid US Visa in perfect condition. Due to some unfortunate event the old US Visa(expired in 2015) on the expired Passport got smudged and now looks a bit faded. Is the expired Passport now invalid, and so is the Valid US Visa which in perfect condition? Do I need to get the Visa re stamped on the new Passport? Thanks. | I have a valid B1/B2 US visa expiring about a year from now. The passport it's in expired a few years ago, and I recently got a new one. The passport number does not match, but the national ID number, mentioned in both, does (it used to be the same as your national ID, but not anymore) Can I travel to the US carrying both passports? Or is it asking for trouble? (I read a few years ago that it was possible, but that might have changed) Should I just get a new visa to avoid potential complications? |
I have been trying to write a Python script that uses global variables. I am getting what seems to be unexpected results in my code. Instead of dumping all the code here, I have created a small piece of code to show what I'm seeing. def func1(): global aaa aaa = 1 def func2(): while aaa < 5: print(aaa) aaa += 1 func1() func2() I am expecting to get, 1 2 3 4 What I get instead is, Traceback (most recent call last): File "test2.py", line 11, in <module> func2() File "test2.py", line 6, in func2 while aaa < 5: UnboundLocalError: local variable 'aaa' referenced before assignment If I change func2 to remove the while loop & just print the aaa variable, it works fine, so the global variable is accessible. def func1(): global aaa aaa = 1 def func2(): print(aaa) func1() func2() Running it produces, 1 If I set the aaa value at the top of func2 it also works. def func1(): global aaa aaa = 1 def func2(): aaa = 1 while aaa < 5: print(aaa) aaa += 1 func1() func2() Which results in, 1 2 3 4 I have experience with Perl, but am new to Python. Is there something that I'm missing here? | The following code works as expected in both Python 2.5 and 3.0: a, b, c = (1, 2, 3) print(a, b, c) def test(): print(a) print(b) print(c) # (A) #c+=1 # (B) test() However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons: Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error? The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists. Could someone please explain this behavior? |
Back in the day, when SO Documentation was in its beta phases and had its own meta site, I registered and added it to my sites on the android app. I just noticed it appears as "Unknown Site docs-beta": I'm guessing the same behavior would reproduce with any closed site (such as failed betas), although I can't think of a way to test this theory at the moment. System details: App version: 1.0.89 Android version: 5.1.1 Phone model: Nexus 4 P.S. IMHO, this is a bug report on the android app, not a documentation specific question. If the mods, disagree, please migrate it to MSO. | Recently I was in the private beta for Game Theory, however it didn't take off and the site was closed down. When the site was closed, it was automatically removed my from my favorites in the drop down menu on the desktop version. The android app however did not remove it from the favorites and now is reporting it as an unknown site. It seems like the site should have been removed from the desktop and android versions at the same time. When I went in to edit the pinned sites on my android app they did not appear and were gone when I canceled. So the app will correct itself but you must go in to attempt to edit first. |
My system: Ubuntu14.04 Linux version 4.4.0-144-generic (buildd@lgw01-amd64-023) (gcc version 4.8.4 ) I try to change the login procedure to realize a function that a NULL string and my password can both login in Ubuntu.Some web info suggest me download util-linux-2.13-pre7.tar.bz2 and remake the login.c.But when I make the login.c(in util-linux-2.13-pre7/login-utils/),there is a error: /usr/include/time.h:192:15: note: expected ‘time_t *’ but argument is of type ‘int32_t *’ extern time_t time (time_t *__timer) __THROW; I have google this error and knew that is a 32bit/64bit linux bug.So I doubt that the login.c in util-linux-2.13-pre7.tar.bz2 is not suitable for Ubuntu14.04. So my question are : 1.If the util-linux-2.13-pre7.tar.bz2 is not suitable for Ubuntu14.04,which version is suitable for Ubuntu14.04. 2.Could I change the login procedure through remake login.c? | I am assuming that all application installed through apt-get are open source; but for those that are available in that manner, where can I get the source code for these applications as well as update them? I have a couple applications I use regularly that aren't being actively developed any longer and I would like to add features. Where would I go to get the rights to update these applications? In this case specifically, I am referring to the hellanzb package |
what is the right way to say? "combat sports lesson" (sports with s) or "combat sport lesson"? It should not mean a specific style of combat sport like wrestling or karate. It should mean combat sport in general. Thank you. | Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better... Well, you know, several times, or better, many times, we use this form: If I want to say: "development of special weapons was the first point in Hitler's program..." I will say this (a better form): "special weapon development was..." OK... is it "special weapon development" or "special weapons development" (note the plural...) what's the grammar rule in order to understand how to use this very used form? |
My directory structure: root\bin\run.sh \\main shell file i am trying to write root\folder1\script.py root\folder2\script2.py So, I want to execute run.sh (from anywhere).. and then first execute python root\folder1\script.py python root\folder2/script2.py But, I don't want to give the full path.. as that might change (depending on which system, I am running the code...) but the relative paths between run.sh script.py and script2.py will not change.. So, how do i do this in shell? | How do I get the path of the directory in which a script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application |
This happened within the last hour or so on Mi Yodeya: The achievements drop-down is similarly affected. This happens on every site I've tried (responsive or old design, with or without an account) except for Meta.SE, which has the correct icons. I see that some (but not all) HNQ icons in the right column are also affected, but haven't looked for a pattern there. I know that "meta is different", but this isn't the kind of "different" we usually see. | I see the same problem has occurred in the past, the most-linked one being Is this happening for anyone else? I've marked the icons I could recognize as incorrect. This exists on every page, is on both chrome and firefox (from Ubuntu 16.04), and persists after hard-refreshes in each. Edit: The icons in Meta's Hot Network Questions tab appear to be consistently accurate. Every other page I checked (including Unix, Workplace, English Language & Usage, Money, and Sci-fi) have a handful of incorrect ones, even for some of the same questions that are displayed correctly in Meta. Further note: if it matters, the icons are also incorrect in the drop down community-search feature on the right end of the header. Again, they appear correct on this Meta page, and incorrect on all other pages I've checked. Some of the ones that are consistently incorrect: computational science constructed languages movies and TV raspberri pi rpg russian language science fiction and fantasy sitecore skeptics super user latex workplace That distribution seems skewed, but I may just be disproportionately familiar with the sites at the end of the alphabet. Many others could be wrong, those are just the ones I could recognize. Last edit: apparently my Google skills were lacking - was asked an hour prior. |
Let $A, B$ - sets such that $A \setminus B$ is infinite, $B$ - finite. Proof that $(A \setminus B) \sim A$ | A is a finite subset of S, which is an infinite set. How can I prove that $|S| = |S \setminus A|$? I just finished proving that $|T \cup S|$ where $T$ is infinite and $S$ is countable is $|T|$. They seem related but I can't solve it because I am confused by the concepts. Can someone help me? |
I use this html code and it works well. The button can be clicked and change a page like I want to. <table id="myTable" style="background-color: #FAF0BA; width: 95%"> <thead> <tr align="center" style="background-color: #009972; color: #FAF0BA;"> <td>#id</td> <td>name</td> <td>info</td> </tr> </thead> <tr align="center" style="background-color: #8AABBA; color: #FAF0BA;" > <td>1</td> <td>jui co.</td> <td><button style="background-color: #FAF0BA; color:#00CCA5;" data-role ="button" data-mini="true" data-inline="true" data-icon ="info" class="info" value="1">info</button></td> </tr> </table> now i want to add id and name into sqlite database. After i add i wan to show is under div id="my_data" using$('#my_data').empty().append(). my code that append is the same as code i use above. function renderList(tx, results) { var htmlstring = '<table id="myTable" style="background-color: #FAF0BA; width: 95%">\n'; htmlstring += "<thead>\n"; htmlstring += "<div id=\"current_login\" style=\"background-color: #009972;\"></div>\n"; htmlstring += "<tr align=\"center\" style=\"background-color: #009972; color: #FAF0BA;\">\n"; htmlstring += "<td>#id</td>\n"; htmlstring += "<td>name</td>\n"; htmlstring += "<td>info</td>\n"; htmlstring += "</tr>\n"; htmlstring +="</thead>\n"; var len = results.rows.length; for (var i = 0; i < len; i++) { htmlstring += "<tr align=\"center\" style=\"background-color: #8AABBA; color: #FAF0BA;\" >"; htmlstring += "<td>" + results.rows.item(i).cid + "</td>"; htmlstring += "<td>" + results.rows.item(i).name + "</td>"; htmlstring += "<td><button style=\"background-color: #FAF0BA; color:#00CCA5;\" data-role =\"button\" data-mini=\"true\" data-inline=\"true\" data-icon =\"info\" class=\"info\" value=\"" + results.rows.item(i).cid + "\">info</button></td>"; htmlstring += "</tr>"; } htmlstring +="</table>"; $('#my_data').empty().append(htmlstring); } It shows on screen but is look like when I did't import jquery and jquery mobile (which I did and it works well on the first code) and went I click the button, it doesn't work. It look like it isn't loading jquery and jquery mobile. It looks the same when I remove jquery and jquery mobile import and run the first code. How to make it work? ps.my click code. $(document).ready(function () { $(".info").on("tap", function () { document.location.href = "./customer_info.html" + "#id=" + $(this).attr("value") + "&name=" + uid; }); }); --------------------------update1------------------------ i try the code below but it still don't work $(document).ready(function () { $('#my_data').on("tap",".info", function () { document.location.href = "./customer_info.html" + "#id=" + $(this).attr("value") + "&name=" + uid; }); }); | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
It's a time cost heavily job when compile something on server. But, my VPS ssh connection is unstable. Connection will be lost in about 10 minutes. How can I let my command continue run when ssh connection lost ? | I'm working on a Linux machine through SSH (Putty). I need to leave a process running during the night, so I thought I could do that by starting the process in background (with an ampersand at the end of the command) and redirecting stdout to a file. To my surprise, that doesn't work. As soon as I close the Putty window, the process is stopped. How can I prevent that from happening?? |
I have fixed many 404 pages on the site, and added a few blogs with deep links, and some good authoritative backlinks, but it is still not ranking. Tried submitting to webmaster, added some fundamental SEO apps, but worried this is going to take a year to come back to life because of the 404s that I had. Any ideas on what could be the problem. I have tried literally everything, the URLs are canonical, etc.. still issue... I use to have really high ranking bog, but I hosted it on a different site, and forwarded my blog links to this other site, then I thought traffic would be higher if I matched everything over to the same site, but appears this was more of an issue, | There has been a significant drop (90%) in traffic from Google to one of my well-established sites (6+ years) in the last week. Searches show that the top 3 wide keywords all dropped 4 spots. Searches for other keywords do not show ANY results in the first 10 to 25 pages of results, while previously one 1st or 2nd page at most. Since there are , the question really is: What steps are necessary to figure out what caused such a drop? There have been no major changes during this period or the last month on the site and certainly not in the homepage which has dropped in rank. Over all the years of running this site and plenty of others, I have never experienced this. There are is duplicate content on my site and I have rigorously used canonical links for the last few years to ensure it is not misinterpreted as such. |
How can I prove this: $$a^x\times a^y=a^{x+y} $$ when $card(A)=a$ , $card(X)=x$ and $card(Y)=y$. | Let $A,B,C$ be sets, and $B \cap C=\emptyset$. Show $|A^{B \cup C}|=|A^B \times A^C|$ by defining a bijection $f:A^{B \cup C} \rightarrow A^B \times A^C$. Any hints on this one? Thank you! |
I want to delete a file but it cannot be deleted because is used by another program. how can I find the program which is using this file? I've seen task manager but there is nothing there to find out it! I'm using windows 7. | On Windows XP, when I try and delete a specific file it says: Cannot delete blah.blah: Make sure the disk is not full or write-protected and that the file is not currently in use. How can I go around this warning and delete it anyway? |
I have got this weird bug were my number is really long like this: I think it is so because i get it from a label. Double(lblsSteppers[i].0.text!)! I also seems to happen to only certain numbers like 9.2. But i don't know a way to prevent it. So does anybody also else have encountered this? And what have they done to prevent it. Update: The error that i got is floating-numbers of some sort. So now somebody suggest to format the numbers for viewing them. But how can i do that? | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
I need to use the 'checked' option in a radio button, but I want to use it dynamically. That is, either the right or the left button is pre-checked based on data from a database and the user can choose to accept or change it. To do this, I need the String "checked" as part of my radio button tag. I created two variables, chekR and chekL, with the plan that one of them would evaluate to "" while the other would evaluate to " checked". However, my IF condition fails to do the job. The value Right or Left comes from a form, and I tried printing it, which works fine, but the actual comparison is failing. The variable passed from the form is stored as String D. If I try evaluating (D == "Right"), it returns a false every time. I tried two IFs (see code), I tried IF-ELSE, but no success. String chekR = ""; String chekL = ""; if(D == "Left") { chekL = " checked";} if(D == "Right") { chekR = " checked";} <form action = update3.jsp><br> <input type="radio" name="PtEye" value="Right" <%=chekR%>>Right <input type="radio" name="PtEye" value="Left" <%=chekL%> required>Left <br><input type="submit" value="Confirm"><input type="reset" value="Restore to original"></form> I need the expression <%=chekL%> to produce either a blank or the word checked, depending upon the value of D. | 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'm having trouble about understanding id in Python3. I always thought holding same value means pointing to same address until i got output like this : >>> a = 1000 >>> b = 1000 >>> id(a) 140241096743312 >>> id(b) 140241096274640 >>> id(1000) 140241096274800 >>> c = 5 >>> d = 5 >>> id(c) == id(d) True Why am i getting different addresses ? What makes 1000 special or different from 5 so that variables point different addresses ? | Why does the following behave unexpectedly in Python? >>> a = 256 >>> b = 256 >>> a is b True # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False # What happened here? Why is this False? >>> 257 is 257 True # Yet the literal numbers compare properly I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100. Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not? |
The energy lost on charging a capacitor can be easily found from the change in energy of the components of the circuit and the energy supplied by the battery. On charging a capacitor I know that the energy loss appears as heat in the internal resistance of the battery and the wires. But what if I take (Purely theoretically) a battery with 0 internal resistance and wires with 0 resistance? I can't see why the capacitor won't be charged, so from the calculation there must be energy dissipated in the circuit. So in that case, where is the heat dissipated? Or is this ideal case faulty? | For a simple circuit with a battery supplying a voltage $V$ to a capacitor, let us assume that the charge on the capacitor is $Q$. Now, the work done by the battery or the energy supplied is given by the relation: $$W=QV$$ But the energy stored in the capacitor is given by: $$U = \tfrac12 QV$$ The value of $Q$ as well as that of $V$ should be the same in both the equations. Now my question is, where is the other half of the energy that the battery supplied? |
I installed prime-indicator, which allows to quickly switch between Intel and Nvidia graphics cards, as reported here: No problems with Unity or Gnome Shell, but here what happens in xfce4 environment, with the appindicator plugin: How to solve? | I have strange problem. My Wallch icon is huge. See the screenshot: I removed XFCE settings and reordered items a little. How can I restore normal Wallch icon size? Update: My /usr/share/applications/wallch-nautilus.desktop file: [Desktop Entry] Version=4 Name=Wallch Comment=Change desktop wallpapers automatically Exec=/usr/bin/wallch %U Icon=wallch Terminal=false Type=Application Categories=Utility;Application; MimeType=inode/directory; Actions=Change_Wallpaper;Start; [Desktop Action Change_Wallpaper] Name=Change Wallpaper Once Exec=/usr/bin/wallch --change TargetEnvironmet=Unity [Desktop Action Start] Name=Start/Stop Wallpapers Exec=/usr/bin/wallch --start TargetEnvironment=Unity And the /usr/share/pixmaps/wallch.png: |
I have Ubuntu 13.04 installed on a Gigabyte BRIX and serving as a HTPC (plugged into my television through a HDMI connection) My question is pretty simple, is it possible to start Ubuntu without the Unity desktop and still be able to launch graphical applications such as XBMC ? | I want to do a small computer just for internet browsing. I dont want to load a desktop environment to keep RAM, CPU and GPU ussage as low as possible. The computer is going to run on a ARM CPU. I dont care with Distro I use, I thought about good old plain Debian. |
Let $a_1,a_2,a_3,a_4\in\Bbb R$ such that $a_1+a_2+a_3+a_4=0$ and $a_1^2+ a_2^2+ a_3^2+ a_4^2$ = 1. Then find the maximum value of the expression $(a_1-a_2)^2 + (a_2-a_3)^2 + (a_3-a_4)^2 + (a_4-a_1)^2$ question has been asked here before, however previously only the minimum value was asked. For $a_1=\frac{1}{2}, a_2=\frac{-1}{2}, a_3=\frac{1}{2},a_4=\frac{-1}{2}$ the expression is $=4$ and I can see that this is probably the maximum. However I can't think of how to prove it. Any hints will be appreciated, thanks | If $a_{1},a_{2},a_{3},a_{4}\in \mathbb{R}$ and $a_{1}+a_{2}+a_{3}+a_{4}=0$ and $a^2_{1}+a^2_{2}+a^2_{3}+a^2_{4}=1.$ Then Range of $$E =(a_{1}-a_{2})^2+(a_{2}-a_{3})^2+(a_{3}-a_{4})^2+(a_{4}-a_{1})^2$$ is Try: From $$(a_{1}-a_{2})^2+(a_{2}-a_{3})^2+(a_{3}-a_{4})^2+(a_{4}-a_{1})^2$$ $$=2(a^2_{1}+a^2_{2}+a^2_{3}+a^2_{4})+2(a_{1}a_{2}+a_{2}a_{3}+a_{3}a_{4}+a_{4}a_{1})$$ $$=2-2(a_{1}+a_{3})(a_{2}+a_{4})=2+2(a_{1}+a_{3})^2\geq 2$$ and equality hold when $\displaystyle a_{1}=-a_{3}$ and $a_{2}=-a_{4}$ Could some help me how to find its upper bound, Thanks |
HIV spreads only through body fluids. If a mosquito bites an HIV infected individual and then an uninfected individual, will the virus spread to the new individual? | It is known that HIV is usually transmitted by direct blood or body fluid contact between an infected individual and a healthy person (like blood transfusion or needle sharing): Suppose a mosquito bites an individual suffering from AIDS and in the process sucks up some T cells infected with HIV along with RBCs. Then it bites another person not suffering from the disease, and transfers these infected T cells. Isn't there a high probability of the second individual contracting HIV? |
Using natbib together with hl or st from soul (or soulutf8) produces Argument of \@citex has an extra }. [{\st\cite] errors, as already mentioned in . While a solution is to wrap all the \cite commands with an additional pair of curly brackets, or when this fails with \mbox, this solution may not be very convenient. Consider in particular the situation in which we have a document, in which for some reason we are forced to use natbib for the references (like what happens when using revtex document classes). We have lots of text with lots of \cite in it. We want to define a command \remove that highlights text to be removed, with something like \newcommand{\remove}[1]{{\color{red}\st{#1}}}. To use this command in blocks of text containing lots of \cite can be very annoying, requiring to wrap all of them with brackets or \mbox. Is there a way to define a "smarter" command that can be used over \cite without modifying the original text? A MWE of the problem of using \hl and \cite together is already given in the linked question, but I'll include another just for completeness: Tex file: \documentclass{article} \usepackage{soulutf8} \usepackage{natbib} % how can I more smartly define this command, to use it to wrap text containing \cite{...}? \newcommand{\remove}[1]{{\st{#1}}} \begin{document} \remove{\cite{foo}} \bibliography{bibliography} \end{document} bibliography.bib: @article{foo, author = {SomeGuy}, journal = {Somewhere}, title = {Foo} } | The soul package provides a useful command \hl for highlighting text. However, \cite, \ref, and some other commands (maybe equations too) must be placed within an \mbox in order for \hl to work properly. Is there any way to make this automatic? Meaning that to modify \hl (and other commands provided by soul) to put everything except plain text in an \mbox? \documentclass[12pt]{article} \usepackage{soul} \begin{document} \section{1}\label{sec} This is to show that \textbackslash{hl} fails to highlight texts containing citations or reference! \hl{ This is one line containing a citation \mbox{\cite{}}} \hl{ This is one line containing a reference \mbox{\ref{sec}}} \end{document} |
Here a beginners question. Is there any difference in JAVA between passing an object as argument to a method or returning that object from the method. For instance: Is it better to pass a List as an argument and fill it in the method or just allow the method to return a list? My guess is that it should be no difference since a reference is returned and nothing is copied. But is there something more subtle behind? thanks in advance Altober | I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation? |
How do I check to see if a cell contains a phrase from a defined range of cells? I have a column filled with keywords, if one of the keywords is mentioned in a Column A, I want Column B to display FALSE, otherwise TRUE. | I want to check if the value of a cell exists in a range of cells. How can I do this? Just like you would be able to do "if value in list_of_values" in Python for example. |
I have 10 months of work, which's my first work experience, and during this period I haven't saved anything in my bank account. I spend all of my salary on rent, which represents 32% of it and the rest in the daily expenses. I want a way to keep as much money as possible because I really need it to do many things. | I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it. What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here. |
My Windows 10 boots very slowly. At startup it remains stuck on the boot image with no hard disk working for 1-2 minutes; after that it starts normally. I've already checked if I have "fast boot up" option active, but I don't have that option. So my question is: how to find what program/service causes this lag? | In august 2015, I have upgrade my laptop from windows 8.1 to windows 10. But it spends always 10 minutes to boot it. It is not normal that it spends so long. What can I do for boot him faster? Below some information about my laptop. age: +/- 2 year (on august 2015) edition: Windows 10 Home File trace are removed. Update: I must also say that always there comes a windows update, I have the same problem again form slow booting. Is it good that I turn off the updates? If yes, how can I do that? Also it is in periods that my pc booting to slow. Some time it is like normal (a few seconds) and other times a few minutes. I don't know how it comes that it is fast or slow. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.