I have a hook_cron that regularly import contents from external site via drupal_http_request. However, I noticed that cron is not running. I am using Elysia cron module and I defined the job to run every 5 minutes */5 * * * *.  Out of curiosity I put this code variable_set('maintenance_mode', 1) to check if the site will go offline after five minutes but it wont.  I even add an entry */1 * * * * import_cron to the Script textarea on Elysia config page. But still not working. Any advice?

I have installed the elysia cron module and setup the cron job. My module has a cron function test_cron() which inserts some data into a table.  This function lists in the elysia cron status page. I have setup the the default scheduled rule to */1 * * * * to run the cron after every minute.  When I click on the run infront of the test_cron() the cron runs and some data inserts into the database.  But this the manual method, I want to execute the cron after every minute therefore I defined the scheduled time for the test_cron(),  but it does not executed automatically after every minute.  What should I do? Is there any other configuration which I should do to run the cron automatically?


How do I catch the null that is thrown if the file object returns null? I keep getting a java.lang.NullPointerException.  public static File getFile() {         String filePath = JOptionPane.showInputDialog("Enter the full path to           the file you want to open");         File file = new File(filePath);         while(!file.exists()) {             filePath = JOptionPane.showInputDialog("Please enter a valid full path");         }         return file;     } }

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


I know that Intel has a tool that will tell you what ME firmware version you are on, but I need to be able to determine from files, registry entries, or services which firmware version of ME a windows computer has. Is that possible? Furthermore, is it possible to detect if its provisioned or not, outside of a custom tool (again, using files, reg entries, or services)?    This is not a dupe. Detecting Intel ME firmware version on *nix is not the same as detecting it on Windows.

I just heard about the . I'd like to update my firmware, but I don't use Windows/OSX. How can I find out what version of Intel ME I have and how do I update it?


I have a potential client from USA, and I live in another country. I would like to know (an average price in dollars), how much a graphic/web designer would charge per hour for maintaining the website (the website is already done). I hope you can help me!   Regards!

I'm curious which pricing model other feel best fits freelance design, in what situations, and why.  I am not seeking dollar values.   There are a few basic pricing models a freelancer can use:   Time-based pricing. This is where you calculate every minute you work on a project and break that down to your hourly rate and charge whatever the formula states you should. There are several questions here at GD.SE which refer to time-pricing models, with some excellent answers, such as:  /  /  This model can be accurate provided a client is aware each and every minute you work costs more. Therefore each revision will increase fees. Some clients are fine with this, some freak out because they didn't understand the pricing structure. Per-service or fixed fee pricing. Sometimes known as project-based pricing. This is where you calculate a price for each and every service you offer and essentially work off of a price sheet. This way you know a brochure costs $XXX every time, a 3-page web site costs $XXX every time, etc. This model does not allow for alterations should project scope become an issue. So it can result in those difficult conversations with clients telling them to stop with revisions or pay more. Value-based pricing. This model doesn't adhere to any set pricing or per hour structure. Value based pricing prices services according to their perceived value or importance to the client. This one is a bit tricky. Essentially it's the old "If you charge more, clients think you are worth it." model. You can often use this model to increase revenue without increasing workload. This is why "Name Brand" items cost more than generic items - a perceived value when in reality the items or workload are / is the same.   There are others such as licensing, use-based, royalties, etc. but I feel those are special circumstances which don't generally apply to most work. If you feel they do, please explain why.  It is also possible to use a combination of price models or hybrid model. For example, you may figure a job cost using time-based pricing but then add additional fees for value-based pricing.  It is also feasible that different services or projects are priced differently. For example:   sales piece creation fees are a hybrid calculation using time-based and value-based figures to arrive at final fees. Then, additional edits to that sales piece at a later date are strictly time-based priced. Poor Practice? After all , if it's a sales piece each and every copy seen by end users has potential to generate revenue for the client. So, is it more appropriate to use some value-based pricing for the edits? Web site creation fees are calculated using hybrid fees from time-based, per-service, and value-based figures. When an additional page is requested a year later, fees are based solely upon fixed fee rates for an additional page. Is this adequate? What if the additional page requires different services? Still a fixed fee then?   Obviously, all price models must cover your overhead at a minimum.  I am not seeking dollar values.   Which pricing model do you feel best fits freelance design services?   When do you feel it's appropriate to use the different price models, if you do?  Edit: I realize that in the end, most deliver what could be seen at fixed-fee pricing to their clients. This is just naturally what any hard quote appears to be. I'm not really thinking in terms of what a designer delivers to the client as the pricing. What I'm curious about is how you get to that figure the client sees.  I do realize this is a complex matter and few scenarios fit nicely into a specific category. Just looking for some general input from others in the industry.


No.  Not those questions.       The white blobs should say "Questions".  The don't reappear after refresh and aren't consistently missing between sites. Navigating around fixes the issues.   I'm tempted to  but I thought I'd flag this up anyway.

The mobile web view of several Stack Exchange sites displays the  "active tab" as a white rectangle:    Observed with Safari on OS X and Mobile Safari on iOS,   on , , , not on .


I am currently making a test that contains 10 questions for easy, average and difficult. Can you help me modify the numbering into like this:  EASY ROUND  E1.  E2.  E3.  .  .  .  E10.  AVERAGE ROUND  A1.  A2.  and so on.

I have a problem with enumerating a list of axioms in a custom style.   For instance, if I wanted to write down the axioms that a function will have to satisfy for it to be a homomorphism of rings, I'd prefer to call the axioms (HOM1) and (HOM2). I learnt that this is achievable by using this:  A map $f$ between two rings $R$ and $S$ is called a ring homomomorphism if they respect the algebraic structure in both of them. More precisely,  \begin{itemize} \item[HOM1] $f(r_1+r_2)=f(r_1)+f(r_2)$ \item[HOM2] $f(r_1 \cdot r_2)=f(r_1) \cdot f(r_2)$ \end{itemize}   But the problem is, I have absolutely no way of referring to exactly one of these axioms, say in a proof, without having to "brutally" type in the (HOM1) to refer to the axiom.   This looks slightly like not knowing how to refer to an equation when there are several of them, say, in an align construct.   Any help in achieving this will be appreciated.


In windows 7 or windows 8, I can use BitLocker Drive Encryption to encrypt and set a password in my pendrive but i am unable to access files of my pendrive in Ubuntu.   Is there is any method to encrypt and set password in my pendrive in Ubuntu while i can access files from both in Ubuntu and Windows.   Please tell me also if there is any method to access files from a drive which is encrypted with BitLocker.

How can I encrypt an external device (i.e. USB keys, external hard-drives, memory sticks, etc.) so that it would subsequently be readable/writable on any computer that I plug it in?   For instance, it should then be possible to easily plug the encrypted device on a Linux, Windows, or OS X machine, and be able to access the contents without any fuss.   How can I do that?


So I updated my ubuntu 19.10 to development release 20.04 and it looks exactly like 19.10. There are no changes in the GUI. I have been trying to update it to the LTS version 20.04 but I am unable to do that either as it says that the software is up to date. Mainly used update-manager -c -d and tried do-release-upgrade -d  Distro: on entering the command lsb_release -a   I would like to know how to update to the LTS version of 20.04 or what's known as Final Release.  Thank you for any help!

