I am trying to make a feature in my survival minigame where every once and a while a random player is teleported to a hidden room via command blocks. Inside, players will be allowed to hit one button, then be teleported back to the main arena. Each button gives you different items, and one I want to have is to have it give you tipped arrows (like harming potion arrows). But, my command isn't working. Here is what I got:  /give @p arrow 1 0 {Potion:"harming"}  I found the last part . What is wrong with the command? As I said, I am on Windows-10 version (v1.1.0).

This question was recently split into different questions for each workaround. See   meta posts for more information.   Can you use NBT tags in commands? I’ve tried commands that normally work in Java Edition like: give @s minecraft:planks 30 1 {display:{Lore:["Wooden planks"]}} give @s stone_pickaxe{Unbreakable:1b} give @s item_frame{EntityTag:{Invisible:1b}} summon villager ~ ~ ~ {Offers:{Recipes:[{buy:{id:"emerald",Count:5b},sell:{id:"diamond_sword"}}]}} summon tnt ~ ~ ~ {Fuse:20s}


The following minimal example doesn't compiles on macOs with pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020) and biber 2.14. If I remove the year fields from the bib file, it works. Any ideas, what's wrong here? The same example works on another Mac with previous version of pdflatex and biber (TeX Live 2019) \documentclass{article} \usepackage[backend=biber]{biblatex} \addbibresource{lauraPhd2016.bib} \begin{document} I doubt that there is any useful information here~\cite{wikibook}.  All we know is limited, apart from knowing the answer we all know.  Or do we? Wombat and Koala have discovered some interesting things~\cite{wombat2016}.  Some people are too nosy. What can happen to them is described by Laura Lion~\cite[9]{lion2010}.  \printbibliography \end{document}   @article{wombat2016,     author   = {Walther Wombat and Klaus Koala},     title    = {The true meaning of 42},     journal  = {Journal of modern skepticism},     year     = {2016},     keywords = {trusted}, } @book{lion2010,     author       = {Laura Lion and  Gabrielle Giraffe and Carl Capybara},     title        = {The dangers of asking the wrong question},     publisher    = {publishing house},     year         = {2010},     keywords     = {trusted}, } @online{wikibook,     title        = {Generating Bibliographies with biblatex and biber},     organization = {Wikibooks},     url          = {https://en.wikibooks.org/wiki/LaTeX/Generating_Bibliographies_with_biblatex_and_biber},     keywords     = {untrusted}, }   I ran the following commands: pdflatex document biber document pdflatex document pdflatex document  The log file (document.blg): [0] Config.pm:304> INFO - This is Biber 2.14 [0] Config.pm:307> INFO - Logfile is 'document.blg' [102] biber-darwin:322> INFO - === Di Okt 20, 2020, 10:19:46 [128] Biber.pm:415> INFO - Reading 'document.bcf' [252] Biber.pm:943> INFO - Found 3 citekeys in bib section 0 [269] Biber.pm:4256> INFO - Processing section 0 [270] Utils.pm:75> INFO - Globbing data source 'lauraPhd2016.bib' [270] Utils.pm:91> INFO - Globbed data source 'lauraPhd2016.bib' to lauraPhd2016.bib [283] Biber.pm:4455> INFO - Looking for bibtex format file 'lauraPhd2016.bib' for section 0 [285] bibtex.pm:1653> INFO - LaTeX decoding ... [290] bibtex.pm:1471> INFO - Found BibTeX data source 'lauraPhd2016.bib'

I am on a Mac with MacTex 2020 and ran into a strange problem with Biber. Working on a document all was fine, I did not change the bibliography (says my git) and only fixing typos (not even adding cites) and suddenly latexmk stopped working after a Biber run, while that looked like  INFO - This is Biber 2.14 INFO - Logfile is 'doc.blg' INFO - Reading 'doc.bcf' INFO - Found 31 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'literature.bib' INFO - Globbed data source 'literature.bib' to literature.bib INFO - Looking for bibtex format file 'literature.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'literature.bib'   so harmless in my view. Then with --debug I additionally get in the end.  INFO - LaTeX decoding ... warning: overriding existing definition of macro "jun" warning: overriding existing definition of macro "jul" warning: overriding existing definition of macro "sep" warning: overriding existing definition of macro "jan" [...] warning: overriding existing definition of macro "nov" INFO - Found BibTeX data source 'literature.bib' Unicode::UCD: failed to find unicore/version in /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc CODE(0x7fd026aeb5a8) CODE(0x7fd026aebb90) at /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib/Biber/Input/file/bibtex.pm line 1011.   It seems unrelated to the library itself since deleting a few entries (going through deleting one half, then the other), the problem persists. It does not happen for an empty literature, but as soon as a first entry is added (just author/journal/title/year/volume/pages - no utf8-only chars) this error message appears.  what does this last error message mean?  How can I solve this?


What resources are great to provide information on using SQLite for beginner iPhone developers?   Where to download the SQLite software for the iPhone?  Are there multiple versions, and do they have substantial differences? Where can I find some introductory tutorials?   I'm working on an iPhone project where the instructions are to store PLISTs into SQLite. My PLIST would be a read/write file. Is this possible?  As of now my PLISTs are read-only, so it very important to make it a read/write PLIST. The only method my lecturer suggested is storing it in SQLite, where reading/writing would be done there.  Please, any suggestions on intros for SQLite for the iPhone?

I am trying to learn SQLite, and I am building an iPhone app. But I would like to add an SQLite database to my building app. I have got three tutorials, but I am not clear on that code.  How can I add an SQLite database to my building app? What would sample code look like?


can anyone explain what's happening behind this? I tried to search for similar behavior but most of the questions on iterating nested lists r1=[0 for i in range(3)] result=[r1 for j in range(3)] result[0][0]=4 # it will edit all the 0th elements of the sublists print(result)  r1=[0 for i in range(3)] result=[r1 for j in range(3)] result[1][0]=4 # it will edit all the 0th elements of the sublists print(result)  r1=[0 for i in range(3)] result=[r1 for j in range(3)] result[0][1]=4 # it will edit all the 1st elements of the sublists print(result)  result = [[0 for x in range(3)] for y in range(3)] result[0][0]=4 print(result) # it will edit only the first element of first sublist   the output is [[4, 0, 0], [4, 0, 0], [4, 0, 0]] [[4, 0, 0], [4, 0, 0], [4, 0, 0]] [[0, 4, 0], [0, 4, 0], [0, 4, 0]] [[4, 0, 0], [0, 0, 0], [0, 0, 0]]

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


I am animating a plane which has to wrap around a cylinder. How can I approch this animation? The idea is the plane to be tape, which you put one end first then wrap the other around a cylinder.    I tried doing a shape key, however I cannot manage to make it good. I am thinking of doing armature, however I will do the vertex painting and bones.

I want to animate a paper as it's being tightly rolled. I've done some research and seen that using the spiral add on might be advantageous, but I haven't found anything relating specifically to my question.   How might I do this?


I want to display an output in my HTML text area using Javascript, but I cannot figure out how to insert the line breaks. Based on other answers I found here, I tried this:  txtResults.value = "Route: " + route + "\\\n" + "Start Station: " + stnStart + "\\\n" + "End Station: " + stnEnd;   but the output comes out as  Route: A>B>C \ Start Station: A\ End Station: C   but if instead of \\\n I put \\n the output comes out as  Route: A>B>C \nStart Station: A\nEnd Station: C   how do I make it like as follows?  Route: A>B>C Start Station: A End Station: C

How can i add a line break to the text area in a html page? i use VB.net for server side coding.


I get bogged down with notation as well as its mechanics and am in need of a textbook. What are good begginer's textbooks for functional analysis? Thanks.

I am a EE grad. student who has had one undergraduate course in real analysis (which was pretty much the only pure math course that I have ever done). I would like to do a self study of some basic functional analysis so that I can be better prepared to take a graduate course in that material in my university. I plan to do that next fall so I do have some time to work through a book fully. Could some one recommend some good books to start working on this?   Thanks in advance


So I wrote this function to generate a list of numbers between start and stop (inclusively) at step interval:  start, stop, step, = -3, 3, 0.1 print [x * step + start for x in range(int((stop + step - start) / step))] print 12 * 0.1 + -3   the output was:  [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7000000000000002, 1.8, 1.9, 2.0] 1.7   why is the list messing up 1.7, but when I do the same operation outside the for loop, it works just fine?  How do I fix the for loop?

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


I am on blender, and I have imported an object. I believe that the object is so large that it doesn't fit the environment when zoomed out for a view of its entirity. It would be nice if you could include a python cript to your solution.  Here is how it looks:

Is there a Python command that will allow me to set the camera clip end for viewing my objects in Blender (via scripting)? According to  the "bpy.context.space_data" variable is read-only.


Let's say I have a set of time series data with 32 time steps.  My goal is to predict what the data value would be for the next time step, given data for 30 previous time steps. Would it be okay to split the dataset with overlapping parts as follows?  train X set : index 1~30  // train Y set : index 31   test X set : index 2~31 // test Y set : index 32   P.S.: Set aside the dev set for now.

I am familiar with "regular" cross-validation, but now I want to make timeseries predictions while using cross-validation with a simple linear regression function. I write down a simple example, to help clarify my two questions: one about the train/test split, one question about how to train/test for models when the aim is to predict for different n, with n the steps of prediction, in advance.  (1) The data  Assume I have data for timepoints 1,...,10 as follows:  timeseries = [0.5,0.3,10,4,5,6,1,0.4,0.1,0.9]   (2) Transforming the data into a format useful for supervised learning  As far as I understand, we can use "lags", i.e. shifts in the data to create a dataset suited for supervised learning:  input = [NaN,0.5,0.3,10,4,5,6,1,0.4,0.1] output/response = [0.5,0.3,10,4,5,6,1,0.4,0.1,0.9]   Here I have simply shifted the timeseries by one for creating the output vector. As far as I understand, I could now use input as the input for a linear regression model, and output for the response (the NaN could be approximated our replaced with a random value).  (3) Question 1: Cross-validation ("backtesting")  Say I want to do now 2-splits, do I have to shift the train as well as the test sets?    I.e. something like:  Train-set:  Independent variable: [NaN,0.5,0.3,10,4,5]  Output/response variable:[0.5,0.3,10,4,5,6]  Test-set:  Independent variable: [1,0.4,0.1]  Output/response variable:[0.4,0.1,0.9]  (ii) Question 2: Predicting different lags in advance:  As obvious, I have shifted dependent to independent variables by 1. Assuming now I would like to train a model which can predict 5 time steps in advance -- can I keep this lag of one, and nevertheless use the model to predict n+1,...,n+5,... or do I change the shift from independent to dependent variable to 5? What exactly is the difference?


Suppose a group $G$ has no proper subgroups (that is, the only subgroup of $G$ is $G$ itself and the trivial subgroup $\{e\}$. Show that $G$ is cyclic.

There is a lemma that says if a group $G$ has no proper nontrivial subgroups, then $G$ is cyclic. And here is the proof of the lemma:     Suppose $G$ has no proper nontrivial subgroups. Take an element $a$ in $G$ for which $a$ is not  equal to $e$. Consider the cyclic subgroup $\langle a \rangle$. This subgroup contains at least $e$ and $a$, so it is not trivial. But $G$ has no proper subgroups, so it must be that $\langle a \rangle = G$. Thus $G$ is cyclic, by definition of a cyclic group.   But here i do not understand the following: Why must $\langle a \rangle$ be a subgroup of $G$? For every single element $a$ in $G$, if $\langle a \rangle$ is a subgroup of $G$, then every group should have at least as many subgroups as the number of its elements. I would appreciate any help. Thanks


Particularly in the case of non divergence free currents does the Lorenz force break newton's 3rd law?  This question is purely theoretical, it's only about what the theory says. So no experimental arguments.  Of course em fields can carry energy_momentum and if energy or momentum go in the fields that's not breaking conservation laws.  I am asking weather there are theoretical examples with an assumption of a non divergence free current density where when accounting the whole system momentum is not conserved in general electrodynamics

Consider a system of the two identical positive point charges situated in free space (isolated from the influence of any other external fields) as shown in the attached diagram. Particle $1$ is at $(a,a,0)$ and particle $2$ is at $(0,a,0)$. Their velocities, at the considered instant of time, are as shown in the diagram ($\mathbf{v}_1$ along the $+x$ axis, $\mathbf{v}_2$ along the $+z$ axis).    Now, by applying the Biot-Savart law, we find that the magnetic field due to particle $2$ at the position of particle $1$ is along $+y$ axis, which means that the force acting on particle $1$ is along $+z$ axis according to Fleming’s left-hand rule. A similar analysis shows that there is no magnetic force on particle $2$ as the magnetic field of particle $1$ should vanish at positions (relative to particle $1$) located along its velocity vector.  Now, if we observe the net torque on the system of two particles about the $y$ axis then it is non-zero and is directed along the $-y$ axis. Here, there are no external forces or torques acting on the isolated two-particle system, and yet the net torque, as well as the net force on the particles, are nonzero. Why? Also, Newton's third law of motion seems to be broken in this scenario. Why?    Edit $1$  I have come to know from the responses that the electromagnetic field itself takes away some momentum and angular momentum about the considered axis. However, I think that if I consider only two charged particles as my system then the Abraham-Lorentz force can be assumed to be acting upon the system, and that is sufficient to make sure that we have considered the momentum being carried away by the electromagnetic field itself.   Even after considering the action of the Abraham-Lorentz force for the two-particle system, the scenario breaks both Newton's third law and the conservation of linear and angular momentum. This is because the Abraham Lorentz forces do not exactly counterbalance the force and the torques, on the two-particle system under consideration, due to the magnetic field.    Edit $2$  The previous edit was a result of confusion and misunderstanding on my part. The force associated with the momentum carried away by the electromagnetic field as a result of the electromagnetic interaction described in the question is the Lorentz force itself which simply doesn't obey the third law of motion. The Abraham-Lorentz force is a different story. It is associated with the momentum carried away by the radiation emitted by the accelerated charged particles. This is an additional force apart from the Lorentz force and corresponds to an additional carriage of momentum by the electromagnetic field. The momentum carried away by the electromagnetic field in correspondence with the Lorentz force doesn't correspond to radiation.


Find the maximum among the following :-  $1, \sqrt {2}, \sqrt[3]{3}... $  I think the answer is $\sqrt[3]{3}$.   Thanks for any help.

I aim to show that $$(n+1)^n<n^{(n+1)}$$ for all $n \geq 3$. I tried induction, but it didn't work. What should I do?


I'm reading the book "Linux Kernel Development", and there are some important points:  inode doesn't include filename. filenames are stored in directory entry(dentry). but dentry is not stored on disk, it's dynamic generated.   Unlike the previous two objects, the dentry object does not correspond to any sort of on-disk data structure.TheVFS creates it on-the-fly from a string representation of a path name. Because the dentry object is not physically stored on the disk, no flag in struct dentry specifies whether the object is modified (that is, whether it is dirty and needs to be written back to disk).  So the question is: where exactly the file names store? and how "list directory" works?

I know that symlinks have a separated inode from the original file and that they only point for the inode containing the data. My question is, where is the hardlink name stored if there's no field in the inode structure refering to "name". I know that this could be a a relatively easy question, but as all hardlinks have the same inode number i assume that no inode is created when creating a hard link.


An integration: $$\int_{0}^{\pi} \frac{\sin^2 x}{a^2 - 2ab\cos x +b^2} \,\mathrm dx$$  I am stuck with this definite integral. Will putting $\,\cos x = z\,$ help out here?

Calculate the definite integral      $$ I=\int_0^{\pi} \frac{\sin^2 x}{a^2+b^2-2ab \cos x}\;\mathrm dx $$      given that $a>b>0$.   My Attempt:  If we replace $x$ by $C$, then  $$ I = \int_{0}^{\pi}\frac{\sin^2 C}{a^2+b^2-2ab\cos C}\;\mathrm dC $$  Now we can use the Cosine Formula ($A+B+C=\pi$). Applying the formula gives  $$ \begin{align} \cos C &= \frac{a^2+b^2-c^2}{2ab}\\ a^2+b^2-2ab\cos C &= c^2 \end{align} $$  From here we can use the formula $\dfrac{\sin A}{a} = \dfrac{\sin B}{b} = \dfrac{\sin C}{c}$ to transform the integral to  $$ \begin{align} I &= \int_{0}^{\pi}\frac{\sin^2 C}{c^2}\;\mathrm dC\\ &= \int_{0}^{\pi}\frac{\sin^2A}{a^2}\;\mathrm dC\\ &= \int_{0}^{\pi}\frac{\sin^2 B}{b^2}\;\mathrm dC \end{align} $$  Is my process right? If not, how can I calculate the above integral?


NOTE: Please look at my code, it's a Bash script.  I want to display both dialogs on the screen at the same time,  one dialog displays this:  tail –f from - /var/log/proccess1.log   and the second dialog display this:  tail –f from the file - /var/log/proccess2.log   but the sad fact is that I can display only one dialog and not both dialogs (because when I run the first dialog, the second dialog will activate only if the first dialog is killed).  So I create a process on the second dialog ( ….. ) &, in order to display both dialogs. But …. the second dialog creates a process number but does not create the second dialog's GUI, (seems that when we create dialog with process, the process does not send the dialog to standard output).  So how do I run the second dialog with a process but send the dialog GUI to the screen, or is there some other solution in order to display both dialogs on screen?  My code       #!/bin/bash       # this dialog will locate the tail box on the top of the screen      dialog --begin 15 10  --tailbox   /var/log/proccess1.log  13 125         # this dialog will locate the tail box down in the screen      ( dialog --begin 37 10  --tailbox   /var/log/proccess2.log    13 125 ) &

Please look on my code – ( bash script )  I want to display both dialogs on the screen on the same time,   one dialog display the:  tail –f from - /var/log/proccess1.log  ,   and the second dialog display the:  tail –f from the file - /var/log/proccess2.log     but the sad fact is that I can display only one dialog and not both dialogs ( because when I run the first dialog , the second dialog will activate only if the first dialog will killed )   So I create process on the second dialog ( ….. ) &    , in order to display both dialogs    But …. the second dialog create process number but not create the second dialog GUI , ( seems that when we create dialog with process , the process not send the dialog to standard output )  So how to  run the second dialog with process but send the dialog GUI to screen ? , or other solution in order to display both dialogs on screen  My code       #!/bin/bash       # this dialog will locate the tail box on the top of the screen      dialog --begin 15 10  --tailbox   /var/log/proccess1.log  13 125         # this dialog will locate the tail box down in the screen      ( dialog --begin 37 10  --tailbox   /var/log/proccess2.log    13 125 ) &


After appending a div onclick is not working. Please help me.  jQuery(document).ready(function() {     jQuery(".chack").click(function(){         jQuery( "#pc_form" ).append('

apply
');     });      jQuery(".apply").click(function(){           alert();         });  });

apply here

click

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.


Can't Resolve Multiple Constant Driver  Error (10028): Can't resolve multiple constant drivers for net "NumOfPixCF[31]" at Pixel_Tracking.v(30) Error (10028): Can't resolve multiple constant drivers for net "NumOfPixCF[30]" at Pixel_Tracking.v(30) Error (10028): Can't resolve multiple constant drivers for net "NumOfPixCF[29]" at Pixel_Tracking.v(30)  And so on. Anyone knows how to solve this? I'm an amateur in Verilog coding. module Pixel_Tracking(     input[15:0] r1,r2,r3,r4,r5,r6,r7,r8,r9,r10,     input start,     input clk,rst,     output reg[5:0] Object_Shift=0 );      reg[15:0] R1,R2,R3,R4,R5,R6,R7,R8,R9,R10;     integer i=0;      integer NumOfPixCF=0,NumOfPixNF=0;     integer reposition = 0;     reg[15:0] AreaCF = 0,AreaNF = 0;       always@(posedge clk )     begin         if(rst)             begin                 reposition <= 0;                 Object_Shift <= 0;             end         else             begin                 for(i=0;i<=15;i=i+1)                     begin                         NumOfPixCF = NumOfPixCF + R1[i] + R2[i] + R3[i] + R4[i] + R5[i] + R6[i] + R7[i] + R8[i] + R9[i] + R10[i];                         NumOfPixNF = NumOfPixNF + r1[i] + r2[i] + r3[i] + r4[i] + r5[i] + r6[i] + r7[i] + r8[i] + r9[i] + r10[i];                     end                 if(NumOfPixCF > NumOfPixNF)                     begin                         Object_Shift <= 6'b000100; //Object moved away                     end                 else if(NumOfPixCF < NumOfPixNF)                     begin                         Object_Shift <= 6'b001000; //Object moved forward                     end                 else                     begin                         AreaCF = AreaCF + R1 + R2 + R3 + R4 + R5 + R6 + R7 + R8 + R9 + R10;                         AreaNF = AreaNF + r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10;                         if(AreaCF < AreaNF) //Object moved to the right                             begin                                 Object_Shift <= 6'b000010;                                 //reposition <= 1;                             end                         else if(AreaCF > AreaNF) //Object moved to the left                             begin                                 Object_Shift <= 6'b000001;                                 //reposition <= 1;                             end                         else //Object did not move                             begin                                 Object_Shift <= 6'b000000;                             end                     end             end         reposition <= ~reposition;     end      always@(reposition,start)     begin         if(start == 1)             begin                 R1 <= r1;                 R2 <= r2;                 R3 <= r3;                 R4 <= r4;                 R5 <= r5;                 R6 <= r6;                 R7 <= r7;                 R8 <= r8;                 R9 <= r9;                 R10 <= r10;             end          if(reposition == -1)             begin                 NumOfPixCF <= 0;                 NumOfPixNF <= 0;                 AreaCF <= 0;                 AreaNF <= 0;             end     end endmodule

I'm having problem with my verilog code when I synthesize it. It shows multiple drivers error. I think may be it's because of multiple always blocks I'm using in it. So how can I fix it!!? Here it is:  module check(csx,dcx,wrx,rdx,clk,d_out,res); input wire clk,res; output reg csx,dcx,wrx,rdx; output reg [7:0]d_out; reg [2:0]count;  always @ (res) begin   if (res==1)   begin     csx=1;     wrx=0;     rdx=1;     dcx=0;     count=0;     d_out=0;   end end  always @ (posedge clk) begin   count=count+1; end  always @ (count) begin   repeat(3'h5)   begin     if((count+res)==3'h2)     begin       d_out=8'h28;     end     else if(count==3'h3)     begin       csx=0;       wrx=1;     end     else if (count==3'h4)     begin       wrx=0;       csx=1;       d_out=8'h11;     end     else if (count==3'h5)     begin       csx=0;       wrx=1;     end   end end  endmodule


I want only one Thread to be active, here is the algorithm:  def myfunction(update):     if threading.activeCount >=1:         # kill all previous threads     while true:         # some execution   while true:     t = threading.Thread(myfunction, args=([update]))     t.start()   so In here thread goes in Infinite loop in myfunction, so before starting new one i need to close previous one, please guide me

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?


this is html view, when i click on Add Row button it will add a row and it works. but when i click on delete button it wont remove row added. how to make it works?  <input type="button" id="addButton" value=" Add Row " />

        <input id="itemcode1" placeholder="Item Code 1" class="itmcode" />	         <input id="itemname1" placeholder="Item Name 1" />	         <input id="itemdesc1" placeholder="Item Description 1" />	         <input id="itemamnt1" placeholder="Item Amount 1" class="itmamnt" />	         <input id="itemqty1" placeholder="Item Qty 1" class="itmqty" />	         <input id="total1" placeholder="Item Total 1" class="total" />

          Running Total 	           <input name="running_total" id="running_total" />

   and this is the js     My Question is: Every thing is working fine but how to remove each row on clicking delete button?? please help


So this is pretty obvious in what it is asking: To prove that anything between $0$ and infinity are part of the positive reals.  I feel kind of stupid for asking but I just don't even know where to start. The topic this question comes under is countable sets and bijections, not sure if that helps or not.

Prove that Real Numbers and the interval $(0,\infty)$ have the same cardinality.   Attempt:  Consider the function $f(x) = e^x$.   The domain of this function is all real numbers.  The range of this function is from $0$ to infinity.   Let $e^a = e^b$.   Then $\ln(e^a) = \ln(e^b)$  Then $a\ln(e) = b\ln(e)$  This means that $a = b$  Hence, $f$ is injective.   Let $c > 0$   Then $e^{ln(c)} = c$  Since $c > 0, \ln(c)$ is defined, so $f(\ln(c)) = c$  Therefore, f is surjective.   Then f is bijective.   Hence, $\mathbb{R}$ and $(0, \infty)$ have the same cardinality.


I have an org.bson.Document that I can convert into a JSON:  for (Document dc : list) {         String doc = dc.toJson();     }   And the String looks like:  { "_id": "C:\\Users\\santi\\Desktop\\2010-documents.biased\\99\\2010-99-086.html",   "data": {         "german": 1,          "metadata": 1,          "inform": 20,          "almanac": 1,          etc etc         }  }   I'm stucked at figuring how to access to the "data" field and get all the key-value values and store them into a HashMap or Map. I thought about spliting the array and getting some substrings etc but doesn't seem like a good way.

What is the best way to convert a JSON code as this:  {      "data" :      {          "field1" : "value1",          "field2" : "value2"     } }   in a Java Map in which one the keys are (field1, field2) and the values for those fields are (value1, value2).  Any ideas? Should I use Json-lib for that? Or better if I write my own parser?


I am a complete beginner. So, I might be dumb - sorry! I made a 3D model. Now, I want to work on its surface - which lead me to materials and shaders. So, I added a material and then opened the Node Editor. I pressed Shift+A to add a shader and I got the following:  There is no Shader in the list. So, could you please tell me how to get it? The Blender version I am using is 2.79b

I have been following  tutorial until I started adding nodes. The problem is that he has completely different nodes than I have. Even nodes that are created at start are different (I have Material and Output and he has Render Layers and Composite). Have I missed something or should I use different nodes than he?


Here's the question:     Let $f\colon \mathbb{R} \to \mathbb{R}$ be continuous which is also an   additive homomorphism, that $f(x+y)=f(x)+f(y)$ for all $x.y  \in\mathbb{R}$. Then show that $f(x)=\lambda x $ where $ \lambda = f(1)$.   Truth to be told, I have no idea how to solve this problem. Here's what the authors have discussed before this Exercise.     Let $J\subset \mathbb{R}$. Let $f\colon J\to \mathbb{R}$ be a function and $a\in J$. We say that $f$ is continuous at $a$ if for every sequence $(x_n)$ in $J$ with $\lim x_n =a$, we have $\lim f(x_n) = f(a)$. We also say that $f$ is continuous  on $J$ if it is continuous at every point $a\in J$.   They discuss few examples before dropping this exercise. $\epsilon- \delta$ definition of continuity has not been defined yet and this is the first section of the chapter.  I'd appreciate it if you give me some hints instead of solving it entirely.

Assume $f$ is a function over $\mathbb{R}$ satisfying $f(x+y) = f(x)+f(y)$ for all $x,y \in \mathbb{R}$. Show that if $f$ is continuous, then $f(x) = cx$ for all $x \in \mathbb{R}.$   I find it hard to use the definition of continuity to derive anything from the equation. I think we could write the definition of the limit in terms to get $$\forall \epsilon,\exists \delta \quad 0<|x-a|<\delta \quad \implies \quad |f(x)-L| < \epsilon.$$ I am not sure where to go from here.


What if I change my boarding station? Will it affect my RAC status? I booked an online ticket from KCVL to CDG RAC84 and the current status is RAC50. What if I change my boarding station to Mumbai will that affect my RAC status? What should I do now? I booked ticket of 12217. I will board from vasai. Tickets are not available from vasai thats why I book from kcvl. Should I change boarding point now? On ticket it shows boarding point kcvl.

I intend to travel on the Hampi express from SBC (Bengaluru City station) to Hospet. As only waitlisted tickets were available between these stations, I have booked my journey from Kengeri to Hospet and changed the boarding point to SBC. My ticket is currently .  How does seat allocation happen in such a situation? Is it based on the booking station or the boarding station?


It often happens to see accepted answers with very few votes floating at the top of the list before much more voted ones.  Actually which answer is more pertinent to the community ? The accepted one or the one with the most votes ?  Is there a good reason to emphasize an accepted answer with 1 vote vs an other answer with 100 votes ?

After reviewing ...  I'd like to make an argument for answers that have attained more votes than an accepted answer always be ranked above when answers are being sorted by votes (the default)...     Someone visiting this (older) question expecting a relevant answer would be assuming the big green check mark means that it is the correct answer today when in fact it's the correct answer when the question was originally asked.  Allowing votes to override the asker's time bound response, it allows the best answers to remain at the top and evolve with our ever changing field without requiring the asker to maintain their questions.  This would be a step in the direction of the site's ethos in my opinion, trusting the community to determine the best answer to place at the top for prospective visitors.


public static void main(String args[])     {         int[] a = {0, 1, 2, 3};         int[] b = {100, 101, 102, 103, 104, 105};         System.out.print(shuffleArrays(a, b));     }      public static int[] shuffleArrays(int[] a, int[] b)     {         int[] c = new int[a.length+b.length];         for (int i=0; i<b.length-1; i++)         {             if (i<a.length-1 && i<b.length-1)                 c[i] = c[i] + (a[i] + b[i]);             else if (i>=a.length-1)                 c[i] = c[i] + b[i];             else if (i>=b.length-1)                 c[i] = c[i] + a[i];         }          return c;     }   This is giving me an output of "[I@1837b90c". No idea why this is happening. Am I calling on the method incorrectly?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


My question: I'm looking for a taxonomy/bestiary/overview of machine learning techniques. I would like to learn 1) how these methods relate to each other, and 2) the relative costs and benefits (and perhaps typical applications) of the different approaches.     Background: I'm trained in statistics, and have a reasonably clear mental map of how a range of these techniques relate to each other. Understanding the costs and benefits of different techniques obviously makes it easier to select the best one to apply in different situations.   I would like to develop a similar mental map or taxonomy of the broader machine learning field. It's most important for me to understand the highest levels in the technique taxonomy, but I also recognise that there are major lower-level developments in some areas I should be aware of (e.g. neural networks seem to have a huge number of sub-classes).  I'm not looking for in-depth explanations of each method - though references would be great - but instead a framework I can use to focus my learning efforts in a more informed way.    focussed on statistical techniques is similar, in that the goal is to understand relationships between methods. But I'm looking for more than a 'cheat sheet'. I'd like to understand each at least at a basic level, and not just follow a set of rules on a flow chart.

I find resources like the  and  incredibly useful. They obviously serve well as references but also help me to organize my thoughts on a subject and get the lay of the land.   Q: Does anything like these resources exist for machine learning methods?  I'm imagining a reference card which for each ML method would include:   General properties When the method works well When the method does poorly From which or to which other methods the method generalizes. Has it been mostly superseded? Seminal papers on the method Open problems associated with the method Computational intensity   All these things can be found with some minimal digging through textbooks I'm sure. It would just be really convenient to have them on a few pages.


I'm trying to make a 8 meters(W) X 4 meters (H) banner on Photoshop, but I can't figure out the right resolution for it, and for the other stuff like "Colour Mode," etc.

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


i tried a lot of different methods and before it always worked! But last time I watched a tutorial on how to import a Minecraft world into it. Everything was working but when I wanted to see how it looks if it's rendered I get pink textures. And I can't see how to fix it. Now even with the old rigs, i used it won't work anymore. Could you guys help me?

I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?


This is the two problems I'm trying to solve: 1. A title, which I don't want here, appears in my TOC. How to remove it? 2. The command \cite{} does not work: any of my references appear in the dedicated section. I request your help. This is my MWE: \documentclass{beamer}     \usetheme{default}     \usepackage{soul}     \usepackage{framed,color}     %\definecolor{shadecolor}{rgb}{1.0, 0.8, 0.3}     \definecolor{shadecolor}{rgb}{0.74, 0.83, 0.9}     %\definecolor{shadecolor}{rgb}{0.95, 0.83, 0.86}     \useoutertheme[subsection=false]{smoothbars}     \usepackage[frenchb]{babel}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{helvet}     %%%%%%%%%%%%%%%%%paragraphes justifiés%%%%%     \usepackage{ragged2e}     \apptocmd{\frame}{}{\justifying}{} % Allow optional arguments after frame.     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setbeamertemplate{caption}[numbered]     \usepackage[labelsep=period]{caption}     %%%%%%%%%%%%%%%%%%%%%footline%%%%%%%%%%%%     \addtobeamertemplate{footnote}{}{\vspace{2ex}}     \setbeamertemplate{footline}[text line]{%       \parbox{\linewidth}{\vspace*{-8pt}Title\hfill\insertshortsubtitle\hfill\strut\insertframenumber/\inserttotalframenumber}}       %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \setbeamertemplate{navigation symbols}{}     %%%%%%%%%%%%%%%%%NUMÉROTATION TOC%%%%%%%%     \setbeamertemplate{section in toc}{\hspace*{1em}\inserttocsectionnumber.~\inserttocsection\par}     \setbeamertemplate{subsection in toc}{\hspace*{2em}\inserttocsectionnumber.\inserttocsubsectionnumber.~\inserttocsubsection\par}     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     %\useinnertheme{circles}     \makeatletter     \patchcmd{\beamer@sectionintoc}{\vskip1.5em}{\vskip0.5em}{}{}     \makeatother     \usepackage{graphicx}     \usepackage{hyperref}     %\usepackage{apacite}     %%%%%%%%%%%%%%%%PLAN%%%%%%%%%%%%%%%%%%%%     \AtBeginSubsection[]     {     \begin{frame}<beamer>     \frametitle{Plan}     \tableofcontents[       currentsection,       sectionstyle=show/show,       subsectionstyle=show/shaded/hide     ]     \end{frame}     }     %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \title{\textbf{Title}}     \subtitle[]{Colloque}     \author{My name}          \date{}               \begin{filecontents}{\jobname.bib}         @Book{Anzieu1993,     author = {Anzieu, Didier and Haag, Geneviève and Tisseron, Serge and Lavallée, Guy and Boubli, Myriam and Lassègue, Jean},      title = {Les contenants de pensée},      volume = {},      pages = {},      editor = {},      publisher = {Dunod},      address = {Paris},      year = {1993},      abstract = {},      keywords = {contenance; pensée; penser},     }          @Book{Anzieu1994,     author = {Anzieu, Didier},      title = {Le Penser. Du Moi-peau au Moi-pensant},      volume = {},      pages = {},      editor = {},      publisher = {Dunod},      address = {Paris},      year = {1994},      abstract = {},      keywords = {},     }          \end{filecontents}     \usepackage[]{apacite}               \begin{document}     \maketitle          \begin{frame}{\normalsize{Déroulement}}     \tableofcontents         \end{frame}               \section{Introduction}     \begin{frame}         \cite{Anzieu1993}                      \cite{Anzieu1994}     \end{frame}               \section{Développement}     \begin{frame}              \end{frame}                    \section{Conclusion}     \begin{frame}              \end{frame}          \begin{frame}     \bibliographystyle{apacite}     %\renewcommand{\bibliographytypesize}{\tiny}     \bibliography{\jobname}     \end{frame}     \end{document}

I have the following code:  \documentclass[a4paper,12pt]{article} \usepackage[margin=2cm]{geometry} %showframe \begin{document} \tableofcontents \newpage \section*{Abstract} \section{Introduction} \newpage \bibliographystyle{apacite} \bibliography{references} \end{document}   And when I create the table of contents it adds the "References" in the TOC, how can I remove this to not be included in TOC? So far I have tried something like   \bibliography*{references}


If you look at Stackoverflow.com's source you'll see the reference to their css file is:  <link href="/Content/all.min.css?v=2383" rel="stylesheet" type="text/css" />   How is this done so they can pass a version via query string and have the correct CSS file served up?

I was browsing the html of my favorite site...ahem...and I saw this in the markup:  <link href="/Content/all.min.css?d=20090107" rel="stylesheet" type="text/css" />   what does "?d=20090107" do? I'm assuming it's a date of some kind, but I'm not sure why it's in the path to the file. Any ideas?


How does one show that there are infinitely many primes congruent to 5 modulo 6 without using Dirichlet's theorem?

Problem: Prove that there are infinitely many primes of the type 5 mod 6.  My professor did the problem and the proof was horribly long. Can someone show me a shorter version of the proof of this problem.


$A$ = $\{X\subseteq \mathbb N : |X| = \aleph_0\land |\bar X| \lt\aleph_0  \} $   I need to find the cardinality of group A.  As I understood, I need to find a function that helps me determine the cardinality.  Any ideas?

Let $X= \{ A \subset \mathbb{N} : \mathbb{N} \backslash A \text{ is finite}\}$. What is the cardinality of $X$? Prove it.  For me the cardinality should be the same as the natural numbers. I am trying to show a way of ordering it, the first A is one with the smallest numbers and so on.


Is it possible $\sin\alpha=\cos\alpha=1?$ We have defined trigonometry using a unit circle. The point $X(1;1)$ does not lie on the trig circle, right? Does this mean that $\alpha$ does not exist?

How do I solve the following equation?  $$\cos(x) - \sin(x) = 0$$   I need to find the minimum and maximum of this function:   $$f(x) = \frac{\tan(x)}{(1+\tan(x)^2}$$  I differentiated it, and in order to find the stationary points I need to put the numerator equal to zero. But I can't find a way to solve this trigonometric equation.


Is it possible to get "printout" on a single PDF file of selected questions and selected answers? This is for convenient reference. Wikipedia has a feature which allows users to compile topics into a "booklet". If this feature doesn't exist, it would a good idea to include it if possible.

Is it possible to group SO questions and export them in PDF format?  Sometimes I like reading offline better than reading on my screen. In this case, I prefer to print stuff. This could also be nice as reference reading, for example for in a waiting room or on the toilet at the office :).  I recently learned about the beauty of the book creator on Wikipedia. Is there anything like it on Stack Overflow? I found only , but it is about a single question with multiple answers, while I'd like to group related questions with answers into one PDF.


I have a blog posts table and a blog post tags table. One post has many tags. I first did this with a call to posts then a loop and call the tags table, but this resulted in 9 queries per page just to get the posts. I have rewritten this to use a join, but it returns duplicate blog posts rows.  SELECT p.timestamp      , p.title      , p.postcontent      , p.siteid      , t.tag    FROM user_blogposts p   LEFT    JOIN user_blogposttags t     ON t.postid = p.id   WHERE p.userid = 1   LIMIT 8   This query returns the data I want, but if there are 5 tags per post, each post will be duplicated 5 times with only the tag field being different. I can't use GROUP BY as this will return 1 row with 1 tag for each post and break the one to many connection.  Is there a way to return an array for the many join so that I only get 1 row for the post and then the tag column is an array or comma delimited string for me to work with rather than having to filter out all of the duplicate data.

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?


I'm from the UK, currently living in China with a valid Z Visa. Both my visa and passport expire in April 2017. I plan to take a quick break in America before I return home and I need to start booking flights etc asap. Problem is I will have to get a new passport before it expires as the US does not permit entry with a passport that's due to expire within six months of the date of departure from USA.  If I get a new passport now and keep my old passport, can I still provide this to the police if I have a random spot check between now and April or does the new passport void the visa?  Also, will airport security have any issues with me leaving the country with my visa being on my old passport?

Will my Chinese visa still be valid if I renew my passport? If so how does that work?  I have heard that you can travel with your new passport and just show the old passport with the valid visa when entering China. Has anyone done that? Recently?   I have also been told that you have to get a new visa, which seems somewhat logical but frustrating, especially when my Chinese visa is only a few months old.  My Chinese visa was issued in late Nov 2014 and I heard the rules changed between the US and China. My visa says it's good for 10 years and my US passport expires in 5.


I am puzzled on how to pronounce cha- words. For example, I know that "chameleon" or "chamomile" are pronounced with a hard "c" like in "camel", not with a soft "c" like in "change". "Charity", on the other hand, is pronounced as in "change".  Is there some rule to infer the correct pronunciation?

Is there a rule to understand how the group "Cha" has to be pronounced?  "Character" sounds with a hard first syllable, while "Charm" sound softer, but I don't find how to tell which sound to use before earing someone saying the word. It could be because of the double consonant "rm" vs "ra"? Or is it just a matter of knowing the rule for every single word?  EDIT: More specifically, let's talk about UK English pronunciation.


I have my data in an Excel sheet.   How do i convert it to CSV and shapefile for use in QGIS?

I have an Excel file containing data collected over many years as latitude and longitude coordinates for archaeological sites. How can I import it into QGIS as a new layer?


I'm trying to change the content of a string (from user's input), I'd like to remove any character that will let my query fail. For example, if I insert a second name with a " ' " in it, the query will fail.  Since I have to then output these rows from the DB, I'm wondering if there's any way to insert the string in the database while replacing the special character with its HTML value so that when I'm outputting it, the browser will do the rest.  I'm leaving you an example:  $string = $_POST['user_input']; // Let it be Lol'd $sql = "INSERT INTO table(field) VALUES('$string')";   Now without anything done to the string I'd get the query as:  INSERT INTO table(field) VALUES('Lol'd')  What I'm looking for is something to turn the ' into &#39; so that in the DB it's saved Lol&#39;d but when I echo it it'll just print Lol'd

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


I noticed this yesterday, but perhaps it has been occurring for longer. When I used to respond to a message in chat with an uploaded image, it would properly link my one-boxed image back to the message I was responding to. Now, however, when I hit the button to reply to a message and then upload an image, it posts the image and chops out the :number portion that identifies it as a response to a previous message. I then have to go edit the response id back in manually.  I'm assuming this is a bug rather than an intentional change in behavior.  The steps to reproduce are:   Hit the "Reply" button to a message in chat. As usual, the chatbox will automatically fill in something like below.  Hit the upload button. Select a file for upload. The posted message will no longer be response to the previous message as it used to be (in other words, the :15389654 will be gone). You can edit it back in manually and it works fine.

When I click the arrow icon to start a reply to a chat message, the text field is prepended with a colon followed by the message ID. This also works even if you've entered something in the text field, so  Replying to somebody   becomes  :1234567 Replying to somebody   But since an image upload will submit immediately, I have to start the reply before uploading.  But that doesn't work either. The message ID that's prepended ends up being erased and replaced with the image URL before the upload submits. I have to edit to include the message ID to turn it into a reply, and since editing a message with a onebox causes the onebox to reload, it can get distracting.  Can we please preserve the message ID so  :6059107   becomes  :6059107 http://i.stack.imgur.com/uzFM3.png   and not  http://i.stack.imgur.com/uzFM3.png   instead so I don't have to edit it or upload it separately?  EDIT [11/20]: just found out that the upload button is totally disabled when the field isn't empty now. I guess it's to stop any message being completely replaced with the upload URL, so perhaps seeing it from that perspective, it's a good thing. It doesn't exactly help matters here, though.


A group of 11 scientists are working on a secret project, the materials of which are kept in a safe. They want to be able to open the safe only when a majority of the group is present. Subsequently the safe is provided with a number of different locks, and each scientist is given the keys to a certain number of these locks. How many of these locks are required, and how many keys must each scientist have?   I guess number of locks required should be 11C5 + 1. Can someone please verify this and also I can't figure out how to calculate number of keys

Eleven scientists want to have a cabinet built where they will keep some top secret work. They want multiple locks installed, with keys distributed in such a way that if any six scientists are present then they can open all the locks, but if only five are present then they cannot open all the locks. What is the minimum number of locks on the cabinet that would satisfy these conditions?


I came across the following multiple-choice question:     She devoted herself to (      ) for poor people.   The choices are:   caring care be caring have cared   As the preposition "to" can be followed by either noun or gerund (...ing), the most suitable answer is #1, "caring." And I am OK with this.  However, some of my students chose #2 care, as the word can be noun. Is "She devoted herself to care for poor people" an acceptable sentence? I feel it a bit odd, and feel like adding something like "the" to make "the care," but I'm not pretty sure.   I'd appreciate it if anyone could give me some advice on this from native  speaker's point of view.

Some verbs are followed by ing, e.g. I enjoy swimming. We can't say I enjoy to swim. Likewise, some verbs are followed by to, e.g. I decided to make a plan.   Which particular verbs are followed by ing and to? Can you please provide a list for that?  Moreover, which verbs can be followed by both without having the meaning changed?


Please understand, I searched for this and it already has an . However I'm looking for a different way to get this result. This could potentially be flagged as a  although I think there is a cleaner answer for this possibly using  (most likely groupby).  Say I have a list data. And I want 3 values at a time assume the list is number of valuesⁿ long as to rule out improper amount of values at the end.  data = [1, 2, 3, 4, 5, 6,...]   Here's how I'd like to iterate through the list (this code wouldn't work obviously):  for a, b, c in data:     #perform operations     pass   Now with the code above I'd like a, b, c to be 1, 2, 3 then 4, 5, 6 respectively in each iteration. I'm sure there's a cleaner approach out there than the one in the answer I linked to.  For the lazy people that don't want to click on a link to see the approach I'm referring to, here it is:     You can use slices if you want to iterate through a list by pairs of successive elements:  >>>myList = [4, 5, 7, 23, 45, 65, 3445, 234] >>>for x,y in (myList[i:i+2] for i in range(0,len(myList),2)): print(x,y)  4 5 7 23 45 65 3445 234

I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like "C-think", though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite "feel" right, though.  :-/ Related question:


I have a visa type D (multiple) for Italy. My flight has a stop in Barcelona. Would it cause any problem for me that my first time entry to Schengen is not to Italy? My stop there is for 4 hours and I am not going to leave the airport.

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


I've been searching for hours and can't find an answer to this.  I open Tails installer through the application finder, click install and select "tails-i386-2.11.iso".  I then click the USB that I am using SanDisk Ultra Fit (124.2 GB) - /dev/sda.  I click Install Tails and I receive this error:  tails-i386-2.11.iso selected Unmounting mounted filesystems on '/dev/sda' GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorized: Not authorized to perform operation Tails installation failed! udisks-error-quark: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorized: Not authorized to perform operation (3)   I have sudo -s enabled, and I have tried GNOME and it still will not load it up.

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


Let X1,X2,...,Xn be a random sample of size n=72 from a distribution with pdf f(x)={1/x2    1<x<infinity 0      otherwise Find the probability that more than 50 of the observations of the random sample are <3 (less than 3).

Let $X_1,X_2,...,X_n$ be a random sample of size $n = 72$ from a distribution with probability density function $f(x) =\begin{cases} 1/x^2,& 1 < x < infinity\\0,&\text{otherwise}\end{cases}$ Compute approximately the probability that more than $50$ of the ob- servations of the random sample are less than $3$.


I am very new to Ubuntu. The reason I came here and asked the question is that I lost my windows XP CD for my old laptop. My laptop has a P4 CPU, 1GB RAM and 50GB HDD (7200 rpm). I googled for the alternative OS to XP, and there were at least thousands of results returned. Yet, some of the experts in forum (MakeUseOf) recommended Xubuntu and Lubuntu. :  But I am lost. What are Xubuntu and Lubuntu? Are they better than Ubuntu alone? I am just looking for a free OS with rich UI and easy to use for my old laptop.

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


I'm trying to use the boolean difference tool to cut holes in a plane with a mesh. Whenever I try I end up with a weird 3d object completely different from the plane that I'm looking for. Am I approaching this in the wrong way?

I'm attempting to cut a hole in a plane. I added a cylinder object, added the Boolean modifier to the plane, selected "cylinder" and "Difference", but no hole is made. The lower half of the cylinder just highlights, moving/deleting the cylinder reveals a hole-less plane.      How can i cut a hole in the plane?


This is a followup to : I have this assignment in college:  You are to design a Mealy state diagram for a safety device. Assume that two debounced push-buttons, A and B, are available to enter the combination. An electromechanical interlock guarantees that the buttons cannot be activated simultaneously. The lock should have the following features: The combination is A-A-B-A-B-A. If this sequence is correctly entered, an output signal is asserted that causes the lock to open. For any state, three B pulses in a row should guarantee to reset the control to its initial state. When any out-of-sequence use of the A push-button occurs, an output is asserted that rings a bell to warn that the lock is being tampered with. Once the lock is open, pressing either A or B will cause the lock to close without signaling an error. Draw a Mealy state diagram for this finite state machine. Indicate what each state represents and what input conditions cause state and output changes. Not everything may have been specified, so write down any assumptions you make.  I have to implement this Mealy machine using D flip-flops and MUX'es. I have 10 states for my machine: S0 -> "Input Start" // Nothing happened S1 -> A S2 -> AA S3 -> AAB S4 -> AABA S5 -> AABAB S6 -> AABABA -> this means EXIT S7 -> B S8 -> BB S9 -> A -> "ALARM ON"  *****Machine States   DIFFERENCE: -> My request is if somebody can show me the way to do the Truth Table for this machine please?

I have an assignment in college and I would like to ask some questions:  You are to design a Mealy state diagram for a safety device. Assume that two debounced push-buttons, A and B, are available to enter the combination. An electromechanical interlock guarantees that the buttons cannot be activated simultaneously. The lock should have the following features: The combination is A-A-B-A-B-A. If this sequence is correctly entered, an output signal is asserted that causes the lock to open. For any state, three B pulses in a row should guarantee to reset the control to its initial state. When any out-of-sequence use of the A push-button occurs, an output is asserted that rings a bell to warn that the lock is being tampered with. Once the lock is open, pressing either A or B will cause the lock to close without signaling an error. Draw a Mealy state diagram for this finite state machine. Indicate what each state represents and what input conditions cause state and output changes. Not everything may have been specified, so write down any assumptions you make.  I have to implement this Mealy machine using D flip-flops and MUX'es. I have 10 states for my machine: S0 -> "Input Start" // Nothing happened S1 -> A S2 -> AA S3 -> AAB S4 -> AABA S5 -> AABAB S6 -> AABABA -> this means EXIT S7 -> B S8 -> BB S9 -> A -> "ALARM ON"  *****EDIT to add machine pic   My questions are:  From what should I start in creating the truth table (on this specific assignment -- How can I think the necesarry flip-flops and MUX'es)? How can I create this specific diagram? Using only MUX'es and D-Flipflops?


Suppose that $p$ is a prime of the form $4k + 1$. I'm trying to prove that there exist nonzero integers $a$ and $b$ such that $p^2 = a^2 + b^2$. I begin by noting that $p$ itself can be written as the sum of two squares, since it does not have any prime factors of the form $4k+3$ (this is a theorem from my discrete math textbook: a positive integer $n$ can be represented as the sum of two squares if and only if every prime divisor of $n$ of the form $4k+3$ appears in the canonical representation of $n$ with an even exponent). We thus have $p=u^2+v^2$, and $p^2 = u^4+2u^2v^2+v^4$. I now need to prove that the right-hand side is the sum of two squares, but I'm lost. Obviously, it can be written as the sum of four squares, but that's not what I'm trying to show. Any hint or nudge in the right direction would be appreciated.

For any natural number $n\ge 1$, given pairs $(a_1,b_1),(a_2,b_2),...,(a_n,b_n)$ of integer numbers, there exist integer number $c$ and $d$ such that  $$\prod_{i=1}^{n}(a_i^2+b_i^2) = c^2+d^2$$    My initial approach is  Base Case: $(a_1^2+b_1^2) = a_1^2+b_1^2$ which is true. (Although it is trivial)  Prove the statement is true when $n=2$: We have $$(a^2+b^2)(c^2+d^2) = (ac-bd)^2+(ad+bc)^2$$ (Thanks André Nicolas for pointing it out)   So if $a,b,c,d$ are integers, $ac,bd,ad,bc$ are all integers and integers are closed under addition and subtraction. Hence $(ac-bd),(ad+bc)$ are integers.   Inductive Hypothesis: $\prod_{i=1}^{n}(a_i^2+b_i^2) = c^2+d^2$ is true  Inductive Step: $$\prod_{i=1}^{n+1}(a_i^2+b_i^2) = \prod_{i=1}^{n}(a_i^2+b_i^2)\cdot (a_{n+1}^2+b_{n+1}^2) = (c^2+d^2)\cdot (a_{n+1}^2+b_{n+1}^2)$$  Where $c$ and $d$ are integers.   But when we apply $n=2$, we have  $(c^2+d^2)\cdot (a_{n+1}^2+b_{n+1}^2) = (e^2 + f^2)$ where $e$ and $f$ are integers.  Hence, by the principle of induction, the statement we needed to prove is true.


i need to understand, what is meant by allow unsafe code?    and there is safe and unsafe code ?

Can someone give an example of a good time to actually use "unsafe" and "fixed" in C# code? I've played with it before, but never actually found a good use for it.   Consider this code...  fixed (byte* pSrc = src, pDst = dst) {     //Code that copies the bytes in a loop }   compared to simply using...  Array.Copy(source, target, source.Length);   The second is the code found in the .NET Framework, the first a part of the code copied from the Microsoft website, .  The built in Array.Copy() is dramatically faster than using Unsafe code. This might just because the second is just better written and the first is just an example, but what kinds of situations would you really even need to use Unsafe/Fixed code for anything? Or is this poor web developer messing with something above his head?


I have one character idle animation running inside a game in a loop, over and over again. A a certain time I trigger another animation to be played, for the same character.  The second animation won't play immediately, as will be a discontinuity in my character animation. First I wait for the idle animation to finish and then I play my second animation. Now I have a smooth, continuous animation, BUT I have introduced a delay between my action and character animation.  If I play the second animation right away as it is triggered, the character animation won't be continuous and smooth.  I was thinking on breaking the idle animation in small pieces and also to have the same number of second action animations to match the last frame of the idle pieces. This won't solve the delay completely, only will minimize it a bit.  So it's a magic formula of how can I get rid of this delay?  Thanks.

I'm pretty new to this whole animating models thing. Just learning the ropes. I got a nice walking animation going, which I can loop while a character is walking, but what about when they stop walking?  I mean, they could be at any point in the animation at the time the player stops walking. How do I get them to smoothly return to a standing still position without having them snap into that position? The same goes for starting walking from a standing still position. Do you need a separate animation? How is this dealt with?


I am trying to design a simple 3x3 sliding puzzle game. The only tile you can move is a blank tile and this can be swapped with any of its neighbouring tiles. There is currently no final goal for the game but I have had trouble implementing the puzzle and being able to swap tiles. I keep getting java null pointer exception when I test out my swap methods and can't seem to fix this. I am aware what this error is but can't see why it occurs in my code.  public class Game() {      public Node[][] buildPuzzle() {          Node[][] puzzle = new Node[3][3];          Node One = new Node("1", 0, 0, null, puzzle[0][1], null, puzzle[1][0]);         Node Two = new Node("2", 1, 0, null, puzzle[1][1], puzzle[0][0], puzzle[2][0]);          Node Three = new Node("3", 2, 0, null, puzzle[2][1], puzzle[1][0], null);          Node Four = new Node("4", 0, 1, puzzle[0][0], puzzle[0][2], null, puzzle[1][1]);         Node Five = new Node("5", 1, 1, puzzle[1][0], puzzle[1][2], puzzle[0][1], puzzle[2][1]);         Node Six = new Node("6", 2, 1, puzzle[2][0], puzzle[2][2], puzzle[1][1], null);          Node Seven = new Node("7", 0, 2, puzzle[0][1], null, null, puzzle[1][2]);         Node Eight = new Node("8", 1, 2, puzzle[1][1], null, puzzle[0][2], puzzle[2][2]);         Node blank = new Node("blank", 2, 2, puzzle[2][1], null, puzzle[1][2], null);      }      public void swapAbove (Node[][] puzzle, Node blank, Node blankAbove) {          if (blank.getLabel() == "blank" && blankAbove != null){              Node temp = blank;             Node temp2 = blankAbove;             blank = temp2;             blankAbove = temp;              puzzle[temp.getX()][temp.getY()] = blankAbove;             puzzle[temp2.getX()][temp.getY()] = blank;          } else {               System.out.println("Invalid Move");          }      }      //also have swapUp swapLeft and swapRight methods }   Here is my Node class:  public class Node {      String label;     int x;     int y;     Node above;     Node below;     Node left;     Node right;      public Node(String label, int x, int y, Node above, Node below, Node left, Node right) {             this.label = label;             this.x = x;             this.y = y;             this.above = above;             this.below = below;             this.left = left;             this.right = right;     }      //also have accessor methods for my variables  }

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?


"Compute $(1 + i)^{1000}$.  So far I have: $(1+i)^{4 (2^2 5^3)} $ but I am not sure how to proceed. Ideas?

How do I find $(1+i)^{100}$ without expanding $(1+i)$ 100 times?  Is there a quicker way to do this?  The hint was to find the modulus and argument of $1+i$ which I've got as $\sqrt{2}$ and $\pi/4$ but I'm not sure what to do from here.


YouTube now has live video. How do I set that up for myself? I can't find information about live streaming anywhere.

Nowadays, I see a lot of users live streaming on YouTube and wanted to try it for myself. However, when I go to my channel I don't see an option for live streaming.  I tried researching how to do this on YouTube and Google, but without luck.  So I was wondering, how can I live stream on YouTube?  I don't have any pro account or any of that, but I've watched livestreams from users who I don't think have pro accounts either.  So livestreaming is open for everyone, right?


"This is called a multiple linear regression model because more than one regressor is involved. The adjective linear is employed to indicate that the model is linear in the parameters β 0 , β 1 , . . . , β k , not because y is a linear function of the x ’ s. We shall see subsequently that many models in which y is related to the x ’ s in a nonlinear fashion can still be treated as linear regression models as long as the equation is linear in the β ’ s.” This is a quote from a text book. What I’m trying to understand is the last part, what does “ the equation is linear in the $\beta$’s” mean? In the same vein, how do we check if the equation is linear in the $\beta$’s? Thank you!

I am using linear equation to find the correlation of values of x, y and z  3x + 4y + 2z = 6 4x + 1y + 4z = 17 8x + 2y + 5z = 9   I would like to know the difference between linear equation and linear regression. Is it the same in approach?


My machine which is running on Ubuntu 16.0.4.3 is freezing after some time of usage. I tried most of the solutions from  and nothing seemed to help.   My laptop is HP R007tx with 2gb nvidia 820M graphics card

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


How can I add line number to my algorithm? I want to write line number in the front of the algorithm line. How can I get that with the \usepackage[ruled]{algorithm2e}?  Code:  \documentclass{article} \usepackage[ruled]{algorithm2e} \renewcommand{\baselinestretch}{1.5}  \usepackage{listings} \usepackage{blindtext} \begin{document} \blindtext  \vspace{1cm}  \begin{algorithm}[H]    \SetAlgoLined    \KwData{$next\_id, speed,stop\_distance, mac$}    \KwResult{Find the initializer. }    int $next\_id1$ = find a  record with $speed > 30$ \\ for this $mac$ in the next table;\\    int $next\_id2$ = find record with $speed <7$ and \\ $stop\_distance < 60$ for this mac in the next table;\\    \If{$next\_id1 < next\_id2$}{       find the related $stop\_name$ for this mac;\\       return  $stop\_name$;    }    \caption{Algorithm to find intializer.} \end{algorithm} \vspace{1cm} \begin{lstlisting}[caption = {MYSQL query to find the initializer.}, label={lst: initializer}] SELECT speed, stop_name from next where stop_distance < 60 and speed < 7   and mac = ? and next_id > ?  LIMIT  1 \end{lstlisting}  \clearpage \end{document}

I am trying to write some pseudocode. How can I add two line to the algorithm at the top and the bottom as well as adding line number.  Code:  \documentclass{article} %\usepackage{algorithmic}% http://ctan.org/pkg/algorithms \usepackage[]{algorithm2e} \begin{document} \begin{algorithm}[H] \SetAlgoLined \KwData{latitude, longitude, mac, route, direction} %\KwResult{how to write algorithm with \LaTeX2e }  initialize $list$ as an empty  list of integers. \\ %\While{not at end of this document}{ %read current\; $list$ = Get stop Order from behaviour; \\ \eIf{list size > 0}{   find the last stop name in the behaviour table of this mac; }{   find the closet stop of the producer current location; \\   insert it into next table; \\   find initializer; \\   \eIf{initializer is available}{      get the initializer stop name;  \\      restore all stop name for this mac to the behaviour table;    }  } \caption{Detection algorithm.} \end{algorithm}  \end{document}


So sorry if this is a total newbie question, but I can't seem to find any answers to my question out here on the great web...  I'm building a site, where it depends that some of the data on the page needs to be updated automatically....  More specific, when a change is made in the MySQL Database. Let's say for instance that the value of a row in the database is 10, and that changes to 11, I need the page to automatically get this from the database, and update it on the site. Also, if possible, is there any way I could make the numbers "pop out" a little bit, when the actual data is changing?

Test Data Change

231

7

14532

   Let' say that these numbers are fetched from the database, how would I use 'AJAX' to auto change this data when a change is made to the database?  If this is possible at all, I would appreciate every contribution.....

Of course I am aware of Ajax, but the problem with Ajax is that the browser should poll the server frequently to find whether there is new data. This increases server load.  Is there any better method (even using Ajax) other than polling the server frequently?


This is my first time attempting a big project in C++, and I wanted to create a game in SFML. I divided my program into a bunch of classes that included each other, and that's where I am getting my error. I have three main classes, Game, State, and Entity. The main.cpp includes the Game.h file and starts the game. The Game.h file is where all the SFML includes are. Here is a simplified version of my code.  main.cpp #include "Game.h"  int main() {     // starts the game here }  Game.h #ifndef GAME_H #define GAME_H  #include "State.h" // All the SFML includes and other standard library includes are here  class Game { }  #endif  State.h #ifndef STATE_H #define STATE_H  #include "Entity.h"  class State { }  #endif  Entity.h #ifndef ENTITY_H #define ENTITY_H  #include "Game.h"  class Entity { }  #endif  Theoretically, State.h should be able to access the SFML functions because it is including Entity.h which is including Game.h which is including SFML. But when I add SFML functions into either State.h and Entity.h, visual studio doesn't show any errors until I compile it, where it says that the functions aren't defined.

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I'm trying to install Drox Operative on a laptop I just converted to running Ubuntu, and I'm getting this error whenever I try to run the game:  sudo ./DroxOperative./DroxOperative: error while loading shared libraries: libopenal.so.1: cannot open shared object file: No such file or directory   From what I can tell, this is a fairly common error to run into, but I can't find how to fix it.  What's going on here and how do I fix this? I know I need to install OpenAL, but I've done that already. From what I can gather, I'm getting an error because the game is a 32-bit application, and I installed 64-bit OpenAL. Where can I find the latest version of 32-bit OpenAL

I want to play the game Aquaria in a Debian Wheezy 64 bits. The installation went ok, but when trying to play the game I get these errors:  ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so ALSA lib control.c:951:(snd_ctl_open_noupdate) Invalid CTL hw:0 AL lib: alsa.c:1000: control open (0): No such file or directory Message: SDL_GL_LoadLibrary Error: Failed loading libGL.so.1   I have added 32 bit compatibility with dpkg --add-architecture i386 and I think that the required libraries are present in the system since typing locate libasound_module_conf_pulse.so yields:  /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_conf_pulse.so  and locate libGL.so.1:  /etc/alternatives/glx--libGL.so.1-x86_64-linux-gnu /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1 /usr/lib/mesa-diverted/i386-linux-gnu/libGL.so.1.2 /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1 /usr/lib/mesa-diverted/x86_64-linux-gnu/libGL.so.1.2 /usr/lib/x86_64-linux-gnu/libGL.so.1 /usr/lib/x86_64-linux-gnu/fglrx/fglrx-libGL.so.1.2 /usr/lib/x86_64-linux-gnu/fglrx/libGL.so.1   However, it seems that Debian is ignoring them. What can I do to play Aquaria?  EDIT 1: ldd aquaria  linux-gate.so.1 =>  (0xf77e1000) libSDL-1.2.so.0 => /opt/Aquaria/./libSDL-1.2.so.0 (0xf7748000) libopenal.so.1 => /opt/Aquaria/./libopenal.so.1 (0xf76fa000) libstdc++.so.6 => /opt/Aquaria/./libstdc++.so.6 (0xf760d000) libm.so.6 => /lib/i386-linux-gnu/i686/cmov/libm.so.6 (0xf75c3000) libgcc_s.so.1 => /opt/Aquaria/./libgcc_s.so.1 (0xf75b8000) libc.so.6 => /lib/i386-linux-gnu/i686/cmov/libc.so.6 (0xf7455000) libdl.so.2 => /lib/i386-linux-gnu/i686/cmov/libdl.so.2 (0xf7451000) libpthread.so.0 => /lib/i386-linux-gnu/i686/cmov/libpthread.so.0 (0xf7437000) librt.so.1 => /lib/i386-linux-gnu/i686/cmov/librt.so.1 (0xf742e000) /lib/ld-linux.so.2 (0xf77e2000)


I have an exam in two hours and this is one of the exercises in my textbook that I have problem with, I tried solving it using the main theorems but i couldn’t figure it out. The question goes: If G is a nonabelian group with order of $p^3$ which p is a prime number then prove $G’=Z(G)$ A hint or an answer would be appreciated .

Question  If $|G|=p^3$ and $G$ is not abelian show that $G'=Z(G)$  Attempt   Since $|G|=p^3$ then $G$ is solvable and let $$1\leq G^{(n-1)}\leq...\leq G^{(n)}=G,(1)$$  be its derived series.We know that $G^{(n-1)}$ is an abelian subgroup of $G$ so $|G^{(n-1)}|=p$ or $p^2$ (since $G$ is not abelian).Hence we have that $\bigg|\dfrac{G}{G^{(n-1)}}\bigg|=p$ or $p^2$ so $\dfrac{G}{G^{(n-1)}}$ is abelian $\Rightarrow G'\leq G^{(n-1)}$ so $(1)$ is $1\leq G' \leq G,(2)$.   Furthermore, $Z(G)\not=1$ (since $G$ is a $p-$group) and $\dfrac{G}{Z(G)}$ is abelian $\Rightarrow G'\leq Z(G)$  Is this correct so far? How could I continue?


I am using IEEEtran as bibliographystyle which presents the citation as numbers. In some text I need to write the name of authors. However, IEEEtran can only use \cite{..} to give numbers. I would like to ask how can I use multiple bibliographystyle that don't make conflicts (i.e., give the ability to cite by numbers \cite{..} or author name \citep{..} in the text, having the same list of Biblography as numbers at the end of the document)

For school I have to write a paper and use the IEEEtran bibliography style:  \bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography database(s) \bibliography{IEEEabrv,bibliography.bib}   Now I want to include the natbib package so I can cite my papers in the following way:     Cook et. al. [1]   The entry for that cite in my bib file is as follows:  @ARTICLE{cook2009ambient,   author = {Cook, D.J. and Augusto, J.C. and Jakkula, V.R.},   title = {Ambient intelligence: Technologies, applications, and opportunities},   journal = {Pervasive and Mobile Computing},   year = {2009},   volume = {5},   pages = {277--298},   number = {4} }   Now if I include the natbib package it complains: "natbib bibliography not compatible with author-year citations" So I load it with option numbers but then my authors are not shown in the latex file.  So how can I cite in the explained way? Without changing anything of the bibliographystyle option. Thanks!  EDIT: I included the template we start with from school:      \documentclass[10pt,journal,compsoc,twoside,a4paper]{IEEEtran}     \usepackage{cite}     \usepackage[pdftex]{graphicx}     \usepackage[cmex10]{amsmath}     \usepackage{algorithmic}     \usepackage[tight,normalsize,sf,SF]{subfigure}     \usepackage{url}       \hyphenation{}      \begin{document}     \title{Butler Robot Localization Using Dash7 Technology}      \author     {              \thanks             {              }     }      \IEEEcompsoctitleabstractindextext{%     \begin{abstract}      \end{abstract}      \begin{IEEEkeywords}      \end{IEEEkeywords}}      % make the title area     \maketitle     \pagestyle{empty}     \thispagestyle{empty}     \IEEEdisplaynotcompsoctitleabstractindextext     \section{Example}     Example!      % references section  \bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography database(s) \bibliography{IEEEabrv,bibliography.bib}  \vfill  \end{document}


I am currently farming Heart Scales from Luvdiscs. Looking at the fact I am not moving, but just fishing then thieving with Malamar, I was wondering if I could possibly get a Shiny out of it. What will interrupt my "Chain Fishing"? Does going to my inventory to take the heart scale cancel it? What about using a PP O-Power?

How exactly do I chain fish in Pokemon X and Y? Do i have to talk to the super rod fisherman, or what. I fish every time after the last, but I have no way to know if it is working or not. I run at the end of every battle instead of KO'ing due to limited PP.


How would it be possible to have graphic expression of level of difficulty in  like in Stewart's book? Let say, to have those colored rectangles around the exercise number.

If I use this code provided by a question formulate of Sebastian .  \documentclass{article} \usepackage[most]{tcolorbox} \usepackage{lipsum}  \newtcolorbox[auto counter]{problem}[2][]{% breakable, blankest, enhanced, attach boxed title to top left={yshift=-\tcboxedtitleheight}, left=\tcboxedtitlewidth+1mm, top=0pt, colback=white, fonttitle=\bfseries\sffamily, coltitle={cyan!60!black}, colbacktitle=white, colframe=white, title=\thetcbcounter,  overlay unbroken and first={% \node[fill=gray!30, inner sep=1pt, minimum width=\tcboxedtitlewidth,  outer sep=0pt, text=cyan!60!black, anchor=north] at(title.south)  {\foreach \i in {1,...,#2}{\if#2gt1{\,}\fi$\bullet$}};},#1}  \begin{document}  \lipsum[1]  \begin{problem}{1} \lipsum[2] \end{problem}  \begin{problem}{4} \lipsum[3] \end{problem}  \begin{problem}{2} \lipsum[4] \end{problem}  \end{document}   How could we create solutions environment, so we have at the end of the book solution of the exercises where each one have reference to chapter, page, number of exercise with the corresponding level of difficulty?


Let $S=A\cup B\cup C$, $A$, $B$ and $C$ are mutually disjoint. Clearly, $C=S-(A\cup B)=(A\cup B)^c$. How do we derive this identity? Or it's supposed to be obvious (and it is) from the fact that ${A, B, C}$ is a partition of $S$? It's used in my textbook but the author never mentioned where it came from.

From wikipedia:     Equivalently, a set P is a partition of X if, and only if, it does not contain the empty set and:         The union of the elements of P is equal to X. (The elements of P are said to cover X.)      The intersection of any two distinct elements of P is empty. (We say the elements of P are pairwise disjoint.)      I clearly understand that the intersection between partition is empty (point 2), but how can the union of a partition can be the all elements in the set?  If it is a partition, shouldnt they be just a part?  I imagine a set divided in 3 and the elements in the first part are not all the elements of the second part.  How do you explain this?


Consider: $$f(x) = \frac{1}{e}\sum_{n=0}^{\infty}\frac{n^x}{n!}$$ When $x$ is a whole number f(x) is also a whole number. Is there a way to resolve this summation?

Inspired by this ,I was interested if the following sum has a closed form.Looking for $k$ integer I found the  so that the sum when $k$ is natural number is $e\cdot B_k$ where $B_k$ is the $k$-th Bell number.I am interested if it's known whether the sum $$\sum_{n=0}^\infty\frac{n^k}{n!}$$ has a closed form for some other values of $k$.


Right now I have about 3k left in credit card debt which I've been steadily paying off.  I could probably have it paid off completely in about 6 months to a year.  However, I already have over 4k in my savings account.  Would there be any benefit to paying it off all at once now, or does it usually make more sense to continue to pay it off incrementally?

I have been reading the top posts here, and the recommendations for what to invest in are often similar. What I'd like to know, in as simply of terms as possible, is what the consensus is on priority of these investments.  I am new to this, but here are some of the obvious options:   Paying off credit card debt Paying off mortgage / student loans 401k up to employer match 401k past employer match IRA Emergency fund Other important investments that I have missed   Clearly this will vary person to person, but if you were asked to put an ordered recommendation on a highway billboard, what would it be?  (For example:   Pay off credit debt Emergency fund for 6 months 401k up to match ... )


I need to prove that the set S of all finite subsets of ℕ with exactly  n elements (where  n is a natural number) is denumerable. I think I need to set up an injection from S to ℕ since ℕ is a countable set but am not sure how exactly to describe that 1-1 mapping? I understand the proof of the set of all finite sets being denumerable but I'm just struggling when you specify that the cardinality of the finite sets has to be  n.

Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?


I'm trying to make a bootable USB from a Windows 10 iso. I have tried to use woeusb to do that, like the internet tutorials say, but even with the apt updated woeusb can't be located, nor does the version on the snap store works. So then I've mounted the iso and copied it's files into the USB. That also didn't work, even manually selecting "boot from USB" the computer would just go straight to the linux install. I think that means that didn't work, even though I have used this same usb stick earlier today to install linux. What can be done? EDIT: makeusb progress bar keeps going back once it is nearly done. Note that the rate is negative in the screenshot.

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


Assume $f_k(z), k=1,2,...,n$ to be $n$ holomorphic functions in a domain $D$. Is it possible $|f_1(z)| + |f_2(z)| + ... + |f_n(z)|$ takes strict local maximum within the domain $D$?  I know that if $n=1$, by maximum modulus principle, $|f_1(z)|$ cannot have a strict local maximum in $D$. But how to deal with the general case?  Thank you for any help!

Let $f_1,f_2,\ldots,f_n $ be  analytic complex functions in domain $D$. and $f = \sum_{k=1}^n|f_k|$ is not constant.  Can I show the  maximum of $f$ only appears on boundary of $D\,$?


can I make the blenders view distance much further?

I have created a simple model here   When rendering it the end of it is cut off   How can I get the camera to render a longer distance?


I have my data as below   string = ' streptococcus 7120 "File  being  analysed" rd873 '   I tried to split the line using n=string.split() which gives the below result:  [streptococcus,7120,File,being,analysed,rd873]   I would  like to split the string ignoring white spaces in " "   # output expected :  [streptococcus,7120,File being analysed,rd873]

I have a string which is like this:  this is "a test"   I'm trying to write something in Python to split it up by space while ignoring spaces within quotes. The result I'm looking for is:  ['this','is','a test']   PS. I know you are going to ask "what happens if there are quotes within the quotes, well, in my application, that will never happen.


I have around 5,000,000 objects stored in a Dictionary<MyKey, MyValue>.  MyKey is a struct that packs each component of my key (5 different numbers) in the right-most 44 bits of an Int64 (ulong).  Since the ulong will always start with 20 zero-bits, my gut feeling is that returning the native Int64.GetHashCode() implementation is likely to collide more often, than if the hash code implementation only considers the 44 bits that are actually in use (although mathematically, I wouldn't know where to begin to prove that theory).  This increases the number of calls to .Equals() and makes dictionary lookups slower.  The .NET implementation of Int64.GetHashCode() looks like this:   public override int GetHashCode() {     return (int)this ^ (int)(this >> 32); }   How would I best implement GetHashCode()?

In .NET, the  is used in a lot of places throughout the .NET base class libraries. Implementing it properly is especially important to find items quickly in a collection or when determining equality.  Is there a standard algorithm or best practice on how to implement GetHashCode for my custom classes so I don't degrade performance?


In D&D 5e, I am wondering how mechanically using +1 bows and arrows (or crossbow and bolts) work, specifically:   If a character uses a +1 bow but mundane arrows, do they get +1 to both the attack roll and the damage roll? If a character uses a +1 arrow but a mundane bow do they get +1 to both the attack roll and the damage toll? If they use both a +1 bow and a +1 arrow do the effects stack so that the character gets +2 to attack and damage rolls?   The way I have been working it is that a +1 bow grants the bonus to attack rolls, and the +1 arrow grands the bonus to damage rolls. Is this correct?

One of my players has a +1 shortbow, and recently found some +1 arrows. If he fires a +1 arrow from a +1 bow, will the bonus to attack and damage be +1, or +2?


I've recently had two questions closed because they are not constructive or subjective. In both cases I was asking for specific information and while perhaps more than one answer would be valid, they would not be subjective in nature.  For question one  I'm asking about a very specific comparable technology to an existing library. I'm not asking for opinions about which is best, I'm just looking for them. In this case I find such questions valid because there is no straight forward manner by which they can be found via web searching.  The other question  is a targeted question about one particular language and devices on which it may not work. Again, it is not an open ended question and it is not subjective. It is also very difficult to obtain this information via general searching.  Both questions have value to people browsing the site (provided they have answers) which would be difficult to locate elsewhere. Neither of them invite open-ended or chatty discussion, nor are they requests for opinions about technology. The answers in both cases are expected to be limited -- if there were an abundance of answers searching would have revealed it.  Does it make sense to close such issues just because they may appear, at a glance, as subjective questions?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


I've been thinking about this many times, that as a person who is spending most of his days coding and learning programming, I should give back of what I learn here and answer questions of other programmers, but due to the lack of time (or maybe discipline), I wasn't successful at this at all. yet I see a lot of professional programmers with astronomically high reputations, people who give accurate responses to though questions at no time.  what is your advice for becoming a useful member of this community?

Where does the time you spend on Stack Overflow come from?  My number 1: My projects take a couple of minutes to compile and run, so that gives me the time to help people or find some answers (or to learn something by browsing interesting questions).  Some other answers I can imagine (which don't apply to me):   Getting paid by the hour and you just charge your client. Favorite spare time activity. Being a n00b to programming, you don't have a choice but to visit (Stack Overflow is the best).


I haven't been able to solve this by using the definition of limit. I think maybe trying induction will work, though. Can someone help?  Suppose $\lim \limits_{n \to ∞} a_n=L$. Prove that $\lim\limits_{n \to ∞} \dfrac{a_1+a_2+\cdots+a_n}{n}=L$

Prove that if $\lim_{n \to \infty}z_{n}=A$ then:  $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....


I need to find out whether the following improper integral converges:  $$\int^\infty_0\frac{1}{1+x^2\sin^2(5x)}\,dx$$  I tried two comparison tests that failed, any ideas?

I would like your help with deciding whether the following integral converges or not:  $$\int_{0}^{\infty}\frac{dx}{1+(x\sin5x)^2}.$$  I tried to compare it to other functions and to change the variables, but it didn't work for me.  Thanks a lot!


please I need your help i am building this application on Android, I ran into this problem where one String data is being retrieved from Firebase database and assigned to a String value, when I try to use (IF) statement to use inside condition, all I get is compiler checking the value condition and never enter the statement. I check the running application using Debugging mode, the value stored into the string is correct and if Statement has no problem in it.  I added part of the code where I have the problem  myRef.addValueEventListener(new ValueEventListener() {         public static final String TAG = "Testtttttttt";          @Override         public void onDataChange(DataSnapshot dataSnapshot) {             // This method is called once with the initial value and again             // whenever data at this location is updated.             String value = dataSnapshot.getValue(String.class);             Log.d(TAG, "Value is: " + value);             if (value == "START") {                 textView.setText(value);               }         }

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 trying to define a command that takes two arguments, where one is optional. If the optional argument isn't given I would like the compulsory argument to be used for the optional argument.  For example:  \necommand{\foo}[2][#2]{#1 foo(#2)}   which would return:  IN: \foo[hello]{hi}      OUT: hello foo(hi) IN: \foo{hi}             OUT: hi foo(hi)   Ideally it would be nice to keep it simple and use standard LaTeX with no packages. Thanks in advance!

I'd like to define a command that takes 1, 2 or 3 arguments, and where the 2nd gets the same value as the 1st if it is not defined. I tried  \newcommand\codefrom[3][#1][Matlab]{ ... }   but I get an error saying     ! Illegal parameter number in definition of \codefrom.   <to be read again>                      1   l.57 \newcommand{\codefrom}[3][#1][                                                                 Matlab]   Is there any way to accomplish what I want to do?