So I've seen many solutions to this problem using the idea of a quotient group. In my class, however, we have no covered quotient subgroups, so I am looking for a different way to prove this. So far, my line of thinking has been to assume such a subgroup ($H$) exists, choose an arbitrary $q \in \mathbb{Q} \setminus H$, and show that we must have $q \in H$. If $H$ is of finite index, there must be finitely many cosets, so I started looking at some cosets:  $0+H \rightarrow$ This is just $H$, since $H$ is a group, so closed under operation.  $q+H \rightarrow$ This coset contains $q$, but cannot contain $2q$ or $0$, since that would imply that $q \in H$.  $2q+H \rightarrow$ This contains $2q$, but not $3q$ or $q$, since $q \notin H$.  $nq+H \rightarrow$ Contains $nq$, but not $(n-1)q$ or $(n+1)q$.  I've also noticed that if $H$ is to have finite index, then eventually the cosets of integer multiples of $q$ must repeat. That is  $$\exists\ k,m \in \mathbb{Z}\ \text{with}\ kq+H = mq+H$$  $$\iff$$  $$kq+h_1 = mq+h_2\ \text{for some}\ h_1,h_2 \in H$$ $$\iff$$ $$(k-m)q = h_2-h_1 \in H$$ $$\iff$$ $$\text{Some integer multiple of}\ q\ \text{is in}\ H$$  But I don't think this is a contradiction, so I'm not sure how to proceed.   I think that if I could show that every $q$ has an integer multiple, then we could show that every $q$ must be in $H$, since we would be able to express any rational number as an integer multiple of another one. However, this line of reasoning would only hold if the integer multiple was the same integer for any rational we choose (perhaps it would be the order of the subgroup?)  An answer or a hint would be hugely appreciated.

Consider the group $\mathbb{Q}$ under addition of rational numbers. If $H$ is a subgroup of $\mathbb{Q}$ with finite index, then $H = \mathbb{Q}$.  I just saw this on our exam earlier and was stumped on how to show this. Any ideas?


I have an HP laptop with 2 partitions:  C: and D:, with windows 7 installed in the C: drive and D: is the Recovery partition.   When I try to install Ubuntu 12.04 LTS using Wubi, it only shows the C: drive for installing and not the D: drive where I wanted to format and install ubuntu.   So, if I go ahead and install in the C: drive where windows 7 is already installed, would Wubi erase windows 7? Or it will just install Ubuntu as a program in windows?

At this time, Wubi does not work with Windows 8 default boot-loader. Thus at this point Wubi would not work on a new Windows 8 machine.      Citation fom    Question  Recently I've learned of , a way to install Ubuntu right from Windows.  Besides installing from Windows, I would like to know key differences between a regular "alongside Windows" or Dual-boot Ubuntu installation and one done with Wubi. Are there any disadvantages (for example a performance penalty) or incompatibilities I should look out for when using Wubi?


Is there a way to split the viewport so I can view my unsubdivided model in edit mode and my subdivided model in object mode at the same time? I'd like to be able to edit my mesh and see it update on a subdivided version on a separate window. Thanks!

When I split screen in two and switch Edit/Object mode, they both change. How to change just one? The intention here is:  use one to modelling with numkey view with transparent wireframe and the other to see the progress in perspective, with solid mesh


What's the the result of:  $$\sum_{k=1}^{n}{\sqrt{k}+1}$$  Thanks.

What is $\sum\limits_{i=1}^n\sqrt i\ $?   Also I noticed that $\sum\limits_{i=1}^ni^k=P(n)$ where $k$ is a natural number and $P$ is a polynomial of degree $k+1$. Does that also hold for any real positive number? How could one prove it?


I am trying to get Jasper Reports to work, but I have been getting the following error:  Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JasperCompileManager         at com.suhail.main.JasperCSVDataSource.start(JasperCSVDataSource.java:21)         at com.suhail.main.CommandLineRunner.main(CommandLineRunner.java:8) Caused by: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JasperCompileManager         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)         ... 2 more   I cannot understand the reason for this. Here is how my project hierarchy looks like:    The class CommandLineRunner is the main class which invokes JasperCSVDataSource.   Here is my how CommandLineRunner class looks like:  package com.zetcode.main;  public class CommandLineRunner {      public static void main(String[] args) throws Exception {          JasperCSVDataSource app = new JasperCSVDataSource();         app.start();     } }   and the class JasperCSVDataSource that results in an error is:  package com.zetcode.main;  import java.util.HashMap; import java.util.Map;  import net.sf.jasperreports.engine.*;  public class JasperCSVDataSource {      public void start() throws JRException {         try {             System.out.println("In here!");             String xmlFile = "src/main/resources/report2.xml";             JasperReport report = JasperCompileManager.compileReport(xmlFile);              String[] columnNames = new String[] {"Name", "Quantity"};               String fileName = "src/main/resources/items.csv";              JRCsvDataSource ds = new JRCsvDataSource(fileName);              ds.setColumnNames(columnNames);               Map parameters = new HashMap();               JasperPrint jprint = JasperFillManager.fillReport(report, parameters, ds);               JasperExportManager.exportReportToPdfFile(jprint,                      "src/main/resources/report2.pdf");         }catch(Exception e) {             System.out.println("Error!!");             System.err.println(e);         }     } }   The pom.xml looks as follows:      <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0"          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                              http://maven.apache.org/xsd/maven-4.0.0.xsd">      <modelVersion>4.0.0</modelVersion>     <groupId>com.zetcode</groupId>     <artifactId>JasperCSVDataSource</artifactId>     <version>1.0-SNAPSHOT</version>     <packaging>jar</packaging>     <properties>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>         <maven.compiler.source>1.8</maven.compiler.source>         <maven.compiler.target>1.8</maven.compiler.target>     </properties>      <dependencies>          <dependency>             <groupId>net.sf.jasperreports</groupId>             <artifactId>jasperreports</artifactId>             <version>6.8.0</version>         </dependency>      </dependencies>      </project>   To run the code, I do the following:  mvn dependency:build-classpath cd target/classes java com/zetcode/main/CommandLineRunner   What is it that I am doing incorrect?

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


Let $A$ be an $n\times n$ matrix. I want to know how to prove the fact that the coefficient of $x^k$ in $\det(xI+A)$ is the sum of the determinants of all $(n-k)\times (n-k)$ principal submatrices of $A$.

For a given $n \times n$-matrix $A$, and $J\subseteq\{1,...,n\}$ let us denote by $A[J]$ its principal minor formed by the columns and rows with indices from $J$.  If the characteristic polynomial of $A$ is $x^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0$, then why $$a_k=(-1)^{n-k}\sum_{|J|=n-k}A[J],$$ that is, why is each coefficient the sum of the appropriately sized principal minors of $A$?


I don't want to play with physical laws in a frivolous way.  Assuming that the nature of matter and energy is the same, can a high density of highly energetic photons produce a gravity force?  We do know that radiation is affected by space-time distortions, or in another way "feels gravity". Why do photons can (or cannot) produce a gravity field?

I know a photon has zero rest mass, but it does have plenty of energy. Since energy and mass are equivalent does this mean that a photon (or more practically, a light beam) exerts a gravitational pull on other objects? If so, does it depend on the frequency of the photon?


There are may ways to initialize a variable for eg string varName; and so on. But what is the different between var appWindow = new AppWindow(); and AppWindow appWindow = new AppWindow();  Are they the same?   Can anyone please explain me the reason as I am foreign for c#.  Thanks

After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var?  For example I rather lazily used var in questionable circumstances, e.g.:-  foreach(var item in someList) { // ... } // Type of 'item' not clear. var something = someObject.SomeProperty; // Type of 'something' not clear. var something = someMethod(); // Type of 'something' not clear.   More legitimate uses of var are as follows:-  var l = new List<string>(); // Obvious what l will be. var s = new SomeClass(); // Obvious what s will be.   Interestingly LINQ seems to be a bit of a grey area, e.g.:-  var results = from r in dataContext.SomeTable               select r; // Not *entirely clear* what results will be here.   It's clear what results will be in that it will be a type which implements IEnumerable, however it isn't entirely obvious in the same way a var declaring a new object is.  It's even worse when it comes to LINQ to objects, e.g.:-  var results = from item in someList               where item != 3               select item;   This is no better than the equivilent foreach(var item in someList) { // ... } equivilent.  There is a real concern about type safety here - for example if we were to place the results of that query into an overloaded method that accepted IEnumerable<int> and IEnumerable<double> the caller might inadvertently pass in the wrong type.  var does maintain strong typing but the question is really whether it's dangerous for the type to not be immediately apparent on definition, something which is magnified when overloads mean compiler errors might not be issued when you unintentionally pass the wrong type to a method.


I want to find the center of a closed oval, but it can't be done with the tools, so I thought that it is possible to connect the extreme points of this oval and where the intersection of these lines will be and there will be a center, how can this be done?  I tried to find the center with the meancenter tool, but it gives strange results, clearly not where the center is. I have an oval that is in the photo, but it doesn't have an attribute table, and there is also a point layer that contains 360 values. I created the lines, but they are not straight and arc-shaped, how can I fix it?   I couldn't find the right center, I don't understand how I can find it

I have a point layer that has Lat/long coordinates. How to find the center of a given point layer. For more understanding, I attached a drawing. How is it possible to do this?  I tried to use the tools "Mean center", "FeatureToPoint", but they give false results and find exactly not the center, can there be other tools or can you somehow find it using python, I have an attribute table that contains only the lat/long coordinates (-180 :180) (-90: 90). Maybe you can use some formulas?


A company puts five different types of prizes into their cereal boxes, one in each box and in equal proportions. If a customer decides to collect all five prizes, what is the expected number of boxes of cereals that he or she should buy?  TRY Let $X$ be the number of boxes customer buys. For $i=1,2,3,4,5$, write $$ X_{ij} = \begin{cases} 1, & \text{ith prize is inside jth box} \\ 0, & \text{otherwise} \end{cases} $$ As I understand the problem, the number of boxes is not given so we may write $$ X = \sum_{j=1}^{\infty} \sum_{i=1}^5 X_{ij} $$ So $$ E(X) = \sum_{j \geq 1 } \sum_{i=1}^5 E(X_{ij}) $$ We know $E(X_{ij}) = P(X_{ij}=1)$ so we need to find proobability that ith  prize is inside jth box. Here is the part where I get stuck. Am I appraoching this problem the correct way?

What is the average number of times it would it take to roll a fair 6-sided die and get all numbers on the die?  The order in which the numbers appear does not matter.  I had this questions explained to me by a professor (not math professor), but it was not clear in the explanation.  We were given the answer $(1-(\frac56)^n)^6 = .5$ or $n = 12.152$  Can someone please explain this to me, possibly with a link to a general topic?


So these are stains that I tried to get off with everything this board has adviced. Still no end in sight.  I tried baking soda, citric acid, white vinegar, bar keeper's friend etc.  Does anyone know what these are? First time I'm getting these in 5 years of cooking, hard as hell to get off. I even tried to scratch it off but it doesn't work.

I know this question has been asked before in some form or another, but I can't seem to find a definitive answer. I've looked on SA, chowhound, martha stewart, about.com, etc., and answers seem to vary. Answers that I've seen vary from using vinegar to washing using special stainless steel soaps (which I'm not very keen on using) to only using soft sponges and hot water.   The one thing I always do is wash my stainless steel with warm soapy water and a soft sponge. If there's burned food stuck on the cookware, I scrape it off with a wood pot scraper (lightly, of course). And I always dry with a soft cloth immediately after washing. Yet I still get stains!  I'd like to get a general consensus on how to prevent those white and rainbow colored stains as well as minimizing corrosion.


