I am a digital marketing freelancer and I am starting to design my own logo. I would like to use two different fonts available onGoogle Fonts: "Poiret One" and "Syncopate". Therefore, I want to know if I am allowed to use them as a professional resource for my own professional career, or should I buy them instead?

I am creating a logo and would like to use the Google Font 'Lato', can I use this font in my logo design or are there copyright/limitations I need to worry about? I can't find anything online other than that it is an open source font that can be used in anyway you want (maybe that's my answer but I just want to make sure). Also, is it a bad idea to use a web-based font for a logo?


I have one table called forms and one table called categories. They have a many-to-many relationship through a category_form as pivot. The pivot table has form_id and category_id So each form can have many categories and every category can be attached to many forms. I need to aggregate this data somehow. What I need is a comma separated list of category id's in a column for each form. Like this: FORMS id  | name | categories  1   | f1   | 1,4,7 2   | f2   | 1 3   | f3   | 1,6,8,9  What would be an effective way of doing this?

Using MySQL, I can do something like:  SELECT hobbies FROM peoples_hobbies WHERE person_id = 5;   My Output:  shopping fishing coding   but instead I just want 1 row, 1 col:  Expected Output:  shopping, fishing, coding   The reason is that I'm selecting multiple values from multiple tables, and after all the joins I've got a lot more rows than I'd like.  I've looked for a function on  and it doesn't look like the CONCAT or CONCAT_WS functions accept result sets.  So does anyone here know how to do this?


Will arrive in Dublin Airport at 10:20AM and need to find our way to the Direct Ferries Terminal. Our ferry leaves at 2:30PM and should arrive an hour before departure. What would be the best mode of transportation? Cheapest?

Are there any sensible ways to get from Dublin Airport to the Dublin Ferryport, without going via the city centre? Both are to the north of the city centre, so one might naively expect there to be an option. (That's no guarantee though!)  I've tried having a look on the , but that didn't mention anything about the Ferry Port, just Dublin itself and other towns/cities in Ireland. Since the airport buses carry a premium, and a trip via the city centre involves two sets of traffic, it'd be ideal to avoid having to go Airport -> City -> Ferry Terminal, if sensibly possible.


I designed simple AI for 3x3 Tic Tac Toe game. However I didn't want to do neither complete search, nor MinMax. Instead i thought of a heuristic that would evaluate values for all of 9 fields, and then AI would choose the field with highest value. The problem is, I have absolutely no idea how to determine, whether it is a perfect (unbeatable) algorithm.  And here are the details: Every Field has several WinPaths on the grid. Middle one has 4 (horizontal, vertical and two diagonals), corners have 3 each (horizontal, diagonal and one vertical), sides have only 2 each (horizontal and vertical). Value of each Field equals sum of its WinPaths values. And WinPath value depends on its contents:   Empty: [ | | ] - 1 point One symbol: [X| | ] - 10 points // can be any symbol in any place Two different symbols: [X|O| ] - 0 points // they can be arranged in any possible way Two identical opponents symbols: [X|X| ] - 100 points // arranged in any of three ways Two identical "my" symbols: [O|O| ] - 1000 points // arranged in any of three ways   This way for example beginning situation has values as below:   3 | 2 | 3  ---+---+---  2 | 4 | 2  ---+---+---  3 | 2 | 3    However a later one can be like this (X is moving now):   X | 10| O ---+---+---  O | O |110 ---+---+---  X | 20| 20   So is there any reliable way to find out whether is this a perfect algorithm, or does it have any disadvantages?  PS. I was trying (from the perspective of player) to create a fork situation so I could beat this AI, but I have failed.

In a tic-tac-toe implementation I guess that the challenging part is to determine the best move to be played by the machine.  What are the algorithms that can pursued? I'm looking into implementations from simple to complex. How would I go about tackling this part of the problem?


I am very new to the programming language and noticed that when we use the following print function, it prints what we need to print("hello world") however, I then tested this out with using only single quotes such as the example down below print('hellow world') is there a correct way that is recommended since both of them work the same? Is there something I need to know such as when to use single or double quotes for this programming language? If so, please let me know.

According to the documentation, they're pretty much interchangeable.  Is there a stylistic reason to use one over the other?


I tried to create a MediaPlayer which starts and stops on the same button, like this:  public void song1(View view){         if(mp.isPlaying() == true){         mp.pause();     }else{         mp = MediaPlayer.create(this, R.raw.song1);         mp.start();     } }   But my app crashes if I try to click on the Button, so I souroundet it with try and Catch like this:  public void song1(View view){         try{            if(mp.isPlaying() == true){             mp.pause();         }else{             mp = MediaPlayer.create(this, R.raw.song1);             mp.start();         }     }catch (Exception e){             e.printStackTrace();         }     }   Here is the Logcat:   W/System.err: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.media.MediaPlayer.isPlaying()' on a null object reference  W/System.err:     at com.example.exampleapp.MainActivity.sound1(MainActivity.java:129)  W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  W/System.err:     at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)  W/System.err:     at android.view.View.performClick(View.java:5264)  W/System.err:     at android.view.View$PerformClick.run(View.java:21297)  W/System.err:     at android.os.Handler.handleCallback(Handler.java:743)  W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)  W/System.err:     at android.os.Looper.loop(Looper.java:150)  W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5621)  W/System.err:     at java.lang.reflect.Method.invoke(Native Method)  W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)  W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)  I/HwSecImmHelper: mSecurityInputMethodService is null   What does this error mean? And how can I solve it?

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?


here is my shell script, I tried to catch the failing command and print the its result: myfunc() {   $1   uptime    echo "-------------------------------------"      EXIT_STATUS=$?   if [ ! "$EXIT_STATUS" = "0" ]; then     echo "Exit on failure"   else     echo "Exit on success"   fi }  myfunc pwd myfunc failfail  which results in: /root  15:19:54 up 15:43,  3 users,  load average: 0.01, 0.09, 0.09 ------------------------------------- Exit on success test2.sh: line 4: failfail: command not found  15:19:54 up 15:43,  3 users,  load average: 0.01, 0.09, 0.09 ------------------------------------- Exit on success  which second time should print Exit on failure, I tried with set -e but actually it exit the code and not continue to if else statement.

What is your favorite method to handle errors in Bash?  The best example of handling errors I have found on the web was written by William Shotts, Jr at .   He suggests using the following function for error handling in Bash:  #!/bin/bash  # A slicker error handling routine  # I put a variable in my scripts named PROGNAME which # holds the name of the program being run.  You can get this # value from the first item on the command line ($0).  # Reference: This was copied from <http://www.linuxcommand.org/wss0150.php>  PROGNAME=$(basename $0)  function error_exit {  #   ---------------------------------------------------------------- #   Function for exit due to fatal program error #       Accepts 1 argument: #           string containing descriptive error message #   ----------------------------------------------------------------       echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2     exit 1 }  # Example call of the error_exit function.  Note the inclusion # of the LINENO environment variable.  It contains the current # line number.  echo "Example of error with line number and message" error_exit "$LINENO: An error has occurred."   Do you have a better error handling routine that you use in Bash scripts?


I don't know how to start.  L.C=0.1 s n=20  T=20  then for 20 oscillation=20 seconds time period for 20/20*1/10=0.1 time period (1-0.1)/0.1*100=90% (wrong)

I am 99% sure that the calculation to obtain the uncertainty of two multiplied values given by my textbook and  is incorrect. They both say this: $$(A \pm a)(B \pm b) = AB \pm (\varepsilon_A + \varepsilon_B)$$ Which should be equivalent to (correct me if I'm wrong): $$(A \pm a)(B \pm b) = AB \pm \left(AB \left(\frac{a}{A} + \frac{b}{B}\right)\right) = AB \pm (Ba + Ab))$$ Lets consider: $(4 \pm 1)(2 \pm 1)$ This should equal ($8 \pm 6$) right? meaning the smallest value possible is 2 while the largest is 14. However we can see that the largest possible value is actually $15$ ($5 \cdot 3$) and the smallest is $3$ ($3\cdot1$). If this is plot on a 3D graph you will see there is no way to obtain lower or larger values than 3 and 15. Therefore there must be a problem with the formula. After some math I came up with the following equation which I believe is the correct equation: $$(A \pm a)(B \pm b) = (AB + ab) ± (Ab + Ba))$$ As long as $A \ge a$ and $B \ge b$ and $a, b \ge 0$. Is the equation in the textbook (and given by this university) incorrect or have I just missed something?


a) Let $G_1$ and $G_2$ be groups, each with exactly one element. Show $G_1\cong G_2$. b) Let $G_1$ and $G_2$ be groups, each with two elements. Show $G_1\cong G_2$. Does this statement also hold for three elements? And for four?  a) Let $g_1$ be the element in $G_1$, and $g_2$ the element in $G_2$. Let $f\colon G_1\to G_2$ be defined as f(g_1)=g_2. We know that $g_1$ and $g_2$ are the neutral elements in $G_1$ and $G_2$ respectively. So $f(g_1g_1)=f(g_1)=g_2=g_2g_2=f(g_1)f(g_1)$. b) The same kind of reasoning can be applied for the case of 2 elements (where we have a neutral element, and an element $a\in g_1$ which is its own inverse). For three elements, we could consider $e,a,b\in g_1$, with either $a^{-1}=b$, or $a^2=b^2=e$. This still seems doable for me to check. However, how am I supposed to consider the case of 4 elements? Should I still list all possibilities and check if there exists an isomorphism? Or can this be done more quickly? EDIT Based on the comments below and some help from the chat: There is only one group with three elements, because we can't have that $aa=e$, otherwise we would have that $aa=ae=e$, which would mean that $a=b$. I've considered the groups $\mathbb Z/4\mathbb Z$ and $(\mathbb Z/2\mathbb Z)\times(\mathbb Z/2\mathbb Z)$. I won't write out their Cayley tables, but it is clear that these are not isomorphic groups. I think the most telling property is that for each $\overline x\in(\mathbb Z/2\mathbb Z)\times(\mathbb Z/2\mathbb Z)$, we have that $\overline x+\overline x=e$, however, for $\mathbb Z/4\mathbb Z$ this is not the case (consider: $\overline 1+\overline 1=\overline 2\neq\overline 0$). Back to the Cayley table: these two groups are never the same on the diagonal, no matter how you order their elements.

