body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
How can I prove that $9|n$ if and only if $9$ divides the sum of the digits of $n$, where $n \in \mathbb{N}$
|
Show that the number 9 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 9. Show that the number 3 divides the number $ m$ if and only if the sum of the digits of the number $ m $ is divisible by 3. Are semigroup and monoid theory could be useful?
|
My question is quiet simple: I have a custom object which his key field is auto-generate. It has this format: {YYYY}{0000}. So it will be something like this: 20150150, 20150151, ... , 20150199 1th January 2016 when i will create a new item, how will it be? 20160200 or 20160001. If it is 20160200... How can i get that 20160001? Thanks all!
|
I have created an Auto Number with the following format: {YYYY}/{000}. Is it possible for the number increments {000} to reset to 1 for each new year?
|
I am using the XeLaTeX ucharclasses package to switch language and font features on transition into the Greek and Latin unicode ranges. Is there a LuaLaTeX compatible alternative?
|
I am a XeLaTeX user and I often have to typeset english-greek documents. Packages like xgreek or polyglossia are great but in order to apply the correct hyphenation rules you have to declare the text that belongs to the secondary language. On the long run, this can become cumbersome. In XeLaTeX I am using the XeTeXinterchartoks mechanism that allows me to change automatically the hyphenation rules and/or the font without explicitingly declaring them. The involves grouping together the glyphs of a Unicode Block and then automatically applying tex commands when transitioning from a group to another one. For those not familiar with the XeTeXinterchartoks, more info can be found at pages 13-14. Lately I got interested in Lua(La)Tex. I want to know if there is a way to achieve similar results in LuaTex. As was pointed in a previous question, but it was suggested that there are other, more powerful ways to achieve the same goal. So the questions are How can I change the hyphenation rules/font automatically according to the glyphs used without declaring them? Can someone provide a minimum working example or at least point me to some references? One of the drawbacks of XeTeXinterchartoks is that the settings are global. Is there a way in LuaTeX to set this feature (if it exists) on and off, thus providing more flexibility?
|
It is well established that there is an international wizard in community of which there are many witches and wizards of varying nationalities. It think that just as there are varying traditions and normalities that there would also be varying incantations to cast spells with or without a wand. We see the spells in some kind of Latin form, and it makes sense as the book is written in British English and Latin is the root language for that and many other European languages. But what about places like India, who have Sanskrit as a kind of base language, or Old Chinese in China, and maybe Ancient Egyptian for Egypt (though I think that a select few Egyptian witches and wizards would study that, most people using Old Arabic instead)? So, do other parts of the world have different incantations for spells?
|
The spells that we know about in the Harry Potter world all seem to be either in Latin, derived from Latin, or resembling Latin. This makes sense for the European World, but there were likely witches and wizards in Africa, Asia, and the Americas. These cultures would have developed independently, and the magical people in them would likely have still found ways to cast their spells. Do cultures with languages that did not derive from Latin use the same words and phrases that are related to Latin for their spells? Or did they have other phrases based on the languages in their cultures?
|
<tr> <td style='text-align: center;'> <img style='height: 50px;width:50px;' src='./images/01.png' > <img style='height: 15px;width:15px;'src='./images/02.png' > </td> </tr> How can I position the 02.png to the center of the 01.png? For 1 layer.
|
I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image. On top of this linked image I would like an image of a magnifying glass, to show people that the image can be clicked to enlarge it (apparently this isn't obvious without the magnifying glass).
|
I have two files in the same folder: myset.c, set.h My makefile looks like this: myset:myset.c set.h gcc -ansi -pedantic -Wall myset.c -o myset When I run the command make in the console it shows the following error: fatal error: set.h: No such file or directory in myset.c I wrote: #include <set.h> What is the problem?
|
In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows? #include <filename> #include "filename"
|
Homework Question Hello, I have a simple homework question that asks: We know that when we sample, with equal probability from a finite population {x1, x2,..., xN} without replacement, we obtain a simple random sample instead of an (iid) random sample. Let X1,...,Xn (n < N) be the sample obtained. It is claimed in class that X1,..., Xn, though no longer independent, are still identically distributed according to the pmf: f(x) = 1/N, if x = xi, for some 1 <= i <= N; 0, for all other x. The first choice X1 obviously follows this distribution. Show that the second choice X2 is distributed according to f(x) too. My work: I did some research on exchangeable random variables. My thinking is that if I can show the sequence of random variables X1,..., Xn is exchangeable, then it follows that any of the Xi's can be the first random variable in the sequence. Therefore, each Xi will follow f(x). My question: I am unsure if I properly understand what being exchangeable means. Also, I am not sure how you would properly prove that this sequence is exchangeable. I would really appreciate any tips on going about it. Thank you.
|
I see the concept of 'exchangeability' being used in different contexts (e.g., bayesian models) but I have never understood the term very well. What does this concept mean? Under what circumstances is this concept invoked and why?
|
I set up year-based labels in Gmail to archive old mails -- e.g. year 2001, year 2002, ... year 2013, year 2014, etc. The problem is that Gmail displays the labels in the alphabetical order, which, in turn sorts these year-based labels in chronological order. But as with anyone else, I need to look up recent emails more often than decade-old emails, which means that the label I need to reach most often will sit at the bottom of the year-based labels. Would there be a clever way to display these year-based labels in reverse alphabetical order (i.e. reverse chronological order)?
|
I want to sort the labels in my own order instead of the default abc order, so that, for example, the label named bills should come up first. Any way to do that?
|
I tried this problem for a while, but didn't see the application of Eisenstein's irreducibility criterion here. All the coefficients, including the leading coefficient, are equal to 1. p is a prime number. The polynomial is $f(x) = x^{p-1} + x^{p-2} + \cdots + x + 1$ How do I proceed? Many thanks.
|
As opposed to the generic polynomial form for utilizing the Eisenstein Criterion ($a_nx^n+a_{n-1}x^{n-1}+\dots+a_0\in\mathbb{Z}[x]$ is irreducible in $\mathbb{Q}$) how do we prove that if $p$ is a prime, $x^{p-1}+x^{p-2}+\dots+x+1$ is irreducible over $\mathbb{Q}$?
|
Steps to reproduce: Edit the body of any post. Edit it again immediately, but only modify the edit summary. Check the revisions page. The original edit summary will be retained. A user has to edit the post body, or saving the edit summary silently fails.
|
It often occurs to me to add an edit summary to a question-edit immediately after submitting the edit, especially if the changes aren't obvious (formatting etc.). So I: Click "edit" again. Fill in the summary Click on "Save Edits". The 'edit' (no actual change has been made to the title/body/tags) is accepted, but the summary doesn't show up, i.e. it is silently rejected. I don't think it should work this way because the summary has been added by the original editor within the original edit's edit-window. In fact if I remember correctly, it to used to work as expected earlier; so perhaps this is a recent change.
|
Where is this image from? Any help would be great!
|
Windows 10 has an extensive collection of lock screen photos, many of which have here on Travel.SE. Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.
|
I have an Ubuntu server where I'm automounting an external hard drive each boot. To do this, I've created an empty folder on the root partition, and the drive gets mounted "inside" this folder. However, what if I perform a backup to this path when the drive isn't properly mounted? The backup would instead fill up my root partition! I can ensure that the drive is mounted each time by performing: sudo mount -a ... before each backup. However, what are the best practices to ensure that data is never written to the empty mount-folder (except when the external hard drive is truly mounted)? Can this be solved without scripting? Say with permissions for example? What are the best practices?
|
Running Cronjob @reboot returns that file on nfs share does not exist. Example @reboot python /abs/path/to/script.py mail from crontab on startup reads "more or less" /usr/bin/python can't open file "/abs/path/to/script.py": [Error No. 2] No such file or folder. Script can be run from the command line with no trouble.. Theory is that the cronjob is running before mount has been run. The questions. Is this theory correct? Is there a way to force the job to wail until the drive has been mounted? .... Other than just putting in a sleep 60 into the command. ;) I tried that already, but it's hit and miss and I need the script to run 100% of the time quickly.
|
.info-bg-section { background: transparent url(../images/img.jpg) repeat fixed 0 0/cover; position: relative; } .info-section-colored { background-color: #3F3FB5; padding: 100px 40px; } <div class="info-bg-section dark-bg"> <div class="container-fluid"> <div class="row"> <div class="col-md-4 info-section-colored"> <p>Content 1</p> <p>Content 1</p> <p>Content 1</p> <p>Content 1</p> <p>Content 1</p> </div> <div class="col-md-8"> <p>Content 2 </p> </div> </div> </div> </div> I want to add padding to this section (info-bg-section). Also I want to align vertically content in divs. I tried to add padding to divs but it seems it isn't good idea
|
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? <div id="header"> <img src=".." ></img> <h1>testing...</h1> <img src="..."></img> </div>
|
So I am making a program that takes in polynomial functions and does different things with it. Right now, I am trying to make a method that checks the Polynomial that is input, which is stored as an ArrayList, and condensing it so everything with the same exponent gets added together. I keep receiving a NullPointer Exception whenever I run the program, and I am not sure why I am receiving this. I know what the error means, but I have looked through my code and cannot see why the Polynomial is being seen as null. This is my constructor public ArrayList<PolyTerm> terms; public Poly(ArrayList<PolyTerm> terms) { sort(terms); condenseExponents(); this.terms = terms; } And in my main class I have my Poly objects created like this: PolyTerm poly1 = new PolyTerm(4, 3); PolyTerm poly2 = new PolyTerm(-3, 1); PolyTerm poly3 = new PolyTerm(15, 3); PolyTerm poly4 = new PolyTerm(7, 2); PolyTerm poly5 = new PolyTerm(14, 12); PolyTerm poly6 = new PolyTerm(2, 0); PolyTerm poly7 = new PolyTerm(19, 2); ArrayList<PolyTerm> terms = new ArrayList<>(); terms.add(poly1); terms.add(poly2); terms.add(poly3); terms.add(poly4); ArrayList<PolyTerm> terms1 = new ArrayList<>(); terms1.add(poly5); terms1.add(poly6); terms1.add(poly7); Poly test = new Poly(terms); Poly test2 = new Poly(terms1); Where the first thing being taken in by the PolyTerm is the coefficient, and the second thing being taken in is the exponent. So back to the Poly class. In my constructor, I call condenseExponents() which is meant to condense to ArrayList and combine the coefficients of all similar exponents. Here is that method private void condenseExponents() { for(int i = 0; i < terms.size() - 1; i++) { for(int j = i + 1; j < terms.size(); j++) { if(terms.get(i).getExponent() == terms.get(j).getExponent()) terms.set(i, new PolyTerm(terms.get(i).getCoef() + terms.get(j).getCoef(), terms.get(i).getExponent())); terms.remove(j); } } } The NullPointer Exception keeps being thrown on the first line of the for loop in that method. Does anybody know why?
|
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?
|
What are the options for pre-paid SIM cards in Uruguay (Montevideo)? What are the options for pre-paid data plans/packages?
|
Next month I am traveling to country X, where I would need Y minutes of calls, Z text messages and most importantly Q megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?
|
Calculate sum $$\sum_{n=1}^\infty {n\over3^{n-1}}$$The result is $9\over 4$ but I don't know how to get that.
|
I am trying to find a closed form solution for $\sum_{n\ge0} nx^n\text{, where }\lvert x \rvert<1$. This solution makes sense to me: $\sum_{n\ge0} x^n=(1-x)^{-1} \\ \frac{d}{d x} \sum_{n\ge0} x^n = \frac{d}{d x} (1-x)^{-1} \\ \sum_{n\ge0} nx^{n-1} = (1-x)^{-2} \\ x \sum_{n\ge0} n x^{n-1} = x(1-x)^{-2} \\ \sum_{n\ge0} nx^n=\frac x{(1-x)^2}$ However, a I am reading used the following method: $$\sum_{n\ge0}nx^n=\sum_{n\ge0}x\frac d{dx}x^n= x\frac d{dx}\sum\limits_{n\ge0}x^n=x\frac d{dx}\frac1{1-x}=\frac x{(1-x)^2}$$ This seems closely related to the solution I described above, but I am having difficulty understanding it. Can someone explain the method being used here?
|
I'm trying to make a program that will take a file, say my_test_file.log and make a new file called my_test_file.mdn. I'd like to be able to use this program by typing python renameprogram.py my_test_file.log into the command line. The original file will always end in .log.
|
Is there a function to extract the extension from a filename?
|
So I have a MacBook Pro 2017 and whenever I compile a program that as "void main", the compiler gives me a warning saying that the return type of main is not int... void main(){ (...) }
|
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:
|
On Ubuntu 20.04 I installed Bluemail. Then I tried to use the Software app to install an app called "Info Center" and got "Error while installing package: installed bluemail package post-installation script subprocess returned error exit status 1". When I ran "sudo apt-get install -f", I got: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up bluemail (1.1.14-536) ... Installing curl... E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 18429 (apt-get) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? Unable to install curl! dpkg: error processing package bluemail (--configure): installed bluemail package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: bluemail E: Sub-process /usr/bin/dpkg returned an error code (1). Bluemail is installed and working properly and I have rebooted, so I am not sure why this error is lingering around. Can someone clue me in on how to clear it?
|
I'm trying to run this command in the terminal: sudo apt install software-properties-common This is the error message I get: E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
|
I have a number of self-made (bash) scripts that I often use. Here are some examples of these scripts: A script backup-system.sh that backs up my system to an external hard drive. A script repeat.sh that allows me to repeat a command multiple times. For example, repeat.sh 5 echo "x" prints "x" 5 times. A script switch-sound.sh that switches between outputting sound over my loudspeaker and over my headset. Because I use these scripts often, I want the ability to easily call them from my command line. For example, I want to type backup-system to run backup-system.sh. How can I install my self-made scripts to run them from the command-line? Since this is a common issue, I would like to know the standard way to achieve this, that ideally works for many Linux distributions (however, Ubuntu is the priority). More details: I am the only user of my computer. Still, I would like to be able to use my scripts as both my own user and as root. I know I could add an entry to .bashrc to achieve some of what I want. But because my scripts are often long, this is impractical.
|
I need to write a program or a bash script, which will run every now and then (based on cron). The program will contain a state machine and will behave differently depending on which state it is in. The program (or bash script) is not user specific, so it shouldn't be in the /home folder. Where (by convention) to store the file with program internal state on Ubuntu Server? Bonus question: What is the best place for the script itself?
|
Assume Black 10, Blue 10, Red 10 and Joker are on the board as a set of four: The Joker, at this point has to be an orange 10. Questions: Can you take one of the three non-joker 10's from the set to use elsewhere on the board? Leaving a three tile set. This would have the effect of now making that joker one of two colors, instead of just orange. Can you split up all four 10's keeping the joker an orange 10 elsewhere on the board?
|
I have a group of tiles made up of 3 fours and a joker: 4 4 4 Joker Now, if a player removes the joker, do they have to replace it with another 4?
|
Im Getting invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at app.VOTD_Data.onPostExecute. Async Task public class VOTD_Data extends AsyncTask<Void, Void, Void> { private String verseData = ""; private String dailyverse = ""; private String verseauthor = ""; private String dailVersePref = ""; private String verseAuthorPref = ""; private SharedPreferences sharedPreferences; private Context context; public VOTD_Data(Context context){ sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); dailVersePref = sharedPreferences.getString("dailyverse", ""); verseAuthorPref = sharedPreferences.getString("verseauthor", ""); } public VOTD_Data() { } @Override protected Void doInBackground(Void... voids) { try { URL url = new URL("https://beta.ourmanna.com/api/v1/get/?format=json"); HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); InputStream inputStream = httpURLConnection.getInputStream(); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); String line = ""; while (line != null){ line = bufferedReader.readLine(); verseData = verseData + line; } JSONObject mainObject = new JSONObject(verseData).getJSONObject("verse"); JSONObject verseObject = mainObject.getJSONObject("details"); dailyverse = verseObject.getString("text"); verseauthor = verseObject.getString("reference"); sharedPreferences .edit() .putString("dailyverse", dailyverse) .putString("verseauthor", verseauthor) .apply(); } catch (IOException | JSONException e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(Void aVoid) { super.onPostExecute(aVoid); //Daily Verse Activity DailyVerse_Activity.data.setText(dailyverse.toString()); } } Main Activity public class DailyVerse_Activity extends AppCompatActivity { public static TextView data; private ImageView banner; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_daily_verse); data = (TextView) findViewById(R.id.dataText); VOTD_Data process = new VOTD_Data(DailyVerse_Activity.this); process.execute(); } //On Back Pressed @Override public boolean onSupportNavigateUp() { onBackPressed(); finish(); return true; } } XML <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".DailyVerse_Activity"> <TextView android:id="@+id/dataText" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="#000" android:gravity="center" android:hint="Verse Data" /> </RelativeLayout> Im Getting invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference at app.VOTD_Data.onPostExecute.app.VOTD_Data.onPostExecute(VOTD_Data.java:88) at app.VOTD_Data.onPostExecute(VOTD_Data.java:18)
|
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
|
I want to use UAV to get digital elevation model for geomorphological researching and, while trying finding suitable UAV with reasonable price, I found out DJI Phantom 3. More over, I found it very cheap. So, with additional programming, is it possible to get digital elevation model with DJI Phantom 3 Pro?
|
I am curious if this consumer UAV can be used to capture imagery for further processing to stitch seamless imagery and to use as input into stereo/photogrametry software to create reasonably accurate 3D point clouds in order to create surface models. I have no experience with flying these crafts but am interested in obtaining one to add some extra perspective to my . At the same time I would like to be able to try capturing aerial imagery and extrapolating DEM for small 3D models and site plans if possible. Can anyone share their experiences with this or the previous models using the default camera?
|
I have about 7000 images per day to remove background. How can i do it easily using action or something like that? Does anyone know any easy way? I'm looking for macros or something like that automatic system. Is it available? Please help me. Video tutorial would be best. Best Regards Raihanul
|
Someone asked me a Photoshop question the other day, and after some time thinking on it I couldn't come up with an answer - hoping someone here can shed some light! Let's say I've got a batch of photos of people all standing in front of the same textured background - for example, headshots against a studio background. If I wanted to remove the background from all these photos, there are a few ways to go about it; the problem is all methods I know are manual, and large batches become pretty tedious. Now, let's say the background in each photo was stationary (maybe a few px of wobble), and I had a photo of the complete background without any figure blocking it. Would there be a way to use the complete background as some sort of inverse/subtractive mask, so all you're left with is the person? At the heart of it, this is about automating the process of removing the same background from every image - so any alternate methods are welcome too. Thanks in advance!
|
I want to know how-much data is needed to download any package by apt without installing that package. In other words if I run apt-get install xyz then it will download and install packages with their dependencies. But I want to know/show only how-much (Total)data (ex:need to get 73MB of archives) to download without downloading and installing that package(s).
|
When using apt-get install <package_name>, and there are dependencies that need to be downloaded, the terminal outputs names of additional packages and total size, and asks for confirmation before downloading. But, when dependencies are satisfied and nothing but the named package needs to be downloaded there is no size output and no confirmation. When using Synaptic, I can see the total size that new packages that will use after installation but no way to see the size that needs to be downloaded, except to go from package to package and use properties to see the compressed size. I would like to know if there is a way to see the size of a package(s) in terminal and Synaptic prior to downloading and installing it/them?
|
I have a Dell Latitude D410 that I bought used with Ubuntu installed on it. It worked fine for several months. I updated to 12.04. I wanted to read Nook books on it, so i tried to find the software to do so. I may have downloaded Wine onto the machine, but I don't remember. I discovered i could read my Nook books at the Barnes and Noble web site, so I did that a bit. The next day, when I started it, all I got was a black screen. Right clicking would produce a small box that allowed me to open a terminal window or a web browser, but nothing else. I decided to update to 14.04, which I think I did successfully, but now it's even worse. I can't even get the box to open a terminal window. Imma try installing 14.10 from a DVD, since I can get to the bios and change the boot order. I welcome any suggestions.
|
I am trying to boot Ubuntu on my computer. When I boot Ubuntu, it boots to a black screen. How can I fix this? Table of Contents:
|
Suppose that we have a commutative ring $R$ and an exact sequence of graded R-modules $$0\rightarrow M'\rightarrow M\rightarrow M''\rightarrow 0$$ It is true that we have an exact sequence of graded R-modules $$0\rightarrow\text{S}^{\bullet}(M')\rightarrow\text{S}^{\bullet}(M)\rightarrow\text{S}^{\bullet}(M'')\rightarrow 0$$ where $\text{S}^{\bullet}(-)$ denotes the symmetric algebra? Thank you for your time.
|
Let $$0 \rightarrow M \rightarrow N \rightarrow P \rightarrow 0$$ be an exact sequence of $A$-modules, where $A$ is a commutative ring with unity. Then for each natural number $i$ one can look at the induced maps $$\mathrm{Sym}^i(N) \rightarrow \mathrm{Sym}^i(P)$$ and $$\mathrm{Sym}^i(M) \rightarrow \mathrm{Sym}^i(N).$$ The first question is, if they are still surjective, resp. injective, i.e. is $\mathrm{Sym}^i$ an exact functor? The second question is: what are the kernel, resp. cokernel of these maps?
|
What is the difference between in php function A parameter passage by variable A parameter pass by reference?
|
Are PHP variables passed by value or by reference?
|
I just started Set theory And I have the following question. Suppose I have $2$ sets, $A$ and $B$. $A$ is a subset of $B$ (contained inside $B$), then the union of these $2$ sets is $B$ right $?$ If no, could you guys explain to me why, if yes, could you guys provide a simple proof. Thank you for reading my post.
|
I want to proof that: $A \subseteq B \Leftrightarrow A \cup B = B$ At the moment I have no idea on how to start. Please give me a hint. Thx in advance!
|
I've played Minecraft with my younger sister for a while now, but it has all been on MCPE. Now I am going to download it on my mac, but i don't know if she will still be able to join my world from her phone once I am playing on java edition. Will she?
|
My kids are playing Minecraft on 2 PCs, creative mode. They are connected by the way of one of them starts a single player game on the other one than joins that game over the LAN. Can I, using Minecraft PE on my iPad, join their game as well?
|
I have Qt Creator 2.4 installed from package manager, but version 4.8 is out now, and I want to try it. How to properly update to the lastest version, should I download and install it manually?
|
How to install qt 4.8 and QtCreator from repository ?
|
I have three Windows 10 installations on separate drives on the same workstation Let's say I boot into Windows install #1 Next, I would like to boot into windows #2 Is there a way to "pre-select" Windows #2 as the active Windows installation after I reboot - WITHOUT having to press F8 to select boot device from BIOS? Thanks!
|
I have a dual boot system with Ubuntu 16.04 and Windows 7. Windows 7 is automatically booted (default in the bootloader). On both OS I have TeamViewer installed. When I'm working remotely and want to switch to Ubuntu I have to reboot the PC but then automatically Windows is booted again (I'm not in front of the PC, so I cannot use the bootloader). How can I in such a case switch to Ubuntu, i.e. starting Ubuntu? And how can I switch back to Windows?
|
I am using Windows 7 on an Acer Aspire 5755G laptop. How can I disable my laptop keyboard without disabling the wireless external keyboard? (I guess I am looking for the Windows 7 equivalent of .)
|
I have a HP Compaq Presario C700 laptop with Windows 7 installed on it. My laptop's keyboard is not working properly; some keys never work and some keys will keep on pressing. I've formatted the OS but it didn't solve my problem. I bought an external USB keyboard and it works well. As some keys in the built-in keyboard activate themselves, I still couldn't work effectively. After searching Google I tried the following steps to disable the built-in keyboard: Disabled keyboard drivers: This didn't work because when the system reboots, the driver gets installed again automatically. Installed irrelevant driver for keyboard: This failed - I couldn't install the driver. After rebooting it installed the correct driver automatically. Can anyone help explain how I can temporarily uninstall my built-in keyboard? I don't want to remove it manually (removing the hardware cable).
|
How to prove that $\alpha\beta =\beta\alpha$ if $\alpha$ and $\beta $ are disjoint permutations of $S_n$ symmetric group of $n$ elements. Two permutations are said to be disjoint if every elment moved by one is fixed by another permutation. My attempt : Let any $x \in [n]$, if $\beta$ fixes element $x$, $\alpha\beta(x)$ it will be $\alpha(x)$ let's say $\alpha(x) = y \in [n]$, now we need to show that $\beta\alpha(x)$ is equal to $y$, $\beta(y)$ will be $y$ as $y$ will be moved by $\alpha$. Is there better way to prove this? I will go by case by case.
|
I'm trying to prove that in a symmetric group two disjoint cycles commute. But I suspect that something is not right about my proof (a sense of vagueness). Some hints would be appreciated. Here's my proof: Let $\sigma=(s_1 s_2 ... s_n)$, $\tau=(t_1 t_2 ... t_m)$ for some integers $m, n$. That is, $s_i \neq t_j$ for any $i \in [1, n]$, $j \in [1, m]$. Now, $\sigma\tau=(s_1 ... s_n)(t_1 ... t_m)$ is a cycle of disjoint permutations, which cannot be represented by any other disjoint permutations. Thus $\sigma\tau=\tau\sigma$.
|
I have screentime set up for managing apps and usage and am having a hard time making sense of the numbers. In this instance I have set all apps to be limited to 2 hours, and you can see that the time used is around that amount (I changed the limit to 30 minutes just before this screenshot because I was experimenting). However, the used time is nearly 5 hours. Why does my screentime report 4:42 and usage continues without hindrance. Changing it down to 30 minutes hinders usage but to allow later usage, I have to allow > 4:42. This is inconsistent with the app usage and makes management difficult. What’s being counted and why does it vary so wildly?
|
Under , the report for the time spent on my phone is 1 hour 5 minutes. However, when looking at all the apps used, the time spent on the phone adds up to about 28 minutes and not 1 hour 5 minutes. Time spent on iPhone for the full day: But looking at all apps, the time spent is about 28 minutes How is Screen Time calculated? Why is time spent on the iPhone calculated to 1 hour 5 minutes if time spent on all apps is really about 28 minutes? Note: I'm using ios v14. iPhone SE 1st Generation. The iPhone is supervised, (but I don't see why that would matter). Share Across Devices is enabled, however, I don't own or use any other apple devices besides this iPhone (seemingly this shouldn't either matter).
|
Given $n\in \mathbb N$, how can I compute the determinant of $(a_{ij})_{1\leq i,j \leq n} \in \mathcal M_{n\times n}(\mathbb R)$ where, for each $1\leq i,j\leq n:$ $$a_{ij}= \begin{cases} \lambda &i=j \\ \mu & i\neq j \end{cases}$$ The only (or the only easy) way to do this I think involves using Laplace's formula, expanding along any row. But doing this everything gets too messy, I can't express it in a good way. I tried to get a recursive relation and prove it via induction but didn't get anywhere. Is there an easier way? Any hints appreciated.
|
I have the following $n\times n$ matrix: $$A=\begin{bmatrix} a & b & \ldots & b\\ b & a & \ldots & b\\ \vdots & \vdots & \ddots & \vdots\\ b & b & \ldots & a\end{bmatrix}$$ where $0 < b < a$. I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$. This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out. Any help would be appreciated.
|
When deriving the Euler-Lagrange equations from the Principle of Stationary Action we start by insisting that the actual path of a particle minimizes the action $S$, defined as $$S=\int_{t_1}^{t_2}\mathcal{L}(q,\dot{q},t),\quad\text{where}\quad\dot{q}=\frac{dq}{dx}.$$ And then we show that a necessary condition for $S$ to be minimized is that $\mathcal{L}$ obeys the Euler-Lagrange equations, $$ \frac{d}{dt}\left(\frac{\partial\mathcal{L}}{\partial\dot{q}}\right)-\frac{\partial\mathcal{L}}{\partial q}=0. $$ My problem is that nowhere in the derivation do we make use of the fact that the Lagrangian is of the form $\mathcal{L}=T-U$, where $T$ is the kinetic energy, and $U$ is the potential energy. So my question is: Is there an explanation for this identification beyond the fact that this what makes the physics work? My best guess at the answer is that if we instead started out with the Principle of Virtual Work, we eventually get to $$ \frac{d}{dt}\left(\frac{\partial T}{\partial \dot{q}_j}\right)-\frac{\partial T}{\partial q_j}=Q_j. $$ Where $Q_j$ is the generalized force, defined as $$ Q_j\equiv \sum_i\vec{F}_i\cdot\frac{\partial\vec{r}_i}{q_j}, $$ and if we assume that the applied forces on the system are conservative, so that $$ \vec{F}_i=-\vec{\nabla}U(\vec{r}_1,\vec{r}_2,...,\vec{r}_N), $$ and this potential, $U$, doesn't depend on the generalized velocities, we get $$ \frac{d}{dt}\left[\frac{\partial}{\partial \dot{q}_j}(T-U)\right]-\frac{\partial}{\partial q_j}(T-U)=0. $$ Which is exactly the E-L equation, with $\mathcal{L}=T-U$, so we can claim that both principles should give us the same physics, and therefore the Lagrangian we arrived at from the Principle of Stationary Action should also be $\mathcal{L}=T-U$. Maybe it's just me, but this seems unsatisfactory. Have we simply defined the action so that we have a more compact formulation of the physics we already knew, or can it stand by itself?
|
Is there a proof from the first principle that for the Lagrangian $L$, $$L = T\text{(kinetic energy)} - V\text{(potential energy)}$$ in classical mechanics? Assume that Cartesian coordinates are used. Among the combinations, $L = T - nV$, only $n=1$ works. Is there a fundamental reason for it? On the other hand, the variational principle used in deriving the equations of motion, Euler-Lagrange equation, is general enough (can be used to to find the optimum of any parametrized integral) and does not specify the form of Lagrangian. I appreciate for anyone who gives the answer, and if possible, the primary source (who published the answer first in the literature). Notes added on Sept 22: - Both answers are correct as far as I can find. Both answerers were not sure about what I meant by the term I used: 'first principle'. I like to elaborate what I was thinking, not meant to be condescending or anything near to that. Please have a little understanding if the words I use are not well-thought of. - We do science by collecting facts, forming empirical laws, building a theory which generalizes the laws, then we go back to the lab and find if the generalization part can stand up to the verification. Newton's laws are close to the end of empirical laws, meaning that they are easily verified in the lab. These laws are not limited to gravity, but are used mostly under the condition of gravity. When we generalize and express them in Lagrangian or Hamiltonian, they can be used where Newton's laws cannot, for example, on electromagnetism, or any other forces unknown to us. Lagrangian or Hamiltonian and the derived equations of motion are generalizations and more on the theory side, relatively speaking; at least those are a little more theoretical than Newton's laws. We still go to lab to verify these generalizations, but it's somewhat harder to do so, like we have to use Large Hadron Collider. - But here is a new problem, as @Jerry Schirmer pointed out in his comment and I agreed. Lagrangian is great tool if we know its expression. If we don't, then we are at lost. Lagrangian is almost as useless as Newton's laws for a new mysterious force. It's almost as useless but not quite, because we can try and error. We have much better luck to try and error on Lagrangian than on equations of motion. - Oh, variational principle is a 'first principle' in my mind and is used to derive Euler-Lagrange equation. But variational principle does not give a clue about the explicit expression of Lagrangian. This is the point I'm driving at. This is why I'm looking for help, say, in Physics SE. If someone knew the reason why n=1 in L=T-nV, then we could use this reasoning to find out about a mysterious force. It looks like that someone is in the future.
|
I have studied the following theorems on inequality: the QAGH (quadratic-arithmetic-geometric-harmonic) mean inequality, the triangle inequality, Cauchy Schwarz inequality, Weierstrass inequality and Chebycheff's sum inequality which states that If $a_1,a_2,\ldots a_n$ are real numbers such that (i) $$a_1\le a_2\le\ldots \le a_n$$ and $$b_1\le b_2 \le \ldots \le b_n$$, then: $$n(a_1b_1 + a_2b_2 +\ldots + a_nb_n) \ge (a_1 + a_2 + \cdots + a_n)$$ (ii) $$a_1\ge a_2\ge\ldots\ge a_n$$ and $$b_1\le b_2 \le \ldots \le b_n$$, then: $$n(a_1b_1 + a_2b_2 +\ldots + a_nb_n) \le (a_1 + a_2 + \cdots + a_n)$$ One question from my assignment for which I need help is: If $$0\le x_1\le x_2\le\ldots\le x_n,$$ and it is given that $$\frac{1}{1+x_1} +\frac{1}{1+x_2}+\ldots+\frac{1}{1+x_n} = 1$$ Prove that: $$ (\sqrt{x_1} + \sqrt{x_2} +\cdots + \sqrt{x_n}) \ge (n - 1) \left(\frac{1}{\sqrt {x_1} } +\frac{1}{\sqrt{x_2} } + \cdots + \frac{1}{\sqrt{x_n} }\right) $$ Where n is a natural number, $ n\ge 2$ I have tried in many ways to prove this statement using the theorems I know, without any success. Could you please help me?
|
Let $x_1,x_2,\ldots,x_n > 0$ such that $\dfrac{1}{1+x_1}+\cdots+\dfrac{1}{1+x_n}=1$. Prove the following inequality. $$\sqrt{x_1}+\sqrt{x_2}+\cdots+\sqrt{x_n} \geq (n-1) \left (\dfrac{1}{\sqrt{x_1}}+\dfrac{1}{\sqrt{x_2}}+\cdots+\dfrac{1}{\sqrt{x_n}} \right ).$$ This is Exercice 1.48 in the book "Inequalities-A mathematical Olympiad approach". Attempt I tried using HM-GM and I got $\left ( \dfrac{1}{x_1x_2\cdots x_n}\right)^{\frac{1}{2n}} \geq \dfrac{n}{\dfrac{1}{\sqrt{x_1}}+\dfrac{1}{\sqrt{x_2}}+\cdots+\dfrac{1}{\sqrt{x_n}}} \implies \dfrac{1}{\sqrt{x_1}}+\dfrac{1}{\sqrt{x_1}}+\cdots+\dfrac{1}{\sqrt{x_n}} \geq n(x_1x_2 \cdots x_n)^{\frac{1}{2n}}$. But I get stuck here and don't know if this even helps.
|
Knowing that $a_n \rightarrow a$ and $b_n=\frac{a_1+a_2+...+a_n}{n}$. How can I show that $b_n \rightarrow a$?
|
Prove that if $\lim_{n \to \infty}z_{n}=A$ then: $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....
|
Situation: echo "tell me a word" read the_word How to replace all WordToReplace in a file by the_word? sed does not seems to appreciate: sed -i 's/WordToReplace/$the_word/g' thefile.sh
|
I want to do: cat update_via_sed.sh | sed 's/old_name/new_name/' > new_update_via_sed.sh in my program. But I want to use variables, e.g. old_run='old_name_952' new_run='old_name_953' I have tried using them but the substitution doesn't happen (no error). I have tried: cat update_via_sed.sh | sed 's/old_run/new_run/' cat update_via_sed.sh | sed 's/$old_run/$new_run/' cat update_via_sed.sh | sed 's/${old_run}/${new_run}/'
|
I was wondering if any have an idea of how to use you pc as an external HDD for the tv, so that you get full access to the HDD from the tv, only using USB browsering. I know that this is a crazy idea, but it would help me a lot because my TV is a Phillips and the most DLNA servers that i found is not stable all the time. If you have any idea please tell me, then i will try that out.
|
Is there a software package available that can serve up a hard-drive internal to a PC and make it available over USB to other USB Master nodes as mass storage? Ex: take your C: or /dev/hda drive on a PC (let's call the computer PC-A), and run a driver program which makes your C: or /dev/hda drive available to external devices as USB mass storage. When you'd hook up another PC (PC-B) to PC-A via USB, it would detect a USB mass storage device, which is C: or /dev/hda on PC-A. Is this even possible? EDIT: I know that there are other ways of making data on a drive available between two different computers (eg. putting PC-A's hdd in a USB-drive-enclosure, or having PC-A make the hdd available via a network share). But I'd like to know if the method that I describe above is even technically possible.
|
I have an abstract class like so: abstract class Player { //some stuff public abstract String getName(); } and in one of the subclasses I am implementing (and overloading / overriding as well? Here is where I am not sure) the function getName() like so by typing out the whole function again: public String getName(){ return "John"; } but I can also in my subclass simply write "getName()", press enter and my IDE automatically fills out the following code for me, which also works (if I change null to "John" in this case): @Override public String getName(){ return null; } Obviously since it states "Override" I am here overriding the function in the abstract superclass. But am I not already overriding the function even without putting "@Override" above the function? What I am saying is: I have an abstract function, so it is only implemented in a subclass and not in the superclass itself. Doesn't this mean that by implementing it I am automatically overriding it as well, since it has no implementation in the superclass to begin with? Why should I write @Override then? Or am I just "overloading" if I don't put "@Override" in there?
|
What are the best practices for using Java's @Override annotation and why? It seems like it would be overkill to mark every single overridden method with the @Override annotation. Are there certain programming situations that call for using the @Override and others that should never use the @Override?
|
I define Sans Serif fonts for text for my beamer presentation in Russian: \usepackage{luatextra} \usepackage{polyglossia} \setmainlanguage[babelshorthands=true]{russian} \setotherlanguage{english} \defaultfontfeatures{Renderer=Basic, Ligatures=TeX} \newfontfamily\cyrillicfonttt{CMU Typewriter Text} \newfontfamily\cyrillicfont{CMU Sans Serif} \setmainfont{CMU Sans Serif} \setsansfont{CMU Sans Serif} \setmonofont{CMU Typewriter Text} I would like to use Sans Serif fonts everywhere except equations. To do it, I write \mode<presentation> { \usefonttheme{professionalfonts} ... } But there is the problem with option DeclareMathOperator. For instance, I write \DeclareMathOperator{\Tr}{\mathrm{Tr}\,} and obtain Sain Serif typesetting of this operator instead of desired Serif format. How to deal with this problem?
|
When using the metropolis theme for beamer, I get text and math in Fira Sans, except for math operators. I compile the following MWE using LuaTeX. \documentclass{beamer} \usetheme{metropolis} \begin{document} \begin{frame} Ordinary text. \[ a^2 + b^2 = \sin^2(x) - \mathsf{y} + \mathrm{z} \] \end{frame} \end{document} The outcome for me is that a, b, 2 and x are set in Fira Sans Light Italic, and y is set in Fira Sans Light, but sin is set in the sans font of (I guess) Latin Modern. (The z is also in Latin Modern, but this is expected behaviour from beamer.) Unsurprisingly, I get the same result if I replace \usetheme{metropolis} with \usepackage[no-math]{fontspec} \setsansfont[ItalicFont={Fira Sans Light Italic}, BoldFont={Fira Sans}, BoldItalicFont={Fira Sans Italic}]% {Fira Sans Light} I guess that this is to do with beamer's patching parts of the math fonts to match the text font (see ). However, I don't understand the font system well enough to modify this. There was , but I've no idea how to apply that answer when using fontspec, or if this is even possible. Is there a way to change the operator font to match the upright/sans math font (i.e., Fira Sans Light)?
|
My organization wants to create a few maps that will be interactive and viewable via phones (android, iphones,etc) and ipads. We already have a solution using Geocortex (Silverlight) for browser which cannot display on most devices. I've been looking into HTML5, Javascript and ArcGIS Online. What I need is something that displays nicely for mobile use and that is easy to set up. Looking at Javascript is slightly intimidating to me and ArcGIS Online maps don't display well in the phone's browser. I do not come from a Comp Sci or development background so if there's already an existing interface that makes it easily to display for mobile I'd prefer that rather than messing with code. The map would contain point features with hopefully a pop-up containing a picture and a short description of the property. I'm pretty computer savvy but I'd like this to be as painless as possible. Are there any other interfaces that exist that make this easier? The mobile map will be only for viewing purposing, no editing or capture. I'm open to looking at other platforms outside of ArcGIS as well. As an added bonus (but not mandatory), I've been looking into Story Maps and plan on using one in the future, specifically the Short List. However, I don't see this working out for a mobile device as its very picture heavy and would crowd the display. If anyone has any other alternative ideas I'm open to them! I've been looking at Leaflet and Mapbox as a possible solution for mobile use - there is plenty of documentation - but still a lot of code! For now we've gained access to HTML5 viewer for geocortex and will be using it for our mobile sites. If there are any other alternatives I haven't already listed above - that are about on-par with ArcGIS Online for ease of use for non-programmers, I would be interested to hear about them.
|
We are building a spatial application targeted to laypeople which will involve viewing and editing vector geodata (currently just points, but linestrings and polygons in the future) with a raster underlay. We'll deploy both web and mobile (iPhone now, Android and perhaps others later) versions. The server is a custom app we are writing, and there are no ESRI products on the server side. My question, therefore, is: How do we choose which client-side mapping toolkit to use? I'm aware of the following options, are there others? Google Maps API or similar (Yahoo, MapQuest, etc.) OpenLayers (does it work on mobile browsers?) ESRI's web/mobile APIs We are particularly interested in the pros/cons of the ESRI APIs under this scenario. Our company does have some kind of relationship with ESRI, though I know nothing about the details (and our group currently has no involvement with ESRI or ESRI products).
|
I am talking about the song that happens whenever shinichi and migi fight a parasyte. In episode 17, the organ song name at 6:35. Thanks
|
The song is found in episode 17 of Parasyte -the maxim- at 6:35 when a homicidal parasyte says 'one of us has died'. The song is also found in episode 16 of Parasyte -the maxim- at 10:54 when Migi says 'shit' and Shinichi says 'no way'. Thank you for your answer.
|
The size of the union is 95 bytes, why if I try to access to 102 postion at a, a exception is not raised?, or Am I just overwriting another memory location? #include<stdio.h> union u{ char a[95]; int b; char *c; }; union u u1; int main() { u1.a[102] = 'b'; printf("%c",u1.a[102]); return 0; }
|
A colleague of mine recently got bitten badly by writing out of bounds to a static array on the stack (he added an element to it without increasing the array size). Shouldn't the compiler catch this kind of error? The following code compiles cleanly with gcc, even with the -Wall -Wextra options, and yet it is clearly erroneous: int main(void) { int a[10]; a[13] = 3; // oops, overwrote the return address return 0; } I'm positive that this is undefined behavior, although I can't find an excerpt from the C99 standard saying so at the moment. But in the simplest case, where the size of an array is known as compile time and the indices are known at compile time, shouldn't the compiler emit a warning at the very least?
|
I'm trying to connect to Marketing Cloud via FuelSDK. As soon as I try this line of code: ETClient myclient = new ETClient(); with this configuration inside app.config: <fuelSDK appSignature="none" clientId="myClientId" clientSecret="myClientSecret" authEndPoint="https://xxx.auth.marketingcloudapis.com" restEndPoint="https://yyy.rest.marketingcloudapis.com/" useOAuth2Authentication="true" applicationType="server" accountId="myAccountMIDId" scope="data_extensions_read data_extensions_write" /> I get the following error: "The remote server returned an error: (401) Unauthorized. If I try to change the mid in the business unit org id, it gives me bad request. I've created an installed package of Server-to-Server type. How can I intervene to fix this behavior? Thank you in advance. Greeting
|
I am using Visual Studio 2017, and install SFMC.FuelSDK by using Nuget. I use this: NameValueCollection parameters = new NameValueCollection(); parameters.Add("clientId", "xxxxxxxxxxxxx"); parameters.Add("clientSecret", "xxxxxxxxxxxxxxxxx"); ETClient myclient = new ETClient(parameters); and get (401) Unauthorized. I get clientId and clientSecret from App Center. I tested my clientId and clientSecret with URL (), and they are valid. Does anyone know what I did wrong or what should I try?
|
The question says it all - I'm just wondering whether Cox regression models are used to model non-linear relationships.
|
If polynomial regression models nonlinear relationships, how can it be considered a special case of multiple linear regression? Wikipedia notes that "Although polynomial regression fits a nonlinear model to the data, as a statistical estimation problem it is linear, in the sense that the regression function $\mathbb{E}(y | x)$ is linear in the unknown parameters that are estimated from the data." How is polynomial regression linear in the unknown parameters if the parameters are coefficients for terms with order $\ge$ 2?
|
I want to count the bits in the long long type variable. For example, 1100011001 -> 5 In the integer type, I can use a = (a & 0x5555) + ((a & 0xAAAA) >> 1); a = (a & 0x3333) + ((a & 0xCCCC) >> 2); a = (a & 0x0F0F) + ((a & 0xF0F0) >> 4); a = (a & 0x00FF) + ((a & 0xFF00) >> 8); but in case of "long long", how to do that?
|
8 bits representing the number 7 look like this: 00000111 Three bits are set. What are algorithms to determine the number of set bits in a 32-bit integer?
|
If a Fighter is hidden and chances upon an opponent, and wants to backstab it, how is it handled, despite him not having a Backstab move? Or a Fighter who surprises an opponent, and wants to go for a Called Shot, which only the Ranger has? Should I follow what the narrative suggests, or just allow the Fighter to make a Hack & Slash move, or...?
|
So in Dungeon World, everything breaks down to 'moves'. What about situations where a move is not available, but a check of some sort is called for, such as in the case of a non-fighter who wants to kick down the door? What mechanism do you use to resolve that situation? Is there the equivalent of a skill check?
|
I performed a hierarchical multiple regression to study the effect of different variables, above and beyond the apriori selected more important variables. The R script used to perform this regression is listed below. Data <- read.csv("~/Desktop/data.csv", header=T,quote="") Data$catVar.f <- factor(HMRdata$catVar) HRModel1 <- lm(responseV ~ catVar.f, Data) HRModel2 <- lm(responseV ~ catVar.f + v1, Data) HRModel3 <- lm(responseV ~ catVar.f + v1+ v2, Data) HRModel4 <- lm(responseV ~ catVar.f + v1 + v2 + v3, Data) summary (HRModel1) summary (HRModel2) summary (HRModel3) summary (HRModel4) anova (HRModel1, HRModel2, HRModel3, HRModel4) My supervisor thought that the collinearity within the variables may pose a problem, and so asked to me perform a similar method called sequential regression, in which, instead of adding the new variables in the later regression analyses, I added residuals of these variables regressed against the previous, more important variables. The R script for this regression method is listed below – RModel1 <- lm(v1 ~ catVar.f, Data, na.action = na.exclude) v1residuals <- resid(RModel1) RModel2 <- lm(v2 ~ catVar.f + v1residuals, Data, na.action = na.exclude) v2residuals <- resid(RModel2) RModel3 <- lm(v3 ~ catVar.f + v1residuals + v2residuals, Data, na.action = na.exclude) v3residuals <- resid(RModel3) SRModel1 <- lm(responseV ~ catVar.f, Data) SRModel2 <- lm(responseV ~ catVar.f + v1residuals, Data) SRModel3 <- lm(responseV ~ catVar.f + v1residuals + v2residuals, Data) SRModel4 <- lm(responseV ~ catVar.f + v1residuals + v2residuals + v3residuals, Data) summary (SRModel1) summary (SRModel2) summary (SRModel3) summary (SRModel4) anova (SRModel1, SRModel2, SRModel3, SRModel4) To my surprise, the outputs (for summary and anova functions) of both the regression methods are exactly the same. Since I do not know the statistical principals behind these methods, I cannot figure out the reason for the same outputs. Can somebody please explain why both methods gave the same outputs? Also, is there any mistake in my approach? EDIT - outputs from anova Hierarchical Regression output Model 1: responseV ~ catVar.f Model 2: responseV ~ catVar.f + v1 Model 3: responseV ~ catVar.f + v1 + v2 Model 4: responseV ~ catVar.f + v1 + v2 + v3 + v4 Model 5: responseV ~ catVar.f + v1 + v2 + v3 + v4 + v5 + v6 +v7 + v8 Res.Df RSS Df Sum of Sq F Pr(>F) 1 53 7324.2 2 52 2663.8 1 4660.3 111.3874 9.347e-14 *** 3 51 2057.7 1 606.1 14.4874 0.0004238 *** 4 49 1968.2 2 89.5 1.0699 0.3516141 5 45 1882.8 4 85.4 0.5103 0.7283774 Sequential regression output Model 1: responseV ~ catVar.f Model 2: responseV ~ catVar.f + v1 residuals Model 3: responseV ~ catVar.f + v1residuals + v2residuals Model 4: responseV ~ catVar.f + v1residuals + v2residuals + v3residuals + v4residuals Model 5: responseV ~ catVar.f + v1residuals + v2residuals + v3residuals + v4residuals + v5residuals + v6residuals +v7residuals + v8residuals Res.Df RSS Df Sum of Sq F Pr(>F) 1 53 7324.2 2 52 2663.8 1 4660.3 111.3874 9.347e-14 *** 3 51 2057.7 1 606.1 14.4874 0.0004238 *** 4 49 1968.2 2 89.5 1.0699 0.3516141 5 45 1882.8 4 85.4 0.5103 0.7283774
|
Not sure if normalize is the correct word to use here, but I will try my best to illustrate what I am trying to ask. The estimator used here is least squares. Suppose you have $y=\beta_0+\beta_1x_1$, you can center it around the mean by $y=\beta_0'+\beta_1x_1'$ where $\beta_0'=\beta_0+\beta_1\bar x_1$ and $x_1'=x-\bar x$, so that $\beta_0'$ no longer has any influence on estimating $\beta_1$. By this I mean $\hat\beta_1$ in $y=\beta_1x_1'$ is equivalent to $\hat\beta_1$ in $y=\beta_0+\beta_1x_1$. We have reduced equation for easier least square calculation. How do you apply this method in general? Now I have the model $y=\beta_1e^{x_1t}+\beta_2e^{x_2t}$, I am trying to reduce it to $y=\beta_1x'$.
|
Who was Hogwart and what happened to the Hogwart family? Are or were any of them wizards? What else is known? Presumably there are portraits of the family as in any castle. Are any of these seen?
|
Was Hogwarts named 'Hogwarts' because of a connection to warthogs? Or was it named for hogs and warts separately, or something else entirely?
|
We are rolling out a revisited version of our mobile web sites with the following aims: A navigation and look-and-feel more consistent with our desktop UI in a mobile friendly way. Better usability Equal or better functionality Since there’s a lot to do, we will be deploying this iteratively. Our current deployment contains changes to: Top Bar - We have beautiful new svg icons that scale perfectly with different mobile devices Nav Bar - It now sports better typography and a more visible “current section” indicator Search - Each section has its own search, accessible with the magnifying glass next to the title; the search is contextual: post list searches return… posts and user list searches return … users. User flair - Moved away from the “magic drawer” in the previous version, it now resides in the bubble “site switcher” Main colors and typography - moved towards less saturated blues and larger, lighter fonts. The site should now appear with each platform’s preferred sans-serif form (Arial, Helvetica Neue or Droid Sans) Here is screenshot of before and after: Send your <3 to and for the most excellent design. Feedback , bugs and suggestions while we move to the next iteration? Please mark bugs with
|
After a sizeable amount of work we are releasing a new version of the mobile web site, this time focusing on the question and answer page. We have also fixed or implemented a minimal large part of the issues and requests mentioned in the . Changes Question and answer page SVG icons for upvote, downvote, favorite, comment upvote white background color for legibility general styling issues with notices (they actually exist now) bounty link is now in question menu (next to flag) Ask question page general styling and sizing of element use of placeholders where appropriate instead of page text styling of error messages Pop-ups Popups are now inlined in the page instead of being sometimes floating and draggable Many overdue styling issues Close button is SVG Flag indicators are readable Buttons Misc pages 404 page did not exist. Now it does. Login, logout are formatted Pre-ask and pre-answer warnings are now formatted Bugfixes made search magnifying glass bigger fixed language in user timeline so it's consistent with the desktop site added login link on top bar made topbar icons ever so slightly smaller Restating the obvious: send your <3 to and for the most excellent design! Feedback , bugs and suggestions while we move to the next iteration? Please mark bugs with
|
after the encoding, citation call-outs do not appear as they should. They appears like this: I doubt that there is any useful information here (Scha85), Scha85. the bibliography does not appear as well. here the code: \documentclass[12pt,oneside]{report} \usepackage[a4paper,tmargin=3cm,bmargin=3cm,rmargin=2.5cm,lmargin=2.5cm]{geometry} \usepackage[american]{babel} \usepackage{amsfonts,amssymb,amsmath,amsthm} \usepackage{xcolor} \usepackage{pifont} \usepackage{marvosym} \usepackage{fancybox,fancyhdr} \usepackage{graphicx} \usepackage{eso-pic} \usepackage{yfonts} \usepackage{pdfsync} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[dvips]{epsfig} \usepackage{caption,subcaption} \usepackage{csquotes} \usepackage[backend=biber,style=apa]{biblatex} \addbibresource{distib.bib} %==================== Algorithm === \usepackage{algorithmicx} \usepackage[ruled]{algorithm} \usepackage{algpseudocode} \usepackage{hyperref} % load this package last \begin{document} I doubt that there is any useful information here Scha85.\parencite{Scha85}, \textcite{Scha85}. \printbibliography \end{document} % here the is the bibliography. it is just a portion of 100 items of them @book{Dori, author={Dorigo, M. and Caro, G.D.}, title={The Ant Colony Optimization Meta-Heuristic}, year={1999}, editor={D. Corne, M. Dorigo, and F. Glover}, publisher={New Ideas in Optimiztion}, address={McGraw-Hill}} @phdthesis{Horn97, author={Horn, J.}, title={The Nature of Niching: Genetic Algorithms and the Evolution of Optimal, Cooperative Populations}, year={1997}, type={Doctoral dissertation}, school={University of Illinois, Illinois Genetic Algorithm Lab}, address={Urbana}, key={95001}} @inproceedings{DAP, author = {Kalyanmoy Deb and Samir Agrawal and Amrit Pratap and T. Meyarivan}, title = {A Fast Elitist Non-Dominated Sorting Genetic Algorithm for Multi-Objective Optimization: NSGA-II}, booktitle = {Parallel Problem Solving from Nature VI Conference}, year = {2000}, pages = {849-858}} @techreport{glass2012, author={UN-Water GLASS}, title={The Challenge of Extending and Sustaining Services}, year={2012}, institution={World Health Organization}}
|
Running the minimal example \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example, author = {Other, Anthony Norman}, title = {Some things I did}, year = {2014}, journal = {J.~Irrep. Res.}, volume = {1}, number = {1}, pages = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document} I get the warning There were undefined references. I have read and know that I need to run: LaTeX Biber LaTeX However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle? Answers (sorted alphabetically by editor name) Answer guidelines Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools
|
I have multiple values for each key in the hash. Here, I print the values of each key print "$var:",join ',',@{$hash{$var}},"\n"; Output of the above print statement is: ABC:1,2,3,1,4,2, DEF:9,3,4,5,3,5, Now, I want to remove duplicates in the values. The desired output is, ABC:1,2,3,4 DEF:9,3,4,5 Can someone help me in this? Thanks
|
I have an array in Perl: my @my_array = ("one","two","three","two","three"); How do I remove the duplicates from the array?
|
I have asked a question In which @RomanPerekhrest showed me a different regex syntax. \(=([^)]*\)) can capture [^)]* as group 1 . This is confusting for me . You can check the result on This \(([^\)]*)\) is the correct one in my mind, but it is broken in sed. So I wonder how to make sed use the regex syntax standard as python or javascript (common standard in many languages).
|
I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?
|
I have a Java command-line-application, which creates a report file after running some steps defined in the source-code. Now I want to separate those steps from the core functionality of my application, because I want that the application can run dynamically loaded "steps". This means, the core functionality of my application is to create the report file. And the separated "steps" should provide the content of the report. I decided to realize those steps as plug-ins in my application. Everyone, who uses the application can extend it with already existing or own written plug-ins. Now my question is, what is the best way - in my case - to develop a plug-in system for my application? I researched a lot and got to much input. I can't decide how should I resolve the problem. Interesting question from SO: During my research I collected some informations how i could resolve it: Using ServiceLoader: a simple service-provider loading facility. Using org.openide.util.Lookup from NetBeans(dynamic registration and lookup of components) Defining a own Plug-in interface, which must be implemented from the plug-ins. And then using the Java ClassLoader to load those classes and create instances of them. Using OSGi, but I think it is to "big" for my purpose. What is the best way to solve my problem with: a elegant plug-in architecture (perhaps with use of some design patterns), easy to maintain source-code, and easy to develop plug-ins. Is my approach with a plug-in system correct? Or is there something else what could i use?
|
How would you implement a Plugin-system for your Java application? Is it possible to have an easy to use (for the developer) system which achieves the following: Users put their plugins into a subdirectory of the app The Plugin can provide a configuration screen If you use a framework, is the license compatible with commercial developement?
|
I know that in a linear regression if independent variable is categorical variable with k levels then we will be needing k-1 dummy variables, what happens if we model the relationship with k dummy variables
|
There are two different ways to encoding categorical variables. Say, one categorical variable has n values. converts it into n variables, while converts it into n-1 variables. If we have k categorical variables, each of which has n values. One hot encoding ends up with kn variables, while dummy encoding ends up with kn-k variables. I hear that for one-hot encoding, intercept can lead to collinearity problem, which makes the model not sound. Someone call it "". My questions: Scikit-learn's linear regression model allows users to disable intercept. So for one-hot encoding, should I always set fit_intercept=False? For dummy encoding, fit_intercept should always be set to True? I do not see any "warning" on the website. Since one-hot encoding generates more variables, does it have more degree of freedom than dummy encoding?
|
Code I have: public enum ActivityStatus { All = 0, Active = 1, Inactive = 2 } public static class MyClass { public static string Test(this ActivityStatus _value) { return _value + "111"; } } And typeof(ActivityStatus).GetMethods() doesn't contain Test method. I even tried to put everything in the same assembly, but still no success. Where I am wrong?
|
In C# is there a technique using reflection to determine if a method has been added to a class as an extension method? Given an extension method such as the one shown below is it possible to determine that Reverse() has been added to the string class? public static class StringExtensions { public static string Reverse(this string value) { char[] cArray = value.ToCharArray(); Array.Reverse(cArray); return new string(cArray); } } We're looking for a mechanism to determine in unit testing that the extension method was appropriately added by the developer. One reason to attempt this is that it is possible that a similar method would be added to the actual class by the developer and, if it was, the compiler will pick that method up.
|
I have created a Gantt chart using pgfgantt. Here's the complete code : \documentclass{article} %\usepackage[pdftex,active,tightpage]{preview} %\setlength\PreviewBorder{2mm} \usepackage[frenchb]{translator} \usepackage[frenchb]{babel} \usepackage{pgfgantt} \usetikzlibrary{shadows} \usepackage{lscape} \definecolor{barblue}{RGB}{153,204,254} \definecolor{groupblue}{RGB}{51,102,254} \definecolor{linkred}{RGB}{165,0,33} \sffamily \setganttlinklabel{s-s}{Début \`a d\'ebut (DD)} \setganttlinklabel{f-s}{Fin \`a d\'ebut (FD)} \begin{document} \begin{landscape} \begin{tikzpicture} % optional \begin{ganttchart}[x unit=1.8mm, y unit chart=0.87cm, time slot format=isodate, %compress calendar, vgrid=*{5}{dotted}, today=2014-04-27, today label=aujourd'hui, today label font=\scshape, newline shortcut=true, title/.append style={fill=blue!20, drop shadow}, title label font=\sffamily\bfseries\color{white}, title label node/.append style={below=-1.6ex}, title left shift=.05, title right shift=-.05, title height=1, bar/.append style={draw=none, fill=black!63}, bar label node/.append style={align=center, font=\tiny}, bar incomplete/.append style={fill=barblue}, bar height=.4, bar label font=\normalsize\color{black!50}, link/.style={-latex, draw=red, fill=red}, progress label text = {\pgfmathprintnumber[precision=0, verbatim]{#1}\% fait}, ] {2014-04-14}{2014-07-11} \gantttitlecalendar{month=name} \\ \ganttbar[progress=100]{Mise en place\ganttalignnewline de environnement\ganttalignnewline du travail}{2014-04-14}{2014-04-15} \\ \ganttbar[progress=100]{Spécifications}{2014-04-15}{2014-04-17} \\ \ganttbar[progress=70]{Comprendre et\ganttalignnewline analyser le\ganttalignnewline code existant}{2014-04-18}{2014-05-03} \\ \ganttbar[progress=60]{Analyse des \ganttalignnewline besoins de la\ganttalignnewline plate-forme MEANS}{2014-04-18}{2014-05-07} \\ \ganttbar[progress=30]{Conception des \ganttalignnewline services web}{2014-04-21}{2014-05-24} \\ \ganttbar[progress=80]{Conception de \ganttalignnewline l'API Java}{2014-04-25}{2014-05-07} \\ \ganttbar[progress=0]{Implémentation des\ganttalignnewline services web}{2014-05-26}{2014-06-15} \\ \ganttbar[progress=0]{Tests des\ganttalignnewline services web}{2014-05-26}{2014-06-17} \\ \ganttbar[progress=0]{Implémentation de\ganttalignnewline l'API Java}{2014-06-03}{2014-06-20}\\ \ganttbar[progress=0]{Tests de\ganttalignnewline l'API Java}{2014-06-03}{2014-06-21} \\ \ganttbar[progress=0]{Rédaction de\ganttalignnewline la documentation}{2014-06-22}{2014-06-25} \\ %\ganttbar[]{Maintenance}{2014-06-26}{2014-07-11} \ganttlink[link type=f-s]{elem4}{elem6} \ganttlink[link type=f-s]{elem1}{elem2} \ganttlink[link type=s-s]{elem6}{elem7} \ganttlink[link type=s-s]{elem8}{elem9} \end{ganttchart} \end{tikzpicture} \end{landscape} \end{document} What I want now to draw vertical lines I can custimze (color, size ...etc.) like the one for today. For example I want to draw a red line on 2014-05-17 and put validation as label. My question is like , but in my case I use isodate as slot time format and I don't know how to add a label text. Someone has an idea on how to do it?
|
I want to add a command to pgfgantt package that draw vertical line at a specified date (like the one for the today line). Here's what' I want to get (green line) : So I looked to pgfgantt.sty to see how the today line was drawn and I came with this code that I added into pgfgantt.sty file : \newcommand\drawverticalline[1]{% \begingroup% \begin{pgfinterruptboundingbox}% \begin{scope} \gtt@tsstojulian{#2}{\gtt@today@slot} \gtt@juliantotimeslot{\gtt@today@slot}{\gtt@today@slot}% \pgfmathsetmacro\x@mid{% (\gtt@today@slot - 1 + \ganttvalueof{today offset})% * \ganttvalueof{x unit}% }% \draw [/pgfgantt/today rule] (\x@mid pt, \y@upper pt) -- (\x@mid pt, \y@lower pt) node [/pgfgantt/today label node] {\ganttvalueof{today label}};% \end{scope} \end{pgfinterruptboundingbox}% \endgroup% } Now normally I could use the command like this : \drawverticalline{2014-05-07} but when I do this I got this error : ! Package PGF Math Error: Unknown function `pt' (in 'pt'). The error came from this code : \pgfmathsetmacro\x@mid{% (\gtt@today@slot - 1 + \ganttvalueof{today offset})% * \ganttvalueof{x unit}% }% that doesn't have pt on it. So I decided to comment it and replace \x@mid by a constant (5) but now I get this error : ! Undefined control sequence. Why I get this error? the command is defined! Here's the code from pgfgantt that draw the today line : \def\@tempa{none}% \edef\@tempb{\ganttvalueof{today}}% \ifx\@tempa\@tempb\else% \pgfmathsetmacro\x@mid{% (\gtt@today@slot - 1 + \ganttvalueof{today offset})% * \ganttvalueof{x unit}% }% \draw [/pgfgantt/today rule] (\x@mid pt, \y@upper pt) -- (\x@mid pt, \y@lower pt) node [/pgfgantt/today label node] {\ganttvalueof{today label}};% \fi% MWE \documentclass{article} \usepackage[frenchb]{babel} \usepackage{pgfgantt} \usetikzlibrary{shadows} \begin{document} \begin{tikzpicture} % optional \begin{ganttchart}[x unit=1.8mm, y unit chart=0.87cm, time slot format=isodate, vgrid=*{5}{dotted}, ] {2014-04-14}{2014-07-11} \gantttitlecalendar{month=name} \\ \ganttbar[progress=100]{title1}{2014-04-14}{2014-04-15} \\ \ganttbar[progress=100]{title2}{2014-04-15}{2014-04-17} \\ \drawverticalline{2014-05-07} \end{ganttchart} \end{tikzpicture} \end{document}
|
I have just started studying Classical Mechanics and I just can't wrap my head around why we legendre transform lagrangian to hamiltonian if it just reverses velocity and conjugate momentum.
|
I've just finished a Classical Mechanics course, and looking back on it some things are not quite clear. In the first half we covered the Lagrangian formalism, which I thought was pretty cool. I specially appreciated the freedom you have when choosing coordinates, and the fact that you can basically ignore constraint forces. Of course, most simple situations you can solve using good old $F=ma$, but for more complicated stuff the whole formalism comes in pretty handy. Then in the second half we switched to Hamiltonian mechanics, and that's where I began to lose sight of why we were doing things the way we were. I don't have any problem understanding the Hamiltonian, or Hamilton's equations, or the Hamilton-Jacobi equation, or what have you. My issue is that I don't understand why would someone bother developing all this to do the same things you did before but in a different way. In fact, in most cases you need to start with a Lagrangian and get the momenta from $p = \frac{\partial L}{\partial \dot{q}}$, and the Hamiltonian from $H = \sum \dot{q_i}p_i - L$. But if you already have the Lagrangian, why not just solve the Euler-Lagrange equations? I guess maybe there are interesting uses of the Hamiltion formalism and we just didn't do a whole lot of examples (it was the harmonic oscillator the whole way, pretty much). I've also heard that it allows a somewhat smooth transition into quantum mechanics. We did work out a way to get Schrödinger's equation doing stuff with the action. But still something's not clicking. My questions are the following: Why do people use the Hamiltonian formalism? Is it better for theoretical work? Are there problems that are more easily solved using Hamilton's mechanics instead of Lagrange's? What are some examples of that?
|
How many arrangements are possible with five letters chosen from Mississippi? How would I approach this problem? I just want some hints.
|
How many 6-letter permutations can be formed using only the letters of the word, MISSISSIPPI? I understand the trivial case where there are no repeating letters in the word (for arranging smaller words) but I stumble when this isn't satisfied. I'm wondering if there's a simpler way to computing all the possible permutations, as an alternative to manually calculating all the possible 6-letter combinations and summing the corresponding permutations of each. In addition, is there a method to generalize the result based on any P number of letters in a set with repeating letters, to calculate the number of n-letter permutations? Sorry if this question (or similar) has been asked before, but if it has, please link me to the relevant page. I also apologize if the explanation is unclear, or if I've incorrectly used any terminology (I'm only a high-school student.) If so, please comment. :-)
|
Is it possible to read a CSS class attribute value before the class is added to an HTML element using javascript? .myclass { color: #00aa00; } For example, how can I read the "color" attribute value of "myclass" before the "myclass" added to an HTML element?
|
I would like to return a string with all of the contents of a CSS rule, like the format you'd see in an inline style. I'd like to be able to do this without knowing what is contained in a particular rule, so I can't just pull them out by style name (like .style.width etc.) The CSS: .test { width:80px; height:50px; background-color:#808080; } The code so far: function getStyle(className) { var classes = document.styleSheets[0].rules || document.styleSheets[0].cssRules for(var x=0;x<classes.length;x++) { if(classes[x].selectorText==className) { //this is where I can collect the style information, but how? } } } getStyle('.test')
|
Prove that $$\vert \tan^{-1}x-\tan^{-1}y \vert ≤ \vert x-y\vert \quad \forall x,y \in \mathbb{R}. $$ What I did was to put $x \to x+h$ and $y \to x$ and then take $\lim_{h \to 0}$. This gives $$\lim_{h \to 0} \frac{\vert \tan^{-1}(x+h)-\tan^{-1}x\vert}{\vert h \vert} \le 1$$ which gives $$\frac{d \tan^{-1}x}{dx} = \frac{1}{1+x^2} \le 1.$$ But this proves it only for $x$ and another value $x+h$ very close to it and not $\forall x,y$. Please help.
|
I have to prove that $|\arctan x - \arctan y|\leq |x-y|$ for all real numbers $x$ and $y$. I know that it has something to do with the mean value theorem but I just don't know how to solve it. All help is appreciated Thanks in advance :)
|
is there any way where i can put a label on a full latex document and refer to it in another tex file. e.g. supplement.tex \documentclass[review,12pt]{article} \usepackage{graphicx} \begin{document} \label{supplement1} something \end{document} and in the main document main.tex do something like: \documentclass[review,12pt]{article} \usepackage{graphicx} \externaldocument{supplement} \begin{document} something is refered from Supplement file~\ref{supplement1} \end{document} EDIT thanks for your comments, what i basically want is not to refer to a section or chapter in another document, but i want to refer to the whole document.
|
I want to cross-reference between different .tex files, just because I want to put every chapters separately. Let's say in file chapterI.tex I have \label{a} and I want to access this in file chapterII.tex using something like \ref{a}. How to do this exactly in LaTeX, moreover if LEd have an easy feature to cover this, it will be better (I have put those both files in the same project). I found another question with similar title, but I just didn't really understand. It's here: .
|
In my math book, everywhere the author has used "non-ascending" instead of descending and "non-descending" instead of ascending. I was wondering if there is some special meaning or use associated with it? Because the way I see it is that it just increases the number of words and wastes ink.
|
In english based math language it seems that non-increasing $\Longleftrightarrow$ less or equal (non-strict decreasing) decreasing $\Longleftrightarrow$ strict less ( strict decreasing) Is that correct ? If so, how does it make sense ? precision I should note that even very good math teacher are making mistakes about this. Actually I asked this question after watching Boyd's video on convex optimization where even him is confused about this.... So I imagine many many people are, and there must be classes and tests about this absurd and buggy concept, which yields absolutely nothing interesting. So I just wonder if I really am missing something, or if, yes, some people decided to create an abstraction that is leaky (not not increasing $\neq$ increasing ?) verbose (4 words, with special negation logic, instead of using the word 'strict' and keeping the usual well defined predicate logic rules) absurdity of the concept This notation is absurd for the following reason : when dealing with element instead of functions we dont apply the same logic : we dont phrase $x < y$ as "$x$ is less than $y$" nor "$x\leq y$" as "$x$ is not-more than $y$". (If we did though, at least it would not be so harmful as not not-more would mean more) you have to define functions using a not notation, $f$ is non-increasing function $\Longrightarrow$ if $x$ is not-less than $y$, say 0.3 feet and 2.5 inches, then $f(x)$ is not-more than $f(y)$ This also violates a very basic tenet in programming style 101, which is here for a reason : never define or use something with a negation, it is confusing. To apply composition rules between functions, you better be buckled up with all the not. must be a fluff of cases More profoundly, this violates a fundamental principle of logic which is that given some ambiguity, you should assume the most general case apply. It is way worse than measuring things with non integral units. This is violating logical rules, and leaving a very basic concept obfuscated.
|
I upgraded my PHP to 7.0 and after this I have this message in the header of my website: Warning: Declaration of description_walker::start_el($output, $item, $depth, $args) should be compatible with Walker_Nav_Menu::start_el(&$output, $item, $depth = 0, $args = Array, $id = 0) in /homepages/2/d444683358/htdocs/wp-content/themes/zend/functions.php on line 59 Here is the line 59 in functions.php: $output .= apply_filters( 'walker_nav_menu_start_el', $item_output, $item, $depth, $args ); I'm not a coder so not sure what needs to be done to fix this? Thanks for your help
|
I'm currently working on a WordPress site and whenever in the admin I go the Appearance > Menus page I get the following error: ErrorException: Runtime Notice: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with that of Walker_Nav_Menu::start_lvl() in wp-admin/includes/nav-menu.php line 203 It seems like some sort of PHP compatibility issue. I'm running PHP 5.3.10 on my local dev machine. What would be the best way to remedy this problem?
|
Google seems to use the Title tag as the primary source for determining sitelink titles. However, I noticed that for some sites, the page title is not the same as the sitelink title. For example, Airbnb has a sitelink titled 'Business Travel': But when you enter the page the title is actually 'Corporate & Business Travel on Airbnb': Does anyone know how to determine the title of a sitelink, and make it different than the target page's title? Thanks! *Note: The precise process of determining the sitelink title is automated, and Google is not transparent about it at the moment.
|
I'm just wondering how it is possible that IGN.com has this in its title tag: Video Games, Cheats, Walkthroughs, Game Trailers, Reviews, News, Previews & Videos at IGN while on Google its title is simply "IGN". How can one achieve such a thing? Does it use some special meta tag I can't see?
|
It is possible to create sets of enumeration types in PHP like in Delphi? I want to create a set of options for a component like [required, readonly, ...]. I've seen but it does not solve my problem completely. For intance, in Delhpi you can do something like: type enum_options = (required, readonly, ...); // Enumerated type options_for_my_component := [required, readonly]; ... if (required in options_for_my_component) then ... More info at
|
I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give predefined values which IDEs' auto-completion features could understand. Constants do the trick, but there's the namespace collision problem and (or actually because) they're global. Arrays don't have the namespace problem, but they're too vague, they can be overwritten at runtime and IDEs rarely know how to autofill their keys without additional static analysis annotations or attributes. Are there any solutions/workarounds you commonly use? Does anyone recall whether the PHP guys have had any thoughts or decisions around enumerations?
|
In QGIS 3.4.4, using the Field Calculator, the expression round(-2.040,1) returns -1.9 where I expected it to return -2 Converting the field to real round(to_real(-2.040),1) did not change anything. In QGIS 2.18.19 and got the expected result. Is the syntax changed in 3.x or is this a (known) bug? Or am I expecting the wrong output?
|
I created a grid of rectangular polygons with the Create Grid function, from the Vector Creation group of the Processing Toolbox in QGIS 3.4.2. The rectangles measure half a degree of longitude by half a degree of latitude. When I want to label the polygons, I write an expression that rounds the values of latitude and longitude attributes to 2 decimal places, since the attributes created in the grid brings many decimal places. But the round function rounds the values badly. I know that I can create new attributes that express the coordinates with fewer decimal places and label the entities based on those attributes, but I was struck by the behavior of the function. I expected it to round to the nearest value. Does anyone know what the problem is that the round function wrongly rounds off the decimal number? Attached screenshots of Source Fields and the Attribute Table.
|
Just done a fresh install of Ubuntu 20.04 LTS on a Lenovo Yoga 530. I am having issues with my network, it's unrecognised. *network UNCLAIMED description: Network controller product: RTL8821CE 802.11ac PCIe Wireless Network Adapter
|
I'm trying to install drivers for my Wifi on my HP All-in-one desktop. I've been told to show the output of the command "sudo lshw -C network" so here it is: *-network description: Ethernet interface product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller vendor: Realtek Semiconductor Co., Ltd physical id: 0 bus info: pci@0000:01:00.0 logical name: enp1s0 version: 15 serial: 48:ba:4e:5c:06:5f size: 100Mbit/s capacity: 1Gbit/s width: 64 bits clock: 33MHz capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.1.21 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s resources: ire:31 import:e000(size=256) memory: fea04000-fea04fff memory:fea00000-fea03fff *-network UNCLAIMED description: Network controller product: Realtek Semiconductor Co., Ltd. vendor: Realtek Semiconductor Co., Ltd. physical id: 0 bus info: pci@0000:02:00.0 version: 00 width: 64 bits clock: 33MHz capabilities: pm msi pciexpress cap_list configuration: latency=0 resources: import:d000(size=256) memory:fe900000-fe90ffff Output from "lspci -nnk | grep -A2 0280": 02:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter [10ec:c821] Subsystem: Hewlett-Packard Company RTL8821CE 802.11ac PCIe Wireless Network Adapter [103c:831a] 03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader [10ec:5229] (rev 01)
|
I've been working on this problem for a few hours now, and haven't been able to make much progress answering any of the parts. I'm looking more for a push in the right direction than direct answers. Any help is very much appreciated. These are my attempts at solutions a) Let $A=a+b\sqrt d$, $B=x+y\sqrt d$ $N(AB)=N(ax+\sqrt d (ay+bx+by \sqrt d))=(ax+\sqrt d (ay+bx+by \sqrt d))(ax-\sqrt d (ay+bx+by \sqrt d))$ I tried to show that this is equivalent to this, but with no luck: $N(A)N(B)=(a^2+db^2)(x^2+dy^2)=a^2x^2+da^2y^2+db^2x^2+d^2b^2y^2$ bi) I can't completely wrap my head around the concept of units, so I was only able to use brute force to come up with units, and I have no way of knowing if I missed any. I tried using this equation, but didn't get anywhere. $(a+b\sqrt{-5})(x+y\sqrt{-5})=1$ bii) Similar problem to bi. I'm not sure how I might approach generating units.
|
Find all units in $\mathbb{Z}[\sqrt n] = \{a + b\sqrt n \mid a, b \in \mathbb Z \}$ and $n \in\mathbb N$, $n\ge 2$. First let $c +d\sqrt n$ be a unit so $$(a +b\sqrt n)(c +d\sqrt n) = 1,$$ $$ac + bdn +(bc + ad)\sqrt n = 1.$$ What next?
|
I am unable to add item in any sharepoint list programmatically from a custom web part. list.AddItem() doesn't work.
|
I try to add an item to my sharepoint list from a custom web part. Is there any mistake in my code? [WebMethod] public static string AjouterDemande() { SPList ListeDemandeConge = SPContext.Current.Site.RootWeb.Lists["DEMANDE CONGÉ"]; SPListItem ListItem = ListeDemandeConge.Items.Add(); ListItem["CODE"] = code; ListItem["DEMANDEUR"] = Utilisateur.LoginName; ListItem["DATE DEMANDE"] = DateTime.Today.Date; ListItem["DATE FIN"] = EndDateD; ListItem["DATE DEPART"] = StartDateD; ListItem["DUREE"] = int.Parse(DayCount); ListItem["PREMIER RESPONSABLE"] = Employe.FirstSuperior.LoginName; ListItem["DEUXIEME RESPONSABLE"] = Employe.SecondSuperior.LoginName; ListItem["PRESENCE PRES"] = Boolean.Parse(FirstRespPresent); ListItem["SOLDE CONGE"] = Conge.SoldeAnneeConge; ListItem["MOIS"] = int.Parse(StartDateTab[1]); ListItem["ANNEE"] = int.Parse(StartDateTab[0]); ListItem["JOURS APPROUVEES"] = 0; ListItem.Update(); ListeDemandeConge.Update(); return "true"; } When I use F10 to process debugging step by step and get to my listitem.update(), it went out without giving any error.
|
There seems to be no definitive solution for this, either in Ubuntu's official documentation or other sources of information. In some places systemctl is suggested but I think Ubuntu does not support it for the moment. Other suggestions include manually creating the links, but I feel there should be a better way. On the other hand there are graphical programs to achieve this, but what about servers without GUI? In Fedora I don't think this is an issue. You can use chkconfig to add/remove a service from the startup sequence. The equivalent of chkconfig for Ubuntu seems update-rc.d, but: # update-rc.d modemmanager enable update-rc.d: /etc/init.d/modemmanager: file does not exist Since Ubuntu is the most used GNU/Linux distribution, I believe there must be a way to do this in the command line with a specific command.
|
I read about how to enable and disable services in Ubuntu and it seems that there are different possibilities to manage them. The first method I found is update-rc.d to add new services to startup, which aims on the /etc/init.d folder and its contents. The other one I found is to edit .conf files in the /etc/init folder. What's the recommended way to enable / disable / add services and why? Could you please give a short bulletproof step by step example on how to add a service in Ubuntu and enable and disable it?
|
in Line 7 i get nullpointerexception, how can i fix that ? any ideas? private void updateHeights(BSTreeNode v) { BSTreeNode u = v; while (u != null) { int bfc=updateNodeHeight(u); u = u.parent; if (bfc<=-2) { if( getHeight(u.left.left) >= getHeight(u.left.right) ) { // Null Pointer Exception u = rotateRight(u); } else { u=LR(u); } } } }
|
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?
|
(runs Android apps on our PC / laptop) is not available for Linux. I am trying to run some android apps on my ubuntu. Many thanks :)
|
Basically, I have a kindle fire that uses a form of the android OS and was wondering if there was a way I could run similar apps on my Ubuntu system. Specifically I'd like the news reader program "Pulse". Anybody know if such an emulator or workaround exists?
|
Which one is correct? I was helping him to get the bag off the shelf. I was helping him getting the bag off the shelf. None of the above PS: This is my first post on english stackexchange, any correction around this post will also be appreciated :-)
|
Help my sister peel oranges. Help my sister to peel oranges. Help my sister peeling oranges. Help my sister with peeling oranges. Which of the above is/are correct, and why are the others incorrect?
|
The question is slightly deceiving however still simple for those academics therefore, here I present my question: If I take a para-magnetic material and put it very close to a homogeneous magnetic field, the para magnetic material will start to accelerate towards the magnetic body thus it has kinetic energy (but I ensure it does not hit the magnet and stop it with my fingers) so does the magnetic field or body loose it magnetism or will the same magnetism stay? Because in Wikipedia, it says: Energy is needed to generate a magnetic field both to work against the electric field that a changing magnetic field creates and to change the magnetization of any material within the magnetic field However I'm sure that para-magnetic materials are not magnetized, so where is this energy coming from? Or is my understanding wrong if so can someone link me to a good website which uses mathematics and theory to show how para magnetic material works? Thanks!
|
I recently bought some , considered to be the world's best selling desk toy. Essentially, they are little, spherical magnets that can form interesting shapes when a bunch of them are used together. After playing around with these buckyballs for a while, I wondered: "Can these guys ever lose their magnetism?" Then I went a step further and thought, "How are magnets affected by the 2nd law of thermodynamics?" So, how are magnets affected by the 2nd law of thermodynamics? Do they break down and lose their magnetism over time (like iron rusts over time)?
|
In my program I current have the path "C:\Windows\Microsoft.NET\Framework64\v4.0.30319" hard-coded. I need it to dynamically load DLLs for reflection only. Is there a registry key or environmental value I could use to avoid hard-coding this?
|
How can I obtain the .NET Framework directory path inside my C# application? The folder that I refer is "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727"
|
I have two monitors on one PC (extend option). The colour for two monitors are different, how can I make the colour settings. E.g For monitor A, the colour is as shown in the below image and for the monitor B, the colour is as shown in the below image
|
I use a dual monitor. The colors appear entirely different on the new monitor than they do on my laptop. When you are selecting colors etc, to be included in a website design, it totally freaks me out. Is there no software solution that finds how the settings of one of the monitor is and puts that to the second one? Otherwise what all settings do I need to change manually on the second monitor to make it appear as it does on the laptop? Thanks in advance.
|
I'm trying to select and edit all three individual <span> elements found in a <div> with an id of #calendarWidget. I've been able to select two of the three using querySelector and innerHTML. Here's my code: window.onload = function() { document.querySelector('#calendarWidget > div > table > tbody > tr > td > span').innerHTML="<span style='color:white; background:#3A87AD; padding: 0 5px; border-radius:2px'>Available Sessions</span>"; document.querySelector('#calendarWidget > div > table > tbody > tr > td > span:nth-child(2)').innerHTML="<span style='color:white; background:#A5CF48; padding: 0 5px; border-radius:2px'>Registered Sessions</span>"; document.querySelector('#calendarWidget > div > table > tbody > tr > td > span:last-child').innerHTML="<span style='color:white; background:#8a8a8a; padding: 0 5px; border-radius:2px'>Past Sessions</span>"; }; This code selects and edits the first and last <span> elements, but not the middle element. I've tried adding :nth-child(2) to the second <span> element, but that isn't working. Is it possible to make this work, and if so, how do I go about doing it?
|
Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.
|
What is starthelp.exe? It tries to load when I boot/re-boot Windows 7. I have searched for this file on my computer, but I cannot find it.
|
What should I do if my Windows computer seems to be infected with a virus or malware? What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware? This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.
|
Can I reuse mods from found weapons? I always recycled the weapons, but it seems that I have to build every mod for every weapon from scratch.
|
Let's say I have 10mm pistol. Can I break it down so I'm left with no pistol, and a [barrel, magazine, sight, grip] etc? I ask because I'm finding myself in the early game with mods across 3-4 pistols that I'd like to combine into one, but I lack the extra junk/spare mods to swap things around.
|
I am trying to evaluate a sum involving binomial coefficients, and by some manipulations, I have reduced it to $$\sum_{i=0}^{n} \binom{n+i}{i} 2^{n-i}$$ where $n$ is a constant ($n=1009$ in my particular case). (This looks like the LHS of the Hockey Stick Identity, except for the presence of the $2^{n-i}$ term. I would also be interested in further generalisation, replacing the $2$ by an arbitrary constant). To evaluate this, I attempted writing $$2^{n-i} = \sum_{k=0}^{n-i} \binom{n-i}{k}$$ which gave a more symmetric expression, but otherwise didn't seem to help much. So, given that the answer (according to Mathematica) is $4^n$, how can this be proved?
|
I just found this identity but without any proof, could you just give me an hint how I could prove it? $$2^n = \sum\limits_{k=0}^n 2^{-k} \cdot \binom{n+k}{k}$$ I know that $$2^n = \sum\limits_{k=0}^n \binom{n}{k}$$ but that didn't help me
|
I just moved to ubuntu. I have a 250GB SSD in which i installed the OS. I have my efi partition and my / partition in the SSD while installing. I want to add an extra HDD as my /home now. How do I do that? Also, I code using python and I need to install various python packages. How to install all of the in my HDD ???
|
I have 2 HDD drives in my computer. At the moment second drive is mounted as /media/storage. How can I move my user data from /home to /media/storage/home? Can I just move the data over there and then simply symlink it back?
|
After Abomination was beaten by Hulk in The Incredible Hulk, we never heard about him. So, it's safe to assume that S.H.I.E.L.D. took him in custody somewhere classified. But now S.H.I.E.L.D. is out of commission. Also, in Marvel's Agents of S.H.I.E.L.D., it is shown that the Fridge had fallen, freeing all supernaturals locked in there. Can we assume that Abomination is also free now? Or is there any glitch with this assumption?
|
Maybe people reading the comic books can explain this better, but in the movie The Incredible Hulk (the one with Edward Norton), Abomination is the enemy of Hulk, and at the end Hulk defeats Abomination, but after that, they don't say anything about him, even in the Avengers. After the fight between Hulk and the Abomination, Hulk escapes, and they don't say anything about controlling Abomination. So what happens with him?
|
I am using LWC for integration my application. I need to get the Personal Access Token at runtime. Is that possible to get? Presently, I hardcode Personal Access Token in my LWC application. like this: Http.setRequestHeader("Authorization", 'Bearer XXXXXXXXXXXXXXX'); i have clientId, ClientSecret, username and password. can i do auth 2.0 with it? I am not able to get the Personal Access Token.
|
I have a requirement to make a call to the from a Lightning component. The issue I am facing is that there is currently no native support for acquiring a valid API session ID from an @AuraEnabled method in a Lightning component Apex controller. The Lightning developer states that a named credential can be used in order to bypass this security restriction. However, when I set up a named credential and then pass that named credential reference as the endpoint for the Metadata Service API, I am receiving the following error: "FATAL_ERROR System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: INVALID_SESSION_ID: This session is not valid for use with the API faultcode=sf:INVALID_SESSION_ID faultactor=". I have found a potential using Visualforce. However, the thread presenting this work around does not reference the "Named Credentials" feature as an option. This also presents the same issue where the documented named credential stops have been followed and the same error is received, but no solution has yet been offered. I am not able to understand why the named credential feature is not bypassing the session id security measure for Lightning components. Any input would be greatly appreciated.
|
When I try to apt-get update it says: Get:1 http://archive-3.kali.org/kali kali-rolling InRelease [30.5 kB] Err:1 http://archive-3.kali.org/kali kali-rolling InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]> Reading package lists... Done W: GPG error: http://archive-3.kali.org/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]> E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. My /etc/apt/source.list looks like this: deb http://http.kali.org/kali kali-rolling main contrib non-free # For source package access, uncomment the following line # deb-src http://http.kali.org/kali kali-rolling main contrib non-free # deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 L$ #deb cdrom:[Debian GNU/Linux 2017.3 _Kali-rolling_ - Official Snapshot amd64 LI$ What should I do ? thanks!
|
I cannot update my Kali Linux, when trying to execute apt-get update I get this error message: # apt-get update Get:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease [30.5 kB] Err:1 http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]> Reading package lists... Done W: GPG error: http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease: The following signatures were invalid: EXPKEYSIG ED444FF07D8D0BF6 Kali Linux Repository <[email protected]> E: The repository 'http://kali.mirror.garr.it/mirrors/kali kali-rolling InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. If you need my kernel version: # uname -a 4.13.0-kali1-amd64 #1 SMP Debian 4.13.10-1kali2 (2017-11-08) x86_64 GNU/Linux How can I fix this?
|
I am having the below shell script var="this is a test" ls -ltr| while read file do echo $var done echo $var I am getting the below output: this is a test this is a test this is a test How am I getting the value of the variable "var" set to "this is a test" inside while loop since piping will spawn a new sub-shell and I am also not exporting my "var" variable in the main shell? As far as I know, in order for the child to inherit the variable values from the parent shell, we need to export the variable, but in this case the variable value is getting inherited without the "export" statement.
|
Why do I get different values for $x from the snippets below? #!/bin/bash x=1 echo fred > junk ; while read var ; do x=55 ; done < junk echo x=$x # x=55 .. I'd expect this result x=1 cat junk | while read var ; do x=55 ; done echo x=$x # x=1 .. but why? x=1 echo fred | while read var ; do x=55 ; done echo x=$x # x=1 .. but why?
|
I'm seeking a word for the experience of being intensely, vividly involved in a TV show or novel. I have a continuous event occur when I am reading or watching tv...that I'm not exactly sure how to describe. If a show or novel gets really intense I have a habit of getting...overwhelmed by what is occurring. Like...it feels real and like I am a part of it and I get nervous and my heart rate speeds up and I feel like it's actually happening and I end up needing to take a break from what I'm doing sit and breath for awhile and remind myself that it's not real. Is there a word for this situation?
|
Sometimes, when I watch a (real good) movie, I feel like the movie "sucks me into the screen". I feel that I am really inside the movie, really watching real persons acting in real situations. I do not really see what happens around me anymore, I get some kind of tunnel view and see only the screen. It's like being in John Malkovich's Head, just not seing the borders that are around me from that weird cave. I wanted to know if there is a word for this kind of experience. Also, I'd like to know if there is a word for "re-gaining" reality. After a few seconds or minutes in this weird state, I feel like my field of vision is growing larger and larger (just as if I was about to leave Malkovich) and then I'm "back in reality". It's a hard to describe experience for me, not only because my mothertongue is not english but german, but also because, afaik, german lacks words for this, too. But when I have the english words, I believe, I may find the german ones as well.
|
I applied for a Schengen visa to attend a 20-day summer school program in Berlin and was issued one, valid for a little more than a month, which says "Geschäftsvisum erwerbstätigkeit nicht gestattet". It translates to Business visa, employment not allowed. What I am worried about is that I am a student and have an acceptance letter only for a summer school program. I do not have any documents to support a business visa. Do I have to get the sticker changed and if so what should it say in the remarks? Sorry for the long question. My nationality is Indian.
|
I will be attending a summer school which will last 10 days. I want to know: for applying for a Schengen visa, is the purpose of my trip considered as touristic or study?
|
I'm converting a string into a character array in order to use the Arrays.sort() method on it. However, when I turn the array back into a string and try to print it out, it gives me a bunch of hexadecimal (I believe) instead of the actual string. In fact, I also get hexadecimal trying to print the sortedStringchar... why is this happening, why am I not getting the strings/character array printed in characters? String originalString = "HELLO"; char[] sortedStringChar = originalString.toCharArray(); Arrays.sort(sortedStringChar); String sortedString = sortedStringChar.toString(); System.out.println("Sorted String ===== " + sortedString); Output of System.out.println: Sorted String ===== [C@2d928643
|
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]
|
Basically the title. The wavelength of light from the CMBR has expanded as the universe expanded and so it has lost energy since it is inversely proportional to the wavelength. Where did this energy go? It may have been asked before but I couldnt find it...
|
So I have learned in class that light can get red-shifted as it travels through space. As I understand it, space itself expands and stretches out the wavelength of the light. This results in the light having a lower frequency which equates to lowering its energy. My question is, where does the energy of the light go? Energy must go somewhere! Does the energy the light had before go into the mechanism that's expanding the space? I'm imagining that light is being stretched out when its being red-shifted. So would this mean that the energy is still there and that it is just spread out over more space?
|
From AMD site the required powersupply for 7950 is 500W. whereas when using custom configurator in ibuypower.com it is saying the 7950 requires 750W powersupply. I currently have AMD HD 6850 on 700W powersupply. I am planning to buy 7950, so I was wondering if 700W is sufficient? or do I need 750W? I have Intel® Core™ i5-2500 Processor (4x 3.30GHz/6MB L3 Cache) with 4GB RAM ( which I purchased from ibuypower.com some time ago )
|
Note: This is intended to become a canonical post. I got a dedicated graphics card of type XXX and it claims I need at least a YYY Watt PSU. How big does my PSU really need to be?
|
This question relates to whether it is a good starting point for a cut point in binary classification with logistic regression to the use the mean of the binary response variable as the initial cut point rather than simply 0.5. Traditionally when people use logistic regression, people with use 0.5 as the threshold to determine when the model predicts YES/positive versus NO/negative. People may run into trouble when the model only predicts one "answer" when using an imbalanced training set. One way of dealing with this is to balance the training set via oversampling or under-sampling and keeping the test holdout set with the original balance. However, I suspect that a good starting point for a cut point appears to be the mean of the binary response variable. Is this usually true? I created two models, one on a balanced training set and another on the original imbalanced training set. print(table(actual=test$y, predicted=test$fit>0.5)) predicted actual FALSE TRUE 0 2359 500 1 11 130 With the imbalanced training, I used the mean of the binary response variable: print(table(actual=test$y, predicted=test$fit>0.0496)) predicted actual FALSE TRUE 0 2317 542 1 7 134 If one just uses 0.5, it looks like the model is a complete failure: `print(table(actual=test$y, predicted=test$fit>0.5))` predicted actual FALSE 0 2848 1 152 They both had a KS of 0.76, so it seems like sound advice. Example R code: require(ROCR) require(lattice) # x=1:10000/10000; y=ifelse(runif(10000)-0.7>jitter(x),1,0) #y=ifelse(rnorm(10000)-0.99>x,1,0) mean(y) s=sample(length(x),length(x)*0.7); df=data.frame(x=x,y=y) ##undersample train=df[s,] train=rbind(train[train$y==1,],train[sample(which(train$y==0),sum(train$y==1)),]) ##oversample train=df[s,] train=rbind(train[train$y==0,],train[sample(which(train$y==1),sum(train$y==0),replace = T),]) mean(train$y) #now balanced threshold=0.5 test=df[-s,] #unbalanced mean(test$y) # ex=glm(y~x,train, family = "binomial") summary(ex) nrow(test) test$fit=predict(ex,newdata = test,type="response") message("threshold=",threshold) print(table(actual=test$y, predicted=test$fit>threshold)) #+results pred<-prediction(test$fit,test$y) perf <- performance(pred,"tpr","fpr") ks.sc=max(attr(perf,'y.values')[[1]]-attr(perf,'x.values')[[1]]) plot(perf) print(ks.sc); #ks.score levelplot(fit~y+x,test,col.regions = terrain.colors(100)[1:95]) #+ imbalanced approach #############imbalance approach train=df[s,] threshold=mean(y) message("threshold=",threshold) ex=glm(y~x,train, family = "binomial") summary(ex) test$fit=predict(ex,test,type = "response") summary(test$fit) print(table(actual=test$y, predicted=test$fit>threshold)) print(table(actual=test$y, predicted=test$fit>0.5)) pred<-prediction(test$fit,test$y) perf <- performance(pred,"tpr","fpr") ks.sc=max(attr(perf,'y.values')[[1]]-attr(perf,'x.values')[[1]]) plot(perf) print(ks.sc); #ks.score levelplot(fit~y+x,test,col.regions = terrain.colors(100)[1:95]) I noticed a similar question asked I like the answer given here which states to maximize the specificity or sensitivity: But I also suspect that the usual starting cut off of 0.5 is bad advice. Comments?
|
I have 100,000 observations (9 dummy indicator variables) with 1000 positives. Logistic Regression should work fine in this case but the cutoff probability puzzles me. In common literature, we choose 50% cutoff to predict 1s and 0s. I cannot do this as my model gives a maximum value of ~1%. So a threshold can be at 0.007 or somewhere around it. I do understand ROC curves and how the area under curve can help me choose between two LR models for the same dataset. However, ROC doesn't help me choose an optimum cutoff probability that can be used to test the model on an out-of-sample data. Should I simply use a cutoff value that minimizes the misclassification rate? () Added --> For such a low event rate, my misclassificiation rates are affected by a huge number of false positives. While the rate over all appears good as total universe size is also big, but my model should not have so many false positives (as it is an investment return model). 5/10 coeff are significant.
|
I did a , but came up with no real helpful results. Sometimes a subjective/argumentative question can be a helpful learning tool to help explore what others thing about certain subjects. I've seen some pretty good "subjective" questions on StackOverflow get shut down pretty quick, even though the outcome of the discussion could have been really helpful. So if we can't ask these questions on SO, is there a StackExchange site that will tolerate subjective/argumentative questions?
|
Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.
|
I want to allocate 20GB for / and remaining unallocated to /home. The problem is I can't move the unallocated space to after / using GParted. My partitions: I'm using Ubuntu 18.04.
|
Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers. Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions). Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space. How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?
|
Is it "possible" to accept a retributive theory of punishment, while simultaneously accepting a deterministic view of human behavior? Is belief in freewill a necessary condition for a belief that retributive punishments are ethical/correct? Under what set of assumptions are these ideas compatible?
|
There are several ideas on hard determinism, but the core seems to be that in an interconnected existence, there can be no "actions" (free will), but only "reactions" (determinism). An action of free will would have to be a separate entity outside of existence, so we'd say it can't occur. Now fast forward to Joe Schmo the robbing/murdering/rapist. Joe wasn't born in some infinite bliss utopia, then decided one day to invent the concept of scumbaggery. He's a product of an incomprehensible number of variables - maybe some are apparent like his dad was a violent alcoholic or whatever, but most likely it's far more complicated than that. So that's fine - I get all that - but if that's the case, then how can you ethically deal with people like that? You can't hardly let them do what they please at the expense of society, but then how can you get medieval on them when they're basically riding a wave? I think that's a big reason why people fight concepts of determinism that mitigate or eradicate the concept of free will - now everyone has a license to do what they want and how can you punish them, it's not their fault! How would/could/should you consolidate hard determinism with responding to criminal acts?
|
Is one of these two right and the other wrong? There aren’t many farms out here, but the few fields he does see have already been emptied of their crop. There aren’t many farms out here, but the few fields he does see have already been emptied of their crops. If both are right, how does the meaning change?
|
After the therapy, eight children (43%) became able to crawl/move on their back. Or should I use "on their backs"? Singular because each child only has one back, or plural because we're dealing with eight backs?
|
I have a worksheet that looks like this: Right now each Number contains a varying amount of Companies and Company Numbers. I would like to set up the spreadsheet so each Company has their own row for each Number. See below for visual representation. I would like to convert the spreadsheet for each existing row like this: So row 2 would be converted into row 2 and row 3 to look like this: There are thousands of rows already so doing this manually would be quite the pain. Is there a way to use Excel functionality to convert the spreadsheet to fit this?
|
I would like to change this: Filer ShareName IPAddress1 IPpaddres2 IPAddress2 ... ... .... ServerA /share1/tools 192.168.1.52 192.168.1.65 192.168.1.158 ServerA /share/library 192.168.1.65 192.168.1.61 192.168.1.155 ServerB /share/tools 192.168.1.158 192.168.1.159 ServerD /share/misc 192.168.1.7 .. ... ..... ....... To this, in a new worksheet: Filer ShareName IPAddress ServerA /share1/tools 192.168.1.52 ServerA /share1/tools 192.168.1.65 ServerA /share1/tools 192.168.1.158 ServerA /share/library 192.168.1.65 ServerA /share/library 192.168.1.61 ServerA /share/library 192.168.1.155 ServerB ... ... ServerD ... ... .. ... ..... .......
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.