It's mentioned in the Unfinished Tales that     Sauron’s “mightiest servants, the Ring-wraiths, who had no will but   his own, being each utterly subservient to the ring that had enslaved   him, which Sauron held.”   Even Gollum was bound to the ring he possessed once (the One Ring), was subservient to the ring's master, was enslaved to the One Ring. His will was also bound to the ring, but it did not stop him from betraying his master (actually the ring's current master, Frodo) to regain the ring.  So what would stop the Nazgûl from uniting and attacking Sauron to reclaim their rings? After all, Sauron did not yet have the one ring and did not have his full power. All the power that Sauron possessed at the time was through his servants (orcs, evil men, beasts and Nazgûl). Saruman had already been vanquished. As the witch king of Angmar was the commander of Sauron's forces, could he not lead a mutiny against Sauron? Is it that even in his weak state Sauron was undefeatable by all the Nazgûl combined?

The One Ring gave Sauron control of the Nine, yet when it was taken from him he still possessed the power to control them (or, at least he regained it towards the end of the third age).  Why is this?   mentions that he drew the Nine to him, but not how.


I more often than not don't really care about travel times, I would happily seek out the cheapest time within a 2-3 month period.  All the online sites I come across give you the option to select a date with a variation of -7/+7 days.  I would like to know if there is a site that will just find me the cheapest prices but that is more relaxed on the date.  I am from the UK, any specific sites are preferred.

Several airline and trip planning sites will allow you to check "I am flexible with my dates" or a similar option.  Is there any way to also search more broadly for location?  For example, if you wanted to leave from YYZ or YKF and arrive at any airport in California, can a search for such flights be done somehow?  I ask because when I plan plane trips, I want the lowest price.  I'm OK with leaving a day or two later if I save $200 (same with the return trip).  There are 3 airports within 80 km of me, I'll leave from the one with the cheapest flight. And I'm also OK with changing the trip to spend time exploring San Francisco instead of lying on the beach near San Diego, and that sort of thing.  Normally this would take dozens of searches, but I'd like to see it all at once.


I am thinking of switching to Ubuntu, but I am concerned about some things:   Does Ubuntu supports the usage (read/write) of previous data (from Windows formatted NTFS drives) or do I have to completely format my HDD  to ext3 file system to fully use Ubuntu? Can Ubuntu read and write the file format of Windows based programs, e.g Office documents with doc, ppt, xls format? Can Ubuntu install Windows based programs, like Photoshop and FL Studio? What gaming options does Ubuntu provide?

My machine is currently running Windows 7. I have 2 partitions: OS (C:) and DATA (D:). I intend to do a native Ubuntu 14.04 install. Assuming I format my Windows OS partition, will I have full access to my D partition in Ubuntu ?


I want to run a command that needs an active bone and I want to change the active bone in a script so after I finish the command I dont have to select another object to run the command again

I'm trying to use the function  on bones through a script, but stupid thing is that I can't find how to set the bones as active ones which is needed to call this function.


How can I change the default runlevel in Lubuntu 14.04? Some say by changing the inittab file but, I can't find any /etc/inittab file in my computer.

How can i change the runlevel in ubuntu 10.04 or 10.10 As far as I can recall ubuntu changed the runlevel with something else?  If I want to change the start to terminal only and not X what and r


I am trying to update a single element in my nested list structure   I wanted to initialize an empty list as below  a= [[0]*2]*2 a [[0, 0], [0, 0]]   Now i want to update only the 0,0 th element. So i end up assigning that like below.  a[0][0] = 999   However i notice that the 0th element of each nested list is getting updated.   a [[999, 0], [999, 0]]   So i have noticed that this does not happen if i Initialize the list as below   b = [[0,0],[0,0]]  b[0][0]=999  b [[999, 0], [0, 0]]   Can anyone help in my understanding of the above two different approaches and why one works and the other does not.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


As a specimen consider the :     I have a list of hashs (md5), around 50K. I'm looking for the best   solution to write a script that compare my hashlist to a huge (many GB   txt file) dictionary. I used Python to generate that dictionary,   should I use the same language to compare hash match ? or do you   advise me to use a better/faster solution ? Note : the program will be   used in a dedicated server (Good CPU/Memory ressources).   [I have already asked for its deletion]  The only practical purpose of this question is hacking passwords. The large file is a rainbow table and the small file a purloined list of password hashes. The poster was asked and flat declined to say what they are doing.  So the only practical purpose is malicious hacking and the poster has refused to provide a legitimate purpose. Malicious hacking of that kind is illegal in all civilised countries.  I can't find an explicit statement of policy that such topics are forbidden. I've seen a couple of questions discussing how to handle these questions but no clear statement of site policy. I believe there should be such a policy and a clear statement to that effect in the Help Center.  I realise there's a hacking tag and I think there's such a thing as non-malicious hacking. For example, trying to modify your player file in Minecraft can be called hacking but is non-malicious. I'm asking about questions the only practical reason for is to further obviously criminal and most likely harmful activity.   I'll log my reply to some of the responses I get:  Response: How do we know it's for a malicious purpose?  Reply: It's obvious. Even the file sizes ring true with a rainbow table attack. If you can email asking you your PIN for research purposes who you give them the benefit of the doubt? OK. That question is about hacking to the same degree of certainty. There are 'dual use' questions and a grey area. Sure. That post is about hacking.  Reponse: Maybe asking is OK.  Reply: Learning about rainbow table attacks is valuable education and should be core syllabus for every Computer Science student in the world. Detailed techniques for efficient implementation have crossed the line. If this person is in an academic institution their professor will explain it to them and they don't need an answer to that simplistic question.

I've seen posts pop up every once in a while on virus coding, and I went to flag them, but I didn't see a category under which to do so. After further investigation, I've had no luck finding rules against it, so I presume this means that there are no rules against it (correct me if i'm wrong). So my question is, why is this allowed, is it even legal, and should we allow it?


Consider the following numpy vector of number: a = np.array([.1, .2, .2, .2, .2, .1])  Obviously, the sum of these numbers gives 1. However, when computing b = np.sum(a)  I get print (b) 0.9999999999999999  Could you anyone explain why and how to solve this approximation issue?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


The internal speakers are not working. However the headphones are working. There is no problem with the speakers as they work perfectly fine in Windows 8.

I use a ASUS N550JV laptop with Ubuntu 14.04 and Windows 8 dual boot. The Bluetooth module is atheros ar3012. Since the day Ubuntu is installed, the behavior of Bluetooth and speaker is weird. They are not totally dead. They sometimes work, but I find no pattern about when they  work and when they don't. Sometimes Bluetooth works right after start up. In other time, the Bluetooth icon does not show up in menu bar (I have "Show Bluetooth status shown in menu bar" checked in settings). When I enter settings, Bluetooth is shown to be off. Even though I can set it to On by clicking it, the device menu below still shows "Bluetooth is disabled" and I cannot search and add device (I use a Bluetooth mouse). Also, if I close the settings and open it again, Bluetooth will be set to off again. The same is with the speaker. Sometimes it works right after startup but sometimes it just refuse to work. I am so confused. Could anyone  tell me how to solve this problem? Thanks in advance.  P.S. Every time I start up, at the page where I enter my password to log in, it always pops up a window titled "Authentication required by Wi-Fi network" and asks me for wifi password. But even if I type in the password, the connect button is still grayed out. Does this has anything to do with the problems above?  Edit: I checked /var/log/dmesg and the error about bluetooth is as follow:     [    5.032070] Bluetooth: Error in firmware loading err = -110,len = 448, size = 1184   [    5.032126] Bluetooth: Loading sysconfig file failed   [    5.032166] ath3k: probe of 3-5:1.0 failed with error -110


