I just started learning blender and python. Is it possible to write a script that does this?  imports a 3d model from a folder creates 100 cameras with random positions (the 3d model should fit the picture) creates random exposure renders images from all 100 cameras and saves them does it with all 3d models in the folder

I'm new to Blender. I'm currently working on a 3D reconstruction project using neural networks. I need to create my data set. Therefore I need to render a 3D body scan from different angles and save the images separately. I can render creating cameras manually but once i create a loop for the cameras my output is black images. this is the code i used:   bpy.ops.object.camera_add(view_align=False, location=[0,10,20], rotation=[0.436,0,pi]) bpy.ops.object.camera_add(view_align=False, location=[10,20,30], rotation=[0.436,0,pi])    for ob in scene.objects:     if ob.type == 'CAMERA':         bpy.context.scene.camera = ob         print('Set camera %s' % ob.name )         file = os.path.join('/home/fotofinder/Downloads/tryrender/images', ob.name )         bpy.context.scene.render.filepath = file         bpy.ops.render.render( write_still=True )    If anyone can help to define the proper parameters for the cameras in order to always have the object in the image I would be grateful.


I'm writing a small program where I print out the number of jobs in the first and last month of the last 6 presidents. I've written a function called presidents(), but for some reason I can't get it working in my program. When I try to run the presidents() function in the python console it works great. But when I try to use the unsorted_pres list and numberPres variable in my main program I get an error that they are not defined.   PS. For testing I have copied the output from the presidents() function in the console. These are the two lines that are commented out.  import csv  def readcsv(file,y,m):     with open(file) as f:         reader = csv.reader(f)         next(reader)         list = []         for row in reader:             list.append(row)     year = int(y)     yIndex = year - 1974     return list[yIndex][m]   def presidents():     f = open("presidents.txt", 'r')     unsorted_pres = []     for line in f:         pList = line.split(", ")          name_raw = pList[0]         name_split = name_raw.split(" ")         name_list = name_split[-1:]         name = "".join(name_list)         pList.insert(0, name)         pList.pop(1)          years_raw = pList[1]         years_split = years_raw.split("-")         firstYear = years_split[0]         lastYear = int(years_split[1]) - 1         pList.insert(1, firstYear)         pList.insert(2, lastYear)         pList.pop(3)          party_raw = pList[3]         party_split = party_raw.split("\n")         party = party_split[0]         pList.insert(3, party)         pList.pop(4)          unsorted_pres.append(pList)      return unsorted_pres, numberPres  print "Government Employment by President (thousands):" print "%10s%15s%16s%15s%15s%16s" % ("President","Party","First Month","Last Month","Difference","Percentage")  presidents() #unsorted_pres = [['Carter', '1977', 1980, 'Democrat'], ['Reagan', '1981', 1988, 'Republican'], ['Bush', '1989', 1992, 'Republican'], ['Clinton', '1993', 2000, 'Democrat'], ['Bush', '2001', 2008, 'Republican'], ['Obama', '2009', 2015, 'Democrat']] #numberPres = 6 #len(unsorted_pres)  while numberPres > 0:     for element in unsorted_pres:         firstMonth = readcsv("government.csv", element[1],1)         lastMonth = readcsv("government.csv", element[2],12)         diff = int(lastMonth) - int(firstMonth)         perc = diff / float(firstMonth) * 100         print "%10s%15s%16s%15s%15s%15s%%" % (element[0],element[3],format(int(firstMonth), ",d"),format(int(lastMonth), ",d"),format(diff, ",d"), round(perc,1))         numberPres -= 1   Here's the 'president.txt' file, used by presidents():  James Earl Carter, 1977-1981, Democrat Ronald Wilson Reagan, 1981-1989, Republican George Herbert Walker Bush, 1989-1993, Republican William Jefferson Clinton, 1993-2001, Democrat George Walker Bush, 2001-2009, Republican Barack Hussein Obama, 2009-2016, Democrat

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Recently I've got "Nice answer" badge and noticed that tapping on related achievement item in the iOS app refers me to the question instead of the answer:        Using web achievements panel refers to the answer as expected.  Same behavior for "Enlightened" badge.   App Version: 1.7.0.1 Device: Unknown (iPad7,3) OS Version: Version 10.3.3 (Build 14G60)

Recently I've earned a badge for an answer. If I tap on notification in web:        It refers me to the  (try this in web and in the app):        But if I do the same in the app, question will be opened instead:         App Version: 1.6.3.4 Device: iPad Air 2 (Wi-Fi) OS Version: Version 10.2 (Build 14C92)


I've got Ubuntu installed with Dutch as my language. I often work in the terminal and many of the outputs are in Dutch as well. This is very inconvenient though, because I often need to search for error messages I get, and on the interwebs error messages are unfortunately easier found in English than in Dutch.  Is there a way to have all terminal output in English, while all GUI's are in Dutch?  All tips are welcome!

Messages in my terminal are displayed using Russian language by default, which is my native one.  For just a moment I want them to be in English (eg. to paste in forums), then switch back to the default language.  How can I do the switch and switch back using bash?


Why it is preffered to measure Nuclear Energy in MeV insted of Joules?

Why do we use the ?  Why did it come to be the electron volt and not, say, just a prefix of the joule, like the nanojoule?  Does the electron volt represent anything particular as far as the mathematics goes? I am guessing that it does, and if so, what is it that the electron volt exactly represents in terms of the mass of a particle, as I have seen it used for both the energy of a photon and the mass of subatomic particles?


To run is good Running is good  What is the difference in meaning?

I am wondering whether there is any difference between a gerund acting as subject and an infinitive acting as a subject.


I`m trying to snap the ends of a curve, to two points in space. However, I can't get past the fact that It requires worldspace input of a matrix instead of a vector. I've tried to convert worldspace to local, and backwards but its not my strongpoint. Any ideas are more then welcome. Thank you! import bpy from bpy import context, data, ops from mathutils import Euler, Matrix, Quaternion, Vector   # Create bezier path. ops.curve.primitive_nurbs_path_add(enter_editmode=True) #ops.curve.subdivide(number_cuts=0) ops.transform.resize(value=(2.0, 2.0, 3.5)) ops.object.mode_set(mode='OBJECT') curve = context.active_object curve.name = 'line'   # snap one end of curve to A other to B location_a = (1,1,0) # (XYZ) location_b = (2,2,0) # (XYZ)   curve.data.splines[0].points[0].co = Vector(location_a) # error ->    # Line 20 -> ValueError: bpy_struct: item.attr = val: sequences of dimension 0 should contain 4 items, not 3 ```

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)] )


What is the concept @ Before coming to select this code?  SqlDataSource2.SelectCommand = @"SELECT tblstore.storname,tblproduct.pid, tblproduct.pname, tblproduct.pprice, tblproduct.publisher, tblproduct.writer FROM tblproduct INNER JOIN tblstore ON tblproduct.storeid = tblstore.storeid WHERE tblproduct.pname LIKE @likeText"; SqlDataSource2.SelectParameters.Add("likeText", "%" + txtName.Text + "%");

This is a .NET question for C# (or possibly VB.net), but I am trying to figure out what's the difference between the following declarations:  string hello = "hello";   vs.   string hello_alias = @"hello";   Printing out on the console makes no difference, the length properties are the same.


Is it possible to call a function by using the strings ?  (i.e) I have a variable var target = 'next';. Using this string I want to call the jquery method next() . Should i use target + '()' (this is bit foolish) to call next() ?  I know it can be done using conditional statements. Since it is a string got from users, but it is difficult to use conditional statements for all that.  In my jQuery plugin, users will pass the value prev, siblings etc as options, so that the respective jQuery methods will be executed.   How do I implement this ?

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


I want to show the custom taxonomy name on the listing of custom post type on my front end

I've created a custom post type called "References" and a custom taxonomy "Genre".  I have 2 terms : Applications and Games.  My problem is that I'd like to show posts associated in Applications on a page (and the same for the games). I believe WordPress do this like doing the same for tags....  In fact, I just need to make a query and getting the current term of the page.  Here is what I tried but I get the same list for each terms page (Applications and Games) :  <?php get_header(); ?>

<?php single_cat_title(); ?>

     <?php      $loop = new WP_Query( array( 'post_type' => 'references' , 'genre' => '') ); ?>     <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>          <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php the_title(); ?>

<?php the_content(); ?>

          <?php the_post_thumbnail();?>      <?php endwhile; // end of the loop. ?>

  <?php get_footer(); ?>   Hope someone can help me. I've Googled for a week now...


As already stated in the question, I was wondering what the difference between these two network (p2p and mesh) types is. I mean, in both of them all nodes are connected without a central server, and data is transported via different users using another users as hopping station. So, is it the same if I write a p2p network program, or a program which helps me creating a mesh? Even a research in the internet didn't tell me a difference. So maybe someone can help me here?

According to the ,  Ad-Hoc means peer-to-peer while mesh means bridge-to-bridge or router-to-router, meaning in a mesh every node has the capability to route.  So would mesh networks be subparts or subcases of ad-hoc networks?


Consider the following short example, where a two column page is selected, and the algorithm is split across the two columns using a manual \pagebreak within the algorithm's code:  \documentclass[twocolumn]{article} \usepackage[english]{babel} \usepackage{algpseudocode} \begin{document}  \begin{algorithmic} [1]     \State Let $a \gets b + c$     \State Let $a \gets b + c$     \pagebreak     \State Let $a \gets b + c$     \State Let $a \gets b + c$ \end{algorithmic}  \end{document}   Here's the result:    Now, by putting the code inside a float, I no longer can split the algorithm by \pagebreak:  \documentclass[twocolumn]{article} \usepackage[english]{babel} \usepackage{algorithm} \usepackage{algpseudocode} \begin{document} \begin{algorithm*}[t] \caption{Test}  \begin{algorithmic} [1]     \State Let $a \gets b + c$     \State Let $a \gets b + c$     \pagebreak     \State Let $a \gets b + c$     \State Let $a \gets b + c$ \end{algorithmic}  \end{algorithm*} \end{document}   and the result:    How can I get the same effect within a float? Could you please suggest a method which is not specific to algpseudocode, and applies to algorithm2e as well? (The latter )

