I have a unique field in a SQL table that currently has 200K rows I use randomString(6, '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ') to insert data on that field, I have too many unique conflict error when I want to insert new rows In my log , I see that randomString generated HEGDDX string today but it generated in 3 months ago too and I have an error on insert '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' has 36 character , I generate 6 length random string, So there is 36^6=2176782336 = 2.17E9 possible cases, So 200K rows in 2 billion has 0.00009 possibility for duplication Is 0.00009 big enough for too may errors? is Math.random bad random generator? what is alternative for me? const randomString = function(length, chars) {   let str = '';   const charsLen = chars.length;    for (let i = 0; i < length; i++) {     str += chars.charAt(Math.floor(Math.random() * charsLen));   }   return str; }

A few months back I was tasked with implementing a unique and random code for our web application.  The code would have to be user friendly and as small as possible, but still be essentially random (so users couldn't easily predict the next code in the sequence).  It ended up generating values that looked something like this:  Af3nT5Xf2   Unfortunately, I was never satisfied with the implementation.  Guid's were out of the question, they were simply too big and difficult for users to type in.  I was hoping for something more along the lines of 4 or 5 characters/digits, but our particular implementation would generate noticeably patterned sequences if we encoded to less than 9 characters.  Here's what we ended up doing:  We pulled a unique sequential 32bit id from the database.  We then inserted it into the center bits of a 64bit RANDOM integer.  We created a lookup table of easily typed and recognized characters (A-Z, a-z, 2-9 skipping easily confused characters such as L,l,1,O,0, etc.).  Finally, we used that lookup table to base-54 encode the 64-bit integer.  The high bits were random, the low bits were random, but the center bits were sequential.  The final result was a code that was much smaller than a guid and looked random, even though it absolutely wasn't.  I was never satisfied with this particular implementation.  What would you guys have done?


I am trying to add -ve to double  List<double> values={12.34,-12} double value =0.00; for(double b: values) {  value += b; }   I am expecting value of b =0.34 but it returning me 0.399999999985  any idea why it is returning me the wrong value.

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


I have created simple shadow objects for stills in the past where I masked out the environment around product photographs and the shadows matched fine, using the blam add on. Now I am trying to create shadow objects for a video, but the shadow objects don't match the masked objects for more than a couple frames. The solve error for the tracking is 0.14. Shouldn't objects in the virtual environment match the video almost perfectly?

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


We have recently covered the Lagrangian in our lectures, whereby it was shown that all equations of motion ($x(t)$) satisfying the Euler-Lagrange equation with Lagrangian $L=T-V$, where $T=\frac{1}{2}mv^2$ and $F=-\frac{\partial V}{\partial x}$, must also satisfy $F=m\ddot{x}$.  However, to me, it wasn't intuitive at all why this must have been the case: why, if we minimise (or maximise) some arbitrary quantity $L$, which didn't even have to be conserved, we for some reason get Newton's Second Law, which also implies that $L$ is in fact energy and has to be conserved.  Is there any intuitive way of understanding why ALL possible types of motion MUST minimise this arbitrary quantity $S$ and why, if we do minimise it, we get that $L$ is conserved and happens to represent the total energy of an object?

I'll be generous and say it might be reasonable to assume that nature would tend to minimize, or maybe even maximize, the integral over time of $T-V$.  Okay, fine.  You write down the action functional, require that it be a minimum (or maximum), and arrive at the Euler-Lagrange equations.  Great.  But now you want these Euler-Lagrange equations to not just be derivable from the Principle of Least Action, but you want it to be equivalent to the Principle of Least Action.  After thinking about it for awhile, you realize that this implies that the Principle of Least Action isn't really the Principle of Least Action at all:  it's the "Principle of Stationary Action".  Maybe this is just me, but as generous as I may be, I will not grant you that it is "natural" to assume that nature tends to choose the path that is stationary point of the action functional.  Not to mention, it isn't even obvious that there is such a path, or if there is one, that it is unique.  But the problems don't stop there.  Even if you grant the "Principle of Stationary Action" as fundamentally and universally true, you realize that not all the equations of motions that you would like to have are derivable from this if you restrict yourself to a Lagrangian of the form $T-V$.  As far as I can tell, from here it's a matter of playing around until you get a Lagrangian that produces the equations of motion you want.  From my (perhaps naive point of view), there is nothing at all particularly natural (although I will admit, it is quite useful) about the formulation of classical mechanics this way.  Of course, this wouldn't be such a big deal if these classical ideas stayed with the classical physics, but these ideas are absolutely fundamental to how we think about things as modern as quantum field theory.  Could someone please convince me that there is something natural about the choice of the Lagrangian formulation of classical mechanics (I don't mean in comparison with the Hamiltonian formulation; I mean period), and in fact, that it is so natural that we would not even dare abandon these ideas?


Suppose we have a non-empty set $X$ with an associative binary operation, so that for all $x \in X$ there exists a unique $x'$ such that $xx'x=x$. Prove the set under this operation is a group.  Of course, associativity is already given, and unique inverses are obvious, but I have no idea how to go about showing an identity element exists, nor how to show the set is closed with respect to the operation. How can one go about this?

The following could have shown up as an exercise in a basic Abstract Algebra text, and if anyone can give me a reference, I will be most grateful.  Consider a set $X$ with an associative law of composition, not known to have an identity or inverses. Suppose that for every $g\in X$, there is a unique $x\in X$ with $gxg=g$. Show that $X$ is a group.  Note that I’m not asking for a proof (though a really short one would please me!), just some place where this has been published.