I work with the Java FileSystem and i will know is the File a Directory, but i get every time a NullPointerException.  Path path = Paths.get("C:/dev"); System.out.println(Files.isDirecory(path, null);

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I need a .htaccess expression to use the second get variable or get the get variable by name. Currently my mod_rewrite alters the URL to remove index.php filename and alter the pageName GET variable so that it just looks like a filename.   I now need a second GET variable, but currently the way it is, it does not even recognise get variables after the first rewrite, so I would like the mod_rewrite to handle the second var which will be 'blogpage=1'(1 will be the blogpage that you are currently on) so that it will look like so:  *********.co.uk/PageName/2   instead of this  *********.co.uk/PageName?blogpage=2   As this does not currently work, the PHP script simply thinks that the var is not present and returns a NULL value.  This is my current mod_rewrite conditions:  RewriteCond %{REQUEST_fileNAME} !-d RewriteCond %{REQUEST_fileNAME} !-f RewriteRule ^([^/\.]+)/?$ index.php?pageName=$1

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.


Recently i purchased a Canon EOS M50 Mirrorless Camera Kit w/EF-M15-45mm Len. i'm a beginner in photography. kindly advise me to find a proper filter for my lens. how can calculate or find the filter size for each different lens and what is the "must have" filter rings for my  Canon EOS M50.

I was looking to get a circular polarizing filter and an UV filter for my Canon 550D, 18-135mm lens. When I checked online I found these filters came in different sizes, like 62mm, 67mm, 72mm, 77mm. How do I know which is right?  Also, will there be any degradation of photo quality if I put both these filters on the lens?


I'm trying to create a similar effect to this photo. With a blue and red overlay, but i cant seem to get more or less the same effect. i've tried to make a photo black and white and then apply the gradient overlay and make it multiply, but it does not really match at all. Any ideas to how this has been created?

I felt in love with the way this graphic designer, called Mariusz, has edited this picture.  It would be fun to produce something like this for myself.   Anyone has some ideas on how to create such a nice color effect in Photoshop or Gimp?


How to understand the relationship between hypothesis test and confidence interval?

I have read about   with some commentators suggesting that hypothesis testing should not be used. Some commentators suggest that confidence intervals should be used instead.    What is the difference between confidence intervals and hypothesis testing? Explanation with reference and examples would be appreciated.


So yesterday, after assuming I'd finished my roll, which I'd been shooting over a few months because I don't shoot film that often, I went to wind my film back into the canister. I did everything right, but noticed that there was a lack of tension and thought it was odd that the frame counter on my Canon AE-1 wasn't automatically winding back to S. This makes me think I'd stupidly not loaded the film properly in the first place and that despite shooting over the past few months, I've not actually gotten any of the shots.   I'm curious to know if there is a way to test without having to develop the film.  I was thinking if I retracted the leader out of the canister and pulled out the first frame, would I be able to tell if it had been exposed or not and therefore make an assumption as to whether the other had as well?  Thanks in advance for any help!

I have found film reels some with tails of film others not. Is there a way of telling if they have been exposed/used in a camera? Film types are for 35mm and one Kodak Advantix.


I have a module that uploads a PDF file then extracts the data(table format) from the file. I'm following this article  After extracting the data I'm left with this  1 296*** Theory ABSENT 2020-12-16 2 294*** Theory ABSENT 2020-12-16 3 286*** Theory ABSENT 2020-12-16  I'm trying to split this so that I can get 3 items. I'm using this regex pattern  /((?=[0-9]{1})(.*)(?<=[0-9]{4}-[0-9]{2}-[0-9]{2}))/g  But it doesn't work properly. It gives back the whole text.   const TEXT = "1 296*** Theory ABSENT 2020-12-16 2 294*** Theory ABSENT 2020-12-16 3 286*** Theory ABSENT 2020-12-16";  const REGEX = /((?=[0-9]{1})(.*)(?<=[0-9]{4}-[0-9]{2}-[0-9]{2}))/g;  console.log(TEXT.split(REGEX));    The result I was expecting is this ["1 296*** Theory ABSENT 2020-12-16", "2 294*** Theory ABSENT 2020-12-16", "3 286*** Theory ABSENT 2020-12-16"]

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I have the following lists:  [1,2,3] [1] [1,2,3,4]   From the above, I would like to generate a list containing:  [[1,1,1],[1,1,2],[1,1,3],[1,1,4], [2,1,1], [2,1,2], [2,1,3], [2,1,4], [3,1,2], [3,1,3],[3,1,4]]   What is this process called?   Generate a factorial of python lists?   Is there a built-in library that does this?

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) ...]


<html>     <head>         <script type="text/javascript">             f();             function f() {                 alert('in f()');             }         </script>     </head> </html>   This block of javascript will work. But the following cannot:  <html>     <head>         <script type="text/javascript">             f();             f = function() {                 alert('in f()');             }         </script>     </head> </html>   With the following error from Chrome:   Uncaught ReferenceError: f is not defined   My questions are:   Why in the first case, we can access f before define it? What's the different between the two cases?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I create a document in overleaf and i need to have PDF, DVI and PS formats of thet document. PDF got, for DVI I had to change compiler to LaTeX, but I do not see PS file there. How can I get that format? All my graphics are in .eps format.

I need to submit the final version of my paper to a conference but they request a .zip file that including .ps and .dvi file of my .tex document. Since my whole project is on Overleaf, I want to know how can I accomplish it?   Here, what I have done so far:   First I learned that I have to change compiler from pdflatex to latex... Done! Then when I compile, it returned errors that request natural size of figures. And I used the answer given here:     Now it doesn't yell out me, compiles with no error, however still can't see the figures in the output. I don't even know if it is normal or not. Also, can't download a .div file, still gives .pdf file to me.  About .ps file, I haven't there yet, didn't try. But if you know what to do, please inform me. Thanks in advance.


I have recently upgraded to Ubuntu 20.04 on my Matebook X Pro running an Intel 8265 / 8275 wireless card. The wifi is working fine on my device, a little slow. However, when I go into the Additional Drivers tab in Software & Updates. It says that the wireless device is not working and gives me three options only two of which I can select Do not use the device or continue using a manually installed driver.  Is there anything I need to be fixing since it says the device is not working?  Thanks for the help!

Recently I've installed Kubuntu in a newly bought laptop with an Intel WiFi 6 AX200 network card, I can connect to the wifi without apparent problems but when I open the driver manager in the settings I face this weird situation:  Intel Corporation: Wi-Fi 6 AX200 This device is not working.  [ ] Using iwlwifi driver backport in DKMS format from backport-iwlwifi-dkms (open source)  [ ] Continue using a manually installed driver  [x] Do not use the device   Note that "Continue using a manually installed driver" is the only voice selectable in the list.  Here is some additional information:  $ lspci -nnk | grep 0280 -A3 02:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)         Subsystem: Intel Corporation Wi-Fi 6 AX200 [8086:0084]         Kernel driver in use: iwlwifi         Kernel modules: iwlwifi  $ rfkill list all 0: hci0: Bluetooth         Soft blocked: yes         Hard blocked: no 1: phy0: Wireless LAN         Soft blocked: no         Hard blocked: no  $ dmesg | grep iwl [    2.888227] iwlwifi 0000:02:00.0: enabling device (0000 -> 0002) [    2.945179] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-50.ucode failed with error -2 [    2.945217] iwlwifi 0000:02:00.0: Direct firmware load for iwlwifi-cc-a0-49.ucode failed with error -2 [    2.947244] iwlwifi 0000:02:00.0: TLV_FW_FSEQ_VERSION: FSEQ Version: 43.2.23.17 [    2.947250] iwlwifi 0000:02:00.0: Found debug destination: EXTERNAL_DRAM [    2.947252] iwlwifi 0000:02:00.0: Found debug configuration: 0 [    2.947697] iwlwifi 0000:02:00.0: loaded firmware version 48.4fa0041f.0 op_mode iwlmvm [    3.145585] iwlwifi 0000:02:00.0: Detected Intel(R) Wi-Fi 6 AX200 160MHz, REV=0x340 [    3.159226] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    3.160060] iwlwifi 0000:02:00.0: Allocated 0x00400000 bytes for firmware monitor. [    3.336456] iwlwifi 0000:02:00.0: base HW address: 50:eb:71:d7:0b:40 [    3.353553] iwlwifi 0000:02:00.0 wlp2s0: renamed from wlan0 [    4.457920] iwlwifi 0000:02:00.0: Applying debug destination EXTERNAL_DRAM [    4.621843] iwlwifi 0000:02:00.0: FW already configured (0) - re-configuring [    4.629999] iwlwifi 0000:02:00.0: BIOS contains WGDS but no WRDS   Someone have idea why this happened?


I was Modeling a Low Poly Car using mirror Modifier. Sides of the car shares the same UV's. After texturing, a line appears to be in the middle of the model.    Question: How to remove that line ?

I have a stripe down the center of my model and I'm not sure why. I used mirror mod to create the vehicle and have tried reseting 3D cursor and moving the mesh in and out.


My recent activity list did show some old Excavator badges today. I thought that maybe it was a temporary hitch in the Android app so went to the main site and saw that the same error was shown in there, too. I even have thought that maybe someone had used my account to edit some posts and examined these sites to see what those edits were and found out that they were referencing to some old edits of mine. Here is the screenshot showing those activities.

The excavator has been awarded to... many users just some time ago. What a... bug? Certainly it is, too many unavailable posts :D  Seems to affect Marshal and Excavator.        Also looks like it's everywhere. SO's got a similar problem a couple of minutes before.  Moreover, I can has THREE X marshals!!!


I have Started reading Hamilton's Principle or Principle of Least Action In first course of Undergraduate classical mechanics. So, I think it becomes easier to apply the Variational principles if forces can be expressed as generalized potentials. So my first question was, $ Is\ it\ possible\ to\ express\ all\ Fundamental\ Forces\ in\ nature\ in\ the\ form\ of\ \\ generalized\ potentials\ ?                   $ The Question seems very objective with YES/NO Answer. But this is not my intention. I am hoping for some detailed answer. If you can't then why? and what are further insightful consequences.

It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach?


I love the idea of using Photoshop, though it's well out of my price range. I'm looking for free software that is very much the same feeling of Photoshop but for free and for use on a Windows 10 PC (ASUS X453M Series Notebook).  If it helps, I have experience in Photoshop but the last time I used it was last year when my old hard drive broke and I can't no longer access it nor find where I put the original Photoshop Elements 2.0 CD. I've also used Photoshop 5.0 in late 2004 with some of my early artwork and graphic designs being created on Photoshop 5.0 by my hands.  Anyways, I'm looking for a really good answer (free software only), so that it helps others.