I have a single-column document and to save space I would like to make a long algorithm (produced using packages algorithm and algorithmic) to be double-column. That is, I would like the float content to start on the left column and continue on the right column, where the rest of the document is single column. I can place two algorithms side by side within a figure environment, but I am not sure if partitioning a single algorithm into columns can be done.


I applied for a business (creative) entertainer visitor Visa because I am an octopad player, performing for 10 years in India. A London sponsor invited me to perform with my musical group in the Indian cultural festival of Navratri, Diwali and Gujarati New Year. The duration of the tour is 37 days.  I requested Super Priority visa service and was refused, for reasons I think are wrong. I attached all the sponsor documents with details of all expenses it will pay, their bank statements, charity registration certificate, and the events details.  I also attached my bank savings and current account statements, and my mother's pension and salary account statements. The refusal reasons are not correct:   Currency is not indicated: when we complete the online form in Gujarati language, it shows all the amounts in GBP. Is it compulsory to write it again? Super Priority visa applied for just 6 days before date of travel: Is it necessory to say why? It takes 5 or more working days which will create problem for me as well as the sponsors making plans for performances; it's a society with 400 persons who daily gather to celebrate the festival, Mention that NAPS will pay all the expenses and failure to submit evidence: this is totally wrong because I have attached sponsorship letter, agreement letter, and covering letter to the Embassy visa officer, the Society bank statements which has a good amount. I also got an invitation from Edinburgh Gujarati Society with a reference by Consul General Of India on their letterhead; they are agree to provide food and accommodation at their place, and London to London transportation.    Still, the visa officer informed me that I failed to submit documents, and asks why the Society would pay me because I am the chairman of an air academy. However, I also attached my biography about my business and that I am an octopad player and owner of this musical group. We perform on government contracts as well as private events. I attached many photographs of performances, YouTube links, international travelling photographs, original notaried work order of musical performance by the government of Gujarat etc. Still, it mentioned that my role in this trip is unclear.   Visa officer mentions a bank statement of my mother's pension account in which amount is very low, but I already stated that NAPS will provide all the expenses, including round trip air fare, visa fee, local hospitality in the UK etc. Why is the visa officer taking into account the applicant's bank statement?    If the visa officer is taking it into account, they didn't look at all the documents, because I attached my personal savings and current bank account statements, with a total of around 29Lakh Inr (19Lakh saving + 9 Lakh current). Is this not perfect?   We are getting everything from the sponsors in the UK. Why are they looking at whether that amount is sufficient or not? I have attached my mother's bank statement for support (her salary and pension account statement) which we are not using for any home expenses. I am earning so we do not require my mother's account. All the home expenses are paid by me; we are only 3 members in my family (me, my wife and my mother). I lost my father when I was 2 years old. My wife helps me in my business, so no need to take any money from mother's account; this is joint a family.  I need urgent help because 19 Sept 2017 is the travel date. What do I do now? Can I apply again? It is showing NRA in the refusal letter and mentions that it is not eligible for appeal or administrative review. I also applied online for administrative review on the same day of the refusal. All the documents are as were gotten from VHS Mumbai because it can verify if they want to confirm anything about the documents. I have cut a small part of the pouch and removed only the passport; there was no stamp so I was confused and saw a letter. So I removed the letter.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


In Martin's A Game of Thrones Bran is attacked by a person by a Valyrian blade but fails and gets killed by Bran's direwolf. But in this or any other novel of this series it is never cleared who planned the murder. Who actually ordered to kill Bran? Have I missed anything so that I don't know?

I've read all of the books, but most of them years ago. But I can't remember who it was who actually sent the assassin.  Is it made clear, for example an actual confession?


Show that $$ \sum_{k\ +\ j\ =\ n\atop{\vphantom{\LARGE A}0\ \le\ k,\phantom{A} j\ \le\ n}}{2k \choose k}{2j \choose j} = 4^{n} $$  I think use integral solve it. But I don't it,and this problem is .  Thank you

It's not difficult to show that  $$(1-z^2)^{-1/2}=\sum_{n=0}^\infty \binom{2n}{n}2^{-2n}z^{2n}$$  On the other hand, we have $(1-z^2)^{-1}=\sum z^{2n}$.  Squaring the first power series and comparing terms gives us  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}2^{-2n}=1$$  that is,  $$\sum_{k=0}^n \binom{2k}{k}\binom{2(n-k)}{n-k}=2^{2n}$$  My question: is there a more direct, combinatorial proof of this identity?  I've been racking my brains trying to come up with one but I'm not having much success.


I've setup my profile picture to be loaded from Gravatar. But in some places it is showing my identicon, while in other places, it is actually showing the correct Gravatar image.  From what I've found, this is where I'm getting the wrong image (this is occurring on all of the SE sites I've checked):   On desktop: I'm getting the identicon next to my name in the answers and questions. (However, I get the correct image when I hover over the image to view the expanded user card) On mobile: I'm getting the identicon in the SE's site switcher in the top bar.   From where I've looked, everywhere else I'm getting the correct image (ex: ).