Update  appear to have been updated recently (as of writing this the last update appears to have taken place on 3rd of June) to include the following statement:  The -d switch is necessary to upgrade from Ubuntu 18.04 LTS as upgrades have not yet been enabled and will only be enabled after the first point release of 20.04 LTS.  Also note that .  TLDR (as of 15 Aug 2020):   is the canonical tracking document for the first Focal Fossa point-release (20.04.1). It’s a live document. The Ubuntu release team will be updating it as we work on releasing 20.04.1. […] Upgrades from 18.04 to 20.04.1 are still disabled as we are working through a few upgrade blockers   Edit The answers (so far) do not answer the question. The question is pretty simple. Ubuntu.com points to a "FinalRelease", which turns out to be a "Development Release", see evidence below. I'm not asking how and when to upgrade. I'm pointing out what seems to me to be an apparent inconcistency (in semantics, linguistics, logic) in the way Ubuntu names or labels its releases. From an answer to the question I'd except someone to pick up and acknowledge this inconsistency. An answer could start with a "Yes, ..." or a "No, ...", for starters. (Moreover, a good answer could distinguish between the release being in dev stage and/or the upgrade process (e.g. from LTS to LTS) being in dev stage, if appropriate.) This question, as I see it, is not a duplicate. Futher, I think it is a question which deserves a non-patronizing answer. Thanks.   indicates that today (23rd April 2020) the new Ubuntu 20.04 LTS is to be released.  See "condensed screenshot" here:  Indeed, it seems that that's what happened, see  and :  However, when following the instructions to upgrade (from 18.04 LTS to 20.04 LTS) found  and elsewhere (edit: actually , too!), even prior to the July point release, I'm a bit confused to see that the instruction is to use update-manager -d which also points to the "Development Release" (see screenshot below) rather than the "FinalRelease" (see screenshot and link above). Is the "Final Release" (which I'm after) the/a "Development Release"? Why isn't it called something like "Production Release" or "Final Release"? When will it no longer be referred to as "Development Release"? In July? I'm confused :(


When viewing a , it only allows you to see the hour and the min (9:26AM).  Is there a way to find out the exact timestamp of that tweet, in milliseconds?

So on the Twitter website, underneath the post there's a timestamp, but it's not very specific - it will just say something like Jul 10, or 11 hours ago or something like that.  Is there any way to find the EXACT time a tweet was posted?  Like to the second?  I want to avoid messing around with programming or dealing with the API if possible, but I've looked all over, and haven't been able to find anything.


People from Earth (I believe) settled for some reason I forgot on a planet where they were in constant danger. Everything was carnivorous, including plants, even trees.   In fact, the only way to survive a night was to climb into a certain tree. The tree was in fact also carnivorous but vey slow, so in the morning you could disentangle yourself from the tendrils it had started to extend to strangle you. But you had to be very careful before climbing into one because there was another species that looked very similar but was quick and would kill you.  One other danger were blobs of protoplasm that would roll and dissolve everything they met. These were easier to dodge, because they would more or less go in straight line but would deviate in the direction were the amount of food was largest. One could even get rid of them by trapping them along a line with a lot of food ending up in an empty place where they would starve.  I forgot almost everything else, I'm sorry...

The story was written with the notion that Venus was covered with watery clouds, so it must be hot and humid there.  I remember the protagonist had to deal with mold or spores that would sprout instantly on anything exposed to outside air.  I think there were hostile trees, too, that could lash out with its branches to catch and eat anything that came nearby.  "jack catch trees", maybe?


I am using Ubuntu 14.04 kde plasma 5 - Dell xps laptop - graphics card nvidia GeForce GT 550m.  My two monitors won't work together! When I set the laptop screen as principal monitor, the external monitor is just blank. I can see the cursor, I can drag windows, but this is all I can do. And vice versa, the same thing happen when I set the external monitor as principal display!   I have tried several drivers (nouveau, proprietary...), I've tried to change settings in kde monitor settings and nvidia x server, I even tried to speak gently to my computer   Can you help me please?

Recently installed a clean version of Ubuntu 14.10 on my system. Previous to that, I'd been running Windows 7 with no problems.   My system has two screens, one of which is a LG Electronics 24EN43 which is hooked up to a GeForce GTX 650 via HDMI. This is the default screen. The second screen is a DELL 2009W connected to a GeForce 210 via VGA. My problem is that screen 2 does not seem to be behaving properly.   I can move my cursor right to the second screen, and my cursor becomes a black X with a white border. I can then move my cursor back left onto the first screen. I cannot move any windows to the second screen, and I cannot open any programs or terminals on the second screen. The second screen has a black background.   I am currently using the NVIDA X Server Settings utility, and under the 'Additional Drivers' section of Software & Updates, I am using the NVIDIA binary driver - version 331.38 from nvidia331  Here is a haste-bin of my configuration file for the XServers.   Here's some other things I have noticed:   If under the Additional Drivers, I use 'X.Org X server - Nouveau display driver from xserver-xorg-video-noveau (open source). Then the second screen does work, it has Unity, background, and works like it should. However, the cursor on screen 1 has an annoying flicker, the computer will randomly freeze and crash, and it is really bad at watching videos (you see bars going down the video as it slowly refreshes at 0.5 frames per second)   If any additional information is required, I am happy to provide it. Many thanks


I have std::map which its key is an enum like this:  enum class my_enum{a=1,b,c,d}; std::map<my_enum,my_class> my_map;   I want to iterate over the map so I used this for:  for (auto current_type = (id_type)0;      (int)current_type < 4;      current_type = (my_enum)((int)current_type + 1)){    //do things }   I think it is rubbish. Do you have a better suggestion?  EDIT:  I am totally aware of using of iterators. I know they are prefereable. However, for some reason, I have to stick to the regular index-based for.

I just noticed that you can not use standard math operators on an enum such as ++ or +=  So what is the best way to iterate through all of the values in a C++ enum?


i cannot sort an array in React. Im fetching data like this: function AllMeetupsPage() {   const [isLoading, setIsLoading] = useState(true);   const [loadedMeetups, setLoadedMeetups] = useState([]);    useEffect(() => {     setIsLoading(true);     fetch("https://reacttesty-2fbdf-default-rtdb.firebaseio.com/api/book.json")       .then((response) => {         return response.json();       })       .then((data) => {         const meetups = [];          for (const key in data) {           const meetup = {             id: key,             ...data[key],           };            meetups.push(meetup);         }          setIsLoading(false);         setLoadedMeetups(meetups);       });   }, []);  And then i want to render it. Here im trying to sort loadedMeetups, i tried several diffrent thing but it don't work. F.e simple loadedMeetups.reverse() works fine. return (

All Meetups
       <MeetupList meetups={loadedMeetups.sort(         (a, b) => b['title'] - a['title']       )} />   {/* Here im trying to sort loadedMeetups, i tried several diffrent thing but it don't work.        F.e simple loadedMeetups.reverse() works fine.*/}       <button onClick={handleClick}></button>
   ); }  It don't work. Here is the object console.log  in browser 0: author: "Lewis Carroll" description: "Alicja w Krainie Czarów to powieść napisana przez Carroll'a" genre: "Powieść" id: "-MbN_UVuJJvfCjonq6E1" image_url: "https://cdn.bonito.pl/zdjecia/7/8723-alicja-w-krainie-czarow.jpg" release_date: " 2000-12-31" title: "Alicja w Krainie Czarów" __proto__: Object 1: author: "J.K Rowling " description: "Książka o czarodzieju" genre: "Fantastyka" id: "-MbNbGx4MlJY5VafwuzN" image_url: "https://cdn-lubimyczytac.pl/upload/books/308000/308630/494238-352x500.jpg" release_date: "2002-08-20" title: "Harry Potte  I know that the problem is somewhere in fetching the data, because i tried to sort it on some dummy_data array i created on my own and it works. But i am not very familiar with fetch and currently dont really understand it, i just had to use it to connect to the api.

I have a list of objects I wish to sort based on a field attr of type string. I tried using -  list.sort(function (a, b) {     return a.attr - b.attr })   but found that - doesn't appear to work with strings in JavaScript. How can I sort a list of objects based on an attribute with type string?


I have simple C# console app that gets data from config.ini located in same directory. Reference to config.ini implemented with Environment.CurrentDirectory:  IniFile myIni = new IniFile(Environment.CurrentDirectory + "\\config.ini");   Problem is when I'm running app with Scheduler, it can't find path to config.ini. How to set such path for running app with Scheduler?

Is there a way to get the path for the assembly in which the current code resides?  I do not want the path of the calling assembly, just the one containing the code.   Basically my unit test needs to read some xml test files which are located relative to the  dll.  I want the path to always resolve correctly regardless of whether the testing dll is run from TestDriven.NET, the MbUnit GUI or something else.  Edit: People seem to be misunderstanding what I'm asking.  My test library is located in say      C:\projects\myapplication\daotests\bin\Debug\daotests.dll   and I would like to get this path:     C:\projects\myapplication\daotests\bin\Debug\   The three suggestions so far fail me when I run from the MbUnit Gui:   Environment.CurrentDirectory gives c:\Program Files\MbUnit System.Reflection.Assembly.GetAssembly(typeof(DaoTests)).Location gives C:\Documents and Settings\george\Local Settings\Temp\ ....\DaoTests.dll System.Reflection.Assembly.GetExecutingAssembly().Location gives the same as the previous.


I understand that doing math with floats can be strange because the float cannot always be expressed in binary correctly and then converted back. However, the following code contains the same simple equation 3 "different" ways. I say "different" because it's the same equation in the same order and everything but just typed in a different style. If it's doing the same conversion from float to binary and back to float to be displayed then how can it be different? Here is the c++ code:  #include <iostream>  using namespace std;  int main() {     // using literal numbers     cout << 0.1 + 0.1 + 0.1 - 0.3 << endl;      float f_one = 0.1;     float f_three = 0.3;      // using floats     cout << f_one + f_one + f_one - f_three << endl;      double d_one = 0.1;     double d_three = 0.3;      // using doubles     cout << d_one + d_one + d_one - d_three << endl;      return 0; }   The output of this code is  5.55112e-017 -7.45058e-009 2.77556e-017   I can understand that there can be a difference between float and double, that was expected. But shouldn't at least one of the two match the result obtained by  cout << 0.1 + 0.1 + 0.1 - 0.3 << endl;   ?  What else could be causing this difference?

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


su manual       The current environment is passed to the new shell.   Obviously you cant use su in Ubuntu as in su but it has to be always sudo susince the root user is disabled in Ubuntu but it seems this changes the abilities of the su command.  Any explanation?

As example to my question, my ~/.bashrc file contains this lines:  export LD_LIBRARY_PATH=/opt/intel/mkl/lib/ia32:$LD_LIBRARY_PATH export LD_PRELOAD=/opt/intel/mkl/lib/ia32/libmkl_core.so   so that Numpy (Python) could find libraries that it needs to run, as it's build with MKL and Intel compilers. This workflow isn't the best, but that's another story.  My question is how can I pass arbitrary variables (like those in ~/.bashrc) when I run program with 'sudo' (but not root)?  Currently, if I run:  sudo python -c "import numpy"   I get an error:  ImportError: libimf.so: cannot open shared object file: No such file or directory*   Some suggestions as sudo -i or sudo -E does not change anything here.    Edit:  I can't answer my question (not enough points :D ) but I'll comment here, in a hope that there are other Linux newbies wondering about sudo traps.  [Only temporarily!] This works for me (~/.bashrc):  alias sudo='sudo env PATH=$PATH VAR1=SOME_VALUE VAR2=SOME_VALUE...'


In a recent Collider podcast the hosts were discussing O Brother Where Art Thou?, and mentioned the cinematographer using (I think), a "digital intermediary" which made the sepia tones.   It was then mentioned that the same method gave HP6 its look, and inferred that this caused consternation on the part of the studio.  Can someone explain the filming technique and how it was received by Warner Bros?

I don't know if "colour template" is the word for that. What I mean is the colour of the movies, especially Globet of Fire and the ones after it, seemed to be very dark but also with so much depth to portray the evilness of the Harry Potter world. And I rarely see such a colouring in any other movies.  Is there a technical term for this kind of rendering? Do they use some special camera to achieve this result?


I am trying to prove that if we have an arbitrary set of commuting matrices in $M_n(\mathbb C)$ then they have a common eigenvector.  Well, if we have only 2 matrices, the answer is easy and it has been already answered here:  (acutally in this case we find a common eigenbasis, in case they are diagonalizable)  For the general case of an arbitrary set I am trying to find a subspace of $M_n(\mathbb C) $ which contains that arbitrary set of commuting matrices. Then Prove the statement for the basis ( is going to have  $\leq n^2$ elements) by induction.   So if $Y $ is that arbitary set, take $span(Y)$ which has dimension $\leq n^2$ so find a basis $Y_1 ,Y_2,\dots Y_k,k\leq n^2$  Then prove by induction that we can find a common eigenvector $v\neq 0 $ for the vectors of the basis. So, if $A\in Y\Rightarrow $ $$A=\sum_{m=1}^k a_mY_m\Rightarrow Av=\sum_{m=1}^k a_mY_mv\Rightarrow$$ $$Av=\sum_{m=1}^k \left( a_m\lambda_m\right) v$$ i.e. $v$ is an eigenvector for $A$.  What do you think about that solution?  P.S. I asked if you could check my solution. I have already seen the post which is supposed to answer my question but I am not satisfied ( see comment).

The proof given by my textbook is highly non-satisfying. The author adopted some magic-like "reductio ad absurdum" and the proof (although is correct) didn't reveal the nature of this problem. I made my own effort into it and tried a different approach. Yet I can't finish it.  Let $\mathscr{F}$ be a commuting family in $M_n(\mathbb{C}^n)$, and $A\in\mathscr{F}$, then $A$ has $n$ eigenvalues. We pick one, say $\lambda$. Let $x$ be one of its eigenvector.  We can easily prove that, if $A$ has no other eigenvector with eigenvalue $\lambda$ that linearly independent with $x$, which means that $\{cx|c\in\mathbb{C}\}$ are the only vectors satisfying $Ax=\lambda x$, then $x$ is a common eigenvector. Because $\forall B\in\mathscr{F}$ and $\forall y\in \{cx|c\in\mathbb{C}\}$, $$A(Bx)=ABx=BAx=B(Ax)=B(\lambda x)=\lambda (Bx)$$, so that $Bx$ has to be in $\{cx|c\in\mathbb{C}\}$, that is, $Bx=c_0x$ for some $c_0\in\mathbb{C}$, which means $x$ is a eigenvector of $B$ too.  But what if there are vectors satisfying $Ax=\lambda x$ that's not in  $\{cx|c\in\mathbb{C}\}$? Well, then we should have a set of linearly independent eigenvectors $\{x_1,x_2,...,x_k\}$, that $\{c_1x_1+c_2x_2+...+c_kx_k|c_i\in\mathbb{C}\}$ are the only vectors satisfying $Ax=\lambda x$.  Now, I have a reasonable hypothesis that there exists some $x=c_1x_1+c_2x_2+...+c_kx_k$, that can be proven to be a common eigenvector of $\mathscr{F}$. I've tried some approaches to prove it but all failed.  Do you guys believe it's true? And if it is true then how do I prove it?


Can I map 146.112.61.106 IP address to my 127.0.0.1 adress ?  so when I type 146.112.61.106 I got redirected to 127.0.0.1 ? (some netsh command maybe ?)

I want to map the IP address 192.168.1.222 to 127.0.0.1 so that if I use 192.168.1.222 in the web browser or ping command I get the response (and that from my 127.0.0.1).   Is this possible via routing tables or do I have to add some sort of virtual network adapter?   I try to deal with this problem on a Windows 7 machine and have no other options than a Windows XP maybe.  I'm stuck right there.


On a computer with Windows 7 (virtualized PC on a server) I have a shared folder  \\czek000lbsv015\CHO\   Security is set to Authenticated Users can Read and execute, View folder content, Read.  Sharing is set to Read & Change for the domain user in question.  I have a problem when I try to run an image file by entering its UNC path to Run dialog, or doubleclicking the UNC link in Outlook or running C# Process.Start("\\czek000lbsv015\CHO\20171010153330_1BB5442.jpg").  \\czek000lbsv015\CHO\20171010153330_1BB5442.jpg                  it shows     windows photo viewer can't open this picture because either the   picture is deleted, or it's in a location   But the file in a subfolder opens well when executed:  \\czek000lbsv015\CHO\THUMB\20171010153330_1BB5442.jpg                  When I click on either of the files in Explorer then both open well, I can browse the folder etc.  What is wrong, how to fix it? I need to open the file from a C# program.

Does anybody know a way to force that all files that get created inside some folder inherit the NTFS permissions of that folder.  The problem is the following:  I have a third party software that is creating PDF files inside a certain folder, but the problem is that those files get created with only the permissions for that user and for the administrators group, the file doesn't inherit the permissions of the folder it is in (Include inheritable permissions... is not marked on the files that get created), which give access to other groups of users also.


I installed kubuntu-desktop using sudo apt-get install kubuntu-desktop but I no longer want to use KDE.  How do I remove all the packages that were installed by this command ?  Thank you

I installed kubuntu-desktop just to experiment with its interface.  Then I decided to remove and did the traditional apt-get purge and autoremove but it seems elements of kubuntu are still there. For example interface elements, scrollbars, bootscreen etc are still there.  Is there any method I can completely remove without installing a fresh copy of ubuntu?


I tried extracting text from .doc files. Text were extracted, but the problem is it always outputs with these:  ��ࡱ�>�� ln  characters.  Here is my code:      doc=open(input_file,'r')     read_text_file = doc.readline()     doc_text = ""     for line in read_text_file:         doc_text+=str(line)      return doc_text   Is there a way to remove or re-encode it to utf-8?

Is it possible to read and write Word (2003 and 2007) files in Python without using a COM object? I know that I can:  f = open('c:\file.doc', "w") f.write(text) f.close()   but Word will read it as an HTML file not a native .doc file.


I am a Java novice building a multiple Frame TabbedPane application with multiple panels.  On one of my one of panels I am using a JList and attempting to populate it using a query.  I am using SQLite as the DB.  private JList<String> listTTSearch;  public void loadList() {     try {         String query = "select tt_name from TriTiers";         PreparedStatement pst = dbConn.prepareStatement(query);         ResultSet rs = pst.executeQuery();         DefaultListModel<String> DLM = new DefaultListModel<String>();          while(rs.next()){             DLM.addElement(rs.getString("tt_name"));         }         listTTSearch.setModel(DLM);         pst.close();         rs.close();      } catch (Exception refreshTable) {      } }   No errors are thrown and the JList, listTTSearch is not being populated. Other aspects of my application are working well with the DB.  A similar posts seems to address this issue , but does not seem to plausible to fix my issue.  Any assistance or guidance would be greatly appreciated.

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


I bought a lens reversal ring to try macro photography on my 50mm f/1.8 prime lens. But when I tried it, I couldn't control the aperture as my lens doesn't have manual aperture control. I attached the lens normally and changed the aperture and again detached it to use it reversed. But still, the aperture hole was the smallest. How can I overcome this problem? And if not possible, what equipment should I buy to make this work?

So,  (credit to mattdm for pointing it out) says:     Firstly, when you turn the lens around you obviously lose the CPU connection between the lens and the camera, so say goodbye to autofocus, metering (in most cases) and aperture control (though I’ll come back to that)   Then:       The advantage of this old lens is that it has a manual aperture ring, which neatly neutralises the loss of automatic control mentioned above.   So, since G lenses don't have an aperture ring, aperture can't be controlled anyhow if we reverse the lens?    Secondly, is it practical that we set the metering and the aperture (manually) before taking the lens out and reversing it?  Is there any other way to get around this problem in G lenses (assuming that the camera bodies have the manual focus, aperture, metering controls)?


I try to add the author's name of a paper to describe their contributions. But it does not work:  \usepackage[numbers]{natbib} \citeauthor{24}    This is the output of my pdf looks like this: "(author?)"  I'm using  \bibliographystyle{ieeetr}

I know there are a few questions regarding this, but I couldn't find the solution specifically for such problem: how do I \citeauthor{}, but keep the citing style that I want (I use \bibliographystyle{ieeetr}).  My .tex file looks something like this:  \usepackage{natbib} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \citeauthor{smith}  \begin{document}     \bibliographystyle{ieeetr}     \bibliography{References} \end{document}   And .bib file:  @Article{smth, author ="Smith, Anton", title  ="The title", year  ="2019", journal = "Some journal", volume  ="1"}   I get the (author ?) instead of Anton.  So how would I keep my citing style but use \citeauthor?


Basically I am trying to get back to windows so I can play league of legends on this pc. Any and all help is appreciated. I am not enjoying playing on ubuntu with playonlinux.

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


I  want to download free app in my iPod touch device and i have the following doubts.  Kindly resolve me doubts.   when i try to download it asks my credit card security number. since i am trying to download free app , why do i need to provide my credit card security code? Will i be debited for downloading the free app from app store?   I cant able to find any information regarding this on apple.  Please provide me some references about this from apple and please resolve my doubts.  Thanks a lot.

Ever since adding an iTunes gift card to my account, I'm getting verification requests like crazy. I can't even download free apps. It takes me to my payment info and when I try to select none, I continually get a message under the payment info that says "you must verify your payment info to continue"  I don't want a credit card on file and would really like the none option to work. My ID shows I still have iTunes credit.


Could someone please explain the differences between the 3 fitting methods, method = c("CSS-ML", "ML", "CSS"), in Arima?  If I run the code below I get an error message, but if I specify method="ML" in Arima it runs fine.  So I was curious what the difference was between the 3 fitting methods.  Code with error:  library("fpp")  tsTrain <- window(hsales,end=1989.99)  pvar<-1:10 dvar<-1:2 qvar<-1:7  OrderGrid<-expand.grid(pvar,dvar,qvar)  n <- function(a,b,c) {Arima(tsTrain, order=c(a,b,c))} ModFit <- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))   Fixed Code:  library("fpp")  tsTrain <- window(hsales,end=1989.99)  pvar<-1:10 dvar<-1:2 qvar<-1:7  OrderGrid<-expand.grid(pvar,dvar,qvar)  n <- function(a,b,c) {Arima(tsTrain, order=c(a,b,c),method="ML")} ModFit <- do.call(Vectorize(n, SIMPLIFY=FALSE), unname(OrderGrid))