Maybe once a month I need Photoshop.  Since it is rare, the cost seems like a disproportionate amount of money to spend by my startup.   I think the tasks I need to achieve when I'm converting a design to HTML/CSS/images are:   opening a PSD that a graphic designer sent me crop some images out of it, generally picking up the layer to have transparent backgrounds measure distances measure colors (RGB) measure font and font sizes maybe more that I'm not aware since I almost never do this kind of task   Is there some cheaper software for MacOSX that can do all of this so we don't have to buy Photoshop?


I am citizen of India (Indian passport holder) with a valid F-1 visa and work permit (EAD card) with me. I have an Air Canada flight from Delhi to LA via Toronto so I have a 5 hr transit at the airport. I am not planning to go out of the airport. Do I still need a transit visa or eTA to board my flight to LA? If yes, which one do I need? I have already checked this  and doesn't specify what type of visa do I need (eTA or transit). Also, it doesn't take into account that I am a valid US Visa holder.

I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa?


Good evening, I was wondering how to prove easily this inequality: \begin{equation} py^{p-1}(x-y)\leq x^p-y^p\leq px^{p-1}(x-y) \end{equation} for all $x,y\geq0$ and $p\in[1,+\infty)$. I tried to study both the functions $\frac{x^p-y^p}{y^{p-1}(x-y)}$ and $\frac{x^p-y^p}{x^{p-1}(x-y)}$, but I'm not getting anywhere.

I was trying to solve the following:  Given: $0 < a < b$ and $n>1$, prove: $$na^{n-1}(b-a) < b^n-a^n < nb^{n-1}(b-a)$$  I managed to get this far using the mean value theorem: $$a^n(b-a)<b^n -a^n<b^n (b-a)$$ Any idea how to continue?


Is there any difference in nuance?  I think you’re going to have to sell your stuff.  = I think you will have to sell your stuff.  If I think that something is a plan, I have to say “be going to have to”?

My name is Tom and my friend's name is Anna.  Anna has a plan to go to Croatia in summer(she bought her flight tickets)  if I talk about her plans , is ''will'' or ''going to '' correct to use in the sentence?(when talking about someone else's plans)  A) Anna will fly to Croatia in summer.  B)Anna is going to fly to Croatia in summer.  if I talk about my planned actions 'going to' is used ,  EX;  I am going to fly to Croatia in summer (not I will.......)  which one (will or going to) is supposed to be used for the context above?


So in order to have a full width figure on the bottom on the same page we have to move the figure to the previous page. But given that we have a figure before this, which is also referenced before it, we have to move to this too in order to keep the numbering of the figures in order.  However, the figure we took with us for may now appear on previous page instead of at the location we wanted it.  Anyway to get around this?  I tried the \afterpage{} which put the figure on right page but the numbering is still wrong.  Code example:  \documentclass[12pt, a4paper, twocolumn]{article} \usepackage{blindtext} \usepackage[utf8]{inputenc}  \begin{document} \blindtext \blindtext \blindtext  \begin{figure}     \includegraphics{OneColumnFigure.png}     \caption{OneColumnFigure} \label{fig:label} \end{figure}  \begin{figure*}[b!]     \includegraphics{TwoColumnFigure.png}     \caption{TwoColumnFigure} \label{fig:label} \end{figure*}  \blindtext \blindtext \blindtext  \end{document}   This will make our OneColumnFigure appear on the same page on the desired location, but our TwoColumnFigure will appear on the next page on the bottom which is not where we want it:    If we move TwoColumnFigure to previous page, the layout will be correct but the figure numbering wrong:    And if we move both figures to the previous page, the numbering will be correct but the layout wrong:

I have a two-column document.  Figure 1 I would like in-line with the text followed by a figure* on the bottom of that same page.  When I put the two figures in order and bunch them as close as possible (below each other), the figure* gets pushed to the bottom of the NEXT page.  But if I move the figure* higher in the document I get the right placement but the wrong ordering of the captions.  Any ideas to fix?  \documentclass{vgtc}     \usepackage{float}  Figure \ref{fig:1} displays .....     \begin{figure}[H]    \centering   \includegraphics[width=0.6\columnwidth]{Figure1.eps}   \caption{\label{fig:1} View.} \end{figure}  \begin{figure*}[bh]    \centering   \includegraphics[width=\textwidth]{Figure2.eps}   \caption{\label{fig:2} Use case.} \end{figure*}


I know what happens when I request example.com, but I wish to know is it possible to dispatch nearest server IP determined in a zone file to client? is there any DNS Server doing this? Just like CDN but for IP connections

Is there a way to localize dns entries? Meaning, that users from asia resolve mydomain.com to another ip than users from usa or europe. This would be helpful to give the users the server nearby. DNS is the only technique used so far, meaning I cannot place some softwarerouting or central system replacing the dns to solve this.


I am trying to make a noughts-and-crosses prototype. The section of code I am struggling with is getting an user input, and if the input is y, it should change the gamestate to 0 which restarts the game. However this doesn't happen. Can anyone explain why?  Scanner s = new Scanner(System.in);                 System.out.println("Would you like to play again?");                 if (s.next().toLowerCase() == "y") {                     System.out.println("Okay");                     g.gamestate = 0;                 } else {                     g.gamestate = 4;                 }

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 just realized that this annoying bug bothers me for years.  Example: I hit Windows+E to open the Explorer and want to hit Enter  again to choose the first item C:. The problem is that C: is not focused automatically. Instead I have to press cursor down, cursor up, and then C: gets highlighted and I can finally press Enter to open it. This behaviour is the same with all folders in Windows Explorer.  Could anyone enlighten me with the shortcut to directly open the first folder without any cursor keys?

When i open windows explorer, I usually navigate it with keyboard most of the time. My biggest annoyance is when I open a folder, and in it I want to open the first folder or file in the list. For this, I have to press the down arrow key, and the up arrow to get the focus on that file/folder. How could I make Explorer, automatically focus on the first file, so once i open the folder, I can just click enter and it opens?