For a few days now, I have wondered why my small avatar changed to some "colored blob". I've tried with different browsers, all the same. Found some related questions here at Meta:       But none of the explanations seem to match. Some facts:   I haven't changed either my image nor my mail address for years (so it shouldn't be a caching issue) while the small image resolves to a blob, the big one comes fine URL of the small: https://www.gravatar.com/avatar/e2b29bd68eb03763a0e18c691ecf9fa5?s=32&d=identicon&r=PG URL of the big: https://www.gravatar.com/avatar/e2b29bd68eb03763a0e18c691ecf9fa5?s=328&d=identicon&r=PG   you see they only differ in the s= parameter (size) you see both are using d=identicon instead of d=gravatar (trying the small URL with d=gravatar resolves to the correct image)  My profile image is set to "Gravatar", not to "Identicon"   Any way to get that fixed?


I was fairly easily able to obtain and prove this formula for the sum: $$S(n)=\frac{n}{n+1}$$ by typical means of computing the partial sums, observing the pattern, and proving by induction.   My question is: Is there a more "analytical" means by which to determine this formula?   I ask the same of this question, though let me know if it is too unrelated and should be a separate post:  For $n \in \mathbb{N}$ and $n \geq 2$, find and prove a formula for $\prod_{i=2}^n (1-\frac{1}{i^2})$.

Can we simplify the given product to a general law? $$\left(1-\frac{1}{4}\right)\left(1-\frac{1}{9}\right)\left(1-\frac{1}{16}\right)...\left(1-\frac{1}{n^2}\right)$$


I'm currently just getting involved with electronics, just bought an Arduino starter kit and am fiddling around with it.  Currently i'm on a project which involves the use of a DC(spinning) motor in conjunction with an Arduino, and the book im using states that motors typically require more current that what the Arduino can provide, and that the Arduino can only provide 40mA, which is much less than what most motors require to do work.  However, the book states     Transistors are components that allow you to control high current and high voltage power sources from the low current output of the Arduino   and     Motors require special consideration when being controlled by a microcontroller.Typically the microcontroller cannot provide enough current and/or voltage to power a motor.Because of this, you use transistors to interface between the two.   I've done some googling and know the basics of how transistors works (e,g doping, n-type and p-type) but i don't see why attaching a transistor to a circuit/microcontroller that outputs less current that the motor requires magically makes the motor works.  I would really appreciate any clarification and/or explanations.  P.S. I thought that this question might better fit this site rather than Arduino.stackexchange as it is more about transistors in general.

Can someone care to explain - in plain English - what a transistor is and how it works. I know computers are full of these but don't know much about them.  P.S. I know about this site from another one in the family of StackExchange (I have no engineering background) and hoped someone might help me with this. Please don't link to the  explanation. I've read that and I'm more confused.   I'm looking for a 7 year old explanation.  Thank you!


I have an iPod Touch that says it is disabled and to try again in 22,768,662 minutes.  I really don't have 42 years to wait.  I need to access this iPod Touch and the material inside it without factory resetting it.  Please help?

I think my son was trying to guess the passcode! What do I do?  I can't wait 42 years!


As you see in the red part of the picture, I would like to add keys to explain what the brackets stand for. I just added this with paint, but is there a way to do this in tex? Also, are there nicer semantics for explaining such keys, e.g. using a : or spelling brackets as brackets?    \begin{table}[!ht]  \centering \setlength{\tabcolsep}{3pt}     \begin{tabular}{ | l | c c |}   \hline  & Column1 & Column2 \\ \hline     X   & A (B)     & F                 \\          y           & C     & F [D]     \\ \hline         \end{tabular}             \caption{Some table}         \label{tab:table} \end{table}

I'm using the latex package  because the  package isn't using APA style version 6 yet.  Now I'm trying to add a table with notes right underneath it, like in this table for instance:    Since the \caption{} is used as a title above the table, I have to add an extra row for the notes that goes over the whole table width. The problem is that the notes won't fit into one line so I need multi-line cell. How can I accomplish that? Or am I doing it totally wrong and there is a much easier way? I guess footnotes don't work here.  \documentclass{apa6e}  \begin{document} \shorttitle{} \begin{table} \caption{title} \begin{tabular}{cc} foo & bar\\ \hline \multicolumn{2}{l}{Notes. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras lacus orci, porttitor et posuere sit amet, tempor non justo. Ut quis aliquet turpis. Ut dictum nulla eget purus elementum a lacinia libero varius. Donec malesuada nulla ut odio rhoncus convallis. Aenean faucibus sollicitudin sapien, a vestibulum ante rhoncus sit amet. In vitae mi justo. In arcu metus, porta et lacinia ut, ultricies sed eros.} \end{tabular}  \end{table} \end{document}


I am using Ubuntu 16.04,  I am facing the problem with conda command (conda: command not found). when I export path of Anaconda3/bin to $PATH conda  command is working. if I open another Terminal and try to use the conda command it's not working (conda: command not found). after the export path each time then only it's working. can anyone help me to fix this error?

How do I add a directory to the $PATH in Ubuntu and make the changes permanent?


I've read material claiming it comes from the Higgs boson fails while others claim it is from the tensions of quarks in the gluon field... I am only a 15 year old kid in high school so please "dumb it down"

The video  argues that almost all the mass that we are made of doesn't come interaction with the , but rather that most of a nucleus's mass comes from the space between quarks (the ).  If the video is correct, then there really needs to be an easy-to-understand explanation for mass because science popularizers make us laypeople think that the Higgs mechanism is responsible for all the mass in the atoms and that would be of course very misleading.


I am trying to find a way to retrieve a subset of rows from multiple rows returned; and increment through the subset.  So as an example:  Table A as 1000 records. I do a select * to retrieve all records, but I only want the first 100. Then, I want subsequent queries to return the next 100, and so on, until I reach the end (1000'th row).  If anyone knows how to do this please advise.  Thanks in advance.

I am not as familiar with Oracle as I would like to be.  I have some 250k records, and I want to display them 100 per page.  Currently I have one stored procedure which retrieves all quarter of a million records to a dataset using a data adapter, and dataset, and the dataadapter.Fill(dataset) method on the results from the stored proc.  If I have "Page Number" and "Number of records per page" as integer values I can pass as parameters, what would be the best way to get back just that particular section.  Say, if I pass 10 as a page number, and 120 as number of pages, from the select statement it would give me the 1880th through 1200th, or something like that, my math in my head might be off.    I'm doing this in .NET with C#, thought that's not important, if I can get it right on the sql side, then I should be cool.   Update:  I was able to use Brian's suggestion, and it is working great.  I'd like to work on some optimization, but the pages are coming up in 4 to 5 seconds rather than a minute, and my paging control was able to integrate in very well with my new stored procs.


About 15 years ago, I read a book about a classical musician whos wife (possible girlfriend) dies and he turns to writing commercial jingles (which he feels is selling his soul, but is well-paid) to pay for cryogenic suspension until the end of the universe. The premise is that the big bang started expansion, but as the universe contracts, time would go backward and he would be reunited with his wife.  He is woken up in the future and agrees to work for a government or corporation. One of these jobs sees him visit a planet where small conical creatures live, similar size to dogs. The technology allows his thoughts to be placed in to new bodies, and he goes to see the planet, but the small creatures keep attacking and killing him. He keeps going through this cycle, because he told the ships computer not to tell him if anything bad happens to him.  Anybody got any idea of this books title?

I remember an interesting book, in which the state of science was quite advanced, and, the process of learning a particular advanced profession was less about learning the related skills, and more about learning how to speak the language.  Can you help me identify this book (or maybe it was a series)?


I used to run minecraft servers in 14.04 by either clicking the .sh file, and selecting run in terminal, or running the .jar file. I'm on 18.04 now, and I can't run the .sh file at all. Double clicking immediately opens up text editor, and dragging it to a terminal also opens the text editor. Trying to open the server.jar gives me a small window for half a second, which immediately closes. Has something changed, and does anyone know how to run .sh files now?

How can I make a bash script executable by double clicking just like .exe files in Windows? I tried , but there are two consequences:   the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work.   I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.  Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?


If we use the words "Thanks" or "Thank you" (on a line by itself) at the end of a correspondence -- in the absence of a complimentary closing (such as "Sincerely,") -- do we follow "Thanks" and "Thank you" with a comma or a period?   Example:  Hi Joe,  Body of text ...  Thank you,  Mike    Example 2:  Hi Joe,  Body of text ...  Thanks,  Mike

Normal practice is to end emails with a Thanks or Regards. My question is should there be a comma or a period or nothing after Thanks/Regards?      Thanks,       John Doe   Or     Thanks.       John Doe   Or     Thanks       John Doe   I have seen all three versions as part of email signatures. Which among these three is correct? Why?


I'm trying to write a basic chat server which will forward messages from one client to another.  I have my client running on another laptop and the server gets the user name which I send so surely the ObjectInputStream isn't null and the user name isn't null?   Here is the HashMap and ObjectInputStream:  private Socket[] clientSocket = new Socket[100]; private ObjectInputStream[] fromClient = new ObjectInputStream[100]; private ObjectOutputStream[] toClient = new ObjectOutputStream[100]; private HashMap<String, ObjectInputStream> clientInputs= new HashMap<String, ObjectInputStream>(); private HashMap<String, ObjectOutputStream> clientOutputs= new HashMap<String, ObjectOutputStream>();;   Here's the bit where I get the null pointer exception:  //This is just for testing: System.out.println("User name is :" +userName); System.out.println("fromClient[i] is " +fromClient[i].toString()); Thread.sleep(1000);  //Add this user to all lists. clientInputs.put(userName , (ObjectInputStream)fromClient[i]);* clientOutputs.put(userName, (ObjectOutputStream)toClient[i]); onlineUsers[i] = userName;   I get: [Line 105 is the line clientInputs.put(...,...); where I marked with a *.]      User name is :hulo     fromClient[i] is java.io.ObjectInputStream@147c5fc     Exception in thread "Thread-0" java.lang.NullPointerException         at AcceptConnections.addNextUser(AcceptConnections.java:105)         at AcceptConnections.run(AcceptConnections.java:53)   I don't know if this has anything to do with it but without the line Thread.sleep(1000); the NullPointerException comes out after the "user name is" line but before the "fromClient[i]" line.    Edit: I'm not sure if I made it clear, but these lines of code are after my client program has connected to the server so the user name is the one taken from the client during a test run and so the ObjectInputStream is definitely working.

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


I am trying to download a free app but it keeps telling me to provide a credit card. I try to avoid it but it won't let me and I don't have a credit card.  How can I use App Store without a credit card?

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


I'm adding list items with delete buttons to list and old items can be deleted but newly added cannot.  I tried to add an event listener to new list items' delete buttons additionally but I couldn't.  var deleteButtons = document.querySelectorAll(".delete"); deleteButtons.forEach(element => {   element.addEventListener("click", deleteItem); });  function deleteItem(e) {   e.target.parentElement.parentElement.removeChild(e.target.parentElement); }   I watched Brad Traversy's dom videos on Youtube and tried to make delete items part on my own. Commented codes are Brad's codes. In my codes, I tried to select delete buttons and add them, eventListener. With deleteItem function I can delete old list items but cannot delete newly added. Because newly added list elements' delete buttons have not event listener. My question is "In Brad's version, how newly added to list items have event listener and in my version newly added delete buttons have not?"  Codes:

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Can you transfer data from your Gmail to Pokemon Trainer Club, because I know you get rewards and I want to switch data so it won't get erased.

I have been playing for almost 2 days, and today it is asking me to sign up again.  I have all my game saved in my google account, but I wonder if I just log in from a trainer account will I keep my progress?


I'm looking to call a constructor function dynamically based on an value I have in an object.   Let's say I have an object:  var food = {    pizzas:[     {       pizza: 'Pepperoni'     },     {       pizza: 'Vegetarian'     }   ]  }   Now, let's say I have a couple of Constructor functions bound to a global object.  window.pizzaConstructors.Pepperoni = function(){   // do something }  window.pizzaConstructors.Vegetarian = function(){   // do something else }   What I want to be able to do is cycle through the food.pizzas array and call the corresponding constructor function based on the type of pizza of the current index.  So, if I have:  (for pizza in food.pizzas){   var currentPizza = food.pizzas[pizza]    new pizzaConstructors.currentPizza();  }   Any idea how I can go about this?

I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]).


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


When Ares reveals himself to Diana in Wonder Woman, just after she finds out that her sword is powerless against him, he says "Oh my dear child".  Then, Diana tells him:     Goodbye brother.   before she .  Why did she say that?

At the start of Wonder Woman, we see Diana's "mother", Hippolyta, tell Diana that she was made out of clay and given life by Zeus. This is repeated by Diana at least once.  We later learn;      That Diana herself, rather than the sword she wields, is the Godkiller, the weapon designed to defeat Ares. At this point, she starts calling Ares her brother.   Because of this, I began to assume that Hippolyta had lied, and that Zeus was actually her natural father and Hippolyta her natural mother. However, as a friend pointed out later, the film never explicitly confirms this - the "twist" still works if she's still made from clay, which was the origin of Diana in the comics for a very long time.  Is there any evidence in the film itself, or any statement been made from the people who worked on Wonder Woman, that definitely answers the question of "Is Diana Prince the natural born daughter of Zeus and Hippolyta, or was she really made from clay and bought to life"?


So there is a non profit organization in Greece called "Μπορούμε" which translates to "we can". Me and some friends we volunteered there as a valentine's day event to give back to the community because we want to support it. We would like to write a small article about our event. The title, as of yet, is "To love is to can". I despise the way it sounds!! "To can" sounds odd to my ears. Is there any way we can rephrase it? The meaning we're going for is something along the lines of we love & we can but in a catchy way to grab attention.