I am getting JSON String Response in a string variable. I want to compare it in the “if” statement. But program cannot go to the “if” statement. But it shows the response in the TextView.  Here is my if statement    if (myObjAsString == "WRONG_PASS_ERROR") { //USER_EXISTS_ERROR //WRONG_PASS_ERROR                                  Toast.makeText(MainActivity.this, "Login Invalid", Toast.LENGTH_LONG).show();                             }   Here is my code.  String url = "http://someexample.com/signin.php";         StringRequest postRequest = new StringRequest(Request.Method.POST, url,                 new Response.Listener<String>() {                     @Override                     public void onResponse(String response) {                         try {                               JSONObject jsonResponse = new JSONObject(response);                             String myObjAsString = jsonResponse.getString("type");                              if (myObjAsString == "WRONG_PASS_ERROR") { //USER_EXISTS_ERROR //WRONG_PASS_ERROR                                  Toast.makeText(MainActivity.this, "Login Invalid", Toast.LENGTH_LONG).show();                             }                              mTV.setText(myObjAsString);                          } catch (JSONException e) {                             e.printStackTrace();                         }                     }                 },                 new Response.ErrorListener() {                     @Override                     public void onErrorResponse(VolleyError error) {                         error.printStackTrace();                     }                 }         ) {             @Override             protected Map<String, String> getParams() {                 Map<String, String> params = new HashMap<>();                 // the POST parameters:                 params.put("email", "example@outlook.com");                 params.put("password", "*****");                 return params;             }         };         Volley.newRequestQueue(this).add(postRequest);

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've recently started to learn how to write makefile, and I've got a question which seems to me to have a simple answer. It's that how can we write makefile when two header files include eachother? I've searched for an answer to it but I couldn't find anything. (I want the content of the makefile be as simple as possible)

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 have deleted a file and now I want it on the same place from where I have deleted? How I can check that deleted file in my system from CLI?  I tried find command but end up nothing.

Is there a command to recover/undelete deleted files by rm?  $ rm -rf /path/to/myfile   How can I recover myfile? If there is such a tool how can I use it?


I have a existing schema in my database called SCOTT, how can I create a new schema with exactly the same privileges which SCOTT schema is having?   Is there any create like or some command to create schema like SCOTT?  Thanks

We'll be having external auditors coming over to perform a review on our Oracle database. They will be running a tool to perform the review and for that, they require a user ID that can connect to the database and grab information from it.  We have an existing user in the database for this. However, it is a production ID and we cannot afford to have it locked out. We would like to clone / duplicate this ID including its roles and rights.  Is there a way we can do so in Oracle?


After searching through many posts I have come up with the code below to handle updating 200,000 to 2 million records daily. The problem is its still takes hours to complete, I have tried to narrow down the records that are updated to only those I need. I'm really new to this but it seems like updating 200,000 records should go pretty fast. Please review the code below and see if I am doing something wrong? Thanks in Advance  P.S. Why is my code not going in a code box?  IF OBJECT_ID('tempdb.dbo.#MinDate') IS NOT NULL     DROP TABLE #MinDate  GO  SELECT * INTO #MinDate  FROM      (       SELECT  n1.TR_SerNum, Min(n1.TR_Scan_Date) As MinDate     FROM IMB_TBO_Data.dbo.TBO_Trace_Data as t1           INNER JOIN Trace_Return_Updates as n1          ON t1.TR_SerNum = n1.TR_SerNum     WHERE (n1.TR_Scan_Date < t1.First_Scan_Date)         OR (IsDate(n1.TR_Scan_Date) = 1) AND (t1.First_Scan_Date Is Null)     GROUP BY n1.TR_SerNum     ) as n  GO   CREATE INDEX IDX_SerNum ON #MinDate(TR_SerNum) GO  DECLARE  @UPDATES TABLE (PK_ID int NOT NULL Primary KEY)  DECLARE @x INT  SET @x = 0  WHILE @@ROWCOUNT > 0     BEGIN         UPDATE TOP (10000) IMB_TBO_Data.dbo.TBO_Trace_Data              SET First_Scan_Date = n.MinDate         OUTPUT inserted.TR_SerNum INTO @Updates         FROM IMB_TBO_Data.dbo.TBO_Trace_Data t             INNER JOIN #MinDate n             ON t.TR_SerNum = n.TR_SerNum         WHERE NOT EXISTS              (SELECT * FROM @UPDATES AS Updates             WHERE UPDates.PK_ID = t.TR_SerNum)         WAITFOR DELAY '00:00:02'     END SET ROWCOUNT  0 IF OBJECT_ID('tempdb.dbo.#MinDate') IS NOT NULL     DROP TABLE #MinDate; GO  PRINT N'Update First Scan Date'"

I am trying to do an update on a table that has 4 million records. The main table is indexed on SerNum a unique field. I use a temp table to update from that also has a unique index on SerNum. I am told this should happen fast but it's taking hours. It's been running for 2 hours and if I add up the rows affected I get 5,260,000 which is weird because I only have 3,869,000 records in the table. The select into the temp table shows it has 3,390,954. Here is what I have so far can this be more efficient?   USE IMB_TraceData GO  IF OBJECT_ID('tempdb.dbo.PRIMARY KEY (lname,') IS NOT NULL     DROP TABLE #MaxDate; GO  -- ****************************************** -- Create Work Table -- ****************************************** SELECT * INTO #MaxDate FROM     (     SELECT  *     FROM    (             SELECT  *,              ROW_NUMBER() OVER (PARTITION BY TR_SerNum              ORDER BY TR_Scan_Date DESC) AS rn             FROM  Trace_Return_Table             ) a     WHERE   a.rn = 1     ) AS n GO CREATE INDEX IDX_SerNum ON #MaxDate(TR_SerNum) GO  DECLARE  @UPDATES TABLE (PK_ID int NOT NULL Primary KEY) DECLARE @x INT  SET @x = 1 SET ROWCOUNT 10000  WHILE @x > 0     BEGIN         BEGIN TRANSACTION         UPDATE TOP (10000) IMB_TBO_Data.dbo.The_Big_One          SET TR_Scan_Date = n.TR_Scan_Date,             TR_Facility_Id = n.TR_Facility_Id,             TR_Operation_Code = n.TR_Operation_Code         OUTPUT inserted.HT_SerNum INTO @Updates         FROM IMB_TBO_Data.dbo.The_Big_One t         INNER JOIN #MaxDate n             ON t.HT_SerNum = n.TR_SerNum         WHERE NOT EXISTS          (SELECT * FROM @UPDATES AS Updates         WHERE UPDates.PK_ID = t.HT_SerNum)         SET @x = @@ROWCOUNT         COMMIT TRANSACTION     END  SET ROWCOUNT 0


I have several equations where some text repeats, so I want to match each following word with a "»" in next equations. Important that "»" should be in the middle of the word above.  Here is the demo example I made in an image editor.

In France, students are taught not to repeat the same text twice when there is little difference between a line and the one below. It's a quick way to take notes.  I reproduced this effect by tinkering:    The code is as follows:  \documentclass[aspectratio=1610]{beamer}  \usepackage[T1]{fontenc} \usepackage[french]{babel}  \usepackage{amsmath, amsfonts, amssymb} \usefonttheme[onlymath]{serif}  \begin{document} \begin{frame} Lorsque le \og \textit{carreau carré} \fg{}   mesure: \begin{itemize} \item $\rm 1\,cm$ de côté, l'unité d'aire est appelée le \og \textrm{centimètre carré} \fg{} et est noté $\rm cm^2$; \item $\rm 1\,dm$ \hspace{1mm}'' \hspace{3mm}'' \hspace{8mm}'' \hspace{8mm}'' \hspace{5mm}''\hspace{8mm}'' \hspace{5.5mm}''\hspace{1mm} \og \textrm{décimètre carré} \fg{} \hspace{2mm}'' \hspace{2mm}'' \hspace{4mm}'' \hspace{1.5mm} $\rm dm^2$; \item $\rm 1\,m$ \hspace{3mm}'' \hspace{3mm}'' \hspace{8mm}'' \hspace{8mm}'' \hspace{5mm}'' \hspace{7mm}'' \hspace{5.5mm}''\hspace{1mm} \og \textrm{mètre carré} \fg{}  \hspace{9mm}'' \hspace{2mm}'' \hspace{4mm}'' \hspace{1mm} $\rm m^2$; \item etc. \end{itemize} \end{frame} \end{document}   How can I get the same effect more simply than by tinkering like I just did?


In Javascript  parseInt(null) returns a NaN parseNumber(null) also returns a NaN    isNaN('abcd') returns true, as 'abcd' is of course not a number, isNaN(5) returns false    but strangely    isNaN(null) returns false, which is odd as implies it is a number, but as we saw in the parseNumber it was seen by that as NaN  There appears to be an inconsistency between the way null is viewed by parseInt and by isNaN one sees it as NaN and the other sees it as a Number. Why are they inconsistent?

This code in JS gives me a popup saying "i think null is a number", which I find slightly disturbing. What am I missing?    if (isNaN(null)) {   alert("null is not a number"); } else {   alert("i think null is a number"); }     I'm using Firefox 3. Is that a browser bug?  Other tests:    console.log(null == NaN);   // false console.log(isNaN("text")); // true console.log(NaN == "text"); // false     So, the problem seems not to be an exact comparison with NaN?  Edit: Now the question has been answered, I have cleaned up my post to have a better version for the archive. However, this renders some comments and even some answers a little incomprehensible. Don't blame their authors. Among the things I changed was:   Removed a note saying that I had screwed up the headline in the first place by reverting its meaning Earlier answers showed that I didn't state clearly enough why I thought the behaviour was weird, so I added the examples that check a string and do a manual comparison.


I had 87/100 progress on  several days ago. After that I had at least 3 days with new question with positive score. But the progress is still 87/100.  Is it broken?  UPD: on the "Recently Deleted Questions" page I have only 1 question, which was deleted  10 days ago.

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


Imagine an electric power generator in a form of a floating object moving up and down and utilizing the buoyant force of sea tides.  Can anyone explain how it doesn't violate the principle of conservation of energy? Where does this energy come from?

Kind of an odd, random question that popped into my head. Tidal energy - earth's ocean movement, volcanism on some of Jupiter's moons, etc. - obviously comes from the gravitational interaction between large bodies. On earth the interactions with the moon are pulling water around the surface, creating some amount of heat due to friction, etc.   My question is, where does that energy come from exactly? More specifically, what potential energy source is getting depleted to do that work? Is the earth minutely slowing down in its spin - or are the orbits of earth and the moon subtly altered over time by the counteractive movement and friction of liquids and gasses?


since the only thing we know about dark matter that it "attracts" and affect our Baryonic matter's momentum and speed, which means that it does have mass of a sort.  so why didn't we witness a darkmatter-darkmatter interactions in form of collisions of celestial bodies like stars, Black holes or other distinct things, what do we know about that?   PS: it would be very helpful for me if someone has an answer can cite it with a paper on the topic. thanks in advance!

I'm a complete layperson. As I understand, dark matter theoretically only interacts with the gravitational force, and doesn't interact with the other three fundamental forces: weak nuclear force, strong nuclear force, and electromagnetism.  Those are my understandings going in. If I'm wrong, please correct me. I've done some googling, and I haven't found anything confirming or denying that dark matter is affected by either of the fundamental nuclear forces.  So since dark matter only interacts with gravity, what causes any dark matter particle to be repelled from another? If they can pass freely through each other, and they are gravitationaly attracted to each other, why don't such particles clump together in a single 'point' in space?   It seems to me that particles occupying a single 'space' are philosophically not distinct particles, but I don't know how actual physics would play into this.  Edit , author's credentials unknown, but implicitly claims to be a physicist or astronomer, says "...[P]hysicists generally take all dark matter to be composed of a single type of particle that essentially interacts only through gravity."  Edit 2 The author is this , "Professor of Science on the physics faculty of Harvard University."


I'm attempting to export a single layer from a geodatabase to a shapefile. The export fails at the same point, 71%, with this message (I'm only displaying the first few lines),   Export to vector file failed. Error: Feature write errors: Feature creation error (OGR error: Failed to write shape object.  File size cannot reach 4294815324 + 162344.)   The export operation does produce a shapefile, but with only about 70% of the content of the original geodatabase layer.   I'm using a MacBook Pro, operating OS 10.15.2 and QGIS 3.4.15.

I have a very large .gdb that I want to reduce to my study area. Unfortunately, the study area is still quite big. I could select features that intersected my study area but when I tried Export > Save Selected Feature As...it crashed and only saved some of the features (4GB). Ideally, I would create another .gdb but it seems that QGIS does not support .gdb creation (read-only) or delete the features I don't need directly in the .gdb but as far as I know it is not possible to modify a layer in a .gdb.


I've a column in database containing the IDs of the files uploaded using a managed file form field.  How do I create a link to the uploaded file knowing its file ID?  EDIT :  The obvious solution doesn't work for me , i'm using another table where i put my Fids .  this is the warning i got everytime : Notice: Trying to get property of non-object in Affichage_form() (line 188 of C:\wamp64\www\Gestion_tickets_licences\sites\all\modules\Recherche\Recherche.module). << 188 : $uri= $file->uri; >>  Solution : Thank you for you help . my solution for my problem is , Once I upload the file , I create the url. Instead of saving Fid , I save the url , It worked .For the download link , I used Alen syntax and it worked great .