I have made these steps and I'd like to fit them better to the curved shape of the structure they are attached to by bending them to a curve. Is there a tool that would allow me to do this in one go? How would one go about doing this?

I'd like to curve my object, but I'm considering two options.  The first one is to make the object up with lots of vertices, like a sphere can be. The second is to apply some kind of modifier curve to a straight mesh, as I've understood there is such a possibility.  Here's an awesome pen drawing of what I'd like to achieve:    and here's my current even more awesome result:    Rather non-awesomely, they don't quite match. So if someone would kindly point me to the correct method to achieving a nice-looking solution with relatively low polygons, I'd be much enlightened


Ubuntu cannot find my HP 2130 printer, which was automatically installed in the previous Ubuntu release and ran without a problem. Ubuntu 18.04 doesn't install the printer automatically, and it doesn't give me the option to do it manually. Same as with sound. No search facility to find the printer.  I clicked in Settings -> Devices -> Printers, but the operating system displays Sorry the system printing service doesn't seem to be available. No Add button. I never had a problem with previous releases of Ubuntu, with printing, scanning and sound. Since I loaded Ubuntu 18 right from the beginning, and if I want to print or scan I have to use my Windows laptop.

Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - .  So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need.   What should one install to make Ubuntu fully support the HP printer and/or scanner?


