body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
We are trying to send out a mass email for a client of ours through a third party sender and it is always being sent to the spam folder rather than the inbox. I have below the headers from the email. Do you have any thoughts on why it might be being filtered as spam? Or how we might be able to fix it? x-store-info:4r51+eLowCe79NzwdU2kRyU+pBy2R9QCr01wX+2TQb16V+IWYKH89OEXx2kXRCi0YCCbAc2czEzqYF2bH27mAPgHi3rzu7bpgBsHbtZAyLKnNk8fJmBxyu+VguRUNe13q5zZaaanxKw= Authentication-Results: hotmail.com; spf=softfail (sender IP is 64.250.95.18) [email protected]; dkim=none header.d=cgdmcanada.com; x-hmca=fail [email protected] X-SID-PRA: [email protected] X-AUTH-Result: FAIL X-SID-Result: FAIL X-Message-Status: n:n X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtHRD0yO1NDTD00 X-Message-Info: 11chDOWqoTky60iQsYaQEbDMsbZfaHn4uXeEdYJ+hJPs/IZZs8+jCAsGYVfWXZjOH0CIVQtMZgN6eci97N8hFZVMIRvFnbKffwelTwXTo1W1G4O4NpDJy0u1RYUR3/Eg8I879+IgZwjq8NUi6hFsCbgaJ4tlHCzI9/qIYnxslvFwe5kU9IzpYCxXwgvPEsGAo4ciKuRN7XjS74cqqwszN1kev1/vz0rc Received: from mx01.dmtel.ca ([64.250.95.18]) by SNT0-MC1-F52.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4900); Thu, 14 Nov 2013 09:10:27 -0800 Received: from E1_NT (199.115.92-98.ip.mltn.standardbroadband.ca [199.115.92.98]) by mx01.dmtel.ca (8.14.4/8.14.4) with ESMTP id rAEHAQiA009774 for <EMAIL ADDRESS REMOVED>; Thu, 14 Nov 2013 12:10:26 -0500 Message-Id: <[email protected]> From: "Almirall Ltd." <[email protected]> Subject: Introducing NEW Tudorza Genuair To: EMAIL ADDRESS REMOVED Content-Type: multipart/related; boundary="wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT" MIME-Version: 1.0 Date: Thu, 14 Nov 2013 12:11:04 -0500 Return-Path: [email protected] X-OriginalArrivalTime: 14 Nov 2013 17:10:27.0926 (UTC) FILETIME=[6A6F8F60:01CEE15C] This is a multi-part message in MIME format --wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT Content-Type: multipart/alternative; boundary="RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41" --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Introducing NEW Tudorza Genuair --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline <HTML><HEAD><TITLE>New Page 1</TITLE> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dwindow= s-1252"> <META content=3DFrontPage.Editor.Document name=3DProgId></HEAD> <BODY> <P><IMG height=3D336 src=3D"cid:015522113@14112013-2880" width=3D1021 = border=3D0><BR><IMG height=3D673 src=3D"cid:015522113@14112013-2887" w= idth=3D1021 border=3D0><BR><MAP name=3DFPMap0><AREA shape=3DRECT coord= s=3D459,27,799,51 href=3D"http://webprod5.hc-sc.gc.ca/dpd-bdpp/index-e= ng.jsp"></MAP><IMG height=3D316 src=3D"cid:015522113@14112013-288E" wi= dth=3D1021 useMap=3D#FPMap0 border=3D0></P> <P align=3Dcenter>This email was sent to you by Almirall Ltd.<BR>= For removal please reply to this email with Unsubscribe in Subjec= t Line.</P><IMG height=3D1 alt=3D"" src=3D"LINK REMOVED" width=3D1 bor= der=3D0> </BODY></HTML> --RxbxbbDQL=_vGDBlBk67MreVItV2mLXC41-- --wBS=_qJqKiL3XVShQgrlM1RROrtguDYnsT Content-Type: image/jpeg; name="syn6692-1.jpg" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="syn6692-1.jpg" Content-ID: <015522113@14112013-2880>
This is a about how to handle email sent from your server being misclassified as spam. For additional information you may find these similar questions helpful: Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007). Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID? Does that increase a spam rating?
I'm attempting to create a fake shell program in C#, but I need to know how to display two different messages depending on whether or not the user puts 'cd' infront of their "command". Here's a part of my code: /* C:\Users dir */ users: Console.Write("C://Users>"); string userValueFromUsers; userValueFromUsers = Console.ReadLine(); if (userValueFromUsers.Equals("exit")) { goto end; } else if (userValueFromUsers.Equals("")) { goto users; } else if (userValueFromUsers.Equals("cd..")) { goto users; } else if (userValueFromUsers.Equals("cd " + random text)); { Console.WriteLine("The system cannot find the path specified."); } else if (userValueFromUsers.Equals("cd..")) { goto c; } else Console.WriteLine("'" + userValueFromUsers + "' is not recognised as an internal or external command,"); Console.WriteLine("operable program or batch file.\n") goto users; My problem is at the line that reads "if (userValueFromUsers.Equals("cd " + random text"));", with 'random text' being my current placeholder for 'anything the user says.' To clarify, c, start, end and users are all just parts of my code, c being the C:\ directory, start being the start and end being how you exit. Thanks in advance!
I want to check whether Value1 below contains "abc" within the first X characters. How would you check this with an if statement? var Value1 = "ddabcgghh"; if (Value1.Contains("abc")) { found = true; } It could be within the first 3, 4 or 5 characters.
int* i = new int[4]; delete[] i; While we call delete[], how does the program know "i" is 4 byte-length. Is 4 be stored in somewhere in memory? The implementation of delete[] depend on System or Compilers? Is there some System API to get the length of i? As HadeS said, which will hold the information how much memory has been allocated? And where? It must be hold in memory, or maybe nearby the pointer i.
Foo* set = new Foo[100]; // ... delete [] set; You don't pass the array's boundaries to delete[]. But where is that information stored? Is it standardised?
I've recently setup Geoserver with GDAL/ECW support. I can create a store in Geoserver which allows me to reference one .ecw file. I can serve this one file over WMS and it works great. Now i need to serve all 1700 .ecw files as a single layer. I believe this is a function of the ImageMosaic option. However it only seems to allow me to attach one file. Is there some preparation I need to do to the 1700 files to be able to use them as an ImageMosaic?
I have ortophotos of an area that I need to serve as a background map for my vectors. I got it as 2500 files (71,5MB each) in raw TIFF format with corresponding TFW word file - 180GB of data. Coordinate system is local and it matches with my vectors (there is no EPSG code for it but I named it as “32805” and put a proper definition). For desktop use in MapInfo I converted them to ECW (with some tool that comes with MapInfo) and retile as much bigger to have only 71 file because opening 2500 tiff files is overkill. I just merged 49 TIFF’s (7x7) into one ECW - 35000x35000pixels – largest is around 200MB) It works great and its really fast in MapInfo. Now I am quite confused - HOW to serve them in GeoServer ? I have publish one TIFF and one ECW for comparison. ECW is much faster in browser preview (I am aware of ECW server licensing issue but that shouldn’t be a problem). I have found a presentation “GeoServer on steroids” and read about ImageMosaic, ImagePyramid, retiling, adding overview etc it was quite informative but still don’t know what to do. My question is : how should I do it ? Mosaic or Pyramid, and if is one of the answers positive, I need your advice or some hints. I would really like to be ECW because of disk space so there will be no need to keep 180GB of tiff’s on a server. Data will be served through LAN with maximum 20 users connected at peak hour.SQL server have not so huge amount of data. Sorry if I miss some other info, but I will send it if needed. Geoserver 2.1.4, Windows 7 32bit, 2GB System Memory, (1.7.0_09 (Java HotSpot(TM) Server VM), Native JAI+Native JAI ImageIO = true Original TIFF gdalinfo D:\75720-47970.tif Driver: GTiff/GeoTIFF Files: D:\75720-47970.tif D:\75720-47970.tfw Size is 5000, 5000 Coordinate System is `' Origin = (7572000.000000000000000,4797500.000000000000000) Pixel Size = (0.100000000000000,-0.100000000000000) Metadata: TIFFTAG_SOFTWARE=Adobe Photoshop 7.0 TIFFTAG_DATETIME=2006:10:09 13:02:57 TIFFTAG_XRESOLUTION=72 TIFFTAG_YRESOLUTION=72 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left ( 7572000.000, 4797500.000) Lower Left ( 7572000.000, 4797000.000) Upper Right ( 7572500.000, 4797500.000) Lower Right ( 7572500.000, 4797000.000) Center ( 7572250.000, 4797250.000) Band 1 Block=5000x1 Type=Byte, ColorInterp=Red Band 2 Block=5000x1 Type=Byte, ColorInterp=Green Band 3 Block=5000x1 Type=Byte, ColorInterp=Blue ------------- ECW file which is retiled from 7x7 original tiffs gdalinfo D:\OF-45.ecw Driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) Files: D:\OF-45.ecw Size is 35000, 35000 Coordinate System is: LOCAL_CS["LOCAL - (unsupported)", UNIT["Meter",1]] Origin = (7571500.000000000000000,4798500.000000000000000) Pixel Size = (0.100000000000000,-0.100000000000000) Corner Coordinates: Upper Left ( 7571500.000, 4798500.000) Lower Left ( 7571500.000, 4795000.000) Upper Right ( 7575000.000, 4798500.000) Lower Right ( 7575000.000, 4795000.000) Center ( 7573250.000, 4796750.000) Band 1 Block=35000x1 Type=Byte, ColorInterp=Red Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136 Band 2 Block=35000x1 Type=Byte, ColorInterp=Green Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136 Band 3 Block=35000x1 Type=Byte, ColorInterp=Blue Overviews: 17500x17500, 8750x8750, 4375x4375, 2187x2187, 1093x1093, 546x546, 273x273, 136x136
I am one of the developers of Kubernetes. We have an on-call rotation answering questions here, but we get rate-limited in our answers. How can I, the owner of the product, answer more questions without this silly rule?
I noticed that I can only perform certain actions such as commenting a finite number of times in a given period of time. Obviously, rate limiting is in place to prevent accidental misuse or intentional abuse of certain features. Where else is rate limiting applied on Stack Exchange sites, and what are the limits?
If those previous versions actually download and install previous Windows 10 builds anyway... What I want to do is upgrade a computer which has build 1511, but I don't want it to be upgraded to 1709 (or Fall Creators update, if you prefer) because that build appears to be riddled with bugs (from my experience, anyway), but 1703 (Creators update) is fine by me, so I want this one. I already found how to get any ISO for any build version, but I would need to boot the computer with this and I can't because I don't have physical access to it (I access it remotely through TeamViewer, that's how we usually manage our users' computers) and that sort of operation is beyond the capabilities of most of our users. I know the media creation tool is capable of upgrading Windows 10 from within Windows itself, so is there a way to obtain a Windows 10 media creation tool that would install 1703 instead of 1709? Currently, the one that's easily found on Microsoft's website will only install 1709 and I don't want it.
I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this? In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).
I just noticed that I've got a mysterious file simply called ~ in the root of my harddrive. I suspect that I've created it by accident while using terminal. I know about using ~ as an alias to quickly get to the current user and I use it extensively, so there is a reasonable chance that I've been wanting to create a new file and possibly been in the process of writing something in the lines of touch ~/new_filebut changed my mind and accidentally pressed enter after touch ~? But that does not explain the fact that the file is 3.1MB? Furthermore, the file appears as a file in Finder, but if I try doing either cat ~ or vim ~on it in terminal I'm told that it is actually a directory. But doing an ls -l suggests something else: -rw------- 1 root wheel 3.0M Apr 3 13:37 ~ And have a look at the creation date ...today at 13:37 (ie. ). I discovered that there are a couple of threads where people experience the same thing and the answer seems to be some application failing to write to the user directory, but the timestamp is what makes me suspicious (tin foil hat?). Could this be something malicious? Can I log what or who wrote the file somehow? Can I figure out what's inside it? How can I make sure it is safe to delete this file/directory or whatever it is? Edit: Regarding this question being marked as a duplicate, I explicitly mention that I've read the original thread and none of my four questions above have been answered in that thread, so please read the entire question before flagging.
Last night I discovered what looks like an unusual file named "~" (tilde) in the root of my "Macintosh HD" directory on my MacBook. Finder reports the file is 2.2MB in size, of kind "TextEdit.app Document", and was created on 22nd January 2014 (so about a month ago). I haven't noticed any operational issues with OS X or it's applications. I haven't yet touched the file but would obviously like to remove it. I am very conscious that '~' is a special alias to the user home directory and thus I would appreciate any recommendations in removing the file in a safe manner that isn't likely to nuke my home directory or screw up the operation of applications or OS X. I don't know whether to delete or rename and whether to use Finder or the command line. It's entirely possible that I created the file by accident since I've recently been drafting and running various shell scripts that use the ~, user home alias. MacBook Pro 15" (Retina, Mid 2012) Yosemite
I have two lists : list1 = ['a', 'b', 'c', 'd', 'e'] list2 = [10, 20, 30, 40, 50] I want to assign list2 values to list1 variables. Simply put forward I want end result like this : final_list = ['a' = 10, 'b' = 20, 'c' = 30, 'd' = 40, 'e' = 50] What is the way to do in python3?
Imagine that you have the following list. keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam'] What is the simplest way to produce the following dictionary? a_dict = {'name': 'Monty', 'age': 42, 'food': 'spam'}
Ok. I have a 'Person' class with such properties: PersonId, Name and Age. So far I've added 3 different people and set the DataContext from a List. My validation rules are working ok. What I want to know is, when I enter the second person's name in the first TextBox I want the second TextBox to show this person Age. For example, let's say I have this DataContext: John, 25 years old Paul, 30 years old George, 28 years old As soon as I type 'Paul', the second TextBox should change it's value to '30'; If I type 'John', the second TextBox should change to '25' and so on. Thanks in advance, Tiago
How do I use RelativeSource with WPF bindings and what are the different use-cases?
I am doing a kind of "class project" which consists on a Telegram Bot, in this case is a bot that will randomly give me the name of an OverWatch character to play (yes, it already exists but I do not know what else to do). For now I have a method that when you use the command /start loads the current roster form a (that is the part that is giving me the NullPointerException). Another one that adds any characters beyond this point in time and it puts that new entry into the same .txt file so next time I load the program it is already there. I have changed some things based on the Internet info about common mistakes with NullPointerException. I changed the loop (while (reader.readLine() != null)) because I found I gives problems but no, it is something else and I cannot find why. This is my bot class, if I understand correctly if I type /start it gives me the message at the bottom as well as load the heroe list. private String setResponse(String originalMessage) throws IOException { //Según el mensaje que recibes del usuario puedes devolver una respuesta u otra if (originalMessage.equals("/WhatToPlay")) { return "This is a test"; } if (originalMessage.startsWith("/addHero")) { HeroList.addHero(originalMessage.substring(9)); return "The hero has been succesfully added"; } if (originalMessage.equals("/help")) { HeroList.helper(); } //heroList.loadHeroes(); --> If I take this the message bellow shows, if not it just gives me the exception, return ("Hi there. What would you like me to do? Type /help to get avaliable commands."); } And this is all my methods code. public class HeroList { public static ArrayList<String> heroes; public HeroList() { heroes = new ArrayList<>(); } public static void loadHeroes() throws IOException { // A method that reads a file and adds to a list all the current heroes. BufferedReader heroList = new BufferedReader(new FileReader("/home/INFORMATICA/alu20918309q/Escriptori/heroList.txt")); String line = null; while ((line = heroList.readLine()) != null) { heroes.add(line); // --> here is where the exception points } heroList.close(); } public static void addHero(String heroName) throws IOException { // Adds any extra heroes. heroes.add(heroName); // Adds any new heroes to a preexisting file. BufferedWriter updateHeroes = new BufferedWriter(new FileWriter("/home/INFORMATICA/alu20918309q/Escriptori/heroList.txt")); updateHeroes.newLine(); updateHeroes.write(heroName); updateHeroes.close(); } public static void helper() { // Just help messages. System.out.println("Type /WhatToPlay to get a random hero to play. Let us hope it is someone you know how to use."); System.out.println("Type /addHero to add a new hero, all heroes up untill Brigitte is added."); } } Right now it does not randomize my list of heroes (I will add that as soon as I figure this out), but the idea is that it should load from the file, and also add to the list as well as save into the file those heroes I type, but it gives me the null pointer and of course never adds the new entries. Keep in mind I am learing, this code will be full of mistakes or dumb code. Thanks for the help.
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?
Looking to upgrade my Acer laptop, and from what I've researched, I can swap out a 1x2GB module with a max of 1x8 GB module of DDR3 running at 16000mhz. I've found a listing on Amazon for the exact some module but the product states it is a Desktop RAM Is it okay to use Desktop RAM in laptop RAM? If not, what should I be looking for in terms of RAM for a laptop?
The specifications of my system say it supports 400 MHz and 533 MHz DDR2 unbuffered SDRAM. I have a 1 GB DDR2 PC2-5300 laptop RAM module. Can I use this in my desktop? If not, what exactly is the difference between desktop RAM and laptop RAM?
Let’s say a device’s operating voltage is 5V and maximum current that it can draw is 5A. Is it possible for a 5V power supply to have very low internal resistance such that a device that operates at 5V turns down its resistance in attempt to draw 5A from the power supply , but instead accidentally draws greater than > 5A due to the power supply having very low internal resistance or being “too powerful” ? Of course this is assuming that the way a basic electronic device draws current is first, it assumes that it is being supplied the correct voltage, and 2nd, it lowers down its resistance at some constant number base on the current it needs to draw Is this how regular devices such as servo motors draw current? Or can they actually monitor how much current a power supply can give and lowers its resistance base on that? I know that it is possible to be at operating voltage and still not supply enough current, but could it be possible to be at operating voltage, and supply too much current for a load? Wait Unless of course, as long as the voltage across the load is less than or equal to the operating voltage, it can never accidentally draw too much current. ( I think I answered my own question, not sure if this is right )
Power supplies are available in a wide range of voltage and current ratings. If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify? What if I don't know the device's specs, but am replacing a previous power supply with particular ratings? Is it OK to go lower voltage, or should it always be higher? What about current? I don't want a 10 A supply to damage my 1 A device.
When calculating the sample covariance, why do we divide by $n-1$ instead of $n-2$? Don't we lose two degrees of freedom since we need to calculate two sample means? For example, when estimating the variance for a Bayes classifier, we divide by $n-K$ where $K$ is the number of classes since we use $K$ sample means in the calculation. Could someone please explain this in terms of degrees of freedom? UPDATE The other answers on this site don't quite make sense to me. So for clarification, I would like to extend this question such that I believe it is sufficiently different to not be marked as a duplicate. The definition of degrees of freedom as per my understanding is $df = n-p$, where $p$ is the number of parameters calculated en route to the current calculation. I guess the issue boils down to what a "parameter" is considered to be. Clearly in the case of covariance, the individual sample means are not each treated as a parameter, since $df=n-1$. Which leads me to hypthothesize the crude definition that $df=n-p$, where $p$ is the number of sequentially dependent parameters. For example, in the case of covariance, both sample means can be calculated independently of each other. But in calculating residual standard error for simple regression, $df=n-2$ since the intercept term can only be calculated knowing the estimated gradient - or it is sequentially dependent on the estimated gradient. Is this a valid definition? If so, does that mean that: $f(X,Y)=\sum_{i=0}^n(X_{i}-\overline{X})^2+\sum_{i=0}^n(Y_{i}-\overline{Y})^2$ has $df=n-1$ also? If not - with reference to both covariance and the above equation - why so?
The denominator of the (unbiased) variance estimator is $n-1$ as there are $n$ observations and only one parameter is being estimated. $$ \mathbb{V}\left(X\right)=\frac{\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)^{2}}{n-1} $$ By the same token I wonder why shouldn't the denominator of covariance be $n-2$ when two parameters are being estimated? $$ \mathbb{Cov}\left(X, Y\right)=\frac{\sum_{i=1}^{n}\left(X_{i}-\overline{X}\right)\left(Y_{i}-\overline{Y}\right)}{n-1} $$
Well, we want to add the description field on the attached media under the post edit page. I have attached an image for reference. Explanation: Under posts, after adding an attachment if we click on the edit button to edit the details of the attached media we didn't find any description fields as we want to show the "Description" and also want to add the same facility to update that "Description" the same way we update captions and alt text and other details. The procedure should be similar and should follow the same behavior as captions and alt text. We don't want to achieve the solution by playing around with the WP-core. So is there any Hook or way [NO WP-CORE] that can help us to achieve the solution for this problem Make sure that I am asking to add a description on a Pop-up page at the time of editing any media attached to the post. Thank you in advance.
I’m trying to add a custom field to image and gallery edit screen. I’m aware there are similar questions here, although answers either don’t work with the current version or they add field only to upload screen while I need a field to be visible in all edit screens (see below). For this, I believe, you’ll have to mess with backbone.js as attachment_fields_to_edit only adds to upload screen. Adding field with attachment_fields_to_edit ↑ This is upload image screeen. Here Style is added with attachment_fields_to_edit filter, and my_field is added with ACF plugin. But they are missing in edit screen in the post ↑ Click edit on the actual post ↑ No style & my_field fields! The question How to add fields to still have them on the edit screen? Ideally answer will include adding fields to gallery edit screen if it’s a similar process This question is really important for me so I’ll be adding a 100 rep bounty when it’s available. Thanks!
I don't understand the ouptut of this code. When comparing two strings with same value (not assigned using new keyword), java returns true. But when I do it using new keyword and pass the value in the constructor, it prints false. But when I use new keyword and instead of passing the value to the constructor I assign it in the next step. This time it returns true. Why? class CheckStrings{ String s; } public class EQCheckTest { public static void main(String[] args) { String a1 = "pune"; String a2 = "pune"; String a3 = new String("pune"); String a4 = new String(); a4 = "pune"; CheckStrings cs = new CheckStrings(); cs.s = "pune"; System.out.println(a1==a2); System.out.println(a1==cs.s); System.out.println(a1==a3); System.out.println(a1==a4); } } OUTPUT: true true false true Why a1==a3 false and a1==a4 true?
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
I have the following method which serialises an object to a HTML tag. I only want to do this though if the type isn't Anonymous. private void MergeTypeDataToTag(object typeData) { if (typeData != null) { Type elementType = typeData.GetType(); if (/* elementType != AnonymousType */) { _tag.Attributes.Add("class", elementType.Name); } // do some more stuff } } Can somebody show me how to achieve this? Thanks
Is there anything to use, to determine if a type is actually a anonymous type? For example an interface, etc? The goal is to create something like the following... //defined like... public static T Get<T>(this IAnonymous obj, string prop) { return (T)obj.GetType().GetProperty(prop).GetValue(obj, null); } //... //And then used like... var something = new { name = "John", age = 25 }; int age = something.Get<int>("age"); Or is that just the beauty of an anonymous type? Nothing to identify it self because it takes a new shape? Note - I realize that you can write an extension method for the object class, but that seems like a little overkill, in my opinion.
I added 3/4 cup of oil instead of water to a quick bread mix. Can it be saved?
I screwed up and put 1 1/4 cup veg oil instead of water in my box cake recipe. Is there any way to fix this? Can I add flour or something? Or is it doomed for the trash can?
Our company has several conference room computers running Windows 10 that need the volume set to 25% when a user logs in. Is there a registry setting to set the system volume at 25% so the sound isn't muted or to loud when a conference takes place?
Some keyboards have volume controls on them that can be pressed anytime to control the master volume. My keyboard does not have that. Is there a way that I can create a key macro that will work like the volume controls on those keyboards? It should always allow me to control the volume, even if I'm playing a game.
Don't you think the explosion of the number of communities is fragmenting the space uselessly? Lately you don't even know if you need to send your question to , , or . Note: I agree with this: Notably this fragmentation results in the creation of a lot of accounts, which thank god, is just one click away. But you end up with 101 reputation points everywhere. Also I'm not aware if search boxes do cross-community queries(?). Another thing is the more questions that can belong to multiple communities, the more you lose . I am not alone with this concern, and Robert Cartaino gives good hints about why fragmentation looks bad at first, but may have reasons to be accepted, in the article .
I see that Stack Overflow is very Linux specific. Doesn't Unix & Linux and Ask Ubuntu cover much of the same ground? I see that Unix & Linux and Server Fault also cater to many Linux server questions. Similarly, Ask Ubuntu and Super User seems to contain most like questions.
I want to check if the key (variable uuid) exists in a json object (variable response), as far as I know, JsonObject.get("key") should return the value if it exists, or null if it does not. Here is my code: URL url = new URL("The URL to send a request to"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); StringBuilder response = new StringBuilder(); BufferedReader rd = new BufferedReader(new InputStreamReader(connection.getInputStream())); String line; while ((line = rd.readLine()) != null) { response.append(line); } JsonObject responseJson = new Gson().fromJson(response.toString(), JsonObject.class); JsonObject info = responseJson.get(uuid).getAsJsonObject(); // The code fails here if (info != null) { // If the key exists // long code } else { // Eclipse is giving me a warning that this here is dead code, I don't know why } My IDE warns me about everything undes else {} being dead code, too. I don't know why I'm fairly new to Java (about a month). What am I doing wrong here? Edit: full list of my imports import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; import java.util.Collections; import java.util.List; import com.google.gson.Gson; import com.google.gson.JsonObject;```
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?
1. Once in a while OR 2. Once in awhile Which is the correct phrase? I'm thinking it's the first one, but I'm unable to find out for certain. and were related but didn't answer the question
Is there a difference between "awhile" and "a while"? If there is, what is it? I've been wondering this for awhile, but now I actually need the answer.
On all SE sites users can post multiple answers to the same question. There is a warning dialog if you do that, reminding you that you can also edit your existing answer. The only valid reasons for writing multiple answers I can think of are: They are single-item answers to recommendation questions, which are discouraged anyway It's on meta, and they are about different approaches. Separating them allows the community to properly vote on them. Invalid uses of that feature that I have encountered are self-deletion and reposting to get rid of downvotes as well as reposting moderator-deleted answers. If you want to provide two fundamentally different approaches to the same question on the main site, I think a comprehensive answer discussing both is better than separating the answers. If you provide multiple approaches, an important part of the answer should be detailing the advantages and disadvantages of them. This can be done better in a single post than in multiple ones, in my opinion. Multiple answers also don't play nice with the reputation system, they are often perceived by the community as a cheap reputation-grab. The availability of this feature can mislead users into using it inappropriately, as there are only few cases where it is actually useful. So, does it make sense to allow multiple answers on the main site, or should this feature be disabled? To be clear, I want to keep it on the meta sites, as it is useful there.
When is it okay to post two answers to one question?
$\lim_{n \rightarrow \infty} (x^n/n!)=0$. prove. x is finite whereas n is infinite. But increasing n means also increasing $x^n$. It is understandable that if n is too large n! will exceed $x^n$. How it can be proved in a mathematically precise way?
Why is $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$ Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$ This is being repurposed in an effort to cut down on duplicates, see here: Coping with duplicate questions. and here: .
Let $n\in \mathbb{N}$. Can someone help me prove this by induction: $$\sum _{i=0}^{n}{i} =\frac { n\left( n+1 \right) }{ 2 } .$$
Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$. How? What's the proof? Or maybe it is self apparent just looking at the above? PS: This problem is known as "The sum of the first $n$ positive integers".
I have list on my website like this: <ul id="listProfiles" class="list-group"> @foreach($profiles as $profile) <li class="list-group-item" profileId="{{ $profile['id'] }}">{{ $profile['name'] }}</li> @endforeach </ul> <div id="profileResult"></div> When I add new element to this list using function below: $("#addNewProfileButton").on("click", function () { profileName = $("#newProfileInput").val(); $("#newProfileInput").val(''); $.ajax({ method: 'GET', data: { profileName: profileName }, url: '/addNewProfiles' }).success(function (newProfile) { console.log(newProfile); $("#listProfiles li:last").after('<li class="list-group-item" profileId="' + newProfile.id + '">' + newProfile.name + '</li>'); }).error(function (msg) { console.log(msg); }); }); it's added properly but not clickable using this: $("#listProfiles li").click(function () { profileId = $(this).attr('profileId'); $.ajax({ method: 'GET', data: { profileId: profileId }, url: '/spiderProfileDetails' }).success(function (msg) { $('#profileResult').html(msg); }).error(function (msg) { console.log(msg); }); }); All other elements are clickable. New element becomes clickable after refreshing the website. How to make it work without refreshing?
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
Sometimes, I want to mark a section of my manuscript for later inspection. So far I have been using a different color, but I really do not like it. I was wondering if I can draw a black strip on the margin. Ideally, it should work across pages and with equations. I believe it should be possible to do since draft mode already does something similar. But I do not know where to start. MWE for testing: \documentclass{article} \usepackage{lipsum} \newenvironment{marked}{}{} \begin{document} \lipsum[1-4] \begin{marked} \lipsum[5] \[ x = y\] \lipsum[6] \end{marked} \end{document} Desired output:
I've seen on several possibilities to include a line next to a paragraph. Like this: (the line is continuous) text text text | text text text | text text text | However, I would like to print that line on the margin, so that the original paragraph doesn't get any modification. In other examples the paragraph get an extra spacing with the next and previous paragraphs and the text is move a little to one side. One of the other options I've seen is with the package pdfcomments, but I just want a real line, not a comment that will cause problems when printing. Is that possible? Maybe with Tikz?
how to calculate the size of this structure: struct Node{ int data; char b; char *c; }; when I run, it gives 16 bytes. can anyone explain?
Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?
There are a couple of files in our git-controlled codebase that I'd like to rename. Specifically, I just want to change the case of the file, so that sourceCode.java becomes SourceCode.java, for example. The catch: I'm on a Windows box, and the filesystem thinks those are the same file name. How can I get Windows and Git to recognize that change and check it in?
I'm not too sure what is going on here, but sometimes a particular file in my repository will change the case of its name. e.g.,: before: File.h after: file.h I don't really care why this is happening, but this causes git to think it is a new file, and then I have to go and change the file name back. Can you just make git ignore case changes? [edit] I suspect it is Visual Studio doing something weird with that particular file, because it seems to happen most often when I open and save it after changes. I don't have any way to fix bugs in VS however, but git should be a bit more capable I hope.
I created a mesh, then use particles to make grass on it. I just want to take the grass and grass's shadow on render, so I make the mesh's material become invisible (by using Transparent BSDF, alpha is zero). But when the mesh become transparent, the grass's shadow is disappear too. How can I still get the shadow while the mesh is invisible? I use Blender 2.70, Cycles Render
I am trying to render an animation in cycles without the background. However, every time I have it render, the background still shows up. I used the compositor to add a background image so I can animate the object around the background. I set the output to RGBA and set the film to transparent. Now I want to use it in After effects and I simply want to export/render it without the background and make it transparent. How do I do that?
How much extra distance would a scientist have to travel to get to the event horizon of a mini black hole if they ever make one?
How much extra distance would I have to travel through space to get from Earth to a stellar mass event horizon? (compared to the same point in space without a black hole)
Is it possible to track an email sent to me already? I want to track the IP address of the person who sent me the email using the email just sent. Is it possible, or is email anonymous?
There is someone harassing me through emails and I need to know if there is a legal/legitimate way I can obtain their true IP address. They started masking their IP address after I used the email header to find out who it was initially. But now I'm at a loss. Any advice or suggestions or help would be tremendously appreciated. Thank you for your time.
Is it try what SAT for a boolean formula in CNF in NP-full? And for DNF it is trivial? But can we just transform any CNF to DNF?
The first well-known $NPC$ problem is the which has a proof of being $NPC$ done by Cook (Cook-Levin Theorem). The problem can easily be described the following way: In complexity theory, the satisfiability problem (SAT) is a decision problem, whose instance is a Boolean expression written using only AND, OR, NOT, variables, and parentheses. So, we should give an answer 'yes' if there is a set of boolean variables which yield 'TRUE' for the given for the corresponding expression. However, I have a question. The wikipedia article states the following: SAT is easier if the formulas are restricted to those in disjunctive normal form, that is, they are disjunction (OR) of terms, where each term is a conjunction (AND) of literals (possibly negated variables). Such a formula is indeed satisfiable if and only if at least one of its terms is satisfiable, and a term is satisfiable if and only if it does not contain both x and NOT x for some variable x. This can be checked in polynomial time. So, basically, if the expression is written in the DNF, this problem is not $NPC$, but simply $P$. However, as far as I know, there is a $O(p(n))$ algorithm to transform any given boolean expression into DNF and DNF exists for any boolean expression. What am I missing or misinterpreting? There is obviously an error in my logic, because it resulted in making the SAT problem $P$, but not $NP$. Thank you!
Can anyone explain the difference between observed variables and unobserved variables (preferably in plain English ) ?
What is observed and what is observable? I found this two word frequently in the context of random variable and realization of random variable. What is the difference between observed and observable?
I got virus on my computer. This is a list of executables of the virus: Name |Size |Description ------------------+------+------------- B06A.exe |162 |B06A D3F2.exe |217414|wYtRBdGyks E3DA.exe |357190|TWunHOlqmZ NTDETECT.COM |177152|Mail.Ru Агент ScreenSaverPro.scr|177152|Mail.Ru Агент temp.bin |177152| (none) ViewFiles.cmd |177152|Mail.Ru Агент Zafgff.exe |177152|Mail.Ru Агент I have found the virus had done the following, but I haven't find actual damage yet: Folders in my USB disk became hidden and system. Links with the same name with those folders were spawned. Clicking those links cause virus to run. Registry HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run was set to run this virus when I login. Do anyone know this virus? What does it actually do? Or is it a new one? How can I report it?
What should I do if my Windows computer seems to be infected with a virus or malware? What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware? This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.
I would like to build a function that gives me two lists as an output: def times_10(i): out = i * 10 return out, i ​ outpt,inpt = [times_10(i) for i in range(1,8)] #doesn't work I have one way of doing it, but I have a feeling there must be something simpler: a = [times_10(i) for i in range(1,8)] outpt,inpt = list(map(list, zip(*a))) # this works Expected output: >>> outpt [10, 20, 30, 40, 50, 60, 70] >>> inpt [1, 2, 3, 4, 5, 6, 7]
I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item. For example: original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4]) Is there a builtin function that does that?
Operand should contain 1 column What wrong with my code is it mean AND I try to insert into activitynote table by selection <?php require_once('Connections/Thaymay.php'); mysql_select_db($database_Thaymay, $Thaymay); $activityid = $_POST['select']; if($_POST) { foreach($_POST['namebox'] as $check) { echo "$check \n "; echo "<br> "; $query_ReSeActi = " INSERT INTO `ph3`.`activitynote` ( `idmemberref`, `idactivity`, `manaferid`, `staffinput`) select ( idmemberref, $activityid, manaferid, 'system' ) from activitynote where id = $check ; "; $RsActivitynoteMem = mysql_query($query_ReSeActi, $Thaymay) or die(mysql_error()); } } ?>
I tried running the following statement: INSERT INTO VOUCHER (VOUCHER_NUMBER, BOOK_ID, DENOMINATION) SELECT (a.number, b.ID, b.DENOMINATION) FROM temp_cheques a, BOOK b WHERE a.number BETWEEN b.START_NUMBER AND b.START_NUMBER+b.UNITS-1; which, as I understand it, should insert into VOUCHER each record from temp_cheques with the ID and DENOMINATION fields corresponding to entries in the BOOK table (temp_cheques comes from a database backup, which I'm trying to recreate in a different format). However, when I run it, I get an error: Error: Operand should contain 1 column(s) SQLState: 21000 ErrorCode: 1241 I'm running this in SQuirrel and have not had issues with any other queries. Is there something wrong with the syntax of my query? EDIT: The structure of BOOK is: ID int(11) START_NUMBER int(11) UNITS int(11) DENOMINATION double(5,2) The structure of temp_cheques is: ID int(11) number varchar(20)
So I am running terminator 0.98. I like fish shell but for some task it is handy to have bash (like for virtualenvwrapper). So I now have two windows that open when I start terminator. But I would like to have one that opens with fish and one with bash. Is this possible, if so: how? I start terminator with my custom layout by changing my config file located ~/.config/terminator/config. In the layout section of the config file I used this code. [layouts] [[default]] [[[child0]]] fullscreen = False last_active_window = True maximised = True order = 0 parent = "" size = 1280, 985 type = Window [[[child1]]] order = 0 parent = child0 position = 490 ratio = 0.5 type = VPaned
I would like to open a terminal, split it to lets say 9 parts (3x3) and execute some bash script. But for each terminal part different script. Can this be done using perl, python or even bash? How can I switch between those little terminals without using keyboard shortcuts? Oh, by the way, I'm using terminator. And if there is some other terminal emulator that enables such a functionality, which is it?
Let's assume I don't know what my IP range is, or my default gateway, but I know my IP address is 192.168.5.38 and my CIDR Range is /23. How do I know what my IP range is? Is my range 192.168.4.0-192.168.5.255 or 192.168.5.0-192.168.6.255 Can we only work out this if we know the default gateway? Please note I'm not asking what tools can provide this information, this is a thought exercise. I'm trying to understand how you would know the range when faced with a situation like this. Thanks! Answer: thanks to @g_bor down below - they helped me understand how you work out the range. You do it by ANDing the binary outputs of both IP address and Subnet mask. IP address: 192.168.5.38 Binary 11000000.10101000.00000101.00100110 Subnet Mask: /23 (255.255.254.0) Binary: 11000000.10101000.00000100.00000000 If we AND them together (1 AND 1 = 1, 0 AND 0 = 0, 1 AND 0 = 0) we get 11000000.10101000.00000100.00000000 which is IP Range: 192.168.4.0
This is a about IPv4 Subnets. Related: How does Subnetting Work, and How do you do it by hand or in your head? Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself. If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?
Let $A$ be the set of all rational numbers $p$ such that $p^2<2$, and let $B$ be the set of all rational numbers $p$ such that $p^2>2$. It can be shown that $A$ has no largest element and that $B$ has no smallest element by associating to each $p>0$ the number $$q=p-\frac{p^2-2}{p+2}$$ and then proving that $p\in A \Rightarrow q\in A$ and $p\in B\Rightarrow q\in B$. Where is this value of $q$ coming from?
First, my apologies if this has already been asked/answered. I wasn't able to find this question via search. My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2. In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof. As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem. If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$ Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive. Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$ or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$. Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$. Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$. The Question: Why does Rudin choose $x = 1/(p + 2)$ specifically? Is it just to make the expressions work out clearly algebraically? Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof? Is there a simpler derivation for the number $q$ that I am missing?
Trying to implement the following: RewriteRule \.ttf$ - [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors:1 Header set Access-Control-Allow-Origin "*.sadface.com" env=!cors:1 Then requesting: $ curl -I http://www.example.com/font.ttf ... Access-Control-Allow-Origin: *.sadface.com UPDATE Thanks to Jenny D I've figured out that the rewrite rules elsewhere were doing a local redirect to index.php so I've modified to the following: # Set CORS domain for fonts. RewriteCond %{QUERY_STRING} \.ttf RewriteRule ^(.*)$ $1 [E=cors:1] Header set Access-Control-Allow-Origin "*.example.com" env=cors:1 Header set Access-Control-Allow-Origin "*.sadface.com" env=!cors:1 This provides the following log entry: RewriteCond: input='q=font.ttf' pattern='\\.ttf' => matched Despite this however I'm still getting Access-Control-Allow-Origin: *.sadface.com UPDATE 2: Looks like env=cors:1 isn't doing what I expect, changing to the following fixed the issue: Header set Access-Control-Allow-Origin "*.example.com" env=cors
This is a about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as: Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask! How can I become an expert at writing mod_rewrite rules? What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples? A place to test your rules The web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.
Refer to the sequence $S$ where $S_n$ denotes the number of n-bit strings that do not contain the pattern 00. By considering the number of n-bit strings with exactly i 0's, show that $\displaystyle f_{n+2} = \sum_{i=0}^{\frac{n+1}{2}} \binom{n+1 - i}{i}$ for $n=1,2,\dots$ where $f$ denotes the Fibonacci sequence. So I know the Fibonacci sequence consists of $0, 1, 1, 2, 3,\dots$ And $S_n=f_{n+2}$. But what else? Any help is appreciated. Thanks!
The binomial sum $$s_n=\binom{n+1}{0}+\binom{n}{1}+\binom{n-1}{2}+\cdots$$ satisfies the Fibonacci relation. I failed to prove that $\binom{n-k+1}{k}=\binom{n-k}{k}+\binom{n-k-1}{k}$... Any hints or suggestions?
I have a binary dependent variable (infection + or -) and both continuous and categorical independent variables. One continuous independent variable (BMI) seems to be nonlinear in that the lowest and highest BMI are more likely to be + and the BMI values in the middle are less likely to be +. So when I plot BMI against the proportion that are +, I get U shaped line. How do I incorporate that into the logistic regression?
Let's say I am building a logistic regression model where the dependent variable is binary and can take the values $0$ or $1$. Let the independent variables be $x_1, x_2, ..., x_m$ - there are $m$ independent variables. Let's say for the $k$th independent variable, the bivariate analysis shows a U-shaped trend - i.e., if I group $x_k$ into $20$ bins each containing roughly equal number of observations and calculate the 'bad rate' for each bin - # observations where y = 0 / total observations in each bin - then I get a U shaped curve. My questions are: Can I directly use $x_k$ as input while estimating the beta parameters? Are any statistical assumptions violated which might cause significant error in estimating the parameters? Is it necessary to 'linearize' this variable through a transformation (log, square, product with itself, etc.)?
In codeproject, i found a interesting program which implements a meaning of unit ,like unsigned long long operator"" s(unsigned long long n) { return n + 1; } int main() { int x = 16s; } x will be 17, so interesting. can someone tell me what magic this is?
introduces which will allow the introduction of new literal syntax based on existing literals (int, hex, string, float) so that any type will be able to have a literal presentation. Examples: // imaginary numbers std::complex<long double> operator "" _i(long double d) // cooked form { return std::complex<long double>(0, d); } auto val = 3.14_i; // val = complex<long double>(0, 3.14) // binary values int operator "" _B(const char*); // raw form int answer = 101010_B; // answer = 42 // std::string std::string operator "" _s(const char* str, size_t /*length*/) { return std::string(str); } auto hi = "hello"_s + " world"; // + works, "hello"_s is a string not a pointer // units assert(1_kg == 2.2_lb); // give or take 0.00462262 pounds At first glance this looks very cool but I'm wondering how applicable it really is, when I tried to think of having the suffixes _AD and _BC create dates I found that it's problematic due to operator order. 1974/01/06_AD would first evaluate 1974/01 (as plain ints) and only later the 06_AD (to say nothing of August and September having to be written without the 0 for octal reasons). This can be worked around by having the syntax be 1974-1/6_AD so that the operator evaluation order works but it's clunky. So what my question boils down to is this, do you feel this feature will justify itself? What other literals would you like to define that will make your C++ code more readable? Updated syntax to fit the final draft on June 2011
I want to obtain the PDF of $\theta1$ - $\theta2$ where $\theta1$ and $\theta2$ are both i.i.d Uniform RVs on [0,$2\pi$). The added condition here is that every operation is done modulo 2$\pi$. I tried to use convolution and follow a similar process as finding the PDF of X+Y but with no result. Any suggestion ??
I have 2 i.i.d Uniform random variables $\theta_{1}$ and $\theta_{2}$ on $[0, 2\pi)$. Here the problem pushes us to consider that all operations are made modulo $2\pi$. My question is how to obtain the joint PDF of $\theta_{1} - \theta_{2}$ and $\theta_{1}$ and then obtain the conditional PDF of $\theta_{1}$ given $\theta_{1} - \theta_{2}$??. For the second part It can be deduced from the first by writing it as the joint PDF divided by the PDF of $\theta_{1}$. But for the first part, A common idea that I saw is to derive the $\text{CDF}(x, y) = P(\theta_{1} - \theta_{2} \le x$, $\theta_{1} \le y$) and then perform derivations respect to $x$ and $y$. Is this a right approach? If yes, how to proceed with CDF especially with our uniform distribution restrictions?
This is the integral $$\int\frac{dx}{(x+1)(n-x)}=\int kdt$$ I just need some assistance on how to begin the left side integral and I will most likely be able to continue it from there thank you.
Could someone take me through the steps of decomposing $$\frac{2x^2+11x}{x^2+11x+30}$$ into partial fractions? More generally, how does one use partial fractions to compute integrals $$\int\frac{P(x)}{Q(x)}\,dx$$ of rational functions ($P(x)$ and $Q(x)$ are polynomials) ? This question is asked in an effort to cut down on duplicates. See . Also see .
I've downloaded Minecraft Forge for Minecraft v1.11.2 and I can't find the mods folder! Where do I look? I've looked in my %appdata% and clicked on .Minecraft and no Mods folder!
I've downloaded Minecraft Forge for Minecraft v1.6.4 and I can't find the mods folder! Where do I look? I've looked in my Forge folder but it wasn't there!
iPhoto starts launching when iPhone is connected even though it never used to before Yosemite. Steps described in: does not work in Yosemite. Yosemite seems to ignore the iPhoto settings.
Whenever I connect my iPhone/iPad/iPod to MacMini, It automatically launches iTunes & start syncing every time. I am a developer & I frequently need to connect/disconnect different devices. So, whenever I connect device, I force quit iPhone & iTunes. Can I eliminate the initial launch of iTunes and iPhoto when iOS devices connect over USB?
I have troubles using articles. I have not understood the algorithm when to use them. Could you review my older text and describe me, if an article is incorrectly used or omitted and why? Bold formatting is put where I think I missed some article. I have developed and tested new web service. I used SoapUI for testing a local endpoint. Next step was to deploy the service into a/the testing environment. But suddenly I failed to connect to this endpoint. I was able to open its WSDL description in Firefox, but SoapUI failed with SSLPeerUnverifiedException: peer not authenticated. The setup was a network with a proxy and there was an Apache proxy translating URLs for the service. There were many similar complaints on web but no solution. I tried many proposals like trusting the certificate (because StartCom is not trusted certification authority in Java) but nothing helped. Until I posted a question on StackOverflow. It lead me to the solution: (Computer code solution follows)
How do I know whether to use the definite (the) or indefinite (a, an) article, and when to omit it altogether?
Given $\mathbf v=\begin{bmatrix}v_1\\v_2\\\vdots\\v_n\end{bmatrix}$ and $\mathbf A=\mathbf{vv}^\top$, find the eigenvectors and eigenvalues of $\mathbf A+\lambda\mathbf I$. My current work progress is: Since $(\mathbf A+\lambda\mathbf I)\mathbf v =\mathbf{Av}+\lambda\mathbf v=\mathbf v(\mathbf v^\top\mathbf v) + \lambda\mathbf v=\mathbf v \|\mathbf v\|+ \lambda\mathbf v=(\|\mathbf v\|+\lambda)\mathbf v$ , so one of the eigenvalue is $\lambda_1=(\|\mathbf v\|+\lambda)$ with corresponding eigenvector $\mathbf v_1=\mathbf v$. I'd like to find out other pairs of eigenvalues and eigenvectors. I first calculate the trace. $$\mathrm{Tr}\,(\mathbf A)=n\lambda+\|\mathbf v\|=\lambda_1+(n-1)\lambda$$ Hence, the rest of $n-1$ eigenvalues has sum $(n-1)\lambda$. From here, I do not know how to proceed. Can I assume the rest of eigenvalues are $\lambda$ with multiplicities $n-1$? Why? How to find corresponding eigenvectors? [Note1] This is like a follow up question regarding . [Note2] Found later on there is a but people focus on linking it to Note1.
This question aims to create an "" of numerous questions that ask about determinants of specific matrices (I may have missed a few): The general question of this type is Let $A$ be a square matrix of rank$~1$, let $I$ the identity matrix of the same size, and $\lambda$ a scalar. What is the determinant of $A+\lambda I$? A clearly very closely related question is What is the characteristic polynomial of a matrix $A$ of rank$~1$?
The laptop apparently is taking up ~87 gigabytes of space for system. I don't know how to dig into the details of why and to look into possibly freeing up some of that space as that seems rather excessive. I asked a friend and they only had ~11gb associated with system. I did have a hard time upgrading from high sierra to mojave, and had to do a reboot into safe mode then hit some buttons on the app store to install mojave which eventually seemed to work.
Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space. It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart? One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?
I have the following code: \documentclass{article} \usepackage{hyperref} \usepackage{minted} \begin{document} A nice paper has the following things: \begin{listing} \begin{minted}{haskell} data RCPoint = RCPoint { _rcp_si :: Integer } \end{minted} \label{ch1} \caption{The RCPOINT Listing} \end{listing} \begin{equation} \label{eq:eqn1} x^2 - 2 x \end{equation} I like my equation in \ref{eq:eqn1}. I also like my code in Listing \ref{ch1}. \end{document} which compiles normally, to produces:: The reference to the listing in the final line is missing. I get a warning for the final line of output: (/usr/share/texmf-dist/tex/latex/amsfonts/umsb.fd) Package hyperref Warning: Suppressing empty link on input line 55. [1] (./nice-org-paper.aux) ) Output written on nice-org-paper.pdf (1 page). Transcript written on nice-org-paper.log. How do I get the reference to work?
\documentclass{article} \usepackage{algorithm} \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document} With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1). Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.
I have written the following PHP snippet to show some weird PHP behavior. <?php $amount = "9.95"; var_dump($amount); // string(4) "9.95" echo '<br />'; settype($amount, "float"); var_dump($amount); // float(9.95) echo '<br />'; $amount = $amount * 100; var_dump($amount); // float(995) echo '<br />'; settype($amount, "int"); var_dump($amount); // int(994) ?> I expected the last output to be 995, but instead the result is 994. Why is this happening? Online snippet:
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
Let $G$ be a compact topological group (we don't assume any separation axiom here). For a subgroup $H$ of $G$, we may endow the quotient space $G/H$ with quotient topology. Now it is clear for me that openness of $H$ implies finiteness of $G/H$. My question is whether the converse is also true. If not, I would like to hear some counterexamples in the case of Lie groups and profinite groups.
If $G$ is a compact topological group, how to show that a finite index subgroup of $G$ is open ? I really don't know where/how to start... PS : I precise that by "compact" I mean that it is hausdorff and that any recovering of $G$ by open sets has a finite sub-recovering (sorry if I wasn't unclear)
I have a MTB/Hybrid which I use for exercising and leisure purpose. It have installed MTB style mudguards. But when I get out with these my back is full of mud/water drops. So what is the best position for these style of mudguards? Specially rear mudguard. I have attached the photo of my bike which shows the position of my mudguard. Can changing these position will improve the effectiveness?
For a 20" rear wheel with a this kind of fender, what would be the best angle to install it to minimize the spray on one's butt/legs?
does these new top-level domain names (.guru, .rocks, .ml, .tk) affect user experience? do they like to type generic top-level domain names only?
If you are not aware, ICANN has approved quite a few generic top level domains and they intend to approve more. By generic, they mean regular old words will replace the common .com or .net, so we will have the option for domains names that end in words like: .photography .media .education .finance .vision I personally like the idea and I think it's been too long, but I'm not convinced I should switch my site over to an optimized version using one of these new tld's just yet. I think the average user, especially in America, sees something wrong with non .com's. Whenever I see a .net I always wonder why they don't have the .com. Also, I can just see myself getting "Is this a website" questions for a while if I start printing this on my business card and things. What are the general advantages and disadvantages of using these generic tld's? If they are currently not a good idea, when will they be, if ever? What will it take to convince the populace that .com is not the gold standard in domain names anymore? In my specific scenario, my company name is DigiVision Media. Our current website is . Recently, I've purchased and . My current thoughts are that the main site can be moved to digivision.media and I can use digi.vision as a link shortener. What are the advantages and disadvantages of using these specific tld's for my circumstances?
This is a question of my exam. What would a person experienced if he were put in any point inside the Earth that is hollow (all its mass is concentrated in the surface). Finding the gravitational field intensity, it turns out to be 0. I interpret it as if the person didn't experience any acceleration; as a result, He should stand still there where he was put in. That's what I get to conclude. But, what do you think?
It is quite easy to derive the gravitational field intensity at a point within a hollow sphere. However, the result is quite surprising. The field intensity at any point within a hollow sphere is zero. What exactly is the reason behind this? Except for, of course, the mathematics behind it. Is there any logic why the field intensity should be zero within a sphere? For example, it is logical to say that the field intensity would be zero at the center, as all the intensities cancel out. However, this cannot be the case for any point within the sphere.
I am currently trying to understand the JS prototype chain mechanism. I have tried the following: TestObject = function(){ this.sayHello(); this.sayGoodbye(); }; TestObject.prototype = { sayHello:function(){ alert("Hi thereee"); } }; TestObject.prototype.prototype = { sayGoodbye:function(){ alert("See yaaaaa"); } }; When I add <script>var test = new TestObject();</script> to my index.php, the following happens: First, a window pops up, saying "Hi thereee", which is what I'd expect to happen. But then, the console tells me that the application crashed because 'sayGoodbye' is not a member of the test object. So, my questtion is: what is happening here and how can I make actual prototype chains that are longer than just one single step? Thanks a lot to everyone in advance.
I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test(); I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong! function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK Also these really helped a lot.
I am trying to add a menu item which is supposed to be a separator which has a height set and divides items in the menu. I haven't managed to create a menu item which isn't a link. add_action( 'admin_menu', 'add_admin_menu_separator' ); function add_admin_menu_separator() { add_menu_page( '', '', 'read', 'test', '', 'none', '10000000' ); } Doing this creates a menu item without any text or icon, but it is still a link to /test. Using # won't work either because I don't want it clickable at all. Is there any workaround for this? Thank you!
Does anyone know how to add an admin menu separator? I found but it did not help. Any ideas?
How do I find combos of a list of lists of lists? Here is an example below. My list of lists of lists (where the 1st sublist can contain a single list or multiple lists): [[5,6],[[2,4],[5,7]],[1,8],[[-1,-2],[1,0]]] This what I want to get: [5,6],[2,4],[1,8],[-1,-2] [5,6],[2,4],[1,8],[1,0] [5,6],[5,7],[1,8],[-1,-2] [5,6],[5,7],[1,8],[1,0] Basically looking for the combos for that 2nd level list. I believe it's possible using the itertools lib but unsure how to use it.
How can I get the Cartesian product (every possible combination of values) from a group of lists? Input: somelists = [ [1, 2, 3], ['a', 'b'], [4, 5] ] Desired output: [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]
How can you see featured questions, i.e., questions with bounties, in the Stack Overflow Android app?
Can the Featured posts section be added to the Android app? I think it would be a good option to make it available.
I'm brute forcing a ciphertext with a given dictionary to figure out which key was used. However, it's been hinted at that there is a way to narrow down the dictionary to a smaller subset of possibilities. I know the plaintext, its ciphertext, and the IV (0). It was encrypted using AES-128-CBC and no salting was used during encryption. At first I thought I was onto something because of: $C_j = E_k(P_j \oplus IV)=E_k(P_j)$ for IV = 0. But I was dead in my tracks right after. Is this situation even plausible or am I barking up the wrong tree?
If I have the plain text and its output after encryption with a key K1, is it algorithmically feasible to find K1? I am specifically interested in the cases of DES and AES encryption algorithms.
i'm trying to make a table in elsarticle two side but the table seems to overwrite the text.. can someone help me to fix the problem , here the code \\\begin{table}[H] \centering \begin{tabular}{l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}l{2cm}} \hline & \textbf{MANF}&\textbf{CONSTR}&\textbf{ENERGY}& \textbf{TRSM}& \textbf{MMP}& \textbf{AGR}\\ \hline \textbf{MANF}&\0.2459 &1.0000 & & & & & \\ &0.03 & & & & & & \\ & & & & & & & \\ \textbf{CONSTR}&-0.1224 &0.2003 &1.0000 & & & & \\ &(0.18) &(0.05) & & & & & \\ & & & & & & & \\ \textbf{ENRGY}&0.1304 &0.1030 &0.0969 &1.0000& & & \\ &(0.18)&(0.18) &(0.34) & & & & \\ & & & & & & & \\ \textbf{TRSM}&0.1938 &0.1263 &0.0421 &0.2654&1.0000 & & \\ &(0.07) &(0.19) &(0.32)&(0.02) & & & \\ & & & & & & & \\ \textbf{MMP}&-0.0259 &0.0725 &0.2624 &0.4186&0.1894 &1.0000 & \\ &(0.56) &(0.42) &(0.02) &(0.00) &(0.07) & & \\ & & & & & & & \\ \textbf{AGR}}&-0.1096 &0.1730 &0.3065 &-0.1168&0.0813 &0.0243 &1.0000 \\ &(0.17) &(0.11) &(0.01) &(0.16) &(0.33) &(0.53) & \\ & & & & & & & \\ \hline \end{tabular} \caption{Correlations of Residuals in SUR regression equation} \label{tab:Correlations of Residuals in SUR regression equation} \end{table}
I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met: The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction. What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?
I'm very new to jquery and javascript, and I'm hoping anyone can help me find out how to count number of rows that has all their checkboxes checked. I have a checkbox form with dynamic amount of rows and 3 checkboxes on each row. What I want to find out is how many rows that has all the 3 checkboxes checked. All the rows has id tr0, tr1, tr2 ... This is what I have so far, it checks the first row (tr0) in my form and alerts "1" if all the boxes are checked in that row after you submit your table. When testing I have 3 tr rows + 1 header. $(function howManyAreChecked() { var checkedBoxes = 0; //when the submit button under the table is clicked $("#tabellSubmit").click(function howMany() { var rowCount = $('#qaTabell tr').length; //checks if row tr0 has all the boxes checked if($("#qaTabell #tr0 input:checked").length > 2) checkedBoxes = checkedBoxes +1; alert(checkedBoxes); checkedBoxes = 0; }); }); What I need to know is how I can change the if-test to check tr0, tr1, tr2, tr3... up to tr(number of rows in the table) instead of only tr0. Thanks in advance!
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I wanna preventDefault a dynamically added link that is not getting recognized by the on() method. However, the static link which was already on the page preventDefault()'s itself with the same function. <!DOCTYPE html> <html> <head> <title> Testing Phase </title> <script src="https://code.jquery.com/jquery-3.6.0.js" integrity="sha256-H+K7U5CnXl1h5ywQfKtSj8PCmoN9aaq30gDh27Xc0jk=" crossorigin="anonymous"></script> <script type="text/javascript"> $(document).ready(function(){ $("#txt").focus(); $('#btn').click(function(){ var inpt = $("#txt").val(); $("#dv").append("<p class='eo'>"+inpt+"--><a href='dynamic' class=''>This is dynamic link, it won't get preventDefault() with the on() method.</a></p>"); x++; }); $('.eo').on('click', function(e){ e.preventDefault(); }); }); </script> </head> <body> <input type="text" id="txt" name=""> <input type="button" id="btn" name="" value="Add"> <div id="dv"> <a href="nowhere" class="eo">This static link works with the on() method!</a> </div> </body> </html>
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
I would like to be able to dual boot on windows 10 and Ubuntu 14. First, I tried to install windows 10 after Ubuntu 14. I was not able to dual boot after that. I know that this is not the best way in this order. Here is what I tried to repair grub: https:// help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows https:// sites.google.com/site/easylinuxtipsproject/6 Anything worked. I send the URL of the result of bootRepair to [email protected] but their service has stopped. Then, I have removed both OS and reinstalled windows, first, and then Ubuntu to get the dual boot. During Ubuntu installation I checked that I wanted grub as boot loader to be able to choose which partition I wanted to use each time my PC starts. But it didn't work either. Does anyone had the same issue? Any workaround? EDIT is the bootRepair report for more details ============================= Boot Info Summary: =============================== => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1028794648 of the same hard drive for core.img. core.img is at this location and looks for (,gpt6)/boot/grub on this drive. => Syslinux MBR (3.00-3.35) is installed in the MBR of /dev/sdb.
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 idea of degrees of freedom is pretty well sunk into my head, but I was wondering could someone perhaps give me few easy examples on how one would determine the number of degrees of freedom? For example: Lets say that we have a sample of $n$ observations $x_1, x_2, ..., x_n$ following some distribution. Could someone come up artificial examples of different number of degrees of freedom with this sample, say: examples where degrees of freedom are: $$\text{degrees of freedom} = n$$ $$\text{degrees of freedom} = n-1$$ $$\text{degrees of freedom} = n-2$$ $$\text{degrees of freedom} = n-3$$ This would help get a grasp on, how one would determine the actual number of degrees of freedom. Thank you! :)
From , there are three interpretations of the degrees of freedom of a statistic: In statistics, the number of degrees of freedom is the number of values in the final calculation of a statistic that are free to vary. Estimates of statistical parameters can be based upon different amounts of information or data. The number of independent pieces of information that go into the estimate of a parameter is called the degrees of freedom (df). In general, the degrees of freedom of an estimate of a parameter is equal to the number of independent scores that go into the estimate minus the number of parameters used as intermediate steps in the estimation of the parameter itself (which, in sample variance, is one, since the sample mean is the only intermediate step). Mathematically, degrees of freedom is the dimension of the domain of a random vector, or essentially the number of 'free' components: how many components need to be known before the vector is fully determined. The bold words are what I don't quite understand. If possible, some mathematical formulations will help clarify the concept. Also do the three interpretations agree with each other?
Consider a random variable $X$ with continuous probability density $f(x)$ and compact support, say $[a,b]$ with $a<b$. Moreover, let $f(x)$ vanish at the boundary, i.e. $f(a) = f(b) = 0$. Question: What is the maximum variance which such a random variable can take? EDIT: It should have been mentioned here, that this problem is already solved in literature for probability densities without any further restrictions and the solution is given by a disrete (non-continuous) probability with weight 1/2 at the boundary. See comments and the "duplicate-link". However, I'm asking for a continuous probability density instead, which is zero at the boundary. With these two additionnal conditions, the question is completely different. Maybe, a solution does not exist. Then, maybe there is a sequence of continuous probability densities $f_n(x)$, $n=1,2,3...$, whose limes has maximum variance. But I don't know how to construct such a sequence which gets peaked at the boundary.
Is there a upper bound on the variance for a distribution that is confined say, in $[0,1]$, and has fixed mean $\mu \in [0, 1]$
Moderators have access to a user's profile/history to look at things necessary to perform our role - one of those is reviewing stuff. The system currently now only records on a user's profile if they were banned from review - but not if they failed audits. We can work it out of course - but it's a lot of clicking through and combining stuff from other screens together. Can we add to a user's profile "failed audit"?
We often get questions here on Meta or through other channels about why a particular user was banned from review by the system. Additionally, we frequently want to look into a user's review history when we see approved spam or other bad reviews in order to see if there's a larger problem with this user. However, it's not all that easy for moderators to get a comprehensive view of a user's review history right now. We can look in their recent review activity within their profile, but that hides reviews on deleted posts (like spam or non-answers) and some types of audits. Failed audits aren't identified or listed anywhere. Moderators do get access to more detailed statistics on review, and can eventually look at each user's reviews within a given queue, but this is a laborious process. I usually have to construct a URL by hand to look at a particular user's reviews. It would be really helpful for moderators to have quick access from a user's profile to a list of all of their recent reviews (including deleted posts), in the style of what we get from the review statistics view. Additionally, a list of audits with pass / fail status () would save a tremendous amount of time when researching this for a given user, instead of having to click through every single review to see if it was an audit.
Let $R$ a ring (with $1\in R$). I want to show that $R$ is a field $\iff$ it has exactly two ideals. For $\implies $ it's obvious. Indeed, if $R$ is a field and $I\neq \{0\}$ an ideal, then, $I=A$ since $$x\in I\implies xx^{-1}\in I$$ and thus $1\in I$. In particular, if $x\in A$, then $x\cdot 1\in I$ and thus $x\in I$. For the converse I don't really know how to do. My idea was the following one: I show that if $R$ is not a field then it has more that two ideals. Indeed, let $R$ be not a field. Then, there is $x\in R$ that has no inverse. In particular, $(x)\notin \{R,\{0\}\}$. Indeed, if $(x)=(0)$ then $x=0$ which is a contradiction. If $(x)=R$, then $1\in (x)$ and thus there is $n$ s.t. $x^n=1$ what prove that $x$ is invertible and is also a contradiction. Is it correct ? Is there a more direct proof ? i.e. like this: Let $A$ and $\{0\}$ the two ideal of $R$. How can I show that all element of $A\backslash \{0\}$ are invertible ? By contradiction, if not, the $$xy\neq 1$$ for all $y\in R$. Therefore, $(x)$ doesn't contain $1$, and thus, $R$ has at least three ideal, which is a contradiction. Is it correct ?
Let $R$ be a commutative ring with identity. Show that $R$ is a field if and only if the only ideals of $R$ are $R$ itself and the zero ideal $(0)$. I can't figure out where to start other that I need to prove some biconditional statement. Any help?
I want hostile mobs to attack each other using commands. I know something like entity.setTarget will work, but I don't know where to put it (Where in the summon command).
I want to make an arena where mobs will fight each other and a player can bet on one side or the other. For example: There are 2 skeletons in dyed armor; red and blue. Each color representing a team. When they spawn I want them to fight each and then when one dies I want it to announce which team is the winner and give the player the "money" due. I'm just not sure how to get the skeletons to attack each other without a player instigating it.
Is there a phrase for situation where animal is suffering, and then someone kills it because that person don't want that animal to suffer anymore
"Mercy killing" is an act of killing someone who is already dying and in terrible pain, in order to reduce his or her suffering. Is there any single word for "mercy killing"?
The proof of the Gauss's law for gravity provided by Wikipedia takes use of the divergence theorem. Is it possible to arrive at the integral form of the Gauss's law in a way which doesn't require the use of divergence? I'd like to derive it from the Newton's law. The main idea is: Assume that two points masses $m_1,m_2$ act on each other with force $F=\frac{Gm_1m_2}{r^2}$. Do something. Arrive at the integral form of the Gauss's law. So it doesn't have much in common with the "duplicates" I had one semester of analysis, so don't know anything about the Delta Dirac function and family
Is there an intuitive explanation why it is plausible that the gravitational force which acts between two point masses is proportional to the inverse square of the distance $r$ between the masses (and not only to the inverse of $r$)?
i have encountered a problem that is i have defined a static member variable inside a class with access specifier being private but whenever a constructor is called corresponding an object the compiler displays an error "undefined reference to MyObject::count" here is my class member variable declaration class MyObject { private: static int count; public: MyObject() { count=0; } };
Can anyone explain why following code won't compile? At least on g++ 4.2.4. And more interesting, why it will compile when I cast MEMBER to int? #include <vector> class Foo { public: static const int MEMBER = 1; }; int main(){ vector<int> v; v.push_back( Foo::MEMBER ); // undefined reference to `Foo::MEMBER' v.push_back( (int) Foo::MEMBER ); // OK return 0; }
I have an ArcScene (10.8) document with shapefile layers. I would like to export the 2d view into adobe illustrator for editing, but it appears as a raster. I suppose I could try to vectorize it in Ai, but that seems like a cumbersome workflow. This same layer, when exported from ArcMap, correctly shows up as an editable vector layer in Ai. I see two similar questions from years ago that have not been answered: Does anyone know if this is possible?
How can I export 2d vector graphic from ArcScene so I can edit it with Adobe Illustrator? I've tried changing the options when I export 2D scene as AI file or PDF file, but they always remain as a unique image that does not allow me to edit the lines and polygons.
Could anyone name the grammar rule that governs how "I would like to know what is your name." should be "I would like to know what your name is." If there isn't really a rule for that, could anyone explain why the verb and the noun should swap places for this type of sentence structure?
We always change subject and verb positions in whenever we want to ask a question such as "What is your name?". But when it comes to statements like the following, which form is correct? I don't understand what are you talking about. I don't understand what you are talking about. Another example Do you know what time is it? Do you know what time it is? Another example Do you care how do I feel about this? Do you care how I feel about this?
In Cookie Clicker, there is an upgrade called "One Mind". Besides giving the usual bonus to something (in this case grandmas), it comes with a red warning: "Note: The grandmothers are growing restless. Do not encourage them." If you try to purchase it the page pops up a warning: Warning : purchasing this will have unexpected, and potentially undesirable results! It's all downhill from here. You have been warned! Purchase anyway? With the options to purchase anyway or cancel. So far, I've always canceled. What happens if I buy "One Mind"?
There's a strong warning associated with the "One Mind" upgrade that says that "it's all downhill from here". As I'm still interested in playing, should I take this upgrade or wait? Will appreciate spoiler-free answers if it's at all possible.
I have reached a confusion. We know $$F=-kx$$ in a spring. If an external mass $m$ is suspended to a spring and the spring extends by a length $x$ and the mass comes to rest, external force, $~mg = \text{restoring force of spring} ~~kx$ ( talking about the magnitude only here) Again, at the stopping point, work done by external force will me $mgx$ and potential energy gained by spring will be $$\frac{kx^2}2$$ These terms must be equal as the system is in rest So $$k\frac{x\cdot x}2 = mgx$$ Cancelling out $x$, we get $$\frac{kx}2 = mg$$ These contradicts the original statement that $mg=kx$ Please help me. I am confused.
If a spring is stretched by a weight of mass m, (so the extension is $\Delta x$) then $ k = \frac W{\Delta x} = \frac {mg}{\Delta x}$. So $ k\Delta x= mg $. When the Spring is stretched by distance $\Delta x$ (by the weight) then it looses gravitational potential enegry. ($ \Delta GPE= mg\Delta x$) But, when we calculate the change in elastic potential energy, We get $ U = \frac 12 k(\Delta x)^2 $. Since $ k\Delta x = mg$, $U=\frac 12 mg\Delta x$ At, equilibrium we have no kinetic energy $E_k = 0$ Doesn't that violate Energy Conservation? Where does the rest of lost GPE goes? Here's a illustration
I'm a single mother of 2. My daughter is 13 and my son is 7. My son's father shot himself 2 years ago. That's when things started to change. When his dad was alive, my son never wanted to go to his house. He would scream and cry and latch on to me. So I would keep him with me. I know his dad watched a lot of porn. And I'm wondering if he saw it. At first I thought, "They're kids, and kids experiment." (I know I did when I was little.) In the past 2 years my niece and my son have been caught together more than a few times, and each time I would talk to them about it. My son has been caught with his pants down and my 5-year-old niece sucking his penis. I instantly told them to stop. I explained that kids don't do stuff like that. I told them it was disgusting and they should never touch each other again. I talked to my niece about it and she said he told her to do it. It happened a couple other times except it got worse. He tried to stick his penis in her vagina. They are no longer allowed to be around each other. And my son isn't going to be around any other kids until I find out what is going on. I'm just not sure why this is happening. I'm so scared he's going to be a bad person. I want to help him. When I talk to him about it he says, "I don't know, mom," and then changes the subject. How can I help my child?
I am a 20 year old female student and I have a 5 year old son who is really sexually active. For instance, he kisses girls by force, he forces them to lick his penis, he "fingers" them, he speaks about sex openly with everyone except me, his father and my family. There is a whole lot more that he does and the most frustrating part is that when teachers ask him where he saw those things, he says he learned it from me. We do not even live together. Currently I am in Cape Town doing my degree and he is in KZN with my mother. Since he was 8 months old, he went to live with his father because I had to finish high school. We never lived together. We have tried talking to him and it hasn't helped. We've punished him but still he keeps on getting worse. What should I do? I am really angry, embarrassed and confused. If I am not mistaken, this is his third year acting like this.
Let f:[0,1]->$\mathbb{R}$ be defined by f(x)=0 when x is irrational and f(x)=1/q when x=p/q with gcd(p,q)=1. Prove that f is integrable on [0,1]. What is $\int_{0}^{1}$f(x) dx? I only have knowledge of Riemann integrability conditions and results.The integral is obviously 0 i think but i really don't know how to do this. Any help would be appreciated!
Let $\displaystyle f: [0,1] \rightarrow \mathbb{R}$ given by $$f(x) = \begin{cases} 0 & x \notin \mathbb{Q} \\ \\ 0 & x = 0 \\ \\ \frac{1}{q_x} & x = \frac{p_x}{q_x} \in \mathbb{Q} \backslash \{0\}, \ p_x \in \mathbb{Z}, \ q_x \in \mathbb{N}, \ \text{gcd}(|p_x|, q_x) = 1 \end{cases}$$ Is $\displaystyle f$ Riemann integrable? I am trying to use the equivalent statements $\displaystyle g:[a,b] \rightarrow \mathbb{R}$ is Riemann integrable and $\displaystyle \forall \epsilon >0 \ \exists$ step functions $\displaystyle \rho, \psi$ with $\displaystyle \rho \leq g \leq \psi$ such that $\displaystyle \int_a^b (\psi - \rho) \leq \epsilon$. I guess that means I would have to somehow show that given $\displaystyle \epsilon$, there exists only a finite amount of $\displaystyle x \in [0,1]$ with $\displaystyle f(x) \geq \epsilon$? Is it recommended that I consider something else instead? If not, how should I do this?
I have a little issue with my ASUS UX31A. I just tried to do a clean install of Windows 7 64bit using a USB-Stick created using Rufus. The laptop booted from the USB stick and opened the Windows installation, after a few clicks I got the message "A required CD/DVD drive device driver is missing. If you have a driver floppy disk, CD, DVD, or USB flash drive, please insert it now.". I have tried literally every suggested trick (putting USB3 drivers on the stick, switching USB ports after error message...) but nothing works. I have no idea how to proceed and would be happy for any helpful suggestions.
I have an Asus R500VD laptop which came with the preinstalled Windows 8. As actually this computer will be used by my grandmother (and she's only using win 7) I'd like to downgrade it. Thanks to other thread here, I was able to successfully boot computer from Windows 7 USB stick, but unfortunately during install I got a message: A required CD/DVD drive device driver is missing. (...) and I can't get pass it... This is what I've done: I've downloaded all drivers from Asus Website (), unzip and copied to visible location for windows 7 installation - I've picked each one of them, none has helped. As I belive it's some kind of problem with SATA/RAID/AHCI drivers I went to Intel site and downloaded various "Intel Rapid Storage Technology" drivers - a lot of them were recognized by win7, but none of them helped. Does anyone have an idea what can I do next? Any help would be really appreciated.
If I want to write code that optionally uses a module how can I do it? For example, if I want to write code that warns Dumping an object if Data::Dumper is available or otherwise just warns, how can I do that?
I have Perl code which relies on Term::ReadKey to get the terminal width. My installation is missing this module, so I want to provide a default if the module isn't present rather than throw an exception. How can I conditionally use an optional module, without knowing ahead of time whether it is available. # but only if the module is installed and exists use Term::ReadKey; ... How can I accomplish this?
If you copy and paste some code and accidentally forget to remove sensitive info, is there a way to get rid of that information, so even the revision history doesn't contain it?
I've observed several incidents where users inadvertently posted detailed, sensitive information. For example, a Server Fault user who posted a question with working login credentials to his actual production server, or the Stack Overflow user who posted actual medical records as example data for his question. What should be the procedure for handling such cases?
I am an Indian Citizen applying for a UK visitor visa from the USA for myself and my family. Do I need to ship each application separately or can I send all of them together? Thanks for the help.
I am a permanent resident of USA. I am making a trip to India but planning a stop-over in London,UK for a week. For this stop-over , I am applying for a standard visitor visa. My biometric appointment has already been completed. Now I have to send applications for the visa for both me and my wife. 1.) Should I send both applications in same envelope? Maybe, put each application in small envelope and then put both applications in a bigger envelope? 2.) Should I put my financial documents (Bank statements , Pay Slips) in both applications(i.e. mine and my wife's)? 3.) I have an old passport which is expired. Is there any need to send this passport as well with my application? Thanks!
I need to know the exact meaning of . I AM confused what it actually means.They say all types of energy comes under 2 types kinetic and potential so what is potential energy then? My question ask for defination
I have a problematic question for which I have been unable to attain a satisfactory answer. What is truly? - I have read about how potential energy can be seen as the "highering" of an object within a field, be it gravitational, electromagnetic, etc. In a way, an object is lifted to a higher position, and when it eventually falls down again energy is released back. The object does not even have to be "lifted" beforehand, as with the case of asteroids. However, since energy cannot be destroyed, it must somehow be stored, yet how does energy truly store itself within a field? It seems hard for me to grasp that energy can physically be stored within the positioning of an object? I can't really get my head around how a field conserves energy within it. Kinetic energy on the other hand, can be, for me, intuitively understood, as the object really is "moving" and energy manifests itself through motion. Can anyone elaborate on this, perhaps give reasoning as to why a field can in fact "store" energy? Please point out any fallacious or naive views I seem to hold.
I'm tying to get expected rendering results from many days but not able to get it as seen in image. I have attached image of expected results.
Brand new to blender, and I'm trying to make a metallic object that is reflective. There are lots of tutorials on youtube, however none of them are compatible with blender 2.71 with the cycles render. Here are the tutorials I have tried: All of these tutorials have a 'transparency' and a 'mirror' option in the outliner menu that I just don't seem to have. How can I make this object reflective? Am I missing plugins or some other menu?
My Galaxy S3 just started notifying me of voicemails by stating out loud that I had a new voicemail. In addition, the alarm now states the time out loud as it plays the normal alarm music. I have checked and the Driving Mode is turned OFF and the alarm is set for melody. I receive no voice alerts for new emails, texts or incoming calls. Please advise.
I use the native Clock app, and my alarm used to just have a normal ringtone. I assume there was some automatic update recently because this morning, in addition to the normal ringtone, there was a robotic voice saying "It is 7:25 AM." Then later I got a notification from the native Calendar app, and in addition to my normal ringtone, the robotic voice announced the text of the notification. How do I shut this off? It's really annoying and I don't see an option in Settings.
What's more correct "is my hair" or "are my hair" when I'm referring to all my head hair? ("do my hair look bad" or "does my hair look bad" for example) Thank you
When one says I was washing my hair, is it singular or plural? What is the singular for hair?
According to the De Broglie hypothesis, wavelength equals to h/mv(m-mass, v-velocity, h-Planck constant), so by moving at a slow speed, that is reducing the v(velocity factor) can human beings with such high masses(m) have a wavelength that is long enough to interfere?
Many introductory quantum mechanics textbooks include simple exercises on computing the de Broglie wavelength of macroscopic objects, often contrasting the results with that of a proton, etc. For instance, this example, taken from a textbook: Calculate the de Broglie wavelength for (a) a proton of kinetic energy 70 MeV (b) a 100 g bullet moving at 900 m/s The pedagogical motivation behind these questions is obvious: when the de Broglie wavelength is small compared to the size of an object, the wave behaviour of the object is undetectable. But what is the validity of the actual approach of applying the formula naively? Of course, a 100g bullet is not a fundamental object of 100g but a lattice of some $10^{23}$ atoms bound by the electromagnetic force. But is the naive answer close to the actual one (i.e. within an order of magnitude or two)? How does one even calculate the de Broglie wavelength for a many body system accurately?
On my Macbook Air A1466 the shift key seems to be constantly pressed, even during boot so it only boots into safe mode because of this. The issue exists both before and after replacing the keyboard with a brand new one! This is what I've tried: Reinstalled MacOS Replaced the whole keyboard (painful process) Reset NVRAM (alt + cmd + p + r) during startup Hooked up an external keyboard (this one works fine, but shift is still held down) Tried Keyremapper: which helps WITHIN the OS, but not during boot Any ideas? PS: This is not a duplicate of . There it's simply a keyboard hardware issue, which is not the case here since the keyboard has been replaced.
This is an attempt to write a canonical QA for this issue, as per the Meta post: I expect it to be periodically edited with the goal of becoming a comprehensive information resource. I have a MacBook Pro that has a key(Shift, Return, Command, P, etc.) that doesn’t respond when pressed or is stuck in the down position. It's possible that my favorite beverage was spilled (or some other liquid damage). It's also possible that I have no idea what happened. It was working yesterday and suddenly today it's no longer working. Is there any way to bypass or remap the key? Can I have the system ignore it completely? (This question can also apply to external USB keyboards or the Bluetooth keyboards)
Let $p$ be prime. Prove if $p|(a^p - b^p)$, then $p^2 | (a^p - b^p)$ don't know where to begin, any help appreciated
$a$ and $b$ are natural numbers and $p$ is a prime number. Prove that if $a^{p}-b^{p}$ is divisible by $p$, then it is also divisible by $p^{2}$. My attempt: Based on Fermat's theorem $(a^{p}-a)$ and $(b^{p}-b)$ are divisible by p, therefore their difference is divisible by $p$. I.e. $(a^{p}-a)-(b^{p}-b)=(a^{p}-b^{p})-(a-b)$ is divisible by $p$. Since the left hand side of this equation is divisible by $p$, the right hand side also should be divisible by $p$. Based on the problem's assumption $(a^{p}-b^{p})$ is divisible by $p$ therefore we conclude $(a-b)$ must be divisible by $p$. Now We can factorize $(a^{p}-b^{p})$ $$(a^{p}-b^{p})=(a-b)(a^{p-1}+a^{p-2}b+....+b^{p-1})$$ we have to prove $(a^{p}-b^{p})$ is multiple of $p^2$ which means we have to show the right hand side should be multiple of $p^{2}$. But $(a-b)$ is multiple of p therefore we have to show $(a^{p-1}+a^{p-2}b+\cdots+b^{p-1})$ is multiple of $p$ and I am stuck here. Any help would be appreciated.
So, I'm having problems with my code. I'm simply trying to run an example code to see how it works (I'm a newbie at C++) and this error is appearing everytime I call the List class. Here's the code: //main.cpp #include <iostream> #include "List.h" using namespace std; int main() { List<char> list; // 5 types created using a 'for' loop // and calling the ‘add’ function for (int i = 101; i <= 105; i++) { list.add(char(i)); } list.display(); // should output a, b, c, d, e // in this example. cout << endl; return 0; } And here's the List class //List.h #pragma once #include "Link.h" template <class F> class List { private: Link<F>* head; public: List(); int add(F theData); void display(); }; and I'll also put List.cpp to help: //List.cpp #include "List.h" template<typename F> List<F>::List() { // 'head' points to 0 initially and when the list is empty. // Otherwise 'head' points to most recently // added object head head = 0; } template<typename F> void List<F>::display() { Link<F>* temp;// 'temp' used to iterate through the list // 'head' points to last object added // Iterate back through list until last pointer (which is 0) for (temp = head; temp != 0; temp = temp->Next) { cout << "Value of type is " << temp->X << endl; } } template<typename F> int List<F>::add(F theData) { // pointer 'temp' used to instantiate objects to add to list Link<F>* temp; // memory allocated and the object is given a value temp = new Link<F>(theData); if (temp == 0) // check new succeeded { return 0; // shows error in memory allocation } // the pointer in the object is set to whatever 'head' is pointing to temp->Next = head; // 'head' is re-directed to point to the last created object head = temp; return 1; } When I run, It gives me these errors: PS. I'm using VS2017 btw. Thank you
I have some template code that I would prefer to have stored in a CPP file instead of inline in the header. I know this can be done as long as you know which template types will be used. For example: .h file class foo { public: template <typename T> void do(const T& t); }; .cpp file template <typename T> void foo::do(const T& t) { // Do something with t } template void foo::do<int>(const int&); template void foo::do<std::string>(const std::string&); Note the last two lines - the foo::do template function is only used with ints and std::strings, so those definitions mean the app will link. My question is - is this a nasty hack or will this work with other compilers/linkers? I am only using this code with VS2008 at the moment but will be wanting to port to other environments.
Question: If A + B = 54 and `AB = 629`, find A and B I am not sure how to approach this problem since the question itself does not give much clue.
Which two numbers when added together yield $16$, and when multiplied together yield $55$. I know the $x$ and $y$ are $5$ and $11$ but I wanted to see if I could algebraically solve it, and found I couldn't. In $x+y=16$, I know $x=16/y$ but when I plug it back in I get something like $16/y + y = 16$, then I multiply the left side by $16$ to get $2y=256$ and then ultimately $y=128$. Am I doing something wrong?
I've got a text mesh but i'm trying to make it so that it's not filled but instead is just an outline of text is there anyway to do this? This is the effect i'm trying to achieve:
How would one add outline to a text object? Do text objects even have outline support? Should I instead create the text in GIMP or a similar program and import them in blender to replace the text objects?
in my program I have 2 headers (IP and MAC headers) that are 'sons' of GeneralHeader. All General, IP and MAC headers classes have PrintMe() function. In addition, I have a Packet class that holds list of GeneralHeaders (the list actually may have IP or MAC headers: (without IP defenition, to shorten): //Packet.h class GeneralHeader { public: bool Valid; HeaderType_t HeaderType; // MAC or IP virtual void PrintMe(); }; class HW_MACHeader: public GeneralHeader { public: long unsigned DestAddr:48; long unsigned SourceAddr:48; virtual void PrintMe(); }; struct NetworkPacket_t { NetworkPacket_t(); list<GeneralHeader> Headers;//TODO GeneralHeader void PrintMe(); }; I have dificulty to implement the PrintMe() method that will print the list of GeneralHeaders using the appropriate for MAC or IP PrintMe() method (not the base PrintMe() of GeneralHeader): //Packet.cpp //This implementation prints GeneralHeaders :( //(although MAC headers were added to the Headers list) void NetworkPacket_t::PrintMe() { list<GeneralHeader>::iterator it_H; for (it_H = Headers.begin(); it_H != Headers.end(); ++it_H) { it_H->PrintMe(); }; }; Another try was to cast the iterator it_H to appropriate MAC or IP header (according to HeaderType), but whichever way i tried to cast it, it did not work, e.g.: //Packet.cpp //Casting implementation //Here I get run error: //terminate called after throwing an instance of 'std::bad_cast' void NetworkPacket_t::PrintMe() { list<GeneralHeader>::iterator it_H; for (it_H = Headers.begin(); it_H != Headers.end(); ++it_H) { switch (it_H->HeaderType) { case General_Header_type: std::cout << " General Header " << endl; it_H->PrintMe(); break; case MAC_Header_type: dynamic_cast<HW_MACHeader&>(*it_H).PrintMe(); break; default: std::cout << " default" << endl; }; }; }; I really appreciate any help you can prvide
Someone mentioned it in the IRC as the slicing problem.
In a few weeks I'll travel from Europe to USA. I'll stay there for some months and in my fisrt period there I'll need a large ammount of money for living there (let's say 2000-3000$). So my question is: which one is the best way (trade-off between cheapness and security) to have money there? (Assuming that I'll open an account as soon I'll arrive there.) Bring cash and deposit them in the American bank when I will arrive? Make a money transfer from my country back to the American one?
Recently my wife and I traveled to Italy and before we left we got about 85% of our money in travelers checks and the other 15% we carried on in cash. When we arrived there, no one would take our travelers checks and many places did not accept credit cards. Eventually, we found some currency exchange places that would take the travelers checks and give us Euro's, but at a 7-15% fee, which was not really a very fun surprise. While I was under the impression that it is safer to use travelers checks, it seems that they were not really accepted (the usual explanation being fraud). So the question is, is it best to just exchange your currency at home and carry all of it with you when you travel or are there other alternatives to carrying cash that are safer and cost effective?
Let $A$ and $B$ be two finite sets with $\vert A \vert = \vert B \vert$ and $f$ be a function from $A$ to $B$. show that if $f$ is an injective (one-to-one) function then it is also a surjective function. Answer: i don't know if this assumption right or wrong By contradiction that function $f$ one to one $\Rightarrow$ onto we assume that $f$ is not onto function $\forall a \in A∶f(a)\neq b$ $\vert A\vert=\vert B\vert$,then there exist two different elements in $A$ such that have same image one to one function then for $\exists x \in A ,\exists y \in B ,f(x)=f(y)\land (x\neq y)$. However Since $f$ is one to one function,$f(x)=f(y)$ implies $x=y$ $\exists x \in A ,\exists y\in B ,f(x)=f(y)\land (x\neq y)$. by negation law we obtain that last statement is F(false)and we obtain contradiction thus $f$ is onto since it's one to one.
Suppose $X$ is a set and $f : X \to X$ is a function. If $X$ is a finite set, prove that $f$ is injective if and only if $f$ is surjective. Show that when $X$ is an infinite set, the statement is not true in general. For that, let $X = \mathbb{R}$ and find a function $f: \mathbb{R} \to \mathbb{R}$ which is injective but not surjective, and a function $g: \mathbb{R} \to \mathbb{R}$ which is surjective but not injective My attempt at the first part Suppose that the function is surjective but not injective. Let $a,b \in X$ such that $f(a)=f(b)$ but $a \not =b$. Now since this is a finite set mapping to itself then there are not enough elements in $X$ to map to $X$ since two elements were used to map to one element, thus the function can't be surjective. Therefore if the function is surjective it is also injective. Now suppose that the function is injective but not surjective. Let $a \in X$ such that $f(b)\not =a$ for all $b \in X$. Since the function was assusmed to be injective each $a \in X$ must map to an element of $X$, thus must have two elemetns in $X$ mapping to the same element in $X$. Hence the function can't be injective, therefore if the function is injective it must be surjective. Would an exponetial function work for injective but not surjective since can't map to negative numbers. And an example of a function that is surjective but not injective could be a log function since none of the negative numbers get mapped to anything? Also I'm having trouble seeing why it has to be finite for the first part to work. I understand it has something to do with the pigeonhole principle but its not that clear to me.
Sorry im new to java, may i know how can i add extra time in here? SimpleDateFormat timestampFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); String currTimestamp = timestampFormat.format(new Date()); System.err.println("currTimestamp=="+currTimestamp); // 2014/10/17 14:31:33
I'm working with a date in this format: yyyy-mm-dd. How can I increment this date by one day?
Prove the triangle inequality |z+w|≤|z|+|w| where z,w ∈C by an invoice. When does equality hold? Interpret the triangle geometrically. By definition for a complex number z=x+yi z=x+yi , |z|2=x2+y2=Re(z)2+Im(z)2 |z|2=x2+y2=Re(z)2+Im(z)2 From here, |z|2≥Re(z)2and|z|2≥Im(z)2 |z|2≥Re(z)2and|z|2≥Im(z)2 And, finally, |z|≥|Re(z)|and|z|≥|Im(z)| |z|≥|Re(z)|and|z|≥|Im(z)| b)|z+w|2=(z+w)⋅(z+w)′ |z+w|2=(z+w)·(z+w)′ =(z+w)⋅[z′+w′] =(z+w)·[z′+w′] =zz′+[zw′+z′w]+ww′ =zz′+[zw′+z′w]+ww′ =|z|2+2Re[zw′]+|w|2 =|z|2+2Re[zw′]+|w|2 ≤|z|2+2|zw′|+|w|2 ≤|z|2+2|zw′|+|w|2 =|z|2+2|z||w|+|w|2 =|z|2+2|z||w|+|w|2 =(|z|+|w|)2 =(|z|+|w|)2 . c) Since both |z+w| |z+w| and |z|+|w| |z|+|w| are non-negative, |z+w|≤|z|+|w| |z+w|≤|z|+|w| What is next?
I was wondering how to prove the triangle inequality with complex numbers: Verify that the function $d(z_1, z_2)$ is a distance funtion on $\mathbb{C}$ and also on any subdomain on $\mathbb{C}$. I finished all but the inequality, which is what I need assistance with. I don't know how to prove the distance function inequality: $d(z_1, z_3) \le d(z_1, z_2) + d(z_2, z_3) $
I'm trying to implement a Baudot character encoding. Right now, I'm using 2 dictionaries which are simply mirrors of each other: Dictionary<char, int> Lookup = new Dictionary<char, int> { { ' ', 0x100100 }, { '-', 0x011000 }, { '/', 0x010111 }, { '0', 0x001101 }, { '1', 0x011101 }, ... }; Dictionary<int, char> Reverse = new Dictionary<int, char> { { 0x100100, ' ' }, { 0x011000, '-' }, { 0x010111, '/' }, { 0x001101, '0' }, { 0x011101, '1' }, ... }; Is there a built in type that handles this already? Something like: var lookup = new Lookup<int, char>(); lookup.GetByKey(0x100100); lookup.GetByValue('c'); I couldn't find anything when I searched for 'reverse lookup' or 'lookup table', everything seemed to be related to DNS or LinqToSql. (I'm using because it's necessary for some devices)
I am looking for a generic, bidirectional 1 to 1 Dictionary class in C# (2), ie. a BiDictionaryOneToOne<T, S> which is guaranteed to only contain one of each value and key (up to RefEquals anyway), and which can be searched using either key or value. Anyone know of one, or should I just implement it myself? I can't believe that I'm the first person to need this... There is a BiDictionary in the answers to , but it is not for unique elements (and also does not implement RemoveByFirst(T t) or RemoveBySecond(S s)). Thanks!
When an electron is excited to higher energy levels, it will jump back to the same level from which it was excited. Why does it develop "sentiment" with that level?
When an electron absorbs energy and jumps to the another excited state by absorbing the photon and why it is always said that the electron will come back to $\hbar\omega/2$? Why doesn't the electron sit in the excited state ? What is the actual reason for it to come back to ground state?