Like the title says: I don't think "to can" is right :)  I mean "can" as in to be able to. I'm aware of other meanings.  I can't find the answer here. (There's  which sidesteps this precise case). Online dictionaries draw a blank (, e.g.).  I'm looking for some official indication that the infinitive doesn't exist for this irregular verb.  It would be nice if someone could share any information on how this has evolved to be the case.


In the phrase "My dog wiggles it's butt" there seems to be a division of opinion as to whether the use of the apostrophe is grammatically correct.  I suggest that as the dog in question is the owner of the butt in question and that said dog is an animate object replaced by the use of the word it then the apostrophe is a correct. Just as we use the apostrophe to show possession in the phrase "Mary's head."

Probably one of the most frequent grammar mistakes in the English language is:     The dog sat on it's mat.   Since spelling checkers don't catch it, and it is even logical, since you would correctly write:     The dog sat on Fluffy's mat.   What is the best way to explain to a learner of English how to choose between it's and its?


So I am using the report class, and every time I try to create a new \chapter it creates it on a new blank page with just the title. I have tried using \usepackage{etoolbox} but I keep getting Latex Error: Float(s) lost and will not compile. I want to start my chapter on the same page, but I can not figure out how.  Link to full .tex file:   \documentclass[12pt, letterpaper, twocolumn]{report} \usepackage{fullpage} \usepackage[pdftex,hypertexnames=false,linktocpage=true]{hyperref} \hypersetup{colorlinks=true,linkcolor=blue} \usepackage{etoolbox} \begin{document} \title{TITLE} \author{RPBruiser} \date{April 13, 2015} \maketitle \begin{abstract} Stuff is here. \end{abstract} \renewcommand{\chaptername}{} \chapter{Introduction} Context of Chapter 1 \chapter{Methods} \section{Housing} Information 123525 -------------HERE IS WHERE I WANT TO BE ON SAME PAGE------------- \begingroup \renewcommand{\clearpage}{} \chapter{results} \endgroup \end{document}

I've googled, and I read a lot about how not having a pagebreak before a new chapter is bad style. I've read about how one could use sections instead. I've read about how changing whether a chapter begins on a new page or not within a document is even worse, from a style standpoint.  However, if I still have to do it somehow, typographic style be damned, and I have to do it in a twocolumn document...  Background: I am translating a set of gaming rulebooks into a single scrbook, with each original rulebook represented by a part in my scrbook. Layout of the rulebooks is relatively uniform, with  beginning on a new page each.  The exception to this is the first rulebook / part, which has very short chapters, sometimes several on a single page, but following the same numbering scheme as the more elaborate chapters in the other rulebooks / parts.  I could typeset that first book seperately, using sections instead of chapters, and include the resulting PDF. That way, I would lose the common TOC / LOT / index, which would be unfortunate.  I could wing it by redefining header formats for the first part, to make sections "look" like chapters and subsections look like sections and subsubsections... and so on. Pretty heavy-handed.  Edit: The solution in  (using etoolbox to patch the clearpage / cleardoublepage out of the definition of \chapter) does not work for a twocolumn document, yielding "Float(s) lost" errors. (I hadn't mentioned the twocolumn detail before as I did not think it would make a difference.) User lockstep asked for a seperate question; instead, I vote for re-opening this (edited) one.    tl;dr:  Is there a way to tell LaTeX not to put a pagebreak for \chapter in a twocolumn document?


The problem is following:     Given that $p$ is a prime number, $p > 3$. Prove that $(p^2 - 1)$  is divisible by $24$.   I started writing down the possible remainders of dividing $p$ by $24$ and got the following row:  ${5; 7; 11; 13; 17; 19; 23}$  But am i even right at this point? If i am how do i prove that these are the only possible remainders?

Let $p>3$ be a prime. Prove that $24 \mid p^2-1$.   I know this is very basic and old hat to many, but I love this question and I am interested in seeing whether there are any proofs beyond the two I already know.


public class SomeClass {     public static void f(int x, int [] y, int[] z){         x=2;         y[0]=x;         z= new int[5];         z[0]=555;     }          public static void main(String[] args){         int x= 111;         int[] y={222,333,444,555};         int[] z={666,777,888,999};         f(x,y,z);         System.out.println(x);         System.out.println(y[0]);         System.out.println(z[0]);      }      }   The output of this code is 111-2-666, what does f(x,y,z); exactly do? and why after execution it prints x as 111, while y[0] gets the value of the other x and prints 2 and z remains the same although it says that z[0] is 555? Everything remains unchanged except y[0] and i don't understand why.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


How did I earn the Fascinating (secret) hat on Stack Overflow? There is no clear explanation on the  page for it, just this is a secret hat!

So far, I've unlocked one of the secret hats. I'm wondering what other secret hats are out there and how to earn them?


This in particular:     Why is "Low Quality" not an option here, but it does appear on other questions?

Possible Duplicate:          I see a  to receive a "very low quality" flag by me.  It's just a link pointing elsewhere basically saying, "try this." I generally do this for answers I see that are like this and have been successful every time so far.  I save "not a real answer" flag for other cases such as someone asking another question in an answer or "thanks" answers.  I want to flag it as "VLQ" but I don't see that as an option*.  In fact, I don't see it as an option anymore on any site throughout the Stack Exchange network.  * This was not possible before when I initially posted this. Michael's observation on the needed downvote seems to be the reason it didn't show up.  Did it just get phased out as being unnecessary?  Should I be using "NARA" as the flag reason for this case now?  I'm not sure if the "NARA" explanation really covers this case well: (emphasis mine)     This was posted as an answer, but it does not answer the question. It should possibly be an edit, a comment, another question, or deleted altogether.   These sorts of answers can answer the question in general.  The site linked to might very well completely answer the question.  (in this particular case, maybe not however)  It's just that the answerer really should do something to improve the answer.  It's not like it's a "This question is a duplicate of this [onsite question] post" or some other general spam.  Those cases are clearly "NARA"/spam.  There was a  regarding the necessity of this flag reason.  Answers point out that it is needed and I agree.  There hasn't been anything mentioned (that I am aware of) in terms of removing it by the team.  Was this officially removed now in favor of other flagging reasons?  Or is this just a bug and it was "accidentally" removed?


I have to use the AdaBrowse Html generator to create a bunch of formatted files. Unfortunately, all of these files contain headers before each function or procedure that follow no consistent form of formatting.   -- Example 1 - new --################################################## -- Name: Example -- Version: 1.0 -- Description: Shows Example -- a 12-bit field containing the an example. -- Inputs: AN_Example. -- Outputs: None -- Return Values: Examples -- Callers: -- -- Callees: -- ----------------------------------------------------------  -- Example 2 - new --################################################## -- Name: Example -- Version: 1.0 -- Description:  -- Shows More Examples -- in a 12-bit field containing the an example. --  -- Inputs: AN_Example. -- Outputs: None -- Return Values: Examples -- Callers: -- -- Callees: -- ----------------------------------------------------------   AdaBrowse has a very good formatting option using sed but I can't get it to extract only the lines from "-- Description:" to (and not including) "-- Inputs:"   The closest Iv'e gotten was with the command:  sed -r 's/.*(Description:[^Inputs:]*).*/\1/g   But it grabs everything. How can I extract the said lines?

To all the 'sed' doctors out there:  How can you get 'sed' to extract a regular expression it has matched in a  line?   In other words words, I want just the string corresponding to the regular  expression with all the non-matching characters from the containing line stripped away.  I tried using the back-reference feature like below  regular expression to be isolated           gets `inserted`                here                     |                v    sed -n 's/.*\( \).*/\1/p    this works for some expressions like   sed -n 's/.*\(CONFIG_[a-zA-Z0-9_]*\).*/\1/p    which neatly extracts all macro names starting with 'CONFIG_ ....' ( found in some '*.h' file ) and prints them all out line by line             CONFIG_AT91_GPIO           CONFIG_DRIVER_AT91EMAC                    .                    .              CONFIG_USB_ATMEL           CONFIG_USB_OHCI_NEW                    .                  e.t.c.    BUT the above breaks down for something like    sed -n 's/.*\([0-9][0-9]*\).*/\1/p    this always returns single digits like                    7                  9                  .                  .                    6   rather than extracting a contiguous number field such as.                 8908078               89670890                    .                  .                    .                23019                     .                e.t.c.     P.S.: I would be grateful to feedback on how this is achieved in 'sed'.        I know how to do this with 'grep' and 'awk'       I would like to find out if my - albeit limited - understanding of        'sed' has holes in it and if there is way to do this in 'sed' which I       have simply overlooked.


The Euclidean inner product $<x,y>$ of the vectors $x , y \in \mathbb{R}^n$ is defined by:  $\langle x,y\rangle = x_1y_1 + x_2y_2 + x_3y_3 + ... + x_ny_n$  I am unable to find the intuition behind this? Why do we need this inner product? What happens to the vectors under equation and what does the scalar answer tell us?  P.S. I have already seareched it, most the articles take it into geometric terms and introduce $\cos\theta$. Can anybody help me visualize thing without angular stuff?  Edit: Question addressed  uses the angle to explain geometric dot product. I am wondering if there exist some explanation for dot product in Vector Space.

I know how to calculate the dot product of two vectors alright. However, it is not clear to me what, exactly, does the dot product represent.  The product of two numbers, $2$ and $3$, we say that it is $2$ added to itself $3$ times or something like that.  But when it comes to vectors $\vec{a} \cdot \vec{b}$, I'm not sure what to say. "It is $\vec{a}$ added to itself $\vec{b}$ times" which doesn't make much sense to me.