Not sure how to make tables, but:  For a binary operation $*$, and set $\{e,a,b,c\}$, in the Cayley table, $a*a$ can be filled with either the identity or an element different from both $e$ and $a$. If in the table the place for $a*a$ is filled with $e$, then the rest of the table can be filled out in two different ways.  What are the two different ways?  Thanks


The Shading preview stoped showing what it should. Instead it shows a weird reflexion of the background as you can see in the following pictures: The first one shows the model using the solid preview  The second one shows what it looks like when I try to see the material preview  The third one shows what i see when I move the camera a little (pressing the middle mouse button and dragging)  This issue is not exclusive to this project, but happens on every other project too. This also happens if I open a new project that only contains a cube. I have let a friend of mine run the foosball model and it worked on his computer, so it has to be a problem with my PC or any blender files on my PC. It used to work on it perfectly, but after some time, it didn't anymore. I've tried the following: Uninstalled Blender. Cleaned temporary and registry files with CCleaner Updated my graphics card's software to the newest version (AMD Radeon R9 380X, version 20.12.1) Restarted my PC Reinstalled Blender. It didn't solve the problem. Can anyone help me out? Thank you in advance.

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I've had vlc, audacious working very well on my ubuntu 14.04. All of a sudden today I noticed that they're both gone. Also my default Ubuntu video player has stopped playing because of missing dependencies. But when it prompts me to install the dependencies, I get this message:      The following packages have unmet dependencies:  gstreamer1.0-libav: Depends: libavcodec-extra-54 (>= 6:9.13) but 6:9.16-0ubuntu0.14.04.1 is to be installed                     Depends: libavformat54 (>= 6:9.1-1) but 6:9.16-0ubuntu0.14.04.1 is to be installed                     Depends: libavutil52 (>= 6:9.1-1) but 6:9.16-0ubuntu0.14.04.1 is to be installed                     Depends: libc6 (>= 2.14) but 2.19-0ubuntu6.5 is to be installed                     Depends: libglib2.0-0 (>= 2.37.3) but 2.40.2-0ubuntu1 is to be installed   I tried to sudo apt-get install vlc  I also get:  The following packages have unmet dependencies:  vlc : Depends: vlc-nox (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed        Recommends: vlc-plugin-notify (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed        Recommends: vlc-plugin-pulse (= 2.1.4-0ubuntu14.04.1) but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I've tried all these commands but couldn't work :  sudo apt-get update && sudo apt-get -f install sudo apt-get install --fix-broken sudo apt-get autoclean sudo apt-get autoremove   I don't know what exactly I did that caused this issues. Please I need help I cant play any video.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


Sorry, for my naivety this is my first time posting here. But, my question is that will the bulb offer any resistance after it's fused? I know that no current can flow though the fused bulb i.e. $I=0$. That makes $R = V/0$ undefined. And voltage and total resistance stay the same, right? So, shouldn't the rest of the bulbs in the circuit get brighter? But that isn't the case and it turns out that the potential difference of the circuit decreases (to nullify the voltage increase on the other bulbs). I'm very confused here, please help. Thank you.

Does a filament lamp still have resistance when no current flows?


This is a slightly esoteric question, but I was curious whether the following class extension pattern is legal (as in, does not constitute UB) in modern C++ (for all intends and purposes I am fine with restricting the discussion to C++17 and later).   template<typename T> struct AddOne {     T add_one() const {         T const& tref = *reinterpret_cast<T const*>(this);         return tref + 1;     } };  template<template<typename> typename  E, typename T> E<T> const& as(T const& obj) {     return reinterpret_cast<E<T> const&>(obj); }   auto test(float x) {     return as<AddOne>(x).add_one(); }  auto test1(int x) {     return as<AddOne>(x).add_one(); }  // a main() to make this an MVCE // will return with the exit code 16 int main(int argc, const char * argv[]) {   return test1(15); }   The above code is a complete example, it compiles, runs and produces the expected result with at least clang in C++17 mode. Check the disassembly code on compiler explorer:   My interpretation is as follows: the standard states that reinterpret_cast can convert between pointers/references of any types, but that accessing there resulting references might be UB (as per to aliasing rules). At the same time, converting the resulting value back to the original type is guaranteed to yield the original value.   Based on this, merely reinterepting a reference to float as a reference to AddOne<float> does not invoke UB. Since we never attempt to access any memory behind that reference as instance of AddOne<float>, there is no UB here either. We only use the type information of that reference to select the correct implementation of add_one() member function. The function itself coverts the reference back to the original type, so again, no UB. Essentially, this pattern is semantically equivalent to this:  template<typename T> struct AddOne {    static T add_one(T const& x) {       return x + 1;    } };  auto test(float x) {   return AddOne<Int>::add_one(x); }   Am I correct or is there something I miss here?  Consider this as an academic exercise in exploring the C++ standard.   Edit: this is not a duplicate of  since that question does not discuss casting this pointer or using reinterpret_cast to dispatch on the reinterpreted type.

I am little confused with the applicability of reinterpret_cast vs static_cast. From what I have read the general rules are to use static cast when the types can be interpreted at compile time hence the word static. This is the cast the C++ compiler uses internally for implicit casts also.  reinterpret_casts are applicable in two scenarios:   convert integer types to pointer types and vice versa  convert one pointer type to another. The general idea I get is this is unportable and should be avoided.     Where I am a little confused is one usage which I need, I am calling C++ from C and the C code needs to hold on to the C++ object so basically it holds a void*. What cast should be used to convert between the void * and the Class type?  I have seen usage of both static_cast and reinterpret_cast? Though from what I have been reading it appears static is better as the cast can happen at compile time? Though it says to use reinterpret_cast to convert from one pointer type to another?


Everything in math can be perfectly defined or formalized. And we could derive logical conclusions from that. However, mathematicians still use human natural language to solve their theorems.  Why isn't automatic proof checking or automated theorem solving the kernel of math?

There are many theorems in mathematics that have been proved with the assistance of computers, take the famous  for example. Such proofs are often controversial among some mathematicians. Why is it so?  I my opinion, shifting from manual proofs to computer-assisted proofs is a giant leap forward for mathematics. Other fields of science rely on it heavily. Physics experiments are simulated in computers. Chemical reactions are simulated in supercomputers. Even evolution can be simulated in an advanced enough computer. All of this can help us understand these phenomena better.   But why are mathematicians so reluctant?


I just moved from RH/Fedora to Ubuntu 12.04.  In RedHat, when I reopen a file with VIM, it opens with the cursor on the line it was on when I closed the file.  However, what I am seeing now is that when I reopen a file, the cursor is always at the top, every time.  As some of the files I am working with are 20k lines long, this gets a bit old quickly.  I installed the full version of VIM via apt-get on my new Ubuntu so that I could use the arrow keys in insert mode.  The version that is printed out is VIM - Vi IMproved 7.3.  Any help at all would be gratefully welcomed.

My Ubuntu LTS 12.04 has vim editor. If I open a file, move to a paragraph and reopen vim, then the cursor goes to beginning of the file always.   This is not the expected behavior.  How the vim can remember last read position after closing a file?  I tried vi also, but the result is the same.


There is a man of the roof  A man is on the roof  both sentence are giving information.  my questions is why we use introductory subject?

I want to discuss the structure of ''There are/is''. First of all, what is the difference between:  There are three children.  and  Three children exist.  Do they have the same meaning? And secondly, In my native language, we would say that  Üç çocuk vardır.  "Üç çocuk" = Three children, "var" = existence (something  that exists, a being), and "dır" is a copula. So basically, this structure is not different from -for example- ''three children is a car''. ''a car'' and ''existence'' have the same function. But ın English, that structure that I have mentioned is confusing for me. I know that you are all used to it. Some can say ''What's the problem with that? It is just ''there are'' and ''there is.'' ''. I realize that I still did not ask a question. Well, let me try to ask a good one, I guess. Normally, ''there'' means a place where I am not in that place. Is there any relevance between ''there'' that means a place where I am not in that place AND ''There'' that is used in the structure of ''There are/is''? What kind of structure is this? By the way, I am new in English. Please excuse my naive usage of language. What do you think about it?


Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


Is there any benefit in typedef-ing the same identifier as shown below:  typedef struct Struct_name {   //something.... } Struct_name;   I have come across this style mostly with struct

I have seen many programs consisting of structures like the one below  typedef struct  {     int i;     char k; } elem;  elem user;   Why is it needed so often? Any specific reason or applicable area?


In numpy, there exists some slicing operation like a[1:3,3:5], however I am confused with the operation a[:] and a[...],I am a novice at python, can anyone explain what's the difference between these?

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


What is the definite integral $\displaystyle\int_{-1}^1 \frac{1}{x} dx$ equal to?  Is it $0$ like it would be if you just integrated and plugged in the bounds, or does the discontinuity at $x=0$ invalidate that line of reasoning and make this integral undefined. If you split up the integral $$\int_{-1}^0 \frac{1}{x} dx+\int_{0}^1 \frac{1}{x} dx.$$ You get $\infty-\infty$ which is undefined. I find it difficult to prove either of these solutions.


I'm having a little trouble with this problem -   Find all z such that $z^7=(z+1)^7$.  I've moved $(z+1)$ to the other side to obtain $(\frac {z}{z+1})^7=1,$ but I'm not sure how to carry on. I've tried converting to complex exponential form, but how would I simplify and solve? Thanks!

Find all $z$ for the equation   $$(z+1)^7 = z^7$$    The different solutions can be unsimplified and both rectangular or exponential. I have the lead that I subsitute the $z+1$ term with a root of unity. Then, I got lost when I looked at that $z^7$. A thorough explanation would be great!


is a Server-based VOIP Phone system that is usually run on Linux, and usually run on a network.  I have seen posts for Asterisk in ServerFault, StackOverflow, and SuperUser.  I even saw one post somewhere in those sites (sorry, I can't remember where and cannot find it in my history) where there was a debate about whether the user's Asterisk question ought to be posted in SuperUser or ServerFault.   is an Asterisk question migrated from SuperUser to ServerFault.    is a comment on StackOverflow, by a rep of 635 where the user was told his question would be better asked on SuperUser or ServerFault.  Hence, my question, what is the most relevant Q&A site for this, ServerFault, StackOverflow, or SuperUser?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I tried many idea from ubuntu 13.04 support, googling but cant found better support.  I want to install graphics driver as mention in title, but dont know how?  I have Zotac Nvidia Geforce G210 1GB DDR3 Graphics card with core 2 duo E4400 2 Ghz processor and 3 GB ram.  I downloaded driver from official site  and that's driver comes with .run extension.  I tried all execution (right click and change permission as execute something).  Also I tried this link support ""  So please help me on "how to install this driver".  Thanks in advance.  Krunal

I've just installed Ubuntu and I need either video, wireless, or some sort of other manufacturer (non-opensource) driver. How can I run the tool that will fetch all of these for me? I'd like graphical instructions.  Related:


Since inertia is the quantity that resists change in motion, and is represented by mass, and if two different objects are dropped from the same height, shouldn't the heavier mass accelerate less than the one with the lesser mass, since it has a greater inertia?

I'm far from being a physics expert and figured this would be a good place to ask a beginner question that has been confusing me for some time.  According to Galileo, two bodies of different masses, dropped from the same height, will touch the floor at the same time in the absence of air resistance.  BUT Newton's second law states that $a = F/m$, with $a$ the acceleration of a particle, $m$ its mass and $F$ the sum of forces applied to it.  I understand that acceleration represents a variation of velocity and velocity represents a variation of position. I don't comprehend why the mass, which is seemingly affecting the acceleration, does not affect the "time of impact".  Can someone explain this to me? I feel pretty dumb right now :)


I'm getting into java multithreading, and decided to solve a more complex problem, but with little success so far.  I have a production line of workers that will try to get work (create a product) from a list:   i'm using executors to generate the worker threads; each product creation implies the completion of a set of Tasks; each Task has an associated time an resources it needs: exclusive access to each resource is needed, meaning it is impossible to use one in the creation of two products simultaneously.   The concurrent access to the work list was solved with notify-wait:  public class ProductionRequestQueue extends LinkedList<ProductionRequest> {  public ProductionRequestQueue() { }  public synchronized void push(ProductionRequest productionRequest) {     this.add(productionRequest);     notifyAll(); }  public synchronized ProductionRequest pull() {     while (this.size() == 0) {         try {             wait();         } catch (InterruptedException e) {         }     }     return this.removeFirst(); }}   The problem is when i need to guarantee exclusive access to the resources. I have a list of the available resources in the production line, but i need to guarantee access to the resource it self and not the list. My workers does:  public Product createProduct(ProductionRequest productionRequest) {     Product product = ProductionLine.products.get(productionRequest.getProductId());     product.create();     return product; }  @Override public void run() {     ProductionRequest productionRequest;     while (!productionRequestQueue.isEmpty()) {         productionRequest = productionRequestQueue.pull();         createProduct(productionRequest);         System.out.println(productionRequest + " is being manufactured by " + this);     } }   Then i have a class that relates the resource with the time, where it simulates the production process by sleeping the thread:  public ResourceTime(Resource resource, int time) {     this.resource = resource;     this.time = time; }  public void execute() {     synchronized (this.resource) {         Thread thread = new Thread(this);         thread.start();     } }  @Override public void run() {     try {         System.out.println(toString());         Thread.sleep(Integer.valueOf(time));     } catch (NumberFormatException e) {         e.printStackTrace();     } catch (InterruptedException e) {         e.printStackTrace();     } }   I thought that the syncronized block would guarantee exclusive access to the resource, but i keep getting a null pointer exception:  Exception in thread "pool-1-thread-2" java.lang.NullPointerException at production_line_sim.models.Worker.createProduct(Worker.java:14) Any thoughts about this?   Also, how can i demonstrate that the synchronized block guarantees exclusive access to each resource?  I think this solution may lead to a situation where some threads may not be able to access the resource, and some kind of fairness algorithm might be needed, can someone pinpoint me on how to do this?

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?


find the number of ring homomorphism from $\mathbb Z_{12}$ to $\mathbb Z_{28}$   My attempt :we know that the number of ring homomorphism from $\mathbb Z_m$ into $\mathbb Z_n=  2^{[\phi(n)-\phi(n/\gcd(m,n))]}$ , where $\phi(n)$ denotes the numbers of prime divisors of positive integer n.  so by   formula we get number of ring homomorphism from $\mathbb Z_{12}$ to $\mathbb Z_{28}$ is  $$2^{[\phi(28)-\phi(28/\gcd(12,28))]}= 2^{[\phi(28)-\phi(28/4)]}=2^{[\phi(4 \times 7)-\phi(7)]} =2^{[\phi(4) \times \phi(7)-\phi(7)\times \phi(1)]} =2^{2 \times 6 - 6\times 1}= 2^6$$  Finally i got   $2^6$  answer   is its correct ?

Any homomorphism $φ$ between the rings $\mathbb{Z}_{18}$ and $\mathbb{Z}_{15}$ is completely defined by $φ(1)$. So from  $$0 = φ(0) = φ(18) = φ(18 \cdot 1) = 18 \cdot φ(1) = 15 \cdot φ(1) + 3 \cdot φ(1) = 3 \cdot φ(1)$$  we get that $φ(1)$ is either $5$ or $10$. But how can I prove or disprove that these two are valid homomorphisms?


I was just granted the Association Bonus for a new StackExchange site, as soon as I signed into it.  The purpose was to suggest an answer for a question, and at the bottom of the question, where the answer box is found, I instead was greeted with the message:     protected by ___ 2 hours ago      This question is protected to prevent "thanks!", "me too!", or spam   answers by new users. To answer it, you must have earned at least 10   reputation on this site.   So, there must be another requirement beyond the 10-minimum reputation, but it is unlisted.  What is that other requirement?

I noticed that I can't answer protected questions. I don't want to actually, but it says:        It was , but I also didn't have an ability to answer other protected questions.  I earned 270 reputation points + 100 reputation point bonus. Then I  350 reputation points as a bounty. Then I earned 59 reputation points. Today I started another bounty (50 reputation points), etc – I offered 4 bounties with total 500 rep.  Despite the fact I started from the association bonus, I must have an ability to answer protected questions, as I earned reputation points here. But offered them as bounties.    I now have enough reputation points, but I would like it to be fixed, because I like offering bounties very much.  I would like system to check for my bounties when it checks if I can answer protected question.


My phone is new so I can't root it because I don't wanna void my warranty just yet and trimming my phone would also not make a significant difference. Since most other apps on the Play Store promise to run TRIM only with root access, I don't think it's possible for this app to do so without root but if it can that's the best thing I can get. Can someone please confirm if this app actually works?  Link to the app:

I am not sure if  works. Can someone please help me? My phone is new and in its warranty period so I can't root it yet. I tried this app but I am not sure if it actually did something. Unlike the other famous app on the PlayStore for fstrim, it doesn't require root access which is quite incredible.


I created a very long booklet in Indesign which I created in 4000 x 3000 pixels.  I am trying to reduce it by half in pixels so that the size of the file comes down dramatically as I am trying to get it into a size that looks fine and I can email it. At the moment it is 44mb.  If I change the JPG to lower it effects banding on graduated colour images so I'd prefer to reduce the pixel size instead so that I dont get the banding.  I have been trying to fiddle around with alternative layout but it seems to screw it all up.  Many thanks for any help :)

Is there a way when exporting a .psd as a .pdf to make the file smaller?   My client always has me work in Photoshop and send them finished work as .pdf's, but they say the files are too big. These products are eventually printed out, so while I need to make the files smaller, they still need to have good quality. Everything is in CMYK mode already. I just don't know a lot about compression and changing file sizes


I have the following list:  x =['Adam', 'G', '24', '1983', 'Aug', 'August Birthday', 'Steve', 'F', '31', '1970', 'Sep', 'sept bday']   I would like to get the above list into another list but in a way I can work with it like this  x = [('Adam', 'G', '24', '1983', 'Aug', 'August Birthday'),('Steve', 'F', '31', '1970', 'Sep', 'sept bday')]  The Pattern is x = [(0,1,2,3,4,5),(0,1,2,3,4,5)] etc....   What is a good way to do this?  I have tried to iterate over the list using a count and after each line adding 1 to the count so I can get to 6 then start count over again, but I am not sure how to get it into the desired list.

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


William Gravesande in  1722 published an experiment in which brass balls were dropped from varying heights onto a soft clay surface. He found that a ball with twice the speed of another would leave an indentation four times as deep.   Some years later,  republished the experiment and proposed that each ball's kinetic energy - as indicated by the quantity of material displaced - was shown to be proportional to the square of the velocity and the deformation of the clay was found to be directly proportional to the height the balls were dropped from, equal to the initial potential energy.  So is kinetic energy inversely (squared) proportional to the quantity of clay displaced or is it proportional to the depth to which the ball will go ? Please provide an explanation not based on experimental data as most of 19th century physicists do. Also are any one of the effects mentioned above due to momentum of the ball ?   i am not asking about diameter and kinetic energy relationships , i am just askin about a derivation for the depth and displaced amount of material relationship with kinetic energy of some object.

I have searched for equations regarding craters and I came across two of them. The first one is from  in the level two section. There, it says that, $$ D^3\propto E $$  where $E$ is the kinetic energy. It is not really an equation as there is a constant of proportionality, $K$, there. That's when I came across a second equation from  that says, $$ D=0.07C_f\left(\frac{g_e}{g}\right)^{1/6}\left(E \frac{\rho_a}{\rho_t}\right)^{1/3.4} $$ where $\rho_a$ is the density of the impactor, $\rho_t$ that of the object, $g_e$ Earth's gravitational acceleration, $g$ the gravitational acceleration of the object, and $C_f$ the collapse factor. So these equations somehow contradict each other.  So I've been searching for the values making up $K$ using these two equations, but I'm wondering, is it possible to find $K$? Or do these equations not relate to each other at all?  I am writing my extended essay on this topic, so I did a 'drop the ball on sand' experiment. Can the more complex equation be used in this case? Also, I'm not sure what crater collapse factor means.


I am editing mesh that has separate pieces but I want want to use proportional editing at a certain thresh hold to edit my mesh, but when I do, other pieces near it (that are not connected) move. What can I do so they won't move?

I have split several chains of vertices into groups in an attempt to access only one chain at a time for modeling, and it seemed to work yesterday. Today I can't isolate them when I use proportional editing. Is there something I need to do differently? Here is the situation: I am building a model of the mountain below (it's on the Moon, so there aren't any files out there with its topographic information, and only one high-resolution photo exists). I have to figure out the relative height of its ridges by judging what the lighting means. So I drag parts of the vertex chains marking the ridges up and down using proportional editing, in right ortho view. The other vertex chains I don't want to move remain visible, otherwise I can't judge their relative position, but I don't want to move them.  Edit - I see now why it sometimes works - the circle marking the edge of the proportional effect is actually a sphere. If it doesn't touch adjacent vertex chains, then it works the way I want.


I'd like to repair and re-use a small Bosch electric screwdriver. It currently has a battery of 3 small AA-type rechargables (unmarked cardboard wrapping) that has almost the same occupancy volume of a single 18650 Li-ion cell. The existing battery pack has an inline diode between the charging contacts and the battery pack.  I know about the risks as shown in .  My key question: I want to re-use the two contacts on the base of the scredriver that connect to the battery for recharging. I have an existing external Li-ion charger (so not use the dumb AC brick that came with the drill). Should I (a) use or (b) explicitly not use a diode between the contacts and the cell for short-circuit protection?   Without a diode, I have a small risk of short circuit if something touches both contacts (small, because the contacts are recessed). With a diode I have a voltage drop that can interfere with the voltage sense of my charger.  I'd prefer not to throw away this otherwise perfectly functional screwdriver, and I'm not sure where to buy the same kind of NiMH battery pack.

I have a rechargeable vacuum cleaner with NiMH batteries, 1800mAh and 14.4 volts, 12 cells. The charger is 18v 200mA. The batteries have now died.  Can I replace the batteries with 4 cell Li-ion in series?   That will be 14.4 volts, if considered 3.7v each. Of course, I know it will be roughly 4 volts when fully charged.  Li-ion batteries in my mind: 18650, 2500mAh.  Also, can I charge them with the same charger?


I'll be honest, yesterday's blog post, , didn't sit well with me. So much so that I decided to comment. My comment represented the very first time I've spoken up about what I've seen going as of late on SO.  Unfortunately, my comment has been awaiting moderation since 06:17 EST on January 23rd.  I believe that we need some documented comment guidelines.  I don't like the idea that a slightly critical, but respectful comment doesn't make it through the moderator filter.  What's the end goal of the blog? Is it simply to disseminate information without critical (in the best sense of the word) interaction? Great...let us know.  It's certainly not lost on me that a comment which discusses trust issues does not get posted.  How about those comment guidelines?  Comment in question:     Recent events have made it difficult to trust the SO team. With that   in mind, publishing content like this, without any information   regarding how this survey was conducted, how the questions were   framed, and to whom the survey was sent (and how those people were   chosen), makes me seriously doubt the results.      I’ve been a member for 8 years and 8 months. I don’t have the highest   rep on the site, but I’ve answered 692 questions, and have a reach of   ~10.4 million people. I didn’t receive the survey, but if I did, I   would have answered “Unwelcoming community” as well, but not for the   reason(s) that this post is indicating.      As a long-time contributor, I feel unwelcome by leadership. The   tremendous effort and care that we as a community have invested to   make SO successful almost seems despised by the current regime. From   the outside looking in, SO appears to be imploding, and the   destruction is blamed on an “unwelcoming community” and   “over-moderation” instead of poor leadership decisions. Odd, isn’t it,   that the unwelcoming community that’s being vilified is what made SO   what it is today?

Since my profile will be deleted in a few hours, this doesn't concern me, but the remaining people may be interested.  We know the already famous post: . One may be surprised that it has too few comments, especially highly negative ones. It seems that the reason is simple: moderation. About 4 hours ago I've written the comment there, but it wasn't published. Since I don't see it "awaiting moderation" anymore and I see much later comments published, it seems to be removed. The comment was along these lines:     There were a lot of things I didn't like in SO: too positively-skewed   reputation changes, generally-accepted reputation farming via   answering duplicates which were asked 10 times, extremely low quality   threshold for questions, "accepted answer" feature implementation, etc. and etc. Looking at the recent changes,   things will become only worse. I'm deleting my profile.   Now, the question is: why was it removed? Is it unfriendly? Sure, but I don't see why it should be friendly: we express our opinions, and my opinion is negative. Is it non-constructive? Well, to some extent, but definitely more constructive than:     Nice! I’m (hopefully) looking forward to passing the 10k mark   If there are rules for commenting (like 2. You DO NOT TALK bad about SO), I think it makes sense to publish them (and give an easily-found link to them in the blog). It also would be interesting to know how comment moderation is organized.


Suppose $R$ be a nonempty set and $+,.$ are binary compositions on $R$ such that (R,+,.) satisfies all the properties of a ring except the commutative property of $+.$ Then   $[(a+b)-(b+a)]=[(a+b)+(-b+(-a))]$ (using distributive law) =$[a+(b-b)+(-a)]=0.$  So $a+b=b+a,\forall~a,b\in R$  Thus we see that commutative property of $+$ is obvious from other axioms.  Why do we need still mention it in the definition of a ring separately?

I was wondering why do some people use redundant axioms in definitions?  If you just expand $(a+1)(b+1)=(a+1)b+a+1=ab+b+a+1$ $(a+1)(b+1)=a(b+1)+b+1=ab+a+b+1$. Hence, $ab+a+b+1=ab+b+a+1$, then cancel ab and 1. Then, you get it's commutative for free.   Why do we then assume it?   Also, is it even stronger. If we drop the condition that 1 is in R, then can we still deduce a+b=b+a? As clearly the argument just done falls apart if you haven't got 1 in R.


When I am in a specific directory, I can run a file in the terminal using the command ./file.  How can I make it so that I can run that file from anywhere using a custom terminal command?

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


How can i prove that $\displaystyle\sum_{k=0}^{n}{2n\choose 2k}=2^{2n-1}$   I tried  using induction and pascal's identity but it didn't help me.

I'm repeating material for test and I came across the example that I can not do. How to calculate this sum: $\displaystyle\sum_{k=0}^{n}{2n\choose 2k}$?


If a player makes an active perception check and it is lower than their passive perception, should we use the passive perception instead?  Background: During our weekly game yesterday the party scout was actively searching for hidden monsters. He rolled poorly and ended up with a 7 on his perception check, seeing nothing. The claim was then made that since his Passive Perception was a 15, he would intuitively notice anything that he didn't actively spot.

So, I'm trying to figure out how to run the scene from the beginning of Lost Mine of Phandelver (5e starter set) where the party is ambushed by goblins and I'm really confused as to how Passive Wisdom (Perception) works.  The included rulebook mentions on page 6 :     When you hide, there’s a chance someone will notice you even if they aren’t searching. To determine whether such a creature notices you, the DM compares your Dexterity (Stealth) check with that creature’s passive Wisdom (Perception) score, which equals 10 + the creature’s Wisdom modifier, as well as any other bonuses or penalties. If the creature has advantage, add 5. For disadvantage, subtract 5. For example, if a 1st-level character (with a proficiency bonus of +2) has a Wisdom of 15 (a +2 modifier) and proficiency in Perception, he or she has a passive Wisdom (Perception) of 14.   So the party is being ambushed by goblins and at that point the DM guide mentions on page 7 :     Check to see who, if anyone, is surprised. [...] Make a Dexterity (Stealth) check for the goblins, rolling once for all of them. Roll a d20, add the goblins' Stealth skill modifier (+6) to the roll and compare the result to the characters' Passive Wisdom (Perception) scores.   So to me this reads like I should roll 1d20+6 for the goblins and compare that to the static Passive Wisdom (Perception) score on the character sheet of a PC. The PCs don't get to roll anything as they're not actively looking for enemies, even though they are investigating the dead horses.  I would also think that if the characters were supposed to roll, the DM guide would clearly instruct so, given that this is the starter set.  However, watching  at around 8:01 I notice that the DM is explicitly asking his party for a perception roll. And the same thing happens on a couple of other videos where people are running the Lost Mine adventure. The DM always requests a roll.  So what gives? Shall I take it that the DMs ask for the roll because they consider the party to be actively seeking for hidden foes? Or am I just misreading the rulebook and the DM guide?


I have this battle point booster that is 80% already activated ,but I want to buy the 400% one to activate it at the same time.  Do they stack?

I received the 80% battle point booster. It has 500 minutes on it and says the booster is only consumed when battle points are earned. Does this mean I can play 500 minutes of matches during a week and earning the bonus points? Or does it wear off in 500 minutes after equipping it?  Also it says my team is granted a 16% bonus. Does this stack? Do i get another 16% if I and another player wears it? Since it's a new item with the present chest it would be wise to use it later if the bonus does not stack.


Is "would" used correctly in these sentences?   I would not be surprised if you would lose.  I would not give you the weapon if you would use it to harm others.

I have been taught to use the if I had form in conditional clauses referring to the past:     If the president had asked me, I would have told him the same thing.   As far as I can tell though, the would have construct is sometimes used in conditional clauses as well, so it wouldn't be incorrect to say:     If the president would have asked me, I would have told him the same thing.   What is the difference between the two and the proper use of the latter?


If I do not roll a 1, and I would like to "hold" my roll. The code ignores the instructions within the "h" bracket conditional statement, and rolls the dice again. I am confused because if I do roll a 1, the code does work and goes to the computer's turn, setting the flags correctly.   while ((humanScore <= 100) && (computerScore <=100))     {         /*loop while human turn is true*/         while ((humanTurn == true) && (computerTurn == false))         {             die = randomGenerator.nextInt(6) + 1;              if(die == 1)             {                 System.out.println("Human, you rolled a 1, you lose your points and your turn.");                 humanTurn = false;                 computerTurn = true;                 points = 0;                 System.out.println("Your score is now " + humanScore);                 System.out.println("Computer, it is now your turn.");             }              else if(die != 1)             {                 System.out.println("Human, you currently have " + points + " points to add to score.");                 System.out.println("You have rolled a " + die + " would you like to hold, or roll again?");                 System.out.println("Please enter either r to roll, or h to hold.");                 points = points + die;                 decision = scanner.next();                  if (decision == "r")                 {                     humanTurn = true;                 }                  if(decision == "h")                 {                     humanScore = humanScore + points;                     humanTurn = false;                     computerTurn = true;                     points = 0;                     System.out.println("You hold, your score is now " + humanScore);                     System.out.println("Computer, it is now your turn.");                 }              }         }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I am quite unfamiliar with the idea of matrices to the $n$th power so far but I hope someone here could elaborate a little bit on this problem I've come across.    The idea is that we have our square $3\times3$ matrix $A$ and we need to satisfy these two conditions.     $A\neq I$ (where $I$ is the identity matrix $3\times3$)   $A^{197} = I$ (where $I$ is the identity matrix $3\times3$)

find a $3 \times 3$ matrix $A$ such that $A \neq  I_3$ and $A^{197}=I_3$.


About 18 months ago, I made the switch from a Windows 10 operating system to a Linux OS.  The current OS on my computer (Dell Inspiron-3268) is Ubuntu 18.04.4 LTS.  In total, there have been very few problems while learning and using Linux.  Sometime in the past several months, the computer went through a software update and now wants (requires) a password for almost anything I try to do other than visit web sites or read email.  I also have a PineBook Pro laptop that has Manjaro installed.  I was having, and still have, problems getting into the laptop or turning it on and getting to the desktop.  One suggestion on the PineBook Pro site said that I should download the Manjaro image and burn the ISO to a micro USB card to reinstall the original software.  The problem I have with that is that the Dell, which has the Ubuntu Linux OS, now requires a password to burn the image to the micro USB card.  And the password that I had set when I first installed Linux is no longer recognized.  How can I reset the system password and regain total control of the Dell computer? Thank you, James Good

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


I have such a case: I got one pdf file but it's read only,I wish to draw on it. so I think maybe I can do it as below: 1). embed origin.pdf into latex code as a picture. 2). find right position to draw on it.  But I wish the new pdf file dimension exactly the same as origin one.  I try below code, but it seems the original pdf file (8.5inx11.0in) has been cropped.  \documentclass{article} \usepackage[paperwidth=8.50in, paperheight=11.00in]{geometry} \usepackage{tikz}  \begin{document}  \tikzstyle{default}=[anchor=north west,draw=red,inner sep=0pt] \begin{tikzpicture}[anchor=south west,inner sep=0pt, outer sep=0pt] \node at (current page.south west) {     \begin{tikzpicture}[overlay,remember picture,inner sep=0pt, outer sep=0pt,anchor=south west]         \node[anchor=south west,inner sep=0,rotate=0] (image) at (0,0) {\includegraphics{origin.pdf}};     \end{tikzpicture} };  \end{tikzpicture}  \end{document}   Not sure if it's the right one to do such tasks!

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc.


I am practicing multithreading program and encountered a very strange problem. The code is as follows. When I run the program, sometimes(not always) it throws java.lang.NullPointerException. I have no idea how this problem occurs. Is there anybody who can help me with this? Thank you so so so much.  import java.util.*;  public class TestCME {     public static void main(String[] args){         TestMap tm = new TestMap();         for(int i = 0;i < 40000 ;i++){             tm.addCity(i,new City(i * 10));         }         RunnableA rA = new RunnableA(tm);         Thread threadA = new Thread(rA);         RunnableB rB = new RunnableB(tm);         Thread threadB = new Thread(rB);          threadA.start();         threadB.start();     } } class TestMap{     Map<Integer,City> cityMap;      public TestMap(){         cityMap = Collections.synchronizedMap(new HashMap<Integer,City>());      }      public Set<Integer> getAllKeys(){         return cityMap.keySet();     }      public City getCity(int id){         return cityMap.get(id);     }      public void addCity(int id,City city){         cityMap.put(id,city);     }      public void removeCity(int id){         cityMap.remove(id);     } }  class City{     int area;     public City(int area){         this.area = area;     } }  class RunnableA implements Runnable{     TestMap tm;     public RunnableA(TestMap tm){         this.tm = tm;     }     public void run(){         System.out.println("Thread A is starting to run......");          if(tm != null && tm.cityMap != null && tm.cityMap.size() > 0){              Set<Integer> idSet = tm.getAllKeys();             Integer[] idArray = idSet.toArray(new Integer[idSet.size()]);             for(int i = 0;i < idArray.length;i++){                 Integer id = idArray[i];                 City city = tm.getCity(id);                 if(city != null){                     System.out.println(id + ":" + city.area);                     /*try{                         Thread.sleep(1);                     }catch(Exception e){                         e.printStackTrace();                     }*/                 }             }          }     } }  class RunnableB implements Runnable{     TestMap tm;     public RunnableB(TestMap tm){         this.tm = tm;     }     public void run(){         System.out.println("Thread B is starting to run......");         /*try{             Thread.sleep(1);         }catch(Exception e){             e.printStackTrace();         }*/         System.out.println("Trying to add elements to map....");         tm.addCity(50,new City(500));         System.out.println("Done adding.");         System.out.println("Trying to remove elements from map....");         tm.removeCity(10);         tm.removeCity(20);         tm.removeCity(30);         tm.removeCity(40);         System.out.println("Done removing.");     } }   And the exception log is   Exception in thread "Thread-0" java.lang.NullPointerException     at RunnableA.run(TestCME.java:69)     at java.lang.Thread.run(Thread.java:745)   TestCME.java:69 is at City city = tm.getCity(id); in class RunnableA.

When writing multithreaded applications, one of the most common problems experienced is race conditions.    My questions to the community are:  What is the race condition? How do you detect them? How do you handle them? Finally, how do you prevent them from occurring?


Let's say I run this command:  from pyspark.sql.types import *  How can I check all the names that have been imported into my namespace? For instance, IntegerType() is now available, but is there a programmatic way of seeing all the names that have been imported with the *?   Note that I am not just looking for functions, but all names (including attributes) etc.  Thanks

I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it. I want to call the help function on each one. In Ruby I can do something like ClassName.methods to get a list of all the methods available on that class. Is there something similar in Python? eg. something like: from somemodule import foo print(foo.methods)  # or whatever is the correct method to call


I am new to the concept of plagiarism and also how to give reference in an article. As my English is not very well, I may use some sentences borrowed from other papers. But they may just define a term which is common in the literature. For example, consider the following sentence:     Any procedure that aims at extracting information (structured data) from unstructured (free text) or semi-structured data source is called wrapper.    Or      Web Data Extraction has many applications in different areas including Business and Competitive Intelligence, crawling of Social Web platforms, Bio-Informatics and so on    I copied them from another publication, I did minor changes in their wordings, however, in the second sentence I may count other applications of the system.  I would like to know, should I use a reference for them? Because I thought reference is mostly for the related works or background of the research and they might be some facts or definitions!    My question may seem similar to , however the answer of this question solves my problem to some extent, but in this question I mainly asked about the role of citation. I think I shouldn't cite a fact or something that is very common. In such cases I can't understand the logic behind avoiding a similar definition or sentence! how do you explain that.

Quite often one comes across a really succinct and precise explanation of a concept. I'm wondering if it is permissible to use this explanation verbatim, if the source work is cited in your paper (next to the explanation)? What's in question here is at most 3 sentences.


I am facing a problem with kernel installation. I installed two packages but the last one didn't. So I want to uninstall the first package. In this link I have described what was my problem.

I was trying to install kernel 4.6 on Ubuntu 16.04 but it didn't go well. I followed these instructions:  How to Install Kernel 4.6 in Ubuntu: There are .deb packages for this kernel release available in kernel-ppa/mainline:  Download and install the packages named below one by one according to your OS type (i386 for 32-bit, amd64 for 64-bit): linux-headers-4.6.0-xxx_all.deb linux-headers-4.6.0-xxx-generic_xxx_i386/amd64.deb linux-image-4.6.0-xxx-generic_xxx_i386/amd64.deb   I installed two of them with Ubuntu Software Center but on the last one I got this error:  The package is of bad quality The installation of a package which violates the quality standards isn't allowed. This could cause serious problems on your computer. Please contact the person or organisation who provided this package file and include the details beneath. Details Lintian check results for /home/MYUSERNAME/Desktop/linux-image-4.6.0-040600-generic_4.6.0-040600.201605151930_amd64.deb: E: linux-image-4.6.0-040600-generic: binary-with-bad-dynamic-table lib/modules/4.6.0-040600-generic/vdso/vdso64.so   I found these steps . What is the problem?


Are explanatory variables in regression always considered non-stochastic? If the explanatory variables are random or stochastic will the regression be still valid? What are the implications on the coefficients or issues with hypothesis testing one would face ?

If we have stochastic regressors, we are drawing random pairs $(y_i,\vec{x}_i)$ for a bunch of $i$, the so-called random sample, from a fixed but unknown probabilistic distribution $(y,\vec{x})$. Theoretically speaking, the random sample allows us to learn about or estimate some parameters of the distribution $(y,\vec{x})$. If we have fixed regressors, theoretically speaking, we can only infer certain parameters about $k$  conditional distributions, $y\mid x_i$ for $i=1,2,\dots,k$ where each $x_i$ is not a random variable, or is fixed. More specifically, stochastic regressors allow us to estimate some parameters of the entire distribution of $(y,\vec{x})$ while fixed regressors only let us estimate certain parameters of the conditional distributions $(y,\vec{x_i})\mid x_i$. The consequence is that fixed regressors cannot be generalized to the whole distribution. For example, if we only had $x=1,2,3,\dots,99$ in the sample as fixed regressors, we can not infer anything about $100$ or $99.9$, but stochastic regressors can. This is a rather obscure question as many textbooks only talk about the differences in mathematical derivation but avoid discussing the differences to the extent they can be generalized theoretically.


How come the Android app displays total score for tags, whereas the Web App displays total score for answers (SO & Politics.SE)?  Web:    Android:   This isn't a question regarding the calculation of score, but rather the display of the score. Wouldn't it be more consistent to have the same parameters for both platforms? (i.e. just display answer scores or just display total scores)

I checked yesterday and today the new homepage in the Android app. Very surprised I saw that I would almost reach a silver tag badge, that confused be because I always take a look on possible badges I can get. However I compared the score with the website and I got a total different results. See this two screenshots:


There are times after I eject a USB Flash drive, I want to copy some more files over to the USB Flash drive.  In this case, do I always need to unplug the drive and plug it back in?  Is there a way to "reconnect" or "un-eject" the drive?  To eject, that are two ways:   Right click the drive (say H:) and choose Eject   Click "Safely remove hardware" from the icon tool   But there seems to be no way to un-eject or reconnect a drive.

After I use the 'Safely Remove Hardware' notification area widget, how do I get Windows to re-attach a USB device (i.e. a USB drive) without having to unplug and plug it in again?


First off, I know that 0.9… = 1 and I'm not trying to prove or debate that, but my discussion about it is necessary for understanding the question. I was talking to my brother about whether 0.9… equaled one and I was using the “No holes in the number line proof” to get my point across when he said that 0.9… + (0.0…1)/2 would fit in between 0.9… and 1. Now I didn't know whether 0.0…1 was a valid number or not but I guess technically had to (if it's not feel free to tell me but for the rest of this we'll be pretending it is, think of it as a fun what if situation). I told him that it couldn't be divided because it's equal to zero, nothing could fit in between it and zero. He said (0.0…1)/2 could. I told him that assuming he could, it would equal 0.0…05 and infinity plus one equals infinity meaning that it could be simplified down to 0.0…5 and that 0.0…5 doesn't fit in between 0 and 0.0…1 meaning that 0.0…1 = 0 so 0.9… + 0.0…1 = 1  could be simplified down to 0.9… + 0 = 1, 0.9… = 1. He told me that infinity plus one does not equal infinity and I gave up. All that said and done, I was still left thinking about the numbers 0.0…1 through 0.0…9 and I realized they are quite weird. If we define x ≠ y as x having space in between it and y on the number line, and x = y as x having no space in between it and y on the number line  you will see where the weirdness starts. For just one example, if x = 0.0…1 and y = 0.0…2 then x = y. Now if z = 0.0…3 then y = z. But the thing is x ≠ z because y would fit in between them meaning that, y = x and y = z but x ≠ z. To keep this from breaking the transitive property of equality y would have to be both equal to and not equal to both x and z at the same time. That is why I have dubbed these numbers “Quantum Numbers”. Does anyone know whether or not anyone has published anything on them, I would be interested to know, and if you have anything to add please do.

I've just happened to read this  on MO (that of course has been closed) and some of the answers to a similar  on MSE.   I know almost nothing of nonstandard analysis and was asking myself if something like the sentence « $1- 0.999 \dots$ is a nonzero positive infinitesimal» could be easily expressed and proved in nonstandard analysis.  First of all, what is 0.999... ? If we take the usual definition as a series or as a limit of a sequence of rationals, then it will still be a real number and equal to $1$ (I guess by "transfer principle", but please correct me if I'm wrong).  Instead, let's define  $$0.9_N:=\sum_{i=1}^N 9\cdot 10^{-i} $$  where $N\in{}^*\mathbb{N}\setminus\mathbb{N}$ is an infinite nonstandard natural number. This $0.9_N$ is a legitimate element of ${}^*\mathbb{R}$, expressed as $0.$ followed by an infinite number of "$9$" digits.  What can be said about $\epsilon_N:=1-0.9_N$ ? Is there an elementary proof that $\epsilon_N$ is a positive infinitesimal of ${}^*\mathbb{R}$ ? (by "elementary" I mean just order and field axioms and the intuitive facts about infinitesimals, like that for $x$ infinite $1/x$ is infinitesimal etc.; no nonprincipal ultrafilters & C).


So in the examples of my math textbook there is the problem of factoring polynomials:  Factor $-3x^2 -2xy +8y^2 +11x -8y -6$   And the way they solved it is as follows: Solution:  If we only take terms with $x$ and constants we get $-3x^2 + 11x - 6$  $-3x^2 + 11x - 6  \equiv (-3x +2)(x-3)$ or $(3x - 2)(-x +3) ......(1)$ If we only take terms with $y$ and constants we get $8y^2 - 8y - 6$  $8y^2 - 8y - 6 \equiv (4y + 2)(2y -3)$ or $(-4y - 2)(-2y +3) ......(2)$ We will get the factors of the given polynomial if we combine the factors of $(1)$ and $(2)$ , but the constants $+2,-3$ or $-2,+3$ have to be the same in both equation just like the coefficient of $x$ and $y$. $\therefore$ The factors are $(-3x + 4y + 2)(x +2y -3)$ or $(3x - 4y -2)(-x -2y +3)$ We can test if the calculated factors are valid by matching the coefficient of $xy$  $-3.2 + 4.1 = -2$ or $3.(-2) - 4.(-1) = -2$. (QED) I have read it many times but still couldn't get how this method even works.So I have some questions:  (1) Is this a valid way to factorize polynomials ?  (2) Is there any reference where this method is used ?

This is quite easy to do if we do the middle term splitting method, but here's another method given in the book:   Only considering terms with powers of $x$ and constants: $-3x^2 + 11x - 6 = (3x - 2)(-x + 3)$    Only considering terms with powers of y and constants: $8y^2 - 8y - 6 = (-4y - 2)(-2y + 3)$    Merging both we get $-3x^2 - 2xy + 8y^2 + 11x - 8y - 6 = (3x - 4y - 2)(-x - 2y + 3)$     Why does this method work, and is there a name to this method?


Up to this date I was working with NPN transistor  with micro controller and it was working fine. But here I need a PNP transistor.     Does any one can tell me is that the above configuration is correct and that the circuit can be used safely ?

I would like to ask for best solution for my issue.  I need high side switch for 24VDC 6mA (it is enable signal for a device). This device I want to control by Arduino (input 5 V 20mA).  What is the best solutions for this low current?  I tried to use Sziklai pair, but PNP transistor is still open. I don't know how to calculate resistors between NPN and PNP :-(. Do I have to use a sziklai pair or is there something else?         – Schematic created using   Thank you so much  Lukas


I've recently installed IntelliJ on my Ubuntu system and realized that the font I want to normally use Monaco doesn't render properly in IntelliJ. So, the problem was slightly fixed from  post however the editor would still not render properly with Monaco;  This is currently the state of my IDE:

I installed IntelliJ IDEA 13.1 and Oracle JDK 1.8 on Ubuntu 14.04 x64 but when I launch IntelliJ IDEA the font is not ideal.  How I can change the font?


Statistics gurus, Kalman filter appears to be a powerful estimator for linear problems. I understand one can tune the performance by adjusting parameters like process noise and measurement noise. Is it possible to adjust these parameters to make Kalman filter results converge to a classic linear regression? If yes, how? Please kindly share your opinions. Thanks. Rgds,


Based on the suggested duplicate, let me reformulate my question:  If chmod 0660 path/to/folder is run, and user A isn't in the relevant group, could user A still read /path/to/folder/file.txt if that file has the appropriate octal?

On Unix, a long time back, I learned about chmod: the traditional way to set permissions, on Unix (and to allow programs to gain privileges, using setuid, setgid).   I have recently discovered some newer commands, on GNU/Linux:    setfacl extends the traditional ugo:rwx bits and the t bit of chmod. setcap gives more fin-grain control than ug:s bits of chmod. chattr Allows some other controls(a bit of a mix) of the file.   Are there any others?


I plan on storing data, encrypted with AES256, where the first dozen bytes are known plaintext.  ('Hello World!' for example.)  Does having this known plaintext prefix weaken AES256?  I do not care about modifications being made to the ciphertext, which result in modifications to the decrypted plaintext.  I do care about an attacker being able to decrypt any plaintext beyond the known plaintext prefix.  I expect to use counter mode, as random access is required.  Does GCM have any advantage?

At least it's my understanding that AES isn't affected by known-plaintext. Is it immune to such an attack, or just resistant? Does this vary for chosen-plaintext?


I would like to have an alias for the following code:-   g++ *.cc -o * `pkg-config gtkmm-3.0 --cflags --libs`;   but I want that when I enter the alias it should be followed by the file name *.cc and then the name of the compiled program *.  for example:  gtkmm simple.cc simple   should run   g++ simple.cc -o simple `pkg-config gtkmm-3.0 --cflags --libs`

It's taken me almost 10 years of Linux usage to ask this question. It was all trial and error and random late-night internet surfing.  But people shouldn't need 10 years for this. If I were just starting out with Linux, I'd want to know: When to alias, when to script, and when to write a function?  Where aliases are concerned, I use aliases for very simple operations that don't take arguments.   alias houston='cd /home/username/.scripts/'   That seems obvious. But some people do this:  alias command="bash bashscriptname"   (and add it to the .bashrc file)   Is there a good reason to do that? I'm trying really hard, but I genuinely can't think of any circumstances in which I'd want to do that. So, if there is an edge case where that would make a difference, please answer below.  Because that's where I would just put something in my PATH and chmod +x it, which is another thing that came after years of Linux trial-and-error.  Which brings me to the next topic. For instance, I added a hidden folder (.scripts/) in the home directory to my PATH by just adding a line to my .bashrc (PATH=$PATH:/home/username/.scripts/), so anything executable in there automagically autocompletes.  If I needed to.  I don't really need that, though, do I? I would only use that for languages that are not the shell, like Python.  If it's the shell, I can just write a function inside the very same .bashrc:  funcname () {   somecommand -someARGS "$@" }   As I stated, I found a lot of this out through trial and error. And I only truly saw the beauty of functions when my computer died and I was forced to use the computers of the people around me when they weren't using them.   Instead of moving a whole directory of scripts from computer to computer, I ended up just replacing everyone else's .bashrc with my own, since they had never even made a single modification.  But did I miss anything?   So, what would you tell a beginning Linux user about when to alias, when to script, and when to write a function?   If it's not obvious, I'm assuming the people who answer this will make use of all three options. If you only use aliases, or only use scripts, or only use functions—or if you only use aliases and scripts or aliases and functions or scripts and functions—this question isn't really aimed at you.


How can I create the pop out symbol in latex?  Signifies that something is a link. I used a latex symbol finder but it tells me the closest match is the male gender symbol, which I guess is pretty similar but not entirely. Hoping there is just a command for this so that I don't have to draw it myself. Thanks

I'm using the hyperref package in my document to provide hyperlinks to external documents. However, I don't want to have the links coloured or underlined, because I find this usually ugly and distracting. What I would rather like is a little symbol beside the link text to provide a small hint for the reader that there is something clickable. What I have in mind is something like the little symbol constisting of a small square and an arrow you can find e.g. in Wikipedia for external links. Is there any package or font that provides such a symbol or do I have to brew one myself?


I heard that Unix/Linux is a monolithic-kernel whereas Hurd is micro-kernel. So, I want to know what is the difference between these kernel type?

I read once that one advantage of a microkernel architecture is that you can stop/start essential services like networking and filesystems, without needing to restart the whole system. But considering that Linux kernel nowadays (was it always the case?) offers the option to use modules to achieve the same effect, what are the (remaining) advantages of a microkernel?


What is a good way to have NPCs interact with each other without it feeling clunky? Say I want to have 2 or more NPCs be a part of the dialogue with the party as a means to reveal plot to the players. It seems strange to me that NPCs would interact with PCs but not with each other. However, it does come across awkward if a GM is basically talking to himself by having two NPCs exchanging conversation. Is there a way to have NPCs interact without it coming across as awkward?

One of the assumptions I make as GM is that the players should always be in the spotlight.  Sometimes the players find themselves in a situation where they watch NPCs speak to each other.  I don't like using this kind of situation, because it forces the players to watch me talk to myself and that turns them from active participants into an audience.  Usually I handle it by avoiding the situation.  I try not to write scenes that the players watch.  Instead the players speak to the NPCs one at a time.  When I do come across an exchange between NPCs I opt to summarize the conversation instead of acting it out.    I don't like this limitation though.  It gets a little contrived when all conversations in the game feature 5 PCs and 1 NPC.  Any suggestions? Either how to avoid doing it, or how to effectively role play a conversation between two (or more) NPCs that the characters may or may not be interacting with?   How do you keep clear which character is speaking? How do you make sure that the conversation feels like a real one and not like one person playing both roles?


i have this button inside a popup.(in a javascript file)  '
'+     '<button class="btn btn-primary" >this</button>'+     '
'+   and i am accessing this in function  $('.thisdiv').on('click', function (e) {        $('.overlay').hide();          $('body').removeClass('overflow');      });   this is basically supposed to be a button which, when clicked, closes the pop up. (the simple cross button) but it does not work. it does not go into the function, i was told to use delegates. but shouldn't this be the simpler method? what am i missing?

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.


prove that $$\sum_{cyc}\frac{a^2}{b}\ge 4$$ if $a,b,c,d\ge 0$,$a^2+b^2+c^2+d^2=4$ My try: by Titu's lemma $$\sum_{cyc}\frac{a^2}{b}\ge a+b+c+d$$ now from given condition we can say $a\ge 0,a\le 2$,,or  $a(a-2)\le 0$ or $a^2\le2a$ by this i was only able to prove that $$\sum_{cyc}\frac{a^2}{b}\ge 2$$

Let $a, b, c, d$ be positive real numbers such that $a^2 + b^2 + c^2 + d^2 = 4$, show that $$\frac {a^2}b + \frac {b^2}c + \frac {c^2}d + \frac {d^2}a \ge 4.$$  My try:  $$\frac {a^2}b + \frac {b^2}c + \frac {c^2}d + \frac {d^2}a \ge a + b + c + d,$$  yet $$a + b + c + d \le \sqrt{4(a^2 + b^2 + c^2 + d^2)} = 4.$$  Thus, direct application of Cauchy-Schwarz inequality is too weak. I tried other methods but with no significant progress:  $$(\frac {a^2}b + \frac {b^2}c + \frac {c^2}d + \frac {d^2}a)^2 \ge \frac {(a^{4/3} + b^{4/3} + c^{4/3})^3}{a^2 + b^2 + c^2 + d^2} = \frac {(a^{4/3} + b^{4/3} + c^{4/3})^3}4.$$  I also observed that  $$(\frac {a^2}b + \frac {b^2}c + \frac {c^2}d + \frac {d^2}a) + (\frac {a^2}c + \frac {b^2}d + \frac {c^2}a + \frac {d^2}b) + (\frac {a^2}d + \frac {b^2}a + \frac {c^2}b + \frac {d^2}c) + (\frac {a^2}a + \frac {b^2}b + \frac {c^2}c + \frac {d^2}d) = 4 (\frac 1a + \frac 1b + \frac 1c + \frac 1d) \ge 16,$$  since $$\frac 1a + \frac 1b + \frac 1c + \frac 1d \ge \sqrt{\frac {(1 + 1 + 1 + 1)^3}{a^2 + b^2 + c^2 + d^2}} = 4.$$  Now my work might seem stupid or off-topic here, but I provide it here because I wish any of these attempts will lead to a solution. Any hints will be appreciated.


After I added this ppa ppa:thopiekar/darling and tried to install darling without success, I can't fix anything with the sudo apt-get install -f install command  jeggy@jeggy-XPS:~$ sudo apt-get -f install [sudo] password for jeggy:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   gnustep-gui The following NEW packages will be installed:   gnustep-gui 0 upgraded, 1 newly installed, 0 to remove and 6 not upgraded. 1 not fully installed or removed. Need to get 0 B/3.569 kB of archives. After this operation, 12,4 MB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 283062 files and directories currently installed.) Unpacking gnustep-gui:amd64 (from .../gnustep-gui_0.23.1-0~201311190000~7545~7~ubuntu13.10.1_amd64.deb) ... dpkg: error processing /var/cache/apt/archives/gnustep-gui_0.23.1-0~201311190000~7545~7~ubuntu13.10.1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/GNUstep/ColorPickers/StandardPicker.bundle/StandardPicker', which is also in package gnustep-gui-runtime 0.22.0-1ubuntu1 No apport report written because MaxReports is reached already                                                               dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/gnustep-gui_0.23.1-0~201311190000~7545~7~ubuntu13.10.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) jeggy@jeggy-XPS:~$    Could someone help me to fix this?

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I want to assign different materials to a single text object via Python. This can be done manually by selecting the desired Material slot, typing away, choosing a different material slot and typing further. But how can I do this via Python?

Is it possible to animate which materials are assigned to specific characters in a text object? It is quite easy to assign the materials how I want using , but I do not know of a way to animate it. Is this possible at this point? And if not, is there a workaround using different techniques that I could use?  This question is similar to  and , I just want to know if there are other methods that could be used for text objects.


I am not able to resize my root. I want to merge the unallocated space to my root partition. My gparted screenshot looks like

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I am an undergraduate in my last semester, and due to bureaucratic reasons I couldn't take a course in Ring Theory until now. Again, for bureaucracy, I had to enroll in a course in Field theory and Galois theory this quarter, and I will be taking the Rings course in the next one. Not the ideal situation, I know, but that's how things ended up being and I won't be able to change the order in which I will take the courses (I tried to). So, I need to know what's the basic results of Ring theory I should be at least know to enunciate/or know the proofs in order to follow this course in field theory, as I listened that it is a very deep subject and I'm concerned about my ability to survive it. I didn't took the course in Ring theory but studied something by myself in the last month, so I know the language of homomorphisms, polynomial rings and the abstract Chinese Remainder Theorem, but I would like to know what exactly is demanded. Also, which book is a good reference to study field theory in a first course, given the present situation?

I have been taking Abstract Algebra graduate classes, and we will begin studying Galois theory.  However, since it is a graduate-level course, the teacher has assumed everyone already had taken undergrauate-level algebra. Problem is, I come from an Engineering background, which did not have it.  Needless to say, I am a bit lost on what I need to know. The teacher will do a brief revision on fields, but I do not even know much about rings (I am fairly comfortable with groups though, since we studied it).  So, long story short, my question is: What do I absolutely must know about rings and fields to understand Galois theory?  I would also appreciate any references that may help. I have been reading Artin's Algebra, and Goodman's Algebra: Abstract and Concrete for now.    And, just to clarify, I do intend to learn more about Algebra later on. It is just that I need to keep up with the lectures, so I must learn the necessary things in a really short time.


My question is about an inverter system with the transformer which is controlled by dspic30f, how to sense the mains voltage i.e.,230V 50Hz to the microcontroller?

I have a light switch that switches 240v (UK) mains. Instead of using that to directly control a light, I want to use it as an input to a controller board so I can also automate the lighting. (It's low voltage LED lighting driven via a transformer although that doesn't really affect my question).  My question is what is the best and safe way to use switched 240v mains power as an input to a low voltage microcontroller circuit? It would be best to use the existing switch to switch a low voltage control signal but I can't change the wiring at at this time so the only input I have to my control is a switched 240v mains power line.  I have other power available where the controller is so I'm not intending to power this via the original light power, I just want to see if I can use it as a control line without extensive rewiring work for now.


Let $G$ be the Symmetric group $S_4.$ Give a representative of each conjugacy class of $G.$ Then calculate the size of each conjugacy class.  I have no idea how to do this.

Can anyone tell me how to find all normal subgroups of the symmetric group $S_4$?  In particular are $H=\{e,(1 2)(3 4)\}$ and $K=\{e,(1 2)(3 4), (1 3)(2 4),(1 4)(2 3)\}$ normal subgroups?


let $F$ be a finite field of order $q$ and let $f(x)$ be a polynomial in $F[x]$ of degree $n \geq 1$. Prove that $F[x]/(f(x))$ has $q^n$ elements. I know that if a field is finite then the order is prime so that means q is prime, but what does that says about  $F[x]/(f(x))$. Can anyone try to help me understand this problem because i just recently learn about field extension. thanks

Given an arbitrary finite field $K$ (not necessarily $\mathbb{F}_p$ with $p \in \mathbb{P}$) with $|K| = q$ and an irreducible polynomial $f$ with $\alpha$ as root and degree of $n$. Is $|K(\alpha)| = q^n$ and why? Its clear to me for $K$ isomorphic to $\mathbb{Z}_p$ with $p$ is a prime number.


Is it possible to have a LARGE (\large), bold (\bf), and small cap (\sc) font? I have tried several ways but none of them works as I want.   \documentclass{article}  \begin{document} \textsc{\large Hello World}\\  \textsc{\LARGE Hello World}\\  \textsc{\bf Hello World}\\  \textsc{\LARGE \bf Hello World}\\  \textbf{\textsc{\LARGE Hello World}}\\  \textsc{\textbf{\LARGE Hello World}}\\  \textbf{\LARGE \scshape Hello World} \end{document}

I can't seem to have both the small caps and boldface styles on a line:  \huge\sc\bf Hello   This will generate bold text, and if the \sc is placed after, it will generate small caps text but not bolded. They seem to override each other, so is there any way to apply them both?


Problem:Let X have a logistic distribution with PDF $f_X(x)=\frac{e^{-x}}{(1+e^{-x})^2}$, $-\infty<x<\infty$. Show $Y=\frac{1}{1+e^{-X}}$ has an uniform distribution over (0,1).  Answer:$f_Y(y)=\frac{1}{|u'(x)|} f_X(x)=\frac{(1+e^{-x})^2}{e^{-x}} \frac{e^{-x}}{(1+e^{-x})^2}$=1 which is a constant. Hence it is an uniform distribution.  I am wondering there is another approach, which is the CDF technique. Does it work here too?

Let X have a logistic distribution with PDF $f_X(x)=\frac{e^{-x}}{(1+e^{-x})^2}$, $-\infty<x<\infty$. Show $Y=\frac{1}{1+e^{-X}}$ has an uniform distribution over (0,1).  Let $Y=u(x)=\frac{1}{1+e^{-X}} $Since this is monotone decreasing, Can use $f_Y(y)=\frac{1}{|u'(x)|}f_X(x)$.  What's the general technique of approaching?


Find the remainder when $x^{100}$ is divided by $x^2 - 3x + 2$.  I tried solving it by first calculating the zeroes of $x^2 - 3x + 2$, which came out to be 1 and 2.   So then, using the Remainder Theorem, I put both their values, and so the remainder came out to be $1 + 2^{100}$.  But the correct answer is $(2^{100} - 1)x + (2 - 2^{100})$.   Can you please explain the exact process to reach the solution?  Thanks in advance. :)

i was solving the question from the book IIT FOUNDATION AND OLYMPIAD - X and i was solving the problems of polynomials-III. so on the page number 136, there is a question (question 17) given below:     The remainder when $x$^100 is divided by $x^2-3x+2$ is:      a) $(2$^100$-1)x + (-2$^100$ +2) $      b) $(2$^100$+1)x + (-2$^100$ -2) $      c) $(2$^100$-1)x + (-2$^100$ -2) $      d) none   as far as i tried to find the remainder, i tried long division method but it was getting more and more complicated, then i used systematic method of division but i can't get the corret option what is the correct option. please explain me how did you find the remainder. thanks  and yes its answer is option (a)