When a user's account is deleted (for any reason), all their negatively-scored posts are automatically deleted by the Community bot. From :     The system will  any question (and its answers) or answer with a negative score when its owner’s account is deleted.   On the main site, this is all well and good: if a user had some crappy posts, no point keeping them around when the user themselves isn't around any more.  But on the meta site, it can cause problems. There, "negatively scored" isn't the same as "crappy"; and users such as spammers who get quickly deleted don't often acquire enough rep to post to meta. Someone might have posted an unpopular suggestion or feature request which, although declined, is still useful to link back to; this should still be available to the community if the user quits.  (The example that motivated this was a user on , who was once a very active and valuable meta contributor but recently deleted his account over accusations of mod abuse. He'd posted several answers to an  on the site's scope, and  of  were , reflecting the fact that those topics were decided to be off-topic. I only recently discovered that these answers had been auto-deleted, and had to  all  of . There could be many other useful negatively-scored posts by this user which have been deleted and which I haven't yet found to undelete. This is not a good state of affairs.)  Please can the auto-deletion of negatively-scored posts by deleted users be abandoned on meta sites?

Meta is different. Negatively scored questions are not always bad questions, and sometimes they have merit and draw good answers, especially discussions.  When an account (in the main site) is deleted, either by self deletion or by a moderator, all questions with score of -1 or less are being deleted regardless of their answers, both in the main and meta site.  Can you please change this behavior so that the questions on the per-site meta will survive and won't be auto-deleted?


I would like to edit my .bash_profile file. However it appears that in Ubuntu (and perhaps other Debian distros) this is named as .profile.  However I cannot seem to find the expected variables like $PATH, $PS  etc. in the .profile file.  The .bashrc file doesn't seem to do any good either.   I am wondering how I can possibly modify my environment variables in this case.

I'm running Ubuntu 11.04. I use the terminal to start a bash session, and I want to add an environment variable:  $r@hajt:~$ env THEVAR=/example   But it's not working. It shows all the variables with THEVAR being the last one, but another call to env does not show THEVAR anymore- env | grep THEVAR returns nothing.  Similarly, scripts with export (export THEVAR=/example) or other variable assignments (THEVAR=/example) don't add the environment variable.  I know I'm doing something wrong, I know it should be something simple, but I just can't find what.  UPDATE: The real meaning of my question was this one:   (Anyway I'll choose the most voted answer and leave the edited title -that wasn't what I was asking)  env runs a program in a modified environment, then dismisses all the changes.


What quest is the quickest way to get candies?I need more candies to get more lollipops, to get the sorceress's hat.

In Candy Box 2, the candies are being produced at a rate of 1 candy per second. Is there any way to increase the potential amount of candy made at a faster rate? (notice that I am only up to the part where the person with the cellar in their house gives me a map.


The question as posed is: What is the largest bet that cannot be made with chips worth $7.00$ and $9.00?$ To prove my conjecture, I am supposed to use both forms of induction.  After research, I found this quantity to be the Frobenius number, $g(a_1,a_2),$ if $\gcd(a_1,a_2)=1$. Through experimentation, or a formula, one finds this 'largest' bet to $47.$   Thus our problem can be stated as follows:   Show that every integer $n\geq48$ can be written $$n=7a+9b$$ for $a,b\in\mathbb{Z}^+\cup\{0\}$.   My attempt via induction:   Let $S:=\{7a+9b:7a+9b\geq48\text{ and }\ a,b\in\mathbb{Z}^+\cup\{0\}\}$. First, we confirm that $48\in S$. Take $a=3$ and $b=3$ to see $48\in S$.  Now assume for some $n>48 $ that it can be written $$n=7a+9b$$ for positive  (or zero) integers and thus $n\in S$. We need to show $n+1\in S.$  Thus $$n=7a+9b\in S\implies$$ $$n+1=7a+9b+1=7a+9b+4(7)-3(9)=7(a+4)+9(b-3)\in S$$  But here is where I get confused. In the book the author justifies confusingly that $a+4$ and $b-3$ are always positive (or zero) integers, and argues that this process shows you can always bet $1$ dollar more by adding four $7$ dollar chips and simultaneously taking away three $9$ dollar chips, but how can we always be sure there's enough $9$ dollar chips to take away, or, how can we be sure $a+4$ and $b-3$ are always positive?  I'm not sure about the strong induction case either.   Here is the process I'm trying to reproduce   The part I am failing to understand and rigorously accept is from the paragraph "Let S be..." and down.

This seemingly simple question has really stumped me: How do I prove that the largest integer that can't be represented with a non-negative linear combination of the integers $m, n$ is $mn - m - n$, assuming $m,n$ are coprime? I got as far as this, but now I can't figure out where to go:  $mx + ny = k$, where $k = mn - m - n + c$, for some $c > 0$ $\Rightarrow m(x + 1) + n(y + 1) = mn + c$  If I could only prove this must have a non-negative solution for $x$ and $y$, I'd be done... but I'm kind of stuck. Any ideas?


I recently was part of a large writing group that produced a publication. Authorship, including myself, is listed alphabetically in the acknowledgements however the group leadership chose to list the organization as the author in the citation/reference rather than acknowledge contribution for authors. I previously brought this up as a problem when there was a proposed order of authors and sent the group leadership standard criteria for authorship listing.  How can I list the publication in my CV?

I was a member of a study team that produced a couple of research papers. The authors of the paper are, for example:      Michael Jordan, Tiger Woods, John Smith and The ABC Study Investigators   In the acknowledgements, it reads:     The ABC Study team consists of members from Harvard University (James Bond, Thomas Harper, David Price, and Jason Jolly)   (Suppose that my name is David Price.)  Can I list such papers in the publication list of my CV? If not, how can I show that I participated in these research papers?  In PubMed, my name was listed as one of 'collaborators.'


I would like to remove the div created using .append()  Example: HTML              <input id="type_ingd" type="text">             <button class="btn btn-primary" id="add_ingd">                 Add             </button>

                         Rooms

                         Mansions

   JS              $("#add_ingd").on('click', function(e) {                 var ti = $('#type_ingd').val();                 $( ".ingd-cont" ).append( '
<button type="button" class="btn btn-default">'+ti+' </button>
' );             });              $("i.fa-close").on('click', function(e) {                 removeIngd(this);             });             function removeIngd(thiscont) {                 $(thiscont).closest('div.incl-ingd').remove();                 var iiv = $(".incl-ingd:visible").length;                 if (iiv == 0){                     $("#find-recp-btn").attr('style', 'display:none;');                 }             }   First, I try to input a word (ex: kitchen)then click the Add button.  Then the word will append inside the ingd-cont.  And the problem is when I click the fa-close of the word it does not removed..  I'm not sure if this is possible but if it is, please help me out :)

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'm in little trouble. The problem is when I'm trying to compare 2 strings(type String) operator '==' returns FALSE, but actually strings are equal. Here's the code with its problem:  //before the following code I filled the "LinkedList <String> command" and there is //a node with value of args[0] String deal=""; Iterator it = commands.listIterator(); if(it.hasNext() == true) {     if(it.next() == args[0])     {         deal += it.next();         it.hasNext();         break;     } }   Thank You!!!


I am trying to teach myself some category theory so I apologize if this question is extremely basic. The question is:  Show that a morphism $f: x \rightarrow y$ is a split epimorphism in a category C if and only if for all $c \in$ C, post-composition $f_* :$ C$(c,x) \rightarrow $ C$(c,y)$ defines a surjective function.  Since $f$ is a split epimorphism, there is a morphism $g : y \rightarrow x$ such that $fg = 1_y$. However, I am not understanding how this helps prove surjectivity. I'm not entirely sure how the post-composition is to be defined here; I imagine it is something along the lines of a morphism in C$(c,x)$ post-composed with $f$ so we get a morphism in C$(c,y)$. And then I should try to show that for every morphism in C$(c,y)$, such a composition is possible and so $f_* :$ C$(c,x) \rightarrow $ C$(c,y)$ is surjective?   I am also not sure about how to prove the other direction.   Any help or clarifications would be appreciated! Thank you!

An $A$-element $x$ of $X$, written $x\in_A X$, is a map $x:A\to X$. If $f$ is a map with domain $X$, and $x\in_A X$ is an element, we write $f(x)$ to denote the composite of $f$ and $x$.  Now say that a map $f:X\to Y$ is cool if $$\forall A\quad \forall x, x'\in_A X\quad:\quad f(x) = f(x')\implies x = x'.$$  In the category of sets, a map is cool if and only if it is injective! In an arbitrary category, a map is cool if and only it is an monomorphism!  Call a map $f : X\to Y$ fresh if for all $A$, and for all $y\in_A Y$, there is an $x\in_A X$ such that $f(x) = y$. It would now be quite nice if, in the category of sets, a map is fresh if and only if it is surjective. 1. Is this true? 2. Also, in an arbitrary category, is a map fresh if and only if it is an ?


I use Prepared Statements mostly to prevent SQL injections. Now I also need to filter a ENUM type. But how should I use it in my prepared statements to maintain security? I have a table of addresses and need to filter on the user's invoice addresses. How do I do that and keep the security? Or does it not matter? Two options I can think of. "Invoice" in the array as a string. public function getCustomerInvoiceAddresses($customerNumber) {     $query = 'SELECT contactPerson, company, street, zipCode, city, deliveryMethod                  FROM address                  where FK_customerNumber = ?                  AND addressType = ?';     $paramType = 'is';     $paramValue = array(         $customerNumber,         "Invoice"     );     $invoiceAddressArray = $this->ds->select($query, $paramType, $paramValue);     return $invoiceAddressArray; }  Invoice in the SELECT public function getCustomerInvoiceAddresses($customerNumber) {     $query = 'SELECT contactPerson, company, street, zipCode, city, deliveryMethod                  FROM address                  where FK_customerNumber = ?                  AND addressType = "Invoice"';     $paramType = 'is';     $paramValue = array(         $customerNumber     );     $invoiceAddressArray = $this->ds->select($query, $paramType, $paramValue);     return $invoiceAddressArray; }  Or should I pass the string "Invoice" when I call the function? $invoiceAddresses = $customer->getCustomerInvoiceAddresses($customerNumber, "Invoice");

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I’ve read on various posts on gamefaqs that you can’t grind on Hard/Classic because maps are tied to some “activity points” while on Normal there should be a map you can repeat again and again  I’ve been playing on Normal/Classic though, but I don’t see this map. All maps cost 1.  I am on the beginning  of august, just received the sword of the creator.  How can I grind in this mode? I’m not even actually looking to maximize my character level, I just want to get all Class Masteries.  Edit: I don’t see the infinite map mentioned in the linked possible answer...

So in Awakening, we can use Reeking Boxes... but what of Three Houses? I'm not far off from the beginning of the game- I have just recently finished the mock battle, actually, but I noticed this calendar mechanic in the game (and in extension, the activity points stuffs). Apparently, the days just... jump.  With this info, I assume there's only a limited number of days before reaching the so-called War Phase... so this brings me back to the question: are there maps or battles that I can replay again and again so that I can level grind the characters, or are there only a limited amount of maps/battles that I can participate in?


I've got an image, it's an RGB 8 bit.     But when i save it as png, i don't see the transparency, it's all white

When handling multiple white-on-transparent png images, I am hindered by the fact that the thumbnails of these images are all-white. Both Adobe Bridge CS6 and Windows Explorer suffer the same problem, I can't discern between two of these pngs.  Is there a way to make these thumbnails useful? Is there some setting I missed that allows changing the thumbnail background colour for a png -- now a deafult white?


I am preparing a simple program that is supposed to take a file and then check for instances of certain characters ( spaces, some sentence delimiters and so on ).   In the code below, I have the file open. I was able to get delimiters working by using strtok, but then I was not able to count them properly. It didn't work well when I tried using it for counting other things ( syllables, spaces ). In other words, not good for what I am trying to do ( unless there is a way ).  I am stuck. I know I have to use getline() to parse the file, but I can't seem to make it happen. I just a need push in the right direction.  #include <iostream> #include <cstring> #include <fstream>  using namespace std;  int main(int argc, char* argv[]) {     int space_count = 0;     int sentence_count = 0;     int word_count = 0;     int syllable_count = 0;     int enter_count = 0;     string syll = "aeiou";      char delim[] = " ";     char* token;     char const* const fileName = argv[1];      // check we have at least 2 command line     // arguments     // that argv[1] is valid     if (2 > argc) {         cout << "Correct usage <file> path>" << endl;         return 0;     }      ifstream infile;     const int INPUT_SIZE = 10000;     char input[INPUT_SIZE];      infile.open(argv[1]);     if (!infile.is_open()) {         cout << "could not open file!" << endl;         return 0;     }      while (infile.getline(input, INPUT_SIZE)) {         // check input to see if it matches given char or a string         //         //    if (input[INPUT_SIZE] = 'a'){         space_count++;     }      // word count by using spaces set in delim     token = strtok(input, delim);     cout << token << endl;      word_count++;      // file print     while ((token = strtok(NULL, delim)) != NULL) {         cout << token << endl;         word_count++;     } }  cout << word_count << endl;  return 0; }

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


If f is continuous on [a,b] and $f(x) \geq 0$, for $x \in [a,b]$, but $f$ is not the zero function, prove that $\int_{a}^{b} f(x) dx > 0$  Could anyone give me a hint for this proof please?

I am working on a few examples where my author said this is true if $h$ is continuous. Can someone explain why? Just because the integral is $0$ doesn't mean the integrand is zero as well.   $\int_{a}^b h^2=0\implies h=0$?


Would the supernova responsible for its formation destroy them. The question becomes one of how destructive the supernova event is to its own solar system - does it completely evaporate all planets up to and including Jupiter size?  The duplicate deals with "safe distance". I want to know whether any planets in a solar system like ours would survive. In other words, would something like Jupiter be completely evaporated or blown out of orbit

In other words, what stars near the Sun may have an impact on the Solar system equilibrium or the Earth life if they become supernova ? Is SN 1987 A too far ?


I have been given an old Celeron laptop (I have not the exact specs with me as I am at work), with the latest version of Ubuntu on it. I have just upgraded the memory to 2GB (that's the maximum the laptop can take), but the laptop is incredibly slow (kind of painful as even typing takes ages to appear on the screen).   Am I better off replacing Ubuntu with an earlier version?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Although I've read myself through most of the questions about handling spaces in path names, I haven't found my case yet, which is about several path names in one variable.  find will need this when two base paths are given, for example:  pa="/home/user/folder1 /home/user/folder2" find $pa -name '*xy*' ...    This will look for matches in both folder1 and folder2.  (Please note that this is a simplified example; I know very well that in this special case, you could use the -path modifier with a parameter like folder* that spans both folders. However, this question is to cover cases where you cannot work around the issue so easily due to higher complexity.)    Now imagine folder2 contains a space in the middle. The following will not work:  pa="/home/user/folder1 /home/user/fol\ der2" find $pa -name '*xy*' ...    The problem is the \, which is normally used to represent a space in the shell but will not work when the variable content is enclosed in double quotes. However, unlike with one path per variable (where it might do the trick), the following won't work either:  pa=/home/user/folder1 /home/user/fol\ der2 find $pa -name '*xy*' ...    $ ./test.sh: line 3: /home/user/fol der2: Is a directory  nor will the following variant:  pa=/home/user/folder1 /home/user/fol\ der2 find "$pa" -name '*xy*' ...      So how can spaces be handled properly in paths if several paths are contained in one variable?  Related question: Is there any reliable way at all to determine whether a whitespace is a separator between one path and its successor (within the same variable), or a  whitespace that belongs to one of the paths contained within?

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I would like to completely remove the time bomb from Flash Player on MacOS. I tried configuring it using the mms.cfg file, but I use multiple sites with Flash content and i would prefer to remove the time bomb entirely.

I would like to use Flash Player to show web contents but since today (12 Jan 2021) Adobe is blocking it. Is there a way to use it? I've tried Firefox, Chrome, Safari and Brave browsers.


The  allows us to express an $n \times n$ matrix determinant as a sum over permutations in $S_n$:  $$\det A = \sum_{\sigma \in S_n} \operatorname{sgn}(\sigma) \cdot \prod_{k=1}^n a_{\sigma(k), k}$$  A surprising amount of properties about determinants can be proven from this formula alone, using algebraic manipulation and basic facts about permutations. (Particularly, it's simple (and fun) to use it to show what happens to the determinant of a matrix when you apply elementary row operations; try it!)  Is there an existing proof of the fact that $\det AB = \det A \cdot \det B$ for $n \times n$ matrices $A$ and $B$, relying only on algebraic manipulation of the above formula? The resulting sums get rather ugly:  \begin{align*} \det A \cdot \det B &= \sum_{\sigma \in S_n, \tau \in S_n} \operatorname{sgn}(\sigma \circ \tau) \prod_{k=1}^n a_{\sigma(k), k} \cdot b_{\tau(k), k} \\ &\stackrel{\color{red}?}{\color{red}=} \sum_{\sigma \in S_n} \operatorname{sgn}(\sigma) \prod_{k=1}^n \left( \sum_{x=1}^n a_{\sigma(k), x} \cdot b_{x, k} \right) \\&= \det AB \end{align*}  How would I go about trying to prove that these expressions are equivalent?

One of definitions of the determinant is:  $\det ({\mathbf C})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \prod_{k=1}^n C_{k \lambda ({k})}})$  I want to prove from this that  $\det \left({\mathbf {AB}}\right) = \det({\mathbf A})\det({\mathbf B})$  What I have so far:  $(AB)_{k\lambda ({k})} = \sum_{j=1}^n A_{kj}B_{j\lambda(k)}$  so we have for the determinant of $\mathbf {AB}$  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \prod_{k=1}^n \sum_{j=1}^n A_{kj}B_{j\lambda(k)}})$  Now I'm not sure how to denote this, but the product of the sum I think is the sum over all combinations of n terms, each ranging from 1 to n, so I'll denote this set of all combinations $C_n(n)$ for n terms each ranging from 1 to n, analogous to the permutation set, but all combinations instead of permutations.  then I get  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \sum_{\gamma \in C_n(n)} \prod_{k=1}^n A_{k\gamma(k)}B_{\gamma(k)\lambda(k)}} )$  then I can at least seperate the product:  $\det ({\mathbf {AB}})       =\sum_{\lambda \in S_n} ({\operatorname {sgn} ({\lambda}) \sum_{\gamma \in C_n(n)} \prod_{k=1}^n A_{k\gamma(k)} \prod_{r=1}^n B_{\gamma(r)\lambda(r)}} )$  I changed the k to an r in one product because it's a dummy variable so I think it doesn't matter, I don't really know if this thing is helpful but this is my attempt at a solution so far.  Thanks to anyone who helps!