She said, "I like dogs." He said, "I like cats." I would like to combine these two sentences.  Do I put a period after dogs? Is it     She said, "I like dogs." and he said, "I like cats."   or     She said, "I like dogs" and he said, "I like cats."

I recently learned that I have developed a consistent, but entirely wrong approach to punctuating direct speech in fiction. I am in the unenviable position of trying to relearn.  Previously I wrote such things as:     "I'm done." She said.   when the quoted speech was definitely, absolutely the end of a sentence. So now I know I need.     "I'm done," she said.   This follows the rule that a period is only allowed when the end of the spoken sentence is also the end of the sentence in the narrative. For example:     "I'm done." She slammed the door on the way out.   So, it now looks odd to me when there are multiple sentences in the speech:     "I can't take her. I'm done," she said.   Can you reassure me that is correct, or give the correct form? Please don't suggest rewriting the sentence to put 'she said' in the middle - I'm aware of that: I'm specifically asking about the punctuation rules.  The other odd case is speech ending with an ellipsis. Do sentence terminating ellipses (four periods normally) become:     "I can't take her. You know, ...," she said, nodding towards Jane.   If so, are non-terminating ellipses dealt with the same way?     "I can't take ...," she nodded towards Jane, "any more!"   or can non-terminating ellipses be used unadorned?     "I can't take ..." she nodded towards Jane, "any more!"   I'd be very grateful if you could point me at references as well as answers. For the record I am a British writer writing for both British and US publication, so any variation is also interesting to me!


My son has Alpha Sapphire for the 3DS and is unable to add friends. They show up as acquaintances but when the prompt to add them as friends shows, the option to add them is greyed out. I have never played this game, so I have no idea what the problem could be. I googled, but couldn't find anything that tells me how to resolve this issue. Is it a setting that needs to be changed, or is there something that he needs to do, but isn't?

Some times when you trade with an acquaintance you get a prompt asking if you want to be friends with the other person. Most of the times it does not. It happens randomly too. It could be  after the first trade  after just trading 1 pokemon or it could happen after the 3rd trade request with that person after trading 10 pokemon.  When and how can I get the friend request to appear?


How to test the convergence of following series $$\sum{\frac{1}{(\ln {n})^{\ln{n}}}}$$  I have tried Cauchy condensation test and gives me nothing

Could I have a hint for testing the convergence of the following series please?  $$\sum_{n=2}^\infty\frac{1}{(\ln n)^{\ln n}}$$  Edit  The integral test does not work because $\int_1^n\frac{1}{(\ln x)^{\ln x}}dx$ has not an elementary primitive.  Thank You.


And while we're at it, C11 adds some keywords like _Atomic as well. Is this the right way to submit requests for addition, or would it be better to ask for it in the 'Google Code Prettify' project?  EDIT: I checked the prettify source repository (read-only, svn revision 194), and would suggest to change the variable C_KEYWORDS in src/prettify.js, line 70, to:  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +      "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +     "static,struct,switch,typedef,union,unsigned,void,volatile," +     "_Alignas,_Alignof,_Atomic,_Bool,_Complex,_Generic,_Imaginary," +     "_Noreturn,_Static_assert,_Thread_local,inline,restrict"];   Especially inline and restrict are omissions from C99. If you wish, you might also include the more common variants (but formally not defined as keywords):  var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +      "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +     "static,struct,switch,typedef,union,unsigned,void,volatile," +     "_Alignas,_Alignof,_Atomic,_Bool,_Complex,_Generic,_Imaginary," +     "_Noreturn,_Static_assert,_Thread_local,inline,restrict," +     "alignas,alignof,atomic,bool,complex,generic,imaginary," +     "noreturn,static_assert,thread_local"];   Refer to the most recent C standard ISO/IEC 9899:2011 for details.  EDIT2: I sent an email to the author of prettify as well.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


Please, i'm new to ubuntu 14.04 and i can't connect to wifi available. I'm using hp pro book 450-G2. But i can use an ethernet cable to connect to the internet. there's actually no option for me to see available WIFI connections.  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]_

Only when I'm closer to the router, it shows any signal, but when I'm just little far from it, it is not showing wifi routers signals.


Let $\tau$ be the collection of sets $U \subset \Bbb R$ for which $U = \emptyset$ or $\Bbb R \setminus U$ is countable. Show that $\tau$ is a topology for $\Bbb R$.  Firstly I need to make sure that $\emptyset \in \tau$ and $\Bbb R \in \tau$. The first case is given in the problem statement, but I'm not sure if $\Bbb R \in \tau$ since I only have $\Bbb R$ with $U_i$'s subtracted? Also I would need to show that the arbitary unions of $U_i$, $i=1, \dots, n$ where $\Bbb R \setminus U_i$ is countable is in $\tau$. So in essnece $\bigcup_i(\Bbb R \setminus U_i)$ would have to be in $\tau$? How can I show this? I know that the unions of countable sets are countable so wouldn't that tell me immediately that $\bigcup_i(\Bbb R \setminus U_i)$ is countable? $\Bbb R$ clearly isn't, but is the difference?

I'm teaching my self topology with the aid of a book. I'm trying to prove the following is a topology:     Let X be an infinite set. Show that $\mathscr{T}_2=\{U \subseteq X : U = \emptyset $ or $ X\setminus U $ is countable$ \} $ is a topology.   My book calls this set the ""  Please let me know if my proof is valid.     corollary [A]: The union of countable sets are countable.    proof: I'm going to take as a given that that the union of finite set are finite, and just prove the case of . A set is countable infinite if there is a bijection between the set and the natural numbers. Let $A$ and $B$ be a countable infinite sets. Now let $f$ be the bijection between $A$ and $\mathbb{N}$ and $g$ be $B$'s bijection.  $f:\mathbb{N}  \rightarrow  A$  $g:  \mathbb{N}  \rightarrow B$  There can always exist a bijection $h$ that maps $A \cup B $ to $\mathbb{N}$. To account for non disjoint sets, let $B' = B \setminus A$; (note: $A \cup B = A \cup B'$)  $h:  \mathbb{N}   \rightarrow  A \cup B'$  $ h(x) = \left\{         \begin{array}{ll}             f(\frac{1}{2}x); & \quad x \in 2\mathbb{N} \\             g(\frac{x+1}{2}); & \quad x \in 2\mathbb{N}+1         \end{array}     \right. $   $h^{-1}(x)$ would map $A$ to the even numbers, and $B'$ to the odd numbers.  Therefore, The union of countable sets are countable. (QED)  Now to verify the definition.     (i) X and Ø are elements of $\mathscr{T}$.   Ø is given in the definition of $\mathscr{T}_2$. Also, the empty set is considered finite, with cardinality zero. Thus $X$ is in $\mathscr{T}_1$ because its complement is finite, and finite numbers are countable.      (ii) $\mathscr{T}$ is closed under finite intersections.   Let:$V_k \subseteq X$ be any countable set. (ie: $V_1, V_2...$ are all countable sets)  So Then, $U_k = X \setminus V_k$, would be the subsets of $\mathscr{T}_2$.  $U_k \cap U_j = X \setminus (V_k \cup V_j) $, due to De Morgan's law.   Thus, $U_k \cap U_j \in  \mathscr{T}_2$, since the Union of two countable sets is also countable[A]. And This reasoning can be extended to any finite amount of intersections.       (iii) $\mathscr{T}$ is closed under arbitrary unions.   Let $A=\bigcup_{i \in I} U_i$ be an arbitrary union of sets whose complements are are countable.Then by De Morgan's law, $A=X \setminus (\bigcap_{i \in I}V_i)$, for some countable sets $V_i$. By the definition of intersection, $\bigcap_{i \in I}V_i \subseteq V_i$ for all $i \in I$. Since $V_i$ is countable so is any of its subsets.  Hence the complement of $A$ is countable.


I can't find GNOME Tweak Tool in Ubuntu Software and it isn't found when I try to install it with APT  package 'gnome-tweak-tool' has no installation candidate   What should I do?

What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached 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 munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem.


Looking through proofs and there's one part I'm confused about, that if solved will get me straight to the answer. I need to show that $\sum_{m=0}^{N-1} \sin((m+\frac{1}{2})x) = \frac{\sin(Nx/2)^2}{\sin(x/2)}$ How should I go about this?

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


I want change variable by class function  class Miasto:   def __init__(self, name):     self.name = name    def go_to(self):     aktywnemiasto = self.name     return aktywnemiasto    m1 = Miasto("t1") m2 = Miasto("qwerty")   aktywnemiasto = "test"   m2.go_to() print(aktywnemiasto)   expected results: aktywnemiasto = "qwerty"  actual results: aktywnemiasto = "test"

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