How can i get the absolute path for a file based on the fid? Sorry if this is a repeat, I did a search but was unable to find the answer.


Client and Server both know the Client's password. Client wants to login.  Server sends Client a random string. Client concatenates the string with their password.  Clients sends the HASH of this to the server. Server performs the same operation without sending the hash anywhere.  Server verifies their resulting hash equals the hash recieved by the Client. Server allows Client to login. I think this is a zero-knowledge proof because the Client proved they know their password without actually sharing their password. What am I misunderstanding? The reason I assume I'm misunderstanding something is because this seems too good to be true.  If zero-knowledge password proofs were so simple, people would want to use this instead of something like SRP.

I’m trying to wrap my head around zero knowledge proofs, but I’m having trouble understanding it.  In my current understanding, zero-knowledge proofs prove to the recipient that the sender has a certain knowledge without disclosing it. Like trying to say your password without actually giving it.  Many sources go at it with a convoluted method like a tunnel where there’s a hidden gate, and Bob is trying to know if Alice can go through the hidden gate. But then it starts saying that Bob should not see Alice enter. Wouldn’t it be easier for Bob to just see Alice go in one tunnel and come out the other? That would not disclose the secret way of opening the tunnel, right?  In that line of thinking, given a one-way function like a hash, couldn’t the other person just hash their secret and let the other see that the hashes compare?  I must be missing something (as there’s a lot of research going into it and hashes are well-known), but I can’t wrap my head around it.  Can someone tell me what’s wrong with my understanding of zero knowledge proofs?


I'm very new to programming and to learn something I made a simple auto clicker. My problem is that when I export it to jar using Eclipse or the command prompt the simulation of clicks doesn't work. It does load the GUI but when I press the button for it to start it doesn't start clicking at all. If you have any idea of how I might fix this, I would be very thankful for any help I can get.  Edit: Tried some things which was mentioned in the duplicate but it still doesn't work :/

I am trying to build an executable jar program which depends on external jar downloaded. In my project, I included them in the build path and can be run and debug within eclipse.  When I tried to export it to a jar, I can run the program but I can't when I try to press a button which includes function calls and classes from the external jar. I have edited the environment variables (Windows XP) CLASSPATH to include paths of all the external jar, but it doesn't work.  A point to note is that I got compile warnings while exporting my executable jar, but it doesn't show up any description about the warnings.  Would someone kindly provide a thorough guide on how to include an external jar program using eclipse?


Everytime I try to use a command to do an enchanted item it never works and there's just a 0 next to the item. I tried to spawn a diamond sword with sharpness in a chest but instead in the chest there was a normal diamond sword with a 0 next to it. Is it possible to put an enchanted weapon/item in a chest?

I'm making a map where I want players to be able to choose there kits/classes. The problem I'm having with it though is giving players already enchanted Tools/Armour/Weapons.  I'm not sure if you can use the /give [player] [item] [amount] because you'll have to use the whole {} thing and I'm not sure how to make enchanted Tools/Armour/Weapons using that.  Can anyone help?


I'm using the following script to create path curve:   def create_curve(coords_list):     crv = bpy.data.curves.new('crv', 'CURVE')     crv.dimensions = '3D'     spline = crv.splines.new(type='NURBS')     spline.points.add(len(coords_list) - 1)      for p, new_co in zip(spline.points, coords_list):         p.co = (new_co + [1.0])  # (add nurbs      obj = bpy.data.objects.new('object_name', crv)     bpy.data.scenes[0].collection.objects.link(obj)   coords_list generated using another script. here are the first coordinates in coords_list:  coords_list[0] = [0,0,1] coords_list[1] = [1.079576297914498, 0.12957629791449818, 1] coords_list[2] = [1.796242964581165, -0.5870903687521685, 1]   But if you look at the layout tab it looks like the first and second coordinates were not included in the path curve for some reason.    What am I doing wrong?  How can I print all the points ensamble the path curve?

I'm trying to write a script which creates a Nurbs path curve, bevels it, and then stores the location of each vertex/point in that curve. I've been writing it based on the code displayed in the info panel, but it doesn't show what the vertices are supposed to be called - so I can't refer to them in the script.  Update: After following Ratt's links, I modified  for Nurbs Path and am now stuck again, though it's still progress. Below is one version I tried out, but the error message says that Curve has no attribute path_points. Of course it doesn't, because I made that up because I don't know what the Nurbs Path equivalent for bezier_points is.  import bpy import random  def pathPointLoc(cu, typ, points):      for (n) in enumerate(points):         nurb = cu.path_points[n]         print(nurb.location)      return  cu = bpy.data.curves.new("MyCurve", "CURVE") ob = bpy.data.objects.new("MyCurveObject", cu) scn = bpy.context.scene scn.objects.link(ob) scn.objects.active = ob  cu.bevel_object = bpy.data.objects["BezierCircle"] cu.taper_object = bpy.data.objects["BezierCircle"]  pathPointLoc(cu, "NURBS", [(0,0,0,1), (0,0,1,random.randint(1,4)), (0,1,1,1), (1,4,1,1)] )


Why not free electrons in atom doesn't radiates em waves\photons, although they move with acceleration? Like 1s electron of Titan, it doesn't emits em waves, yes? Why?

I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it.


I am logged in through the only account defined on my new Windows 7 Professional PC. Despite it being a (password-protected) administrator account, every time I need to copy files on the C: system partition,  install software, run Regedit, etc, Windows comes up with an extra confirmation screen, to get past which I have to choose the "As Administrator" button - the operation then proceeds as normal, it's just annoying that the confirmation screen is always there.   Also, several programs that I would like to have integrated in the Windows context (right click) menus cannot be integrated, presumably because  of the same ambiguity with regards to the Administrator status of the account - and then there is no prompting from Windows, making these program unable to operate as expected.  On my old Win7 PC, my Admin account appeared to have been configured in exactly the same way, yet I did not have these problems, and I was able to do any file operations, including in system folders such as \Program Files or \Windows. What shall I do? Thanks!

If my account is already a member of the administrator group why do some functions on Windows 7 require me to run them as administator? I kind of thought that was implied?


I am playing fallout shelter and one of my women is pregnant. It has been a few hours now but she still has not given birth? i do not know what to do? I have tried to upgrade the room incase I did not have anough room that id not work. I do not know whether it is because she is radiated. I am just not sure.

I am playing Fallout Shelter on my IPad. There were some women who have already gave birth, but two female dwellers are carrying their babies for about 18(!) hours. I know that this process takes three hours, so this is not normal. What do I do?


I'm trying to have a really deep understanding of quantum physics and so I went back to what is blackbody radiation until suddenly I realized that my understanding of  is that of... well, hotness or coldness.  Trying to come up with a more fundamental understanding I realized it's kind of density of energy but nobody actually refers to temperature as density of energy. Can somebody explain me in normal english what temperature is and how is it different from energy density?

Recently I read an interesting article about . I was puzzled because I thought before that  has definite meaning in thermodynamics: it tells about how fast atoms jiggle. Now if temperature can be negative, this means temperature has wider meaning...  I wonder if there is any deep physical meaning of temperature, not mathematical one.


I am new to Linux, so this might sound like a simple question, but how do I install a package outside of the APT database? I am trying to install the following package:  Any help will be appreciated. Thank you!

I need these packages with the latest upstream version backported for ubuntu/natty   libccid_1.4.5-0ubuntu1_amd64.deb libpcsclite1_1.8.1-0ubuntu1_amd64.deb libpcsclite-dev_1.8.1-0ubuntu1_amd64.deb libusb-1.0-0_1.0.9-0ubuntu1_amd64.deb libusb-1.0-0-dev_1.0.9-0ubuntu1_amd64.deb opensc_0.12.2-1ubuntu1ppa1~natty1_amd64.deb pcscd_1.8.1-0ubuntu1_amd64.deb pcsc-tools_1.4.18-0ubuntu1_amd64.deb   I tried to build them from source with update but it failed. I am not an expert at packaging and there are so many tutorials and recipes out there.  Do you know a good and up to date tutorial for backporting Ubuntu packages?  How do I get packages from other releases without having to build them myself?


Group velocity dispersion is the phenomenon that the group velocity of light in a transparent medium depends on the optical frequency or wavelength. [quoted from wiki]. I have tried to do my research, but a lot of the answers are not helpful. There must be some physical mechanism behind this frequency dependence right? Or is this just a general term for describing all kinds of dispersion such as chromatic disperion, modal dispersion?

It is well known that a  can "split light" by separating different frequencies of light:    Many sources state that the reason this happens is that the  is different for different frequencies.  This is known as .  My question is about why dispersion exists.  Is frequency dependence for refraction a property fundamental to all waves?  Is the effect the result of some sort of non-linearity in response by the refracting material to electromagnetic fields?  Are there (theoretically) any materials that have an essentially constant, non-unity index of refraction (at least for the visible spectrum)?


I am wondering if someone who has experience in trying to perform community detection algorithm with complete graph with weighted network. As weighted networks represents the similarity of each node and hence it is complete network considered all pairwise of nodes. The adjacent matrix can be represented in the following table:  NODE   A     B     C   A    -    0.2   0.3   B   0.2    -    0.7   C   0.3   0.7    -   So can I just perform any weighted related community detection methods on this?  Is there any other method? Or am I mistaking something?

