I've done a code to auto-renew contracts when they arrive to their renewal date.  My idea is to create an exact clone of the old contract, change it's start date for the renewal date of the old contract and put it as draft. To acomplish this I've used this:  ...     for(Contract contractToRenew: (List<Contract>) scope) {                      Contract contractToInsert = contractToRenew.clone(false,true,false,false); // (preserveId, isDeepClone, preserveReadonlyTimestamps, preserveAutonumber)                     contractToInsert.StartDate = contractToRenew.Next_Renewal_Date__c;                     contractToInsert.Renewed_Contract__c = contractToRenew.Id;                     contractToInsert.Status = 'Draft';                     contractsToInsert.add(contractToInsert);                     contractToRenew.Status = 'Finished';                     EmailsToSend.add(generateEmail(ContractToRenew));                 } ...   But still after I insert the new created contract some of the fields that were not null on the old contract are empty on this recently cloned one. And ofc I don't have any trigger or workflow that clears those fields.  As far as I've look into the clone documentation I think i'm using the clone parameters that meet my needs.  Am I using deep clone wrong? Or what else should I take a look into?

I am trying to Clone a lead when certain condition is arrived using before trigger but i am not able to see cloned record.   for( Lead ld : Trigger.new ) {                          if(ld.Integration_Source__c == 'Hubspot' && Trigger.isUpdate){         Lead LeadBeforeUpd = Trigger.oldMap.get( ld.Id );         if(ld.Program__c != LeadBeforeUpd.Program__c ){            Lead ClonedLead = new Lead();            ClonedLead = LeadBeforeUpd.clone(false, false, false, false);         }     }  }


Let $K$ be a Galois extension of $F$ and let $a\in K$. Let $n=[K:F]$, $r=[F(a):F]$ and $H=Gal(K/F(a))$. Let $\tau_{1},\dots,\tau_{r}$ be left coset representatives of $H$ in $G$. Show that $\min(F,a) = \prod_{i=1}^{r}\left(x-\tau_{i}\left(a\right)\right)$.  Conclude that $\prod_{\sigma\in Gal(K/F)}\left(x-\sigma\left(a\right)\right)=\min\left(F,a\right)^{n/r}$.  Help me a hint. Thanks in advanced.

Let $K$ be a Galois extension of $F$, and let $a\in K$. Let $n=[K:F]$, $r=[F(a):F]$, and $H=\mathrm{Gal}(K/F(a))$. Let $z_1, z_2,\ldots,z_r$ be left coset representatives of $H$ in $G$. Show that    $$\min(F,a)=\prod_{i=1}^r\left( x - z_i(a)\right).$$   In this product $\min(F,a)$ is of degree $r$. That is true from fundamental theorem.  And if one of $z_i$ is the identity, then $a$ satisfies the polynomial.  My question is:  What is the guarantee that $z_i(a)$ belongs to $F$ for all $i$?  What if I choose a representative which is not the identity of $\mathrm{Gal}(K/F)$?


Can i use Ubuntu's startup disk creator for the creation  windows 10 boot able USB stick. Suggest any other way for bootable drive creation

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


How do I automatically generate different image styles in Drupal 8, for existing images?  For example, I have about 10K images in field_image field. I would like to generate thumbnails using my thumbnail image style for those images.

I have a module that create custom PDF with multiple selected nodes and I use the below function to create the link to styled images:  $file = File::load($img_id); $imagesPath[] = ImageStyle::load('550x300')->buildUrl($file->uri->value);   Unfortunately, the image itself is not created, only the link, which is ok if I display it on a simple webpage because Drupal will create it on the fly when needed but on a PDF it cause errors because the image it not found before the PDF could be displayed.  Is there a programmatically way to create this image ?  Thanks.


I originally read this in the 1980s or 1990s; the author was considered up-and-coming at the time, but not really well-known.  The two main characters were a 'courier' and a wealthy student:   the 'courier' wasn't a messenger so much as an escort into the 'hidden worlds'. The hidden worlds were only accessible through a tunnel on the blasted world; this led to a world of high-tech that was treated as magic; from there, there was another tunnel to a world of real magic (by invoking sprites/imps/demons/etc).  the wealthy student was ostensibly studying the hidden worlds, her real purpose was to study the courier/escort. She was also trying to get away from a smothering bodyguard, who managed to follow them into the hidden worlds.    The denouement involved a revelation that there was a fourth world, where the demons invoked on the third actually came from, and there was a subplot involving a character trying to bring a demon into the high-tech world.

I read this story in the 1990s or early 2000s, I believe. It was about a world with three layers or zones, and in order to travel from one zone to the next, travellers could only do so naked, otherwise a force field in the tunnel would prevent their passage. The second layer had many voice-activated "magic" devices, such as flying chairs, and put an emphasis on the number 6. The third layer had demons, and placed an emphasis on the number 5. The end of the story is that the system was devised to trap demons in the third layer, and the technology and numerology of the second layer was supposed to make it inhospitable and/or its population unsusceptible to the demons.


I had a discussion about this recently: do you write ). or .)?  For example:  "Websites can be assigned to application pools, all application pools containing specific settings for applications (allowing you to isolate websites)."  Or:  "Websites can be assigned to application pools, all application pools containing specific settings for applications (allowing you to isolate websites.)"

Where should the period go when using parentheses? For example:     In sentence one, I use this example (which has a parenthesis at the end.)   Should the period be inside, or outside of the parentheses? What about if the entire sentence is a parenthetical (as below)?     (Where does the terminal punctuation go here?)   Is there a hard and fast rule?


I keep seeing this more and more (and on sites other than SO):  A question is asked about a practical problem  People post comments (at best) or even answers (even worse) that are eloquent, highly voted, and totally offtopic/irrelevant, amounting to things like "You shouldn't be asking this question", "You are asking the wrong question", "Why do you even want to know", "Your shouldn't be solving this problem but another problem" (the latter is known on StackOverflow as X-Y problem). I'm especially concerned with the first two comments.   There are tons of examples; the last one I saw today was on Workplace. The question "  " generated the following comments, all upvoted:    Why are you asking this question on behalf of your friend - is your friend responsible for the salary distribution? Is your friend part of management? If not, it's none of your friends' business how the management copes with it. The management sets and implements policy, they get to deal with the consequences of their decisions     sorry, but your friend is unethical. He fired someone for sharing salary info? At the same time he was screwing over his employees salary wise, including with gender-discrimination? And now he wants to "fix" the issue? If your friend is the manager/CEO, the fix is he resigns and leaves. He has no place in the modern workplace.  {{ my note: this isn't simply offtopic, but also incorrect. Most companies have explicit policy against making compensation public and releasing even your own salary is a fireable offense and is ALWAYS explicitly stated so in most compensation discussions, at least where I worked }}   Just to be clear, I'm NOT complaining about the users' behavior as far as posting this - as a matter of fact the person who posted the second comment publicly apologized for making incorrect assumptions. However, I'd like to see if we have a policy against posts in this spirit ("Your question is wrong") and as such, be able to flag such comments - which frequently are popular and upvoted - for deletion. Please note that this doesn't seem explicitly covered by "Code of Conduct" and "Be nice" - the comments are frequently generally polite-ish and not personal, objecting to the question's content and not the person. The problem with such comments is that frequently, the OP already knows about the alternate avenues, the reasons why common solution to their situation differ from what their question discusses, etc...; and usually OP has valid reasons for asking the exact practical question they are asking.

I've often seen questions getting questioned and people coming up with anwsers that are totaly irrelevant.  For example, in  I was looking for a library that adds attributes in a certain order to XML documents. Someone on Stack Overflow was asking about this, and all he got was people telling him that this is not XML standard and he shouldn't do that. I needed ordering attributes too because of readability, but all I found were useless answers. I had to ask the question again and provide reason in order to get useful answers.  Providing a reason for a question might be a good thing, but is it really so hard to answer questions, even if who asked did not explain all the details about his reason for asking?


I am a chinese. I am a caucasian. I am an asian. I am a spaniard. I am a vulcan/vulcanee?  Is there such things?  By the way this question is in using adjectives as noun in general and not bound to nationality.

I am confused with the use of an indefinite article in front of British or Chinese.  To my understanding, we can place an indefinite article in front of any “countable noun”.  So, we can say a cup and an orange.   But when it comes to nationalities, it is very confusing. For example, we can say an American or a German. But we cannot say a British or a Chinese.   I looked them up in a dictionary as at first I thought British and Chinese are adjectives in the above statement and that is why we cannot place an article in front of it.   However, the dictionary mentions that they are nouns.  Does that mean they are uncountable nouns?