Double-precision (IEEE 754): 53-bit significand precision gives from 15 to 17 significant decimal digits precision ().  Single-precision (IEEE 754): This gives from 6 to 9 significant decimal digits precision. All integers with 6 or fewer significant decimal digits can be converted to an IEEE 754 floating-point value without loss of precision ()  My guess is that by "decimal digits" wikipedia means all 37456 in 37.456  I understand it that lower bound (6 decimal digits for float and 15 for double) is always exact, and sometimes (when?) I can rely even on up to 9 (float) and 17 (double) decimal digits inclusive. By decimal digits I mean 456 in 37.456  But simple test-snippet shows that even 6th decimal digit lies:  System.out.println(90f == 90.000_001f); // true. Problem with 6th digit !!! System.out.println(90f == 90.000_000_000_001f); // true - as expected System.out.println(90f == 90.000_01f); // false. 5th digit still "exact" - as expected   I think 90.000_001 becomes 9.000_000_1 (mantissa in base10) * 10 (E1 exponent)  in internal representation (because 1 digit before decimal point must be used), so only 7th digit becomes inexact, meaning 6 digits is a guarantee (if you convert 90.000_001 to internal representation). But why wiki speaks about [6-9] range?  Besides, as I understand, maximum possible precision (number of representable decimal digits on the right after decimal point) is defined by simple math as integer part of log10(2^numberOfBitsForMantissa), but this calculation gives 6 (for float) and 15 (for double) - I don't include 1 implicit bit (for "integer" part) in numberOfBitsForMantissa (well, I don't know, is it allowed to use this bit with negative exponent like this: 1.11 * E-1 = 0.111). But this +1 bit anyway puts precision limit for float at 7 decimal digits max (unlike [6-9] in wiki).  So what number of precision digits shall be exact (see my code snippet) and why I see differences between these three:   my code snippet: up to 6 decimal digits (inclusive) for float wiki: [6 - 9] for float, [15 - 17] for double log10(2^numberOfBitsForMantissa) formula, giving max 6 (for float) and max 15 (for double)      My guess is that if I convert number like 99.000_01 to internal   representation like 9.9_000_01 then only 6 digits (float) and 15   (double) to the left of decimal point (.) are stored in mantissa in this INTERNAL representation (in 9.9_000_01). If I   have a number x < 1 (for example 0.345_567_8, then (and only then) it   can be represented as 3.455_678 * E-1 and in this case 7 digits   (float) and again 15 digits (double) can be stored - lg(2^53) and lg(2^52) both have 15 as integer part. Why wikipedia   writes different - I have no clue!   My research shows that there is no clear answer to my question: , ,     for an IEEE754 single precision floating point, the closest number to  9999990000   is  9999989760   What is guaranteed is that your number and the float, when both are rounded to six significant figures, will be the same.

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


Let $(X,d)$ be a metric space and let $S$ be the set of Cauchy sequences in $S$. Define "~" in $X$ by declaring "$\{s_k\}$ ~ $\{t_k\}$" to mean that $d(s_k,t_k) \to 0$ as $k \to \infty$. Let $X'$ denote the set of equivalence classes of $S$ and let $s'$ denote the equivalence class of $s = {s_k}.   I showed that $\phi(s',t') = \lim\limits_{k \to \infty} d(s_k,t_k)$ is a metric on $X'$.   Now I need to show $(X',\phi)$ is complete. Then for $x \in X$, define $x'$ to be the equivalence class of the constant sequence ${x,x,...}$. Show that the function $x \to x'$ is an isometry of X onto a dense subset of X.   I don't even know where to start. I need to show for the second case that for any $y' \in X'$, we can find a sequence that converges to $y'$. Any help please?

Let $(X,d)$ be a metric space and let $S$ be the set of Cauchy sequences in $S$. Define "~" in $S$ by "$\{s_k\}$ ~ $\{t_k\}$" to mean that $d(s_k,t_k) \to 0$ as $k \to \infty$. Let $X'$ denote the set of equivalence classes of $S$ and let $s'$ denote the equivalence class of $s = \{s_k\}$.   I know $\phi(s',t') = \lim\limits_{k \to \infty} d(s_k,t_k)$ is a metric on $X'$.   Show $(X',\phi)$ is complete.  For $x \in X$, define $x'$ to be the equivalence class of the constant sequence ${x,x,...}$. Show that the function $x \to x'$ is an isometry of $X$ onto a dense subset of $X$.   If anyone can share a proof, or steer me in the right direction, maybe tell me what it is that I need to prove specifically, that would be great.


I need a query to generate column names (and it's type if possible) of all tables in database.   Is there any simple way?

I'm looking at creating a basic ORM (purely for fun), and was wondering, is there a way to return the list of tables in a database and also the fields for every table?  Using this, I want to be able to loop through the result set (in C#) and then say for each table in the result set, do this (e.g. use reflection to make a class that will do or contain xyz).  Further to this, what are some good online blogs for SQL Server? I know this question is really about using system SPs and databases in Sql Server, and I am ok with general queries, so I'm interested in some blogs which cover this sort of functionality.  Thanks


In trigonometry, the functions $\sin$, $\cos$, $\tan$ all make sense to me.  However, in reality, $\tan(\theta)$ is the slope of the hypotenuse, not the slope of the tangent.  Can anyone tell me why this is backwards?

I am teaching the foundations of trig and find it a bit weird that tangent is called that.  I've never questioned it before, but what I keep finding online is the phrase 'tangent of an angle'.  Is anyone able to explain, maybe using some visual intuition, why we call it the tangent of an angle? Especially in the context of the unit circle.  Does it relate to the definition of a tangent to a curve?


I'm new to Linux and was wondering if it had any limit. Windows has limit 32bit-4GB, 64bit-128GB or so. Does the 32bit version of Ubuntu have a limit?

Does Ubuntu Desktop 32 Bit support more than 4GB memory WITHOUT changing anything (Without having to activate PAE via compiling kernel or anything similar). Will installing the 32 Bit Ubuntu on the machine be enough to detect the additional memory automatically. If yes, will this work if I add more than 4GB with a 32Bit Ubuntu already with 4GB Ram. One example would be to have 8GB Ram with Ubuntu 32 Desktop.  My Motherboard supports up to 8GB RAM and it has 32 Bit and 64 Bit support (It is the intel DP35DP)


I just installed Ubuntu 17.10 and when I pressed the Super key nothing happened. So I went into keyboard shortcuts and tried to map it to an action, but it wasn't registering.  To be more specific - when I'm on the "Set shortcut" window and press the Super key, nothing happens. I expect it to register as the keybind for the selected action.  Also Super registers properly when used with another key, for example Super + A

I've upgraded my laptop from 17.04 to 17.10 and the super key no longer brings up the applications menu. Does anyone have any idea how I can change this?   Shortcuts menu doesn't let me change Super + A to just Super.  Edit: I'm running the standard desktop version of Ubuntu 17.10


<?php if ( have_posts() ) : ?> <?php // Start the loop. while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); // End the loop. endwhile; else : get_template_part( 'content', 'none' ); endif; ?>   A simple loop her eon my index page.  I am using the No Future Posts plugin to publish posts with dates in the future but the most relevant ones are today.  I have been doing a ton of cutting and pasting code from around the net trying to find a way to get just todays posts to show but nothing is sticking.  I'm sure I need to check for todays date then put it into the loop but I have no idea how to do that, I know very little php, I usually just copy and paste other peoples code.  If any of the experts on here could maybe point me in the right direction it would be appreciated.!

Is it a way to get posts published between a date and today with query_posts() ?  Example : All posts published since 2012-04-01  Thanks  EDIT :   How to add the filter date on this Query Posts ?  query_posts( array(       array('post'),     'tax_query' => array(         array(             'taxonomy' => 'post_format',             'field' => 'slug',             'terms' => array('post-format-image')         )     ),     'cat' => '-173',     'post_status' => 'publish' ) );


I need to mount \yesh\fodlername NAS path on my linux server i am unable to do that using mount command, please help me over this.

I'm using Ubuntu 11.10, and am trying to mount a freenas server.  I have the server set to share in cifs and nfs with no luck.   I have tried smbmount //192.168.1.### /mnt/  I am not new to Ubuntu but am nowhere near a power user, so I'd prefer a GUI option if available.  How do I mount a cifs share in 11.10?


In _____ time, criteria for enrolling into university are going to be   quite different.   a) two year's  b) two-year  c) two years'  When it comes to me I'd pick b) or c), but the source of mine tells that a) is correct.  I want to know who is wrong and who is right here!

Which is the correct answer?         I'll be there in a _____ time.       A) day or two   B) day or two's   C) day's or two's


I recently saw a piece of C code including a macro of the following style:  #define TOTO()              \ do {                        \   do_something();           \   do_another_something();   \ } while (0)   I was at first wondering of the purpose of the do while (0) here, but  explained to me: it is in case the macro is used just after an if or else without curly brackets, like this:  if (something)     TOTO(); else     do_something_else();   So here, without the do while (0) statement, the code would be expanded to:  if (something)     do_something();     do_another_something(); else     do_something_else();   Which is syntactically wrong, because the else is not directly following an if scope anymore.  But I thought it would work as well by declaring the macro in its own scope, without necessary a do while around it, so I tested the same code with just curly brackets. My entire code looks like this:  #include <stdio.h>  #define HELLO_WORLD()       \ {                           \     printf("hello ");       \     printf("world!\n");     \ }  int     main(int argc, char** argv) {     if (argc == 1)         HELLO_WORLD();     else         fprintf(stderr, "nope\n");     return 0; }   But GCC give me the following error:     error: ‘else’ without a previous ‘if’   However, the code of the main function should be expanded to:  if (argc == 1)     {         printf("hello ");         printf("world!\n");     } else     fprintf(stderr, "nope\n"); return 0;   Which is valid.  So what am I missing here?

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)


My question is the following : is this following code correct :  class A {}; // no virtual destructor  class B : public A{     std::unique_ptr<int> ptr{new int(5)}; };  // in main std::unique_ptr<A> = new B;   It will probably have some compilation errors, but it is just to understand the concept. Will the pointer be correctly deleted (I mean ptr will be deleted?) or do we need virtual destructor to ensure that

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