I've a graph representing a social network ( 597 nodes, 177906 edges). Each edge has a weight saying how much two nodes are similar. I'd like to apply some clustering algorithm to this network but I think I need to cut some edge. Is there a commonly used threshold to do this? Can you suggest any particular algorithm? I was suggested to use K-means but I think it badly fit to my data space.


For reasons that even my com sci teacher can't figure out, I am trying to call a method in my main but when i run the program, java throws the following error:  Exception in thread "main" java.lang.NullPointerException         at GUIcreatorr.AddComponents(GUImaker5.java:390)         at GUImaker5.main(GUImaker5.java:425) Java Result: 1 BUILD SUCCESSFUL (total time: 5 seconds)  here's my code:  `class GUIcreatorr implements ActionListener {     private JFrame frame;     private CardLayout cardLayout = new CardLayout();     private JPanel contentPanel;      //more constructors here for the various panels i am adding to contentPanel      public void AddComponents()     {         //ADDS ALL FIVE PANELS TO CONTENT PANE         contentPanel.setLayout(cardLayout);         contentPanel.add(panelMenu,"panelMenu");         contentPanel.add(panelMenu,"infoPanel");         contentPanel.add(panel1,"panel1");         contentPanel.add(panel2,"panel2");         contentPanel.add(panel3,"panel3");         contentPanel.add(panel3,"winPanel");         contentPanel.add(panel3,"losePanel");          frame = new JFrame("Maple Gang-Gang: Shooting Cups game");         frame.setContentPane(contentPanel);         cardLayout.show(contentPanel, "panelMenu");          frame.setSize(1000, 800);          frame.setLocationRelativeTo(null);          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);          frame.setVisible(true);      }      @Override         public void actionPerformed(ActionEvent e)         {         throw new UnsupportedOperationException("Not supported yet.");         } }  public class GUImaker5 {     public static void main(String[] args)     {         GUIcreatorr letsPlay = new GUIcreatorr();          letsPlay.AddComponents();      }  }`   As you can see, my method AddComponents takes all the panels i created in previous methods of the same class, and adds them to a content pane to be displayed. Am I doing something wrong, or is there a way to simply make java ignore the NullPointerException error? I am a beginner programmer, but I've heard of using try/catch exceptions. should I use one of those to fix my problem,and if so how?  thanks in advance for the desperately needed help!!!

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?


An internal server error when trying to pass custom class via SFDC server action  public class Estimation {      @AuraEnabled     public Decimal tic {get; set;}      @AuraEnabled     public Decimal go {get; set;}      @AuraEnabled     public Decimal get {get; set;}      @AuraEnabled     public Decimal probability {get; set;} }   Callout to srever  saveEstimation: function (cmp, recordId, estimation, callback) {     var action = cmp.get("c.saveEstimations");     action.setParams(         {             recordId : recordId,             est      : estimation         }     );   And on server side:  @AuraEnabled public static Estimation saveEstimations(Id recordId, Estimation est)   This is what i get     (3442602)|FATAL_ERROR|Internal Salesforce.com Error   As a workaroud I can serialize object to JSON on js side and deserialize it on server side. I have to do it at this moment but I think it's a bug.  Othe possible option is to retrieve Map as parameter which is also no pretty solution.  Does anybody have any idea what to do with it?

When writing a controller for a Lightning Component, it is convenient to add the data transfer object classes as inner classes of the controller. This works fine for sending data to the client but I get a gack that includes a java.lang.UnsupportedOperationException when sending from client to server:     An internal server error has occurred\nError ID: 2066801247-4851   (-1600101374)\n\norg.auraframework.throwable.AuraExecutionException:   apex://LifePaymentsController:   java.lang.UnsupportedOperationException\n\tat   .(apex://LifePaymentsController)\n\tat   ui.services.facades.CoreLightningComponentFacadeImpl.runApexAction(CoreLightningComponentFacadeImpl.java:233) ...   Here is what the server-side looks like (the save1 method fails):  public class SaveRequest {     @AuraEnabled public Payee[] newPayees;     @AuraEnabled public Payment[] payments; }  ...  // Fails @AuraEnabled public static void save1(SaveRequest saveRequest) {     System.debug(JSON.serializePretty(saveRequest)); }  // Works @AuraEnabled public static void save2(String jsonString) {     SaveRequest r = (SaveRequest) JSON.deserializeStrict(jsonString, SaveRequest.class);     System.debug(JSON.serializePretty(r)); }   and the client-side:  // Fails var action = servicesComponent.get("c.save1") action.setParams({      "saveRequest": saveRequest });  // Works var action = servicesComponent.get("c.save2"); action.setParams({      "jsonString": JSON.stringify(saveRequest) });   The save2 alternative method (where deserialization is explicitly coded) works.  I interpret these results to mean that inner classes are still (April 2017) not fully supported in @AuraEnabled methods. Is that the case?


The following sites seem to have something to do with Neural Networks, and most have questions on that subject:   Stack Overflow Artificial Intelligence Computational Science Computer Science Cross Validated Data Science   How would one choose the appropriate one?

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


I encountered an error in Netbeans:     java.lang.OutOfMemoryError: Java heap space   This is the first time I encountered this and I don't know how to deal with it.   Can somebody explain this error message to me?   And how can I increase the heap memory? Thank you!

I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After a quick research I found  and others saying on Windows machine the JVM defaults max heap size as 64MB.  Given this situation, how should I deal with this constraint?  I could increase the max heap size using command line option to java, but that would require figuring out available RAM and writing some launching program or script. Besides, increasing to some finite max does not ultimately get rid of the issue.  I could rewrite some of my code to persist objects to file system frequently (using database is the same thing) to free up the memory. It could work, but it's probably a lot work too.  If you could point me to details of above ideas or some alternatives like automatic virtual memory, extending heap size dynamically, that will be great.


He invited Mr. Smith to the party that day.  He had invited Mr. Smith to the party that day.  Please tell me the difference and which of the two is grammatical?

What is the difference in meaning between the two examples below?   When she returned home from office, she was shocked to see that her husband and daughter were missing. (Simple Past)  When she returned home from office, she was shocked to see that her husband and daughter had been missing. (Past Perfect)    FIRST QUESTION: For me example #1 gives only idea of Status of her missing husband and daughter and example #2 gives idea of completed action/situation of missing husband and daughter before she reached home. Is this right? SECOND QUESTION: Is example #2 past perfect or past perfect continuous?


Prove by induction: $$ \sum_{k=1}^{2n}(-1)^{k+1}\frac{1}{k} = \sum_{k=1}^{n}\frac{1}{n+k} $$   I start with (using $n = t+1$): $$ \sum_{k=1}^{2t+2}(-1)^{k+1}\frac{1}{k}=... $$  but after expanding and attempting to simplify I get stuck at: $$ \sum_{k=1}^{t}\frac{1}{t+k} + (-1)^{2t}\frac{1}{2t+2}-(-1)^{2t}\frac{1}{2t+1} $$  Any suggestions would be very helpful.

Prove by mathematical induction that:  $$\forall n \in \mathbb{N} : \sum_{k=1}^{2n} \frac{(-1)^{k+1}}{k} = \sum_{k=n+1}^{2n} \frac{1}{k} $$  Step 1: Show that the statement is true for $n = 1$:  LHS = $$\frac{(-1)^{1+1}}{1} = 1$$  RHS = $$\frac{1}{1} = 1$$  Step 2: Show that "if true for n = p, then true for n = p + 1":  Starting with the LHS of equality for $n = p + 1$ and try to get to the RHS by using the equality for $n = p$. Simplifying:  $$\sum_{k=1}^{2(p+1)} \frac{(-1)^{k+1}}{k} = \sum_{k=1}^{2p+2} \frac{(-1)^{k+1}}{k}$$  Breaking out the first two term:  $$ \sum_{k=1}^{2p+2} \frac{(-1)^{k+1}}{k} = \frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=1}^{2p} \frac{(-1)^{k+1}}{k} $$  The last term can now be exchanged for the RHS in the original equality:  $$\frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=1}^{2p} \frac{(-1)^{k+1}}{k} = \frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=p+1}^{2p} \frac{1}{k}$$  Since $2p+3$ is odd and $2p+2$ is even, we get:  $$\frac{(-1)}{2p+2} + \frac{1}{2p+1} + \sum_{k=p+1}^{2p} \frac{1}{k} = \frac{(-1)}{2p+2} + \sum_{k=p+1}^{2p+1} \frac{1}{k}$$  ...because we can easily absorb the second term in the third term sum. However, I am stuck here because the first term is negative. I probably made a trivial error somewhere, but I am unable to find it. Any suggestions?


will be visiting switzerland / jungfrau in October 2016.  What dress precaution required for us there.

I have planned to travel sightseeing at Jungfrau mountain in Switzerland.  Since I have checked with many weather forecast website on my trip date, they said the weather probably be cloudy, partly sunny and the temperature is about -5 °C.  I came from the warm climate (always hot) country, Thailand. So, I am not sure about how to dress suitably for the weather like this.  So, I would like to ask the suggestion for the way of dressing. Moreover, Do I need to bring any medicine to prevent or cure in some case?


I am new in the programming field, so while trying to run the below code I am getting the java.lang.NullPointerException at line number 19 and 32.   import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*;  public class Solution {      static int binary[];     static int i = 0;      static void DecToBin(int num)     {         while (num > 0) {              **binary[i++] = num % 2;**             num = num / 2;          }              for (i = i - 1; i >= 0; i--) {                 System.out.println(binary[i]);             }     }      public static void main(String[] args) {         Scanner sc=new Scanner(System.in);         System.out.println("Enter a decimal number");         int n=sc.nextInt();         **DecToBin(n);**      } }   Output:   Enter a decimal number 4 Exception in thread "main" java.lang.NullPointerException at Solution.DecToBin(Solution.java:19) at Solution.main(Solution.java:32)