Question:In the arrangement shown in figure,the ends P and Q of an inextensible string move downwards with uniform speed u. Pulleys A and B are fixed. The mass M moves upwards with a speed- Actual solution: Let the speed of mass M be v.The length of the string will remain constant. So by constraint relationship, we can say that the velocities increasing the length of the string (u)= velocities decreasing the length of string.( Component of v on any one of left or right string= v cosθ) Therefore, v cosθ= u and hence v= u/cosθ My approach:: I did just the reverse of this. I took components of u along the y-axis to get the speed of mass m. Here is the reason why: The velocity of the mass M should be the vector-summation of the velocities of the string attached to block A and the string attached to block B.After all, these strings are the cause behind the motion of the mass M and thus, their "influence" must be added in order to obtain the behavior of mass M. As the motion of mass m is vertically upwards, their components must cancel along the X-axis and should add up on the Y-axis. Component of left string on Y-axis= u cosθ and component on Y-axis=u cosθ. So net resultant and the speed of mass m=2u cosθ. Where am I wrong as the answer is not 2u cosθ?

If we call the velocity of the mass $u$, then we can say: $u \cos θ = v$ and hence $u= \frac v{\cos θ}$. But why can't we write  $v \cos θ= u$ and add the contribution from both of the strings: $u= \frac{2v}{\cos θ}$ ? Why is it only $u= \frac v{\cos θ}$? Please note that it is not a homework based  question. I just want someone to solve the doubt arising in my mind.


so I have a boolean list of lists and I changed a certain index from True to False, and it affects some others element in list of lists too. Why is it happening? is there any alternative?  test = [[True]*9]*9 test[0][1] = False print(test)   The output:  [[True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True],  [True, False, True, True, True, True, True, True, True]]

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I have a random valued vector $R = (R_{1},R_{2},..,R_{d})^{T}$, from which I have some series of gathered observed data.  And the random variable of "return rates" defined as:  $R_{p} = p^{T}R $ , where p is a known vector $p = (p_{1},.. p_{d})^{T}$  The paper I'm reading calculates the variance of this return rate doing:  $Var[R_{p}] = Var[p_{T}R] = p_{T}Cov[R]p$  I don't understand the last step, which equality does it follow?

When reading a proof I came across the following step:  $$\operatorname{Var}(x^Ty) = x^T\operatorname{Var}(y)x$$ $x$ and $y$ are column vectors. How can you derive this?


I have a date/time like this: 2015-07-31T13:30:00.000+01:00 And I want to convert it to normal date and time using Perl and Time::Piece->strptime  Here is my code:   sub changeDateFormat {   my ($date, $fromFormat, $toFormat) = (@_);   return Time::Piece->strptime($date, $fromFormat)->strftime($toFormat); }   The call:   print changeDateFormat($that_date, '%Y-%m-%dT%H:%M:%S.%N+%z', '%Y:%m:%d');   I think that .000 are nano seconds and +01.00 stands for time zone. But the given code gives this:  Error parsing time at /usr/lib64/perl5/Time/Piece.pm line 470  Any help is appreciated.

I've used the  function in Perl to get the current date and time but need to parse in existing dates. I have a GMT date in the following format: "20090103 12:00" I'd like to parse it into a date object I can work with and then convert the GMT time/date into my current time zone which is currently Eastern Standard Time. So I'd like to convert "20090103 12:00" to "20090103 7:00" any info on how to do this would be greatly appreciated.


I would like to make a tri-folded flyer mockup in blender. When I split a plane for 3 parts and select edge between faces, during editing two faces are changing sizes. Is there any way to drag edges and keep faces in equal sizes? Is there any lock button, or should I do that with bones? I want to prepare projects in affinity designer and put exual size radio into blender. When I trying edit it in simple edit mode, it causes faces to not having proper project dimensions.

I'm trying to make a "simple" accordion map in Blender 2.79, for animated and still render purposes.  I will map graphics onto each face, and I don't want the faces to get stretched/distorted.  I do however, want to be able to create a hinge-type rig, to be able to fold open and close the map like an accordion without having to manually position each face edge (which would distort the faces anyways).  I looked into using an Armature, but the faces got distorted. I tried to use a Hinge constraint, but I if understand correctly, it would require each flap of the map to be a distinct element - I don't want that. I found solutions involving Weight painting, but I don't think I want any of the map's flaps to be anchored - also there is only one face per element and I don't know if Weight Painting is appropriate.    How can I rig this map properly to open it and close it without any distortion?