Actually, I am writing a code to train a robot in an unspecified grid. The Robot can move only UP/DOWN/LEFT/RIGHT. I start from point [0,0]. initially, my plan was to recursively figure out the coordinates but are there any other alternatives? I get recursion limit violation error as well. How to write the non-recursive code of the following approach: def play_episodes(current_point):     global safe_block     if(mine_safe_space(current_point) and visited_before(current_point)):         check_state.add(conversion(current_point))         safe_block += 1         play_episodes([current_point[0] + 1, current_point[1]])         play_episodes([current_point[0] - 1, current_point[1]])         play_episodes([current_point[0], current_point[1] + 1])         play_episodes([current_point[0], current_point[1] - 1])

I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/speed problems.  So, sometime in the very far past I went to try and find if there existed any "pattern" or text-book way of transforming a common recursion approach to iteration and found nothing. Or at least nothing that I can remember it would help.   Are there general rules? Is there a "pattern"?


I made some markers on a map using  L.marker([42.76, 20.52], 5, {color: "blue"}).addTo(map).bindPopup("Name:  My name
Adress: My adress
 Description:My description...").on("click", circleClick);   My circleClick function is the following:  function circleClick(e) { app.getInfo(e.latlng.lat, e.latlng.lng);;}   I use this function to send the coordinates from JavaScript to Java. But now I want to add some parameters to my circleClick function. That's not a problem, I know how to do this. But I don't know how to call the function with parameters. I tried:  L.marker([42.76, 20.52],[...]).on("click", circleClick(e, parameter1, parameter2));   but it doesn't work. Please help me, how to specify the parameters at .on("click", circleClick(...));?

Please advise how to pass parameters into a function called using setInterval.  My example setInterval(funca(10,3), 500); is incorrect.


Consider the following pdf : $$f_{X}(x;\theta) = \frac{\Gamma(3\theta)}{\Gamma(\theta)\Gamma(2\theta)}x^{\theta-1}(1-x)^{2\theta-1}$$, with $x \in (0,1)$, and $\theta > 0$, where $\Gamma(\theta)$ is the gamma function. Show that $$T(\boldsymbol{X}) = \prod_{i=1}^{n}X_{i}(1-X_{i})^2$$ is a sufficient statistic for $\theta$. I have already figured out the likelihood function : $$L(\theta, \boldsymbol{x}) = (\frac{\Gamma(3\theta)}{\Gamma(\theta)\Gamma(2\theta)})^{n}\prod_{i=1}^{n}x{_{i}}^{\theta-1}(1-x{_{i}})^{2\theta-1}$$ I am now trying to use the factorisation theorem, with $h(x) = (\frac{\Gamma(3\theta)}{\Gamma(\theta)\Gamma(2\theta)})^{n}$ I am trying to find $g(T(\boldsymbol{X}), \theta)$ s.t. $$g(\prod_{i=1}^{n}X_{i}(1-X_{i})^2, \theta) = \prod_{i=1}^{n}x{_{i}}^{\theta-1}(1-x{_{i}})^{2\theta-1} $$ But I cannot find a way to fit $T(\boldsymbol{X})$ in the second part of my Likelihood function.

A random sample $X_1,\ldots,X_n$ is taken from a distribution with probability density function which is $B(\theta,2\theta)$. Show that $\prod X_i(1-X_i)^2$ is a sufficient statistic for $\theta$.  Below is the beta distribution with the parameters referred to:  $$f_X(x;\theta)=\frac{\Gamma(3\theta)}{\Gamma(\theta)(\Gamma(2\theta)}x^{\theta-1}(1-x)^{2\theta-1}$$  To be honest, this question is beyond me. I don't know how to start.   I have been reading up about sufficient statistics, and using factorisation theorem, but I don't know if this is the right approach and I don't really know where to begin with this.  Do I need to work out a joint pdf? Do I need to know the likelihood function? Is factorisation theorem even the right thing to use?  Any help (even if it is just directing me to a source for "sufficient statistics for dummies") is much appreciated!


How can I evaluate $\int_0^{2\pi} \! \frac{1}{(a+b\cos^{2}\theta)^2}\,\mathrm{d}\theta$  My attempt is, substituting $z=\exp(i\theta)$ and $\cos\theta=\frac{z+\frac{1}{z}}{2}$ Then how can I do further process... Thank you in advance.

I'm having a trouble with this integral expression:  $$\int_0^{2 \pi } \frac{1}{(a+b \cos^2 (x))^2} \, \mathrm{d}x$$ I want to solve to using residue but it seems hard.


Let $R$ be a ring with identity such that $r^2=r$ for all $r\in R$. Show that the characteristic of $R$ is $2$ and that $R$ is commutative.   My argument was the following. But, the thing I am not sure about is, whether we can say that $f$ has at most two roots in any ring.  So, let $f(x)=x^2-x\in R[x]$. Then $f$ has at most $2$ roots. $0,1\in R$ and they are roots of $f$. So, $R=\{0,1\}$. Hence Char $R=2$ and it is commutative.  Appreciate if point out any errors.

A ring $R$ is a Boolean ring provided that $a^2=a$ for every $a \in R$. How can we show that every Boolean ring is commutative?


I've seen the full proof of the Triangle Inequality  \begin{equation*} |x+y|\le|x|+|y|.  \end{equation*} However, I haven't seen the proof of the reverse triangle inequality:  \begin{equation*} ||x|-|y||\le|x-y|. \end{equation*} Would you please prove this using only the Triangle Inequality above?  Thank you very much.


I am trying to find a single word antonym for "exceed". I am using the word as a verb (so "beneath" doesn't work) and it should have a positive connotation (as in a golf score which falls below par).  I thought of "subceed", which I like, and found a few Google hits but it doesn't show up in any reputable dictionaries.  I've reviewed answers to similar questions and found no suitable alternatives.  For example, the selected answer to  suggested:   "eluded" — has a mostly negative connotation and implies intention "beneath" — is not a verb "are below"/"did not meet" — phrases   I'm looking to replace "exceeded" in the following quotes with a single word (meaning something like "went below", "were under", etc.):     "He never gets tickets because he always exceeds the speed limit."   "To win the match, Tiger Woods must exceeded 4 strokes on the twelth hole."   "To prevent freezing, do not exceed -20 degrees centigrade."

Exceed is commonly used, but when I found myself wanting to use the opposite I couldn't really find a single word that would do it.   fall short of and inadequate are a little off. How about deceed?


I cannot use the split_string function and I cannot alter the database to set the compatibility level to what I need.  I have a column with the following example values:  JohnDoe-123-fakestreet-02-2018-01-01-2018-12-03 SamSmith-ab1-concordia-16-2018-02-02-2018-11-03 JaneDoe-zxy-austin-11-2018-03-01-2018-03-16 HomerSimpson-999-Chicago-22-2018-04-01-2018-10-20 EricCartman-222-Madison-05-2018-05-01-2018-09-01   I need the 4th value in each row. I.e.:  02 16 11 22 05   How can I do this? Any suggestions?

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 want to create letters with a border. For example, consider this:    The letter on the left is an ordinary "A". The letter on the right is a purple "A" with a black border.  How can I get an "A" with a border? I am labeling an image, so just like subtitles in a movie, the letters will need a border. I will probably need a white border.

In order to improve readability of some texts, I'd like to put a kind of "eyeliner" around my letters (actually, that's how memes manage to get readable texts on any picture).  Here is an exemple of what I have:    And what I want:    You can use if needed some lua code, as I'll use it with lualatex (and custom fonts).  Thank you!  MWE:  \documentclass{article} \usepackage{tikz} \begin{document} \tikz\node[fill=red,circle]{\color{white}\textbf{Hello} world}; \end{document}   --EDIT--  As stated in the comments, the contour package works great, except with custom fonts. Any idea for  (compile with lualatex and put the font .ttf file in the font/ folder):  \documentclass{article} % Special font \usepackage{fontspec} \setmainfont[Path=fonts/]{Heartbeat_in_Christmas.ttf}  \usepackage{tikz} \usepackage[outline]{contour} \begin{document} \tikz\node[fill=red,circle]{\contour{black}{\protect\color{white}\textbf{Hello} world}}; \end{document}   -- EDIT 2 --  I found the solution when I use lualatex: I just need to use \usepackage{contour} instead of \usepackage[outline]{contour}!  -- EDIT 3 -- The solution of using with pdfrender + tikz to superpose texts works also great, except for a few chars with sharp angles:    Here is the text:      \begin{tikzpicture} \node at (0,0) {%         \textpdfrender{           TextRenderingMode=FillStrokeClip,           LineWidth=.8mm,           FillColor=white,           StrokeColor=black,         }{mmmnnn}%       };       \node at (0,0) {mmmnnn};     \end{tikzpicture}   -- EDIT 5 -- Adding MiterLimit=1 avoid these strange shark edges, now it's better, there is just a minor hole in the letters m and n, in my font, but it's not important:    Thank you!


Are relativistic effects physically real or just apparent due to limited speed of information? Does metal rod really contract in length or do we just "see" it that way due to limited speed of light?  Explain how do you reconcile the concept of physical reality with symmetry principle in special relativity?

I was in argument with someone who claims that length contraction is not "real" but only "apparent", that the measurement of a solid rod in its rest reference frame is the "real length" of the rod and all other measurements are somehow just "artificial" and "apparent". Seemed to me like a bad conversation about poorly defined words and not really relevant to physics, but then some quotes were offered:  ...so that the back appears closer to the front. But of course nothing has happened to the rod itself.  (Rindler)  The effects are apparent (that is, caused by the motion) in the same sense that proper quantities have not changed.  (Resnick & Halliday) At the same time, the  insists that length contraction and time dilation are "real", with observable consequences:  Time and space dilation are often referred to as ‘perspective effects’ in discussions of STR. Objects and processes are said to ‘look’ shorter or longer when viewed in one inertial frame rather than in another. It is common to regard this effect as a purely ‘conventional’ feature, which merely reflects a conventional choice of reference frame. But this is rather misleading, because time and space dilation are very real physical effects, and they lead to completely different types of physical predictions than classical physics. [...] However, this does not mean that time and space dilation are not real effects. They are displayed in other situations where there is no ambiguity. One example is the twins' paradox, where proper time slows down in an absolute way for a moving twin. And there are equally real physical effects resulting from space dilation. It is just that these effects cannot be used to determine an absolute frame of rest.  I went through a lot of Einstein, Minkowski and Lorentz original material, and didn't find anything about what is "real" and what is not. Finally, I know about muons, where the effects of SR seem to be very real (from , but I had seen it in a physics class before):  When a cosmic ray proton impacts atomic nuclei in the upper atmosphere, pions are created. These decay within a relatively short distance (meters) into muons (their preferred decay product), and muon neutrinos. The muons from these high energy cosmic rays generally continue in about the same direction as the original proton, at a velocity near the speed of light. Although their lifetime without relativistic effects would allow a half-survival distance of only about 456 m (2,197 µs×ln(2) × 0,9997×c) at most (as seen from Earth) the time dilation effect of special relativity (from the viewpoint of the Earth) allows cosmic ray secondary muons to survive the flight to the Earth's surface, since in the Earth frame, the muons have a longer half life due to their velocity. From the viewpoint (inertial frame) of the muon, on the other hand, it is the length contraction effect of special relativity which allows this penetration, since in the muon frame, its lifetime is unaffected, but the length contraction causes distances through the atmosphere and Earth to be far shorter than these distances in the Earth rest-frame. Both effects are equally valid ways of explaining the fast muon's unusual survival over distances.  So which is which? Why do Rindler, Resnick & Halliday use the word "apparent"?


I have a new 16.04 install and ubuntu software is not working. how to install software without using ubuntu software? is there a way to see a list of software available?

Are there any GUI alternatives to the Ubuntu Software Center with   Fast application loading/Low startup time Fast search Low weight/size Application purchase facility


I recently had cause to look up what school of magic the enhancement of an weapon/shield/armor falls under for Arcane Sight and Mythic Anti-Magic Field, but I can't find anything.  The closest I can find is similar spells:   The spell Magic Weapon is Transmutation. The spell Magic Vestment is Transmutation. The spell Mage Armor is Conjuration. The spell Shield is Abjuration.   So by looking at these spells it seems like the basic +X stuff you craft with the Craft Magical Arms and Armor feat should all be pure Transmutation. (I am not counting weapon properties which are based on spells and stuff, just the enhancement bonus).  Is this correct, or is there an authoritative statement or list that I've missed?    “” is the same but for D&D 3.5e.

Detect Magic and similar spells can show the school of magic with a proper spellcraft check.  Which school of magic is detected for weapons and armor with only enhancement bonuses (e.g. a longsword +1)?


Can you tell me what's wrong with my MySql syntax?  $sql  = "INSERT INTO :submissionTable (project_id) VALUES (:projectId)"; $sql2 = "INSERT INTO ".static::$_mSubmissionTableName." (project_id)           VALUES ('".$values[0]."')";  $database = DatabaseFactory::getFactory()->getConnection(); $query = $database->prepare($sql);         $result = $query->execute(array(   ':submissionTable' => static::$_mSubmissionTableName,    ':projectId' => $values[0] ));   Once I run this with $sql I get this error:  Warning: PDOStatement::execute():  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;  check the manual that corresponds to your MySQL server version for the right syntax to use near  ''submission' (project_id) VALUES ('1')' at line 1 in /app/model/ProjectModel.php on line 54   If I run the query with $sql2 and without parameters it executes and inserts desired values. What's wrong with the $sql query?

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


I've never heard a good answer. I'd like to hear details about:   What are the criteria that make an RNG cryptographically secure? Why must your RNG be cryptographically secure? I.e., what are the consequences if it is not? Examples of secure and insecure RNG's Would a non-pseudorandom generator be cryptographically secure? E.g. one based on radioactive decay of a particle.

Are there universal, consensus definitions for the following terms?   Cryptographically secure pseudo-random number generator ("CSPRNG") Deterministic random bit generator ("DRBG") Stream cipher   This is primarily a question about the terminology rather than the concepts (although I do not master the concepts by any means either).  My confusion arises because:   I recall seeing some reference (that I can't find again now) which equated CSPRNGs and stream ciphers, due to the fact that expanding a finite key to a long, secure keystream is basically the same problem as generating a long cryptographically-secure pseudo-random sequence from a short seed.  So correspondingly, stream ciphers are sometimes used as PRNGs, as in for example . The term "DRBG" appears to be mostly used by NIST in connection with their SP 800-90A algorithms, and which stresses safety against adversaries who can observe the state at one point in time.  The key concepts here, as I understand them, are forward secrecy and periodic reseeding from external entropy sources. The term "CSPRNG" apparently gets used in both senses (see for example ).


I want to create a simple struct that stores the RGB-values of a color. r, g and b are supposed to be double numbers in [0,1].   struct Color  {   Color(double x): r{x}, g{x}, b{x} {     if (r < 0.0) r = 0.0;     if (r > 1.0) r = 1.0;     if (g < 0.0) g = 0.0;     if (g > 1.0) g = 1.0;     if (b < 0.0) b = 0.0;     if (b > 1.0) b = 1.0;   } }   Is there a better way than using those if statements?

Is there a more efficient way to clamp real numbers than using if statements or ternary operators? I want to do this both for doubles and for a 32-bit fixpoint implementation (16.16). I'm not asking for code that can handle both cases; they will be handled in separate functions.  Obviously, I can do something like:  double clampedA; double a = calculate(); clampedA = a > MY_MAX ? MY_MAX : a; clampedA = a < MY_MIN ? MY_MIN : a;   or  double a = calculate(); double clampedA = a; if(clampedA > MY_MAX)     clampedA = MY_MAX; else if(clampedA < MY_MIN)     clampedA = MY_MIN;   The fixpoint version would use functions/macros for comparisons.  This is done in a performance-critical part of the code, so I'm looking for an as efficient way to do it as possible (which I suspect would involve bit-manipulation)   EDIT: It has to be standard/portable C, platform-specific functionality is not of any interest here. Also, MY_MIN and MY_MAX are the same type as the value I want clamped (doubles in the examples above).


I'm fairly sure the answer is no... but had a few random issues recently when plugging in around 5 complex devices (i.e. hard drives, printers) into a laptop via a USB Hub when it already had about 5 dumb devices connected (chargers, keyboard, mouse etc.).  Some of the random issues I've noticed is that not all devices are picked up when plugged in via the USB Hub. The USB Hub seems to be limited to one or two complex devices and the other complex devices need to be plugged into their own USB directly on the laptop.  I'm trying to figure out if this is standard hardware behaviour or just a dodgy Chinese product from eBay :-D

Alright so I have computer currently with an Inateck "SuperSpeed" PCI-E expansion card with 4 USB 3.0 Slots.   Now we need about 16 pieces of hardware plugged into this machine from a far distance. Our current setup is USB 3.0 Extender that gets its own power that connects to a USB 3.0 hub where each has 3 to 4 additional USB 3.0 slots. Now imagine that for each of those 4 slots. The problem is, it that it is extremely unreliable. If you turn on the machine with everything plugged in we get the blue screen of death. Instead we have to plug everything in, in a very specific order. So that all 16 pieces of hardware are read.   Is there limits to what I am trying to do here? The computer is a simple Dell Inspiron 3650. Is the problem with the motherboard that comes on this machine?  If so what might be some hardware components that I need? Or maybe just point me into the direction of a motherboard that might be able to handle this kind of pressure.


I found that it happens because it splits entered arguments. But I am creating a program that encrypts string and it encrypted "test" as |m{|. But when I switch to decryption mode that thing happens. Any solution ?

When I enter single quote ' in terminal it goes to some other mode, and commands don't execute. What is this mode and when do we use it?  root@sai:~# ' > ls > ' ls : command not found root@sai:~#


The organ in Las Pinas Church is made entirely of bamboo. The organ in Las Pinas Church was made entirely of bamboo. Whic is more suitable,is made or was made?

Suppose a book consists of three sections:     The book is/was divided into three sections.   I am thinking the past tense option "was" should be used, because the act of dividing the book into three sections happened at the time of writing. Is my analysis good?


I have this hardware configuration of laptop, Please let me know for which version I have to proceed for UBUNTU installation:  Acer One S1002-15XR 10.1-inch Laptop Information: Technical Details Brand   : Acer Series  : One Colour  : IRON Item Height : 26 Millimeters Item Width  : 25.8 Centimeters Screen Size : 10.1 Inches Item Weight : 1.2 Kg Product Dimensions  : 19.4 x 25.8 x 2.6 cm Item model number   : S1002-15XR Processor Brand : Intel Processor Type  : Atom Processor Speed : 1.33 GHz RAM Size    : 2 GB Memory Technology   : DDR3L Hard Drive Size : 32 GB Hard Disk Technology    : Mechanical Hard Drive Graphics Coprocessor    : Intel Integrated Graphics Connectivity Type   : Wi-Fi, Bluetooth-V4 Wireless Type   : 802.11bgn Number of Microphone Ports  : 1 Wattage : 10 Watts Hardware Platform   : LAPTOP Operating System    : Windows 10 Average Battery Life : (in hours)   4 Number of Lithium Ion Cells : 2 Included Components Net-tablet PC, Battery, AC Adapter and Keyboard Dock

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