I came across this syntax in several macros, in linux kernel 2.4.31 files, but to keep things in focus I am asking regarding __set_task_state(tsk, state_value) macro defined in include/linux/sched.h: #define __set_task_state(tsk, state_value)      \     do { (tsk)->state = (state_value); } while (0)   What is the "advantage" of defining the above macro with the do while(0) statement ? Any side effects ? It's more convenient to define it like so : #define __set_task_state(tsk, state_value)  (tsk)->state = (state_value)

In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X)


Like the title states, I'd like to transfer my Pokemon into the new game. I'd like to get my Pokemon to be Mega Evolved in Pokemon X

How does one go about transferring Pokémon from previous generations this time around? Presumably, due to the 3DS's lack of GBA slot, Gen3 Pokémon would need to be transferred to a Gen4 cartridge. But how does it work beyond this point? Specifically:   Which generations can be used to send Pokémon to Gen6? Can Gen4 (D/P/Pl/HG/SS) send directly to Gen6, or do Pokémon from those cartridges first need to be sent to Gen5 (B/W/B2/W2)? What systems are required to perform this task? Does it need to be two connected 3DS (3DS / XL / 2DS) systems or can the previous generations be hosted on a DS (Phat / Lite / i)? What (if any) in-game tasks must be completed prior to transferring? Of the generation 4 and 5 games I've played, the transfer tools were not unlocked until after the Elite Four were beaten. How, exactly, does it work this time around? The tools for each generation so far have been wildly different; a safari-zone-like minigame, and a shooting gallery minigame. Is there any other information someone looking to transfer Pokémon to generation 6 should be made aware of? For example; PC Box storage limitation issues for anyone looking to transfer their living Pokédex.


My mum, little brother and I plan to travel to the UK but my 15 year old brother’s visa states that it’s only valid if accompanied by my mother. Unfortunately my mum cannot travel any longer for medical reasons. Is there any way my little brother and I, his older brother, can be allowed to enter the UK without my mum?

I am supposed to be traveling to the UK tomorrow, but my visa is an accompanied visa by my mom. My mom is already in the UK (she had to leave early).  Will I be allowed in the airport to enter if my parent (that I'm accompanied by) is already in the UK (arrived before me and probably will be waiting at the airport)?


I have a situation where I'd like to add a list of names in an array and use it in an SQL query.  How I do it:  $names = implode(',', $names); $sql = "DELETE FROM product WHERE name NOT IN ($names)";   This works ok if I use id (but I can't do that here). Problem is - name can have a comma in it (i.e. - benchpress rack, blue) and that breaks this query. Is there a way to bypass this issue?

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 want to import a class from default package. it will show compile time error as per Java language specification. So I need an example to load the class from default package using Reflection API.  I got Idea to use Reflection for that but did n't get any example to import class from Default package using Reflecion  Thanks in advance

I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package.   My question is: Is there a way to access this object in the default-package from a Java-class in a named package?


I have downloaded and installed  on ubuntu 16.04. I have no idea why gedit font preference dialog displays blocks of squares as shown in the picture below. I have already copied fonts to /usr/share/fonts and ran sudo fc-cache -fv.    Note: I have already tried the changing file permission as suggested in  but it doesn't fix the problem.  Update: output of fc-list | grep i noto grep: noto: No such file or directory

Everything else is OK, but can not display right text on Popup and Menu.


I have an Apex web service that takes a query string. I need to update this class to take an encrypted string, find the appropriate record in Salesforce, and then return an encrypted JSON response. I am struggling with writing the unit test for this. I have read through the Crypto Class documentation and am working on the trailhead but I expect I am missing something here.  In my unit test, I have encrypted the lastName param and added to the request.addParmater by calling String.valueOf of the encrypted Blob value. But when I try to decrypt in my API I get an error of Unrecognized base 64 character. This makes think I am misunderstanding how to pass the data to the web service and was hoping I could ask for some help here.  The error happens when I call the EncodingUtil on the string from the request params.   I apologize if the code is a little awkward, just trying to add the encryption in.   Here is part of the GET endpoint   @HttpGet     global static void getPatient() {         Blob cryptoKey = Blob.valueOf(Label.Okta_User_API_Cypto_Key);         System.debug('crypto key value');          RestResponse response = RestContext.response;         String email = RestContext.request.params.get('email');         String phone = RestContext.request.params.get('primaryPhone');         String lastName = RestContext.request.params.get('lastName');         String productSerNum = RestContext.request.params.get('serialNum');             ////test decrypted code here         String lastNametoDecrypt = lastName;         Blob lastNameData = null;         if(lastNametoDecrypt != null){             /////////Error line number here!!!!             lastNameData = EncodingUtil.base64Decode(lastNametoDecrypt);         }         Blob decryptedLastNameData = Crypto.decryptWithManagedIV('AES256', cryptoKey , lastNameData);         String decryptedLastName = decryptedLastNameData.toString();         System.debug('value of decrypted last name ' + decryptedLastName);          /// End test decrypt code }   Below is the unit test  @IsTest static void getPatient() {         Patient__c testPatient = [SELECT First_Name__c, Last_Name__c, Email__c, Birthdate__c, Home_Phone__c         FROM Patient__c LIMIT 1];         // Set up a test request         RestRequest request = new RestRequest();         RestResponse response = new RestResponse();          Blob cryptoKey = Blob.valueOf(Label.Okta_User_API_Cypto_Key);          Blob lastname = Blob.valueOf('kirk');                Blob encrypted = Crypto.encryptWithManagedIV('AES256', cryptoKey, lastname);          request.addParameter('email', testPatient.Email__c );                request.addParameter('lastName', String.valueOf(encrypted));         request.addParameter('primaryPhone', testPatient.Home_Phone__c);         request.addParameter('dob', '1950-01-01');         request.addParameter('serialNum', '12345-54321');         request.httpMethod = 'GET';         RestContext.request = request;         RestContext.response = response;         Test.startTest();        AccountClaimAPI.getPatient();        Test.stopTest();         System.assertNotEquals(null, response.responseBody);        System.assertEquals(200, response.statusCode);     }

I had given an cipher text (of JSON string), an IV and a key. I tried decrypting using 's method:      decryptWithManagedIV(algorithmName, privateKey, IVAndCipherText)     //Sample code   Blob key = Blob.valueOf(decryptionKey);   Blob encryptedDatafor = EncodingUtil.base64Decode(bodystring);   Blob decryptedData = Crypto.decryptwithManagedIV('AES128', key, encryptedDatafor);    cipher = decryptedData.toString();   System.debug('Encrypted BodyString: ' +cipher);   and I was able to decrypt the cipher successfully. But when I use the provided IV with the following method:      decrypt(algorithmName, privateKey, initializationVector, cipherText)    //Sample code  Blob exampleIV = Blob.valueOf('HSDlUkhrmfEo7SgM'); //provided IV   Blob key = Blob.valueOf(decryptionKey);  Blob encryptedDatafor = EncodingUtil.base64Decode(bodystring);  Blob decryptedDataIV = Crypto.decrypt('AES128', key, exampleIV, encryptedDatafor);   cipher = EncodingUtil.base64Encode(decryptedDataIV );  System.debug('Encrypted BodyString: ' +cipher);   I get some string which looks like, it is still in the encrypted form (different from the encrypted string I have passed).   Update:  I have tried the below code-snippet based on the suggestion from @identigral, but I am still unable to decrypt the cipher using the IV:  Blob exampleIV = Blob.valueOf('HSDlUkhrmfEo7SgM'); //provided IV  Blob key = Blob.valueOf(decryptionKey); Blob encryptedDatafor = EncodingUtil.base64Decode(bodystring);  String encodedCipherTextAndIV = EncodingUtil.convertToHex(encryptedDatafor); String encodedCipherText = encodedCipherTextAndIV.substring(32); String finCipher = encodedCipherText.difference(encodedCipherTextAndIV); Blob ciphertext = EncodingUtil.convertFromHex(finCipher);   Blob decryptedDataIV = Crypto.decrypt('AES128', key, exampleIV, ciphertext);  decryptStg = EncodingUtil.base64Encode(decryptedDataIV ); System.debug('Decrypted BodyString: ' +decryptStg);


Wonder if someone could help? Whilst viewing a simple pulley model in active camera view, I can only see the foremost part of the model. What am I doing wrong?   Much appreciate any help.    I attach a pic of the full model in 3D View.

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 can calculate module exponentiation of square powers of $7$ modulo $35$ or things alike by hand but for computing modulo exponentiation of square powers of $7$ modulo $1000$, then I need a calculator. For instance  $$ \begin{alignat*}{2} 7^1&\equiv7&&\pmod{1000}\\ 7^2&\equiv49&&\pmod{1000}\\ 7^4&\equiv(7^2)^2\equiv49^2\equiv401&&\pmod{1000} \\ 7^8&\equiv(7^4)^2\equiv401^2\equiv801&&\pmod{1000} \\ 7^{16}&\equiv(7^8)^2\equiv801^2\equiv601&&\pmod{1000}\\ 7^{32}&\equiv(7^{16})^2\equiv601^2\equiv201&&\pmod{1000}\\ 7^{64}&\equiv(7^{32})^2\equiv201^2\equiv401&&\pmod{1000} \end{alignat*} $$ Is there an easier way without using a calculator?

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


In the quantum mechanical double slit experiment, the resulting pattern is projected onto a screen. This is an important part of the experiment, because the screen represents the quantum mechanical observer.   What happens when we replace the screen with a fog gradually increasing in density from the slits to the former screen position, such that we can recognize the pattern when looking at the fog at the former screen position?  The fog consists of distinct macroscopic particles suspended in the air. We can not recognize a pattern when looking onto a fog volume that consists of only one particle. We can recognize a pattern looking onto a volume of dense fog at the screen position. What is in between? And is it relevant to the double slit experiment - does it affect the quantum mechanical observation?

I tried searches and the question has been posed in other fora, but no experiment came up.   Track chambers (cloud chambers, bubble chambers , time projection chambers, solid state detectors like the vertex detectors at LHC)  give the track of the particle as it ionizes the  medium, and could be carried out in geometry after the particle has passed the double slit. The straight track should be pointing back to the slit it came from and its record could be used as the points on the screen in the classical double slit experiment.  The set up as I see it would be the classical setup for single electron through the double slits but instead of a "screen" one has a detector and detects the track.  It should be a long enough detector to get an accuracy less than the slit difference so it could point back to the slit, as the interslit distance is of the order of 100 microns and detectors are giving order of microns accuracies.  This experiment, if possible,  would resolve the controversy whether the detection of the slit destroys the interference pattern or the  at the slits change the boundary conditions and destroy the interference pattern.  An expert's opinion is necessary whether the experiment is possible, whether the energies of the electrons to show interference with a specific d separation is enough to create an accurate track in a solid state detector. If not a cloud chamber would do , but again the energy of the electron would be important because it would have to pass the barrier air/chamber.  It could succeed if the double slits were within a cloud/ bubble chamber; the beam count was low  (10 to twelve per picture) but it was spread in the vertical direction. If the beam could be focused on the slits , it should be doable.


I want to start this off by mentioning that I am very new to using Linux, so I'm having a pretty hard time figuring this one out on my own.  Version: Ubuntu Desktop 18.04   I went out and bought a wireless card for this PC so that I can connect to my home internet, however the card will not just "Plug-and-Play." I did some searching online and came across some drivers as well as instructions for installing them via USB, but I seem to have run into an issue. The instructions state that I need to use commands such as "make",  Running the make command in the terminal returns the following:  Command 'make' not found, but it can be installed with: . sudo apt install make sudo apt install make-guile   and running sudo apt install make returns:  Reading package lists... Done Building dependency tree Reading state information... Done Package make is not available, but is referred to by another package. this may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'make' has no installation candidate   I can imagine I'd get this error for all other commands I try to run.  If it helps at all, I'm trying to follow instructions found  to install these drivers. I then did some searching online trying to find a way to get the 'make' command, but pretty much everything says that I will have to connect the machine in question to the internet. I'm looking for a way to either get the make command (and other commands that I will need for installing drivers) onto this PC, or a way to install drivers without using these commands.  Anything I put onto the machine will be coming from a Windows laptop to the Ubuntu machine via a flash drive. Again, I want to say, it is not possible for me to use an Ethernet connection at this time. Thanks in advance for any help you all provide :)

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