I have a model in which I can not set [DefaultValue] for DateTime, the object is used to generate a list of users from the powershella script. When I do not have default value and powershell return null this causes an error. I would like to make the date set to 01.01.1990 00:00:00 in the case of null  public class user         {             [DefaultValue("")]             public string Name { get; set; }              //[DefaultValue( )]             public DateTime PasswordLastSet { get; set; }         }

Does any one know how I can specify the Default value for a DateTime property using the System.ComponentModel DefaultValue Attribute?  for example I try this:  [DefaultValue(typeof(DateTime),DateTime.Now.ToString("yyyy-MM-dd"))] public DateTime DateCreated { get; set; }   And it expects the value to be a constant expression.  This is in the context of using with ASP.NET Dynamic Data.  I do not want to scaffold the DateCreated column but simply supply the DateTime.Now if it is not present.  I am using the Entity Framework as my Data Layer  Cheers,  Andrew


From what I understand is that Bonds and loans have extrinsic value, i.e if I decide to lend my money to someone or an organization, I will get paid a certain interest on the money that I lent, as well as receive my principal back after the maturity period. However, the stocks that we invest in, don’t seem to have any intrinsic value attached to it.  The company doesn’t pay me the principal that I invested in, the paper value of my principal just increases or decreases depending on how well the company is doing in the market scenario. It doesn’t hold a physical value. And the paper value of my investment will mean nothing until someone else decides to buy it. The company might pay me the profit that they earned in terms of cash dividends but will never pay me back my principal ever. And when I am buying stock from someone, how is the paper value of that stock calculated in terms of real/ tangible money that I need to pay to buy it? And what motivates people to invest in something that doesn’t even have a physical presence and only exists abstractly?

Before recently, Apple Inc. did not give dividend to shareholders.  This makes me curious why people buy Apple Inc. stocks; while it might be due to the expectation of selling stocks at a higher price, this can only be possible if other people are thinking the same, thereby increasing demand. But the stocks themselves do not pay interests - so Apple's amazing revenue/profit records would not matter....


Hello people,   Again, trying to create a program in C to help figuring what the equivalent binary-number to a given number is. I had no idea what to do first, I developed a little simple code for it. But the problem is that I had to put some improvisations into it AS code is (READ BACKWARDS). So regarding this, the code isn't really complete. Here's the code I came up with ..  #include <stdio.h> void main() { int x,n; printf("This program will help you find the equivalent binary-number to a given number \n"); printf("Enter number :"); scanf("%d",&n); printf("The binary number to this number is(Read backwards) :"); for (;;n/=2)     {         x=n/2;         if (x!=0) printf("%d",n%2);         else {printf("%d\n",n%2); break;}     } }   Now the equivalent binary-number to 8 is 1000 and the program shows it backwards like 0001 and I have absolutely no idea how to to make it right. Any thoughts?

I can print with printf as a hex or octal number.  Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n"


I know it is called Niven's Theorem, but I don't know how to prove it. I am looking for a clue or a direction for where to begin. Here is what I do know:  $\cos{\theta^ {\circ}}$ can be expanded to some long expression of $\sin1^{\circ}$ and $\cos1^{\circ}$ multiplied, added, and subtracted from one another, but only for $\theta \in \mathbb{Z}$. So if this expression is rational and $\theta$ is an integer, it is a fitting solution.  I also know $\cos0^{\circ}=1$, $\cos60^{\circ}=\frac{1}{2}$, $\cos90^{\circ}=0$, and it also works for the negatives of these, and I can add $360^{\circ}$ as many times as I want.  Any hint or tip? Thanks in advance for help.

I couldn’t find any proof on the internet. I would appreciate an elementary proof , but any help would be appreciated!  Thank you.


I'm having few problems with Ubuntu 12.04. This occurred after trying to install dropbox.  Now, I'm unable to install dropbox or any update. I've tried following commands, but it doesn't fix anything. It'll ask me to type sodo dpkg -configure -a and dropbox will start downloading and get stuck at 100%.   I've tried the following commands:   sudo fuser -cuk /var/lib/dpkg/lock; sudo rm -f /var/lib/dpkg/lock  sudo fuser -cuk /var/cache/apt/archives/lock; sudo rm -f /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock   sudo apt-get clean sudo apt-get update   sudo apt-get --purge remove nautilus-dropbox This command does not work as says, "E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem."  And when I type sudo dpgg --configure -a, it will start downloading dropbox and gets stuck at 100%. Also, laptop runs hot now. All 4 cores were running at 100% prior to typing but sudo fuser commands, but afterwards still 2 cores are running at 100%.   Help would be appreciated!  Thanks!

I tried to install Dropbox using , or with apt-get install nautilus-dropbox.  Dropbox loads until 99% and then hangs, causing the system to go to 100% cpu usage.  If I reboot or close the terminal, I sometimes get dpkg errors which prevent me from using apt-get or Software Center to perform any package management functions.  I would like to resolve all these and just get Dropbox working. How do I do that?        Note: This question is possibly answered in two parts:            tells you how to install Dropbox.     But if you  have dpkg errors, see  before you use answer 1 to install Dropbox.


When I turn on my computer, the violet ubuntu image from there changes to black if I don't quickly press the esc key or f1 goes black. Any solution for the black screen when turning on?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I need to calculate this $\int_{-\infty}^\infty \frac{sin(z)}{z}dz$ using the residue of $\frac{sin(z)}{z}$.  Then I write $\int_{-\infty}^\infty \frac{sin(z)}{z}dz$ = $\lim_{R\to\infty}Im(\int_{-R}^R \frac{e^{iz}}{z}dz+\int_{CR}\frac{e^{iz}}{z}dz)=2\pi i Res(\frac{e^{iz}}{z},0)$  where CR is the the half circunference of radius R>0 over the plane.  Then I need to show that $\lim_{R\to\infty}|\int_{CR}\frac{e^{iz}}{z}dz|=0$  Can someone help me?

A famous exercise which one encounters while doing Complex Analysis (Residue theory) is to prove that the given integral: $$\int\limits_0^\infty \frac{\sin x} x \,\mathrm  dx = \frac \pi 2$$ Well, can anyone prove this without using Residue theory?  I actually thought of using the series representation of $\sin x$: $$\int\limits_0^\infty \frac{\sin x} x \, dx = \lim\limits_{n \to \infty} \int\limits_0^n \frac{1}{t} \left( t - \frac{t^3}{3!} + \frac{t^5}{5!} + \cdots \right) \,\mathrm  dt$$ but I don't see how $\pi$ comes here, since we need the answer to be equal to $\dfrac{\pi}{2}$.


Let's assume that every a belongs to real numbers set and s is a sum of all the numbers from $a_1, a_2...a_n$. How would you prove this?  $\frac{a_1}{s - a_1}$ + $\frac{a_2}{s - a_2}$ ...+$\frac{a_n}{s - a_n}\ge \frac{n}{n - 1}$

Let $a_1,a_2,\ldots ,a_n$, be positive real numbers and  S = $a_1+a_2+a_3+\cdots+a_n$. Use the Cauchy-Schwarz inequality to prove that   $$\sum_{i=1}^{i=n}\frac{a_i}{S-a_i}\geqslant \frac{n}{n-1}$$ and $$\sum_{i=1}^{i=n}\frac{S-a_i}{a_i}\geqslant n(n-1)$$  Hint: Apply the inequality to:   $\sum \frac{S}{a_i}$ and $\sum \frac{a_i}{S}$ for one case,     and $\sum a_i(S-a_i)$ and $\sum \frac{a_i}{S-a_i}$ for the other case.


I have a question for you guys. I want to compare the date of today and an other self made date. The date of today is called a and the name of the self made date is b. If ais later then b I want to do something, but how. And the date format should be year,month,day,hour,minute,second e.g: 2015,03,20,09,58,44

Can someone suggest a way to compare the values of two dates greater than, less than, and not in the past using JavaScript? The values will be coming from text boxes.


I have a server application written in c++, which is sending data to socket (and client is reading it). I need to restrict "upload speed" to that socket. Is there any easy way to do this? I have a number which respresents number of kB/s and that should be the upload speed.  I am using:  #include <sys/types.h> #include <sys/socket.h>  ssize_t send(int sockfd, const void *buf, size_t len, int flags);

I'm writing a client-server app using BSD sockets.  It needs to run in the background, continuously transferring data, but cannot hog the bandwidth of the network interface from normal use.  Depending on the speed of the interface, I need to throttle this connection to a certain max transfer rate.  What is the best way to achieve this, programmatically?


I would like to compare the first column of file1 with the second column of file2 and only if they match it should display any matching lines in file2 only as the output. The columns are separated by |.  file1:  syfar03040k16.audc1.oraclecloud.com | syfar03040m02.audc1.oraclecloud.com | syfar03040m04.audc1.oraclecloud.com | syfar03040n11.audc1.oraclecloud.com | syfar03040n01.audc1.oraclecloud.com | syfar03040n02.audc1.oraclecloud.com | syfar03040n03.audc1.oraclecloud.com | syfar03040n05.audc1.oraclecloud.com | syfar03040n07.audc1.oraclecloud.com | syfar03040o11.audc1.oraclecloud.com | syfar03040o01.audc1.oraclecloud.com | syfar03040o02.audc1.oraclecloud.com | syfar03040o03.audc1.oraclecloud.com | syfar03040o13.audc1.oraclecloud.com | syfar03040o05.audc1.oraclecloud.com | syfar03040o04.audc1.oraclecloud.com | syfar03040o16.audc1.oraclecloud.com |   file2:     | LDAP                 | syfar03040o11.audc1.oraclecloud.com               |    | OIM                  | syfar03040o01.audc1.oraclecloud.com               |    | AUTHOHS              | syfar03040o02.audc1.oraclecloud.com               |    | APPOHS               | syfar03040o03.audc1.oraclecloud.com               |    | BI                   | syfar03040o04.audc1.oraclecloud.com               |    | ADMIN                | syfar03040o05.audc1.oraclecloud.com               |    | PRIMARY              | syfar03040o06.audc1.oraclecloud.com               |    | SECONDARY            | syfar03040o07.audc1.oraclecloud.com               |    | APPOHS_HA1           | syfar03040o13.audc1.oraclecloud.com               |    | PRIMARY_HA1          | syfar03040o16.audc1.oraclecloud.com               |    | SECONDARY_HA1        | syfar03040o17.audc1.oraclecloud.com               |    | OSN                  | syfar03040o09.audc1.oraclecloud.com               |   File3:     | LDAP                 | syfar03040o11.audc1.oraclecloud.com               |    | OIM                  | syfar03040o01.audc1.oraclecloud.com               |    | AUTHOHS              | syfar03040o02.audc1.oraclecloud.com               |    | APPOHS               | syfar03040o03.audc1.oraclecloud.com               |    | BI                   | syfar03040o04.audc1.oraclecloud.com               |    | ADMIN                | syfar03040o05.audc1.oraclecloud.com               |    | APPOHS_HA1           | syfar03040o13.audc1.oraclecloud.com               |    | PRIMARY_HA1          | syfar03040o16.audc1.oraclecloud.com               |

I need to compare 2 files. Column 1 is the same in both files. Column 2 is what I want to compare: I want all lines in file 1 that are not in file 2 when comparing column 2. Column 3 is different in both files, even for lines where column 1 and 2 are identical. I cannot remove column 3, because as an output I want the lines from file 1 including this column.  Here is an example:   File 1  21  12340   3 21  12341   7 21  12342   2 21  12343   89 21  12349   7   File 2  21  12340   55 21  12341   7 21  12343   89 21  12344   7 21  12346   88 21  12347   3 21  12348   37   My output would be:  21  12342   2 21  12349   7


The series had three books.  A universe of Greek gods/goddesses, set in modern time.    The gods steal Titans and force them to assume the form of infants/children, and raise them as mundanes in a boarding school type situation.  The protagonist is a young woman who discovers she can travel through the fourth and fifth dimensions as her power.  Her companions: a fey, can travel by unseen ways to various locations; a boy-shaman raised under the traditions of science, can cause anything he wants to happen simply by wishing it and tries to recreate the Michelson–Morley experiment. She ultimately discovers the true nature of the universe she is in and that the deities all follow some sort of rock-papers-scissors system where each deity has a corresponding type which he is weak to, and strong against.  What is the name of this series?

Looking for a book I read once from the high school library.  It starts off with a handful of children in a special school, they are the only students of this school, and they have lived there all their lives. They turn a certain age and find out that they aren't human, each of them is some magical or mythological creature, like a cyclops(which were logic/technological based) or witch(who used rhymes/chants to call out their power).   They end up using their new found powers to rebel against the teachers and escape the school.  I remember that they are each in some way very important to each of the different races they belong to, like children of the chief/leader. They were all kept in the school to keep the peace between the different races.   I realize that's not really much to go on, sorry.


Tetration is defined for all $n\in \Bbb{N}$ by  $$ {^1}a = a \\ {^{n+1}}a = a^{\left({^n}a\right)} $$ Thus ${^3}a$ means $a^{a^a}$.  Here $a$ could be any real (or indeed even complex) value, but only integer $n$ in the tetration is defined by this definition.  But I've seen questions here dealing with real valued tetration (${^x}a$ for real $x$) and even one dealing with complex tetration (${^z}a$ for complex $z$).  let's take one step at a time:  How does one define tetration with a rational hyperpower $${^q}a : q \in \Bbb{Q}$$ (From there, the move to real tetration is the same sort of "easy" as defining real exponentiation.)  And what does ${^z}a$ mean for complex $z$?

Recently I've come across 'tetration' in my studies of math, and I've become intrigued how they can be evaluated when the "tetration number" is not whole. For those who do not know, tetrations are the next in sequence of iteration functions. (The first three being addition, multiplication, and exponentiation, while the proceeding iteration function is pentation)   As an example, 2 with a tetration number of 2 is equal to $$2^2$$ 3 with a tetration number of 3 is equal to $$3^{3^3}$$ and so forth.  My question is simply, or maybe not so simply, what is the value of a number "raised" to a fractional tetration number. What would the value of 3 with a tetration number of 4/3 be?  Thanks for anyone's insight


I see people uploading videos and images of 3DS games all the time.  I also see Twitch and Youtube videos of people showing off their top and sometimes even their bottom screens to the viewers.  How does someone record or stream their top and/or bottom screens? If screenshots are taken on the 3DS, how are they uploaded to a computer (USB charger?)?  Are special cords or accessories needed to do this?

In Pokemon X and Y there are specific locations in the game that allows you to save what are essentially 3D screenshots from the upper screen using a virtual camera. This made me wonder - is it possible to take screenshots, 3D or otherwise, from within the 3DS?


I loaded the  Natural Earth Quick Start Kit in QGIS 2.8.5, enabled on-the-fly CRS transformation, and changed the CRS to World_Robinson, and this is what shows up:    When zoomed in it looks fine. To be precise, the glitch start to happen somewhere between 1:45,000,000 and 1:46,000,000.   Any idea what's causing this? Am I doing something wrong here?  EDIT: I don't think this is a duplicate issue. At least the "Settings -> Options, Rendering tab, uncheck Enable feature simplification by default for newly added layers" fix does nothing for this problem.  EDIT 2: This isn't limited to Robinson. Pretty much every CRS I tried has graphical glitches when viewing the whole world. And every CRS works fine when zoomed in (at 1:20,000,000 everything works).

QGIS Pisa 2.10.1 Mac Pro, Mac OS   I don't seem to be able to create a simple World Map using the Natural Earth Dataset and the Robinson World projection, unless I zoom in. What could be the problem?


I studied a linear function definition in our Machine Learning course:  f(ax + by) = af(x) + bf(y)   Using this definition, we can prove that y = ax + b is NOT a linear function. This is counter-intuitive to me.   For example: f(x) = 2x + 3 is NOT linear. f(0 + 1) = f(1) = 5 but f(0)+f(1) = 3+ 5 = 8.  Hence f(0+ 1) != f(0)+f(1)   We all know that y =  ax + b is a line function (I know this is a linear function for ages), but it is not linear according to this definition. I am very confused.  In what situation we should use the above definition?  Recourse:

$T(av_1 + bv_2) = aT(v_1) + bT(v_2)$  Why is this called linear? $f(x) =ax + b$, the simplest linear equation does not satisfy $f(x_1 + x_2) = f(x_1) + f(x_2)$.  Thank you.


How to show $x^5-x+3$ is irreducible in $\Bbb Z_5[x]$?  I checked that there are no linear factors since there is no root. How to know that there is no quadratic factor? I checked from Mathematica that there are $32$ irreducible quadratic in $\Bbb Z_5[x]$.

Let $p$ be a prime. How do I prove that $x^p-x+a$ is irreducible in a field with $p$ elements when $a\neq 0$?   Right now I'm able to prove that it has no roots and that it is separable, but I have not a clue as to how to prove it is irreducible. Any ideas?


Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work.


In FreeBSD and also in Linux, how can I get the numerical chmod value of a file? For example, 644 instead of -rw-r--r--? I need an automatic way for a Bash script.

Say I have the following output from ls -l:  drwxr-xr-x 2 root root 4096 Apr  7 17:21 foo   How can I automatically convert this to the format used by chmod?  For example:  $ echo drwxr-xr-x | chmod-format 755   I'm using OS X 10.8.3.


I am really confused how values are passed to a function. I am unable to figure out what types of values gets changed when we pass it to a function. Example 1 - Passing a String(reference type) to a function - public static String word = new String("Hello World");  public static void main(String[] args) {     System.out.println("Before: " + word);     UpdateValue(word);     System.out.println("After: " + word); }  public static void UpdateValue(String x) {     x = "Hi World"; }  Output: Before: Hello World After: Hello World  Example 2 - Passing an array of String[] to the function - public static String[] words = new String[] {"Hello", "Everyone"};  public static void main(String[] args) {     System.out.println("Before: " + Arrays.toString(words));     UpdateValue(words);     System.out.println("After: " + Arrays.toString(words)); }  public static void UpdateValue(String[] x) {     x[0] = "Hi"; }  Output: Before: [Hello, Everyone] After: [Hi, Everyone]  My questions -  How does it all work? String is a reference type, so my earlier assumption was that the value will be changed if we pass it to a function. But that didn't happen. The value did not change. At the same time, when I passed the array (which is an object in Java, so basically a reference type?) we see that the original value got changed?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I wish to apply for masters in Mathematics or Computer science after my undergraduate. I have a good GRE score of 332/340, but my essay score is just 3.5/6. I wanted to know how relevant is the essay score for technical fields?   Is  it relevant enough that I should consider giving the GRE again?  I have heard and read that the GRE score is only used for 'sorting' the students. I just wanted to make sure that the essay score doesn't sort me out of the admissions process.

I am planing to apply to study in graduate school, major in computer science/engineering. I just took a GRE test, this is my 1st time, and the result is pretty...not so good :(  Most schools, the science or engineering related program, reveals the average or preferred GRE scores for quantitative and verbal sections for admitted students. But it seems they don't care about the score of Analytic Writing section. Really?  To be honest, my writing score really bumped this time. I want to know if there's a preferred score range for this section.


I have to give a combinatorial proof and the meaning of the following identity.  $$\sum_{k = 1}^n (-1)^k k !S(n,k) = (-1)^n,$$ where $S(n,k)$ is the Stirling number of the second kind.  Could anyone give me a hint on how to go about this? I suspect it has something to do with surjective maps, since I know that $k!S(n,k)$ is the number of bijective maps from $n$ to $k$.

Consider the identity $$\sum_{k=0}^n (-1)^kk!{n \brace k} = (-1)^n$$ where ${n\brace k}$ is a Stirling number of the second kind. This is slightly reminiscent of the binomial identity $$\sum_{k=0}^n(-1)^k\binom{n}{k} = 0$$ which essentially states that the number of even subsets of a set is equal to the number of odd subsets.   Now there is an easy proof of the binomial identity using symmetric differences to biject between even and odd subsets. I am wondering if there is an analogous combinatorial interpretation for the Stirling numbers. The term $k!{n\brace k}$ counts the number of set partitions of an $n$ element set into $k$ ordered parts. Perhaps there is something relating odd ordered partitions with even ordered partitions?  As an added note, there is a similar identity $$\sum_{k=1}^n(-1)^k(k-1)!{n\brace k}=0$$ A combinatorial interpretation of this one would also be appreciated.