body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I want to add a description field to my menu and and use it in front. I managed to have a text_format field for my description (in /admin/structure/menu/manage/main) but when I click on save, that field is empty. function HOOK_form_alter(&$form, $form_state, $form_id) { if ($form_id != 'menu_edit_form') { return false; } $form['field_menu_content'] = array( '#type' => 'text_format', '#title' => t('Description'), '#format' => 'full_html', ); } | I need to build a main menu that is a subset of the regular menu. The design team thinks it would be better for user to have only the most important links in the main menu and not have everything. Some links are top level menu and some are sub menus. For this I was hoping to be able to add a field to the menu link item form as a drop down. When creating a link the user could use this dropdown to "promoteToMainMenuAsBigLink" or "promoteToMainMenuAsSmallLink" or leave none to not show the item on the main menu. I'm looking for a similar solution as this but for Drupal 8. I was hoping to be able to add a column in the table menu_link_content_data beside 'expanded'. I was hoping not to have to record this information in an other table like shown in the d7 solution. I was able to add a field to the link form in a custom module I build, just for test purpose I only added a text field to start with: custom_menu.module: function custom_menu_form_alter(&$form, FormStateInterface $form_state, $form_id) { if($form_id == 'menu_link_content_menu_link_content_form') { $form['promoteToMainMenu'] = array( '#type' => 'textfield', '#title' => t('Promote to main menu'), '#description' => t('Promote link menu to main menu.'), '#default_value' => '', '#weight' => -9 ); } } The field is indeed shown in the link form but it is never recorded. Can someone help me with this? |
I coded a java file in a folder which is on my desktop.I copied windows terminal to this folder to execute and compile this file.When I compiled the file there was no problem.But when I tried to run the file,the same file it did found when I was compiling,it didnt found the file(like what?). Screenshots What I've tried so far I tried including a class path in my terminal code but it didnt change anything. Where am I making a mistake please help me solving the problem. | I am getting a NoClassDefFoundError when I run my Java application. What is typically the cause of this? |
I have tried many times to install Ubuntu 14.10 on my Notebook of FUJITSU LIFEBOOK UH55/M.But it's always turned out something to be wrong, and it's just the Boot questions. I installed Ubuntu 14.10 with UEFI, and with BOOT SECURE ON,because I want my pre-installed Win8 works between Ubuntu. Now I doubt that Ubuntu 14.10 version is support UEFI or not,I followed many ways that INSTALL Ubuntu with SECURE BOOT ON. It seems not support my computer,by the way, if I have to try the Version 12.10? OS Windows 8.1 64 Bit. CPU INTEL® Core™ i5-4200U PROCESS (1.60-2.60GHz) MEMORY 4GB(4GB×1)(DDR3L PC3L-12800) HDD 500GB HDD (HDD+NAND FLASH MEMORY) DRIVE NONE DISPLAY 13.3 HD フルフラットファインパネル(TOUCH)[1366×768] GRAPYICS Intel® HD Graphics 4400 CAMERA HD Webカメラ内蔵(有効画素数 約92万画素) INTERNET LANなし, ワイヤレスLAN(IEEE 802.11a/b/g/n準拠) Bluetooth Bluetooth® ワイヤレステクノロジー Ver.4.0+HS準拠 KEYBOARD STANDARD KEBOARD(91KEY) POINTING DEBASE フラットポイント内蔵 | I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS. Should I do it with Wubi, or through the Live USB/DVD? What steps do I need to take to correctly install Ubuntu? |
In AC systems the two wires of a circuit alternate polarity many times per second. So positive and negative switch, half of the time a wire is positive the other it is negative. So why is it important to connect plug sockets to the correct coloured wire? What is the difference between the live and neutral wires? | In domestic electrical circuits, there are 3 wires - live, earth and neutral. What is the difference between the live and neutral wires? As there is AC supply, it means that there are no fixed positive and negative terminals. Current rapidly switches direction. Does that not mean that both the live and neutral wires carry the same amount of current, alternatively? Why is the neutral wire called 'neutral'? |
I'm going to do some old school value investing, holding around ten stocks. Other than investing say 2k every month, I also have around 100k in savings. I'm contemplating investing these alongside my 2k, say over the next 3 to 5 years. I don't want to take too much risk in regard to market timings. Any thoughts on the period for investing the additional sum? | I currently have a large pile of cash savings ($240,000) which I really should have been investing all this time, but the past is past and no point dwelling on it. I am currently 38 years old (2 kids. Wife who is also a high earner - $100,000), with a high salary ($150,000). I have read "The Intelligent Investor" and am really sold on dollar cost averaging as a strategy, using the index funds offered by Vanguard. My current dilemma is what to do with the cash I already have. My current plan is to still follow the dollar cost averaging and slowly move it into vanguard over a period of 4 years (~$5000 per month). While leaving the remaining parts of the cash in term deposits. So $50,000 in a 3 year term deposit at 3%, $50,000 in a 2 year term deposit at 2.8% etc. But in someways it feels overly conservative. Should I just move all the money now? Or perhaps in a shorter time frame (3 years? 2 years? 1 year?). There are a few other questions on the site similar to mine, but they are from 2013/2014 etc. Given that currently the stock market is at a high and there is a lot of economic uncertainty on the horizon, putting everything in the stock/bond market at once now seems like a risky move. And it seems to violate the principle of dollar cost averaging. Or am I violating dollar cost averaging by trying to "time the market" by looking at it's current value? Reading this section seems to indicate that I should just invest everything now. But the first paragraph also seems to suggest giving more weight to that advice if the market was trending upwards (Which I am not certain the current market is/will be for long). PS: My current investment horizon is long. Basically retirement, about 20 years from now. |
I need to calculate multiple ring-buffers, but every time I try, arcgis produces a failure: Executing (Multiple Ring Buffer): MultipleRingBuffer Y:\GIS\RDY\clip\sn_clip.shp Y:\GIS\RDY\sn_clip_ring.shp 100;250;500;750;1000;1250;1500;1750;2000;2250;2500;2750;3000;3250;3500;3750;4000;4250;4500;4750;5000;5250;5500;5750;6000;6250;6500;6750;7000;7250;7500;7750;8000;8250;8500;8750;9000;9250;9500;9750;10000;10250;10500;10750;1100 Meters distance ALL FULL Start Time: Fri Feb 15 12:03:02 2013 Running script MultipleRingBuffer... ERROR 999999: Error executing function. The table was not found. The table was not found. [union] The table was not found. The table was not found. [union] Invalid Topology [Topoengine error.] Failed to execute (Union). Completed script MultipleRingBuffer... Failed to execute (Multiple Ring Buffer). Failed at Fri Feb 15 13:58:58 2013 (Elapsed Time: 1 hours 55 minutes 56 seconds) I don't get it. Can anyone help me with this? Note that I'm not used to python. | Using ArcGIS 10.1 for Desktop, I'm trying to run the Identity function on two large data sets but it fails every time. I don't think it is a lack of hardware as I can run other processes on the same data sets. I've already updated software, and added the 64 bit geoprocessing add-in, checked and repaired geometry, and done the fix in (set ARCTMPDIR env variable to a writable local folder). Executing: Identity DudleyStamp OA2011 "D:\Case Studies\National2\National.gdb\DudleyStampOA11" ALL "1 Meters" NO_RELATIONSHIPS Start Time: Wed May 08 21:11:43 2013 Reading Features... Processing Tiles... Assembling Tile Features... ERROR 999999: Error executing function. The table was not found. The table was not found. [DudleyStampOA11] The table was not found. The table was not found. [DudleyStampOA11] Invalid Topology [Topoengine error.] Failed to execute (Identity). Failed at Wed May 08 21:45:41 2013 (Elapsed Time: 33 minutes 58 seconds) Based on comments so far I tried copying data to new file geodatabase, and running the tool from ArcCatalog still get exactly the same error. I have ordered 16GB of the fastest RAM my computer can take (I current have 4GB). I also have a 6 Core AMD Phenom II X6 1090T, SSD, and AMD Radeon HD 6970 Graphics Card. So I'm not sure what more hardware I can add. I've also tried increasing the size of the page file which was a suggestion I found on Google with no effect. |
As you can see by the screen shot my label has transparency that's instead showing up white when I uvwrap the label on the bottle. I know it has to be something simple but there's no option to make it recognize transparency (like when bringing in an image to the modeling window I can select alpha transparency). | I am trying to put a label over the transparent plastic bottle, but i was unable to do so, because when i build the bottle material(plastic) and mix it with the diffuse shader(using the label texture), the label gets faded. So the solution i found was to duplicate the bottle and scale a little bit and apply the label material on it. So it looks its the same material, but in reality its one material over the other. How can I make my plastic material be under my label material(image)? Here's how it looks: Here's my material setting for the plastic bottle: Thanks in advance. |
So I should prove $\frac{x}{1+x^2} < \arctan x < x ,\quad x> 0$ I presume easiest way would be to: $$f(x)=\arctan x -\frac{x}{1+x^2}, \quad g(x)= x - \arctan x$$ then: $f(x)>0$, $g(x)>0$ But now I'm not really sure what I should utilize to prove those statements | How to prove for $x>0$, $\dfrac{x}{1+x^2}<\arctan x<x$? I started with saying $0<\arctan x<\frac{\pi}{2}$ when $x>0$ I'm just not sure how to proceed with this proof, it works when I take random values but I cant see how to prove that it works for any $x$. |
I'm making a bed wars map and the command blocks are VERY boring, is there a way to copy a command block so that when you place it down again it has the same command. I'm on Xbox by the way | Are you looking for how to use /setblock with blocks with data? See . How do I get a block with data in my inventory so I can place it myself? In Java Edition, these commands work: give @s chest{BlockEntityTag:{Items:[{id:"diamond",count:10b}]}} give @s sign{BlockEntityTag:{Text1:"{\"text\":\"foo\",\"bold\":true}"}} How can I do this in Bedrock Edition, where there is no access to NBT tags from commands? |
It's well-known that there exists some real numbers that cannot be defined in a string of finite length (Berry's paradox). However, why can the set of all real numbers be defined? My gut feelings are $1$. the definition has some nonconstructive descriptions, like the supremum and infimum principle; $2$. or we are just talking about computable numbers? I'm not familiar with real analysis & mathematical logic so there might be something I overlooked. | Loosely, a number is describable if it can be unambiguously defined by a finite string over a finite alphabet. Numbers such as $\frac{1}{3}$, $\sum_{n=0}^\infty \frac{1}{n!}$, and "the ratio of circumference to diameter of a circle" are all describable numbers. One can show that the set of all such numbers is countable. Let $U$ be the set of indescribable real numbers. I "claim" $U$ is empty, and so every real number is describable. Suppose to the contrary. Place a well-order on $U$ (this can be done assuming the Axiom of Choice). The least element $u$ of $U$ admits the description "the least element of $U$ according to the specified well-order", contradicting the indescribability of $u$. Obviously, something has gone awry here. I suspect it is some combination of my loose definition of describability and my self-referential "description" of $u$. My (slightly open-ended) question is "What's wrong here?". P.S. There is a addressing something rather like my question. As I understand it, the author's response is "the given description isn't really a description". If so, I'd enjoy some elaboration. |
I have only one user and my grub boot menu also won't load so I don't know any other way to change password | I need to reset my password. I have followed these steps: However, then I go to "root" or "netroot" recovery options, it tells me: Give root password for maintenance (or type Control-D to continue) Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From I read: Under chapter 'The Other Way': 4. Highlight the line that begins kernel and press 'e' to edit` But in the grub configuration file I have no line that starts with kernel. Only: setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6.... Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password? |
I am working on a Debian 7 Wheezy system using Anaconda and working from Spyder. I've had a hard time installing a version of GDAL that reads HDF4 drivers. Could someone walk me through the installation process? | I'm running code that works with MODIS HDF4 datasets on a Debian Linux distribution. I am also running this code on a Windows machine. On both the Windows and the Linux machines, I have the most recent GDAL version (gdal 1.11.1, np19py27_1), however on the Linux machine, GDAL doesn't seem to recognize HDF4 Drivers... it won't load or process any of the HDF4 datasets that are easily processed on the Windows machine (unfortunately this machine doesn't have enough space to run the full code). Has anyone else encountered this problem? Do I need to install an additional module on the Linux system? |
Even if there are certain locking spells can protect the lock against , can't a wizard just break through the walls on side? As one door is a part of a wall closing a room, can't a wizard blast through some nearby walls? | In the Harry Potter universe, there is a spell that unlocks things. In the books and movies, there are many occasions where the main characters use this spell to open doors in wizard buildings (such as the door leading to where the Philosopher's Stone is hidden, or a door in the Magical Congress Of USA headquarters). Hermione knows the spell in her first year, which seems to indicate it's pretty easy to learn/cast, especially for the average adult wizard. What I'm wondering, then, is why do wizards lock their doors when it's so easy to unlock them? And if it's so easy to unlock locked doors, why aren't there more doors locked with enchantments? |
I am proving a result of vector analysis here it is. A vector field $F$ is continuous in a Domain $D$ is conservative $\iff$ the line integral of tangential component of $F$ along every regular curve in $D$ depends only on the end points of the curve. Moreover the line integral is simply the difference in potential of the end points The definition I am using for Conservative field is :- A vector field $F$ is said to be conservative if there exist a scalar field $\phi$ defined in the domain $D$ such that $F=$$\nabla$$\phi$ I know we have to use concepts of path connected and simply connected but I don't know where to start exactly . Hints or solution is really appreciated. | I’m trying to grasp the idea behind the line integral for conservative vector fields. If I have some vector valued function $F$ which can be represented as $\nabla f$ then I have a conservative field. Now what I’m not fully comprehending is that why the integral $$\int_C F \ dr$$ is path independent. I’ve looked several explanations for this and the analogy for FTC is quite clear so this makes sense in ”symbolic” form, but all the explanations I’ve seen usually explain this via some physical experiement such as traversing to the top of a mountain and since the gravitational field is conservative the work done to get to the top would be independent of the path I’m taking. I’m not a physicist and even this doesn’t quite make sense, I would assume that the work done from the gravitational field to me would be much greater if I start to go for example up sideways instead of directly walking up the mountain? If work is defined as $W=f \cdot d$ wouldn’t the $d$ be much greater if I’m taking a longer path and thus $W$ would get larger? Is there some other kind of intuition for this that wouldn’t rely so much on physical concepts such as the gravitational, electric or magnetic fields? Edit: Ah perhaps if I’m taking a path sideways the field vectors would be directed towards me at some angle and thus wouldn’t do as much work as if they would be directed right towards me? |
I see an eye icon at the top of my screen, but without the phone around it, what does the eye icon mean, just the eye icon. | This icon appears seemingly at random, especially on my lock screen but not always. I can almost guarantee it pops up if I make a screenshot but I am not sure. I am on an LG Volt phone from Boost Mobile, and I was able to (finally) screenshot this icon after wondering about it for over a month. A screenshot of the image is here: Any guesses or preferably solid answers to what this could be are very much appreciated! It only appears for a brief moment (sometimes not even a second) before it disappears again. I want to reiterate I see it most on my lock screen, but there could be other times it happens that I am not noticing. Thank you in advance for your assistance in identifying what this is! |
Being new to C++, I was wondering what the best practices are regarding generic functions. I'm trying to implement a global function that takes as arguments a vector of generic data points, a function that maps one such data point to a different generic type as well as a generic pointer to return the mapped data point: template <class Parameter_T, class Data_T, class CalculateParameterF> void example(vector<Data_T> data, CalculateParameterF calculateParameters, Parameter_T& bestFittingParameters); Now to my question: If I put the above declaration in a header file and its implementation in a .cpp file, the code won't compile. If I understand correctly, the compiler doesn't understand how it should compile the generic function exactly. In order to give it some hints, I can either leave the implementation body in the header file or add a second declaration filling in the specific types that I want to use it with. However, both of these solutions seem to be a bit ugly. Are these really the only solutions or am I missing something? If no, what solution should I prefer and why? | Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) |
When I open Ubuntu Software, it shows me that there are some updates which have to be done. But after clicking them for several times, the installation process just doesn't work. I also tried to restart. If I use the Software Updater it tells me this message: If I click OK, the update ends. If I click settings all options are checked: This whole update process was really not user friendly developed. Do you know what can be done else? I also tried the terminal sudo apt update sudo apt upgrade, there are still undone updates in the Software Center and the Software Updater! The output of the terminal is: W: GPG error: http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E: The repository 'http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_16.04 Release' 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. PS: Who has marked this as duplicate? The so called duplicate is about why is Ubuntu Software showing these updates? Should I install them? My question is about how to install them? I can't install them because it doesnt work! SOLUTION: For me the terminal, the software-center etc failed, but Synaptic Package Manger worked! Even if it makes no sense at all, because all these apps do the same thing. I hope Ubuntu could explain this to me. | I'm using Ubuntu 16.04.3 LTS, on a 64-bit system. There are two available updates in "Updates" section of the Ubuntu Software, named OS Updates and Software respectively: I usually update through Software Updater utility, (and occasionally used sudo apt update and sudo apt upgrade as recommended by some software installation tutorials)- anything that I think is required. So why is Ubuntu Software showing these updates? Should I install them? As far as I know, these types of updates, if you look at the list, aren't ever available in the Software Updater. |
Short Story: Why and in what way is the list [2*[0]]*2 different from the list[[0, 0], [0, 0]]? Long Story: I was trying to do one of the Python Morsels exercises. Very simply: add all values of the same position in multiple lists of lists. The Example given in the question was: matrix1 = [[1, -2], [-3, 4]] matrix2 = [[2, -1], [0, -1]] >>> add(matrix1, matrix2) [[3, -3], [-3, 3]] So I gave it a shot and wrote the following code: def addmorsel(*inputslists): addlist = [len(inputslists[0][0])*[0]]*len(inputslists[0]) for listoflists in inputslists: for i,onelist in enumerate(listoflists): for j,value in enumerate(onelist): addlist[i][j] = addlist[i][j] + value return addlist But when I use this function on the example matrices it returns [[0, 0], [0, 0]] instead of the right answer. So I printed the returned addlist to see what happens and apparently the line addlist[i][j] = addlist[i][j] + value seems to add the value to every list within a list instead of only the list it is referencing to. Replacing the addlist creation line addlist = [len(inputslists[0][0])*[0]]*len(inputslists[0]) by addlist = [[0,0],[0,0]] seems to do the job, but I do not understand why, because that is exactly the same as what addlist becomes by the previous line. I thought: maybe it references the previous list or something, so I also tried addlist = [2*[0]]*2,so replacing the len() functions by their output, but somehow that also gives the wrong answer. So my basic understanding of python lists is being shook here. Why is [2*[0]]*2 different from [[0, 0], [0, 0]]? | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
I don't know what this situation is called when we end up in loss but intention was to save/protect. Example: I am trying to improve something but made it worse I am trying to fix a thing and broken other | Example sentence - This problem is a _____ which gets complicated every time you try to solve it. Is there such a word that represents a problem which will become worse if/when one tries to solve it? Note - After seeing the comments and answers I'd like to add that this is not a can of worms or Pandora's box because it doesn't create a new problem but just worsens. Example: Magic leaves protecting a fruit by enclosing it. Every time a leaf is touched, all the leaves close together further, that is more tight than before. |
In the Android app I can find activity on my questions but I cannot find the questions I have asked either per site, or anywhere but "recent activity". Even if I go to a specific site and look at my profile, it only shows achievements (as far as I can see) not a list of Q&As. Where do I access this? | The app doesn't have a way to show your own questions. It would be nice to get a quick handle to those. |
I have a method with the following signature: private string SerialiazeObj<T>(T obj) { // Do some work } Now, I have another method which accepts an object and calls the SerializeObj method, as shown below: private void callSerializeObj(object obj) { Type objType = obj.GetType(); string s = SerialiazeObj<objType>((objType)obj)); } The object passed to callSerializeObj can be of any type. Unfortunately, the compiler is giving me this error in the (string s = SerializeObj...) part: The type or namespace 'objType' could not be found (are you missing an assembly reference). I don't know if I am calling SerializeObj the correct way. What is the correct way of calling the method with an object which can be of any type? | What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime? Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable? public class Sample { public void Example(string typeName) { Type myType = FindType(typeName); // What goes here to call GenericMethod<T>()? GenericMethod<myType>(); // This doesn't work // What changes to call StaticMethod<T>()? Sample.StaticMethod<myType>(); // This also doesn't work } public void GenericMethod<T>() { // ... } public static void StaticMethod<T>() { //... } } |
To upload my skins, I go to the Skindex, click upload and change from minecraft.net. I've never had any trouble doing this until 3 days ago... My skin changes perfectly fine when I join some servers, but when I join a mini-game, like in or other servers with mini games, my skin changes back to default. It remains that way when I exit the mini-game too! On some servers, my skin won't change at all. It stays default. Why is this? I've tried downloading the skin and then uploading it to minecraft.net. But that doesn't help... I've tried different skins too. They all go back to steve. I can't wear any skins... | I made a skin by using Skincraft and I exported it to minecraft.net. I chose my skin and uploaded it. At the top it says, "Your skin has been changed! Please wait a few seconds for it to update." I went to Minecraft, clicked singleplayer and chose a random world at the top. I looked at my character, but it's still default. Multiplayer won't load for some reason. I don't know what I've done wrong! |
I'm currently saving request parameters of API calls into a MySQL table for logging purposes. I'm using the following. $log->info('Request', var_export($request->get_params(), true)) Also, one of the parameters is a JSON string. Should I escape each parameter individually for security purposes before writing to the database? Thanks, | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
I'm looking to purchase a compact camera that has all the common features e.g. portrait, landscape, video etc. But can also allow me to take pictures of stars and city lights, and will allow close close up shots (e.g. single flower). I relatively new to photography, so I'm not looking for the best out there, but I don't want a cheap one either. I'm looking for one in the middle in terms of the ratio of image quality to price. Currently I am looking at the Canon s120, Canon G series (trying to figure out which one would be for me), Sony DX100 (but i'm not sure which one to buy as I see there are multiple versions, and the latest one isn't always the best one), but would love for some help on which cameras I should look into or opinions on the listed cameras. | I need a new camera! My Canon IXUS is now very old. What I want to be able to do is take photos of the night sky (stars, moon, planets) and the sun. Well, ideally! I have been looking at a bridge camera that sounds okay in theory but don't really want to have anything quite so big...so, is there a compact camera that would suit my needs. I gather I will need a tripod as well. I appreciate any help, so thank you:-) Oh, and it'd be great if I could take good photos of little things, too! e.g. jewellery. |
In normal tickets, it would get all of your subsequent flights invalid once you miss a flight in the midst of the whole itinerary. How about the case on the RTW ticket? Usually the RTW ticket doesn't allow you to change the route, but allows you to change the date of the flight. If you miss a flight, can you change the date of the (missed) flight after the departure date? Or can I buy a separate ticket by myself to make up for the missed flight and resume the remaining part of the itinerary from the next city onward? If the specific program is required, it is the Star Alliance award ticket redeemed on ANA mileage program. But I would like to get a generic answer, if possible. | I am considering using a RTW ticket but I wonder what happens if I get denied entry for a country in the midst of the whole itinerary. Usually these programs set a rule such that once the itinerary is decided or once the trip started, you cannot change the route, yet you can change the date for free. In this case, if you are denied an entry for a country, will you get deported to the departure country or to the next (or another) country by changing the date of the next flight at the border control? And is the subsequent itinerary still valid or does the one denial make all of the subsequent flights invalid? If the specific program is required, it is the Star Alliance RTW redeemed on the ANA mileage program. But I would like to get a general answer, if possible. |
Let $f : \mathbb{R} \to \mathbb{R}$ be a continuous and differentiable function. If $\lim_{x \to \infty} ((f'(x))^2 + f^3(x)) = 0$, prove that $\lim_{x \to \infty} f(x) = 0$. Here is what I did so far: $\lim_{x \to \infty} ((f'(x))^2 + f^3(x)) = (\lim_{x \to \infty} f'(x))^2 + (\lim_{x \to \infty} f(x))^2 \cdot \lim_{x \to \infty} f(x) = 0$ From this, we can conclude that $\lim_{x \to \infty} f(x) \leq 0$. Now, I need to prove that $\lim_{x \to \infty} f(x)$ can't be negative, but I didn't figure out how to do this yet. Thank you! | Question: Let $f$ be differentiable on $[0,+\infty)$, such as$$\lim_{x\to+\infty}\left([f'(x)]^2+f^3(x)\right)=0$$show that $$\lim_{x\to\infty}f(x)=\lim_{x\to\infty}f'(x)=0$$ I think this problem is similar to and (the background) For my problem I guess that if $$\lim_{x\to+\infty}\left([f'(x)]^{2m}+f^{2n+1}(x)\right)=0,m,n\in N^{+},n,m>1$$ then we have $\lim_{x\to\infty}f(x)=\lim_{x\to\infty}f'(x)=0$. |
From a pdf of n pages, how to reduce by half the number of pages by merging several pages on a single page? Each pair of pages from the old pdf should be found side by side on the new pdf. | Say I start off from a PDF document, say of 12 pages, viewed with evince. To produce another PDF of 6 sheets, with a page setup of two pages per side, I normally use the "Print to File" device listed in the ^P dialogue window. This works out pretty neatly. I would like to translate this operation for the command line. To my understanding, this is not an operation that pdftk can do. Please cross check. The command lp, which would accept the option -o number-up=2, does not recognize any device called "Print to File", which indeed does not show up in lpstat -p -d. I am aware of the post . I have installed cups-pdf whereby a new printer named PDF is acknowledged. However, the print quality of a simple text file is way too raw (for example, no print margins to start with). Moreover, if I reprint an existing PDF file on this device, say lp -p PDF existing.pdf, evince can't even manage to open that copycatted output, while this is not the case with the "Print to File" way. I had a look at man evince. At the bottom, it touches upon a few print preview options and redirects to a . Admittedly I am not able to make sense and use of it. Is there actually a way to combine the flexibility of the command line with the print quality that I obtain from that "Print to File" option in the GUI evince? My test case, again, would be to create from the command line a PDF out of a source document printed with two pages per sheet. Thanks for thinking along. |
I have an interesting dilemma... I am hosting several .mp4 files on a WAMP server. I am well aware of the method of storing files outside of the document root and using a PHP script to authenticate a user before retrieving the file contents. However, these .mp4 files are required to be inside the document root. Is there any way that I can authenticate a user who is trying to directly access one of these files? I have tried a .htaccess rewrite that takes a requested URL ending in ".mp4" and redirects to a PHP script passing the requested file as a parameter, but of course this just loops. This is the rewrite rule in the .htaccess file... RewriteEngine on RewriteRule ^(.*).mp4$ /media/auth.php?file=$1.mp4 The idea was, a user will try to access , this reuest would get routed to a PHP script (auth.php) that would pick up the requested file from the URL using $_GET['file'], it would authenticate the user using a $_SESSION variable, and then user a header('Location: ' . $file) to send the authenticated user to the actual file. Again, I realized quickly after implementing this that it would just loop... Any help would be greatly appreciated. Thanks! Here's why they cannot be outside the doc root... @IdontDownVote, very complicated, but I'll attempt a short version... I have this MOSTLY working great with files outside the doc root, with one serious issue. When I access the files using the PHP script, I am able to view the video in the Chrome browser, play, pause, rewind, the whole deal. The only (big) problem is when I use this method, I am not able to Cast the video. When I access a .mp4 file directly, it gives me the option to Download or Cast, but using the PHP script, only the Download option is available. Believe me, I have tried everything including discussing with two Google developers. I posted on Stack Overflow about this issue here with no joy... I am not sure why this is getting downvoted, this is causing my a lot of headache and I am just looking for advice... | What is the best way to password protect quicktime streaming videos using php/.htaccess. They are being streamed using rtsp, but I can use other formats if necessary. I know how to do authentication with php, but I'm not sure how to setup authentication so that will protect the streaming files urls so that a user can't just copy the url and share it. Or am I overthinking this and I can just use a normal authentication scheme and place the files in a protected directory? |
I tried to rewrite the integral as $$\int (\cos^2x)(\cos^2x)dx$$ which in turn I used the trig identity of $\cos^2x = 1 - \sin^2x$ and therefore changed $$\int (\cos^2x)(\cos^2x)dx = \int (1 - \sin^2x)(1 - \sin^2x)dx = \int ( \sin^4x - \sin^2x + 1) dx$$ I then tried to do u substitution where $u=\sin x$ and $du=\cos x dx$ But my answer was completely wrong...I ended up getting $$\frac{\sin^5x}{5}+\sin x-\frac{2\cos^3x}{3}+K, \quad K\in \mathbb R$$ Am I doing $u$ substitution wrong or is there a better way to solve this integral? | $$\int \cos^4 x\,\mathrm dx = \int (1 - \sin^2x)^2\,\mathrm dx.$$ I tried using $\cos^2(x) + \sin^2(x)$ = 1. This was on the integration by parts section of my textbook. The integral I came out with is given me a hard time. I double checked my work and I feel I am on the right track but I feel stuck. I tried u substitution but there is no $\cos x$ to leverage with. |
I created an android project in Android Eclipse and I want to connect to the database I've created in SQLite Manager. The database will be saved locally. It is basically a read only only app, there are no create delete update actions done by the user. My queries will be a lot of select queries. I have my data base made and want to import it into android project. What are the steps? I have my model classes created. What else do I need in order to have to connected? Do I store the SQLite file in the assets folder etc? I have the database made in the firefox addon SQLite Manager! | 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'm a fresh ubuntu user and I've installed a double boot with Wind 8 and Ubuntu 13.04, but since yesterday I'm receiving an error showing: error: unknown filesystem grub rescue> The fact is when I do ls (hdX,gptY)/ all I get is "error:unknown filesystem" again. And the solutions posted don't work because I don't know why but I can't access the BIOS pressin F2 or to the boot pressing F12, the simply don't work since the error. | I have a multiboot system set up. The system has three drives. Multiboot is configured with Windows XP, Windows 7, and Ubuntu - all on the first drive. I had a lot of unpartitioned space left on the drive and was reserving it for adding other OSes and for storing files there in the future. One day I went ahead and downloaded Partition Wizard and created a logical NTFS partition from within Windows 7, still some unpartitioned space left over. Everything worked fine, until I rebooted the computer a few days later. Now I'm getting: error: unknown filesystem. grub rescue> First of all I was surprised not to find any kind of help command, by trying: help, ?, man, --help, -h, bash, cmd, etc. Now I'm stuck with non-bootable system. I have started researching the issue and finding that people usually recommend to boot to a Live CD and fix the issue from there. Is there a way to fix this issue from within grub rescue without the need for Live CD? UPDATE By following the steps from , I was able to boot to initramfs prompt. But not anywhere further than that. So far from reading the manual on , I was able to see my drives and partitions using ls command. For the first hard drive I see the following: (hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1) I now know that (hd0,msdos6) contains Linux on it, since ls (hd0,msdos6)/ lists directories. Others will give "error: unknown filesystem." UPDATE 2 After the following commands I am now getting to the boot menu and can boot into Windows 7 and Ubuntu, but upon reboot I have to repeat these steps. ls ls (hd0,msdos6)/ set root=(hd0,msdos6) ls / set prefix=(hd0,msdos6)/boot/grub insmod /boot/grub/linux.mod normal UPDATE 3 Thanks Shashank Singh, with your instructions I have simplified my steps to the following. I have learned from you that I can replace msdos6 with just a 6 and that I can just do insmod normal instead of insmod /boot/grub/linux.mod. Now I just need to figure out how to save this settings from within grub itself, without booting into any OS. set root=(hd0,6) set prefix=(hd0,6)/boot/grub insmod normal normal UPDATE 4 Well, it seems like it is a requirement to boot into Linux. After booting into Ubuntu I have performed the following steps described in the : sudo update-grub sudo grub-install /dev/sda This did not resolve the issue. I still get the grub rescue prompt. What do I need to do to permanently fix it? I have also learned that drive numbers as in hd0 need to be translated to drive letters as in /dev/sda for some commands. hd1 would be sdb, hd2 would be sdc, and so on. Partitions listed in grub as (hd0,msdos6) would be translated to /dev/sda6. UPDATE 5 I could not figure out why the following did not fix grub: sudo update-grub sudo grub-install /dev/sda So I downloaded based on an answer from post. That seemed to do the trick after I picked the "Recommended Repair (repairs most frequent problems)" option. |
Is it possible to search something using Firefox in Spotlight search? When I choose the option "search in the internet" it always open Safari. My question is then, is it possible somehow to set Firefox as the "default" browser in iOS? I am using iOS 9.1 in an iPad mini. | I really want to use Firefox as my main browser but can't find a way to make it the default browser on iOS: this make it's adoption much more complicated. Is it totally impossible? Edit - Example of use case: while clicking a link in the Twitter app, I would like it to open directly in Firefox. I won't jailbreak. |
So I understand that indexes are crucial because they allow you to make queries without having to look at the entire collection, but what exactly is an index? What really happens to the data when you call .createIndex()? Thanks! | Given that indexing is so important as your data set increases in size, can someone explain how indexing works at a database-agnostic level? For information on queries to index a field, check out . |
Verify the identity: $$\frac{(\cos(x+h) - \cos x)}{h} = \cos x \left(\frac{\cos h - 1}{h}\right)- \sin x \left(\frac{\sin h }{h}\right)$$ =(Cosxcosh - sin x sin h -cos x)/h. I can't think of where to go from here. Thanks | The proof of two angles for sine function is derived using $$\sin(A+B)=\sin A\cos B+\sin B\cos A$$ and $$\cos(A+B)=\cos A\cos B-\sin A\sin B$$ for cosine function. I know how to derive both of the proofs using acute angles which can be seen here but pretty sure those who have taken trig know what I'm talking about. So I know how to derive and prove both of the two-angle functions using the acute angles, but what I am completely confused about is where those triangles came from. So for proving the two-angle cosine function, we look at two acute angles, $A$ and $B$, where $A+B<90$ and keep on expanding. So my question is, where did those two triangles come from and what is the intuition behind having two acute triangles on top of each other? |
Suppose $S = 1 - 1 + 1 - 1 + 1 - 1 + 1\ldots$. Then $1 - S = S$ so $S = \frac{1}{2}$ Now suppose $T = 1 - 2 + 3 - 4\ldots$. We can also write $T = 0 + 1 - 2 + 3 - 4\ldots$. Adding the two we get $2T = (1+0)+(-2+1)+(3-2)+(-4+3)\ldots$ or $2T = 1 - 1 + 1 - 1\ldots$, so $T = \frac{1}{4}$. Now let $P=1+2+3+4+5\ldots$. It can be easily seen that $P-T = 4P$ or $P=-\frac{T}{3} =-\frac{1}{12}$ so we have $P = -\frac{1}{12}$ How it is possible that $1 + 2 + 3 + 4\ldots=-\frac{1}{12}$? | $\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$. Why should analytically continuing to $\zeta(-1)$ give the right answer? |
If $A$ is a symmetric positive semidefinite matrix, then $A+\alpha I$ with $\alpha> 0$ is positive definite? Or are there some conditions to $\alpha$ so that it verifies? $I$ is the identity matrix | If I have a positive semidefinite matrix $A_{n\times n}$, I want to transform it to positive definite matrix. I plug the following operation to the original matrix: $$B=A+\lambda I_{n}$$ where $\lambda > 0$. I want to know whether B is positive definite matrix. Could anyone proof it? |
As we all know, headmasters and headmistresses that passed away are being honored by making them all a portrait that can communicate to the present headmaster/headmistress of the current regime of Hogwarts. But I didn't read in the 7th book if there was a portrait placed in the office showing Severus Snape since he is already dead and had finished his work as a headmaster of Hogwarts. | Throughout the Harry Potter series, we see that deceased Headmasters of the school get a semi-sentient portrait of themselves in the Headmaster's Office, at the service of the current Headmaster. Do all Headmasters get a portrait? What are the conditions of getting one? For instance, there are a couple of times when Dumbledore is temporarily deposed as Headmaster: Dolores Umbridge takes over the job in Order of the Phoenix, and Minerva McGonagall takes the job in Chamber of Secrets and Half Blood Prince. Will Umbridge and McGonagall have portraits in the Headmaster's Office when they expire? |
Steps to Reproduce ## Tap ask a question type some text in body/description field copy/cut Paste in different location Notice text size is smaller Expectation Given I have copied text, when I paste the text in the same or a different location, then the text size will be the same as when I copied it. App Version: 1.6.6.2 Device: iPhone 7 OS Version: Version 13.1.3 (Build 17A878) | While I can post external texts into question and answer bodies, it preserves the old font style, spacing and size (although the markdown display won’t be affected by that.) App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 11.0.3 (Build 15A432) |
I want to replace " from a string with ^. String str = "hello \"there"; System.out.println(str); String str1 = str.replaceAll("\"", "^"); System.out.println(str1); String str2= str1.replaceAll("^", "\""); System.out.println(str2); and the output is : hello "there hello ^there "hello ^there why I am getting extra " in start of string and ^ in between string I am expecting: hello "there | I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps. It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps? |
Look at the following sentence that I just saw while viewing a profile: Apparently, this user prefers to keep an air of mystery about them. As it looks, them refers to this user, right? This user refers to one person; however, the pronoun them is used which refers to many people and seems incompatible. Can somebody explain why this sentence is right and why him/her aren't used? | Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase? Each student should save his questions until the end. Each student should save her questions until the end. |
Brief description about what I am trying to do: It's a simple messaging app In my first activity I have a list-view and few buttons. User presses any of the button and the information about which button was pressed was stored in shared preferences. When user presses any list item, an intent is triggered that takes him to new activity where which list item was pressed is analyzed by putExtra() from intent. In second activity, depending on which value came with intent, a string value for newString is decided. Problem When screen rotates, app crashes with this error - Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference Following is the code in second activity - String newString = "Default_Channel"; public static final String MyPREFERENCES = "MyPrefs" ; SharedPreferences sharedpreferences; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chat2); . . . sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE); String restoredText = sharedpreferences.getString("CurrentUser", null); if (restoredText != null) { currentUserName = sharedpreferences.getString("CurrentUser", "unknown");//"unknown" is the default value. . . . } else { currentUser.setText("not signed in"); } if (savedInstanceState == null) { Bundle extras = getIntent().getExtras(); if(extras == null) { newString= "Default_Channel"; } else { newString= extras.getString("LIST_ITEM_CLICKED"); } } else { newString= (String) savedInstanceState.getSerializable("LIST_ITEM_CLICKED"); } // *** GETTING ERROR HERE On this line *** // switch (newString) { case "User_1": . . . break; case "User_2": . . . break; case "User_3": . . . break; case "Default_Channel": . . . break; } I am getting NULL pointer exception where I have mentioned it in code ! Its Line between Else statement and Switch. Also, I understand what is NULL pointer exception and this is not what I am asking. I am getting NULL pointer when screen rotates, i.e. when activity restarts without intent. I am new to android programming and not able to figure out what's going wrong here. Edit: This is not duplicate question with "What is NULL pointer exception". | 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? |
Is there a way to make the vertices on the following directed graph with a set Euler cycles colored? Provide the TeX code as well as explain how to color vertices! | I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to define this ellipsis as a node, but the dots appear horizontally and not as shown in figure, i.e., it would be great if the ellipsis are three adjacent points on the circumference of the circle where other nodes rest. The same problem arises even when I have a complete graph. Can someone help me out with this? Thanks! Code so far: \begin{tikzpicture}[->,>=stealth', shorten>=1pt, auto, node distance=2.8cm, semithick] \tikzstyle{peer}=[draw,circle,violet,bottom color=\lav, top color= white, text=violet, minimum width=8pt] \tikzstyle{superpeer}=[draw, circle, burntorange, left color=\oran, text=violet, minimum width=25pt] \node[superpeer] (A) {$0$}; \node[peer] (B) at ($ (A) + (20:4) $) {$1$}; \node[peer] (C) at ($ (A) + (-52:4) $) {$2$}; \node[peer] (D) at ($ (A) + (-124:4) $){$3$}; \node[draw=none] (F) at ($ (A) + (-176:4) $){$\cdots$}; \node[peer] (E) at ($ (A) + (92:4) $) {$N$}; \path (A) edge [color=blue, sloped] node[]{$\lambda_{01}, \mu_{01}$} (B); \path (A) edge [color=blue, sloped] node[] {$\lambda_{02}, \mu_{02}$} (C); \path (A) edge [color=blue, sloped] node[] {$\lambda_{03}, \mu_{03}$}(D); \path (A) edge [color=blue, sloped, below] node[] {$\lambda_{0N}, \mu_{0N}$} (E); \path (B) edge [color=blue, sloped] node[] {$\lambda_{10}, \mu_{10}$}(A); \path (C) edge [color=blue, sloped] node[] {$\lambda_{20}, \mu_{20}$}(A); \path (D) edge [color=blue, sloped] node[] {$\lambda_{30}, \mu_{30}$}(A); \path (E) edge [color=blue, sloped, above] node[] {$\lambda_{N0}, \mu_{N0}$}(A); \end{tikzpicture} |
When shaded in Look Dev mode, there's a kind of coloured lighting so the darker faces are yellow and the lighter faces are blue. Is there a way of disabling this so the shading is more greyscale like in 2.79? The faces of this cube should be in black and white only but the colours look very different in the viewport. Thanks. | Is it possible to change the default mesh color/shading in 2.8 to be more like 2.79? I'm finding it hard to see finer detail in 2.8. On the left is 2.8 and the right is 2.79 |
I have come across a sentence where 'Niagara Falls' is used without an article. I seem to remember that there is a basic rule of the English language that there should be an article before any specific countable noun. Niagara Falls is a set of three spectacular waterfalls located on the US-Canadian border which makes it plural specific noun. Then why not 'The Niagara Falls'? | In AmE (and probably other dialects as well) there are certain place names and other proper nouns that either have a compulsory definite article or a compulsory lack of one attached to them. For example: The Upper West Side - Neighborhood in New York City with a compulsory The. Midtown (Manhattan) - Compulsory lack of The. Google - Compulsory lack of The to the point of . Facebook - Compulsory lack of The . Then there are others which are pseudo-plurals: The Bronx - Always gets The and is occasionally treated as plural. Yonkers - Never gets The, never treated as a plural. My question: Is there a name for this phenomenon? I know that the rules of articles in English are very fluid, but is there a rhyme or reason to this? |
I've got this NullPointerException that I can't get rid of, I could use a bit of help, please :) So I've got a button in my 1st activity that is supposed to send me to this 2nd activity ( where the problem is ), but when I click on the button my activity crashes and displays this error. When I tried my 2nd activity on its own, it worked fine, but when I attached my 2 projects the error popped. This is the error : Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference And this is my code : public class entery_names extends AppCompatActivity { RelativeLayout layout; RelativeLayout.LayoutParams params; Button mBtn_add_et = null; int id; int i; static int previousid; @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //Submit = (Button)loginDialog.findViewById(R.id.Submit); mBtn_add_et = findViewById(R.id.btn_add_et); mBtn_add_et.setOnClickListener(new View.OnClickListener() { // this line is the problem apparently @Override public void onClick(View view) { if (id <= 4) { EditText et = new EditText(entery_names.this); id = View.generateViewId(); et.setId(id); layout = findViewById(R.id.relativeLayout); params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT); params.addRule(RelativeLayout.BELOW, id); if (previousid == 0) params.addRule(RelativeLayout.BELOW, R.id.et3); else params.addRule(RelativeLayout.BELOW, previousid); previousid = et.getId(); et.setHint("Enter Name"); et.setHintTextColor(getResources().getColor(R.color.colorTransparentWhite)); et.setTextColor(getResources().getColor(R.color.colorTransparentWhite)); et.setX(findViewById(R.id.et1).getX()); layout.addView(et, params); } } }); } } Thanks! | 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? |
Is there any test from the command line to prove whether a UEFI/BIOS booted as UEFI, or as Legacy? | I have a Windows 7 x64 install USB and want to know if the installer has booted into EFI or BIOS mode. I found a solution , but it doesn't work since notepad couldn't find: \Windows\Panther\setupact.log |
I get the options to change the passphrase when I open the 'Disks' utility. However, I'm curious to know how to remove the passphrase (with encryption still happening with auto-decrypt on boot) or how to disable encryption. | I recently installed Ubuntu 12.10 and it requires a passphrase to boot up (I installed it with an encrypted file system). Do I have to reinstall to change to a standard unencrypted file system? |
when I was doing c program in Ubuntu 12.04 , there is a font configuration warning shown by terminal. What should I do? shayna@shayna-Vostro-3446:~$ gedit hello6.c Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-garuda-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-garuda-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-kinnari-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-kinnari-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-loma-synthetic.conf", line 12: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-umpush-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-umpush-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 26: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 31: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 40: Having multiple values in <test> isn't supported and may not works as expected shayna@shayna-Vostro-3446:~$ gcc hello6.c -o hello6 shayna@shayna-Vostro-3446:~$ ./hello6 shayna@shayna-Vostro-3446:~$ | I am getting the following error frequently. (Example: when running zenity,firefox etc. commands / applications.) Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf", line 11: Having multiple values in <test> isn't supported and may not work as expected Here is contents of file /etc/fonts/conf.d/90-fonts-unfonts-core.conf: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <match target="font"> <test name="family" qual="any"> <string>은 바탕</string><string>UnBatang</string> <string>은 돋움</string><string>UnDotum</string> <string>은 궁서</string><string>UnGungseo</string> <string>은 필기</string><string>UnPilgi</string> <string>은 그래픽</string><string>UnGraphic</string> </test> <edit name="antialias" mode="assign" binding="strong"><bool>true</bool></edit> <edit name="hinting" mode="assign" binding="strong"><bool>false</bool></edit> <edit name="autohint" mode="assign" binding="strong"><bool>true</bool></edit> <edit name="hintstyle" mode="assign" binding="strong"><const>hintslight</const></edit> </match> </fontconfig> How to solve it? |
Generally to detect the hydrogen spectrum people uses the hydrogen gas tube as a light source. My question is, since the gas in the tube is the hydrogen molecule $H_2$ why is the spectrum equal to the spectrum of atomic hydrogen $H$ ? | One of the basic experiments everybody learns about when it comes to physics is the spectroscopy of hydrogen gas. The typical set-up has a charge discharge lamp containing the hydrogen. The resulting spectra are then discussed with the atomic properties of the hydrogen atom. The gas however is not mono-atomic but it is present as $\textrm{H}_{2}$. The 1s orbitals creating the $\sigma$-bond and the electrons are occupying the bound state. This is at a lower energy when compared to the 1s states of the atomic hydrogen. The higher energy orbitals will also influence each other as they are overlapping. So my question is, why does the atomic hydrogen description works for this experiment? Possible answers I could think of are: The bounding effects are negligible The $\textrm H_{2}$ spectra are only visible shortly after the lamp is switched on. The constant electron bombardment is slowly dissociating all $\textrm H_{2}$. For the later I am very unsure if a charge discharge lamp is able to produce conditions to archive that. If it comes out that this is the answer, does anyone know where to find more details on the spectroscopic properties of $\textrm H_2$? |
This might not be a 100% LaTeX question since it is a matter of PDFs, but I think that the LaTeX crowd is the most appropriate audience for it. I have an unpublished research paper that I am writing in LaTeX, and I have to send its PDF to some people whom I don’t trust completely, so I am paranoid that someone will copy it. I would like to secure it in the sense that the text, table and figures cannot be copied, i.e. that the paper is rendered useless. Both "technical" (e.g. protect pdf) and other (e.g. change irrelevant text in the paper to produce a different version) solutions are seeked. I know that the safest way is just not to send it around, but I have to, and frankly, I have no clue what to do here. I also know that each PDF can be locked, but that can be easily broken. Putting diagonal watermarks across the whole pages is also not a solution because text and images can be copied, and watermarks destroy the readability. Another thing would be to put watermarks on raster figures directly in the file, so they are useless if copied. Do you have a solution for this? What did you do in similar situations? | My questions is very simple. How can I set security setting for a PDF file created with PDFLatex? I should set some password or print permissions, etc. |
I accidentally lost some of the system files by executing the following command in the terminal: sudo apt-get purge wine\* Most of the installed software (terminal, software center, libreoffice etc.) are now lost. Does anybody have a solution for this issue? | I accidentally removed all the packages starting with the name jpeg with: sudo apt-get remove jpeg* This screwed up a lot of things, removed Unity, Firefox, Flash player etc. I somehow managed to recover the desktop and unity but then a lot of things are still buggy. For example .rpm files and .tag.gz just won't open up at all. What I want is a way to fix everything that's amiss. Something that is the equivalent of a 'repair installation' with a windows disc. Any tips, anyone? |
Let us say I have process A which spawns process B, which spawns process C. Under what circumstances will killing A kill the whole chain (or tree I guess) and when will it not? I sometimes find it does, and sometimes that B ends up with ppid 1 and C is untouched. Does this behaviour vary between particular Linux kernel versions? | I have been studying the Linux kernel behaviour for quite some time now, and it's always been clear to me that: When a process dies, all its children are given back to the init process (PID 1) until they eventually die. However, recently, someone with much more experience than me with the kernel told me that: When a process exits, all its children also die (unless you use NOHUP in which case they get back to init). Now, even though I don't believe this, I still wrote a simple program to make sure of it. I know I should not rely on time (sleep) for tests since it all depends on process scheduling, yet for this simple case, I think that's fairly enough. int main(void){ printf("Father process spawned (%d).\n", getpid()); sleep(5); if(fork() == 0){ printf("Child process spawned (%d => %d).\n", getppid(), getpid()); sleep(15); printf("Child process exiting (%d => %d).\n", getppid(), getpid()); exit(0); } sleep(5); printf(stdout, "Father process exiting (%d).\n", getpid()); return EXIT_SUCCESS; } Here is the program's output, with the associated ps result every time printf talks: $ ./test & Father process spawned (435). $ ps -ef | grep test myuser 435 392 tty1 ./test Child process spawned (435 => 436). $ ps -ef | grep test myuser 435 392 tty1 ./test myuser 436 435 tty1 ./test Father process exiting (435). $ ps -ef | grep test myuser 436 1 tty1 ./test Child process exiting (436). Now, as you can see, this behaves quite as I would have expected it to. The orphan process (436) is given back to init (1) until it dies. However, is there any UNIX-based system on which this behaviour does not apply by default? Is there any system on which the death of a process immediately triggers the death of all its children? |
I have a really fast computer, so resources isn't an issue, but what I want is to be able to chunkload my VANILLA world from a SMP / bukkit /etc., but bukkit's download pages have been taken down, so probably not bukkit. I just want to load my vanilla farms (Mob farm, sugar cane farm) and not have issues. | I have built an iron farm somewhere far away from my actual spawn chunks in my single player world. In hindsight, this was a dumb idea, but I can't exactly change it anymore. I'd like to keep the thing running all the time, so I'm looking for a way to keep the chunks loaded. I'm running minecraft 1.12.1, is it possible at the moment? I have looked at some chunk loader mods, but chicken chunk loader hasn't been updated yet, and the others simply didn't work. I have tried moving the spawn chunks, but that hasn't done anything either. Edit: I have worked this out with IronAnvil, and it ended up being a render setting in optifine which didn't load them correctly somehow. It has been working fine after I reset my optifine settings to default. |
I currently have two partitions on one hard drive. Windows 7 is installed on partition C, and Ubuntu is installed on partition D. I wish to format the Windows Partition and replace windows 7 with windows 8.1. Ubuntu wasn't installed with Wubi. Will Ubuntu be ok ? | I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu. How can I get Ubuntu back? |
The time command is very useful for checking how much time it takes for a piece of code that I develop to run... However, I'd like to have a way to check the memory consumption of the codes that I develop too, regardless of the language that I use. So, if it's bash, python, or node.js... I'd like to have a way of checking how much RAM memory I used on the code, just so I can get more aware of what I'm doing avoiding memory duplication and stuff like that. Is there any command line that I can use for checking the amount of memory that a script that I create consumes? | How do I measure the peak memory of an application running on Linux? I run this app in batch so I cannot use RSS since, it reports the current memory. I need the peak memory that the application has used to be reported at the end. The VmPeak is not a solution either, since it reports the allocated memory and also does not calculates from the real Ram but also from the Hard Disk. |
(e.g. on this site.) This omission hides the alterations that the site makes automatically and silently upon submission e.g. . | It would be really swell if the question title was included right above the preview of the body of the question. Every so often, I'll be asking about something and the very act of composing a good question helps me better refine the problem. I go back and forth between SO and my workspace testing other possibilities and working on getting the best SSCCE. As I'm going back and forth updating the question, I'm constantly looking down at the preview, making sure everything's just right. Once it is, I hit submit and see: Plz halp me Porblem with issue That is followed by a brilliant question that should have been titled something like How can I reduce manifold wear when using third-party flanges? This is exacerbated by the dupe suggestions. For a question of any length, the title I entered won't even be on screen by the time I'm near posting. Even when it is, it's easy to lose it up there as it's literally the smallest text on the top half of the page. Thankfully I can edit to go fix things, but it would be easier to just get it right the first time. I know that improving the quality of titles around here is of keen interest, and this seems like an easy change that wouldn't bother anyone. Thoughts? Update: Seeing how there's continuing furor over , showing askers their title with the automatic edits applied might help a lot. Some people will post "Question title broken?" questions here on meta, but those are the people whose titles are currently being broken without them noticing. Hopefully everyone else will get the hint and write better titles. (There could even be a link to the policy when automatic edits are applied, but that starts to sound like real work to add.) |
I understand that electromagnetic waves are caused by the oscillation of electric and magnetic fields. But how? Are there magnetic and electric fields in air, or in vacuum? How does this oscillation form a wave? Sorry, I am a new at this site, please simply put you answer so that I can understand. | This is perhaps a total newbie question, and I will try to formulate it the best I can, so here it goes. How does an electromagnetic wave travel through for example, the vacuum of space? I usually see that waves are explained using analogies with water, pieces of rope, the strings of a guitar, etc, but it seems to me that all those waves need a medium to propagate. In fact, from my point of view, in those examples the wave as a "thing" does not exist, it's just the medium that moves (involuntary reference to The Matrix, sorry). But in space there is no medium, so how does a wave travel? Are there free particles of some sort in this "vacuum" or something? I believe , so supposedly there isn't a medium for the wave to travel through. Moreover, I've seen other answers that describe light as a perturbation of the electromagnetic field, but isn't the existence of the field, potential until disturbed? How can it travel through something it does not exist until it's disturbed by the traveling light in the first place? (this last sentence is probably a big misconception by me). |
When I watched a Youtube video in fullscreen it worked fine, but when I turned back from fullscreen to normal, the screen was frozen and I was unable to type anything from my keyboard. I restarted my machine to escape this issue. However, when I see video from videos app or vlc on fullscreen and come back, nothing froze. I searched, and found some things relating to Chrome or flash, but I found nothing that helped me. My current system is Ubuntu 16.04, Intel® Core™ i5-3230M CPU @ 2.60GHz × 4, 8GB Ram, and Intel HD 4000. EDIT The issue happened when I upgraded OpenGL & Mesa. I tried downgrading but the issue wasn't gone. So I must reinstall Ubuntu. | All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an In what order should I try various solutions before deciding to pull the power plug? What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow? |
I need a helper class with functions which are useful everywhere in my program. Ideally, I wanted a file with a single namespace like below which I can include anywhere in my program: namespace myhelpers{ int func(){ //function with implementation in one file. } } This doesn't work because I can't have multiple definitions of the function, so I separated into .h and .cpp and still get errors. Code below: myhelpers.h #ifndef MYHELPERS #define MYHELPERS #include <vector> class myhelpers { public: template <class M> static std::vector<M> func1(double i); }; #endif myhelpers.cpp #include "myhelpers.h" template<class M> // <--making this function a non-template function fixes the error. std::vector<M> myhelpers::func1(double i ) { return std::vector<double>(5); }; main.cpp #include "someclass.h" int main() { // also want to use my helpers here. } someclass.cpp #include "myhelpers.h" #include "someclass.h" int someclass::func(int i) { myhelpers::func1<double>(10.0); return 1; } someclass.h class someclass { int func(int i); }; I get this linker error: Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol "public: static class std::vector<double,class std::allocator > __cdecl myhelpers::func1(double)" (??$func1@N@myhelpers@@SA?AV?$vector@NV?$allocator@N@std@@@std@@N@Z) referenced in function "private: int __thiscall someclass::func(int)" (?func@someclass@@AAEHH@Z) directory/someclass.obj 1 If I remove the template from the myhelpers function this linker error disappears, I don't see how this template function changes fixes the error, but I need the templates in my helper functions. I've spent hours looking online for the best way to have a helper class like this but can't find a good answer. Thanks. | Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) |
Essentially, we have "[singular subject] was/were [plural object]." Which is correct? "What mattered was my determination and effort." "What mattered were my determination and effort." I understand that "my determination and efforts" can be replaced with a singular adjective (e.g. "What mattered was important."). This makes me think "was" is correct. However, "determination" and "effort" are two words. In the above sentence, "are two words" is correct instead of "is two words", which leads me to believe that "were" is correct. Maybe the fact that "determination" and "effort" are not quantifiable is making the singular choice sound more "right" than the plural choice or vice versa. | I can't figure out if the below sentence should use “was” or “were”, since I'm not sure what the subject of the sentence is. Is the sentence incomplete? How do I handle this kind of sentence, where no nouns or pronouns are present? Knowing how to jump and being able to run was / were crucial during my high jump career. |
I have been giving the following question Consider the following problem with alternative constraints: max $2x_1-79x_2$ subject to $0\le x_1\le 20, 0\le x_2 \le 30$ and at least one of the following inequalities holds: $-2x_1+3x_2\ge0$ (1) $5x_1-4x_2\ge0$ (2) $7x_1+8x_2\le40$ (3) Formulate this problem as an integer programming problem. My answer to this is max $2x_1-79x_2$ subject to $0\le x_1\le 20, 0\le x_2 \le 30$ $2x_1-3x_2\le M_1 (1-y_1)$ $4x_2-5x_1\le M_2(1-y_2)$ $7x_1+8x_2-40\le M_3 (1-y_3)$ $\sum^3_{j=1}y_j\ge1$ $y_j\in \{0,1\}$ for $j=1,2,3$ Choose $M_j$ so ignored constraints will not be binding. Is this an acceptable answer? Have I made any mistakes? If yes, where abouts? Thank you:) | Formulate the following Integer Program considering alternative constraints \begin{align}\max \qquad &2x-79y\\[0.2cm]\text{ subject to}\qquad& 0\le x\le 20 \, \text{ and }\, 0\le y\le 30\end{align} and at least one of the following inequalities holds: \begin{align}-2x+3y&\ge 0\\[0.2cm]5x-4y&\ge0\\[0.2cm]7x+8y&\le40\end{align} |
I have a function $ \frac{x+1}{x^2-3x+4} $ which I've decomposed into $ \frac{x}{x^2-3x+4} + \frac{1}{x^2-3x+4} $. By using the definitions of even and odd functions, I know that x is an odd function, $ x^2-3x+4 $ is neither even nor odd, and 1 is a constant and constants are considered even. so my question is: is an odd function over a function neither even nor odd, still odd? Same question from an a constant (even?) function. Thank you for your help! Also not sure if it's relevant, but for $ x^2-3x+4 $ we obtain non-real roots, and it is also worth noting that $ \frac{x}{x^2-3x+4} $ is zero when $ x=0 $. though $ x^2-3x+4 $ is always greater than roughly $ ~1.6 $. | I have been given the task to rewrite a function as a sum of an even and an odd function. But when I went to analyze the parts of the original function I noticed that one part was neither even nor odd. The original function was: $g(x) = (x + 1) / (x^2 - 3x + 4$) After analyzing I realized that when using f(-x) to determine symmetry it produced a 'neither' result. How would I go about writing a function that is neither even nor odd as an even function. (It would have to be an even function as the (x+1) part of the original function is odd and since I need to write it as a sum of even and odd, the denominator would need to be even. |
I'm not a technie; I don't know anything about coding. I'm a somewhat basic computer user. However, now that Microsoft has phased out support for Windows XP, I HAVE to change OSs. However, I don't have the money for buying a new computer, so I read some articles, and I learned about Lubuntu: a supposedly lightweight XP-esque OS. But here's the thing: I don't know how to install Lubuntu. I also don't want to dual-boot, so I have to replace XP with the new OS. And although I have a 4 GiB flashdrive, I don't have a burnable or writable CD. So, how do I do this...? I'm not experienced in this field... I wish there was an installer wizard or whatever that could do all that for me: eliminate XP from my computer, then install Lubuntu onto it. Please help me? Any help at ALL would be GREATLY appreciated... Thank you. Computer Specs: Microsoft Windows XP Professional Ver. 2002, SP3 (32-bit) Btw, I checked my Hard Drive space and RAM space: I do have the min. requirements covered. | I would like to see a full how-to guide on how to install Ubuntu. |
I just started writing in JavaScript a few hours ago and I've seen some code use: var a = function() function FunctionName() | I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent. The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not. The two ways are: var functionOne = function() { // Some code }; function functionTwo() { // Some code } What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other? |
I was working with an exercise on FCC and got confused by RegEx's capture group behaviors. I would appreciate if an expert could help me clear my confusion. Why did not fixRegex2 works? let str = "one two three"; let fixRegex = /(\w+)\s(\w+)\s(\w+)/; let fixRegex2 = /(\w+)(\s)\1\2\1/; console.log(str.match(fixRegex));//works ok, return "one two three" console.log(str.match(fixRegex2));//no match at all! I am pretty sure fixRegex2 would work since I did something similar in the past and it worked: let repeatNum = "42 42 42"; let reRegex = /(\d+)(\s)\1\2\1/; console.log(repeatNum.match(reRegex));// works ok, return "42 42 42" | I don't really understand regular expressions. Can you explain them to me in an easy-to-follow manner? If there are any online tools or books, could you also link to them? |
Why does Ubuntu keep showing this icon? Info: Ubuntu 20.04 GNOME dash-to-panel used | I have a Dell XPS 15 9570 with a Dell WD19 Dock and on this Dock I have 2 Monitors. The internal Monitor of the Notebook is off but the Lid is open. I have installed Ubuntu 20.04 LTS. Everything is working fine, except the following Icon in the Top bar is blinking (Appearing and Disappearing). I don´t know what that is. It looks like a cord but the Notebook charging as expected. It blinks sometimes in a faster and another Time in a slower speed -> Something between 2 - 5 Seconds. Appearing: Disappearing: The Dock are the complete Time connected. Exact behavior: It's blinking when I have connected my Laptop to the WD19 Docking Station. It's not blinking when I connect my Laptop ONLY to the normal Power Cord or have NO connection to Dock and Power Cord. But it's also blinking when I connect to the Docking Station AND the normal Power Cord. Do anyone knows what this means? And how can I stop this? It's really annoying when some icons jumping all the time left and right! Here I found some logs. Maybe this is the Event: |
Good night, I've been studying a bit more about LaTeX, more specifically about TikZ and how to create images with it and I've come across this image on the manual: The image above is on the 90th page of the manual (V 2.10). The image above got my interest because I might teach statistics next semester and this could be a different way of showing data to my students but I didn't find it's code in the manual so I could study it (I'm afraid of having missed it though). How can I draw something similar to that in TikZ? Thanks in advance. | I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks. |
Please help :/ I have an ASUS x550c laptop with a MediaTek MT7630e wifi card. The wired internet works, but wireless doesn't. I have tried all the online solutions and none of them work. Since I need this laptop for work I am very close to giving up and going back to Windows :/ I've also seen this bug, doesn't give me encouragement that it's been sitting unresolved like this for the last 9 months: What I am asking for here: Are there any news on this bug or is there anybody that has a similar setup that managed to get wireless working on their laptop? Is there an alternative, like a WiFi USB stick or an adapter that can be plugged in into the ethernet port (and that works with Ubuntu)? I am willing to try anything as long as it doesn't entail having access to routers (I am imagining a scenario in a hotel where this is not possible) Is there a Linux distro that would work with this setup/card? (not sure if this is ok to ask here but I am desperate) A few symptoms: "rfkill list all" doesn't show anything after I did the first answer from here: I bought this USB stick: and since it doesn't have Linux drivers (Hardware B1) I downloaded ndiswrapper and tried installing XP drivers through that - didn't work. Fn+F2 button doesn't work, WiFi lamp doesn't turn on Thanks for your time!! | It worked with the pre-installed Ubuntu, but after re-installing Ubuntu dual-boot with Windows 8.1, the WiFi is not working. Is there a driver for this adapter that will work on Ubuntu 12.04? |
Why int array[1000][1000] is memory issue in C program when it is declared in main method instead of global declaration? | The following code is generating a stack overflow error for me int main(int argc, char* argv[]) { int sieve[2000000]; return 0; } How do I get around this? I am using Turbo C++ but would like to keep my code in C EDIT: Thanks for the advice. The code above was only for example, I actually declare the array in a function and not in sub main. Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes. Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable. |
I'm new to this site. Although I had made my account almost 6 months ago, I've started using stackexchange only very recently (about 10-15 days). I'm active particularly on stackexchange mathematics. The reason why I'm writing this is I want to know in what ways can a person lose reputation on any stackexchange website? I had a reputation of 717 on stackexchange mathematics but the moment I refreshed the page I lost about 20 points and my reputation came down to 697. No-one has downvoted any of my posts. I do not have any problem with losing reputation but I should like to know where I lost 20 points without any reason? | If I am concerned that my reputation score is incorrect, how can I audit it, or get a report of a detailed breakdown of my reputation? |
I want to launch different activities depending on the values of 2 EditText fields on the start activity, one should start for admins, the other for all other users. I think you 'll understand better seeing the code I 've done so far: package com.example.xxx; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.Button; import android.widget.EditText; import android.view.View; public class MainScreenActivity extends Activity { EditText USERNAME, PASSWORD; String username, password; Button btnLogin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_login); USERNAME = (EditText) findViewById(R.id.username); PASSWORD = (EditText) findViewById(R.id.password); // Button btnLogin = (Button) findViewById(R.id.btnLogin); // login click event btnLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { // Launching next activity if (USERNAME="admin" && PASSWORD="1234") { Intent i = new Intent(getApplicationContext(), admin.class); startActivity(i); } else { Intent i = new Intent(getApplicationContext(), user_form.class); startActivity(i); } } }); } } The error is at the if statement, on PASSWORD="1234" says "Incompatible operand types EditText and String". I also tried password="1234" and password.toString="1234" but no luck. I'm not even sure if I'm to use 'USERNAME' and 'PASSWORD' or 'username' and 'password'. How can I make this work? EDIT: Ok now the code is correct, having if (USERNAME.getText().equals("admin") && PASSWORD.getText().equals("1234")), but the application always opens the user_form activity, and not the admin, even though I input the specific values. Where is the mistake? | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
Problem: Suppose that for every $n\in\mathbb{N}$, $a_n\in\mathbb{R}$ and $a_n\ge 0$. Given that $$\sum_0^\infty a_n$$ converges, show that $$\sum_1^\infty \frac{\sqrt{a_n}}{n} $$ converges. Source: Rudin, Principles of Mathematical Analysis, Chapter 3, Exercise 7. | Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$. For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent. Not to sure if this is correct, any help would be much appreciated, many thanks. |
When starting out at level 1 everyone gets a single BAB, indicating they can only do 1 attack. Once a characters BAB reaches 6, they get another BAB at 1. Now, does that mean that a level 1 rogue with TWF gets 2 hits (one with each hand) or do they get more, then with the 2nd BAB at level 6 they get 3 attacks or...? TWF is confusing me and the text isn't helping. Any clarification would be great! | I'm quite confused about attacking with two weapons in both hands and wondering what is required to be able to do to (in Pathfinder). 1. Base Attack Bonus Looking at the base attack bonus tables for different classes (e.g. the ) it seems like up to +5 you get only one attack per full action but starting from base-attack-bonus of +6 you get a second attack with +1. 2. Feats There is a feat . The existence of the feat sounds like you could not do two-weapon-fighting without it. However, in the description of "normal" it says: If you wield a second weapon in your off hand, you can get one extra attack per round with that weapon. When fighting in this way you suffer a –6 penalty with your regular attack or attacks with your primary hand and a –10 penalty to the attack with your off hand. If your off-hand weapon is light, the penalties are reduced by 2 each. 3. Core Rulebook Chapter about combat If I understand the it says that you need a full-round action do attack with both weapons in two hands. So how do these things interact? Can I only attack with my off-hand weapon if my base-attack-bonus is high enough that I get second one with +1? If not, how does the "multiple attacks from high base-attack-bonus" interact with dual-wielding? Assuming I reached a state of base-attack-bonus with +11/+6/+1 and have a full-round action to attack. Does that mean I can either attack with my primary weapon three times or use the primary weapon and off-hand weapon to attack only twice? Why would I then ever choose dual-wielding? Or can I attack three times with both weapons (leading to a total of 6 attacks with heavy malus) Or would I get 3 attacks with the primary weapon + 1 attack with the off-hand weapon? If so, what attack bonus do I have to use for each of the attacks? |
Say I want to find meta stackexchange. Is there any conspicuous link from main site to it's meta? Is there such feature already? I usually found that on google. | How do you expect users to: Know that a site's meta-site exists (and what it's for)? Find the hyperlink to the meta-site? I know it exists, of course, and how to get there; I'm wondering how (or even whether) you expect new or naive users to do that. I think there isn't a link to Meta from the main site, am I right (except one link in the "list of all 171 Stack Exchange sites" drop-down menu on the toolbar)? Sometimes I tell people to post a question on Meta instead of on the main site -- I don't realise that they may not know that Meta exists, and that if they do (because they've been there before) they don't know how to get there (because they haven't yet investigated everything on the toolbar). |
I have this warning each time I run apt update on Ubuntu 20.04.2 : N: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'http://miktex.org/download/ubuntu focal InRelease' doesn't support architecture 'i386' I know that I need the i386 arch for certain packages, but I would like to know if it is possible to prevent apt to scan the i386 release of the miktex Is it possible to do that? | I am trying to use a file repository for updating linux/ubuntu on a non-connected machine. The architecture for this machine (uname -a): x86_64 GNU/Linux The results of dpkg --printarchitecture are: amd64 It is a Trusty Tahr amd64 machine, and it specifically says this, for example, in the aptitude sources.list file. Also, the "About this Computer" in ubuntu specifically says the machine is 64-bit. So, I installed the amd64 packages on the machine. However, when I try to do apt-get update, I get errors such as: W: Failed to fetch file:/var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages File not found So, in other words, even though it is a 64-bit machine, apt is inexplicably trying to read i386 packages. Why is it doing this and how can I make it use the 64-bit packages? Note that there is nothing in sources.list that specifies i386. The only uncommented line in the sources.list file is: deb file:///var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu trusty main restricted universe multiverse |
I just registered an account at Stack Exchange.com. So far I only joined two network sites (meta, and cross validated). I somehow understand how the login system works for the network sites. What I don't get is why I get automatically logged in although I explicitly logged out of all sites. It goes like this: I log out explicitly of any site and of Stack Exchange.com. When I now click on 'log in' at Stack Exchange.com and choose 'log in with Stack Exchange account' it automatically logs in without asking for my password. The only thing I can do is to delete my browser history. I find this very troublesome, since this makes using a shared or public computer (which I do from time to time) very unsafe. Does anyone know what's up with this? | Every time I log in from a shared computer on Stack Overflow, I am not able to log out. Even if I click log out, it takes me to the home page and when I click the login link it automatically logs me back in. I neither allow my browser to save passwords or nor to remember me. I get this message each time Welcome back user. Click here to refresh the page Each time I have to clear all my cookies from my browser to log out from it. Why does this happen? |
I have a huge number of files that were copied into an old OS X 10.6 server. Problem is there are a large number that came over with a time last opened but no create or modified dates. Is there a basic script to go through and change the create date to the last opened date? | Could you please let me know how I can change the creation date of a file in Lion. I realise there is the touch-t command but that does not work in Lion. A couple of people have mentioned another way, but I think they've written the solution in "coder" language rather than layman language - would someone be able to answer it in a way a layman can execute? Many thanks for your help. |
I know that in general if the correlation of two random variables is zero, it is always true that two variables are independent, and it is possible to provide some examples which are dependent with zero correlation. However, all examples that I have seen, use nonlinear relation between two variables. Can we say if two random variables have zero correlation will be independent (not using nonlinear relation but linear model)? | If two variables have 0 correlation, why are they not necessarily independent? Are zero correlated variables independent under special circumstances ? If possible, I am looking for an intuitive explanation, not a highly technical one. |
So I'm installing a version of Linux Mint. I would like to edit the programs and files that are included in the ISO, because there is not always internet access. For example, a very specific wallpaper, as well as Mine-craft, and Java (there's more, but this is where I'm leaving this). If this is impossible, how would I make a similar changes with a Distro builder? | I am looking for a archive manager that will allow me to look into the contents without needing to mount it and also to add or remove contents by drag and drop style. The Windows' equivalent would be PowerISO, MagicISO or even 7-zip. Many people suggested mounting and then copying into another directory, add/remove files, and make image again. Is that the only way? |
I am confused. I thought Spiderman's ability to shoot web was through biologically built-in nodules in his wrists due to the mutations that happened when he was bitten by the spider. But then in MCU films and the most recent Spider-verse film by Sony, we see that he's using artificial shooters on his wrists. So which is more original to Spider-canon? Is his ability to shoot/produce web supposed to be biological as part of the mutation? Or was it always artificial? | When Spider-Man spurts web from his wrist to swing through the streets, does he use a cartridge fitted in his wrist, or is that a secretion of his body due to the radioactive spider bite? In the Spider-Man movie, his wrist looks like it’s secreting the web, but in the Spider-Man game we have to collect cartridges to refill the web. Also in the game, even if the cartridge is not filled, some minimum amount of web is still there. Also in the latest movie, The Amazing Spider-Man, I think he uses a web cartridge fitted in the wrist. |
I am using StringBuilder to show comma between records, but also getting comma at the end of Last Record How to control on this ? I don't like to see comma at the end of last record - because it's useless for (int i = 0; i < arrayList.size(); i++) { String name = arrayList.get(i).getName(); int price = arrayList.get(i).getPrice(); stringBuilder.append(strName); stringBuilder.append(" - "+price+","); } stringFinal = stringBuilder.toString(); | While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this: public String appendWithDelimiter( String original, String addition, String delimiter ) { if ( original.equals( "" ) ) { return addition; } else { return original + delimiter + addition; } } String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," ); I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization. In Ruby, I can do something like this instead, which feels much more elegant: parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(","); But since Java lacks a join command, I couldn't figure out anything equivalent. So, what's the best way to do this in Java? |
When I installed Windows 10, I created edited the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization registry key by adding a NoLockScreen DWORD value and set it to 1. This had the effect of disabling the sliding panel on the lock screen, so that when my computer booted up or I locked my session, I would be presented with the password entry screen immediately (without having to press a key to slide the panel out of the way). Unfortunately, the recent Anniversary Update seems to have undone this. I've tried deleting the value and re-adding it, but the lock screen is still present. Is there some other way to remove the sliding-panel over the lock screen in Windows 10 which works for versions after the Anniversary Update? I don't seem to have the local group policy editor in my version of Windows 10 Professional (possibly because I have the 32-bit operating system?). | The Windows 10 "anniversary update" is coming out tomorrow and according to some the group policy to disable the lock screen is no longer effective on anything below the Enterprise edition. I'd like to know what options/workarounds are left to disable this nonsense on Pro editions. Regards. |
Problem: Find all values of $b$ for which the equations $1988x^2 + bx + 8891 = 0$ and $8891x^2 + bx + 1988 = 0$ have a common root. What I have done so far: Let the roots of the first quadratic be $r_1$ and $r_2$, and the roots of the second quadratic be $s_1$ and $s_2$. We have the following equations. $r_1+r_2 = \frac{-b}{1988}$ $r_1r_2=\frac{8891}{1988}$ $s_1+s_2 = \frac{-b}{8891}$ $s_1s_2 = \frac{1988}{8891}$ Without loss of generality, we can let $r_1=s_1$, but I am not sure how to solve these equations after that. Tips? | $1988x^2 + bx +8991$ and $8991x^2 +bx + 1988$ have a common root, what are the possible values of b? I tried getting solutions using the quadratic formula and interchanged the $\pm$ to get the values of b but it seemed looked like i was bashing it and the numbers were getting too high. What is the proper approach to this problem? |
This is a story I read back in the late 1990's or early 2000's. It was a sci-fi story and the plot was centered in a city. I believe it was on Earth. There were different tribes of Aliens that fought each other through proxy. Each tribe had augmented humans in different ways and used the humans to fight each other. I believe there were also robots or cyborgs of some sort. All of the humans had trackers in their wrists under their tendons. In order to escape, some of them cut the trackers out with a knife. At least one person was able to use a bit of psychic ability where they visualized the tracker being outside of their wrist and then it became so. That's all I can recall. | I read a YA novel in the early 2000s that I think takes place on Earth some time in the future. The human race has been enslaved by some other race, possibly aliens. If I remember correctly, humans were kept as slaves for some purpose and then exterminated at age 16, and I think some girls were kept to breed. I remember scenes of a band of teenagers walking around sewers fighting these aliens who bled a blue "ichor." The only thing I distinctly remember about the book was that it was the first place I saw the word "ichor." This is a pretty sorry description; but does anyone have a clue what this book was? |
I have gas powered hot water heat in a home I purchased. When I tested it this morning I got a lot of whistling and other noises that subsided for the most part. After the heat had run for 20-30 minutes, I checked it radiator in the house. All the radiators were at least warm, with the exception of one of the radiators upstairs. What could cause this single radiator to not get warm at all? I noticed slight temperature variances between the other radiators, but this one seemed to not be warm at all. I assume it should get warm if the hot water is flowing through it, and I also assume the hot water must be flowing through it to complete the circuit. So, what gives? | Almost all of the radiators (forced water) in my house heat up fine. However, a single radiator needs regular bleeding (~1/day) in order to heat. Note, this radiator is not at the highest point in the house (it's a split level; I'd say it's around 3/4 of the way up), and radiators higher up are plenty hot. Also, there no obvious water/corrosion stains around this radiator. What might be causing this problem, and how do I fix it? |
In the Star Wars universe can droids be Force-sensitive? Were there any droids that could use Force powers? Is it possible in the Star Wars universe for a droid to become Force-sensitive? What about androids if not droids? I think biological material is needed. | In the films, I only saw organic life forms become Jedi or Sith. Were there ever any droids who could use the Force? Or is that impossible because of the ? |
Let's say we have a Foo class and we want to instantiate a lists of foos, which we can do as follows: foo_list = [Foo()] * 3 Now what if we do foo_list[0].x = 5? This statement will set the attribute x to all of the instances inside the list!!! When I found this it blew my mind. The problem is that when we create a list like that, apparently python will create the Foo instance first, then the list instance, and then append the same object to it 3 times, but I really would expect it to do something like this: foo_list = [Foo() for i in range(3)] Wouldn't you too? Well, now I know that definitely this syntactic sugar can't be used as I wanted to use it, but then, what is it used for? The only thing I can think of is to create a list with an initial size like this: list = [None] * 5, and that doesn't make much sense to me in the case of python. Does this syntax have any other really useful use case? | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
I'm trying to calculate the force of a man falling from a bridge into water below. Thus far I've calculated everything except for the force he would experience hitting the water. Would I need to do some estimation to figure it out or what? I'm a little confused with where to go from here. The final velocity of the body would be 40.07 m/s and the mass of the body is 78 kg. I imagine that's all you would need to be able to find the force since I calculated everything else already. | I'm calculating the force of a body hitting water from a high height. So far I've figured out the velocity at the time of collisions would be 40 m/s. The body is 78 kg. I seem to need the time it takes for it to accelerate to a stop after hitting the water but I can't find any concrete numbers for that, what would be a good estimation? |
Prove $$\prod_{n=1}^\infty\cos\frac{x}{2^n}=\frac{\sin x}{x},x\neq0$$ This equation may be famous, but I have no idea how to start. I suppose it is related to another eqution: (Euler)And how can I prove the $follwing$ eqution? $$\sin x=x(1-\frac{x^2}{\pi^2})(1-\frac{x^2}{2^2\pi^2})\cdots=x\prod_{n=1}^\infty (1-\frac{n^2}{2^2\pi^2})$$ I can't find the relation of the two. Maybe I am stuck in a wrong way,thanks for your help. | This limit seemed quite unusual to me as there aren't any intermediate forms or series expansions which are generally used in limits. Stuck on this for a while now .Here's how it goes : $$ \lim \limits_{n \to \infty} \left[\cos\left(x \over 2\right)\cos\left(x \over 4\right) \cos\left(x \over 8\right)\ \cdots\ \cos\left(x \over 2^{n}\right)\right] $$ |
I am trying to prove this (it looks true to me) : Let $A,B $ be two sets. If there is a surjection $A\to B $ and a surjection $B\to A$ then $A $ and $B $ are in bijection. I showed that is it equivalent to the following statement : If there is an injection $A\to B $ and an injection $B\to A$ then $A $ and $B $ are in bijection. But I am stuck, I don't see how to prove either. | Let $A,B$ be two sets. The states that if there is an injection $f\colon A\to B$ and an injection $g\colon B\to A$, then there exists a bijection $h\colon A\to B$. I was wondering whether the following statements are true (maybe by using the AC if necessary): Suppose $f \colon A\to B$ and $g\colon B\to A$ are both surjective, does this imply that there is a bijection between $A$ and $B$. Suppose either $f\colon A\to B$ or $g\colon A\to B$ is surjective and the other one injective, does this imply that there is a bijection between $A$ and $B$. |
I have a content page say content type "spl content" which has few related pages(added using field entity reference). when i create page in admin I can link multiple pages to my page using entity reference which i call in this specific case as related pages. I have custom template for content type "spl content", here I get all the node ids of related pages but I want to access further details of the related pages. Is it possible in twig template having path themes/custom/{themename}/templates/node--spl-content.html.twig to fetch details of related node? I do get node ids of related pages by looping node.field_related_pages {% for item in node.field_related_pages %} {{item.entity.id}} {% endfor %} item.entity.id prints the node id of every related page. I need to have body content and other field of related page in this twig. Any help is appreciated. | I'm trying to figure how I can get all the values inside an entity reference field As shown in this image, I have an entity field called Target Participants(field_program_participants) with multiple values. I have tried to output the values using node.field_program_participants.entity.label, but it only outputs one value. How can I output all the values inside the field |
I want to prove that $ e^x \ge 1+x $ for all $ x \in R $ , using Mean Value Theorem it can be proved for $ x \gt 0 $, and equality holds for $ x = 0$, however I can't solve it for $ x \lt 0 $ | The elementary but very useful inequality that $1+x \le e^x$ for all real $x$ has a number of different proofs, some of which can be found online. But is there a particularly slick, intuitive or canonical proof? I would ideally like a proof which fits into a few lines, is accessible to students with limited calculus experience, and does not involve too much analysis of different cases. |
I have problems with filtering LiDAR data within geoprocessing tools and python scripts. It simply doesn't work despite everyting looks correct. Filtering works only when I apply filter in properties of LAS dataset layer. Here is an example of code which I'm using. I'm trying to filter only buildings class = 6. Sadly the result does not correspond to filter class values. In this example, result includes all classes unless I manualy filter LAS dataset in layer properties. Anyone had this problem? # Process: Make LAS Dataset Layer lasDatasetLayer = arcpy.MakeLasDatasetLayer_management(inputLasd, "LasDatasetLayer", 6, "", "false", "true", "true", "false", "") # Process: LAS Dataset to Raster (2) rasterFromLas = arcpy.LasDatasetToRaster_conversion(lasDatasetLayer, "rasterFromLas", "ELEVATION", "BINNING AVERAGE NONE", "FLOAT", "CELLSIZE", "1", "1") I've read similar Q&As but they don't mention MakeLasDatasetLayer tool problems: | I am trying to create a Digital Earth Model (DEM) using ArcPy under ArcGIS Pro 2, but I am running into some problems. I can generate a DEM within ArcGIS Pro by selecting only the ground points under LAS files in the LAS dataset properties, but when I try to run the same code within ArcPy, it generates a DEM using all the points. Any ideas how you select the return point type in ArcPy? Here is the code that I have used. arcpy.conversion.LasDatasetToRaster(lasd, "Test_arcpy_dem", "ELEVATION", "BINNING AVERAGE LINEAR", "FLOAT", "CELLSIZE", 10, 1) As I said, this generates two different outputs, depending if I am in ArcGIS Pro or not. |
I have an exercise in general topology as follows: Let $f:X\rightarrow Y$ be a map between topological spaces. Assume that $X=\cup _{i\in I} X_i$ with $X_i$ closed subsets of $X$, and $f|_{X_i}: X_i\rightarrow Y$ is continuous for every $i$. We can prove that if $I$ is finite, then $f$ is continuous on $X$. However, do we have a counter-example when $I$ is countable? Thanks for your help! | The gluing lemma for closed sets states: Given a finite closed cover $\{A_i\}$ of a topological space $X$, together with continuous maps $\{f_i : A_i \to Y\}$ into some other topological space $Y$, there exists a unique continuous map $f : X \to Y$ whose restriction to each $A_i$ is equal to $f_i$. Question: What is a good and simple counter-example when the gluing lemma fails in the case that $\{A_i\}$ is infinite, but countably so. My attempt: I have only been able find a silly counter-example: let $\{A_\alpha\}$ be the collection of all points of $X = [0,1] \subset \mathbb{R}$, and let $f_\alpha = 0$ for all $\alpha$ except for $\alpha = \alpha_0$, for which $A_{\alpha_0} = \{0\}$ and $f_{\alpha_0} = 1$. |
The set $\mathbb{N}$ is the set of nonnegative integers. Let $ f : \Bbb{N} \rightarrow \Bbb{Q}$ be defined such that 1.) $f(2n) = \dfrac{1}{f(n)+1}$ for all integers $n>0$, and 2.) $f(2n + 1 ) = f(n)+1$ for all $n\in\Bbb{N}$. If $f(0)=0$, then determine the value of $n\in\mathbb{N}$ such that $f(n)=\dfrac{14}{5}$. | Let $f:\mathbb{N} \to \mathbb{Q}^+$ defined as follows : $$\begin{cases} f(0) = 0 \\ f(2n) = \dfrac{1}{f(n)+1} \\ f(2n+1) = f(n)+1 \end{cases}\,.$$ It is asked to prove the injectivity then the surjectivity of $f$. After examining first values taken by $f$, I proved by induction that $f(2^k)=\dfrac{F_k}{F_{k+1}}$ where $(F_n)$ is the fibonacci sequence. Also one notes that if $m$ and $n$ have different parity then we can't have $f(m) = f(n)$ since $f(2\mathbb{N}) \subset (0,1)$ and $f(2\mathbb{N}+1) \subset [1,+\infty)$. Any ideas on how to finish the proof of injectivity and any thoughts about surjectivity are welcome. Thanks |
Suppose that $W_1$ and $W_2$ are i.i.d. and $P(W_i>x)=x^{-1/2}$ and $x$ is greater than or equal to $1$ and $i=1,2.$ How do you show that $P(W_1+W_2>x)=(2\sqrt{x-1})/x$? I know it involves calculus either differentiation or integration but I am not sure how to go about it. Any ideas? Also, how do I use this above information for W to show that the value at risk (VAR alpha) is super-additive for all alpha values within 0 and 1 meaning that How do I show that VAR alpha(W1+W2)>VAR alpha(W1)+VAR alpha(W2). Any ideas? | For long time I did not understand why the "sum" of two random variables is , whereas a mixture density function sum of $f(x)$ and $g(x)$ is $p\,f(x)+(1-p)g(x)$; the arithmetic sum and not their convolution. The exact phrase "the sum of two random variables" appears in google 146,000 times, and is elliptical as follows. If one considers an RV to yield a single value, then that single value can be added to another RV single value, which has nothing to do with convolution, at least not directly, all that is is a sum of two numbers. An RV outcome in statistics is however a collection of values and thus a more exact phrase would be something like "the set of coordinated sums of pairs of associated individual values from two RV's is their discrete convolution"...and can be approximated by the convolution of the density functions corresponding to those RV's. Even simpler language: 2 RV's of $n$-samples are in effect two n-dimensional vectors that add as their vector sum. Please show the details of how the sum of two random variables are a convolution and a sum. |
Since you cast the find familiar spell to get a familiar, is the familiar a magical effect? And if that is true, would you be able to target the familiar with the dispel magic spell and get the familiar destroyed/killed/dispelled? Would this then be a good reason to cast find familiar at a higher level? | In D&D 5e, the spell Dispel Magic says Choose one creature, object, or magical effect within range. The rest of the spell description explains that spells "on the target" of a level lower than that at which Dispel Magic was cast automatically end, and those of a higher level require a check. This makes perfect sense when targeting creatures or objects which may have spells on them. But what does it mean to target a magical effect? Does it mean that you can choose to target just one specific ongoing spell effect instead of stripping the whole shebang (clearing a negative spell from an ally with positive spells also in place, or a positive spell from an enemy who is under attack from a negative spell)? Or, is this only for the special case of certain spells (like Imprisonment) which have effects which specifically mention being targeted by Dispel Magic, and since no effect is described otherwise? (This is a literal reading: a spell is a magical effect, but does not have spells on it, so the Dispel Magic effect has nothing to act on.) Or — and I think this is a stretch — can magical effects which are not spells be dispelled by Dispel Magic? If so, what are the mechanics? |
So, these are the questions: $12$. Let $G$ be a nonempty set closed under associative product, which in addition satisfies: a) There exists an $e \in G$ such that $a.e=a$ for all $a \in G.$ b) Give $a\in G$, there exists an element $y(a)\in G$ such that $a.y(a) = e$. Prove that $G$ is a group. I thought that this question is stupid since that's exactly the definition of a group. However, I was stumped after reading problem $13$. Question $13$ goes like this: $13.$ Prove, by an example, that the conclusion of problem $12$ is false if we assume instead: a') There exists an $e \in G$ such that $a.e=a$ for all $a \in G.$ b') Give $a\in G$, there exists an element $y(a)\in G$ such that $y(a).a = e$ . After realising that I'll need to prove that $a.y(a)=y(a).a=e$ in question $12$, I thought: In $12$ b), $a.y(a) = e \Rightarrow (y(a).a).(y(a).a) = (y(a).e).a = y(a).a$. So using $12$ a) $(a.e=a)$, we have $y(a).a = e$. This part is certainly false since the same method proves that $13$ is also a group, and also it could be that $e$ may not be unique in $G$ so I cannot assert that $y(a).a=a$ (Am I correct about this?). So, my question is what do I need to show here to prove that $G$ is a group. Not to ask too much, but I couldn't find any example for question $13$ either. I think that I'll need to find a closed set where $a.e=a$ does not necessarily imply $e.a=a$. But I'm hopeless. | I. Let $G$ be a nonempty set closed under an associative product, which in addition satisfies: (a) There exists an $e\in G$ such that $a\cdot e=a$ for all $a\in G$. (b) Give $a\in G$, there exists an element $a^{-1}\in G$ such that $a\cdot a^{-1}=e$. Prove that $G$ must be a group under this product. II. Prove, by an example, that right indentity element and left inverse does not imply that $G$ is group. My solution: I. Since $G$ is closed set under an associative product, i.e. if $a,b,c\in G$ then $(a\cdot b)\cdot c=a\cdot (b\cdot c)\in G$. Taking $c=e$ we get $(a\cdot b)\cdot e=a\cdot (b\cdot e)=a\cdot b \in G$. We have shown that $\cdot$ is binary operation. Since $a\in G$ then $a^{-1}\in G$ and we have the following identities $$a^{-1}=a^{-1}\cdot e=a^{-1}\cdot (a\cdot a^{-1})=(a^{-1}\cdot a)\cdot a^{-1} $$ Then $$ \begin{align} e &= a^{-1}\cdot (a^{-1})^{-1} \\ &= \left( \left( a^{-1}\cdot a \right) \cdot a^{-1} \right) \cdot \left( a^{-1}\right)^{-1} \\ &= \left( a^{-1}\cdot a \right) \cdot \left( a^{-1}\cdot \left( a^{-1} \right)^{-1} \right) \\ &= \left( a^{-1}\cdot a \right) \cdot e \\ &=a^{-1}\cdot a. \end{align} $$ Thus we have shown that $$ a\cdot a^{-1}=a^{-1}\cdot a=e. $$ Then we see that $$ e\cdot a= \left( a\cdot a^{-1} \right) \cdot a = a \cdot \left( a^{-1} \cdot a \right) = a \cdot e = a. $$ We have shown that for this set $G$ and the associative binary operation assumed to be defined on $G$, the properties of the existence of a two-sided identity element in $G$ and the existence in $G$ of a two-sided inverse for each element of $G$ are satisfied. Therefore $G$ is indeed a group. II. But II indeed is true. Lets take the set $G=\{a,b,e\}$ and define the product $\cdot$ by the following identities: $e\cdot e=a\cdot e=b\cdot e=e$ and $a^{-1}=b, \ b^{-1}=a$ and consider the following multiplication table for our set $G$ $\begin{array}{c | c c c c c} \hline\hline & e & a & b \\ \hline e & e & b & b & \\ a & a & a & e & \\ b & b & e & a & \\ \hline \end{array} $ It's easy to verify that conditions of second problem hold for our $G$, however, $G$ is not group since we can show that $b=a$. Is my reasoning above correct? EDIT: Maybe this is a duplicate but I would like to know if my solution is true since I have solved it by myself. Especiaaly I am interested in the solution of the second problem. |
Let $\alpha$ be an irrational number. There is a well-known result saying that $\{e^{k\alpha \pi i}: k\in \mathbb Z \}$ is dense in $S^1 $. In the of this result, the Pigeonhole Principle can't guarantee that we can always choose $i>j$. So I wonder how we can prove that $\{e^{k\alpha \pi i}: k\in \mathbb N \}$ is dense in $S^1 $ by using that result or modifying its proof($\mathbb N$ is the set of natural numbers). Thanks in advance. | Let $q \in \mathbb C$, $|q|=1$ and $q^n \neq 1, \forall n \in \mathbb N$. Show that $\{q^n: n \in \mathbb N\}$ is dense in $S^1$. My attempt: As $(q^n)$ is limited, there is subsequence $(q^{n_j})$ convergent. So given $\epsilon > 0, \exists j_0 \in \mathbb N, \quad |q^{n_j} - q^{n_k}| < \epsilon, \quad \forall j,k \geq j_0$. Supose that $n_j > n_k$, then $|q^{n_j} - q^{n_k}| = |q^{n_k}||q^{n_j - n_k} - 1| = |q^{n_j - n_k} - 1| < \epsilon, \quad \forall j, k \geq j_0$. So, there is a subsequence of $(q^n)$ that converges to $1$. Using this fact, how can I ensure that for all $w \in S^1$ there is a subsequence of $(q^n)$ that converges to $w$? |
I have some pictures taken with my sony digital camera.They are blurry,Is there any way to fix that? | I have heard quotes which say "If its not good, delete it." I go by that advice, but sometimes you capture some precious moment but you see that photo is slightly blurred because of camera shake. I don't have an IS lens, and it's too late to somehow do it over. What best one can do in post processing to improve the quality of the picture? Ideally, I'd like to use Gimp or Picassa for this. Edit: I came across a video regarding this - |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.