body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
While watching the Star Wars Holiday Special a segment near the middle includes a cartoon where C3PO talks about a virus that only effects humans (referring to Luke who had previously passed out). Is the Holiday Special considered canon? | Is there a canon mention that Kenobi, Windu, Palpatine, the Skywalkers etc. are the same human species as all the other humans in like Han Solo? They look like humans, but we know that they're different in at least one characteristic: midi-chlorian hosting, which I suppose humans can't do as per definition. Answers only from Canon, please. EU is welcome... |
My question is the same as in the link provided below but when I go to Google Search Console it asks me to verify my Github profile https://github.com/[xyz] by inserting an HTML file. I am unsure about how to do that or are there any other ways that I can verify my GitHub profile. Similar question: Google serch console: | Is there any way to index my Github account to google search. I see that many people's account show up as soon as I type their name, but mine doesn't show up even after I type my name followed by github n search. |
11 people in a certain company have access to a safe. The company owner wants any group of six people out of the 11 to open the safe, But no five-person group can open the safe itself. To achieve this goal he decided to put more than one lock on The safe, and give each person keys only to some of the locks. How many locks he has to put on the safe and how many keys each person will have to achieve his goal (the company owner wants to reduce the number as much as possible The locks, and as much as possible reduce the number of keys each person receives)? Any ideas how to approach this question? | There are 8 crew members, The leading member wants that only a crew of 5 people or more could open a safe he bought, To each member he gave equal amount of keys, and locked the safe with several locks. What's the minimal number of locks he should put: at least 5 crew members would be required to open the safe? Any team of 5 crew members could open the safe, but none of the 4 team crew members. 1,2 stands individually of course. |
This question has generated a lot of downvoting on three SE sites so let me try to explain where it comes from. The magnitude of the bash "shellshock" problem may turn out to be larger than anything since Y2K. Having been part of a complete replacement of a large data center for Y2K, I'm alarmed at the panic that's been generated over shellshock (appropo name, btw). I'm concerned that rushing in quick fixes without extensive planning and testing is going to create far greater problems than the one we think we are facing. For Y2K, we learned that the date code fixes were the easy part. The massively more complex, error-prone, and unscheduled downtime-producing part was discovering and fixing/mitigating the failures in other software caused by the fixes. Some of these weren't discovered until the new systems had been in production for months. Despite a herculean effort, a few even resulted in organizational policy changes because they were too disruptive to fix. I am not suggesting that security-patching is unadvisable. However, in this case only, I have noticed a suspicious series of events culminating in not just another run-of-the-mill vulnerability, but one demanding massive updating of systems affecting virtually every person using a computer on the planet. The vulnerability is real. But is the need for instant action? It is this combination of factors that gives me pause... A fact... A timeline... Ramifications... The Bash shellshock "vulnerability" has been a "feature" of Bash for 22 years. You'd think in all that time, in all those high-security environments that run Unix or Linux, someone would have worried about misuse. Now, every installation of Bash in the world is about to be replaced. Though Bash is open-source, few people actually take the time to study the code of such large and complex programs. Bash is written in C, which supports embedded assembly-language code. Code that even fewer programmers have the skills to read. Bash is written in C, which easily supports treating any block of binary, such as something labeled as data or a small image, as code. Thus, a skilled programmer could hide "backdoor" code in plain sight, and it probably wouldn't be discovered unless it caused an error of some kind. The claim... "" The question... Should bash shells be replaced with these new patched versions? RESOURCES Update 2017-09-28 After 3 years, someone actually found a sliver of usefulness in this and upvoted the question? Well then, let me a mea culpa... The above's focus on the circumstances surrounding Shellshock's announcement were a knee-jerk reaction on my part. A reaction I regret. While factual, the "conspiratorial" tone produced a backlash that obscured anything of value. I leave it intact only so that the many good comments make sense. Enough new versions of most of the software involved have been released and well vetted by now that Shellshock may only still be of some concern to those running low-powered systems that must use older software. My alarm at the time was over the dangers of blindly removing 22 year old functionality from those systems with no analysis of the impact. Apparently, it turns out that the functionality was rarely, if ever, used. | Red Hat recently in the Bash shell. Some are calling it the "shellshock" bug. Since OS X is built off of Unix, is it vulnerable to attacks that exploit this bug? As an end user, do I need to worry about an immediate fix? Or is it better for me to wait for an official software update from Apple? |
I have a function that has 5 requqired parameters and 2 optional ones. So a user can input 5-7 parameters and they are stored inside of an array. How can I pass those values to the function, is there something similar like extract() that returns the values and not the numbers? E.g.: $arr = ['one', 'two', 'three', 'four', 'five', 'six']; functionname($arr[0], $arr[1], $arr[2],$arr[3],$arr[4],$arr[5]) doesn't work, because I never know for sure if the sixth parameter really exists. Thanks for any help. | Python provides the "*" operator for unpacking a list of tuples and giving them to a function as arguments, like so: args = [3, 6] range(*args) # call with arguments unpacked from a list This is equivalent to: range(3, 6) Does anyone know if there is a way to achieve this in PHP? Some googling for variations of "PHP Unpack" hasn't immediately turned up anything.. perhaps it's called something different in PHP? |
Let $f:[0,\infty)\to \mathbb R$ be Continuous and strictly decreasing function such that : $\lim_{x\to \infty}f(x)=0$ prove $$\int_0^\infty \frac{f(x)-f(x+1)}{f(x)}$$ Diverges. I can not prove. please help . | Let $f:[0,\infty)\rightarrow \mathbb{R}$ be a continuous and strictly decreasing function. If $\displaystyle\lim_{x\rightarrow\infty}f(x)=0$, prove that the following integral is divergent : $$\int_0^\infty \frac{f(x)-f(x+1)}{f(x)}dx$$ First, it's not hard to see that $f(0)>0$ and also $f(x)>0$ for each $x$. I think we have to show that behavior of $\frac{f(x)-f(x+1)}{f(x)}$ is "similar" to $\frac1{x+1}$ or $\frac{f(x+1)}{f(x)}$ is "similar" to $\frac{x}{x+1}$ for big values of $x$. But meaning of "similar" is not clear yet ! The most naive and rough approach is to show $\frac{f(x+1)}{f(x)}<1-k$ for some $0<k<1$ and therefore $f(x)-f(x+1)>kf(x)$. One step forward, it's good to compare $\frac{f(x+1)}{f(x)}$ and a multiple of $\frac{x}{x+1}$ or equivalently to compare $C (x+1)f(x+1)$ and $xf(x)$. But still I can't extend this idea . I tried more ways but I couldn't find a proper way to solve the problem. Any hint is appreciated ! |
I'm trying to follow the solution in to disable extra touchpad device so that syndaemon will work to disable the touchpad while typing so I won't keep having a jumping cursor (very hard to type right now)! Having trouble following the instructions, not familiar with Ubuntu that much. I enter the following: sudo gedit /usr/share/X11/xorg.conf.d/51-synaptics-quirks.conf That opens the text file. I then paste the following: # Disable generic Synaptics device, as we're using # "DLL0704:01 06CB:76AE Touchpad" # Having multiple touchpad devices running confuses syndaemon Section "InputClass" Identifier "SynPS/2 Synaptics TouchPad" MatchProduct "SynPS/2 Synaptics TouchPad" MatchIsTouchpad "on" MatchOS "Linux" MatchDevicePath "/dev/input/event*" Option "Ignore" "on" EndSection Then click save and get the following errors: ** (gedit:6473): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-language not supported ** (gedit:6473): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported ** (gedit:6473): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported So not able to fully complete this solution. Let me know if you can help so I can perhaps make this new Dell Inspiron 15 7579 usable (trying both 17.04 on thumb drive and 16.04 LTS on external hard drive). | I have upgraded 14.04 to 16.04 . Now I am trying to open the gedit from terminal by passing the command: sudo gedit /some/where/file.txt but it is throwing an error stating that: (gedit:2090): Gtk-WARNING : Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files** However, it is opening the file. When I try to save any modification then it is showing this error after saving the file: (gedit:2090): WARNING : Set document metadata failed: Setting attribute metadata::gedit-position not supported I am not getting why this is happening in 16.04 only; it was not on 14.04. |
I have a folder /mqlocal/mqm. inside that there are 2 text files (bindu.txt,sujitha.txt). I need code to count the number of text files under the directory. The result should be an integer. | For the purpose of testing, I'd like count how many images files are inside a directory, separating each image file type by file extension (jpg="yes". This because later it will be useful for another script that will execute an action on each file extension). Can I use something like the following for only JPEG files? jpg="" count=`ls -1 *.jpg 2>/dev/null | wc -l` if [ $count != 0 ] then echo jpg files found: $count ; jpg="yes" fi Considering file extensions jpg, png, bmp, raw and others, should I use a while cycle to do this? |
Hi i have a problem with Microsoft Edge and lightning Component, the thing here is that i build a lightning component and works fine on all other browsers but when i test it on Microsoft Edge it shows me this error: This page has an error. You might just need to refresh it. Error in $A.getCallback()[Unabled to get property 'apply' of undefined or null reference] Failing descriptor: {markup://aura.html} I searched about that error on salesforce forums and no one has the solution, then i found that that error is due to a javascript syntax error. I changed the syntax of the tag that has the 'onclick event' from: <button onclick="{! c.someAction }">Action</button> to: <button onClick="{! c.someAction }">Action</button> You can see that only changed the 'c' to upper case and the error is not showing anymore, but anyways it doesnt do anything. PD. On my controller code i only have a console.log. | We have a community built with custom lightning components and the locker service update is active. The onclick event has been defined on several components. The onclicks are working fine in Chrome, Firefox and IE11. <a href="" onclick="{!c.updateUser}">Save</a> There seem to be some issues in MS Edge though. When we click on an element with an onclick defined, we get the following error: This page has an error. You might just need to refresh it. Error in $A.getCallback() [Unable to get property 'apply' of undefined or null reference] Failing descriptor: {markup://aura:html} We have been testing on 5 different laptops. 3 of them have the error, while the other 2 don't have the issue in Edge. This was all tested in a Spring 17 sandbox. We also tested on a Winter 17 org with one of the laptops that has the issue and then everything seems to work fine. Another test we did, was to remove all of the logic within the controller method and just have a console.log in it, but it never reached that point of the code since we didn't get the log. We also replaced the expression for the onclick with an alert, but that also doesn't work. Does anyone have an idea how we can resolve this? |
Since spectrum of noetherian ring is a noetherian topological space, I am finding an example s.t. a non-noetherian ring whose spectrum is noetherian. Since most nice rings are noetherian, actually I do not have many examples to start, does any one can help? Thanks! | Question 1: Does such a ring exist? Note: The definition of a noetherian topological space is similar to that in rings or sets. Every descending chain of closed subsets stops after a finite number of steps (Question 2: is this equivalent to saying that every descending chain of opens stops?) |
I submitted my manuscript to a journal from 1 month ago in scholar one. The status changed to admin check to under review after one week. Now, it shows Awaiting Decision. Does this mean that the paper has passed the editorial check and the external reviewer completed? | What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take? Note that this question is about the typical situation and hence not about: Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or . This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question. |
When I ask question about java code , I copy the code in eclipse. And then I paste the code on the web board like here. But the code's color become black only. Red, blue colors are not showing. How do I preserve the code's color when I write down the code on web? | I noticed that sometimes my code gets highlighted in different colors when rendered. What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange? |
This is what i know about symmetric distributions: The distribution of rv (random variable) $X$ is symmetric about $a$ iff $$ P ( X \le a - x ) = P ( X \ge a + x ) \qquad \forall x \in \mathbb{R} $$ I just want to confirm ,.,is this " iff " correct ? i mean it is clear to me that if $x$ is symmetric about $a$ it will satisfy above equation, is the converse also true ? | What's the definition of a symmetric distribution? Someone told me that a random variable $X$ came from a symmetric distribution if and only if $X$ and $-X$ has the same distribution. But I think this definition is partly true. Because I can present a counterexample $X\sim N(\mu,\sigma^{2})$ and $\mu\neq0$. Obviously, it has a symmetric distribution, but $X$ and $-X$ have different distribution! Am I right? Do you guys ever think about this question? What's the exact definition of symmetric distribution? |
i have this if else statement that always return ( other than 0 ) 'hey', but when the condition == 0, it will not display the 'ho' value. Appreciate advice. Thanks. $('#icNumber').on('change', function(){ let num = $(this).val().substr(13,1) %2 if(num){ $('#tortrix') .removeClass('d-none') .addClass('d-block form-control animated fadeIn') .attr('value', function(i, oriVal){ if(num == 0) { console.log('ho') return 'value','Testatrix'; } else { console.log('hey') return 'value','Testator'; } }) } else if (num == "") { $('#tortrix').removeClass('d-block').addClass('d-none') } }) | I'm using to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement. Is there a performance benefit to replacing == with ===? Any performance improvement would be welcomed as many comparison operators exist. If no type conversion takes place, would there be a performance gain over ==? |
Anyone knows how to make an operator button that gets greyed out if two or more objects are not selected. | I have a panel with split column. In the 2nd row is 3 boolean variables. I want to grey out the 2nd and 3rd option by default. I want the 2nd to be changeable if 1st is true, and 3rd to be changeable if both 1 and two are true. I've read something about "poll()" but not how to actually use it, or set conditions. Physics should only be enablable if singleMesh, and destructable only if physics enabled. # Create two columns, by using a split layout. split = layout.split() # First column col = split.column() col.label(text="Building Size:") col.prop(bpy.context.scene.user_vars, 'buildingHeight') col.prop(bpy.context.scene.user_vars, 'buildingWidth') col.prop(bpy.context.scene.user_vars, 'buildingDepth') # Second column, aligned col = split.column() col.label(text="Dynamics:") col.prop(bpy.context.scene.user_vars, 'singleMesh') col.prop(bpy.context.scene.user_vars, 'enablePhysics') col.prop(bpy.context.scene.user_vars, 'destructable_Building') #EDIT This is what the specific solution to my example looks like. col = split.column() col.label(text="Dynamics:") col.prop(vars, 'singleMesh') sub = col.row() sub.enabled = vars.singleMesh sub.prop(vars, 'enablePhysics') sub = col.row() sub.enabled = vars.enablePhysics sub.prop(vars, 'destructable_Building') |
When I choose to add Z or X, Y, Z function, "Add function surface" menu appears in the bottom-left corner. But once I click outside the object it disappears and I can no longer change the function. So how do I open that menu again to change the function or where can I find menu to redefine the function without adding new object whenever I want? | When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters. Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this? |
I have openjdk version "1.8.0_191" in my system. I need Oracle Java 7 for my project. I tried to install with following commands sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer But it is throwing the below error Reading package lists... Done Building dependency tree Reading state information... Done Package oracle-java7-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'oracle-java7-installer' has no installation candidate How to install the both version in my system? Thanks in Advance. | I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle? Before release Java 7, I followed to install Java 6. But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7? |
This "new" functionality almost makes me regret buying a new Macbook. How on earth do I turn off the menu showing when the mouse hits the top? It's so incredibly annoying... I went full screen for a reason. | Pretty much every application I use in full-screen (including Firefox, MacVim and the Terminal) have tabs on the top of the screen. The problem is, when I move my mouse to reach the tabs I'll often accidentally touch the top of the screen, bringing in the OS menu OVER the tabs: Is there any way to change this behavior? I'd prefer it if the menu bar would stay hidden when I'm using a full-screen app, even if my mouse does touch the top of the screen. |
Let $\varepsilon >0$. Let $N>?$. For any integer $n>N$ we have $$\frac{n^k}{2^n}<\varepsilon.$$ I don't know how to proceed here sensically. I'd say we have to start with $$<\frac{n^k}{2^N}$$ But what do we do here about the $n^k$? Remember, I don't want to use l'Hopital or for me unproven limit laws like "exponents grow faster than powers" Also, I don't want to use hidden l'Hopital, i.e. argumenting with derivatives. Since we don't even have proven derivative laws. | In other words, how to prove: For all real constants $a$ and $b$ such that $a > 1$, $$\lim_{n\to\infty}\frac{n^b}{a^n} = 0$$ I know the definition of limit but I feel that it's not enough to prove this theorem. |
In the following sentence, are both "sleep" and "be sleeping" correct? If so, what's the difference? When can I leave? I should sleep / should be sleeping at home now. | Ok, see , here is this tense matrix Past - Present - Future Simple Continuous Perfect Perfect Continuous We also have the same tense structures for Modals Can - May - Might - Must - Could - Would - Ought to Simple may do Continuous may be doing Perfect may have done Perfect Continuous may have been doing I would think the differences between "must live in Japan" & "must be living in Japan" are: Must here refers to a very high possibility. Things that you think is very likely to happen. Ex: She must live in Japan (we also have "She lives in Japan" which means she lives there more or less permanently) And when you want to emphasize a continuous process, say "She must be living in Japan" (we also have "She is living in Japan" which means she lives there more or less temporarily) Ok, "must, might" are easy, but what about "should"? My question is that: What are the differences between "I should live in Japan" & "I should be living in Japan"? Does "I should live in Japan" mean "I should live there more or less permanently" & "I should be living in Japan" mean "I should live there more or less temporarily"? Note: "must" here refers to possibility not obligation. She must live in Japan (=it is likely that she lives there at this moment), not (She have to live there) as if it is obligation "should" here refers to advice. |
I've lost the thumbdrive that had the image on it. Is there some way to reinstall without one? E: It's a reinstall over an existing ubuntu install. Windows issues really aren't all that relevant. | I want to install Ubuntu on my laptop that doesn't have a CD-ROM drive and I have no spare USB disk. I've tried Wubi, but that doesn't seem to work (since it prompts me to have the CD in the drive, which I don't have). How can I install Ubuntu, easily and in a fast way? P.s: I want to dual boot it with Windows 7 (which was preinstalled). Edit: When extracting the ISO to a folder and running Wubi it does install, but when I reboot the computer, it doesn't show GRUB, nor can I choose if I want to boot Ubuntu or Windows 7. After trying for the third time today, wubi gives me an error: Permission denied I'm the administrator on the PC. |
Newbie here. I've looked through the answers to similar questions and am both in awe and perplexed by what I see. While I am sure that once I get the lingo down (solidify, mesh, remesh) it will all make sense, however I find that I have an urgent requirement and I'm only part way through the learning flow. I need to create a few atoms. Quite simple really as far as I can tell, but I'm not there yet in the learning. I need a sphere with "H" on it (I guess the secret of which element it is is out). There's a really good answer, apparently, on a question about creating balloons with text, but the language (peel off the pelt etc) used is well beyond me. Is there a location I should be looking to learn how to slap text onto a sphere? | I am fairly new to blender and I am trying to do something which I am assuming is fairly straight forward with no success. All I'm looking to do is emboss some text onto the curved part of a yogurt pot. Image attached below. What is the quickest and easiest way of doing this? Thanks in advance |
We want to install Ubuntu on a , which had Windows 10 on it. We created a bootable USB, and followed the install instructions. It went well and at the end it asked us to restart. Since then it returns different errors and it does not even come up. We are not able to use the laptop any more. We do not have Windows anymore since we wiped it out during the installation. Solution: In the bootable USB, go to folder /boot/efi and rename the file grubx64.efi to mmx64.efi Restart into the UEFI settings and change the controller to AHCI instead of Intel RST Premium Updated the BIOS, install the latest update | 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: |
This is a question about the process of developing an addon rather than a specific error in the script. I'm creating an Operator that I want to show up in the UV Unwrap menu. I'm editing the script in the Scripting tab and every time I want to try the latest version of my code, I press the little arrow button to run my script. Unfortunately, every time I do a new entry is added to my menu list, so over a programming session my menu quickly fills up with lots of identical entries to run my operator. I just want a single menu entry. I thought my operators unregister() method would take care of this, but it does not seem to. What would be a better workflow to develop my addon? import bpy from bpy.props import FloatProperty class UnwrapWorldUvOperator(bpy.types.Operator): bl_idname = "uv.unwrap_world_space" bl_label = "Unwrap World Space Operator" bl_options = {'REGISTER', 'UNDO'} scale: FloatProperty() @classmethod def poll(cls, context): obj = context.active_object return obj and obj.type == 'MESH' and obj.mode == 'EDIT' def execute(self, context): print (self.bl_idname) return {'FINISHED'} def menu_func(self, context): self.layout.operator("uv.unwrap_world_space") def register(): bpy.utils.register_class(UnwrapWorldUvOperator) bpy.types.VIEW3D_MT_uv_map.prepend(menu_func) def unregister(): bpy.utils.unregister_class(UnwrapWorldUvOperator) bpy.types.VIEW3D_MT_uv_map.remove(menu_func) if __name__ == "__main__": register() | Is there a way to use the Blender Text Editor for adding a custom menu and not get a duplicate every time I click on "Run Script" to test the menu? For example, in the text editor, load the template like so: Template -> Python -> UI Menu Then notice every time you press "Run Script" you get another menu in your main menu bar. How can I update my menu without getting a duplicate? I tried simply commenting out register() but then new updates don't show up. |
I was reading Ivor Horton's Beginning Visual C++ 2008 and many of its CLR examples have this definition for main: int main(array<System::String ^> ^args) I went back, page by page, to the beginning of the book to find the first such instance with an explanation what it really means, but couldn't find one. Obviously it means the same as the standard int main(int argc, char *argv[]), but I'd like to know when and why that ^ is really used, and why it even exists (does it do something that pointers * and references & cannot represent)? | I just came across this code and a few Google searches turn up no explanation of this mysterious (to me) syntax. Hashtable^ tempHash = gcnew Hashtable(iterators_); IDictionaryEnumerator^ enumerator = tempHash->GetEnumerator(); What the heck does the caret mean? (The gcnew is also new to me, and I asked about that .) |
I have some initial data to insert in my database. I've added it to my custom SQLiteOpenHelper class. package com.company.database; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; public class MySQLiteOpenHelper extends SQLiteOpenHelper { public static final String TABLE_NAMES = "names"; public static final String COLUMN_ID = "_id"; public static final String COLUMN_NAME = "name"; private static final String DATABASE_NAME = "my.db"; private static final int DATABASE_VERSION = 1; private static final String TABLE_NAMES_CREATE = "CREATE TABLE " + TABLE_NAMES + "(" + COLUMN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COLUMN_NAME + " VARCHAR NOT NULL);"; private static final String TABLE_NAMES_INSERT = "INSERT INTO " + TABLE_NAMES + "(" + COLUMN_NAME + ")" + " VALUES " + "('Antony')," + "('Benny')," + "('Carol')," + "('Daniel')," // ... AND SO ON ... public MySQLiteOpenHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase database) { database.execSQL(TABLE_NAMES_CREATE); } @Override public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) { dropTable(database); onCreate(database); } private void dropTable(SQLiteDatabase database) { database.execSQL("DROP TABLE IF EXISTS " + TABLE_NAMES); } } Please note the insert statements. The quantity of names will increase and i don't want to keep this mess. What should i do to fix it? | If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I: Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use? The drawbacks I see are: Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device. Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated. |
I've seen this question for older versions of the Mac mini, but I'm struggling to find an answer for the Mac mini 2018. I want to connect 3 identical monitors (22inch 1080p). I'm currently able to connect 2 monitors using HDMI-Thunderbolt 3 cables, but I'm unable to get the 3rd monitor to detect a signal. I have a 3rd HDMI-Thunderbolt 3 cable, and I also have a VGA to HDMI adapter I can use as well. If I plug the VGA-HDMI cable into he HDMI port on the Mini, the two functioning monitors begin to flicker. The third monitor is still not detecting a signal. The monitor is a 1920x1080, 75 Hz Has anyone successfully configured a 2018 Mac Mini to 3 monitors using one of these configurations? Thanks! | It seems the new Mac Mini uses both HDMI and Thunderbolt, but bandwidth limitations of Thunderbolt may prevent using 3 daisy-chained Thunderbolt high resolution monitors such as the newly released Apple Thunderbolt 27" Display, limiting you to two instead of three. If this correct: 1. What occurs to the 3rd monitor in a triple daisy-chain? Black screen? Reduced available resolution up to the bandwidth limit of Thunderbolt? 2. Are there HDMI to mini-displayport adapters for connecting the HDMI output of the Mini to the Thunderbolt input of an Apple Thunderbolt 27" Display? Would that even work? |
The is described as: earn 150 reputation points on three different sites (not including Stack Overflow) within 15 days. Does the +100 site association bonus count towards the required 150? | From Running Ragged earn 150 reputation points on three different sites (not including Stack Overflow) within 15 days. So my query is: association bonus going to be counted for it? |
I once came across a word in English that is used to describe the following situation: When a word in one language means something rude when pronounced the same way in another language. An example could be "kiss" in English which means "Pee" in Swedish. I've desperately tried to find out what that word is but with no luck. Can anyone help? | examples: Gift (German) = poison poisson (French) = fish embarazada (Spanish) = pregnant sauce (Spanish) = willow triviale (Italian) = vulgar parentes (Portuguese) = relatives slim (Dutch) = smart |
Ubuntu gives black screen at startup. I have no idea why. Maybe it's the software update I did yesterday? Why is it happening? | I updated from 14.04 to 16.04 and used katoolin to add some Kali tools. After restart, the boot up of Linux ran codes, but stopped at a certain point never to load login. So I reinstalled 16.04, ran updates and tried again. This time, the boot menu was changed to Kali as well as the OS name (I'm using Windows 7 dual boot with Ubuntu); login started in Ubuntu style without user name, had to type in the name... then it goes to the logo screen never to log in. How can I use katoolin without it affecting the boot menu interface? Does this happen when the user selects the option 'add Kali repositories and updates'? Are the Kali repositories necessary? I'd much rather just install the tools and not mess with the Ubuntu interface. |
A part of my htaccess that redirects HTTP traffic to HTTPS looks like this: RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] I need allow some pages (lets say /page1, /page2) be HTTP only. Thanks! | This is a about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as: Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask! How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples? A place to test your rules The web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not. |
Why my defaultTableModel undergo nullPointerException? private void jYearChooser1PropertyChange(java.beans.PropertyChangeEvent evt) { try { dtm.setRowCount(0);//NullPointerException ArrayList<Salary> salaries = SalaryController.getSalaries(jYearChooser1.getYear(), jMonthChooser1.getMonth() + 1); for (Salary salary : salaries) { Employee employee = EmployeeController.searchEmployee(salary.getEmployeeId()); Object[] rawData = {salary.getEmployeeId(), employee.getFirstName() + " " + employee.getSecondName(), salary.getTotalEarnings(), salary.getTotalDeductions(), salary.getNetSalary()}; dtm.addRow(rawData); } } catch (ClassNotFoundException | SQLException ex) { Logger.getLogger(ViewSalary.class.getName()).log(Level.SEVERE, null, ex); } } | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I am making a zombie game and as I was making it I noticed the zombie AI starts to clump up into one mega zombie in one area. I was wondering how I could keep the zombies from doing that and instead make a horde like formation. I don't know how I would implement this and I don't know where to put it in my game logic so if you could give me some ideas or hints that would be fantastic. Thanks in advance! | For intentional reasons, certain units in the game I'm currently programming don't have any collision detection and response among each other. This enables them to clutter right on top of each other. This is a wanted behavior, since there will be situations in the game when the player does want them to stack like that. However, I want to make the process of uncluttering them easy for the player, so that they just have to press a hotkey or click some button on the screen and have the units disperse just enough so it's easy to select a group of them with the mouse (if they stand on top of each other one mouseclick selects all units). How could I do this without running a brute force N^2 nearest neighbor search on all units? |
Say we have an expression of the form: $$ \left<0\right|:\phi(x)^2: : \phi(y)^2:\left|0\right>, $$ where $\phi$ is some scalar field. I have heard the claim several times, that in evaluating this expression using Wick contractions, one only has to contract terms between groups of normal ordered terms. In this example this would mean we only have to contract $\phi(x)$ with $\phi(y)$ but not $\phi(x)$ with $\phi(x)$. I have no clue how to derive this. Has anyone got an idea? EDIT: And say we consider anticommuting operators, would we have: $$ \left<:\Psi^{\dagger}(x)\Psi(x)::\Psi^{\dagger}(0)\Psi(0):\right> = (-1)^3\left<\Psi^{\dagger}(x)\Psi(0)\right>\left<\Psi^{\dagger}(x)\Psi(0)\right>, $$ or with a plus sign? | Let $\phi$ be a scalar field and then I see the following expression (1) for the square of the normal ordered version of $\phi^2(x)$. \begin{align} T(:\phi^2(x)::\phi^2(0):) &= 2 \langle 0|T(\phi(x)\phi(0))|0 \rangle^2 \\ &+ 4\langle 0|T(\phi(x)\phi(0))|0 \rangle:\phi(x)\phi(0): \\ &+ :\phi^2(x)\phi^2(0): \tag{1} \end{align} It would be great if someone can help derive the above expression - may be from scratch - and without outsourcing to Wick's theorem - and may be help connect as to why the above is related (equal?) to the Wick's theorem? Isn't the above also known as OPE (Operator Product Expansion)? If yes, then is there at all any difference between OPE and Wick's theorem? Is there a systematic way to derive such OPEs? Can one help extend this to Fermions? |
I read a book in the 90s about mind control, but can't remember the title or the author. People start to commit extremely violent crime for no apparent reason. They claim that they had no control over their body when the crime was committed. Somebody who seems to be Russian-speaking is controlling them. After being convicted of pretending to be controlled, the main hero ends up on an island where he discovers that the people in charge of the island are responsible for the chaos. Russian scientists have invented a body controlling device. They used the device to escape the Soviet world. Now that renegade group is abusing the device and wrecking the entire world. If I remember correctly the hero defeated the bad guys. However despite his initial promise, in the end he could not give up the high that the device gave him. Any idea what is title of that book and who wrote it? | I read this story many years ago and now can't remeber who wrote it or even what it was called. The story was about a group of elite humans who had access to a headdress that allowed them to control another human, even if they were thousands of miles away. They could use this ability to commit crimes, etc. I think the cover may have been yellow like those published by Gollancz. |
I'm new to the use of Java with database connections, but am getting a NullPointerException using the following code: import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; public ArrayList<UserVO> getAllUsers(Connection connection) throws Exception { ArrayList<UserVO> userList = new ArrayList<UserVO>(); try { PreparedStatement ps = connection.prepareStatement("SELECT * FROM user"); ResultSet rs = ps.executeQuery(); while (rs.next()) { UserVO uservo = new UserVO(); uservo.setUsername(rs.getString("username")); uservo.setPassword(rs.getString("password")); userList.add(uservo); } return userList; } catch (Exception e) { throw e; } } } At PreparedStatement ps = connection.prepareStatement("SELECT * FROM user"); the code throws an exception for java.lang.NullPointerException.I don't know why this is happening, as a System.out.println("isClosed = " + connection.isClosed()); before the PreparedStatement declaration returns false, and I can print out the connection info. Any idea of the cause or how to properly compose a statement before query execution? Thanks! EDIT: Full(ish) stack trace - it's very long java.lang.NullPointerException at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:649) at com.mysql.jdbc.PreparedStatement.asSql(PreparedStatement.java:587) at com.mysql.jdbc.PreparedStatement.toString(PreparedStatement.java:4068) at java.lang.String.valueOf(String.java:2994) at java.lang.StringBuffer.append(StringBuffer.java:263) at com.mysql.jdbc.trace.Tracer.printParameters(Tracer.aj:240) at com.mysql.jdbc.trace.Tracer.printEntering(Tracer.aj:167) at com.mysql.jdbc.trace.Tracer.entry(Tracer.aj:126) at com.mysql.jdbc.trace.Tracer.ajc$before$com_mysql_jdbc_trace_Tracer$1$f51c62b8(Tracer.aj:45) at com.mysql.jdbc.Connection.registerStatement(Connection.java) at com.mysql.jdbc.Statement.<init>(Statement.java:270) at com.mysql.jdbc.PreparedStatement.<init> | 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? |
Suppose $\sum{a_n}$ converges. How do I prove that $\sum{\frac{\sqrt{a_n}}{n}}$ converges. So I know that just because $\sum{a_n}$ converges, do not mean I can say anything about the converges of its square root. So I know that I can prove that if $\sum{\sqrt{a_n}}$ converges then $\sum{\frac{\sqrt{a_n}}{n}}$ converges by Abel's Test, but I do not know where to start for the case where $\sum{\frac{\sqrt{a_n}}{n}}$ diverges | I need help to solve following problem from Rudin's Mathematical analysis book: Convergence of the series $\sum a_n$ implies the convergence of $\sum \dfrac{\sqrt {a_n}}{n}$, if $a_n>0$ I tried to construct a suitable convergence sequence $b_n$ such that $\sum b_n$ converges and $a_n \leq b_n$ but, I am not able to find such sequence $b_n$ . Thanks for the help and sugestions. |
why name of array "list" first printed as reference and second code printed content of it. int[] list = new int[5]; list[0] = 1; list[1] = 2; System.out.println(list); It prints the reference [I@4dd8dc3 and i know that i should use for loop to iterate over elements. But why there is in other code gives me the content not the address? Is that specific for generics? ArrayList<Integer> list = new ArrayList<>(); list.add(1); list.add(2); System.out.println(list); that prints [1, 2] | 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] |
please refer to the following scenarios: and The first case is generated by the following part of the script: \question[5+2] Let $ (X,d) $ be a metric space and $ A\subseteq X $. \textit{Boundary} of $ A $ is defined as $ \partial A=\bar{A}\setminus A^{\circ} $. Show that, \begin{parts} %3.a. \part[5] \[ \begin{array}{rcl} \partial A &=& (A^{\circ}\cup \ext A)^{c}\\[1ex] &=& \{x\in X:\forall\d>0, N_{\d}(x)\cap A\ne\emptyset\text{ and }N_{\d}(x)\cap A^{c}\ne\emptyset\}. \end{array} \tag*{\parbox{1pt}{\droppoints}} \] and the second instance is generated by \question[5+2] Let $ (X,d) $ be a metric space and $ A\subseteq X $. \textit{Boundary} of $ A $ is defined as $ \partial A=\bar{A}\setminus A^{\circ} $. Show that, \begin{parts} %3.a. \part[5] $\begin{array}{rcl} \partial A &=& (A^{\circ}\cup \ext A)^{c}\\[1ex] &=& \{x\in X:\forall\d>0, N_{\d}(x)\cap A\ne\emptyset\text{ and }N_{\d}(x)\cap A^{c}\ne\emptyset\}. \end{array}$\droppoints What I want is to align the first line of the array with the question number (a). How can I achieve that? I am using exam class. Here is my preamble. \documentclass[a5paper,11pt]{exam} \usepackage[left=0.25in,right=0.75in,top=0.5in,bottom=0.5in,footskip=.15in]{geometry} \usepackage{amsmath, amssymb, amsthm, amsfonts} \usepackage[english]{babel} \usepackage{mathtools} \usepackage[inline]{enumitem} \usepackage{mathrsfs} \usepackage{nccmath} \usepackage{stmaryrd} \usepackage{mathdots} \usepackage{lastpage,refcount} \footer{}{\small\thepage}{\ifodd\value{page}\relax \if\thepage\getpagerefnumber{LastPage}\relax \else \tiny {\mbox{\kern\dimexpr+4.75in\relax}}\boxed{\textbf{Turn Over}} \fi \fi} \usepackage{etoolbox} \makeatletter \setlength\@rightmargin{0.5in} \patchcmd\setup@point@toks{\llap{\padded@point@block}}{\rlap{\padded@point@block}}{}{} \patchcmd\droppoints{\llap{\padded@point@block}}{\rlap{\padded@point@block}}{}{} \patchcmd\droptotalpoints{\llap{\total@block}}{\rlap{\total@block}}{}{} \patchcmd\droptotalbonuspoints{\llap{\bonustotal@block}}{\rlap{\bonustotal@block}}{}{} \makeatother \marksnotpoints \bracketedpoints \pointsdroppedatright \renewcommand\partlabel{(\textbf{\alph{partno}})} \renewcommand{\thesubpart}{(\textit{\roman{subpart}})} \renewcommand{\subpartlabel}{\thesubpart} \renewcommand\questionlabel{\textbf{\thequestion.}} \newcommand{\R}{\mathbb{R}} \newcommand{\N}{\mathbb{N}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \renewcommand{\a}{\alpha} \renewcommand{\b}{\beta} \newcommand{\g}{\gamma} \renewcommand{\d}{\delta} \newcommand{\e}{\epsilon} \DeclareMathOperator{\interior}{int} \DeclareMathOperator{\ext}{ext} \newcommand{\abs}[1]{\left\lvert #1 \right\rvert} \newcommand{\norm}[1]{\left\lVert #1 \right\rVert} | I have an array which has a few columns, and each of the columns contains again an array. The problem is that the three arrays are vertically aligned with respect to the center. How to align them on the top? Here is a simple example \documentclass[12pt]{amsart} \begin{document} \[\begin{array}{llll} \begin{array}{|l|l|l|} \hline a& b& c\\ \hline 1&1&0\\1&2&3\\ 4 & 5& 6\\ \hline\end{array}& \begin{array}{|l|l|l|} \hline a& b& c\\ \hline 1&3&4\\1&2&3\\ 4&5&6\\ 7&9&8\\ \hline\end{array}& \begin{array}{|l|l|l|} \hline a& b& c\\ \hline 1&2&5\\1&2&3\\ \hline\end{array}\end{array}\] \end{document} which gives but I would like to have something like this: Thanks for your help. |
I feel like someone made a comment as an answer on a question with a bounty just so they could reap the "auto bounty" since they are the only answer on it. I've flagged the bad/useless answer (as a non-answer) for moderator review but the bounty will be assigned automatically in less than 24hrs and I feel like this guy/gal is just trying to cheat the system. All I'm trying to do is ensure the bounty simply expires and the guy/gal that was trying to cheat the system by putting down a useless guess doesn't get it. I've answered my own question (properly) and marked it as the accepted answer, not sure if that makes a difference though in this person still cheating the system since I'm the OP and created the accepted answer. Here is the post: | It's possible to offer and award bounties of reputation on questions. What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have? See also: in the Help Center |
I know I can become root (super user) via the su command but I have to authorize it after entering the commands. Is there a way I can become root and authorize (with password) in one line | How does the ubuntu user on the AWS images for Ubuntu Server 12.04 have passwordless sudo for all commands when there is no configuration for it in /etc/sudoers? I'm using Ubuntu server 12.04 on Amazon. I want to add a new user that has the same behavior as the default Ubuntu user. Specifically I want passwordless sudo for this new user. So I've added a new user and went to edit /etc/sudoers (using visudo of course). From reading that file it seemed like the default ubuntu user was getting it's passwordless sudo from being a member of the admin group. So I added my new user to that. Which didn't work. Then I tried adding the NOPASSWD directive to sudoers. Which also didn't work. Anyway, now I'm just curious. How does the ubuntu user get passwordless privileges if they aren't defined in /etc/sudoers. What is the mechanism that allows this? |
The java.util.List.contains(Object o) method takes Object as an argument and internally uses Object.equals(Object o) as described . If I do the following code in Netbeans: List<String> listStr = new ArrayList<>(); listStr.contains(34); //warning it gives the obvious warning, that is: Given object can not contain instances of int (expected String) Since it visible to all, that String never be equal to int then why shouldn't it take Element type E (in my case String) as an argument instead of Object? | Why isn't generic? Seems like Collection<E> could have boolean remove(E o); Then, when you accidentally try to remove (for example) Set<String> instead of each individual String from a Collection<String>, it would be a compile time error instead of a debugging problem later. |
The Spectrum of a bounded operator on a Banach space $X$ is always a compact subset of $\mathbb{C}$. What about the converse? Given any compact subset $K \subset \mathbb{C}$ is it always possible to find a Banach space $X$ and a bounded operator $T: X \to X$ such that $\sigma(T) = K$ ? Is there one Banach space which works for any $K$ ? I think for countable $K = \{\lambda_0, \lambda_1, \dots\}$ this is always possible: The operator $T: \ell^2 \to \ell^2, (x_0, x_1, \dots) \mapsto (\lambda_0 x_0, \lambda_1 x_1, \dots)$ is bounded and has all elements of $K$ as eigenvalues. | Let $A\subset \mathbb{C}$ be a compact subset. Since $A$ is compact and metric space, it is separable, say $\overline{\lbrace a_n\rbrace_{n=1}^\infty}=A$. Let $\mathcal{l}^2(\mathbb{Z})$ be the Hilbert space consisting of $L^2$-summable sequences and $\lbrace e_n\rbrace_{n=1}^\infty$ be the canonical basis of $\mathcal{l}^2(\mathbb{Z})$. Define an operator $T\colon\mathcal{l}^2(\mathbb{Z})\to\mathcal{l}^2(\mathbb{Z})$ by sending $e_n$ to $a_ne_n$. I want to prove that $A=\sigma(T)$, where $\sigma(T)$ is the spectrum of $T$. What I can prove is that $A=\overline{\lbrace a_n\rbrace_{n=1}^\infty}\subset \sigma(T)$ because each $a_n$ is an eigenvalue of $T$ and $\sigma(T)$ is closed. How can I prove the other inclusion, namely $\sigma(T)\subset A$? |
I am getting nullpointerexception when i call the putArray()and sortArray() methods. getArray() method works fine. when i print the array within getArray() method it is working. But i get null pointer exception when i print in putArray() method.I spent a lot of time figuring it out .Kindly help me resolve this. also suggest me any other better ways to write this code. Thank you. import java.util.Scanner; public class BubbleSort { int num; int[] arr; public void getArray() { System.out.print("Enter the total numberr of elements in the Array : "); Scanner sc = new Scanner(System.in); num = sc.nextInt(); int arr[] = new int[num]; System.out.print("Enter " + num + " Elements : "); for (int i = 0; i < num; i++) { arr[i] = sc.nextInt(); } } public void putArray() { System.out.print("The Array is: "); for (int i = 0; i < num; i++) { System.out.println(arr[i] + " "); } } public void sortArray() { for (int i = 0; i < num; i++) { boolean flag = false; for (int j = 0; j < num - i - 1; j++) { if (arr[j] > arr[j + 1]) { arr[j] = arr[j] + arr[j + 1]; arr[j + 1] = arr[j] - arr[j + 1]; arr[j] = arr[j] - arr[j + 1]; flag = true; } } if (!flag) { break; } } } public static void main(String[] args) { BubbleSort b = new BubbleSort(); b.getArray(); b.putArray(); b.sortArray(); b.putArray(); } } | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I have been actively using Stack Exchange app for some days now. In my account page, in the place of userID, it says user470992. How can I change it to something of my choice. I am using the app in Android platform. Please provide step by step solution. Also, how do I log into Stack Exchange in my other devices with this account? | It would be nice to update the profile page from within the app. Perhaps not many people update their profiles more frequently, but when required to do so, I would prefer to do it from the app instead of the mobile browser. |
I know this has likely been asked before but I've not been able to find any solutions. Let me explain my "issue" I have a custom windows 7 visual style which makes all of my explorer windows dark and simple, pic related: I love this theme I've created, and I'd like for these darker windows 7 frames to be used as a replacement to the Chromium/Chrome windows. I think chromium is great, I love using it and I've tried alternatives (Opera, IE) both of these browsers have their own issues (stuttering & slow in comparison to chromium OR limited to zero customization without sacrificing some modern functionality.) Opera 12 is the best solution I found and I guess it does exactly what I want boy does it lag... hard. However, both of those browsers DO extend the basic windows 7 frames. (the frames that every other explorer application uses, excluding things like Microsoft Office, Photoshop or Visual Studio which use their own custom frames) I was wondering if there was ANY WAY AT ALL to somehow disable the Chromium/Chrome custom frames in favor of the default Windows 7 frames used by all other applications. Also, bonus question, is there any way to get H.2XX video (HTML 5) to work with Chromium? Not a duplicate since the issue hasn't been resolved. | Is there a way to disable Chrome's custom window skinning such that it lets the OS draw standard window title bars, borders, etc, in the style I have configured the OS to draw such things with? I didn't spend all that time with the control panel setting a window style that pleases me just to have applications decide that they know better than me how I want my windows to look. As a practical matter, having each application decide for itself which color cues to use to show "this is the active window" becomes very confusing. Alternatively, is there a tool somewhere that reads the Windows 7 color and window style settings and produces a Chrome theme that imitates them? |
The is supposed to be awarded to users who "vote on 12/15". But it was awarded to me on several sites immediately at 00:00 UTC on 12/15. I didn't even visit these sites on 12/15 yet! | During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa. What could be the reason for this? |
How to calculate the positions of all 5 Lagrange Points between Sun and Earth? (Please give solution for all points especially for L4 and L5) | According to , there are 5 equilibrium, or of the Earth-Moon system and only 2 of them are said to represent stable equilibrium points. This made me think if there is an equation that describes this system, and from which Physics Laws was it derived? |
I want to retrieve image from firebase store using the alert dialog with recycle view but it always returns a message error. I can upload an image to firebase store, but to upload it I want it to retrieve alert dialog. I still confusing about the adapter for alert dialog This is the error message that I get after run the application: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setHasFixedSize(boolean)' on a null object reference This is my AlertDialog function in DisplayAllActivity: private RecyclerView mRecycleView; private ImageAdapter mAdapter; private List<Upload> mUpload; private void showUpdateDialog(){ AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this); LayoutInflater inflater = getLayoutInflater(); final View dialogView = inflater.inflate(R.layout.location_dialog, null); dialogBuilder.setView(dialogView); mRecycleView = findViewById(R.id.recycler_view); mRecycleView.setHasFixedSize(true); mRecycleView.setLayoutManager(new LinearLayoutManager(this)); mUpload = new ArrayList<>(); databaseReference = FirebaseDatabase.getInstance().getReference("Upload"); databaseReference.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { for (DataSnapshot postSnapshot : dataSnapshot.getChildren()){ Upload upload = postSnapshot.getValue(Upload.class); mUpload.add(upload); } mAdapter = new ImageAdapter(DisplayAllActivity.this, mUpload); mRecycleView.setAdapter(mAdapter); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { Toast.makeText(DisplayAllActivity.this, databaseError.getMessage(), Toast.LENGTH_SHORT).show(); } }); final AlertDialog alertDialog = dialogBuilder.create(); alertDialog.show(); } Here is my ImageAdapter java class for the image to be retrieved form firebase store public class ImageAdapter extends RecyclerView.Adapter<ImageAdapter.ImageViewHolder> { private Context mContext; private List<Upload> mUploads; public ImageAdapter(Context context, List<Upload> uploads) { mContext = context; mUploads = uploads; } @NonNull @Override public ImageViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { View v = LayoutInflater.from(mContext).inflate(R.layout.image_location_image, viewGroup, false); return new ImageViewHolder(v); } @Override public void onBindViewHolder(@NonNull ImageViewHolder imageViewHolder, int i) { Upload uploadCurrent = mUploads.get(i); imageViewHolder.textViewName.setText(uploadCurrent.getName()); Picasso.get().load(uploadCurrent.getImageUrl()).fit().centerCrop().into(imageViewHolder.imageView); } @Override public int getItemCount() { return mUploads.size(); } public class ImageViewHolder extends RecyclerView.ViewHolder { public TextView textViewName; public ImageView imageView; public ImageViewHolder(@NonNull View itemView) { super(itemView); textViewName = itemView.findViewById(R.id.text_view_name); imageView = itemView.findViewById(R.id.image_view_upload); } }} This is XML for RecycleView that will be used by the ImageAdapter to display the image from firebase store. <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" /> | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I have encountered with this equation while solving an integral. The integral result was $$ \left. \sum_{n=0}^{m+1} \left( \frac{d^n}{d x^n}\left( x^{m-1}\prod_{k=1}^{2}\left(\lambda_{k}.x+m(1-\lambda_{k})\right)\right)\right)\right|_{x=0}=m\lambda_{1}\lambda_{2}+m^2 $$ where $m$,$\lambda_{1}$ and $\lambda_{1}$ are positive constants. Now suppose I have $m_1$ and $m_2$, then I have $$ \left. \sum_{n=0}^{N} \left( \frac{d^n}{d x^n}\left( f(x) \right)\right)\right|_{x=0}=m_{1}\lambda_{1}\lambda_{2}+m_{1}m_{2} $$ What is the value of $N$ and function $f(x)$ that satisfies the previous equation. Or what should we modify on the first equation to meet the last one. Note: $m_{1}\neq m_{2}$. | I want to solve this differential equation evaluted at $x=0$. I will start with an example with $m=2$ $$ f(0)+f'(0)+f''(0)=2\lambda_{1}\lambda_{2}+4 $$ where $m$,$\lambda_{1}$ and $\lambda_{1}$ are positive constants. The $f(x)$ that satisfies the previous equation is $$ \prod_{k=1}^{2}\left(\lambda_{k}.x+2(1-\lambda_{k})\right) $$ I have encountered with this equation while solving an integral. The result was $$ \left. \sum_{n=0}^{m+1} \left( \frac{d^n}{d x^n}\left( x^{m-1}\prod_{k=1}^{2}\left(\lambda_{k}.x+m(1-\lambda_{k})\right)\right)\right)\right|_{x=0}=m\lambda_{1}\lambda_{2}+m^2 $$ So I want to find f(x) that satisfies $$ \left. \sum_{n=0}^{m+1} \left( \frac{d^n}{d x^n}\left( f(x) \right)\right)\right|_{x=0}=m_{1}\lambda_{1}\lambda_{2}+m_{1}m_{2} $$ Note: $m_{1}\neq m_{2}$. |
Let $ ABCD $ be a square with side length $ a $. Let $ s $ be a staircase from $ A $ to $ C $ with total length $ l $ and number of steps $ n $. It consists of perpendicularly alternating lines of length $ \frac{a}{n} $, as . We see that $ l $ can be expressed as follows: $$ l = \frac{a}{n} \cdot n + \frac{a}{n} \cdot n = \frac{a}{n} \cdot n \cdot 2 = 2a $$ and as such stays constant at $ 2a $. Now let us imagine that the amount of steps is infinite, e.g. $ n = \infty $. Per definitionem, the staircase should now be the diagonal of the square with length $ l=a\sqrt{2} $ according to Pythagoras. This is paradoxical! According to the equation pictured above, it should have the length $ 2a $, not $ a\sqrt{2} $. My question is: Does $ l $ equal to $ 2a $ or $ a\sqrt{2} $? | What is wrong with this proof? Is $\pi=4?$ |
I am working on a scene in blender related to Minecraft but for some reason my render image have small yellow and red spots sprinkled which are barely noticeable , is their a way to fix it. it might be a problem with cycles as it works fine with eevee. | I often use Cycles' built in Glass BSDF shader to achieve realistic refraction effects, but in many cases, it seems that Cycles' glass caustics creates an unfortunately large number of fireflies (pixels that are abnormally bright relative to their surroundings). In some models of mine, even when I render for 3000 or more samples/pixel, my final image is still covered in fireflies. While I can improve this in many cases by increasing the total amount of light available in the scene, this loses a lot of the potency of the refractive effects I'm looking for, especially in scenes with low light levels. So my question is, how can I reduce the amount of fireflies while using Cycles' caustics without sacrificing the quality of the refractive effects? Note: I am aware that Cycles' caustics will perform much better once Cycles has full support for bidirectional path-tracing, but it looks unlikely that that will become , unfortunately. |
I am pretty new using WordPress and was asked to validate the number of items in the cart for an eCommerce site that lets you "make a pack" in which you have several steps, step 1 is a page in which you select the box, this doesn't need validation but the next 4 steps do, each step is a new page and each has a different amount of the item that you need to select, what I need is to either disable the hyperlink that says "Next step" until you select the correct amount of items for each step or just display a message when you click with the incorrect amount Now my question is not code itself but where to put it in WordPress, I checked everything in the WordPress admin part of the site and on the hosting site but can't find where I am supposed to code the validation for each page. | Is there an easy to understand scheme to decide what kind of code belongs to a plugin or the theme’s functions.php? There and many about that topic, mostly because there are some misconceptions about the inner workings of WordPress. I am asking for an answer based on facts, not on opinions. It should explain how to handle these points (and probably more): custom post types and taxonomies contact forms shortcodes custom widgets SEO functions like custom meta elements theme switch There are often pros and cons for both sides. Our most popular question got a lot of code snippets as answers that are at least debatable. We need criteria a beginner can understand, maybe a check list – with reasons. See also the related question by Chip Bennett on our meta site: Related: |
The only reason I still use W indows is to play this game. I tried before and couldnt get it to work on Ubuntu and I wonder if it is possible now. | Can .exe and .msi files (Windows software) be installed in Ubuntu? |
My query is similar to , which was closed as “unclear”, without any proper solutions being suggested. Let me try to see if I can describe my setup more clearly than the original poster. I have a project named MyProject. Under the MyProject project there are three packages, the default package, Pkg1 and Pkg2. The default package contains ClassA, Pkg1 contains ClassB and Pkg2 contains ClassC. ClassC (in Pkg2) needs to reference ClassA (in default package) and ClassB (in Pkg1). The import statement "import Pkg1.ClassB;" works like a charm but I am unable to figure out how to import ClassA. Regards, Sandeep | I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package. My question is: Is there a way to access this object in the default-package from a Java-class in a named package? |
My question in full is as follows - "What is meant by Principal Component Analysis. including in the explanation the terms: geometric information; covariance matrix; orthogonal transformation; Spectral Theorem My understanding of Principal Component Analysis is that it reduces a number of variables x1, x2... to a smaller set of principal components that store as much of the original information from the original variables in these newly created principal components. However I don't fully understand all of these other terms or how they relate to PCA. | In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues. I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it. I strongly believe in the following quote: You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein Well, I can't explain these concepts to a layman or grandma. Why PCA, eigenvectors & eigenvalues? What was the need for these concepts? How would you explain these to a layman? |
This is on a fresh install of Ubuntu 14.04 running on a VPS. For example the following will work: server { listen 8080 default_server; root /var/www; location / { try_files $uri $uri/ =404; } } server { listen 80 default_server; root /var/www; location / { try_files $uri $uri/ =404; } } When I visit the page it will be my index.html. But if I try to make nginx listen on another port (35729): server { listen 35729 default_server; root /var/www; location / { try_files $uri $uri/ =404; } } or even one that's maybe slightly more used (3000 by nodejs servers for example) All I get is an error saying the webpage is not available. . Looking in netstat though says that nginx is listening for the port: tcp 0 0 0.0.0.0:35729 0.0.0.0:* LISTEN 15349/nginx -g daem and iptables looks like this (which means no firewall right?) Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination and sudo ufw status verbose yields Status: inactive What's going on? | This is a about Connection Refused We see a lot of questions to the effect When I try to connect to a system I get a message Connection refused Why is this ? |
I am having trouble with my google sheets script and I wondered if anyone had any advice for a beginner. I want my script to check a cell value (Sheet1, H2), then send an email if the value = 29. However, at the moment it will send an email whatever value it returns, I don't think my if statement works correctly. Any ideas would be really appreciated. function CheckExpiry() { // Fetch the days till expiry. var ExpiryDataRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1").getRange("H2"); var ExpiryData = ExpiryDataRange.getValue(); // Check expiration if(ExpiryData = 29){ // Fetch the email address var emailRange = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Sheet1").getRange("C2"); var emailAddress = emailRange.getValue(); // Send Alert Email. var message = 'You are recieving this email as harness # is up for inspection soon, current inspection expires in the following number of days: ' + ExpiryData; // Second column var subject = 'Your Harness Spreadsheet Alert'; MailApp.sendEmail(emailAddress, subject, message); } } | I am completely new to coding. I am a teacher and trying to design a lesson planner tool using Google Sheets Scripts. The idea is to have a template sheet for the lesson that will copy into a new tab. That part is working fine. However, to delete the lesson I want to make it impossible for someone to accidentally delete the template. It is succeeding in not deleting the template tab if "Delete Lesson" is clicked. However, it is displaying the alert that you cannot delete the template for the other tabs (but then deleting the tab as it should) This is the . Any help is greatly appreciated! I used this code at first: function DeleteTab1() { var spreadsheet = SpreadsheetApp.getActive(); var sheet = spreadsheet.getActiveSheet(); var sheetname = sheet.getName(); if(sheetname != "Template") { spreadsheet.deleteActiveSheet(); } else { SpreadsheetApp.getUi().alert('The template cannot be deleted'); } } Then I tried this and had the same problem: function DeleteTab1() { var spreadsheet = SpreadsheetApp.getActive(); var sheet = spreadsheet.getActiveSheet(); var sheetname = sheet.getName(); if(sheetname != "Template") { spreadsheet.deleteActiveSheet(); } if(sheetname = "Template") { SpreadsheetApp.getUi().alert('The template cannot be deleted'); } } |
how to uninstall ubuntu 18.04 in dell n5110 and install windows back | I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows. How do I remove Ubuntu and reinstall Windows? Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot. |
I am reading book "Fuzzy Logic With Engineering Applications, Wiley" written by Timothy J. Ross. I am reading chapter 7 and in this chapter, "Batch Least Squares Algoritm" has been defined. It illustrates the development of a nonlinear fuzzy model for the data in Table 7.1 using the Batch Least Squares algorithm. At the page 218 there is a mathematical equation: I have two questions: 1- As you can see, there is a "exp" phrase (in the red rectangle). What is this? Is it the exponential function? () At the link, "" it was stated at the link that it is an exponential function, but I noticed that ordinary paranthesis has been used. In my equation, square brackets is used. 2- What is the purpose of the equation? Thanks in advance. | What is the meaning of the notation $\exp(\text{expression})$ ? I think that it's something of the form $a^\text{expression}$ but does it mean that the base $a=e$ or can it be any base? |
Am I able to prove the monotonicity with induction? | Show that $U_n:=\left(1+\dfrac{1}{n}\right)^n$, $n\in\Bbb N$, defines a monotonically increasing sequence. I must show that $U_{n+1}-U_n\geq0$, i.e. $$\left(1+\dfrac{1}{n+1}\right)^{n+1}-\left(1+\dfrac{1}{n}\right)^n\geq0.$$ I am trying to go ahead of this step. |
I know Animate Dead can give you skeletons or zombies (your choice), and Create Undead can give you Ghouls, Ghasts, Wights, or Mummies. Is there any other WotC material expanding upon the types of undead you can have? either through spells or magic items or "other"? | In Dungeons and Dragons 3rd edition they introduced skeletons with all kinds of sizes such as Tiny, Small, Medium, Large, Huge, Gargantuan, and Colossal. As a necromancer, it would be really entertaining to have undead of all kinds and sizes. However, Dungeons and Dragons 5th Edition limits the abilities of a necromancer, as the spell animate dead only allows the caster to reanimate Small and Medium humanoid creatures. Though it's understandable that WOTC made it this way as a way of balancing to prevent the creation of overpowered undead armies, it would be interesting for some sort of way of animating a creature larger than medium. Personally, I like the idea of having a Gargantuan humanoid skeleton; however, I would not be sure how to apply statistics to an undead or create a proper way of balancing. There is a section in DMG p. 282 for skeleton and zombie templates, however, the largest creature that exists with a humanoid body is a hill giant categorized as huge. Even then the challenge rating is 5 making thinking of a way of balancing difficult. Even beyond my desires, I'm sure there are many other necromancer-loving individuals who would desire to animate and control a minotaur skeleton, or any other undead such as beasts or monstrosities. Is there a way (even house or homebrew rules) of animating undead beyond these restrictions? |
I am trying to install KDE on Ubuntu 15.04. I ran sudo apt-get install kubuntu-desktop and got this output: $ sudo apt-get install kubuntu-desktop^ Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: kde-telepathy-desktop-applets : Breaks: kde-telepathy-legacy-presence-applet but 1.1-0ubuntu1 is to be installed kde-telepathy-minimal : Depends: kde-config-telepathy-accounts (>= 15.04.0) but it is not going to be installed libksgrd5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed libksignalplotter5 : Depends: libkf5sysguard5 (= 4:5.2.2-0ubuntu1) but it is not going to be installed Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed libktpotr9 : Breaks: libktpotrprivate8 (< 15.03.80) but 0.9.0-0ubuntu3 is to be installed libprocesscore5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed libprocessui5 : Depends: libkf5sysguard5-data (= 4:5.2.2-0ubuntu1) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). I ran sudo apt-get -f install and got this output: $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: linux-headers-3.19.0-15 linux-headers-3.19.0-15-generic linux-headers-3.19.0-21 linux-headers-3.19.0-21-generic linux-image-3.19.0-15-generic linux-image-3.19.0-21-generic linux-image-extra-3.19.0-15-generic linux-image-extra-3.19.0-21-generic linux-signed-image-3.19.0-21-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed: kde-config-telepathy-accounts The following NEW packages will be installed: kde-config-telepathy-accounts 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 602 not fully installed or removed. Need to get 0 B/121 kB of archives. After this operation, 712 kB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 371396 files and directories currently installed.) Preparing to unpack .../kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb ... Unpacking kde-config-telepathy-accounts (15.04.1-0ubuntu1~ubuntu15.04~ppa1) ... dpkg: error processing archive /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb (--unpack): trying to overwrite '/usr/share/accounts/services/google-im.service', which is also in package account-plugin-google 0.12+15.04.20150415.1-0ubuntu2 Errors were encountered while processing: /var/cache/apt/archives/kde-config-telepathy-accounts_15.04.1-0ubuntu1~ubuntu15.04~ppa1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Would someone take a look at those and give me any pointers? | For example: $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages. When I try the suggestion made in the error message, this is what happens: $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libjline-java Suggested packages: libjline-java-doc The following NEW packages will be installed: libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack): trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing: /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) $ sudo apt-get upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not installed groovy : Depends: libjline-java but it is not installed rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f. |
I want to simulate a finger touch/move/etc. on capactive touch screen. Obviously using a robot arm and stylus pen is a solution, but it was expansive and the structure was too complex. It would be elegant if we can lay something (another capactive touch screen) on the original screen and drive it to simulate a finger. I learned that a capactive touch screen is somewhat a row/column selection capacity matrix. So is it possible to make a driver system to activite certain areas in the screen and make it recognized as a finger touch? want to simulate a static touch area, but I want a CONTROLLABLE/PROGRAMMABLE activition of ANY area in the screen. | I want to make a device that I can place on a capacitive touch screen and it will start tapping the screen repeatedly. Is there any way to do this with the Arduino? |
I know that "children" is a plural noun and "birthday" is a countable noun, but I saw this sentence in a book: Children have a birthday cake at their birthday. Why is "children" (which is a plural noun) followed by "a birthday cake" instead of by "birthday cakes," and why is "their" followed by "birthday" instead of by "birthdays"? | In a situation where say a group (or at least a plurality) of men is being addressed — for example on a sign passed by many married men — which is correct? "Remind your wife." or "Remind your wives." |
example I enter 1357 and program out 106 instead of 10 string num = Console.ReadLine(); Console.Write(Convert.ToInt32(num[1]) + Convert.ToInt32(num[3])); Console.ReadKey(); | I have a char in c#: char foo = '2'; Now I want to get the 2 into an int. I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2. The following will work: int bar = Convert.ToInt32(new string(foo, 1)); int.parse only works on strings as well. Is there no native function in C# to go from a char to int without making it a string? I know this is trivial but it just seems odd that there's nothing native to directly make the conversion. |
I've run out of space on my root partition and I want to extend it. I've seen another posts of this topic but my lack of knowledge makes it difficult for me to achieve what i want. Here's a screenshot of my GParted Window: | 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? |
I've seen examples where the query orders by count and takes the top row, but in this case there can be multiple "most frequent" values, so I might want to return more than just a single result. In this case I want to find the most frequently appearing last names in a users table, here's what I have so far: select last_name from users group by last_name having max(count(*)); Unfortunately with this query I get an error that my max function is nested too deeply. | I have a table like this: Column | Type | Modifiers ---------+------+----------- country | text | food_id | int | eaten | date | And for each country, I want to get the food that is eaten most often. The best I can think of (I'm using postgres) is: CREATE TEMP TABLE counts AS SELECT country, food_id, count(*) as count FROM munch GROUP BY country, food_id; CREATE TEMP TABLE max_counts AS SELECT country, max(count) as max_count FROM counts GROUP BY country; SELECT country, max(food_id) FROM counts WHERE (country, count) IN (SELECT * from max_counts) GROUP BY country; In that last statement, the GROUP BY and max() are needed to break ties, where two different foods have the same count. This seems like a lot of work for something conceptually simple. Is there a more straight forward way to do it? |
The experiment consists of two interferometers, where each one of them has two 4 km long arms. Within these, light is further trapped via Fabry-Pérot cavities to achieve a total path length of about 1,600 km. Why does the path have to be so long? Isn't the phase that governs the interference pattern constant throughout the arm, since it just depends on the path difference between the two arms? Making them both long surely should not change this...? | Antennas for capturing radio waves need to have $\frac{\lambda}{2}$ length for optimum reception of signal. Does it imply LIGO arm length is $\frac{\lambda}{2}$ of Gravitational Wave it is trying to capture? |
I have a typescript class that contains an array attribute, i would like to create a copy of this object, i used Object.assign, but the array is not duplicated class: export interface IDeclaration { rechutes?: Rechute[]; text: string; } export class Declaration implements IDeclaration { constructor( public rechutes?: Rechute[], public text ?: string, ) {} } export interface IRechute { dateDebut?: Moment; dateFin?: Moment; } export class Rechute implements IRechute { constructor(public dateDebut?: Moment, public dateFin?: Moment) { this.dateDebut = dateDebut ? dateDebut : null; this.dateFin = dateFin ? dateFin : null; } } copy : const copy: IDeclaration = Object.assign({}, res.body, { text: transformMethodText(res.body.text), rechutes: transformMethodRechutes(res.body.rechutes) }); transformMethodText(text: string) : string{ return 'test : ' + text; } private transformMethodRechutes(rechute: Rechute): Rechute{ return Object.assign({}, rechute, { dateDebut: rechute.dateDebut != null ? moment(rechute.dateDebut) : null, dateFin: rechute.dateFin != null ? moment(rechute.dateFin) : null }); } Array will always set to empty, when i try to push some new object no change is made. How to copy my rechutes array inside the Object.assign function ? Thank's | What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency. I've also seen recursive copying functions with various flaws. I'm surprised no canonical solution exists. |
I have multiple folders inside one folder, I want to move all the contents of these folders up to the parent ( basically like extracting compressed files ) so what's the easiest way to accomplish this ? | I have multiple .rar files in multiple folders like this: C:\Docs\Folder1\rarfile1-1.rar C:\Docs\Folder1\rarfile1-2.rar C:\Docs\Folder1\rarfile1-3.rar C:\Docs\Folder2\rarfile2-1.rar C:\Docs\Folder2\rarfile2-2.rar C:\Docs\Folder2\rarfile2-3.rar C:\Docs\Folder3\rarfile3-1.rar C:\Docs\Folder3\rarfile3-2.rar C:\Docs\Folder3\rarfile3-3.rar I want to move all of the .rar files to the parent directory 'C:\Docs'. I have a lot more than 3 folders, so I was thinking of making a batch file or something. What would be the commands to do this? Thanks |
This is basically a reverse of . Let's say a user has a single account on several SE sites that are linked (for example, Stack Overflow, Programmers, Gaming and RPG). They want to expose their SO and Programmers professional accounts to a professional audience, but don't want anyone to link that to their more "frivolous" Gaming/RPG accounts. Is it possible - as a one-time event - split that one SE account into two separate accounts? The assumption is that they would be 100% independent of each other, with different logins, and no further association between them? If so, what would be the procedure? | I looked at similar questions and wanted to post a more specific one. If I wanted one of my accounts on the network to no longer be associated to my global account, could an administrator do it manually? I mean, even if they could, would they? It's a matter of professionalism. I don't want one of my accounts on the network to be visible from my other accounts. I just want that to be under a separate email that's not one of the OpenIDs associated with my global account. I realize this would have been easier to do when I joined that site, but it's too late now, and only now have I realized that I don't really want that account showing up. So can it be done by an administrator? I don't want to wait weeks and weeks for a response by using the contact form (funny, I've waited two with this post)... |
I'm learning DES, but I have a question. When the plain text input, it gets a permutation by a table. But, I don't know why 01 -> 58 / 02 -> 50. Is there any special rule or principle of it? or was it just set by the creator of DES? | I am creating a program in C language with DES (Data Encryption Standard) functionality, but don't know how to apply the initial permutation. Is it achieved by swapping the values? If "yes", then how is the index of the original message created? |
I have an auto-generated gravatar as my display on SO. I wish to associate that unique, but non-descriptive, gravatar in other places (such as github). I have grown rather fond of it. Is there anyway to do this? Do I have to go to and actually sign up for an account? | Is there a name for the default avatars that are generated for users who do not assign one themselves? Not the avatar of the blank user, but the one made up of shards, shapes, and colours: Is there an online generator for something like that? See also: |
Every time I open a question, I open the message with "Hello", and end with "Thanks". Too many times my messages get edited, and these lines are removed. I've always wanted to know: why these words are not allowed? | I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like: --User Should these items be removed during the editing of the post by an editor? |
I have 3 Linux distributions on my machine (Ubuntu, Arch and Fedora). I allocated half the RAM size (3GB) as swap for each of them. (I have realized that having 3 distributions is not of much use to me, but I still have them.) The problem is now the 3 distributions mount all the 3 swap partitions while loading, and treat swap as a single 9GB partition. Now when I hibernate my system, obviously no distribution ever wakes up from hibernation. Is there any way to overcome this? | In order to save disk space, I want to have two OS installations share a single swap partition (a dual-boot). Is this a good idea? |
Let it be $$(1+x+x^2+x^3+x^4)^{496}=a_0+a_1x+a_2x^2+...+a_{1984}x^{1984}.$$ Find $$\gcd(a_3,a_8,...,a_{1983})$$ I know the Leibniz Theorem, so all coefficients are of the form $$\frac{496!}{a!b!c!d!e!}1^a\cdot x^b\cdot x^{2c}\cdot x^{3d}\cdot x^{4e}$$ and $a+b+c+d+e=496$, $a,b,c,d,e\in\mathbb N$ So, if $d$ is the $\gcd$ of these numbers, $$d\mid\sum_{i=3}^{1983}a_i,$$ but I couldn't found the value of $d$. Can someone help me? Thanks for attention! | Consider the expansion $$(1+x+x^2+x^3+x^4)^{496} = a_0+a_1x+\cdots+a_{1984}x^{1984}.$$ $\quad$ (a) Determine the greatest common divisor of the coefficients $a_3,a_8,a_{13},\ldots,a_{1983}$. $\quad$ (b) Prove that $10^{340} < a_{992} < 10^{347}$. Is there an easier way to solve this and is there a formula for the multisection for just the sum of the coefficients and not including $x^k$? I thought of using the Multisection formula to prove (a). That is, $$\sum_{k \equiv r \pmod{m}}a_kx^k = \dfrac{1}{m} \sum_{s=0}^{m-1} \epsilon^{-rs} f(\epsilon^s x)$$ where $\epsilon$ is a primitive $m$th root of unity and $\displaystyle f(x) = (1+x+x^2+x^3+x^4)^{496}$. Thus we have $r = 3, m = 5$ and so \begin{align*}\sum_{k \equiv 3 \pmod{5}}a_kx^k &= \frac{1}{5} \sum_{s=0}^{4} w^{-3s} (1+w^s x+(w^{s}x)^2+(w^{s} x)^3+(w^{s}x)^4)^{496}\\&=\dfrac{1}{5}\sum_{s=0}^4 w^{-3s}\left(\dfrac{(w^s x)^{5}-1}{w^s x-1}\right)^{496}\\&= \dfrac{1}{5}\sum_{s=0}^4 w^{-3s} \left(\dfrac{x^{5}-1}{w^s x-1}\right)^{496}.\end{align*} |
This is just an easy question! I want to lean some objective-c but the problem I don't have a mac I've only PC with windows is there any compiler and editor where I can type my code and run it on windows. Thanks in advance. | What would be the best way to write Objective-C on the Windows platform? Cygwin and gcc? Is there a way I can somehow integrate this into Visual Studio? Along those lines - are there any suggestions as to how to link in and use the Windows SDK for something like this. Its a different beast but I know I can write assembly and link in the Windows DLLs giving me accessibility to those calls but I don't know how to do this without googling and getting piecemeal directions. Is anyone aware of a good online or book resource to do or explain these kinds of things? |
I have a series of shape keys on a curve but the vertex interpolation between the morphing is no good. Is there a place in blender where I can view the animation paths of the vertices in the shape keys and fix up how the vertices interpolate so i can make it smoother. | I have animation where object changes his shape using shape keys, and I want to make some animation smoothing with graph editor. Is there a way to use graph editor for shape key animation? |
$T(av_1 + bv_2) = aT(v_1) + bT(v_2)$ Why is this called linear? $f(x) =ax + b$, the simplest linear equation does not satisfy $f(x_1 + x_2) = f(x_1) + f(x_2)$. Thank you. | I always thought linear functions need to satisfy $$f(x+y)=f(x)+f(y).$$ I am a tad confused now, consider $f(x)=2x+3$. $f(1)=5$, $f(2)=7$, $f(1+2)=f(3)=9 \neq f(1)+f(2)$ which was what I thought linear functions should satisfy. Could someone clarify? |
I'm working with Rmarkdown and my output is a pdf document. When reading the text, I noticed that so many words are printed incomplete such as "ar- rojan" and "progra- mación" (which should be "arrojan" and "programación"): Los operadores <, >, <=, >=, == y != se denominan “lógicos” o “booleanos” porque nos ar- rojan como resultado TRUE si se cumple la condición o comparación o FALSE en caso contrario. Sin embargo, R, al igual que la mayoría de los lenguajes de progra- mación distingue entre mayúsculas y minúsculas (“case sensitive”), Based on my little experience with Rmarkdown, I guess in the YAML section I must include some option to prevent for incomplete words but I can't find any documentation related with my needs. This is my YAML: --- title: "--" author: "" date: "--" output: pdf_document: latex_engine: xelatex mainfont: Times New Roman header-includes: - \usepackage{titling} - \pretitle{\begin{flushleft}\huge\bfseries} - \posttitle{\end{flushleft}} - \preauthor{\begin{flushleft}\Large} - \postauthor{\end{flushleft}} - \predate{\begin{flushleft}\large} - \postdate{\end{flushleft}} fontsize: 12pt urlcolor: blue linestretch: 1.15 --- Thanks in advance for any suggestion or comment. | I can't find where I can remove any kind of hyphenation and just have LaTeX just do a line break. edit: Honestly speaking I just don't like to read hyphenation anywhere and that's the only reason why I wanted to remove it. It is a matter of style, probably unexpected in LaTeX. The document has only a summary in a different language and I used the language packages to hyphenate properly. |
I wonder if it is theoretically achievable to produce living offspring between a human and a non-human primate. Great apes have 24 pairs of chromosomes compared to our 23, however, it is known that a mule is made from a donkey (62 chromosomes) and a horse (64 chromosomes). Are there other reasons why this human/non-human primate hybrid can't survive? | Since humans and apes share up to 99% of their DNA, can they interbreed? For example, a horse and a donkey seem to be just as distantly related and produce offspring. Mules, however, are sterile. Would ape-human interbreds be sterile? |
I've been solving problems from my Galois Theory course, and at some point I sated that, given $p$ prime, $$\frac{X^p-1}{X-1} = X^{p-1}+X^{p-2}+\cdots+X+1$$ is irreducible in $\mathbb{Q}[X]$, because I felt I saw that in my course classes, but I'm not sure how can I prove or if it's even true. Is it really irreducible in $\mathbb{Q}[X]$ for any $p$ prime? If that's the case, how can I prove it? Any help will be appreciated, thanks in advance. | Can someone give me a hint how to the irreducibility of $X^{p-1} + \cdots + X+1$, where $p$ is a prime, in $\mathbb{Z}[X]$ ? Our professor gave us already one, namely to substitute $X$ with $X+1$, but I couldn't make much of that. |
I unenrolled from macOS Big Sur beta program, however I am still getting the 11.0.1 "update is available" notification. I would like to remove this so that I upgrade directly to 11.0 when GM is released. I don't want to install 11.0.1. Is there a way to delete cached update data so I only get 11.0 when it's eventually released? | My MacBookPro is currently running macOS Big Sur Version 11.0 Beta. Now that an official release for Big Sur has arrived, is it possible to move to the public release, just like a regular software update? In the "Software Update" settings, it still looks like I am suggested to install the new Beta version, rather than the official release. How should I fix this? |
One of my teachers argued today that 0^0 = 1. However, WolframAlpha, intuition(?) and various other sources say otherwise... 0^0 doesn't really "mean" anything.. can anyone clear this up with some rigorous explanation? | Could someone provide me with a good explanation of why $0^0=1$? My train of thought: $x>0$ $0^x=0^{x-0}=0^x/0^0$, so $0^0=0^x/0^x=\,?$ Possible answers: $0^0\cdot0^x=1\cdot0^0$, so $0^0=1$ $0^0=0^x/0^x=0/0$, which is undefined PS. I've read the on mathforum.org, but it isn't clear to me. |
While installing kodi I ran sudo add-apt-repository ppa:team-xbmc/ppa and got this error : The repository 'https://deb.opera.com/opera-stable stable 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. Tried some fixes from the suggestions. Went to Software and updates but I got this error. E:Read error - read (5: Input/output error), E:Read error - read (5: Input/output error), E:Read error - read (5: These are my specs If they are helpful in any way. AMD Sempron(tm) Processor 3000+ Memory 2513MB Operating System Ubuntu 18.04.4 LTS | So I keep trying to install things on my laptop and whenever I try to use sudo apt-get I get the same errors every time, SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. Also whenever I try to open software Center through my desktop Icon it will just freeze leaving me to force quit. If I try to use the command software-center in my terminal I get the longest list in the world which is, che.open() Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in <lambda> return (lambda data: callback(*data), user_data) File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open self._cache = apt.Cache(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__ self.open(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:52,685 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in <lambda> return (lambda data: callback(*data), user_data) File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open self._cache = apt.Cache(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__ self.open(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. 2013-10-13 10:13:57,365 - softwarecenter.db.pkginfo_impl.aptcache - INFO - aptcache.open() Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gi/overrides/GLib.py", line 629, in <lambda> return (lambda data: callback(*data), user_data) File "/usr/share/software-center/softwarecenter/db/pkginfo_impl/aptcache.py", line 261, in open self._cache = apt.Cache(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 105, in __init__ self.open(progress) File "/usr/lib/python2.7/dist-packages/apt/cache.py", line 150, in open self._cache = apt_pkg.Cache(progress) SystemError: E:Read error - read (5: Input/output error), E:The package lists or status file could not be parsed or opened. That's only about one-tenth of the list which is too long to read. I need help, if anyone has an answer please respond |
A man taking the census walks up to the apartment of a mathematician and asks him if he has any children and how old they are. The mathematician says: "${\it\mbox{I have three daughters and the product of their ages is 72}}$". The man tells the mathematician that he needs more information, so the mathematician tells him ${\it\mbox{"The sum of their ages is equal to our apartment number"}}$. The man still needs more information so the mathematician tells him ${\it\mbox{"My oldest daughter has her own bed and the other two share bunk beds"}}$. | Two old friends, Jack and Bill, meet after a long time. Jack: Hey, how are you man? Bill: Not bad, got married and I have three kids now. Jack: That’s awesome. How old are they? Bill: The product of their ages is 72 and the sum of their ages is the same as your birth date. Jack: Cool… But I still don’t know. Bill: My eldest kid just started taking piano lessons. Jack: Oh now I get it. How old are Bill’s kids? I am not able to figure out how Jack get it when Bill says "My eldest kid just started taking piano lessons"? |
This is a MacBook Pro running macOS Mojave 10.14.6 with FileVault enabled. In my case the problem is that at the login page, when the computer starts, the admin user account doesn't appear but after logging in as standard user I see that there is an admin. My brother who created the admin forgot the password. I was thinking to press command + S when the Mac starts , in order to create a new admin, but with FileVault enabled single user mode does not work. Is there still a possibility to recover the admin password? My question is slightly different than those for which it was marked as duplicate because in those answers are explained: Single User Mode(Command+S). As I have explained in my question, with FileVault enabled single user mode does not work. Recovery Mode(Command+R) . When in the terminal, in recovery mode, I type resetpassword I have not the possibility to choose the admin account but it's choosen standard account and i think that if I reset the password in this way I will reset the standard user password and not the admin one. | On my mac I have 2 accounts and the both are normal account. So in this moment I don't have a Administrator account, only one that was in the past a administrator, but now is not. How I can have again a Administrator account? |
Consider the following elaborate scenario, which nevertheless actually occurred at our table. Two PCs, Sophie Sorcerer and Roger Rogue, sneak into the hideout of hapless villain Tarley Target. While hidden, Sophie uses her Subtle Casting metamagic to silently cast sleep, rendering Tarley unconscious without ever alerting him to the intrusion. Sophie and Roger swiftly exfiltrate the sleeping Tarley from the hideout to their camp nearby, where Sophie successfully casts charm person on him. When the sleep spell ends and Tarley awakes, Sophie takes advantage of Tarley's charmed condition: she dupes him into believing that someone else actually assaulted him, and that the PCs are in fact his saviors. Tarley, overcome with gratitude and having little cause to believe the PCs are really hostile, proceeds to spill his secrets. Once satisfied that she has squeezed every bit of useful information from Tarley, Sophie signals to Roger -- who has been quietly, nonchalantly moving into striking position -- to kill him. Initiative is rolled. Tarley is ruled surprised. Roger goes first, attacks, and misses. Does Tarley's charmed condition end? The description of says a target that fails its save "is charmed by you until the spell ends or until you or your companions do anything harmful to it." Does an unsuccessful attack count as "harmful" for purposes of charm person? Would it make a difference if Tarley remained unaware of the attack -- e.g., because (as happened here) the DM ruled him distracted by Sophie's riveting conversation? Related questions: asked what "harmful" means vis-à-vis charm person, but only in the context that the charmed condition restricts the charmed creature's ability to "target the charmer with harmful abilities or magical effects." asked whether the target of charm person has to know who damaged them in order for the spell to end, but that presumes damage was actually dealt. | The spell's duration can be ended by my companions doing anything harmful to the afflicted targets. What is considered harmful for the purpose of the spell's duration? until the spell ends, or until you or your companions do anything harmful to it. In many places, the harm is defined when introduced as a term (see for examples: PHB 109; PHB 118; PHB 259). The harm here seems to be undefined, did I miss the definition here or on another page of the book? |
Example: /etc/bind/db.local file is created by apt package bind9 ( source: ) but how to find a package which have created for example /usr/share/dns/root.hints? I am looking for a universal solution to check any file path and the answer should be the package name (names if there is more then one) or reliable answer, that the file path was created by a user (i.e. not by apt install). | Say, I'm given a filename like libasound.so.2. Is there a way to query the package manager to correlate the filename with its corresponding package? I'm interested to get answers for any package manager, but my primary focus is on apt and yum. |
I was wondering where you bought that book (from)? Is 'from' necessary in this sentence ? | When someone purchase something from somewhere and I ask him the location of purchasing, which one is the correct question: Where did you buy it? OR Where did you buy it from? Is preposition necessary to use in this question or there is no need to use it? |
If A and B are two n x n invertible matrices, would the matrix result from A+B be invertible? I think it would because for a matrix to be invertible its determinant would have to be greater than 0, and if you add the determinants of two matrices greater than 0 you would have to get a non zero answer. But is there any way to prove this? | I can't find out if the product of two invertible matrix is an invertible matrix or if the sum of two invertible matrix is an invertible matrix. Can anyone suggest an answer/counterexample? Thanks a lot in advice |
Suppose there is a group of $n$ people, and we need to choose exactly $k$ among them to give $k$ identical prizes. Also, exactly $a$ of these $n$ people are special. The problem is to calculate, how many ways are there to choose the $k$ people in such a way that, an odd number of special people are included in the choice? For example, if $n = 5,\ k = 3,\ a = 3$ then there are $4$ possible ways. WLOG, we assume that the first $3$ people $p_1,\ p_2,\ p_3$ are special. Then the possible ways are: $$ (p_1, p_2, p_3)\\ (p_1, p_4, p_5)\\ (p_2, p_4, p_5)\\ (p_3, p_4, p_5) $$ I know the solution to a similar problem where the constraint of odd special people are not present, so we can pick any number of people from the $a$ special ones and the remaining from the $n - a$ non-special ones. There is bijection argument which shows the answer is simply ${n \choose k}$. But I can't seem to find any way to adapt this solution for the above problem with the odd constraint. | How do I simplify: $$\sum_{r = 0}^{\lfloor \frac{k}{2} \rfloor} \dbinom{k}{2r} \cdot \dbinom{n-k}{k-2r}?$$ Basically, the sum is: $\dbinom{k}{0} \cdot \dbinom{n-k}{k} + \dbinom{k}{2} \cdot \dbinom{n-k}{k-2} + \dbinom{k}{4} \cdot \dbinom{n-k}{k-4} \cdots.$ This seems very similar to Vandermonde's Identity but because we skip two everytime instead of one, I don't see how I can apply it to this problem. |
What is difference between 'string' and "string"? For example, I use alert('abc') and alert("abc") document.getElementById('id') and document.getElementById("id") I don't see any difference. | console.log("double"); vs. console.log('single'); I see more and more JavaScript libraries out there using single quotes when handling strings. What are the reasons to use one over the other? I thought they're pretty much interchangeable. |
I periodically get this error on my phone. It will say the internal storage is running out but when I check the storage use it will say: Total space 1.97 GB Available: 182MB Apps: 622 MB Cached 11.70 MB This time, I checked my android/data folder and it said Spotify was using 1GB of space (in addition to all the space it is using in my other storage), so I deleted the Spotify cache and uninstalled it, then wiped my cache in recovery, but I didn't end up with any extra space afterwards. I've deleted the log and LOST.DIR folders. I can't seem to free up any more space. Every time this happens I have to factory reset and reinstall cyanogen (I'm running CM 10.1.3 now) to recover storage space, but each time it happens again eventually. I tried updating to a newer version of CM 10.1.3 but that doesn't help either. UPDATE: I went through my apps to see if there was data I could get rid of there. I found 268MB in my Twitter app cache, but when I tried to clear the cache it wouldn't move. I uninstalled twitter but it didn't free up any storage space... What am I doing wrong? (Thanks!) | I have a Galaxy S2 running Android 4.1.2. It has a 12GB internal HD, and a 16GB SD card. I keep getting errors from various programs telling me I am running out of space. BeyondPod won't download new episodes, Evernote keeps putting up a notification of a lack of space (even though it seems to be storing everything), and sometimes apps won't update. I have tried to ensure I have no superfluous apps, and I haven't really changed the apps I use since I first ever started using the device. I keep any large files, like music collections or videos, on my SD card. When I connect my device by USB to my Linux computer and check the properties of my 12GB HD, it says 9.9 GB is used. But if I browse the files, every folder seems to have barely kilobytes of information. Why is my 12GB HD filling up, and how do I clear it out so I don't get these errors? Update: My phone is rooted, so if that is something that can help me in this situaton, then root access is available to me. |
When I try to update, I get this: root@deepit-R405-A-CPD6A2:/var/lib/apt# sudo apt-get update E: Type '123443215' is not known on line 61 in source list /etc/apt/sources.list E: The list of sources could not be read. Any idea what I can do? | Every once in a while I see users having issues to update due to errors like this: E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list' with varying types/line numbers/source list files (often after removing a PPA). How can such an error be fixed? |
My hopes aren't very high for this one but here's how my problem goes: I am using an LG V10. Over the summer, its motherboard decided to die and it was replaced. Therefore the external SD card I used and encrypted on my old motherboard is now inaccessible :/ Is there any way to reach its contents? If android devs really didn't come up with a way to decrypt an SD card on another device than the one its encrypted on, then there's no point in using encryption at all and maybe even no point in preferring android either.. Thanks for any help in advance | I encrypted both my phone and SD card upon purchasing my HTC Evo 4g LTE. Recently the phone died (would get to the login screen and then reboot). After a factory reset the SD card shows up as damaged. I've tried mounting it in various ways, but neither the phone nor a computer will attempt to mount the drive - they just ask to format it. Is there any hope of recovering the contents? |
I have date strings in "Y-m" format. Day is irrelevant here. Now I need to create another date from these date strings wheere day should be either 1st or the last day of the month. I have tried this code: $curDate = DateTime::createFromFormat('Y-m', $datestring1); $dt = $curDate->format('Y-m-d'); The problem here is that it creates dates with the current day of the months. How can I force it to do it for the 1st or last day? Thanks | I need to get the first and last day of a month in the format YYYY-MM-DD given only the month and year. Is there a good, easy way to do this? |
I am into home brewing and one of the popular practices is for people to can wort - this is basically a sugary barley like tea- for growing yeast. A lot of people simply can wort in a pressure cooker or via normal steam canning methods, but after reading about the time variations necessary to can certain foods, and after failing to find a specific time recipe for wort even after emailing a government body asking for recommendations, I reached the conclusion that I did not need edible wort out of a can. Instead I could just boil the wort once out of the can to kill any potential botulism toxin and still have the ability to portion large batches of wort into cans. The question is this: is there anything that won't be killed off in the boil that I need to worry about? After all, even though this is for yeast growth, I will end up drinking a small amount as it will end up in my beer. | Sometimes when preparing to eat canned goods, I realized that it has already expired. I am hesitant to throw it away because it may still be edible. Question: Does cooking expired canned goods make them edible? Assume that it expired no more than one month ago. Some say yes, because it only affects the quality of the product. Some says no, because it is very dangerous and not worth risking. I want to hear this from experts. :) |
Funding and financial management sometimes (remains or remain) difficult. Can you please tell me wich one is correct and why? | Possible Duplicate: Would I use is or are in the following sentence? The Pohutakawa Coast, Hauraki Gulf, and Waiheke Island is/are the backdrop for our day. If I rewrote it so the subject (backdrop) starts the sentence, then it seems to me that as it is singular, the verb should be the singular is. But as it is written above, are seems less clumsy. |
Subsets and Splits