I want to get just the domain name(yahoo, google, stackoverflow) from the domain in javascript. How can I easily pull just this out and drop any subdomain and any extension?  See comment, I need it to work for any domain if possible.

How can I fetch a domain name from a URL String? Examples: +----------------------+------------+ | input                | output     | +----------------------+------------+ | www.google.com       | google     | | www.mail.yahoo.com   | mail.yahoo | | www.mail.yahoo.co.in | mail.yahoo | | www.abc.au.uk        | abc        | +----------------------+------------+  Related:


I am running Ubuntu 14.04 on a laptop  with following COnfiguration:  RAM: 4GB  Proccessor: Intel® Pentium(R) CPU N3540 @ 2.16GHz × 4  Graphics: Intel Bay Trail  OS: 64 Bit  There were few packages pushed on 23 August 2016 from Ubuntu update center. The packages are mostly related to  XServer.  After this, my laptop freezes completely while running Google  Chrome. It freezes with Mozilla also, but that happens after a very long run time. But with Chrome, it freezes in 20-30 minutes or so. More faster when I am running Videos on chrome.  Can any one help me on this? It's really irritating to restart my computer using Power button every now and then.  Chrome Version: 52.0.2743.116 (64-bit)

My system freezes completely at random, frequent intervals. I started to have the same problem in Ubuntu 14.04 but after recent upgrade to 16.04 there is no improvement, in fact it seems worse.  When it happens, it's impossible to do anything. I've tried everything in this thread:  but nothing works, I have to hard reset. I have read all the system logs and journalctl but there is never any information that could help diagnose the problem.  This is a dual-boot system with Windows 10 and there's no problem there, so it's not defective hardware.  My laptop has an Intel Bay Trail processor (Pentium N3540)