I know that a derivative of a real valued function at a point measures the slope of the tangent at that point. I am wondering what could be the geometric meaning of derivative of a complex valued function at a certain point?

What's the geometrical meaning of $f'(z)$ in complex analysis, as we know in real analysis $f'(x)$ has meaning ie. Slope of curve or gives max/ min. But what does derivative $f'(z)$ has geometrical meaning in complex analysis


This is a partial duplicate of , but I think just asking for help doesn't go far enough.  Yes, it would be great if the app included all of the normal sites' help centers, presumably with a lot of content modified to reflect how to do things in the app, and maybe some more generic "how do I use the app?" content.  But that's a big project, and there are people trying to use the app now. Today on cooking we had a new user come to us, really concerned about all the unwritten rules all the self-declared moderators kept enforcing, asking  We need to make sure the app is "safe" for these users too. (And they posted it on the main site, begging for it to be left open for a day or two to get answered, since they hadn't discovered meta through the app!)  So to be specific, the help page in the app needs a few things:   a pointer to site-specific metas, for questions about rules a disclaimer that the app does not have all the features pointers to help centers (making it clear that each site has their own)   And on top of that, the app could probably use some kind of louder warning that it does not yet have all features, and you might have to visit the real site - maybe even the dreaded interstitial page.

I just had that rare case of a newbie who barges in with off-topic content, it gets closed, and instead of starting to spew invective, politely asks "what are the rules". Currently, his or her  is on Cooking meta. The question text mentioned a curious thing:  Admittedly I only use the app so maybe that is where I am going wrong but I can't seem to find any rules about what can be asked, what sort of answers are allowed and what format it all has to be in.  The whole network already has a problem with getting new users to accept our high-moderation and strict-rules culture, especially when their expectations are set by general discussion forums which don't restrict themselves to objective non-poll questions. I think that the rules might be even harder for the users of sites outside of the trilogy, because the interested population is not made up of geeks who automatically value the information-content-aspect of information  above the other aspects. Even for users who have easy access to the help center, there is lots of friction to get accustomed to our rules (and many leave in anger instead). So, for the people who are willing to RTFM, I think that we should make the access easy. I admit that I hadn't expected somebody who hasn't used the site to start using the app, but now we have observed it happening. So, I think that it is important to include a link to the help center in an easily accessible place in the app. Even if at the beginning, it cannot be brought into the app format and has to be a link which opens in the mobile browser, it will be useful for the poor confused new users.


I am using the class report right now, and would like to use \subsection as a running counter throughout the entire chapter, without reseting it in a new \section.  Tried to research this myself, but since google is flooded with how to reset counter, I couldn't find what I was searching for.

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


I got a project to build a website like Reddit. My client need a very attractive modern look interface.  But he asked that why Reddit website look so ugly? IS there any UI /UX reason for it?  I did not have a answer when he asking. I said I will do a research and let you know. But still I could not find the reson for it...

It's heresy I know, but look at . It's raw, hand written HTML, it's plain, boring typography, it's something any UX or Graphic designer would scoff at if you handed it across their desk. But it works, and it works well.  Drudge's design has been fairly consistant and it's pretty much exactly what it looks like, it's raw HTML and it has barely been changed since . Lots of mud is slung at it's design, but it's considered by some to be .  Drudge's design scores great on conventional measures of usability: It's effective, users find stories that they consider interesting and stories are prioritized to indicate "big" news. It's always clear what's a link (underlined) and what's not. It's efficient, there's hardly any interface and a simple click on a headline takes you where you need to go. Arguably it's satisfying, it's a highly ranked site, though I don't have any user satisfaction surveys on hand.  So when can something aesthetically "ugly" give great UX and how? What else does deliver this ugly but beautiful level of effective plainness?  is another example of this, though arguably not as great from a usability standpoint. I don't often see sites like Drudge Report, but it's interesting to consider such an unconventionally minimalistic implementation and where it can be applicable.  Update: I'm not talking about just usability; it's long been known that you can have a super efficient and effective design and people hate it because it looks like crap. I'm talking about designs that look "ugly" but still leave the user with a good or even a great experience, experiences people enjoy for than just the bare functional reasons, but not because of pleasant, trumped up aesthetics either.


Let a Neural network is trained. Let multiple number of inputs result same output. We can determine any one input for a particular output using neural network. But, how can we determine all the inputs for a given output. To be precise, Let, x+y=10. So for 10 the inputs are (1,9),(2,8),(3,7) and so on.

I've trained a neural network with two inputs, a single hidden layer with two neurons, and one output using a bipolar sigmoid activation function. If a single input is known, how would I determine the second input to create a desired output?  For example, let's say the neural network is trained to add two inputs to produce an output. So if input_1 = 3 and input_2 = 4, the output will be 7, (3 + 4 = 7). Given input_1 = 3 and the desired output is 7, I want to calculate the second input required to produce the desired output (the answer should be 4).  How would I do this for a network that is more complicated than basic addition and has multiple inputs/outputs? For example, for a network with four inputs and two outputs, how would I calculate input_3 and input_4 given input_1, input_2, output_1 and output_2?


I have a website where I'm formatting sass (.scss) files with the sass-convert command. Its syntax is this:  $> sass-convert original.scss formatted.scss   Since I'm in a git repo, having a separate output file is completely superfluous. My next step would be mv formatted.scss original.scss. I would like to do something to avoid the second step. Something like  $> sass-convert original.scss %^&   Where %^& is some magic shell/bash syntax that does what I want it to.   Is there a way I can auto-replace the output file with the input file in a single line, using bash (or another shell) syntax?  My question is different from  because iconv will create the output file first, which would make the input file then empty, so none of the solutions listed below will work. If you look at the answers of both of these questions, you will see that they are different. The answers for this question work for any command that does not immediately create the output file.

I have a bash script which enumerates through every *.php file in a directory and applies iconv to it. This gets output in STDOUT.   Since adding the -o parameter ( in my experience ) actually writes a blank file probably before the conversion takes place, how can I adjust my script so it does the conversion, then overwrites the input file?  for file in *.php do     iconv -f cp1251 -t utf8 "$file" done


How to extract this number 5005733989 from this string "employee-process-5005733989-19874"

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