How do you declare and initialize constant variables in javascript?

Is there a way to use constants in JavaScript?  If not, what's the common practice for specifying variables that are used as constants?


I'm trying to implement Linspace in c++ I created some random tests and have a problem with precision I don't understand why.  c++ implementation   std::vector<double> libcalc::linear_space(double a, double b, unsigned int n) {     std::vector<double> array(n,a);     //return an empty array if number of spaces is 0     //return a if number of spaces is 1     if (n <= 1 || fabs(a - b) < std::numeric_limits<double>::epsilon())     {         return array;     }      //we want to be sure we get exactly b in the end     for (unsigned int i = 0; i < n-1; ++i)     {         array[i] = a + ((b - a)*i)/(n-1);     }     array[n - 1] = b;     return array; }   Catch unit test frame work test  auto reverse = [](std::vector<double> const& x) {     std::vector<double> output(x.size());     std::reverse_copy(x.begin(), x.end(), output.begin());      return output; };  SCENARIO("Any linear space (a, b) with two or more points will be same as"     " the reversed linear space of (b, a)") {     GIVEN("a range of points to check starting from 2")     {         unsigned int starting_point = 2;         unsigned int ending_point = 10;          THEN("the linear space (a, b) is same as reversed linear space (b, a)")         {             for (unsigned int n = starting_point; n < ending_point; ++n)             {                 auto a = any_value();                 auto b = any_value();                  auto x = linear_space(a, b, n);                 auto y = reverse(linear_space(b, a, n));                 INFO("a: " << a);                 INFO("b: " << b);                 INFO("n: " << n);                 REQUIRE(x.size() == y.size());                 CHECK(x == y);             }         }     } }   the c++ code results are     CHECK( x == y ) with expansion:   { -296336583.43100381, 273999144.43620467, 844334872.30341315, 1414670600.   1706216, 1985006328.0378299 }   ==   { -296336583.43100381, 273999144.43620443, 844334872.30341291, 1414670600.   1706214, 1985006328.0378299 } with messages:   a: -2.96337e+008   b: 1.98501e+009   n: 5   the matlab results have better precision for forward or reverse linspace  linspace(-296336583.4310038, 1985006328.0378299,5)  ans =  1.0e+09 *    Columns 1 through 4    -0.296336583431004   0.273999144436205   0.844334872303413   1.414670600170622    Column 5     1.985006328037830   linspace(1985006328.0378299,-296336583.4310038,5)  ans =     1.0e+09 *    Columns 1 through 4     1.985006328037830   1.414670600170621   0.844334872303413   0.273999144436204    Column 5    -0.296336583431004   as you can see the number are very much a like but... not exactly the same.  Can you please help why is this?

What would be the most efficient way to compare two double or two float values?  Simply doing this is not correct:  bool CompareDoubles1 (double A, double B) {    return A == B; }   But something like:  bool CompareDoubles2 (double A, double B)  {    diff = A - B;    return (diff < EPSILON) && (-diff < EPSILON); }   Seems to waste processing.  Does anyone know a smarter float comparer?


I got and installed Steam a few months ago in my system drive. And then I got a backup of Dota 2 and installed it. It was fine till a month ago before my lap top got broken. With passing problems and finally getting my new pc and recovering a small amount of my past laptop data I found out that my Steam client has been removed.    Now the problem is that I have my Dota game folder (it's not the backup file) but I don't have my Steam client and I should reinstall it. After that am I gonna be able to play Dota again? Or should I download it from the beginning? It may not be an important thing in developed countries but in mine it is. 12GB is a huge amount for downloading!

I have a failure to transfer my game from one HDD to another, and one PC to another. I copied the entire Skyrim folder from one HDD to another. And told where to find it also. Steam did a huge check of my HDD.  But it ended up downloading most of the files anyway. It took a week to download Dawnguard, Hearthfire, and Dragonborn files along with my Hi-Res textures.  I did ask about it in chat. But I feel this could help me or somebody else.  This is the screen I am looking at after transferring my entire hard drive to to new one. Steam downloaded my games, including Skyrim even though my Skyrim data folder had all the data files for Dawnguard, Hearthfire, Hi-Res and Dragonborn.  I have my copied files and have got rid of everything not steam related. I just have my DLCs and they include my hires files.  This is what it looks like.    But I still get this :     What could be causing this? How can I rectify? And in future when one is migrating to a new PC, how can this be avoided?  EDIT::::::::::::::::: Removed everything : Here is how it looks :  Still the prompt as before Steam Error 15  (Side Note : I transferred all my Origin games just by copy/pasting. This really is not nice.)    EDIT 2 :::::::::::::::::::::  And one more EDIT  I tried getting game cache up to speed, but this is prompt I am getting. But I played the game, it was working, I could pick out my character and all, and escape from Helgen.  EDITED 3 :::::::::::::::::  How does one transfer a Steam game? A game that is heavily modded, will the backup a Steam Game option suffice?


stackverflow-dot-com has recently been updated to be a clone of the real Stack Overflow site, and most likely steals information.  Is this website illegally using the Stack Overflow and Stack Exchange logos, and can it be shut down for that?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I have a text file which has about 70000000 lines in Linux system.  How to delete the lines from 40000000 to 50000000 without opening the file?  Thanks.

I want to delete one or more specific line numbers from a file. How would I do this using sed?


In some manuals online I see numbers in parentheses following the commands, like  (sshd(8), ssh_config(5), etc.). What does this mean, and why is it important to indicate/show the number?

Just saw someone referencing man 7 regex on Stackoverflow. I tried man regex and got very similar output - there appear to be slight differences.  So what is this magical number 7? Searching man 7 unix on Google gives me more mysterious results like UNIX(7)...


I'm trying to add a column with VARCHAR(MAX) to a mySQL table, and i believe the syntax is correct, it's just not going through?   here is my code:  ALTER TABLE content ADD contents VARCHAR(MAX);   It says there is a problem with the MAX part of the code, even though I believe its correct, any help would be fantastic!

What is the equivalent of varchar(max) in MySQL?


I just upgraded to Ubuntu 17.10 from 17.04. When I try to switch workspaces, it only does so on the primary monitor. The secondary monitor can not switch workspaces (It is stuck on Workspace 1). How can I switch workspaces on both monitors?

Gnome-shell seems to like to leave one monitor as "fixed" when you switch workspaces.  Additionally, there is no preview in the Activities view of my secondary monitor.  Also, on the second monitor, where there should be either empty desktop space, or a copy of the panel, I just have a white bar.  How can I get gnome-shell to treat my secondary monitor like the primary one?


I have also been told it's impossible. If so, how?

There is an unique solution with $x$ being approximately $0.739085$. But is there also a closed form solution?


My data takes the following form: Outcome variable = no of suicides (count data) Explanatory variables = Age (grouped into young, middle and old), Gender, Country, Year I am running a Poisson regression. I have been told that I need to take the population size of each country into account, in order to be able to compare no of suicides in different countries. I have now included population in my dataset, and in my regression. What do I do? - How do I interpret the coefficient of Population, or should I ignore this? - Do I need to do anything else? Thank you in advance!

Does anybody know why offset in a Poisson regression is used? What do you achieve by this?


public WebElement locater(String locter)     {         String[] value = locter.split("##");         String loctValue = value[0];         String loctType = value[1];            try {             if(loctType.equalsIgnoreCase("XP"))             {                   loct = driver.findElement(By.xpath(loctValue));               }             else if(loctType.endsWith("id"))             {                 loct = driver.findElement(By.id(loctValue));              }             else if(loctType.equalsIgnoreCase("linkText"))             {                 loct = driver.findElement(By.linkText(loctValue));             }             else if(loctType.equalsIgnoreCase("partialLink"))             {                 loct = driver.findElement(By.partialLinkText(loctValue));             }             else if(loctType.equalsIgnoreCase("cssSelect"))             {                 loct = driver.findElement(By.cssSelector(loctValue));             }             else if(loctType.equalsIgnoreCase("name"))             {                 loct = driver.findElement(By.name(loctValue));             }             else if(loctType.equalsIgnoreCase("tagname"))             {                 loct = driver.findElement(By.tagName(loctValue));             }          } catch (Exception e) {             // TODO Auto-generated catch block             e.printStackTrace();             System.out.println(e.getMessage());         }         return loct;      }   Unable to resolve...any one can help me out

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?


How can I open in Python a unix shell, type a command and some other inputs and close the unix shell?  Example commands and inputs:  telnet 127.0.0.1:6000 user pass save-all restart   Greets  miny

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


How can we prove that the sum of a geometric series is of the order of the last term for r>1, that is to show that its theta notation consists of the last term.

Consider the following function:  $$S(n)=1+ c + c^2 + ··· + c^n,$$  where c is a positive real number.  (A) This function is the sum of a geometric series. Give a precise closed-form formula for $S(n)$, interms of $c$ and $n$, in the case where $c \neq 1$.  (B) Show that $S(n)$  is:  $\theta(1)$ if $c<1$  $ \theta(n)$ if $c=1$  $\theta(c^n)$ if $c>1$    can someone please explain how i can go about finding the solutions for these problems, i have never encountered these and am stuck, i know that big theta means that the function is bond on both sides but how do i got about finding the answer?  (edit) im still having trouble understanding part B. can someone please explain? (can someone walk me through the second one) so far i have $n \leq c^{n+1} \leq ???$  (edit #2) i tried doing the first one can someone verify if i did it right  $S(n)$ is $\Theta(1)$ if c<1  (1)$S(n)$ is $O(1)$ if c<1  (2)$S(n)$ is $\Omega(1)$ if c<1  (1) $$\frac{C^{n+1}-1}{C-1} \lt (C_1)(1)$$ $$\frac{C^{n+1}-1}{C-1} \lt (C_1)$$ $$C^{n+1} \lt C_1(C-1)$$ $$C^nC-1 \lt C_2C-1$$ $$C^n \lt C_2$$ $$C^n \lt 1$$ since c<1 this means that any number that will be $C^n$ will be less then 1 for all positive n  i did the omega part pretty much the same way and got $$C^n \gt C_2$$ $$C^n \gt 0$$ since c<1, $C^n$ can potentially become very very small so the only thing bounding it is 0 for all positive n


Is there any special reason because of which active-low inputs are occasionally used instead of active-high inputs? Example: We have active-low inputs RD' (read as "READ bar") and WR' (read as "WRITE bar") for memory chips, instead we can have RD and WR as inputs right?

In my career I've often encountered signals that are active low (Reset being the most common). I've even seen interfaces where all control signals are actively low.  To me, this is very unintuitive and confusing. Why is there ever a need to use actively low?  Is it merely historic or is there actual gate count / power concerns that explains it?


I am starting c#, and from what i read lists<> are most often preffered. But i kind use to; to think in arrays from my PLC coding past. I work a lot with blackwhite raw instrument image data. Which i currently put in a color array ea      BWcolor[x,y] = 255;  it could also be done with lists in which the same point could be defined as element nr:    x+stride * y  I wonder should i convert image handling to use list data or keep thinking in arrays. Because i read about that arrays should not be used in most cases. And that lists are faster?; or are lists in general better since lists have more buildin functions ? (like inserting elements). And if thats so it would only be handy to code so if my functions would depend on their functions.  I not realy get it why a lists are prefered when thinking in 2dimensional spaces, but if it is beneficial i would better start converting my code to use lists.

MyClass[] array; List<MyClass> list;   What are the scenarios when one is preferable over the other? And why?


I'm trying to pass an argument to a bash script and have it iterate through letters      #!/bin/bash     for l in {$1..$2}; do          echo $l     done   When I try to run ./myscript.sh A D Instead of getting:  A B C D   I get:  {A..D}

How do I iterate over a range of numbers in Bash when the range is given by a variable?  I know I can do this (called "sequence expression" in the Bash ):   for i in {1..5}; do echo $i; done   Which gives:     1    2    3    4    5   Yet, how can I replace either of the range endpoints with a variable? This doesn't work:  END=5 for i in {1..$END}; do echo $i; done   Which prints:     {1..5}


How can we break formula mentioned below into into two lines?   $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{\log \log x}}\left\{ {\frac{1} {{x\log x}}\left( {\log x + \log \log x} \right) + \left( {\log \log x} \right)\left( {\frac{1}{x} + \frac{1}{{x\log x}}} \right)} \right\} }$   FYI: I'm using two column layout and this symbol is getting overlapped over next column.   EDIT: Added sample tex file having issue mentioned above:   \documentclass[addpoints,answers,10pt]{exam} \usepackage[margin=0.7in,headheight=3.5\baselineskip,headsep=1\baselineskip,includehead]{geometry} \usepackage{multicol} \usepackage[T1]{fontenc} \usepackage{graphicx} \usepackage{tabularx} \usepackage{nonfloat} \usepackage{caption} \usepackage{amsmath,amssymb} \usepackage{lmodern} \usepackage{textcomp} \usepackage{ifpdf} \usepackage{chemfig} \usepackage[export]{adjustbox} \begin{document}   \begin{multicols}{2} \begin{questions} \question[4] Ref: (111)\\If\ $\displaystyle \boldsymbol{y = {\left( {x\log x} \right)^{\log \log x}} }$ , then\ $\displaystyle \boldsymbol{\frac{{dy}} {{dx}} =  }$ \begin{choices} \choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{\log \log x}}\left\{ {\frac{1} {{x\log x}}\left( {\log x + \log \log x} \right) + \left( {\log \log x} \right)\left( {\frac{1} {x} + \frac{1} {{x\log x}}} \right)} \right\} }$ \choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\log \log x\left[ {\frac{2} {{\log x}} + \frac{1} {x}} \right] }$ \choice $\displaystyle \boldsymbol{{\left( {x\log x} \right)^{x\log x}}\frac{{\log \log x}} {x}\left[ {\frac{1} {{\log x}} + 1} \right] }$ \choice none of these  \end{choices} \end{questions} \end{multicols} \end{document}

I am having the following equation:  \begin{equation}   Q(\lambda,\hat{\lambda}) = -\frac{1}{2} P(O \mid \lambda ) \sum_s \sum_m \sum_t \gamma_m^{(s)} (t) \left( n \log(2 \pi ) + \log \left| C_m^{(s)} \right| + \left( \mathbf{o}_t - \hat{\mu}_m^{(s)} \right) ^T C_m^{(s)-1} \left(\mathbf{o}_t - \hat{\mu}_m^{(s)}\right) \right) \end{equation}   which does not very well fit on one line. How can I split this over two lines? What I have in mind is that I specify the splitting place, and that the first line is left aligned and the second line right aligned to make clear that it is still the same equation.  The linebreak \\ does not work.


How to solve these limits using a formula for logarithm limit(without applying L'Hopitale rule)  $$ \lim_{x \to 0} \frac{\sqrt{1 + \tan(x)} - \sqrt{1 + \sin(x)}}{x^3} $$  $$ \lim_{x \to 0} \frac{\arctan 2x}{\sin[2 \pi(x+10)]}$$  I suppose in the second I may not take into account arctan and sin as sinx approximately equals x

What I attempted thus far:  Multiplying by conjugate   $$\lim_{x \to 0} \frac{\sqrt{1 + \tan x} - \sqrt{1 + \sin x}}{x^3} \cdot \frac{\sqrt{1 + \tan x} + \sqrt{1 + \sin x}}{\sqrt{1 + \tan x} + \sqrt{1 + \sin x}} = \lim_{x \to 0} \frac{\tan x - \sin x}{x^3 \cdot (\sqrt{1 + \tan x} + \sqrt{1 + \sin x})}$$  factor out $\sin x$ in the numerator  $$\lim_{x \to 0} \frac{\sin x \cdot (\sec x - 1)}{x^3 \cdot (\sqrt{1 + \tan x} + \sqrt{1 + \sin x})}$$  simplify using $\lim_{x \to 0} \frac{\sin x}{x} = 1 $  $$\lim_{x \to 0} \frac{\sec x - 1}{x^2 \cdot (\sqrt{1 + \tan x} + \sqrt{1 + \sin x})}$$  From here I don't see any useful direction to go in, if I even went in an useful direction in the first place, I don't know.    I suspect that this could be evaluated using the definition of derivatives, if so, or not, any suggestions?


Considering the product ideal $IJ = \{ \sum_{i=1}^n a_ib_i | a_i \in I, b_i \in J \forall i\}$, I've always seen it written that the more naive notion $IJ = \{ ij | i \in I, j \in J\}$ is not an ideal because in general it is not additively closed and is thus not a subring. I am unable to come up with a proof or any examples.   Any ideas?

Where does the "naive definition" of the product of two ideals $I$ and $J$, $IJ = \{ ij \mid i \in I, j \in J \}$ fall apart? (The product of two ideals $I$ and $J$ is defined to be $IJ := \sum_i a_ib_i$, where each $a_i$ is in $I$ and each $b_i$ is in $J$.)  Note: This is a question from a problem set I'm working on. I am not expecting a full solution for the answers, but I'd like some help knowing where to look. It seems to work fine in $\mathbb{Z}$ and $\mathbb{C}[x]$.


Is there any way to do a strip map index on ArcGIS Pro?   This is for a pipeline route, Grid index doesnt work very well for this.

The Strip Map Index Features tool is listed amongst the  at version 2.2.  A workaround when needing a strip map index to be created, with an Angle field being populated so that each page can be rotated correctly, would be to use the  but is anyone aware of a workaround for creating a strip map index on a machine when only ArcGIS Pro (with its ArcPy) is installed?


I wish to turn several of my blog article series into a PDF e-book but I have never used LaTeX before for creating books.  For example, I want to take my  article series, improve it and turn it into a book.  I'll probably start with this guide that I found -  But that is just a small template. Any other tips, tricks and suggestions for doing it?

I have taken a look at other questions, and I don't see any answer to my question. If this is a duplicate for some question I haven't seen, feel free to comment.  I am an experienced TeX user, I've been writing with TeX for about 3-4 years now. I am pretty good with TikZ too. The problem is, all that I have learned comes from one of my teachers that gave me packages so that I don't have much to worry about, and I never got in the technical stuff on my own (or at least never understood a thing of it).  I want to write a book, so I need to be able to deal with stuff like margins, labels, pagination, separating my TeX files into many files so that I don't have to compile the whole book each time I wanna remove/add a comma, etc. I am looking—not for a user manual that states what all commands do like a dictionary, because I know there are plenty out there and I have some—but rather like an introduction to using a book class, with examples and such. If you know what I'm talking about, the PGF-TikZ pdf is a great example of a such PDF ; it describes commands, yes, but there are plenty of examples and little commands are usually detailed while constructing a bigger example.


Why is an image of a homomorphism a subgroup of the codomain? I know that the image of any function is a subset of the domain, but I don't know how to proceed with the former statement.

Is my proof ok?  Let $f:G\to G^{\prime}$ be a group homomorphism and let $H\lt G$. $Im(H) = \{f(x):x\in H\}$. To show that $Im(H)$ is a group, it suffices to show that $f(x)f(y)^{-1}\in Im(H)$. $$f(x)f(y)^{-1}=f(xy^{-1})\in Im(H)\text{ because } xy^{-1}\in H$$  $Ker(f)=\{x:f(x)=e^{\prime}\}$ ($e^{\prime}$ is the identity in $G^{\prime}$). $$f(xy^{-1})=f(x)f(y)^{-1}=e^{\prime}(e^{\prime})^{-1}=e^{\prime}\in Ker(f)$$.


How can I typeset the equality symbol ::= used in the definition of syntactic categories of BNF grammars?  I would like to use it both in typewriter font (using \texttt) and in math mode.  Both \texttt{::=} and $::=$ (or $:\coloneqq$) are ugly.

I wish to use the symbol as in the following picture, however, I can not find it. Can someone help me?


Firefox uses space that I find redundant. I would prefer to have less space wasted by Firefox while keeping the window buttons.  This has wasted space:    This does not. How can I get it to look like the picture below instead?

I used to use an extension to hide/show the title bar in Firefox, but since Firefox 57 was released most of the extensions were disabled.  In Chrome I just uncheck the option "Use system title bar and borders" and it's done.  Are there any ways to do that?


Trying to build an Exchange server solution for a company and they want me to look into licensing for Windows. I'm going to be purchasing the necessary server licenses for Windows Server 2012 Standard and Microsoft Exchange 2013 Enterprise. I just have a few questions about the CAL's thing which seems like a complete ripoff to me. How are CAL's tracked for both Windows Server and Exchange? Is it tied to Active Directory profiles? What happens if I dont have the necessary CAL's for Windows Server? Will a client be denied access from Active Directory? Is there any enforcement for this? Also the same question for Exchange 2013 CAL's  Thanks

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


Often, when someone yells "shoo", or "get out of here", it is often accompanied by a hand gesture. It looks kind of like a brush through the air, only more aggressive, and sometimes it kind of looks like they're pointing them away.

Here is the :     to wave off          To dismiss or refuse by waving the hand or arm: waved off his invitation to join the group.      But can "wave off" also be used for this    gesture, communicating a "whatever" with a sprinkle of "oh, come on!" or an "oh, f*** you..."?  Are there any other/more specific verbs for this gesture? Or does "wave off" get the message across just fine?


Deleted Steam from terminal, now, when I try to install or remove anything I get the same error:  tim@tim-X55A:~$ sudo apt-get remove gimp Reading package lists... Done Building dependency tree        Reading state information... Done The following packages were automatically installed and are no longer required:   gimp-data libamd2.4.1 libbabl-0.1-0 libblas-common libblas3 libcamd2.4.1   libccolamd2.9.1 libcholmod3.0.6 libgegl-0.3-0 libgfortran3 libgimp2.0   liblapack3 libmng2 libraw15 libsdl1.2debian libumfpack5.7.1 python-cairo   python-gobject-2 python-gtk2 Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED:   gimp 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. Need to get 0 B/875 kB of archives. After this operation, 16,0 MB disk space will be freed. Do you want to continue? [Y/n] y debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable (Reading database ... 193119 files and directories currently installed.) Removing gimp (2.8.16-1ubuntu1.1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for mime-support (3.59ubuntu1) ... dpkg: error processing package steam:i386 (--configure):  package steam:i386 is not ready for configuration  cannot configure (current status 'half-installed') Errors were encountered while processing:  steam:i386 E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm trying to install the flashybrid but when I enter the apt-get install flashybrid command, I get this error:  root@user-desktop:/home/user# apt-get install flashybrid Reading package lists... Done Building dependency tree Reading state information... Done flashybrid is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up flashybrid (0.15+nmu2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing flashybrid (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: flashybrid E: Sub-process /usr/bin/dpkg returned an error code (1)   I also tried this one to find what is already using that file:  root@user-desktop:/home/user# lsof | grep /var/cache/debconf/config.dat lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs Output information may be incomplete. dpkg-prec 4672 root 4rW REG 8,6 39658 1697827 /var/cache/debconf/config.dat   But I don't know how to fix this.


Let's suppose that U is the universe set and it contains the sets A that is 60% of U and B that is 40% of U, so they are disjoints, the set A contains the set X that is 80% of A, how much in percent is X in U?


var t1 = [2,4,7,9]; var t2 = t1; console.warn(t2); // [2, 4, 7, 9] t1[1] = 7; console.warn(t2); // [2, 7, 7, 9]   Why? :) I can't understand. t2 is inheits t1?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


For any positive integer $n$, show that $x\gg 1 \rightarrow \log{x} < \sqrt[n]{x}$  I approached this problem by showing that $\lim_{x \to \infty} \frac{\log{x}}{\sqrt[n]{x}}= 0$  I tried to show that the limit converges to zero by showing that the integral test, $$\int_{1}^{\infty}{\log{x}\over\sqrt[n]{x}} dx $$ converges, which would in turn mean that the limit converges to zero (due to the $n^{\text{th}}$-term test)  But I can't get how to solve this improper integral, and also don't know whether my approach is right in the first place.

How can I prove that $\log^k(n) = O(n^\epsilon)$? (for any $\epsilon > 0 $ and for any integer and positive $k$).  I tried to do it by - definition , and to prove that exists $c,n_0 > 0$ so that for any $n > n_0 $ exists: $c \cdot n^\epsilon > \log^k(n) $, but I don't have idea how to continue for this point.    I will be happy to listen ideas :).


I went through the documentation but couldn't find a solution. I'm hoping there is some kind of argument that will tell FFmpeg to not show the output in the console.  The output that I'm referring to is in the screenshot given below

By default ffmpeg sends a whole lot of messages to stderr: when built, how it was built, codecs, etc, etc, etc.  How can I make it quieter?  I've tried -v 0 (and -v 10 since the documentation just coyly says Set the logging verbosity level. with no indication of what the range of inputs is) -- still not quiet.  I've tried -loglevel quiet -- still not quiet.  I should mention, I'm looking for "quieter," not "no output ever".  If there's an error I want to see it, but I don't need to hear about ffmpeg's configuration every. single. time.


Does anybody know when Focal will be available to upgrade from Bionic (using Software Updater) on production box? do-release-upgrade states that upgrade not yet available for production machines. I'm not interested in STS Ubuntu versions. I've downloaded Focal from ubuntu.org and createda Startup on a usb thumb drive. Should I use this to upgrade or wait for Software Updater to give the option of upgrading to Focal?

Not a problem, but have been seeing questions recently of people not being offered upgrade from 18.04 to 20.04.  I thought these upgrades were offered back in June.  I upgraded to 20.04 from 19.10 and this was offered back in May.  Imagine that different versions paths have different schedules, but google does not help explaining(that I found).  Does someone know the schedules?


The beauty First answer taught me some really nice and elegant ways to achieve the exact thing I was asking about. The beast Second answer made me see things in a different way, and led me to an overall better and more reliable solution, but without providing a direct answer to my original question. Who should be rewarded the rep?

I asked  that turned out to have multiple correct answers. How do I pick between them to determine which to accept?  All of the answers were different. They were not the same answer given multiple times.


I have a binomial distribution of n = 400 and p = 0.2. With this distribution, the probability of getting k = 88 is: $$ \binom{400}{88} \ 0.2^{88} \ 0.8^{400 - 88} \ =\ 0.0295 $$  When I approximate this binomial distribution with a normal distribution, the mean of my normal distribution would be $400\ *\ 0.2\ =\ 80$, and the standard deviation would be $\sqrt{400\ *\ 0.2\ *\ 0.8} \ =\ 8$.  With this mean and standard deviation, the z-value of k = 88 would be: $$z\ =\frac{88\ -\ 80}{8} \ =\ 1$$  In a standard normal distribution, this z-value would have a probability of $0.24$ (I think this is called the pdf, but I'm still new to statistics).     This probability ($0.24$) doesn't match up with the probability I'd expected from the binomial distribution ($0.0295$). How can I explain this discrepancy?

I am having trouble getting to the bottom of this concept for two types of questions (hw is already passed, but I have a test this week and would like to do better).  Hopefully someone can help me get this through my thick skull.  Question 1     In the following problem, check that it is appropriate to use the   normal approximation to the binomial. Then use the normal distribution   to estimate the requested probabilities.      Do you try to pad an insurance claim to cover your deductible? About   39% of all U.S. adults will try to pad their insurance claims! Suppose   that you are the director of an insurance adjustment office. Your   office has just received 134 insurance claims to be processed in the   next few days.       (a) half or more of the claims have been padded   Question 2     Based on long experience, an airline found that about 6% of the people   making reservations on a flight from Miami to Denver do not show up   for the flight. Suppose the airline overbooks this flight by selling   272 ticket reservations for an airplane with only 255 seats.       Use the normal approximation to the binomial distribution to answer:   What is the probability that a seat will be available for every person   who shows up holding a reservation?     Adding per the comments posted.  My understanding of the approximation is that given np > 5 and nq > 5 the approximation can be used, and I have in my notes the definitions of   Mean = np   Sigma = Sqrt(npq)   Nowhere does it discuss how to figure out a probability, so I assume I use the probability from the binomial distribution (is this correct)   P = nCk * p^k * q^(n-k)   But my other issues is that binomial distribution is for exactly k successes out of n attempts. That doesn't seem to be the problem for question 1 (but I suppose I could sum all of the k..0 (by -1) successes.  But again I am a touch confused here as well.  Looking at  question 2 it is more of the same, what is the probability that more than 255 people will show up .  Maybe my question is more around the application of the binomial distribution.  The textbook (brase and brase) is not super strong and I have been trying to augment with web and other texts.  I am taking this as a leading class in a graduate degree in Econ.  I also have a team of computational finance guys that work indirectly for me, but I would like to be able to have better conversations with them, and I have always wanted to now more about probability.  At the end of the day, I got a 94 on this hw assignment (so its not like this is killing my grades), but these two questions (with a few more parts to them) really stumped me.  It seems like a trivial place to get stumped and I would hate for this to come back and bite me later on!    I think if I approach it this way:  p = .39 q = 1 – p n = 134 Mean:  52.26 (approximated by np) Sigma: 5.6 ( approximated by: sqrt(npq) )  test = 134 / 2 = 67  P(x > 67)  ~= P(x > 66.5)                                                the continuity correction ~= 1 - p(z > (x – mean) / sigma)  ~= 1 – p(z  >  (67 - 52.26) / 5.6)   thoughts?


Does a percentage require a singular or plural verb, for example, do we say ten percent "go" or "goes"?

Usage of "%"  I'm almost positive it's a prepositional phrase since it's really means "per cent" or "per 100".  So in a sentence like:     90% of my street are doing lawn work.   It would be "are" and not "is" because both "%" and "of my street" are prepositional phrases and therefore cannot contain the subject.  Am I right?


I have this mock:  @Mock ObjectMetadata metaMock;   I then use it in a test with the following line of code:  when(client.getObjectMetadata(bucket, key)).thenReturn(metaMock);   My test returns a NullPointerException at this line in my method under test:  ObjectMetadata meta = client.getObjectMetadata(bucket, key);   As best as I can tell this should work. Am I doing anything wrong here? the only thing I can think is that metaMock may need to have something assigned to it. Is this the case?

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


Is it proper to say:     Please join me, my family and crew in celebrating my Bat Mitzvah?   Or should there be a 'my' before crew?

Should I put a comma before the last item in a list?     I would like crackers, cheese and some soda.   I would like crackers, cheese, and some soda.


I'm creating csv file with UTF-8 encoding using PHP code, when i use UTF-8 encode it prints special characters not correctly,  Code :   $fp = fopen('php://temp', 'w'); fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); // encode to UTF8 fputcsv($fp,$row,';',chr(0));     rewind($fp);                  Yii::app()->user->setState('export',stream_get_contents($fp));                  fclose($fp);                  Yii::app()->request->sendFile($name.'.csv',Yii::app()->user->getState('export'));                  Yii::app()->user->clearState('export');   when i use fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); this the file is in UTF-8 encode but special characters are wrongly displayed Honor� de Balzac 45100 Orl�ans.  Please anyone provide me an idea to resolve this case

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I am using Ubuntu 12.10 32-bit.  The machine detected the network printer Canon MF4800, but it can not find a driver.  The screen prompts for a driver.  I selected Canon but I cannot find the the series of my printer.  I went to the Canon website and searched for a Linux driver but drivers are not not available for the Linux OS.

I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner?


The complement of $G$ is the graph with the same vertices as $G$, but whose edges are precisely the non-edges of $G$. (That is, $u$ is adjacent to $v$ in the complement of $G$ if and only $u$ is not adjacent to $v$ in $G$.) Therefore, if $G^c$ is the complement of $G$, then $E(K_{|V (G)|} )$ is the disjoint union of $E(G)$ and $E(G^c )$. Show that if $G$ is a simple planar graph with at least eleven vertices, then the complement of $G$ is not planar.

It is an exercise on a book again. If a simple graph $G$ has 11 or more vertices,then either G or its complement  $\overline { G } $ is not planar.  How to begin with this? Induction?  Thanks for your help!


Let’s say someone supposedly fears a hyperinflation and hence the devaluation of money (or historically speaking the implementation of a new currency, e.g. post-war Germany). This extreme inflation is caused by an over aggressive political guideline, too much debt/suspensions (in those current times), external factors (war) or anything alike - there are many reasons to why such things could happen! What’s the best way of protecting one’s liquid wealth (the currency someone has, not the net worth) - in different price categories? Someone with $300k+ lying around might invest in a house, an individual with “just” e.g. $10k might purchase Gold? Other currencies? Please share founded opinions in regards to historical events at best, i.e. “Gold is a solid option as seen in [...]; you barely face any conversion loss and it’s pretty stable!” Proof-testing those hypothesis in different scenarios would be top-notch, e.g. “in times of a war your ‘saved cash’ in real estate might get destroyed hence leave you without any substantial value -> Gold is better because [...]”

I don't want to freeze my cash in any medium that would require me to look/wait for a buyer, wait for the collective investment fund to cash my shares as they take their allowance of time to cash them when they are cheapest, or risk the only office within 100km capable of turning my [specific asset] into cash is closed due to some local emergency.  I don't really care about turning profit on my savings, but I know better than leaving them on plain account in my country's native currency on percentage keeping up with current inflation - Hyperinflation has swallowed my long-term savings account once already, and the situation isn't really stable.  What asset is easy to liquefy (even in case of severe local crisis) but immune to local hyperinflation and strong against global crises, plus doesn't lose value over time, or at least loses it slower than cash?


I would like to colour individual cells of a table based on quantity. For example if the cell value is <5 then the colour should be green. if >5 but less than 10 should be orange, and red for if the cell is 10. Any ideas? The only solutions I have found colour the entire column/row. Thanks for the help, My following code for the table is: \begin{table}[ht]     \centering     \setcellgapes{3pt}     \makegapedcells \begin{tabularx}{\linewidth}{|*{8}{C|} }     \hline \makecell{Mean\\ Partnership\\ Duration}     & \multicolumn{7}{c|}{The number of simulations resulting in an epidemic out of 10 for mean degree}\\ \cline{2-8}     & 0.2 &0.4& 0.6 & 0.8 & 1.0 & 1.2 & 1.4\\ \hline 100   & 0 & 0 & 0 &  3 & 8 & 10 & 10\\ \hline 80   & 0 & 0 & 1  & 3 & 9 & 10& 10\\ \hline 60   & 0 & 0 & 2 & 8 & 9 & 10& 10\\ \hline 40   & 0 & 2 & 5 & 8 & 10 & 10& 10\\ \hline 20   & 0& 8  &  9 & 9 & 10 & 10& 10\\ \hline 10 & 0 & 8 &  9 & 10 & 10 & 10& 10\\ \hline \end{tabularx} \caption{The number of simulations that resulted in an epidemic for a certain mean partnership duration and mean degree} \label{My table}     \end{table}

I viewed in this post  a solution to my question, but...    Are there any easier way (or alternative) to do this using colors?  Thank you. ------------------ edited after showed than it´s duplicate ------------- I think that there are many sols, but for example this is easy using a normal table without pgf...     I´m trying to adapt to similar colors to apply to the table probabilitiess


I'm having problems solving this type of irrational integral:  $$\int_{}^{}\frac{2\sqrt[5]{2x-3}-1}{(2x-3)\sqrt[5]{2x-3} + \sqrt[5]{2x-3}}dx$$  I've tried using the following substitution: $2x-3 = t^5$ but hopeless. If anyone sees how the integral should be solved please reply to my question.  P.S. This is the result that I should get: $$\frac{5}{2}\left[\ln(\sqrt[5]{2x-3}+1) -  \arctan\sqrt[5]{2x-3}\right] +c$$

I introduce shift $t^5=2x -3$,but it doesn't help $$\int \frac{2\sqrt[5]{2x-3}-1}{\left(2x-3\right)\sqrt[5]{2x-3}+\sqrt[5]{2x-3}}dx$$


Can you help me understand why this happens: $ echo [023456789] [023456789]  $ echo [0123456789] 1  With your feedback, I'm hoping I can figure out how to write a bash script that can take an argument with the value of [0123456789] and assign that literal string to a variable.

$ a='"apple","ball","cat"' $ a='['$a $ echo $a ["apple","ball","cat" $ a=$a']' $ echo $a b   I'm stumped hard by the result b while I expect to see ["apple,"ball","cat"]. What am I missing here?  This is from bash shell on Mac. Also see it on CentOS 7, while not on Fedora. Can someone please explain?


Can someone explain what each step in this does?   I have never seen "for i in X:" used where X is a generator, and I am failing to understand how the i interacts with the function if it's not being inserted between the ().   def fib():     a, b = 0,1     while True:         yield b         a,b = b, a + b for i in fib():     print(i)

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


There are always going to be those low quality questions that have a few gaps in the question and are quite often down-voted for this reason.  A few times I have tried to understand these poor (often down-voted) questions and thought I may know what they are trying to say, but potentially English as a 2nd or 3rd language has been a barrier to a good explanation of the question.  A few times now I have made a few assumptions and explained these assumptions in an attempt to give info in an answer I think might be helpful.  So my question is: Is it bad practice to make assumptions about missing information in order to give an answer I think could help the OP?  In a few cases now I've been down-voted for my answer and told that it's not what the OP is asking for.  Update after being marked duplicate  I have been told my question is a duplicate question for "excessive comments trying to get the OP to display more information" and another question about waiting for OP edits before posting an answer.  My question is more about posting an answer with assumptions whether or not there are comments or other answers.  I'm happy to accept that "Making assumptions on poorly written questions is indeed bad practice" is the most likely answer to my question, but I'm keen to keep it open for others to comment on their thoughts.

Let's say that there is a question asked in a bad manner, in a way that the question is missing. For example the user shows the code and doesn't explain very well which is the problem.    Usually someone starts digging in the OP mind posting comments and asking him for details. It may happen that the question gets edited and the OP edits it to a valid question.    Do you usually give the OP time to edit the question or you immediately vote to close it?


Both apt-get update and upgrade hang:  sudo apt-get update [sudo] password for xxx:  0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::17)]   I'm able to ping archive.ubuntu.com:  ping archive.ubuntu.com PING archive.ubuntu.com (91.189.88.162) 56(84) bytes of data. 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=1 ttl=50 time=42.2 ms 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=2 ttl=50 time=42.1 ms 64 bytes from yukinko.canonical.com (91.189.88.162): icmp_seq=3 ttl=50 time=42.1 ms ^C --- archive.ubuntu.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 42.169/42.206/42.265/0.240 ms   I checked , and I don't think its the same issue.  Any tips for investigating this further?

I am using Ubuntu 16.04 Beta 2 at the moment and every time I try to update at home via sudo apt-get update or upgrade trough sudo apt-get upgrade I wont get any feedback. Even installing of anything will have the same result. It will just "hang up" on 0% while fetching data.  $ sudo apt-get update [sudo] password for niclas:  0% [Connecting to archive.ubuntu.com (2001:67c:1560:8001::11)] [Connecting to archive.canonical.com (2001:67c:1360:8c01::1b)]   I have no idea how to solve the problem. I already tried to ping6 archive.ubuntu.com with 100% packet loss while just ping wont have any loss.  I changed the DNS-Server (IPv4 & IPv6) to Google's one no solution either.


Let $$0,0,1,0,0,1,0,0,1,...$$ be a sequence. What is the general term of this sequence?

$a_{n,3}$     $$1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,1,0,0,\cdots \cdots $$   $a_{n,5}$     $$1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,\cdots \cdots $$   $a_{n,7}$     $$1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,\cdots \cdots $$   $$\vdots $$  $a_{n,2k+1}$     $$1,\cdots \cdots\cdots \cdots,1,\cdots \cdots\cdots \cdots,\overbrace{1,\cdots \cdots\cdots \cdots}^{2k+1},1,\cdots \cdots\cdots \cdots,1,\cdots \cdots$$   I found  $$a_{n,k}= \left \lfloor \left | \cos\frac{\pi (n-1)}{2k+1} \right | \right \rfloor$$ but this term include abs and floorfucntion.  I mean i want the General Term without abs and floorfucntion.(plus sum)  Any hints will be appreciated, thank you.


I want to take a passport photo by myself but I do not know what I should pay attention to. Where can I find the formal requirements for a passport photo?

I need to print some passport-sized photos for visa applications. They each need to be 35mm x 45mm.  Is there an easy way to take a single photo of my face and create a new jpeg file from it that I can just print in 6"x4" and have several passport photos on it in the right size that I can just cut out?


I know: Never do your own crypto. But this question is just theoretical.  Assume you do a Diffie-Hellman Key Exchange with a server to produce a shared secret $x$. Then use a cryptographic hash function like SHA3 to generate a pseudorandom bitstream like this:   $$p_i = \operatorname{SHA3}(x||p_{i-1}).$$  To encrypt $i$th packet of data, labelled $m_i$, compute  $$c_i = m_i \oplus p_i.$$  I realize that the key stream for a OTP must be completely random to ensure perfect secrecy, but would this scheme at least be as hard to break as the underlying hash function or Diffie-Hellman?  In my opinion, it should be, but I'm new to cryptography.  Since the shared secret is only used for one session, assuming the hash function is a random oracle, no keystream is ever used twice. By including $x$ in every $p_i$ an attacker has to break (not only find a collision) the first sent packet in order to decrypt the rest of the session, breaking any other packet will most likely be a collision and not give away the needed $x$, only the content of this packet. Also, breaking any packet requires at least plaintext knowledge but it gives you only this particular hash, not the previous/next hashes.

A few years ago I devised a symmetric-key system that worked like so:  H()   = some hashing function h     = the number of bits in the result of H() key   = bits to be used as a key ^     = the XOR operation +     = concatenation len() = the length function (in bits)  max = ceiling(len(cipertext) / h) pad = pad_0 + ... + pad_max pad_0 = H(key) ^ H(plaintext) pad_n = H(pad_(n-1)) cipherpart_n = plaintext_n ^ pad_n ciphertext = H(plaintext) + cipherpart_0  + ... cipherpart_max   Basically, it builds up a "pad" based on the hash of the message and hash of the key and XORs the message against it.  I am not actually an expert, so I was wondering why an approach like this isn't very common.


I wonder is it possible to set Login IP Ranges using Apex code? Is there any api for that?

Is it possible to insert to Login IP ranges via apex?


Is there any way to make link in the bibliography to cross-references?  Consider the following MWE:   \documentclass{article} \usepackage{hyperref} \usepackage[backend=bibtex8]{biblatex}  \usepackage{filecontents} \begin{filecontents*}{bibliography.bib} @inproceedings{contribution1, title={A contribution on D. de Palmas}, author={Squarepants, SpongeBob}, pages={1--8}, crossref={conf1} } @proceedings{conf1, editor={de Palmas, Brian}, title={Proceedings of the 1st Conference on Me}, booktitle={CoM1}, year=2006 } @inproceedings{contribution2, title={A second contribution on D. de Palmas}, author={Squarepants, SpongeBob}, pages={48--82}, crossref={conf2} } @proceedings{conf2, editor={de Palmas, Brian}, title={Proceedings of the 2st Conference on Me}, booktitle={CoM2}, year=2007 } \end{filecontents*} \bibliography{bibliography}  \begin{document} The first contribution \cite{contribution1} was published in the greatest conference \cite{conf1}. A second contribution also exists \cite{contribution2},  but I won't cite its conference. \printbibliography \end{document}   which produces the following :    If I remove  \usepackage[backend=bibtex8]{biblatex}   and replace  \printbibliography   by   \bibliographystyle{alpha} \bibliography{bibliography}   in the previous example, I get:   Now if you compare the entry [2] / [Squ06], you may notice that the full reference of the conference is not cited again, but linked with plain biblatex. Is there any way to mimic this behaviour with biblatex?

When producing a bibliography using biblatex and the alphabetic style, I would like to produce actual cross-references between two crossref-entries.  For example, if I have several @inproceedings entries that define crossref={proc} and I have a matching @proceedings entry, I would like to generate something along the lines of:     [Aut13a] Test Author. “Testing the second Title”. In: [EE13], pp. 10–20.      [Aut13b] Test Author. “Testing the Title”. In: [EE13], pp. 1–10.      [EE13] Senor Editor and Senora Editora, eds. My Proceedings. Any Publisher, 2013.   But the only result I am achieving so far is:     [Aut13a] Test Author. “Testing the second Title”. In: My Proceedings.                 Ed. by Senor Editor and Senora Editora. Any Publisher, 2013,                 pp. 10–20.      [Aut13b] Test Author. “Testing the Title”. In: My Proceedings. Ed. by                 Senor Editor and Senora Editora. Any Publisher, 2013, pp. 1–10.      [EE13]   Senor Editor and Senora Editora, eds. My Proceedings. Any                 Publisher, 2013.   This is actually the same question as  but the proposed answer there is just a work-around which would be very tedious for my rather large bibliography file.  The behavior described above is standard BibTeX behavior for the alpha style, AFAIK.  So I suspect this is just one of the approximately 10,000 configuration options of biblatex and I'm simply not aware of how to do it ;-) To get you guys going, here is an MWE:  \documentclass[]{article}  \usepackage[backend=biber,style=alphabetic]{biblatex} \usepackage{filecontents}  \begin{filecontents}{my.bib} @inproceedings{inproc1,     Author = {Test Author},     Crossref = {proc},     Pages = {1--10},     Title = {Testing the Title}}  @inproceedings{inproc2,     Author = {Test Author},     Crossref = {proc},     Pages = {10--20},     Title = {Testing the second Title}}  @proceedings{proc,     Editor = {Senor Editor and Senora Editora},     Publisher = {Any Publisher},     Title = {My Proceedings},     Year = {2013}} \end{filecontents}  \addbibresource{my.bib}  \begin{document} Test \cite{inproc1} and \cite{inproc2} \printbibliography \end{document}


Is it possible to get the expiration time of a specific cache? I was hoping to find something like this:  HttpRuntime.Cache(key).ExpireTime

Is it possible to get the expiry DateTime of an HttpRuntime.Cache object?  If so, what would be the best approach?


Both my girlfriend and I play on the PS4 at home, so there are 2 profiles on PS4. When we set our profile in PS4, we set the console as the primary console.  Now we want to buy PSN Plus subscription, and I want to know if the same subscription can be used in both profiles, or  only in one.   In case the same subscription can be used in both profiles, how can we set it up? Or is automatic?

I just purchased a new ps4 and found out that PlayStation Plus is required for online gameplay. My ps4 is shared with someone else at home so I want to ask if one PlayStation Plus subscription can be shared between multiple psn accounts on the same machine?


I have following problem. If I generate anhor "load_more_btn" via ajax then click function (the one with alert('test') ) wont work. Why is this happens and how to solve this problem?

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.


Let $M$ be a finitely presented $A$-module and $S \subset A$ be a multiplicative set. Hence have a surjective map $f:A^{\oplus n} \rightarrow M$  Let $S^{-1}M$ be a free $S^{-1}A$-module. Then we have an isomorphism $S^{-1}f:(S^{-1}A)^{\oplus n} \rightarrow S^{-1}M$.  Is it true that $S^{-1}$ker($f$)=Ker($S^{-1}f$)?  I think $"\subseteq"$ holds true but I am not sure about the other inclusion.

I'm again in this awfully familiar situation where I'm struggling to prove simple statements mostly because I have no idea how a template of a proof should look like in this specified context.   I'm trying to prove these two statements:   Given a multiplicative subset of a ring $S \subset R$.  The localization functor from $R-Mod$ to $S^{-1}R-Mod$ defined by: $$M \mapsto S^{-1}M ,\phi \mapsto S^{-1}\phi=(\frac{m}{s} \mapsto \frac{\phi(m)}{s}) $$ Preserves homology of all complexes.  Let $A \to B \to C$ be a complex in $R-Mod$. If all localization by prime ideals $\mathfrak p \subset R$ make $A_{\mathfrak p} \to B_{\mathfrak p} \to C_{\mathfrak p}$ exact in $R_{\mathfrak p} -Mod$ then $A \to B \to C$ is itself exact.     My actual problem with both questions is that i keep getting confused by torsion elements of the modules and if annhilators intersect the multiplicative set i'm stuck altogether...  I think it's a partly language barrier so I would be really thankful if whoever answers this question will give a detailed answer that would demonstrate a correct and elegant use of the relevant language and tools in this context.