If I write synchronized(this) in two function of the same java class, but these two functions are maybe called by two threads, does this code still work?  Some fake code maybe looks like:  class A {         public funA()             synchronized (this) {                 // do some things here;             }         }          public funB() {             synchronized (this) {                 // do other things here;             }         } }   Or do I need to add a variable to do it?

Whenever a question pops up on SO about Java synchronization, some people are very eager to point out that synchronized(this) should be avoided. Instead, they claim, a lock on a private reference is to be preferred.  Some of the given reasons are:    (very popular this one, also has an "accidentally" variant)     Other people, including me, argue that synchronized(this) is an idiom that is used a lot (also in Java libraries), is safe and well understood. It should not be avoided because you have a bug and you don't have a clue of what is going on in your multithreaded program. In other words: if it is applicable, then use it.  I am interested in seeing some real-world examples (no foobar stuff) where avoiding a lock on this is preferable when synchronized(this) would also do the job.  Therefore: should you always avoid synchronized(this) and replace it with a lock on a private reference?      Some further info (updated as answers are given):   we are talking about instance synchronization both implicit (synchronized methods) and explicit form of synchronized(this) are considered if you quote Bloch or other authorities on the subject, don't leave out the parts you don't like (e.g. Effective Java, item on Thread Safety: Typically it is the lock on the instance itself, but there are exceptions.) if you need granularity in your locking other than synchronized(this) provides, then synchronized(this) is not applicable so that's not the issue


We take for granted you can get almost anything you want.   But, Where do replicator patterns come from?  I don't recall any discussion of this.    (Possibly the only evidence I can recall is that Data orders Feline Supplement #N.)  For example: Are they created by Starfleet Foodservices?   Are there chefs who specialize in creating replicator patterns? Can you readily scan an object to create a replicator program?  If you request the same item multiple times, how similar are they?    Related, but old; different scope; and has no well-sourced answer:

In any series of Star Trek using this technology, how are new items--food-related or not--added to the replicator database for future replication? Couldn't find anything on  or the .  Is there an official procedure involving some sort of program where you name and describe what it is before adding a sample? Or is it more of a "here ya go" type of insertion? Can you only give a partial list of ingredients and tell the machine it needs certain extra things to be complete (give it beef, then specify it also needs a bun, lettuce, tomato, and Miracle Whip)?  If there are differences in procedure between generations, I'd like to know those as well.  Don't care about canonicity.


When I try to find a specific byte with grep not using pipe I get some output:  $ grep -aboP "\\x55" bigfile 510:U 1049086:U 1049598:U   But when a pattern is supplied via pipe then there is a memory exhausted error:  $ echo "\\\\x55" | grep -aboPf - bigfile grep: memory exhausted   Why does it happen and how to make it work?

I was doing a very simple search:  grep -R Milledgeville ~/Documents   And after some time this error appeared:  grep: memory exhausted   How can I avoid this?  I have 10GB of RAM on my system and few applications running, so I am really surprised a simple grep runs out of memory. ~/Documents is about 100GB and contains all kinds of files.  grep -RI might not have this problem, but I want to search in binary files too.


If you edit a post using the Android app and the screen turns off to save battery, upon resume the post is still there for editing, however all edits are lost. This doesn't seem to happen every time though, which is the strange thing.   This is on version 1.0.68 on Lollipop.

When editing in the Stack Exchange Android app and navigating away to get some reference URLs the text is gone when I go back into the app.  Seems like the edit isn't kept in memory. Can you please save them in memory? (drafts)


TL;DR : what is the easiest way to create desktop shortcut to a program ?  When I first started using GNOME with Ubuntu I immediately tried to find ways of creating desktop shortcuts/launchers to launch common programs.  My attempt to get desktop icons into GNOME lead me to  which describe several hacks to get desktop icons for common programs.  I've found that these solutions are convoluted despite this being a common request.  There is already a question which attempts to ask the same thing, but it was closed, presumably because it wasn't particularly clear:

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I used to work with WFA but no I want to try the WPF platform, too.  I need to assign an existing bitmap to the image control.  private void Window_Loaded(object sender, RoutedEventArgs e) {     Bitmap sc = screenshot();     ima.Source = new Bitmap(sc);  }   this line just not working: ima.Source = new Bitmap(sc);  in picturebox it i can only use this  ima.Image = new Bitmap(sc);   but now its throwing an error:     Cannot implicitly convert type 'System.Drawing.Bitmap' to 'System.Windows.Media.ImageSource'.

I have an instance of a System.Drawing.Bitmap and would like to make it available to my WPF app in the form of a System.Windows.Media.Imaging.BitmapImage.  What would be the best approach for this?


I have been having problems trying to install ubuntu-desktop on my VPS Ubuntu server 16.04  This is what I did:  sudo apt-get update sudo apt-get upgrade sudo apt-get install ubuntu-desktop   Then, I added a password to the root account. I read that I had to do that to access the Ubuntu desktop. I did this:  sudo passwd root  sudo passwd -u root   When I restart the Ubuntu server, I get the field to enter the password only. the option for username does not appear. I get this, but it says that the password I entered is incorrect. But it is correct.

Trying to run a Ubuntu server for the first time... But everything is in a terminal. Is there a way to switch to a GUI?


Given this diff command:     ./a.out < 1.in | diff - 1.out     What does - mean after the word diff? Thanks for the help!

cd - can switch between current dir and previous dir.  It seems that I have seen - used as arguments to other commands before, though I don't remember if - means the same as with cd.  I found that - doesn't work with ls.  Is -  used only with cd?


I am designing a cloud deployed system where users can log in and upload some user-specific images (not super large files, but maybe sometimes >1mb that are then later displayed in the system to the specific user. I am asking myself if I really need Blob storage or if I can go with a SQL database only... what do you think? Thank you very much.

What is the best place for storing binary files that are related to data in your database? Should you:   Store in the database with a blob Store on the filesystem with a link in the database Store in the filesystem but rename to a hash of the contents and store the hash on the database Something I've not thought of   The advantages of (1) are (among others) that atomicity of transactions is preserved. The cost is that you might dramatically increase storage (and associated streaming/backup) requirements  The goal of (3) is to preserve atomicity to some degree - if you can enforce that the filesystem you are writing to does not allow files to be changed or deleted, and always has the correct hash as filename. The idea would be to write the file to the filesystem before permitting the insert/update referencing the hash - if this transaction fails after the filesystem write but before the database DML, that is fine because the filesystem is 'faking' being the repository of all possible files and hashes - it doesn't matter if there are some files in there that are not being pointed to (and you could clean them up periodically if you are careful)  EDIT:  It looks like some RDBMSs have this covered in their individual ways - I'd be interested to know how others do it - and particularly in a solution for postgres


Is it possible to upgrade 13.10 to 14.04 with live USB?

What are the different ways I can use to upgrade Ubuntu from one release to another?


Consider the following HTML:
     aaaa     bbbb     cccc     dddd     eeee
   How can I use JQuery to match the [aaaa, cccc, eeee] elements? I've attempted  $('div > :not(span)')  $('div:not(span)')  $('div').not('span')   But they all returned an empty array.

I would like to get all descendant text nodes of an element, as a jQuery collection. What is the best way to do that?


I am new to administering SQL Server however I am comfortable with the SQL language and making SSIS packages.  I want to migrate data from SQL Server 2005 to 2016.   My question is do I need to worry about the system databases and other objects such as indexes, stored procedures, view, security and permissions. logins or can I just migrate data.  Which would be the recommended procedure in this case.

I have recently upgraded SQL Server 2000 database to 2008 R2.    What I did was:   Shutdown SQL Server 2000 (express) service on old machine, Move datafiles (mydatabase.mdf and mydatabase.ldf) to new machine, Run SQL Server Management Studio 2008, Connect to local database engine, Attach datafiles to database. Change the compatibility level of database to SQL 2008 (100).     Question: What else should I do to make migration complete?  I want to:   use new features like checksumming and full recovery model, make this database to be exactly as it was created in SQL 2008 R2, make this database to be fully compatibile, correct and be perfect suited for new, SQL 2008 R2 database engine.     In other words: I just want to know how to correctly and completly convert old SQL 2000 database to new 2008 R2 database, be calm that everything is done right and be happy with all new features.    I'm asking this question, because I've found a lot of sites on the Internet that says so many different things that makes me confused: some say that it is required to rebuild indexes, another says to do other things... and now I know nothing so I want to hear experienced person opinion and clear, step-by-step instructions. I work for very small company, I'm on my own and I don't want to screw things up.    Sir, I'm really impressed with your answer, I wasn't expecting so much.    So some comments:   The database is now in production. As I said, it was upgraded using deattach-attach method as I desribed in first post and as described on MSDN:  It had to be done quickly, so I was forced to do it that way. Let's forget about how inappropriate could it was and focus on current situation. The users/persmission is not a problem here - there are only few and permissions are simple. The application which use database is compatibile with SQL 2000 till 2012 so this is not a problem either. The database file (MDF) isn't big - only about 1GB.     Few more questions:   You recommend to use backup/restore method, but I did as written above, so can I encounter any problems now? Everything worked without any problem. About checksumming and full recovery model: it wasn't available/enabled on SQL 2000, so I want to use them now. You said that the only thing I need to do is to enable those options in database properties? I've read somewhere, that it isn't enough and I should also rebuild indexes or something. I really don't know, I just asking. I'm prepairing to migrate this database to SQL 2012 - so first it was from SQL 2000 to 2008 R2, now it will be from 2008 R2 to 2012 (it was impossible to do this directly because of lack of support of SQL 2000 databases in SQL 2012). So I understand that I should follow your guide: backup it in 2008 R2 and restore in 2012, then do the rest of your tips, right? Please explain me the backup/restore method: Is it like a dump of database to SQL queries and then restoring it by executing a bunch of queries? Will this method by the way "defragment" my database? If not, how to defragment/optimize it manually? As we were using SQL 2000 Express for years (no management interface), we were doing backups simply by stopping engine and RAR the DATA directory. For now, as we are on SQL 2008, isn't this still better than using backup function in Management Studio? Full recovery mode with frequent Transaction log backups - Where is the Transaction log stored - is it the LDF file? How sould I backup it properly?     I know that my questions may sound silly, I'm not professional database admin, but I am the only person here who can do such "hard core" task like upgrading the database engine. I'm also sure that your knowleadge will help a lot to other people like me.  Thank you very much for your time and knowleadge, I really appreciate this.


I thought this would be a common question, but I can't find any answers to it past 2009 (The answers from then seem to be outdated, it tells me to do Ctrl+P but it opens up a tab called 'Set Parent To"?).  I joined three objects using Ctrl+J, how do I "un-join" these objects?  Sorry if this is a duplicate, I couldn't find any clear answers to this. Thanks!

Let's say you have a single obj with a number of separate closed 3D geometries in it. For example's sake, imagine you have an obj called neighborhoodfirehydrants.obj that includes the model for all of the fire hydrants on a street, which themselves are closed, but as I said above, are all within the same obj file.  Now let's say you wanted to be able to process each of those fire hydrants one at a time, separately. To the user, it's very obvious to see visually that these faces can be subgrouped into separate "objects" but in the Blender world, it sees them all as one.  I'm looking for a way (script would be ideal) to iterate through a blender obj neighborhoodfirehydrants.obj and find each of the "objects" (fire hydrants) that make it up. I've been looking into using the looping tools, but that's not making sense in this context.


I want to filter a list to remove the element with duplicated attribute, see code snippet below:     public class People{       string name;       string priority;       //...getter setter     }     list<People> peopleList = //...get a list of people    Here I want to show a list of people with unique name attribute , how to operate the peopleList  ? and also if there are several People object with same name, i want to check the priority to decide which one should be in the final unique list. hope i am clear.

I want to filter a java.util.Collection based on a predicate.


I have a content type that anonymous user can submit content, Now in a mobile application I want to let them submit content with REST API,   My snippet to submit :   (function($){                      jQuery.ajax({                         url: '/rest/session/token',                         method: 'GET',                         success: function (token, status, xhr) {                             var postData = {}                             postData.title = [{'value': 'My Basic Page'}];                             postData.field_enroll_email = [{'value': 'yusef@gmail.com'}];                             postData.type = 'enroll';                             jQuery.ajax({                                 url: "/entity/node",                                 method: "POST",                                 data: JSON.stringify(postData),                                 headers: {"Accept": "application/json", "X-CSRF-Token": token, "Content-Type": "application/json"},                                 success: function (data, status, xhr) {                                     console.log(data);                                 }                             });                         }                     }); })(jQuery);   this work correctly in browser console when I'm logged in, and When I try it without login return "403 permission is denied". I set permission for anonymous user to create "mycontent1" content. **I want to know how can   anonymous user post content with REST in Drupal? **

The Drupal 8 REST UI configuration page asks me to select Authentication providers for GET method; otherwise, it doesn't allow me to export the REST request.  How can I provide anonymous user to access my REST GET API without providing any auth information?


When I try to install something on my ubuntu I get erors on terminal saying package wasn't located.  latvietis@datorslatvietim:~$ sudo apt-get update [sudo] password for latvietis:  E: Malformed line 1 in source list /etc/apt/sources.list (dist parse) E: The list of sources could not be read. latvietis@datorslatvietim:~$

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


Relativistically, when two frames, say A & B are moving apart inertially, then the clock of  B will look slow compared to that of A; and the same holds for the clock of A from B.  What does the comparable set up look like in a gravity well, with A at the bottom and B at the top?   My guess would be not, because the situation isn't symmetrical; whereas the SR setup is.  I'm not interested in a quantitative calculation; but simply whether they're slower or faster; and simply a confirmation or refutation of the guess.

This question is mainly inspired after watching the movie known as Interstellar We knew that for time dilation caused by relativistic motion between A and B. A will measure B's clocks slowing down, and B will measure A's clock slowing down by the same rate, while they both measure their own clocks ticking normally In interstellar, there's a planet that experience severe gravitational time dilation relative to earth's frame due to being in close proximity to the black hole Gargantula, therefore for every hour spent there measured by the astronaut's frame, 7 years will have passed in Earth's frame Thus this means to Earth's frame, they will measure the astronaut's clocks to be ticking slower relative to them  But what about earth's clock as measured by the astronauts? Will they measure Earth's to be ticking faster than theirs (at the same magnitude it is slowed in earth's frame measuring theirs)? Because if they both measured the other's clocks as running slower, then how could the twin paradox like aging difference be possible?


I won't be writing each step explicitly because it takes me forever to write this up in math format.  $$ \int_2^4 \frac{\sqrt{\ln{(9-x)}}}{{\sqrt{\ln{(9-x)}}}+{\sqrt{\ln{(x+3)}}}}\,dx $$  My solving of it went as follows: $$ \int_2^4 \frac{\sqrt{\ln{(9-x)}}}{{\sqrt{\ln{(9-x)}}}+{\sqrt{\ln{(x+3)}}}}  \frac{\sqrt{\ln{(9-x)}}}{\sqrt{\ln{(9-x)}}}\,dx= $$ $$ =\int_2^4 \frac{{\ln{(9-x)}}}{{{\ln{(9-x)}}}+{\sqrt{\ln{(9-x)}\ln{(x+3)}}}}\,dx  $$  It has at this point been an hour and I won't waste more time to make the equations look pretty. $$ =\int_2^4\frac{\ln(9-x)}{(\ln(9-x) + \ln(9-x)^{\ln(x+3)/2}}\,dx $$  Factor out ln(9-x) and cancel and you get  $$ \int_2^4\frac{1}{1+\ln(9-x)^{(\ln(x+3)-2)/2}}\,dx $$ After a bit more simplifying (bringing down the exponent and multiplying, then moving the 2 out of the integral, then simplifying the remaining $\ln$'s) you get $$ 2\int_2^4\frac{1}{2+\ln\frac{x+3}{9-x}}\,dx $$ And this is an easy integral because it is directly derived from arctan. I get the antiderivative is $$ \frac{1}{\sqrt2}\arctan\left(\frac{1}{\sqrt2}\sqrt{\ln\frac{x+3}{9-x}}\right). $$ But when I try to use that for the definite integral, I get a negative under the square root, so it must be wrong. Can someone explain where I must've gone wrong? I hope I gave enough information so that you know what I did.

This is a Putnam Problem that I have been trying to solve (on and off) for two years, but I have failed. I am in Calculus BC. This problem comes from the book "Calculus Eighth Edition by Larson, Hostetler, and Edwards". This problem is at the end of the first section of the chapter 8 exercises. Here's the problem:  Evaluate $$\int_2^4 \frac{\sqrt{\ln(9-x)}\,dx}{\sqrt{\ln(9-x)} + \sqrt{\ln(x+3)}}.$$  Please. Any help is very much appreciated. So are solutions. Thank you!  Edit: I like the solution given, but I was interested to see if there is any other way of doing the problem? I'm excited to see the results.


When I was rendering my image, I noticed that it looks weird (top left, and right side). I don't know what causes this issue, never had it before.    useful info/settings: samples = 256 I render using my CPU Max light bounces = 12 Denoising on def settings  Thanks.

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


For C Using stack, means throwing out called function variables first and then return address and then parameters. But when we use static storage class, the value of variable persists between different function calls. Stack uses last in, first out. and since function variables are last in, they should be first out but here they are not thrown out, so this means all the other information takes up memory as all... Is this how it works? But I feel this is not the most optimal way.. How are static storage class variables handled?

I've seen the word static used in different places in C code; is this like a static function/class in C# (where the implementation is shared across objects)?


If $S = \{1/n \mid n ∈ ℕ\}$, what is $\inf(S)$?   I believe the answer is $0$, but I'm not really sure how to prove it...does it involve using epsilon?

We are given the following definition:  If a sequence $(a_n)$ is bounded from below then there is a greatest lower bound for the sequence called the infimum.     $m=\inf(a_n)$ if  i) $(a_n) \geq m \ \forall n \in \mathbb{N}$.  ii) For each $\epsilon >0 \ \exists \ n_\epsilon \ \in \mathbb{N}$ such that $a_{n_\epsilon} < m + \epsilon $.       Show using the definition that, if $a_n=\frac{1}{n}$ then $\inf(a_n)=0$.   Here is what I have:  i) RTP: $\frac{1}{n} \geq 0 \ \forall n\in \mathbb{N}$.  Assume that $\frac{1}{n} < 0$ for some $n \in \mathbb{N}$.  $\implies n < 0$.   But we know that $n \in \mathbb{N}, n \geq 1$, and thus we can say that$\frac{1}{n} > 0\ \forall n \in \mathbb{N}$.  ii) Let $ \epsilon > 0$ be given.  RTP: $\exists n_\epsilon \in \mathbb{N}$ such that $\frac{1}{n_\epsilon}<0+\epsilon = \epsilon$.  Proof:  $\frac{1}{n_\epsilon} < \epsilon \implies n_\epsilon > \frac{1}{\epsilon}$, since both values are positive.  For the given $\epsilon > 0$, choose $n_\epsilon > \frac{1}{\epsilon} \in \mathbb{N}$.  Now from the Archimedes Postulate, we know $\exists n \in \mathbb{N}$ such that $n \geq n_\epsilon$.  $\implies n \geq n_\epsilon > \frac{1}{\epsilon}$  $\implies \frac{1}{n} \leq \frac{1}{n_\epsilon} < \epsilon$, since all values are positive.


I'm trying to figure out how to set up the Database structure.  There are ~10000 employees.There will be a table to store the basic details of the employee, and another table for storing transactions of the employee, so I decided to create separate tables for all the employee to record their transactions, which means ~10000 tables.  So my question is, is it efficient to create that much of tables(~10000), or any other approach you can suggest, I will be using MySQL as database and a Java client, in a LAN.

I'm creating a web directory that will allow individual users to signup for an account and store essentially text documents in a mysql database entry.  Initially there will likely be only a few hundred users, but we hope to have 10,000 to 100,000 at some point.  And each user would be able to upload 100-200 "documents".  Would it be more efficient to create one massive table, indexed by a user number?  Which could theoretically grow to be 20,000,000 entries.  Or to go ahead and create a table for each user with their individual documents?  I'm assuming it's not healthy to have thousands of tables in a database, but I really can't find any concrete data on this.


I wanted to efficiently set a bunch of variables to an empty list. However, using this method, operations on one variable seem to apply to all:  >>> r1,r2,r3,r4,r5,r6,r7,r8=[[]]*8 >>> r1 [] >>> r1+=[2] >>> r1,r2 ([2], [2])   Why is this? Also, what is the most efficient method that leaves each variable independent?

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 put some pork ribs in a home-made sous vide machine for 12 hours at 75C.  They were at that temp for at least five hours, probably longer. In the morning I noticed that the element had packed in and the temp had dropped to 32C (about 15 deg higher than the air temp over night).  Is it possible to heat it back up to kill anything that may have started breeding in the danger zone?  I saw a similar question but that was a lower temp so there was no way of knowing if the internal temp had been hit. Or just chuck it :( ?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Let's say that a part of the dungeon with X monsters can be either passed through combat OR through careful diplomacy, can the players be awarded XP points the same way if they choose the latter? It seems like it's a cool way to reward role playing instead of just fighting - and the players can save spell slots/per-rest abilities at the cost of the loot. Is that something that D&D supports?

I have created an encounter with monsters, with their relevant CR and XP. Normally, when the party kills everyone, they are rewarded the XP. If the party chooses to, and succeeds in, resolving the encounter without combat, do they get the XP they would've received for killing the monsters, or do you award XP based on the task they performed to defeat the encounter (and maybe use the DMG's easy/medium/hard XP reward for non-combat encounters)?  The possible solutions that come to mind:   They avoid the area (0 XP, as they didn't interact with situation) They talk their way out of it (Does this get the combat encounter's XP?) They find a very clever way to avoid fighting, with risk of being caught/killed/fall to their deaths (here I'm not sure if there needs to be a different set of XP values for what they're trying to accomplish).   I understand that a lot of people will say "I can do what I want", but I'm asking to find out what is the "standard".      I am not asking whether or not I should award the XP. I believe I should, and the DMG says I can/should too. I am asking if the XP awarded should be the same as if the PCs killed all the monsters, or at the difficulty of the "method" they thought of using.  For example, if they avoided the encounter by running through them stealthily and the monsters didn't see them (has risk) or by going overhead using the beams (risk of falling into the fight), should I award the full "killed-the-monsters" XP or a lesser XP because it's not difficult to go over the beams in a stealthy manner.


I have very long binary numbers stored in strings. Each 8 characters (i.e. each 8-bit chunk) represent an ASCII character code. To give an example, 0100100001101001 is 2 8-bit numbers (01001000 & 01101001), which are the character codes for 'H' & 'i'. So the whole thing is a binary representation of 'Hi'.  My question is, is there a way to force a for loop iterate through a string in bigger chunks so that I can read 8 letters at a time? In other words, I'd like the for loop to assign 8 characters to my iterator variable per loop iteration instead of 1, so that I can easily determine the character codes represented by the string.  Thanks in advance.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I am working on an ios project and I want to add the project to my gitlab account. I'm using command line for managing git, not XCode.  I wonder what are the files I should exclude from my repository.  My candidates for exclusion are from the xcodeproj package only:    The xcuserdata folder but I see it includes scheme information so I'm not completely convinced. The project.xcworkspace package   Is this correct? Is there anything I'm missing?  Thanks.  The question identified as a possible duplicate asks specifically "in conjunction with Xcode". I am using command line. They're may be no difference but that was part of the question. Besides the answers to that questions are dated and this question may have different answers overtime, at least that is my understanding.

Which files should I include in .gitignore when using Git in conjunction with Xcode?


I would like to add a custom Date field to a standard Activity object. Lets say this date field is called 'food_expiration__c'. Looking at another question:   So I go to to Activity.object and add to the existing fields:  <fields>         <fullName>food_expiration__c</fullName>         <description>When food expires</description>         <externalId>false</externalId>         <label>Food Expiration Date</label>         <required>false</required>         <type>DateTime</type>     </fields>   Then I open my deployment package.xml and see the following two custom classes that I had modified:  <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata">   <types>     <members>Custom_Class1</members>     <members>Custom_Class2</members>     <name>ApexClass</name>   </types>   <version>47.0</version> </Package>   Am I to then add the following : Activity    so that when I deploy that this custom field exist ?  Sorry I cant try it at the moment but mostly trying to understand how it is done right

I want to add custom fields to the Contact Object in SFDC. When I look into the package.xml I do not see any of these changes or fields. I am missing something?


I have installed Skype in Ubuntu, but I do not know where to start the installed the Skype application .Similarly  I have installed Netbeans and other applications but their icons are not appearing in any menus.  Related: how to uninstall already installed applications?

Under Windows, most applications and application data are stored in a special directory known as C:\Program Files (and occasionally C:\Program Files (x86)). What is the Ubuntu/Linux equivalent to this path? Is there even one?


I elaborated upon   to develop an example:  \documentclass[margin=1cm]{standalone} \usepackage{tikz}  \usetikzlibrary{decorations.text}  \begin{document}  \begin{tikzpicture}  \draw (0,0) ellipse (2cm and 1 cm); \path[    postaction={      decorate,      decoration={        text along path,        reverse path=true,        raise=-0.3cm,        %text align={left indent = {0.75\dimexpr\pgfdecoratedpathlength\relax}},        text={very long text}      }   } ] (0,0) ellipse (2cm and 1cm);  \end{tikzpicture}  \end{document}   The output is:    I would like to place the text on top of the ellipse. For this I uncomment this line:    text align={left indent = {0.75\dimexpr\pgfdecoratedpathlength\relax}},   The output is     What is left is to replace left with center. Unfortunately then the document does not compile. How to solve?

I would like to place text exactly centred over an exactly specified point on a highly complex path as shown in this Figure:    I have developed my example by specifying the point at 0.1 from the beginning of path and adding a mark to it:  \documentclass[border=1cm]{standalone}  \usepackage{tikz} \usetikzlibrary{decorations.text, decorations.markings}  \begin{document} \begin{tikzpicture}  \coordinate (A) at (0,0); \coordinate (B) at (1, 3); \coordinate (C) at (2, -1); \coordinate (D) at (3, 0.5);  %placement of mark                                                                                \draw plot [smooth] coordinates { (A) (B) (C) (D) }; \path [    postaction={decorate},      decoration={        markings,        mark = at position 0.1 with {\fill[red] circle[radius=0.2cm];}   } ] plot [smooth] coordinates { (A) (B) (C) (D) };  %placement of text                                                                                \path [    postaction={decorate},      decoration={        text along path,        raise=0.4cm,        text align/left indent = {0.1\dimexpr\pgfdecoratedpathlength\relax},        text={here!!}   } ] plot [smooth] coordinates { (A) (B) (C) (D) };  \end{tikzpicture} \end{document}   The output is     To centre the text over the mark I would only need to replace left with center in text align/left indent = {0.1\dimexpr\pgfdecoratedpathlength\relax}. Then everything would be perfect! Unfortunately after this change the example no longer compiles.  How to fix this problem?


Find all integers $x$ and $y$ such that $4y^2=x^7+1$.    I first subtract one from both sides to get $4y^2-1=x^7$, which can be factored into $(2y+1)(2y-1)=x^7$. From here, I can not proceed.   Any ideas?

Proof by contradiction:  1. Suppose  $x^3 + 3 =4y(y+1)$ has an integer solution   Then  $x^3 + 3 =4y^2+4y$ Then  $x^3 + 3 + 4 = 4y^2 + 4y + 4$ Then $x^3 + 7  = (2y + 2)^2$   Not sure how to simplify it further...


I have a 2017 13" MacBook Pro (with two USB-C ports) with Mojave and wish to use it to daisy-chain a display to two external monitors through DisplayPort.  Unfortunately, it seems that although the hardware supports this, MacOS itself does not support multi-stream transport - the two monitors in the chain are mirroring their display with no option to extend instead.  Is there any third party driver or other software available to make this work as intended in MacOS? If not, what would be the best alternate solution to get it working? Ideally, I'd like to avoid buying a separate £200 dock to be able to use multiple monitors and still power the MacBook as well.  The monitors in question are Dell U2515h if that helps - they support daisy chaining through DisplayPort 1.2, although ideally, I'd also like to be able to chain to another monitor too.

I'm thinking about buying the new MacBook Pro with 4 USB-C ports.  I want to attach two screens, mouse and keyboard and ethernet to the MacBook Pro while using the fewest number of USB-C ports possible.  So what I need is an adaptor with:   two DP or HDMI ports (or one DP port with daisy chaining support) two or more USB ports an ethernet port   Best case would be a hub to which all devices are connected with a single connection to the MacBook Pro, including power supply. Worst case if attaching the MacBook Pro to the devices would require me to use all four of USB-C ports.  Given the answers up to far, I can tell that:   Daisy chaining might or might not work with the MacBook Pro (since it requires DP1.2 which is supported by the graphics chipset, but it's uncertain if it's supported by the MacBook Pro itself) I can attach the monitors with two cables as a last resort, leaving me with two ports for the remaining peripherals.   What I still don't know:   Would daisy chaining work with a hub or does it require the first monitor to be directly attached to the MacBook Pro? Does some kind of hub exist supporting attachment of all listed devices with a single upstream connection to the MacBook Pro?


I'm working on a roulette table on a server that I'm playing on, inspired by :       It uses a minecart with an armor stand inside it. The minecart is not visible, but the top of the iron helmet on the armor stand is visible like a moving square on top of the diferent-coloured carpets above the minecart. The minecart goes in a circle (about 3x3 blocks big) on powered rails, until a player flicks a lever and stops the minecart by turning off the rails.   The main flaw of this is that the moment the roulette stops isn't random. This could cause some arguing between the players. How can I avoid this problem? Is it possible to have a button that will stop the rails at a random moment instead of the lever?  It would also be nice if you could avoid using too complicated redstone circuits and command blocks.  Note: You can check out MagmaMusen's video "" if you didn't get the way it works from my explanation.

I have 5 buttons and only one of these can be correct, all others must be false. These 5 outputs will go into 2 outputs, in between there needs to be a circuit which changes which single button out of the 5 will go down the "correct" output of the final 2. The 4 remaining buttons must go to the second of the final 2 outputs. Both final outputs must give out a true signal for a brief period the same as a button on its own would produce. There should also be a way of activating the circuit. Not sure if that is explained well enough so I have made a basic diagram of what I need.  The diagram shows how I need the signal to be split. However in between the buttons and the final two wires there needs to be a circuit (marked by the grey box). This circuit changes the single button connected to the left wire. The right input should start the circuit and randomise the 5 buttons. There are no limits to size, amount of materials used or method used. This question is similar to the one asking about , but I am specifically working with Redstone circuitry - the commands solutions do not apply here


I believe this story was from the same anthology as this other one:   I vaguely remember that an attempt is made using a metal bar to do something to the space on the other side of the wormhole (destroy it?), but at the very end, the characters realize that someone on the other side might in fact be doing the same thing to them.

This  reminded me of a story I read in the 90s.  A woman is caught shoplifting a bunch of metal items by throwing them into her purse. She has no memory, and the purse is empty. Anything metal they put in disappears. The police turn it over to government scientists, who investigate by attaching a large lump of metal to some extremely strong wire and dropping it in like a fishing line.      They have it hooked up to the biggest, strongest crane available, and they begin reeling it back in. They reason that if whoever is on the other side can't let go, it could turn their universe inside out or something equally unpleasant, thus giving Earth the leg up in opening negotiations.   and then      The tension on the line increases until is under too much tension to cut. The story ends with the line slowly sliding back into the purse, with the realization that their plan has backfired in the worst possible way.   Anyone know the name of the story and author?


I am looking at  website, and it says "therefore we will need to determine the values of $\lambda$ for which we get, $$\det(A-\lambda I) = 0."$$ Now I am a newbie to linear algebra, and I have looked at several other sources, but I still can't understand why $\det(A-\lambda I) = 0.$ I already understand why $(A-\lambda I)\vec{v} = 0.$Can anyone help me with this?

I was reading over some notes of mine from the Linear Algebra class I took a while ago in order to prepare myself for Computer Graphics course I'll be taking this Fall and I ran across a sentence that I can't quite grasp. It states that     Since we have a non-zero vector $x$ in the nullspace of $A - \lambda I$, then $\det(A - \lambda I) = 0$.   From reading Wikipedia page on determinants I got that     ... the system has a unique solution exactly when the determinant is nonzero; when the determinant is zero there are either no solutions or many solutions.   So if we have vector $x$ in the nullspace of $A-\lambda I$, then we have either 0 solutions or many solutions. But I still don't understand why $\det(A - \lambda I)$ has to be equal zero?


public static void main(String[] args) throws ParseException, UnsupportedEncodingException {     int rishav = 42;     System.out.println(rishav); }  this gives 42, but the below gives 34 :- public static void main(String[] args) throws ParseException, UnsupportedEncodingException {     int rishav =0042;     System.out.println(rishav); }  If I need to transform an integer to trim its leading zeros, what do I do, most feasible.

This prints 83  System.out.println(0123)   However this prints 123  System.out.println(123)   Why does it work that way?


My title is very poorly phrased but I'm having a tricky time describing this.  Basically I am trying to create a repeating background right now. I would like to edit a certain area, but for Photoshop to show that same area next to the one I'm editing so I can see if there are seams.  I know some programs allow this (or allow it radially so you can create snowflake and kaleidoscope effects).  Is Photoshop able to do this?  Here is an image to try and illustrate better what I'm talking about:

Here's an example:   I want to be able to just save the image on the right which will update the picture on the left. This could be done with smart objects I guess, but that's not the case in the Jazza's video. I'm baffled.  I know there are some other solutions, but I want it to work just like in the video. Pressing save updates the image on the left.  For those looking for similar solutions: Pyxel Edit has similar kind of functionality and it's the best.


I measured from the middle of each sprocket and it's 17 inches. Not sure what length of chain I should get

My chain broke and in a moment of silliness (I was cold wet and slightly annoyed)  I threw the broken one away before thinking about measuring the new one.  Is there a guide to getting the chain length/tension correct ?  It's an 8 speed road bike (Shimano Sora back, double ring front)


Let's say my Minotaur ally decided during a brawl to grapple with the nearest brigand, pick him up over his head (or maybe just throw him from a standing position), and .  To do this, I would assume you'd have to make a grapple, which would be an action or at least PART of a fighter with multiple attacks' action. Then, would it take a further action to lift the enemy (or ally) above your head, and another to throw them, or would it be part of the lift action?  How would you determine the distance you could toss this creature?

My bugbear barbarian, who can lift about double the weight of a wolf, wanted to throw the wolf at a second wolf. How would we go about doing that given existing rules options?


I joined a war with a clan that is full of nuts/inappropriate people. After starting war they kicked out a few people who are already in war in their clan. So my clan surely gonna lose. I am in war now. If I choose to leave the Clan now during the preparation day and join another clan, will I be able to war in my new clan? Or I have to wait till the war at my previous/current clan ends?

I am currently in a clan with three members. When we tried to initiate a clan war it said we had insufficient clan requirements. Does anyone know what the full requirements are? Is there a minimum clan member requirement?


I moved to a new place and I have an ancient gas cooker that I can't replace just yet. As the heat source is at the bottom of the oven (rather than the top), would a baking stone help even out the heat and help stop burning?   I’ve found lots of information referring to the beauty of baking stones when using an oven with the heat source at the top but cannot find anything that helps me.

I have a new gas kitchen stove.  The oven seems to burn so easily. I have a thermometer in there and it is registering the temp that I have the oven set on.  I have seen where people have used a pizza stone to even out the heat.  I want to know if you place a rectangle pizza stone directly on the bottom of the oven or should it be placed on a rack on the lowest setting?  I would appreciate replies from anyone who has used this and if it had helped the problem


Sometimes I get a space between the LaTeX logo and the adjacent word and other times I don't see any spacing. How to fix this?

I have a definition:  \newcommand{\arnold}{Arnold Schwarzenegger}   When I refer to it by:  \arnold is a   it is rendered as:   Arnold Schwarzeneggeris a    In order to have a space in front of "is" I would need to write  \arnold\ is a   Is there some other shorter way?


I have text file which looks like this:  Cat Beth 12 female Dog Bob 10 male ... .. .   I want to store it like this:  myList = [["Cat", "Beth", "12", "female"],["Dog", "Bob", "10", "male"], ...] I came up with this idea.My question: Is there a shorter way to do this?  with open("sample.txt") as myFile:    myList = []    temp = []    bit = 1    for line in myFile:        temp.append(line.strip())        if bit % 4 == 0:            myList.append(temp)            temp = []        bit += 1

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


My idea is: if a thread has prohibited content, the thread should be edited (by removing all content and replacing with something like "moderator edit" on the title, content and tags) instead of deleting it. This applies to all types of prohibited or violating content.

I noticed that the posts of the recent spam surge on Ask Ubuntu were all edited by community members into something like     EDITED - REMOVED SPAM ANSWER   or similar.  While I understand why the users have done this and I too don't want to leave the spam content visible for longer than absolutely necessary, it made flagging more time consuming for me.  I had to check the revision for every of those possible spam posts to check if it is actually spam, instead of being able to flag directly from the review site. Spam flags carry a serious penalty, I'm not willing to add my spam flag without checking that it's really spam.  I see the benefit of editing spam, but it also causes some more effort for the later flaggers. Should we as a general policy edit out the content of spam posts, or should we deal with them solely by flagging?


i am trying to build a small search tool for a single table of a mySQL Database. Sadly i can't bind my function parameter to my sql statement and i can't figure out why.  This is how i think it works.(maybe you can spot a mistake in my general approach)   At first the parameter ($field) get passed to the function by referencing it inside the function call at the bottom of the file. I am referencing the paramter key of $field (:field) inside the $dbh->prepare() statement. The variable $field is bound as a Parameter with $query->bindParam() The query is being executed $field is used to extract the title from the modified query.   I already figured out that the problem only occurs when i try to bind the parameter to the statement. So somewhere between step 2-4.  Whenever i insert the $field as a pure string (as "title" into step 2+5) everythings works fine. But thats not very dynamic and therefore i can't use the functions parameter.  Is there someone out there who could give me a hint :) ? I am thankfull for any help.   <?php // establish connection to database $dbh = new PDO($server, $user, $pass);  /* function takes PDO object and a string that defines the column of our table that is supposed to be returned */ function searchField($dbh,$field){      if(isset($_POST['searchbar'])){          $searchInput = $_POST['searchbar'];         $searchInput = "%" . $searchInput . "%";         // (2)         $query = $dbh->prepare('SELECT * FROM docs WHERE :field LIKE :searchInput');         // (3)         $query->bindParam(':field',$field);         $query->bindParam(':searchInput',$searchInput);         // (4)                     $query->execute();          foreach ($query as $doc){             // (5)             return $doc[$field];          }         }  }   ?>  <form action="index.php" method="post" class="search-form">
        <input class="searchbar" name="searchbar" placeholder="Enter a filename..."></input>        <button class="btn btn-default search-button " type="submit"></button>
 </form>
     <?php          // (1) ==== The function call ====           echo "
" . searchField($dbh,"title") . "
";     ?>

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


Ok so I've been watching some videos about black holes but there is one thing I don't get: how can light be bent by black holes since photons don't have any mass?

Light is clearly affected by gravity, just think about a black hole, but light supposedly has no mass and gravity only affects objects with mass.  On the other hand, if light does have mass then doesn't mass become infinitely larger the closer to the speed of light an object travels. So this would result in light have an infinite mass which is impossible.  Any explanations?


I have been trying to solve this on my own but I can't seem to find a solution. Whenever I use, \cite{schneider_2002}, in the PDF it just shows "schneider_2002". It happens with any element in my .bib file. Here is an example of my references.bib file:  @book{schneider_2002,     address = {Pittsburgh},     title = {E-{Prime} {Reference} {Guide}},     publisher = {Psychology Software Tools, Inc},     author = {Schneider, W and Eschman, A and Zuccolotto, A},     year = {2002} }   And here is the preamble of my .tex file:  \documentclass[jou]{apa7}  \usepackage[american]{babel} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{csquotes} \usepackage[style=apa,sortcites=true,sorting=nyt,backend=biber,]{biblatex} \DeclareLanguageMapping{american}{american-apa} \addbibresource{references.bib}   I have tried \cite, \parencite and \textcite, but they don't work.   Thanks!

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


The last couple of days job search by distance is returning jobs well outside of the query   includes jobs in Denmark which is a smidge further than 20 miles from the north of England :)

A few days ago, many users have started receiving emails from job subscriptions that contain jobs that do not match the filters defined for the subscription.  The examples below show screen-grabs from a couple of emails where is bug has manifested itself.  The first shows a subscription for jobs that allow remote working:   When you look at any of the jobs from the above email, they do not allow remote working:   The second example shows jobs confined to a specific geographic area, however, the jobs included within the email are clearly outside of the geographic area defined:   Furthermore, performing a search on the Stack Overflow Careers site for C# jobs within 50 miles of London, UK also give erroneous results:   It seems that there's a bug with the job search that's ignoring all search criteria.


I do a RayCast to the terrain and then use the RaycastHit.normal to plant flags.  I would like to have the flags to point up with the normal, but have them all face the same direction. As seen in the image flag 1 points to left of the screen and flag 5 to the right. I understand why, but do not know how to rotate it. I saw LookRotation (Unity) has an override that takes a forward direction too. I thought it would work with say Vector3.Forward, but if a flag is placed on a wall it points into the wall. The direction or angle they face can be set by the player. I have a hard time understanding quaternions, every time I think I do, I get stuck. Any tips ?

I want to acheive the same rotation you see in the inspector. In short: a smooth local Y rotation, toward a target  I have a Vector3 orientation: Vector3 dirOrientation = targetToLook.position - movingCamera.position;  So, every Update, what should I do ? I try many thing, but I don't realy understand Quaternion...  I just want to rotate localy in Y, toward a precise moving target, NOT in X or Z. and smoothly with some Lerp or Slerp.  Thanks !


I am trying to develop a Notes application where I can save list of notes. These notes will be saved in SQLite DataBase. I have set a button to delete the created note. When I click on this butting during run time (no complete time error) it is giving me a mentioned error. Kindly help in resolving this issue.  I tried to develop this app by reading and copying the code from      inner class MyNotesAdapter : BaseAdapter {      var listNotesAdapter = ArrayList<note>()     var context: Context? = null      constructor(listNotesAdapter: ArrayList<note>) : super() {         this.listNotesAdapter = listNotesAdapter         this.context = context     }       override fun getView(position: Int, convertView: View?, parent: ViewGroup?): View {         var myView = layoutInflater.inflate(R.layout.ticket, null)         var myNote = listNotesAdapter[position]         myView.tvTitle.text = myNote.nodeName         myView.tvDes.text = myNote.nodeDes           myView.delete.setOnClickListener(View.OnClickListener {              var dbManager = DbManager(this.context!!) //This is the line where I am getting error.              val selectionArgs = arrayOf(myNote.nodeID.toString())             dbManager.Delete("ID=?", selectionArgs)             LoadQuery("%")         })

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?


A Norman window is a rectangle with a semicircle on top. For a given fixed perimeter p, what will be the width of the window in order to maximize its area?

A Norman window has the shape of a rectangle surmounted by a semicircle. Find the dimensions of a Norman window of perimeter 24 ft that will admit the greatest possible amount of light.  I know that I need to find two different equation to make the main equation have one variable. I would assume in this case we would use the radius of the semicircle to find something in this equation. P=24. I also know that we can split this into two different equation which would be the area of a rectangle and the area of a semicircle. The area of the rectangle is L*w and I have no idea what the area of the semicircle is. I also think that in this case we are trying to maximize the area of the overall shape. Ive been working on this for a while but I keep getting it wrong. I need help!


I have a mixed effects model with one random effect and two fixed effects, both of which are of interest. There is some reason to believe that there would be an interaction between these two fixed effects.  When I run the model with both main effects and their interaction, none of them are significant. If I take out the interaction term (which I probably shouldn't have done, but I did out of curiosity), one of the effects becomes (very) significant, in a way that would be of considerable interest. It seems to me that I should go with the model with the interaction in it, but I am concerned that I am missing the effect of the variable that becomes very significant once the interaction is removed.   Should I include the interaction in the model? If I haven't provided enough information here for someone else to give accurate advice, what should I consider in order to make this decision?  (Also this is my first question, so apologies if I have asked it poorly)

Is it ever valid to include a two-way interaction in a model without including the main effects?  What if your hypothesis is only about the interaction, do you still need to include the main effects?


All the installation guides for VPN servers I can find go into huge detail about how to setup an IP address range (e.g. ). If I'm using  to give my PC an IP address is there a simple way to setup a VPN server?

I know there are many tutorials on the net for setting up VPN client and server.  I you find one that is simple/short, I am interested only in the server part.   For client, I will use OS X so I prefer a solution that uses L2TP over IPsec or PPTP because I suppose Cisco IPsec would cost something.  I don't want to spent too many hours setting it up. You know, maybe someone already made a setup script :)  Note: I am using an EC2 micro instance running Ubuntu 12.04 on it.


I'm using on Windows machine:  plink -C -L 3333:<internal-server-ip>:80 -N -i keyfile.ppk <user>@<mydomain>  where <mydomain> is an ubuntu 14.04.2 LTS with SSH and keyfile-only remote logins.  I noticed that I can actually port forward to anything behind the NAT on my network through <mydomain> server. I need a guide on how to limit this possibility in such a way, that <user> would be able to port forward only to specific <internal-server-ip> or group thereof?

ændrük  for getting an easy SSH connection with someone else (for remote help). For that to work, an additional user is needed to accept the connection. This user needs to be able to forward his port through the server (the server acts as proxy).  How do I create a restricted user that can do nothing more than the above described?  The new user must not be able to:   execute shell commands access files or upload files to the server use the server as proxy (e.g. webproxy) access local services which were otherwise not publicly accessible due to a firewall kill the server   Summarized, how do I create a restricted SSH user which is only able to connect to the SSH server without privileges, so I can connect through that connection with his computer?


here is the link to the question.i have created directories and files that are required. I may have not understood the question properly but so far i have tried my best. Could try to read and understand the question and give a hint to solve the same.

Given two absolute paths, e.g.  /var/data/stuff/xyz.dat /var/data   How can one create a relative path that uses the second path as its base? In the example above, the result should be: ./stuff/xyz.dat


In a six-degree polynomial, say $f(x)$ we have, $$f(1)=1, f(2)=1/2, f(3)=1/3, f(4)=1/4, f(5)=1/5, f(6)=1/6, f(7)=1/7$$ Find $f(8)$ and the polynomial $f(x)$.  This problem comes all the way from the book of an Indian Author. I tried solving the problem using algebra (definitely not by substituting values in the polynomial and solving for SIX variables). According to me, this question is definitely having a more rational approach. I tried using algebraic techniques by manipulating $f(x)$ writing it in terms of a new polynomial say $h(x)$ but in vain. So can anyone of the bright minds out there could help me in attempting the question. It would be a great help.

I read that it is not always possible to solve but from Wikipedia:      Some sixth degree equations, such as $ax^6 + dx^3 + g = 0$, can be solved   by factorizing into radicals, but other sextics cannot.   So how do you solve this? I've stumbled upon this equation where; $a = n^2$, $d=m^2n-2p^2$, and $g=m^4$. Where the $a,d,g$ corresponds to the above mentioned sextic-equation and $m,n,p$ are input variables. I apologize for that ton of variables in use, might cause some confusion. Is this possible using Galois Theory or by any other means?


I use Ubuntu 16.04 and have installed VirtualBox-5.1.38_Ubuntu r122592 and also VBoxGuestAdditions.iso by this command:  $ sudo apt-get install virtualbox-guest-additions-iso   Previously I created some virtual machines and shared clipboard between Host and Guests (bidirectional). Yesterday I created another guest and did these:   mounting VBoxGuestAdditions.iso into the guest running sudo sh ./VBoxLinuxAdditions.run in mounted iso (in guest):  Verifying archive integrity ... All good. Uncompressing VirtualBox 5.1.38 Guest Additions for Linux........... VirtualBox Guest Additions installer Removing installed version 5.1.38 of VirtualBox Guest Additions... Copying additional installer modules ... Installing additional modules ... vboxadd.sh: Starting the VirtualBox Guest Additions.  Devices -> Share Clipboard -> Bidirectional rebooting guest   But "clipboard sharing" is not enabled, however I can do copy/paste between older created guests and host. How I can solve this problem?

ubuntu with xfce (xubuntu) or lxde (lubuntu) on virtualbox and guest additions installed and clipboard sharing set to bidirectional does not allow plain text to be copied/pasted to/from the virtual and the host system; what else needs to be configured?  note - this is an issue across multiple releases of ubuntu; on some it appears to work partially; I have not found a lubuntu where it works; as if something basic in lubuntu causes copy/paste of plain text to not work


I work designing medium voltage motor starters. Being an mechanical engineer, I still don't understand the advantages, disadvantages, and when to use certain types of transformers. When is wye-wye best? When is delta-delta best? When is delta-wye best? When is wye-delta best?

I have been studying three-phase systems for the whole course of a subject (on the first year of the university degree). I have finished now, and I know both "Y" (star) or "Delta" (triangle) connections. I have made a lot of computations with them, however I don't know the different applications they have and I would like to know the following in order to increase my knowledge.  I would like to know which one is better (Y or Delta) for different purposes, they must have its advantages and disadvantages, but I have never been told which ones are them. I have tried to do some research on the Internet, but I haven't found in particular a good answer. I have only seen the advantages and disadvantages of Y and Delta motor startup, but I'm thinking more of the "circuit" point of view.  I'm really interested on the subject, but I just seen it from the computational point of view. I would appreciate if someone could explain me a little bit some of the main advantages and disadvantages of using both connections. Thank you.


I am confused about the following sentence:     We can check overlap using the technique in solution 1   Why has the author written "using"?  Could we rephrase it as:      We can check overlap by using the technique in solution 1   Can anyone explain the grammar of the original statement to me?

I often encounter a problem when writing sentences in mathematical contexts, where one "does something" in order to "obtain something." These sentences typically have the form "using X, one can do Y," where generally X is a mathematical rule or function, and Y is its result. I never know if I should put "by" before the present participle. I have this problem mainly with the verb "using," but this is not the only verb that gives me trouble.  Here are some examples:    (by) using Theorem 2, one can prove that... We obtain the result (by) expanding the function ... (by) differentiating w.r.t. the 2nd variable, we obtain ... (by) taking the integer part of F, one can compute...


I'm a novice when it comes to Linux.  Our user was trying to ssh to an Ubuntu server we have at work (since someone left, nobody here knows Linux), but it says This service allows sftp connection only (He used to be able to do this) . I've tried to ssh using root and an admin account I created but no luck. I tried restart the ssh but that didn't work either.  What do I need to do?

I started from the following article to set up SFTP on Ubuntu Server: .  If I follow these instructions, I can connect with SFTP, but I am no longer able to connect to SSH from a terminal:   This service allows sftp connections only. Connection to 10.0.0.130 closed.   Here are the changes I made to sshd_config:  Subsystem sftp internal-sftp -f AUTH -1 VERBOSE  AllowGroups sftpusers sftp sshusers  Match Group sftpusers ChrootDirectory %h AllowTCPForwarding yes ForceCommand internal-sftp  X11Forwarding no   The user in question, jcoulson, is in both sftpusers and sshusers groups.  Any hints?  Any further info you need?  Thanks!


I'm having some trouble in deriving the square of the angular momentum operator in spherical coordinates. So the squre of the angular momentum operator is $$ L^2=L_x^2+L_y^2+L_z^2 \tag{1}. $$ And I'm able to derive both $L_x$, $L_y$ and $L_z$ in spherical coordinates $$ \begin{align} L_x &= -i\hbar\left(-\sin\phi\frac{\partial}{\partial\theta}-\cot\theta\cos\phi\frac{\partial}{\partial \phi}\right), \tag{2}\\ L_y &= -i\hbar\left(\cos\phi\frac{\partial}{\partial\theta}-\cot\theta\sin\phi\frac{\partial}{\partial \phi}\right), \tag{3}\\ L_z&=-i\hbar\frac{\partial}{\partial \phi}. \tag{4} \end{align} $$ Thus I'm thinking that I should be able to get $L^2$ in spherical coordinates by simply substituting (2), (3), and (4), into (1). By doing this I find that $$ L^2 = -\hbar^2\left(\frac{\partial^2}{\partial \phi^2}+ \frac{\partial^2}{\partial \theta^2}\right). \tag{5} $$ This is nothing like the expression of what it is supposed to look like, which is $$ L^2 = -\hbar^2\left[\frac{1}{\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial}{\partial\theta}\right)+\frac{1}{\sin^2\theta}\frac{\partial^2}{\partial\phi^2}\right]. \tag{6} $$ Where do I go wrong? Shouldn't I be able to do the substitute that I did and end up with (6) instead of (5)? Edit: I'm most likely correct, but I expect that I have made some calculation error.

I want to compute the square of the angular momentum operator in spherical coordinates. I already know how the cartesian components look like:  \begin{align} L_x &= -i\hbar \left(-\sin\phi\,\partial_{\theta} - \cos\phi\,\cot\theta \,\partial_{\phi}\right)\\ L_y &= -i\hbar \left(\cos\phi\,\partial_{\theta} - \sin\phi\,\cot\theta \,\partial_{\phi}\right)\\ L_z &= -i\hbar\,\partial_{\phi} \end{align} The square should then be given by: $L^2 = L_x^2 + L_y^2 + L_z^2$  With that, what I would get is this:   $$L^2 = -\hbar^2 \left(\partial_{\theta}^2 + \cot^2\theta\,\partial_{\phi}^2 +\partial_{\phi}^2 \right) = -\hbar^2 \left(\partial_{\theta}^2 + (\cot^2\theta + 1)\partial_{\phi}^2\right) = -\hbar^2\left(\partial_{\theta}^2 + \frac{1}{\sin^2\theta}\partial_{\phi}^2\right)$$  From the 3 terms in the bracket, the first term comes from $\cos^2\phi + \sin^2\phi = 1$, the second term from the same rule, and the 3rd term is the square of the $L_z$ component. The mixed terms you get, when you square $L_x$ and $L_y$ should cancel:   $$2\,\sin\phi\,\partial_{\theta}\,\cos\phi\,\cot\theta\,\partial_{\phi} - 2\,\cos\phi\,\partial_{\theta}\,\sin\phi\,\cot\theta\,\partial_{\phi} = 0 $$  However, the solution I find everywhere is:   $$L^2 = \left(\partial_{\theta}^2 + \cot\theta\,\partial_{\theta} + \frac{1}{\sin^2\theta}\partial_{\phi}^2\right)$$  I can't find where the error is.


Let $(F,+,\cdot)$ be a field.   Then to prove that $(F,+)$ and $(F-\{0\},\cdot)$ are not isomorphic as groups.  I am facing difficulty in finding the map to bring a contradiction!!

Let $(\mathbb K,+,\cdot)$ be a field. Is there a group isomorphism between $(\mathbb K,+)$ and $(\mathbb K^\times,\cdot) $ ?  The answer should clearly be negative. I tried to proceed via contradiction, but this has not led me very far. Since it's some kind of "trick problem", I'm merely looking for hints.


I am writing my own library and i have a text file which i need to load into a variable. I know i can do this using Jquery but i would really like to know how this is done using java script native. I couldn't find any good resources for this so here i am :/  Soooo how do i replace this code with javascript?  $('#result').load('txt.txt', function() {   alert('Load was performed.'); });   I actually need the text to be in a variable and not an element.

I have a text file in the root of my web app  and I'd like to load it into a variable in javascript.. in groovy I would do this:  def fileContents = 'http://localhost/foo.txt'.toURL().text; println fileContents;   How can I get a similar result in javascript?


I currently have a monitor setup like below:                            +----------------------+                           |                      |                           |                      | +-----------++-----------+|                      | |           ||           ||      3840x2160       | | 1920x1200 || 1920x1200 ||                      | |           ||           ||                      | +-----------++-----------++----------------------+   I want to find a way to allow my mouse to always go from the 3840x2160 monitor to the 1920x1200 without it getting blocked because the larger monitor can't align fully.  I have been searching for a registry hack or a software product that could allow the cursor to pass from the larger to the smaller based on relative location, instead of exact pixel location. The goal being that the mouse cursor is never blocked at the edge of the 3840x2160 when attempting to go to the left 1920x1200 monitor.  Any help in solving this is appreciated.

I'm not sure if I'll be to explain this right. I have a dual monitor display on Windows 7 and my left monitor (laptop) has a lower vertical resolution than the right monitor (regular LCD monitor). So obviously, if I stick these monitors together, there's a part in the upper-left corner of my LCD monitor where cursor cannot go to the other monitor. I remember there was a trick to make this gap disappear, and make it seem like the monitors are of equal height.  Any suggestions?  By the way, I am also using UltraMon.


I'm looking for a space $(\Omega ,\mathcal F)$ and a function $\mathbb P:\mathcal F\to [0,1]$ s.t. $\mathbb P(\Omega )=1$ and $\mathbb P$ is addtitive but not $\sigma -$additive.  Of course I got inspired but several post on mathstack exchange by $\Omega =\mathbb R$, $$\mathcal F=\{A\subset \mathbb R\mid A\text{ or $A^c$ is countable}\},$$ and $\mathbb P(A)=0$ if $A$ is countable an $\mathbb P(A)=1$ if $A$ is not countable. But unfortunately this is a probability measure. Any example ?    My question is not a duplicate of  (as several thought) because the answers don't provide probability spaces.

Give an example of a measure space $(\Omega, \mathit{F})$ and a function $\mu$ on $\mathit{F}$ that is additive but not $\sigma$-additive, i.e. $\mu(\cup A_i)= \sum\mu(A_i)$ for a finite collection of disjoint $A_i$ but not for some infinite collections.   I know a measure function defined on $\sigma$-algebra is $\sigma$-additive, but I struggle finding a function that would not be additive for infinite collections. Can someone give me an example and show me why?


I wonder whether I should end a question on SO with a polite phrase asking or thanking in advance for help, such as:   “Any help is apreciated.” “Thanks in advance for any help.” “Any advice on how to tackle this?”   Or should I let that be and just type in my question? Is there consensus on this topic or a policy I did’t find yet?  When editing ugly questions (bad markup, or typos), should I add or remove such a phrase at the end?

I edit a lot of posts every day. I often run across posts with 'Hi' and 'Thanks' on the top and the bottom of the post respectively. I also run across things like:     --User   Should these items be removed during the editing of the post by an editor?


Let X1, X2,...,Xn be i.i.d. continuous random variables of the uniform distribution $Unif(0, \beta$), $\beta>0$. Consider Mn = max1≤i≤n Xi. Prove that Mn converges in probability to $\beta$. I know how to prove a sample $\bar X$ converges in probability to an expected value $\mu$ with the Chebyshev's inequality $P(|\bar X-\mu|> {\epsilon})\le \frac{{\sigma}^2}{{\epsilon}^2}$ with (in this case) E(Xi) = ${\mu}=\frac{\beta}{2}$ and Var(Xi) = $\frac{\beta^2}{12}$, but the new concept of Mn = max1≤i≤n Xi added to this confuses me a lot. Can someone explain this to me? Thank you!

Maximum of a Sample from a Uniform Distribution:  Suppose $X_1, ...  , X_n$ is a random sample for a $\mathrm{uniform}(0,\theta)$ distribution. Suppose $\theta$ is unknown. An intuitive estimate of $\theta$ is the maximum of a sample. Let $Y_n = \max\{X_1, ... , X_n\}$. Exercise 5.1.4 shows that the cdf of $Y_n$ is   $F_{Y_n}(t) = 1$ if $t>\theta$, $F_{Y_n}(t) = \frac{t^n}{\theta^n}$ if $0 < t \leq \theta$, and $F_{Y_n}(t) = 0$ if $t\le0$.   Then the pdf of $Y_n$ is $f_{Y_n}(t) = \frac{nt^{n-1}}{\theta^n}$ if $0 < t \leq \theta$, and $f_{Y_n}(t) = 0$ elsewhere.  Based on its pdf, it is easy to show that $E(Y_n) = (n/(n+1))\theta$. Thus, $Y_n$ is a biased estimator $\theta$... Further, based on the cdf of $Y_n$, it is easily seen that $Y_n$ converges to $\theta$ in probability.   MY QUESTION:     How do we know that $Y_n$ converges to $\theta$ in probability? Is it because $E(Y_n) \rightarrow \theta$?   Thanks in advance.


Let  u= (1,0,2), v = (2,1,0) and w = (0,2,1).  Compute ||u + v−w.||v = v  I do not understand how I am supposed to compute the equation if it is already put equal to v. I know how to compute an expression using vectors, this question just does not make sense to me and I want to know whether I am simply misunderstanding the question or whether there is actually a problem with the question. Any help will be greatly appreciated.

Is there an error in this question?  Let u = $(1,0,2)$, v = $(2,1,0)$ and w = $(0,2,1)$. Compute  ||u + v - w.||v = v  This is exactly what is in the question (even the dot after w which I don't know what it means).  Thanks


My flag as not an answer on the question  has been declined with this message, "declined - flags should not be used to indicate technical inaccuracies, or an altogether wrong answer".   In this situation what should we do? Ignore the answer knowingly, or is there something else  that I do not know?

I've recently flagged the following , which I got in the flag queue.   The answer does not seem to attempt to address the question at all. It looks like a comment on one of the other answers (probably Luca's).  It got rejected with the following reason:  declined - flags should not be used to indicate technical inaccuracies,            or an altogether wrong answer   I did not flag this because I thought it was wrong, I flagged it because I didn't think it was an attempt to answer the question. For what it's worth, I don't get what the guy who provided that answer even tried to say.  Was I wrong to flag it? If so why?


It's a simple question, really, I'd like to check the CPU Load of my Windows Server 2008 machine. This value gets reported to Zabbix, but I have no clue where Zabbix gets the value from.  All I can find on my server is CPU Usage, Processor time, etc, but no load. In Zabbix the value is always between 0 and 4 and I know what it means (number of processess in "Running" or "Runnable" state), but no clue where to check the value on the server itself.

Linux has a notion of Load Average which is defined as:     System load averages is the average number of processes that are either in a runnable or uninterruptable state. A process in a runnable state is either using the CPU or waiting to use the CPU. A process in uninterruptable state is waiting for some I/O access, eg waiting for disk. The averages are taken over the three time intervals. Load averages are not normalized for the number of CPUs in a system, so a load average of 1 means a single CPU system is loaded all the time while on a 4 CPU system it means it was idle 75% of the time.   What is the closest equivalent available via WMI? Fundamentally are there differences between the two OSes which determinate how such a performance metric should be measured? What are the differences?


Is there a feminine equivalent for "Casanova" without negative connotations?

What's the feminine version of womanizer?


How can I download videos on youtube and other platforms. Which is the best downloader compared to IDM in windows. How do I configure it and its extension in any browser on linux for example chromium?

What are instructions on how to download videos from YouTube?    Notice: Terms of Service Violation  Please be aware that by following any of the answers below, you will be violating YouTube's . In particular, from Section 5.B.:     Content is provided to you AS IS. You may access Content for your information and personal use solely as intended through the provided functionality of the Service and as permitted under these Terms of Service. You shall not download any Content unless you see a “download” or similar link displayed by YouTube on the Service for that Content. You shall not copy, reproduce, distribute, transmit, broadcast, display, sell, license, or otherwise exploit any Content for any other purposes without the prior written consent of YouTube or the respective licensors of the Content. YouTube and its licensors reserve all rights not expressly granted in and to the Service and the Content.


To  find  the  number  of  irreducible  polynomials of  the  form $x^{2} + ax+b$  over  the  field  $\Bbb{F}_{7}$  I  manually  checked  all  the  possibilities  and  thus  found  the  answer  to  be  $21.$ Like $b=0$  is  not  possible  or  taking  $b=1$  and  checking  what  values  of $a$  works  here  etc. Surely it  was   tedious  and  time-consuming  process  and  I  don't  think  it  was  appropriate  either. For  what  should  be  done for  a much  larger  field$?$  Are  there  some  basic  theories  that  I  should  use. Hints  please.

Suppose $F$ is a field s.t $\left|F\right|=q$. Take $p$ to be some prime. How many monic irreducible polynomials of degree $p$ do exist over $F$?   Thanks!


I have never lived in UK, I did my graduate studies in the US. I was a postdoc in Europe, but the situation there seemed grim, I applied for a few positions only, one of them was this junior prof job in Germany (in theory, an assist prof equivalent of US ) though I figured out despite it being an assistant professorship, it is somewhere near the lecturer position of USA and a bit post-doc? So definitely not as an assistant prof equivalent of a US system in practice. Perhaps a research leader junior prof position could work better in that sense. But how does it work in UK? Currently I am in my country of origin, to be fair, the work is good, practically Tenured (what I need to do is very minimal to complete the track), there are some opportunities for research that I need to apply to (I am certain some grants would be easy with my background meaning a PhD abroad, if not the more challenging), but the university / department and students lack research vigor in every way And research is all I want to do to be honest, it is not a top notch school, I simply wasn't able to attend to some interviews while I was living abroad for top tier private unis and now positions are canceled, and the top tier state schools require just too much paperwork which might take years. I am happy with the job in certain ways, but it is not fulfilling for me in research and standing. Now, I see this great fit in UK, at a top university, I know the professors there, it is so fitting to my research line etc. Though I don't know anything about the system and how much job safety there is. It is for about one year only, but with a chance to extend the contract. Now that I have an actual job to lose, and a pandemic, I feel like I could use some more information on  where the lecturers stand,  what is the usual timeline,  are people offered tenure track positions afterwards?  how long it takes?  what it requires?  How much research is involved? (it implies both coursework and grad students/research opportunity) etc in the ad.  Also, I have never been confident in just asking for a job, so I saw this ad online (I always only apply through listed ads), but I know many people put ads only after they have their strong candidate. Although I know the prof there I don't want to ask, at the same time I feel a bit uneasy applying if they already have a candidate. How does it usually work? Also, not sure whether they would prefer someone living abroad during a pandemic.

What are the US equivalent ranks to the Lecturer, Senior Lecturer, Reader (or Associate Prof), Professor ranks of the UK system? Is it correct that in the US system they are Assistant Prof, Associate Prof, Full Prof and Chair/Endowed Prof, respectively? I know that in the British system, there are further sub-levels in each of these ranks whereas in the US system there is no further gradation within each rank. So I am looking for only rough equivalence.  Edit: It would be great if a formal/informal reference which compares the two is also pointed out.


I want to restrict user to open same URL in multiple tabs in same browser. How can I do this, please suggest an option or give me an example.  I am working in Asp.net c#

I'm wondering if it is possible to determine if a user already has a web browser open to the web application I'm working on. It seems that they can open several instances of the same web app and click on buttons to read information that they have used before to enter into an input screen that they're currently working on.  What happens though is that it seems to screw up Session variables and then the user will update their previous work with their new work. Or they will delete their previous work all together or who knows...  EDIT I have seen this done before with online banking web applications. If you are already logged in, the new window will kindly tell you that you already have the app open. In my case, the user does not need to log in.  Is there a simple way to determine if they already have a browser window open to the web application and if so, just close the browser or display a different page to let them know they can only have 1 open at a time?  Thanks


I am new to JavaScript an I have a basic set up where I can append a div with another div. I am trying to create a button that lets me remove those divs that are added dynamically, these are the two functions:  $("#add_new").click(function(){ event.preventDefault(); clicks += 1; if (clicks < 10) {     //document.getElementById("total_steps_count").innerHTML = clicks;     $("#steps").append('
<input type="text" id="step_title" class="form-control" name="step_title[]" placeholder="Enter a title for this step">
<input type="file" id="step_image" name="step_image[]" >
<input type="text" class="form-control" id="step_caption" name="image_caption[]" placeholder="Enter a caption for this image">
<input type="text" id="step_text" name="step_text[]" class="form-control" placeholder="Walk us through this step">
<button class="btn btn-default" id="remove_step"> Remove This Step</button>

') } else {     alert("The maximum number of allowed steps is 10"); } });    //Remove step $("body").on("click", "#remove_story_step", function(){     event.preventDefault();     clicks -= 1;     $(this).closest("#remove_story").remove() });   When the 'add_new' button is clicked, the div is properly appended to the target div, however when I click the 'remove_step' button, the page refreshes and all of the previously appended divs are gone.  Like I say I am new to JavaScript/jQuery so I'm not sure how I can debug this, any help would be greatly appreciated!

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.