I accidentally deleted a couple vertex groups from a model I'm working on and need to recover them. I have the original model with all the vertex groups so I need some way I can transfer the deleted vertex groups from the original mesh to the new mesh.

So, I decided that a previous project contained exactly what I needed to expedite a new project, so I appended the appropriate objects form the previous project to the new one. This was great, because I didn't have to define new materials, &c.   Regrettably, though, I found out that when it came to vertex groups, where it would have been as helpful to be able to copy vertex groups from one object to another as it was to copy materials, I couldn't figure out how to do so.   Am I looking for a feature which does not yet exist?  NOTE: I did not expect the vertex groups to have assignments in the target objects, but it would have been handy not to have had to retype 25 names.


Hey so pretty much what the title says, my BT isnt working, I have tried rfkill list, and nothing is blocked.Bluez launches but doesn't do much more than that, since I cant click on anything. Also checked on it with this command sudo service bluetooth status and its telling me its active (running) but every time I go to find a device in BT settings and I click the slider to turn it on, the slider goes blue like it is on, but it doesn't actually search for any devices, also I cant find it when I search on my phone. I don't think its really on because when I back out of the BT setting tab and go back into it the slider is in off position, like i never switched it on. Any help would be appreciated thanks!

Trying to launch a BT adapter/manager(default installed on Lubu)a little window informs me that it cannot because there's no Bluez launched.  In terminal: sudo apt install bluez, it answers: Bluez is already the new version (5.46-0ubuntu3) Then invites me to remove a couple of obsolete packages.  So where's Bluez Daemon to launch?  Writing:systemctl status bluetooth.service ; hcitool dev  Answer:   bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset    Active: inactive (dead)      Docs: man:bluetoothd(8)   Command:lspci -k | grep -A3 -i "wireless\|network\|bluetooth" Answer: 04:00.0 Ethernet controller: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express) (rev 01)     Subsystem: Quanta Microsystems, Inc AR242x / AR542x Wireless Network Adapter (PCI-Express)     Kernel driver in use: ath5k     Kernel modules: ath5k 0f:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller oem@oem-Extensa-5220:~$


I have a big problem with my computer...  I have reduced the windows partition and when I reboot then I have the grub rescue with the error message: "no such partition".  Moreover, I don't have access to the bios and so it seems impossible to change the boot sequence to boot on my live usb or live cd.  The command line ls gives me: (hd0) (hd0,1) (hd0,2) (hd0,3)  I have a recovery windows partition (1 I think), a windows partition and a linux partition.  Yet, the command lines ls (hd0,1), ls (hd0,2) and (hd0,3) gives me the error message: "unknown filesystem" and so I can't set a boot anymore.  Do you have any idea?

After I deleted my Ubuntu partition, I rebooted my computer and I only get a prompt:   grub rescue >   The command ls lists   (hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)   I check them one by one:  ls (hd0,msdos5)/ ls (hd0,msdos1)/   But I cannot find the right partition.


There is no such thing.  In managed bitlocker, everything is correct  Drive D has no difference with other drives. It is bitlocked. And unlocked, like usual.    Somehow the unlocked padlock icon doesn't show up on drive D but shows up on other drives.

I don't normally use encrypted volumes on my Windows 10 Professional machine but needed to do so today.  I normally use the drive on another system that runs Windows 7 Enterprise.  I discovered this problem when I initially connected the drive and missed the Windows 10 toast notification to unlocked the drive.  On Windows 7 when you right-click on the drive, you get an option to "Unlock Drive..." which then displays a password prompt.  When I did this same action on my Windows 10 machine I got the following context menu:    When I attempted to Open the drive, I got the following error message:    This PC:    At this point, I disconnected the drive, connected the drive again, and unlocked the drive through the toast notification.  At this point, I want to know the reason I could not unlock the drive through Windows Explorer.  Why can I only unlock the drive through the toast notification?


I'm a newbie web developer using 14.04. I've been having a 'read only file system' problem after almost every boot. If I don't have the problem, I eventually get it after a few hours.   I followed the troubleshooting steps mentioned in the other posts, such as running fsck, e2fsck from a live usb. Terminal says it solved the issue, but when I boot, it goes back to read only file system. I've done the short disk self-test which says OK, though the full self-test fails.   I formatted my hard disk and installed Windows a few months ago and it ran fine.   I reinstalled 14.04 and I noticed the problem became very frequent after I installed Chrome. So I replaced it with Chromium which lessened its frequency, but recently it has been become very frequent again. I need Chrome / Chromium to troubleshoot websites.   Is there any solution to this ? I am thinking of formatting to 15.10 just to see if the problem will be solved.

I'm asking this because my HDD (Hard Disk) has 5 years, and ultimately (this year) it gave me many headaches. Many moths ago I has Windows 7 (and 10 T.P. since april) and all was good. But after a moment, instantly, all gets reversed: veeery slow, and actions which will take a tiny time, at these moment the time seems frozen (for example, instead a 1 minute boot, it turned to 5-8 minutes boot). I formatted and installed Windows every 2 months because it was the time which runs good before it gets slooww. Seeing the abuse of privacity in W10, I changed to Ubuntu 15.04 and the things lasted more in time... But again, HDD error. Click, trying to read, click, trying to read... And the upper bar (title of window/buttons of volume, language, wifi, etc.) disappeared. The left bar (where are the app's icons) was empty and the file explorer said the resource wasn't available (or something like these error). I restarted and nothing happens. I had to press CTRL+D to boot-up Ubuntu, but after hours... the same error (can't do anything except moving the mouse/cursor).  Welcome to the routine: copy files with live-cd to a pendrive, wipe HDD and install all again. And the things was calmed again... and the errors comes again. And after 2 weeks, I had to do the same. Now my PC works fine, but yesterday I heard a few "clicks" from the HDD.  Now, I remembered this  and I came to Disks and the HDD shows a new value; normally, the problematic number was "pending sectors", always changing, but now, in "irrecoverable sectors", the number is different of zero.  I never had "reallocated sectors". Now, neither. And now, while I write this lines, I've 5 "pending s." and 9 "irrecoverable s.". If this helps, the "read error rate" is 42, 5 for "write error rate".      Very well!! While I was writing "write error rate", I heard 2   clicks. And while writing this, one click more.   And 123 "CRC error rate". So, with this information: is my HDD dying? It'll last days or months? I think this problem will kill the disk in a not very far time.  The drive is a Western Digital Green 1TB-WDC WD10EARS-00Y5B1 (80.00A80) S.N.: WD-WCAV5J301610  PS: When I boot with CTRL+D, many times the system is in "RO mode"; I can't save/download files, Unity doesn't find apps when I write their name {click again, now, while I write the text} and, after a few hours, a crash like the lines above


I'm having trouble with the OpenLayers Plugin of Qgis and the map composer:  If I create an OSM-background layer and if I want to export this, the OSM-Layer looks perfectly all right in the normal qgis program window. But in the map composer and after export the layer has shifted relatively to my other shape layers (EPSG:32633 - WGS 84 / UTM zone 33N).  The second thing is that the output resolution of the exported osm-layer is very, very poor.   A really bad way of getting around this whole trouble would be to increase the screen resolution and make a screenshot of the map composition window of qgis. But I don't think this would be very professional. It also would cause a lot of pain :)   I'm using Qgis 1.8.0-Lisboa under Linux. The openlayers plugin is version 0.92.

ArcGIS Desktop has the option of using basemaps from ArcGIS Online. Does QGIS have any such options?


I need a A substitue for Bash aliases (something that behaves basically like an alias but isn't an alias).  The reason I need such a substitute is because scripts cannot utilize aliases. That is to say --- an alias works fine when I execute it manually in Bash, but it fails to work when runned as part of a script. The solution I know of is to put the aliases in a temporary file but I don't want that approach.  Is there any substitute / similar command-shortcut I could utilize, some "next generation alias" (to give a metaphor) that will behave just like an alias but will also be naturally accessible for scripts (after its file was sourced)?

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


Is it okay to cast function location with void pointer though function pointers size is not always the same as opaque pointer size?    I already did search about opaque pointers , and casting function pointers . I found out function pointers and normal pointers are not  the same on some systems.    void (*fptr)(void) = (void *) 0x00000009; // is that legal???   I feel I should do this    void (*fptr)(void)= void(*)(void) 0x00000009;   It did work fine , though I expected some errors or at least warnings  I'm using keil arm compiler

Let's say I have a function that accepts a void (*)(void*) function pointer for use as a callback:  void do_stuff(void (*callback_fp)(void*), void* callback_arg);   Now, if I have a function like this:  void my_callback_function(struct my_struct* arg);   Can I do this safely?  do_stuff((void (*)(void*)) &my_callback_function, NULL);   I've looked at  and I've looked at some C standards which say you can cast to 'compatible function pointers', but I cannot find a definition of what 'compatible function pointer' means.


I want to draw this using tikz package of latex.  I already write down the code for that. But the problem is that how could I input the sentence Happing Now within the picture.  My code is  \begin{frame}{Frame Title} \begin{figure}   \centering   \begin{tikzpicture}  \draw[thick][->](0,0) to (4,0);   \draw[thick][->](2,1.5) to (4,0.5);   \draw[thick][loosely dotted](4,0) to (5,0);   \end{tikzpicture}   \caption{Timeline}   \label{fig:my_label1} \end{figure}   \end{frame}

I'm a recent convert to TikZ from xy-pic, and am still trying to get a hang for it. I see that one can add labels to the end of arrows and the like using \node. Is there a way to add an arbitrary piece of text at a given position in the text, regardless of whether there is a shape there, a line there, or nothing at all? Thanks very much for your insight.


Question is about KOPP +1 Edition, not KOPP.    -- this one didn't help. I bought KOPP+1 for my Android 2.3 device. Played it for a bit, made 3 save files. I just upgraded to an Android 4.2.2 device. I moved KOPP+1 over to the SD card and put the SD card in the new phone. When I open KOPP it can't find the save games. I've searched for files using the file browser named "knights" and not found any files. But searching for "seesmic" did find files, so I know that's working.   How can I find my old save file and get it working on my new phone?

I was hoping to transfer my Knights of Pen and Paper save information between multiple Android devices.  Does anyone know where I might find the relevant files?  My devices are rooted.


For reference, the index.html and index.css:   #main-grid {   display: grid;   grid-template: [top] 1fr [middle] 2fr [bottom] / [left] 1fr [center] 2fr [right]; }  #main-grid-top-left-item {   grid-area: top / left / middle / center;   background-color: red; }  #main-grid-top-right-item {   grid-area: top / center / middle / right;   background-color: lime;   font-size: xx-large; }  #main-grid-bottom-left-item {   grid-area: middle / left / bottom / center;   background-color: cyan; }  #main-grid-bottom-right-item {   grid-area: middle / center / bottom / right;   background-color: yellow }  .white-background {   background-color: white; } <!DOCTYPE html>      <meta charset="utf-8" />   <link rel="stylesheet" href="index.css" />   <title>     HTML Document   </title>

                            0

                            1

                            2

                            3

       Now, what I want is for the top-left 0 to be vertically centered with respect to the size of the row that is in as calculated using the size of the container that contains the top-right 1. How is that possible?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


I am having a little trouble with this problem -     Let $A$ be a $m\times n$ matrix and $v$ be a $n\times 1$ matrix, both of which only has rational entries. It is known that the equation $Ax=v$ has a solution in $\mathbb R^n$. Does this imply that the given equation will have a solution with rational entries?   I think that the result is true, but I am unable to prove it.Thanks for any help.

I saw this question     Let $A ∈ M_{m\times n}(\mathbb{Q})$ and $b ∈ \mathbb{Q}^m$. Suppose   that the system of linear equations $Ax = b$ has a solution in   $\mathbb{R}^n$. Does it necessarily have a solution in $\mathbb{Q}^n$?   and I thought I'd give an interesting, possibly wrong, approach to solving it. I'm not sure if such things can be done, if not maybe you can help me refine.    I considered the form of the equality as  $$ A^{(1)}x_1+\cdots+A^{(n)}x_n=b, $$  where $A^{(i)}$ is a column vector of $A$. I then noticed that for $x_i\in\mathbb{R\setminus Q}=\mathbb{T}$ then, and this is where I think I'm doing something forbidden, each $x$ has the represenation  $$ x_1  =  k_{11}\tau_1+\cdots+k_{1p}\tau_p \\  x_2= k_{21}\tau_1+\cdots+k_{2p}\tau_p \\ \vdots \hspace{4cm} \vdots \\ x_n=k_{n1}\tau_1+\cdots+k_{np}\tau_p,$$  where $\tau_i$ is a distinct irrational number, $k_{ij}\in\mathbb{R}$, and $p$ is the number of such distinct irrational numbers. I wound this out, but there may be a discrepancy with $p$ and $m$. I feel this method can lead me to the answer, but I'm not sure where to go from here.  EDIT$^1$:  I end up getting something like this, I believe, after substitution:  $$ A(k^{(1)}\tau_1+\cdots+k^{(p)}\tau_p)=b$$  Here, $k^{(i)}$ is the vector  $$\begin{pmatrix} k_{1i} \\ \vdots \\ k_{ni} \end{pmatrix}.$$  EDIT$^2$:  I think there is no discrepancy with $p$ and $m$ because $A\in M_{m\times n}(\mathbb{Q})$, $K\in M_{n\times p}(\mathbb{R})$, and $\tau\in M_{p\times 1}(\mathbb{T})$, so  $$ (m\times n)\cdot (n\times p)\cdot (p\times 1) = m\times 1. $$


I'm new to the game and trying to make my first constructed deck. My understanding of the card rule is I can only have four cards of one kind.  What does this precisely mean?  For instance, does this mean I can only have four rat cards total or four rat cards of several kinds? If two different cards do the same thing (like  and ), can I have four of each?

I have a list of cards for a deck I want to build or buy. What should I do to check whether that deck is legal in a particular format (Standard, for example)?


I'm writing a document (that uses the listings package) which aims to show the output of some LaTeX commands. I want to create a command that would allow me to typeset the command inline and its output in a single line. Writing  \noindent lorem \\\LaTeXShow|{\Huge test text}| \\ipsum   would display the following    The reason I want to do this is because I am writing a guide on LaTeX for my fellow ċlassmates and I want to show the output of having executed some LaTeX commands. The code snippet presented below is a minimum working example that represents some of the content I am currently writing  \documentclass{article} \usepackage{listings}  \usepackage{xcolor}  \newcommand{\LaTeXShow}{\lstinline[language = {[latex]tex}, keywordstyle = {\color[HTML]{101094}}, basicstyle = {\ttfamily}]}  \begin{document}     \noindent\LaTeXShow|{\Huge test text}| displays {\Huge test text}     \\\LaTeXShow|{\Huge test text}| displays {\Huge test text}     \\\LaTeXShow|{\Huge test text}| displays {\Huge test text}     \\\LaTeXShow|{\huge test text}| displays {\huge test text}     \\\LaTeXShow|{\LARGE test text}| displays {\LARGE test text} \end{document}   As you can see, there is a pattern among the lines of the body of the document. If the desired command existed, then the document would look like this  \begin{document}     \noindent\LaTeXShow|{\Huge test text}|     \\\LaTeXShow|{\Huge test text}|     \\\LaTeXShow|{\Huge test text}|     \\\LaTeXShow|{\huge test text}|     \\\LaTeXShow|{\LARGE test text}| \end{document}   and the output would be    Note The command must use the lstinline command from the listings package. The reason behind this is because of the style options that package offers.

Similar to  I would like to have a command to display and execute code. The code should be displayed with the listings package.  For example something like  \documentclass{scrartcl} \usepackage{amsmath,listings} \newcommand*{\codeExample}[1]{Code: \lstinline!\string{#1}! yields #1} \begin{document}   \codeExample{$\lVert a\rVert$} \end{document}   should for best of cases display $\lVert a \rVert$ as verbatim (\lstinline!...!) code and after that the rendered math code. Is something like that possible? The code above yields several mistakes. I think I miss something to avoid #1 being tokenised?


I need to add base 16 alphanumeric data using bash command. This works for numbers   total=$(( 55 + 60 ))    but not alphanumeric. Is there a simple bash command for adding alphanumeric data? I'm adding large alphanumeric data like this:   436389bdc34dd718c7959db8d6df16967f2b9895e515da45fb09136183a7a9e2  + 1f0c45bbe9bc71a862f0d9672d056d2d741719a2b2d46ea6b269931d0b57674f

I want to add two hexadecimal variables in a bash script.  I want them to start as hex and end in hex, not decimal.    What I've come up with so far is a bit of a round about hack. Is there a better or more elegant solution?  BASE=0xA000  OFFSET=0x1000  NEW_BASE=$(( $BASE + $OFFSET ))  NEW_BASE=`printf "0x%X\n" $NEW_BASE`  echo $NEW_BASE  0xB000


For example, if I have 2 monitors and 3 opened browser windows, and I want to click a link on inactive window I have to click 2 times—first to activate a window and the second time to click a link.  Is there a way to make all viewable windows active so that they respond immediately to mouse clicks without having to be focused first?  I am running macOS Sierra 10.12.6.

I'm a new Mac user, having been issued with a MacBook Pro when I started a new job three months ago.  A Windows and Linux user before, I'm now getting quite used to the differences with using Apple's desktop environment.  One thing that is still slowing me down a little is the requirement to explicitly click in an application window to make it active, before the UI elements inside that window can be interacted with.  For example, if I have two browser windows open side by side with the left one active, it takes two clicks to follow a link in the right hand window: one to make the window active, one to click the link.  This is in contrast to Windows or Linux, where you can click on a UI element in a inactive window and that single click will both activate the window and the element in it.  A similar issue is trying to copy and paste text between windows.  I can select and copy text in an active terminal or editor, then paste it into another with 'right-click, Paste' but that doesn't activate the window.  I still need to left-click the window to activate it before I can type into it.  In Windows and Linux, the right-click to paste would also activate the window.  If I was pasting a command into a terminal, I could then just hit Enter to run it, whereas an extra mouse click is required on my Mac.  This feels a little cumbersome.  Can this behaviour be adjusted to resemble Windows and Linux?


I get the ConcurrentModificationException when I try to remove entries while looping over a hashMap. I thought if I used the iterator approach it would make the exception go away. Here is my code:        HashMap<String, Flight> flight_hm = new HashMap<>();     ...      Iterator<Entry<String, Flight>> it = flight_hm.entrySet().iterator();     while (it.hasNext()) {         ...         if ((curMinutes - arrivalTime) > MINUTES_15) {            it.remove();         }   This is my runtime error:  java.util.ConcurrentModificationException: null at java.util.HashMap$HashIterator.remove(HashMap.java:1456) ~[na:1.8.0_181]

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.