Here is the simple using of php mail() function codes :    <?php $from    = "From email goes here"; $to      = "To email goes here";  ini_set("display_errors", "On"); ini_set("sendmail_from", $from); ini_set("SMTP", "localhost"); ini_set("smtp_port", "25");  $subject = "Hello, This is subject";  $message = "
Hello World, This is Body
";  $headers  = 'MIME-Version: 1.0' . "\r\n"; //$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'Content-Type: text/html; Charset=UTF-8' . "\r\n";  $headers .= 'From: Birthday Reminder <' . $from . '>' . "\r\n"; $headers .= 'To: Mary <' . $to . '>' . "\r\n"; $headers .= 'Reply-To: Birthday Reminder <' . $from . '>' . "\r\n"; $headers .= 'X-Mailer: PHP/' . phpversion();  if(mail($to, $subject, $message,$headers)) {   echo("
Email Sent :D
"); }  else  {   echo("
Email Message delivery failed...
"); } ?>   Why emails were sent using these codes always go to the spam folder? Is the order of headers ok? Which extra headers should i use for prevent spam?     Edit : I know there are some threads in stack about that. But i am looking for an updated answers. So it's not duplicate.

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I tried to close a question as a duplicate on  meta. It already has three close votes, but the app still asked me for a question id/link without offering the current duplicate target.     App Version: 1.6.1.2 Device: iPhone 6 OS Version: Version 10.0.2 (Build 14A456)

When closing a question in the iOS app as duplicate, the UI is very challenging.  I understand this is not exactly an easy UI to do given the limitations, but still, it's very complex.  One of the worst experiences, though, is when you're voting to close  a question that's already been voted for as duplicate by someone else's vote.  You have to get the duplicate's URL and copy it, and then paste it - there's no automatic link.  When I'm in the app, I usually find cases where I see an obvious duplicate from comments - I'm not doing tons of research, I only vote where it is obvious.  When there's a close vote as duplicate already pending, please give either a list of already chosen URLs, or something similar.  Even if it's only possible when there's only one selection - this would be far better than zero, where you then have to go back to the post, copy the link from comments, and vote again.


I'm making a list in Excel where many rows have the same data in a number of columns, enough so that I'd like to hit Ctrl-C once on this set of common data, and then just hit Ctrl-V every time I make a new row that has those attributes.    The problem is, after I paste one time using Ctrl-V, and then go to type in the header for the next row, Excel, removes that information from the clipboard, so if I want to copy it again, I have to select it and hit Ctrl-C again.    I can work around this by pasting the data into Notepad as a tabbed list, then copy from Notepad using Ctrl-C.  This way, the clipboard is managed by Windows, not hijacked by Excel.    Is there an option or some other way to copy/paste so that Excel won't empty the clipboard contents even if I type between pastes?

Whenever you copy a cell or a range of cells in Excel (my version is 2010 on Windows 7), and then do something else like insert new sheet row or simply edit another cell, Excel removes the clipboard data. For me this seems to me so utterly stupid and it's very frustrating (probably it has some logic behind it like preserving references or something like that, but I don't think it would be rocket science to make it work like any other program that has Copy-Paste available).   The only workaround is to use the Office clipboard, but I don't want to (uses space on the screen and it's a lot less comfortable than CTRL+V) and I don't think I should be forced to use it.  Here's a reference to some posts also complaining about this problem:      Is there any way I can force Excel to keep my data into the clipboard until I decide I don't need it no more instead of it, without using the annoying (to me) Office clipboard? Maybe using the Windows clipboard.  Or at least you could explain to me why this is happening (I know this is normal behavior, but why?)


I want to have the family of classes which all have the same method. As this method is quite simple I want to make it final static, something like  class A {    public static final String createSth () { } }   (in fact this method returns only String).  Sometimes it would be useful to upper-cast all those A, B, C classes with the same method. Thus I would like to create mother class.  class abstract Mother {        public static abstract String createSth () { } }   and then to add the appropriate extends for all my classes A, B, C ex. class A extends Mother.  Unfortunately it's not allowed by Java. I'm wondering why?  Sure I can remove static final modifier and then everything is ok. But on another hand if each subclass returns the constant String which is not modifiable in any way, why not?  You can ask what is the purpose of such a construction?  Simply I want to create database sql strings. For each table I created a separate class, and as a result of createSth method I want to return sql creating a table for this class.  Interfaces does help neither.  The only solutions seems to be to remove abstract modifier from createSth method in Mother class. But then I'm not allowed to uppercast to Mother class and to call createSth method for children. So I have to remove static modifier for children classes.  Concluding why abstract method is not allowed to be static? Ok here I can even understand that, but either why non static abstract method is not allowed to be replaced by static method in child class?

The question is in Java why can't I define an abstract static method? for example  abstract class foo {     abstract void bar( ); // <-- this is ok     abstract static void bar2(); //<-- this isn't why? }


I found that  seems to deliberately create space between a symbol and the plus sign. But sometimes I do not need the space, say   \documentclass[12pt]{amsart} \begin{document} \[ f(x) \to l \text{ as } x \to a+. \]  \end{document}   How do I resolve this problem?

I am using lualatex, are there symbols for left and right limits, like small "-" and "+" to put above the numbers? For now I use   \documentclass[a4paper,12pt]{book} \usepackage{fontspec} \usepackage{polyglossia} \usepackage{amsmath,empheq} \usepackage{mathtools} \usepackage{amscd} \usepackage{amsxtra} \usepackage{unicode-math}                   \begin{document} \[ \lim_{x \rightarrow 1^{+}} f(x) \]  \[ \lim_{x \rightarrow 1^{-}} f(x) \] \end{document}   which I feel is not right because the default "+" and "-" are operators and their size and spacing might not be the best for this use.


Sometimes my PC will not boot it just hangs on the Windows 10 logo and no dots show below the logo. Also my HDD light is always solid when this is happening(I have a SSD by the way). To fix this I have to reboot my computer several times via the reset switch then eventually it will boot. It doesn't always hang on the logo just randomly as I can tell. Anyone know why this would happen?

I have a problem where sometimes, when I start my computer it won't boot past the windows logo - the spinning dots don't even show up. Usually, a power down and power up again solves it - but sometimes it happens more than once in a row. And sometimes it doesn't happen at all.   I seem to remember something like this being a problem with Windows 8/8.1 too, and back then it was because of issues with USB 3 devices. But I have tried all combinations of disabled/enabled USB xHCI and eHCI devices that I can think of, and updates all of the USB drivers.   I can't find ANY log info or any errors in event log of what is going wrong when it doesn't boot. Is there any way to log boot info that early in the boot process?


I'm starting out with coding and trying to make a very basic calculator. I want to run it in a cmd by calling it up with two numbers. So, in the correct directory, I would type "BasicCal 2 + 5" to run it.   This is the code in C#   using System;  public class BasicCal {     public static void Main(string [] args)     {            Console.Write(args[0] + args[1] + args[2]);         Console.ReadKey();     } }   Cmd then just prints "2+5" so I guess C# doesn't see an operator as an argument.   So I just need to know how to make C# recognize an operator when it's given as a parameter. Thanks in advance.

Is there a function the .NET framework that can evaluate a numeric expression contained in a string and return the result? F.e.:  string mystring = "3*(2+4)"; int result = EvaluateExpression(mystring); Console.Writeln(result); // Outputs 18   Is there a standard framework function that you can replace my EvaluateExpression method with?


Can I somehow make a pmatrix play nicely with a tabular environment? I tried using \def\arraystretch{1.5} but it made everything bigger. Here's a minimal example that shows my problem. I'm using XeLaTeX.  \documentclass[12pt,a4paper]{report} \usepackage[english, polish]{babel} \usepackage{graphicx} \usepackage{float} \usepackage{amsmath} \usepackage{amsfonts} \begin{document} \begin{table}[H] \centering \resizebox{\textwidth}{!}{% \begin{tabular}{|c|c|c|} \hline Ciąg do zakodowania & Wykorzystana bramka                                          & Powstały stan kwantowy \\ \hline 00                  & $ \mathbb{I} = \begin{bmatrix} 1 & 0 \\ 0 & 1\end{bmatrix} $ &                        \\ \hline 10                  & $ Z = \begin{bmatrix} 1 & 0 \\ 0 & -1 \end{bmatrix} $        &                        \\ \hline 01                  & $ X = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix}$          &                        \\ \hline 11                  & $ Z*X $                                                      &                        \\ \hline \end{tabular}% } \caption{A little bit too cramped :(} \label{my-label} \end{table} \end{document}

How do you guys go about controlling column padding in tables?   Update  To clarify, I'm looking for a way to control both vertical and horizontal padding. So, if I had a simple table like in the following code snippet, I could pad the columns and make them look a bit less... ugly. :P   \begin{tabular}{|l|l|}     \hline     column 1 & column 2 \\      \hline     I really would like this less & crammed\\     \hline \end{tabular}   I tried this by using the command \vspace but it leaves gaps in the vertical lines.


As stated in the title, I wish to find all the units and zero divisors of the ring $\mathbb Z_6 \times \mathbb Z_8$.   What I have so far:  The units of $\mathbb Z_6$ are $\{1,5\}$, and the units of $\mathbb Z_8$ are $\{1,7\}$, so the units of $\mathbb Z_6 \times \mathbb Z_8$ are $\{(1,1), (1,7), (5,1), (5,7)\}$. Is that correct?  The zero-divisors of $\mathbb Z_6$ are $\{2, 3, 4\}$, and the zero-divisors of $\mathbb Z_8$ are $\{0, 2, 4, 6\}$. I am not sure how to proceed, however. Thoughts?  I am new to math.stackexchange so please let me know if any part of my question is unclear. Thanks!

How do I exactly find the zero divisors and units of a ring in the form of $\mathbb{Z}_n \times \mathbb{Z}_m$? For instance, how does one calculate zero divisors and units of $\mathbb{Z}_6 \times \mathbb{Z}_2$? I understand that a zero divisor is a non-zero element of $R$ such that $rs = 0$ for some other non-zero element $s$ in $R$. But I don't really quite understand how to apply that to a ring of the form $\mathbb{Z}_n \times \mathbb{Z}_m$. Also, the units of $\mathbb{Z}_6 \times \mathbb{Z}_2$ would be elements that send some element $s$ in $\mathbb{Z}_n \times \mathbb{Z}_m$ to the multiplicative identity, right? (which would be 1)? How do I apply these concepts to "product" rings? Thank you.


I know java is pass by value But here How the array[i] is changing the value of arr[i].The below program is arranging zeros and ones in order Is there any special case for Array-Pass by value class GFG {             // function to segregate 0s and 1s      static void segregate0and1(int arry[], int n)      {          int count = 0; // counts the no of zeros in arr                 for (int i = 0; i < n; i++) {              if (array[i] == 0)                  count++;          }             // loop fills the arr with 0 until count          for (int i = 0; i < count; i++)              array[i] = 0;             // loop fills remaining arr space with 1          for (int i = count; i < n; i++)              array[i] = 1;      }             // function to print segregated array      static void print(int arr[], int n)      {          System.out.print("Array after segregation is ");          for (int i = 0; i < n; i++)              System.out.print(arr[i] + " ");          }             // driver function      public static void main(String[] args)      {          int arr[] = new int[]{ 0, 1, 0, 1, 1, 1 };          int n = arr.length;             segregate0and1(array, n);          print(array, n);                 }  }

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?


In the beginning of the story the Main character wakes up from what I believe is a tomb. In this world people have different colored eyes depending on the believe their attributes. Before the Main character went to sleep Golden eyes which the main character has are considered demon eyes because the demons had those color eyes and could control magic better. However, after he comes out of his slumber the golden eyes are seen as the weakest of all the colored eyes. Also a Demon girl that he rescued before going to sleep has been waiting for him all this time to wake up.

The MC reincarnated himself through his own magic after his party defeated the demon king. Before he used his magic to do so, he took the daughter from the demon king and traveled with her over the world. After he used his reincarnation magic he was born in a noble family where the daughter of the demon king is now working as a maid in this family. He also has an older/younger (not sure) brother. Through his knowledge he starts his training of body, swordsmanship and magic as a baby. Years later his brother wants to play with him but he denies him every time. But one day he accepts it to play tag. His brother can't catch him. After that, he requests from the mc to teach him his magic. He denied again, but made an offer. Only when he can catch him, would he teach him his magic. I hope I'm not mixing up different mangas.


I have the following problem: I have a list of file paths. The files in these paths need to be added to ArcMap. I would like to add these via Python. I know that ArcGIS Pro has a command addDataFromPath() so I loop over the file paths and add them in the command, like so: for path in pathlist:     m.addDataFromPath(path)  I've searched around, but I cant seem the find the same command for ArcMap. Is there some other way to load in the files automatically other than simply doing it by hand?

I am trying to automate various tasks in ArcGIS Desktop (using ArcMap generally) with Python, and I keep needing a way to add a shapefile to the current map. (And then do stuff to it, but that's another story).  The best I can do so far is to add a layer file to the current map, using the following ("addLayer" is a layer file object):  def AddLayerFromLayerFile(addLayer):  import arcpy  mxd = arcpy.mapping.MapDocument("CURRENT")  df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]  arcpy.mapping.AddLayer(df, addLayer, "AUTO_ARRANGE")  arcpy.RefreshActiveView()  arcpy.RefreshTOC()  del mxd, df, addLayer   However, my raw data is always going be shapefiles, so I need to be able to open them. (Equivalently: convert a shapefile to a layer file without opening it, but I'd prefer not to do that).


I received an associates degree in computer science from a junior college and then transfered to an university to pursue my bachelors degree. I am almost finished with that and I plan on continuing towards a masters degree. A lot of classmates tell me that you should get your masters degree from a different school then the one your received your bachelors from. Is this true? Why? Should you get your PhD from the same school your got your masters?    EDIT: Thank you all! This helps me a lot!

I've heard from people that generally, it's a bad idea to go to the same school as your undergrad to get your graduate education.   However, in the situation that you get into only your undergrad school and a few much-lower ranked grad schools, what would be the better school to pursue?


Having taught calculus for several semesters, I've noticed that the number of students attending lectures are gradually declining (especially for the 9am session). I would not be worried if they have learned the material by themselves so don't see the need of coming; However looking at their exam scores I concluded that a lot of them are not doing so well in the class when they miss lectures.  So what are some good ways to keep students coming to lectures?


I'm doing a project, where i hava a todo list, and i start with 6 existing tasks. My jquery can access them, give them the class "completed", or remove it, and can delete the task itself. The problem is when i add a new task with a function, and this new task has the same classes as the originals, but jquery cannot access the new ones. Any help would be appreciated. Thank you.  Html (Input for user to add a new task & Original task)
    <input onclick="addTask()" id="ready" type="radio" name="ready">     <input type="text" name="todoTask" id="todoTask" placeholder="Create a new todo...">

      <input type="radio" class="bttComplete" name="bttComplete">      Complete Online Javascript Course

   JavaScript (addTask)  function addTask(){     var divNova = document.createElement("div");     var userTask = document.createTextNode(document.getElementById("todoTask").value);     var radioInput = document.createElement('input');     var lineThrough = document.createElement('span');      lineThrough.setAttribute('span', '');     radioInput.setAttribute('type', 'radio');     radioInput.setAttribute('name', 'bttComplete');     radioInput.setAttribute('class', 'bttComplete');      var del = document.createElement("div");      $(divNova).addClass('newTasks');     $(del).addClass('delete');      lineThrough.appendChild(userTask);     divNova.appendChild(radioInput);     divNova.appendChild(lineThrough);      divNova.appendChild(del);      var divAtual = document.getElementById("tasksBox");      divAtual.appendChild(divNova);      var remaining = document.getElementById('remainingTasks');     divAtual.insertBefore(divNova, remaining);        incrementCounter(); }   Jquerie (Add/Remove completed & Delete task)  $(".bttComplete").click(function() {         if ($(this).hasClass('completed')){           $(this).removeClass('completed');         } else {           $(this).addClass('completed');           //decrementCounter();         };     });      $(".delete").click(function(){         $(this).closest(".newTasks").remove();       decrementCounter();     });

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.


There is a short story I read in a collection at be beginning of the 90's, I'm trying to find its title and who wrote it.  A scientist team was working on a time travel device. It don't really work until they open a window into the past and retrieve what turn out to be some dinosaur eggs. Unfortunately, they are unable to repeat their success and they lose their funding.        Meanwhile, the eggs eventually hatch and the poor and starving scientist have no other choice than to eat the dinosaur to survive. The dinosaur meat is so delicious that the Dino-Berger become the must praised food on earth.

I ran across this  and it reminded me of an old short story I read a long time ago.  I read it in a collection of short stories.  It would have been a book because I borrowed it from a school library.   Probably in the 1970s or 1980s.  The book and the story would have been older, though.  Probably from the 1960s or earlier.  In the story, a scientist has a machine that he can use to view the past.  It isn't like a TV or something, though.  It opens a portal into the past that he can look through.  It is very difficult to control, though.  Pointing it at a place and time is likened to working in a hurricane.  The portal jumps and moves about randomly.  The steadier he can hold it, the clearer the past appears.  When it is really steady, he can hear sounds from the past.  It never gets really steady enough to reach through.  They try pushing tools through the portal to pick up things in the past.  The steadier the portal, the easier it is to push tools through.  It never gets steady enough for them to push a tool all the way through, though.  It just gets easier to make progress.  One day, they have the portal open and it is acting really wild.  At some point the workers take a break.  The portal is still open, and while they are loafing the portal settles down by itself and becomes steadier than it has ever been.  So steady that a piece of the past falls through.  The portal scooped a chunk of the ground out of the past.  The chunk of ground contains a nest with dinosaur eggs.  The scientist  rescues the eggs, and they manage to keep them warm enough until they hatch.  The dinosaurs are some kind of harmless things, and become the lab mascots.  Always wandering the grounds, and in and out of the lab.  One day, the have the portal open again and one of the dinosaurs wanders into the lab and walks into some high voltage terminal.  Crash, bang.  Short circuit.  All the equipment to open the portal is destroyed, and the dinosaur is roasted from the flash.  The roasted dinosaur smells good, like chicken, and the scientist's son (who has been telling the story) takes a bite to see what it tastes like.  He says "It resembled chicken the way an asteroid resembles Jupiter."   It tastes fantastic. With all of their work ruined, and the ruins of a fortune in expensive equipment scattered around them, the scientists and the labworkers all chow down on dinosaur.  Half raw, half burned to a crisp from the explosion.  They eat the dinosaur down to the bones.  They start breeding the dinosaurs, and sell them as food.  The guy's father makes a fortune selling dinosaur meat, but remains unhappy.  With money from selling dinosaur meat, he rebuilt his lab but never ever got the portal steady enough to actually visit the past or take samples.  Does anyone know the name of the story and the author, and maybe what collection it might have been in?


In the context of Renormalized Pertubation Theory Peskin Schröder says: The Lagrangian $$ \mathcal{L}=\frac{1}{2} (\partial_\mu\phi_r)^2-\frac{1}{2}m^2\phi_r^2-\frac{\lambda}{4!}\phi_r^4 + \frac{1}{2} \delta_Z(\partial_\mu\phi_r)^2 -\frac{1}{2}\delta_m^2\phi_r^2-\frac{\delta_\lambda}{4!}\phi_r^4 $$ gives the following set of Feynman rules: ------------>------------ = $\frac{i}{p^2-m^2+i\epsilon}$ ------------X------------ = $i(p^2\delta_Z-\delta_m)$ and the two 4-vertices. The question is: Why look the Feynman rules for the first and the fourth term of the Lagrangian look so different? I believe the answer is connected to the fact that one has to bring the kinetic term of the Lagrangian to its canonical form $\frac{1}{2} (\partial_\mu\phi_r)^2$ and has to interpret everything else as (possibly momentum dependent) vertices. How does this look in formulae?

I know that derivative couplings in a Lagrangian interaction, such as   $$\mathcal{L}_{int} = \lambda \phi (\partial_{\mu}\phi)(\partial^{\mu}\phi)$$  bring down two momentum factors into the matrix element $\mathcal{M}$.   Why doesn't this extend to a typical kinetic term  $$\mathcal{L}_{kin} = (\partial_{\mu}\phi)(\partial^{\mu}\phi)\quad ?$$  It seems odd that derivatives in $\mathcal{L}_{int}$ contribute a factor of momentum$^2$ to $\mathcal{M}$, but the derivatives in $\mathcal{L}_{kin}$ contribute a factor of the propagator $$\frac{1}{\mbox{momentum}^2}$$  to $\mathcal{M}$.


I'm very new to ubuntu so I'm still very much stumbling around. In the file drawer I can see an icon for my network drive but I cant figure out where I enter or store the user id and password that this network drive has on it. The network drive is a windows based device  Thanks in advance.

I have a problem: My school have a network drive, called I:\, which i can connect to from Windows 8, but i cant do it from Ubuntu :( I am a complete Linux noob, so its probably just because i dont know how to, but i write the info i need to connect from windows, so i hope you will help me :)     Share (At least i think so):   \vihcafil11.global.local\elevhome$\ums\htx\*username* Username:   Global\*username* Password: *password*   If you know how to do it, please help me ^^  Jonas Strand


Is it possible to add an icon in front of a field name?   I have a field name called Tel and would like to put a phone icon in front of it?   I've searched for a while and can't seem to find an answer to this.

How do I add icons next to field names, like adding a  icon in front of the mobile phone field?  i tried the patches shown in , but they do not seem to work.  I have seen this on some websites, so I guess it should be possible.


Is it possible to draw out some SVG shapes in Illustrator or Inkscape and convert them to Shapefile using GDAL or QGIS (or something else perhaps?).   I have an image that I can easily georeference, but there are many shapes I would like to draw out and using a tool like GIMP to draw them out would be much easier than using QGIS.    Any suggestions?

I have a PDF file, with a Map as a vector graphic. I want to get this into GIS. (I use ESRI's ArcGIS, but any FOSS solution is also fine).  I know that it is not possible to directly get the PDF into ArcGIS, so I was just testing various scenarios, and found that we can convert the vector graphic in the PDF to SVG using Inkscape. I was successful in doing that.  I was hoping that there might be some way of going from SVG into a vector format that ArcGIS understands.   Is this possible?


I remember there was a book series about a boy who came from a family of wizards, living in a small room/apartment in a city that was taken over by some "evil" people after they assassinated the queen, but when they tried to shoot the princess, the master/head wizard at the time took a bullet to himself (if I remember right) and died, his apprentice becoming the head wizard. The family in question adopted the young princess.  Later, the boy is taken on as an apprentice by the new (but by this time fairly old) head wizard. The head wizard lived in a tower. I also believe the boy's brother became a dark wizard and was later exiled from the kingdom, that there were some delivery mice, one of the books in the series was called "Flight" or something and also that there was a magic shop with some kind of magic-proof room.

I am looking for the name of a series of book.  In the world described in those books, magic exists, and it is also told that the 7th child of a family will be extremely proficient with it.  In the first book, we are following the story of a family, whose father is one of those 7th sons, but is nothing extraordinary when it comes to magic. At the start of said book we learn that his wife gave birth to a child which is their 7th (7th son of a 7th son).  But sadly it seems like the child died shortly after.    We also learn of another family, which is celebrating the birth of their newborn daughter, but during the celebration, an assassination takes place, and only the newborn daughter survives.  What was particular with this assassination is the fact that the killer used bullets, with a name inscribed on them. Those bullets are known to always find their way to the person their destined to.  After surviving this, the daughter was adopted by the first family.    A few traits of this world which can help identify the book :   While magic exists, it doesn't seems that everyone can be a mage, and only a few select ones can excel in it. The most powerful mage in the country is given a position of authority, and usually takes an apprentice amongst the most promising mages, and usually that apprentice will take that position after their master.   A few key events (in the first book) that can help :   After the assassination of the second family (which was something akin to royalty) a new government takes place. This government created a militia, which enrolled many young children to indoctrinate them.   At the end of the first book, we learn that one of those young children was, in fact, the seventh child of the first family (which they thought died at birth)  After a while, the new government learns about the whereabouts of the daughter of the second family, and sends assassins against her. So the first family (who adopted the daughter) decides to take refuge with their aunt, who is somewhat of a hermit and is living in a remote location.     If anyone is able to identify the book from this mess of a question, that would be really helpful.


Is there a chance of fixing this? (the autodesk maya was working fine and I want to try this program, could someone help me with this?)

I was using blender 2.76b on a Windows 7 Ultimate, and nothing really weird showed up when I opened blender and the cmd window appeared, before the blender window appeared.  I updated it to 2.77a, and now in the cmd window, it says:     Warning! Legacy WGL is unable to select between OpenGL versions.   Is this a big issue that I would want to fix, or would it not matter?  If I should fix it, how should I fix it?  System specs:   Laptop: Samsung Sens R410  OS: Windows 7 Ultimate, was Windows Vista Home Premium OEM (according to the sticker on the underside)  CPU: Intel Pentium Merom T2390 Dual Core 1.87 Ghz  RAM: Installed 5Gb, but can only use 2.75Gb 667 MHz  GPU: ATI Radeon X1250 with 256Mb memory with a weird driver that has OpenGL  issues. The 3d cursor moves when I drag the arrow to move an object in the 3d viewport. I think this is because I am using Vista drivers, and there are no drivers for windows 7.


I am a Chinese citizen and I will be travelling from Copenhagen to Beijing. However I have a layover in Helsinki and recently I have been rejected a student visa in Sweden (I am allowed to travel from Copenhagen). I got a letter from the Swedish Migration Office that I have 4 weeks to leave the country, which expires on the 1st of June. The layover is no more than 4 hours and I do not plan to leave the airport.  Do I still need the transit visa in Finland?

I'm a Chinese student studying in Sweden. My visa extension was rejected by the Swedish migration office, and because of this I will leave for China within a month. However, I had no idea about a potential transfer problem in Finland, as my visa has been expired for half a year.    Is there any possibility that I will be arrested while in the transfer in Helsinki?


I use Linux 16.04 and Windows 10 in Dual Boot mode. I have Grub customizer installed and reordered my boot list. But I want to stop the default operating system to boot after the initial 10 seconds passed. I want it to halt as long as I do not choose any operating system to boot. I am badly in need of this. But do not know how to do this.

I have Windows 7 and Ubuntu 12.04 in my system and i saw that the default time for os selection menu is only 10 sec, as i am new to Linux can anyone tell me how to increase this time?


I want to get current page URL using javascript ,Any one have suggestions ?    Also i need to get the content from the hashtag For ex: xxxx.com/#21  i need to get that 21 in the javascript

I am using jQuery. How do I get the path of the current URL and assign it to a variable?  Example URL:  http://localhost/menuname.de?foo=bar&amp;number=0


Let $\mu$ be a (positive real) measure on a space $X$ and $f$ a measurable function. Put $F: (0,\infty) \rightarrow \overline{\mathbb R}_+, p \mapsto \int_X |f|^p ~d\mu$. Write $D = \{ p \in (0,\infty) \mid F(p) < \infty\}$. It is easy to see that $F(p) \le F(r) + F(s)$ if $r<p<s$, whence the fact that $D$ is connected alias an interval. Moreover, $\log F$ is convex by Hölder's inequality.  Is there $\mu$ and $f$ such that $D$ has exactly one element? The example of $\mu$ Lebesgue-measure on $(0,1)$ resp. $(1,\infty)$ and $f(x) = x^\alpha$ shows that $D$ can be an open interval. Can it be closed? Left-open, right-closed? Left-closed, right-open?  In my intuition, $D$ should be open, at least left-open in general. What do you think? This is an (as I guess, standard) exercise, taken from the Big Rudin. I apologize if this is a duplicate, thank you for indicating the answering article then.

Given measure space $(X, \mu)$ and measurable function $f$. If $p \in (0, +\infty]$, below are the facts I know about $\Vert f \Vert_p$:  (log convex in $\frac 1 p$) $\forall p_1, p_2\in (0, +\infty] \text{ such that } p_1 < p_2. \forall t \in(0, 1), \text{ let } \frac 1 p = \frac t {p_1} + \frac {1-t} {p_2}$, then $\Vert f \Vert_p \le \Vert f \Vert_{p_1}^t\Vert f \Vert_{p_2}^{1-t}$ ($0\cdot(+\infty)$ is defined to be $0$). (lower semi-continuity) $\forall p_0 \in (0, +\infty], \liminf_{p\to p_0}\Vert f\Vert_p \ge \Vert f \Vert_{p_0}$. If $0<\mu(X) < +\infty$, then $ \Vert f \Vert_p/\mu(X)^{\frac 1 p}$ is monotone increasing in $p$, combine it with (2) we get $\lim_{p\to p_0-}\Vert f\Vert_p = \Vert f \Vert_{p_0}$.  From (1) we know the set of $p$ such that $\Vert f \Vert_p < +\infty$ is an interval $I$ (possibly empty or a singleton).  If $I \not\in a = \inf I$ and $a \neq 0$, from (2) we know $\lim_{p\to a+} \Vert f \Vert_p = +\infty$. If $I \not\in b = \sup I$, then $\lim_{p\to b-} \Vert f \Vert_p = +\infty$.  From (1) and the dominated convergence theorem we know that if $I \ni p_0 \neq \inf I$ and $p_0 < +\infty$, then $\lim_{p\to p_0+} \Vert f \Vert_p = \Vert f \Vert_{p_0}$. If $I \ni p_0 \neq \sup I$, then $\lim_{p\to p_0-} \Vert f \Vert_p = \Vert f \Vert_{p_0}$.  If $I$ is nondegenerate and $+\infty \in I$, then $\lim_{p\to +\infty}\|f\|_p = \|f\|_{\infty}$.  If $\inf I = 0$, from (1) we know $\lim_{p\to 0+}\|f\|_p$ exists.   Question: How $\Vert f \Vert_p$ behaves when $p$ is the endpoint of $I$? To be more precise, assume $I$ is nonempty. Let $p_0 = \sup I$ (only right endpoint is considered for simplicity):  $p_0\in I$ or $p_0 \not\in I$? Can $I$ be a singleton? What if $p_0 = +\infty$? What if $0<\mu(X) < +\infty$?  Please also notify me if there is any mistake above.


I have a list of dicts for storing data. When I make change in one dict, that change is reflected in all dicts.  students = [{"marks": [], "subjects": 0}]*3 specific_student = 2 print("Before updating", students) students[specific_student]["marks"].append(50) students[specific_student]["subjects"] += 1 print("After updating", students)   I was expecting that, only last dict will get updated. but surprisingly all dicts were changed.  The obtained result of above program is  Before editing [{'subjects': 0, 'marks': []}, {'subjects': 0, 'marks': []}, {'subjects': 0, 'marks': []}] After editing [{'subjects': 1, 'marks': [50]}, {'subjects': 1, 'marks': [50]}, {'subjects': 1, 'marks': [50]}]   But the expected result(only dict at position 2 gets changed) was  Before editing [{'subjects': 0, 'marks': []}, {'subjects': 0, 'marks': []}, {'subjects': 0, 'marks': []}] After editing [{'subjects': 0, 'marks': []}, {'subjects': 0, 'marks': []}, {'subjects': 1, 'marks': [50]}]   Can some one explain this strange behavior and suggest a solution to obtain the expected result?

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


I hear people talking about vibration reduction giving you extra 'stops' on a lens, thus giving you extra shutter speed to play with.  How do people work this out into an amount of stops?  E.g. by using the VR on this lens it gives you about an extra 1/4 stop in shutter speed.

I always hear this term, e.g.,    I had to go down one stop Increasing X by Y raises Z by one stop I turned down the flash/the light two stops This lens/sensor/strobe/Photoshop tweak raises X by around one stop   That one too!: "Around one stop"... Is there a 0.85 or a 1.13 of a stop, to be exact?  Is this (always) the same thing as an ?  I am so confused!


I'm making a game using PHP with MySQL and I need an UPDATE query where the fields names could change from one user to another.  My code is:  $upd = $sql->prepare("UPDATE empire_users SET :p = :p + :p2 WHERE id = :id"); $upd->execute(array(     ':p' => "p".$type,     ':p2' => 10,     ':id' => $_SESSION["id"] ));   In my database, users have 3 columns : pwood, pstone, pwheat, and $type could only be "wheat", "stone", or "wood".  I want to update the selected field (which depends of $type) to increase by p2 (here 10).

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 have created a Neural network that gets its training data from a complicated physics simulation. I run the simulation by randomizing 7 different inputs. Each input can be 1 of 4 discrete values. I have decided to use an input vector with 28 binary nodes (7 inputs * 4 possibilities per input). The output layer is just 1 node, a continuous number. This is a controlled simulation so there must exist a true relationship between these inputs and my output, right?  No matter what architecture or method I use, the accuracy seems to hit a wall at 20%. Without going into the specifics of my cost/accuracy function, that is about the number I expect if the neural net just outputs a random number in the range of all my target data (not good). Now the neural net can perfectly fit the training data if I make it very deep. But bad results notwithstanding, I get the lowest TEST score reliably by making the network as shallow as possible, i.e. a single hidden layer with 1 or 2 nodes. Clearly things are amiss.   If I give the hidden layer ~20 nodes the test score starts moderately low (accuracy ~20%) and rises as overtraining kicks in. The output looks something like this. No matter what this network accuracy hits a wall around that 20% area.    And 2 nodes for reference    Increasing the training set seems to have diminishing returns   Please help, I am eager to see if anyone else has had behavior like this. I will readily provide any other information you need to better understand the problem.  Many thanks in advance. -Joel  Addendum: If I change the inputs to 7 (different) continuous variables then the relationship can be captured reasonably well with many hidden nodes. If I mix in the discrete variables with those continuous variables then the generalization falls apart again. This is an elusive problem, but if I had to guess it seems that the big issue is using these discrete variables, represented a stacked one-hot vectors. It would be really nice to find their relationship to the output because they are important inputs to the simulation. Perhaps it would help to see examples of Neural Networks that have worked using similar, discrete inputs represented as one-hot vectors or otherwise.

I'm training a neural network and the training loss decreases, but the validation loss doesn't, or it decreases much less than what I would expect, based on references or experiments with very similar architectures and data. How can I fix this?    As for question        to which this question is inspired, the question is intentionally left general so that other questions about how to reduce the generalization error of a neural network down to a level which has been proved to be attainable, can be closed as duplicates of this one.  See also dedicated thread on Meta:


I was checking out the packages I had installed on my system, and I noticed that I had rpm (I don't remember installing it. I think it got installed along with some other package). Can I use it to install rpm packages on my system (Ubuntu GNOME 17.04)? Or will it not work?

I have a burning desire to install RPMs onto my Ubuntu installation - is this possible? Can I use Yum - or another RPM Package Management tool?


I'm trying to use the out-of-the-box ASP.NET PasswordRecovery control, but I want to customize the email that's sent to the user, essentially translating it for different language users.  I understand that I can specify MailDefinition-Subject and MailDefinition-BodyFileName, but what I really want to do it store all e-mails used by my site in a SharePoint list, and have each control that sends an email read the subject and body from there.   I've been able to do this for the CreateUserWizard control, but adding my own sendEMail method inside The OnCreatedUser event.   I'm wondering if I can use the OnSendingMail event, or OnVerifyingUser event to send my own email, and if I can stop this control sending it's own email by default.   Any ideas?  Thanks, Kevin

I am working on a simple portal application using the ASP.NET membership and login controls. I would like to use the PasswordRecovery control to send emails containing forgotten passwords, however my portal requires localization. I have an existing Content Management System that I am pulling the localized strings out of and I would like to link the PasswordRecovery control to that system.  But, it appears that the PasswordRecovery control will ONLY accept a .txt file for the email body...the property is PasswordRecovery1.MailDefinition.BodyFileName  I do not want to use a file on disk, I would like to use the localized content in my CMS.  Is there any way to do this? It occurred to me that I might be able to use the SendingMail event to send my OWN email through the normal System.Net namespace, but that seems sorta cludgy...  Any thoughts?  Thanks, Max


I restarted my PC many times, I also have restarted the Windows Explorer task but it doesn't work. I cannot right-click icons on Taskbar, I can't even click on the Start menu. EDIT: I don't know if this helps or not, but some of Windows 10 programs are missing now, such as "Groove Music" and "Store".

On my Windows 7 computer, I was able to right click on icons on my taskbar to unpin them.    I just upgraded to Windows 10, and I could have sworn the right click menu was working when I first installed it, but now when I right click on taskbar icons (or click and drag upward, which used to work on windows 7) no menu appears.  Everything remains perfectly responsive, I can open and close applications lightning fast, and I can right click on the taskbar itself to change the properties for example, but just not on the icons themselves.  Did I break something? How can I get it back?


Currently I am working in Ubuntu. Big Data. I do not have Windows OS in my system. i am going to install hadoop in Ubuntu. But I don't know whether windows is compulsory to have along with ubuntu. Can anyone tell me if I can proceed with hadoop without having Windows with me, thanks in advance.

I am trying to install Hadoop in Ubuntu 12.04 version. Following the instructions from  , I installed java-6-openjdk from Ubuntu software-center. I have set java_home in .bashrc. Also set java_home in Hadoop conf/env.sh. While formatting the namenode, I am getting the following error:  usr/lib/jvm/java-6-openjdk/bin/java no such file or directory.     Thank you. But it's a 64bit OS.


I am trying to make Memory Puzzle game. So I have Card.java class:   import javafx.geometry.Pos; import javafx.scene.layout.StackPane; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.scene.text.Text;   public class Card extends StackPane {     private Text text = new Text ();     private String path;     public Card (String p){         this.path=p;         Rectangle rectangle = new Rectangle (80,80);         rectangle.setFill (null);         rectangle.setStroke (Color.BLACK);         text.setText (this.path);         setAlignment (Pos.CENTER);         getChildren ().addAll(rectangle, text);         hidden ();     }     public String getPath () {         return path;     }     public boolean isShown(){        return text.getOpacity () ==1;     }     public void shown(){         text.setOpacity (1);     }     public void hidden(){         text.setOpacity (0);     } }   Main.java:  [...] List<Card> cards = new ArrayList<> ();         for ( int i = 1; i <= numberOfPairs; i++ ) {             cards.add (new Card (String.valueOf (i)));             cards.add (new Card (String.valueOf (i)));         }         Collections.shuffle (cards);         int i = 0;         int j = 0;         for ( Card card : cards ) {             card.setOnMouseClicked (e -> cardClicked (card));             if (i == this.cardsInOneRow) {                 j++;                 i = 0;             }             gridpane.add (card, i, j);             i++;         } [...]     private Card selectedCard = null;     private int clickCounter = 0;     public void cardClicked (Card card) {         if (card.isShown () || clickCounter == 2) {             return;         }         clickCounter++;         if (selectedCard == null) {             selectedCard = card;             card.shown ();         } else {             card.shown ();                 if (card.getPath ()!=selectedCard.getPath ()) {                 selectedCard.hidden ();                 card.hidden ();                 }                 selectedCard=null;                 clickCounter=0;             }     }   In Main.java I'm creating couple pairs of cards, setting on mouse click function and placing them inside GridPane. Then I'm trying to compare String path from 2 cards and it results in false every time. I have no clue how to fix it.

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


Note: I don't seem to have actually been awarded the badge.    I just got this message:    however, I'm still quite a bit away from the reputation requirement:    I didn't get a notification that I earned the badge, nor is it in my badge list. But I cannot select it for tracking anymore:    Not sure if this is related to     I did not get the badge awarded, but maybe it's just not that time of the day yet (does the tracking earning notice and the actual awarding occur on different schedules)?

On Stack Overflow, I have 428  questions answered with a total score of 775 as of the writing of this post.     It seems that this is happening to a lot more people than just me.       (Only possibly related)?


I am using the MS Visual Studio 2012 compiler and I am building in x64 release mode.  Using ifstream I can read files larger than 4GB. The problem is, I can't seek to a position in the middle of a 10GB file.  When I use seekg like this is.seekg (5368709120, is.beg); then is.tellg(); returns -1 which means the seek failed. I am sure that the file exists and the position 5368709120 exists too. It works perfectly fine if I use: is.seekg (100, is.beg); for example.  Using multiple seeks is not an option since the files can get up to 300GB (and using many seeks will be slow).  My question is: how can I get seek to work correctly on a 10GB file without using multiple seeks?

A few weeks back I was using std::ifstream to read in some files and it was failing immediately on open because the file was larger than 4GB. At the time I couldnt find a decent answer as to why it was limited to 32 bit files sizes, so I wrote my own using native OS API.  So, my question then: Is there a way to handle files greater than 4GB in size using std::ifstream/std::ostream (IE: standard c++)  EDIT: Using the STL implementation from the VC 9 compiler (Visual Studio 2008).  EDIT2: Surely there has to be standard way to support file sizes larger than 4GB.


I started creating a Hangman game. I want to have a main class, and a method class. I want to get a secret word, but I get an error:     non-static method getWord() cannot be referenced from a static context.   Maybe I get this error because no object has been created? What's wrong here and how do I fix this?  PS: maybe implementing it with enum could be better, but I want to start this way.  public class HangmanMain {     public static void main(String[] args) {         String secretWord; /* chosen secret word*/         secretWord = HangmanUtil.getWord();         System.out.println("");     }  }  public class HangmanUtil {      private String[] wordBank = {"pool","ice", "america", "hook", "book", "glass" , "hint", "giraffe"," elephant", "ocean","market"};      String guess;     private int bodyPartsLeft;      String getWord(){         int len = wordBank.length;         int rand = (int)(Math.random() * (len + 1));         return wordBank[rand];     }  }

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


I have the next script:  host=$1 port=23 user= <user> pass="<pass>" cmd1='show int descrip | i TRUNK|BBONE' #cmd2=exit  ( echo open ${host} sleep 1 echo ${user} sleep 1 echo ${pass} sleep 1 echo "terminal length 0" sleep 1  echo  ${cmd1}  sleep 1 #echo ${cmd2} #sleep 1 echo "terminal length 24"    sleep 1 echo "          " ) | telnet   This works, but I don't want that in the console appear all the comands and results, only execute.

I run the following line from my bash script in order to run the script /usr/run.pl on remote machines    xargs -P "$numprocs" -I '{}' -n  1 -- perl -e 'alarm shift; exec @ARGV' -- "$timeout" ssh -nxaq -o ConnectTimeout=5 -o StrictHostKeyChecking=no '{}' /usr/run.sh < <(echo -e "$node")    but I get on the console the following standard output   Connection to 143.6.22.4 closed by remote host.  xargs: perl: exited with status 255; aborting   where I need to put the 1>/dev/null in my syntax to avoid this message?


I tried to make an Array template class but when I try to build the compiler fails to link the constructor and the method and I get :  undefined reference to `Array::Array()  undefined reference to `Array::getSize()  Here is the header file:  #pragma once  template<typename type, int length>  struct Array{ public:     Array();     int getSize();  private:     type data[length];     int m_length; };   The Array.cpp file:  #include "Array.h"  template<typename t, int l> Array<t, l>::Array() {     m_length = l; }  template<typename type, int length> Array<type, length>::getSize() {     return m_length; }   And the main function:  #define LOG(x) cout<<x<<endl int main() {     Array<int, 10> array;     LOG(array.getSize()); }   If someone has any idea about why I am getting this, I would really appreciate.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Displaying folders ordered by size shows the following:  So about 235GB in all. However when I inspect the "Get Info" for the same drive, it shows the following:  So some 395GB in all. Where could the mysterious missing 160GB be hidden?! Thanks!

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I just want to check this:  If I have a derived class that has no new members. In case that the base class has already a long constructor (many parameters), the creation of the constructor in the derived class that just throws all the parameters to the base constructor is somewhat a boring (and obviously not necessary) process. Is there a way to tell the compiler to do it automatically? I suppose not, but just needed to check. I haven't found anything on this topic but still sorry for a duplicate if this is the case...  //I'm not interested in IDE automatic generation features (although I would welcome an advice of that type either), just a compiler...

Why does this code:  class A {     public:          explicit A(int x) {} };  class B: public A { };  int main(void) {     B *b = new B(5);     delete b; }   Result in these errors:   main.cpp: In function ‘int main()’: main.cpp:13: error: no matching function for call to ‘B::B(int)’ main.cpp:8: note: candidates are: B::B() main.cpp:8: note:                 B::B(const B&)   Shouldn't B inherit A's constructor?  (this is using gcc)


I put code    float _fNum = Float.valueOf("5093.7342");    after that _fNum value goes 5093.7344  The result of Float.valuesOf goes wrong what I think.  How can I fix it or How can I make it using another method ?

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


I am using two languages in my site i.e., English and Japanese.But when I am fetching japanese data from database whose collation is in utf8_unicode_ci,data is not showing in web page it is coming ????????????? like that in place of japanese data.  I also used  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> in header section, then also data is not coming.   If anyone knows this,please help me out. Thanks!

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


Is there a way to get QGIS to write out a world file (.wld/.pgw/.jpw) etc rather than an aux.xml. I see the aux.xml is in general better but it isn't supported by the other software I am using.  I can manually write the .wld based on the aux.xml but that is a bit of a faff.

Given a list of georeferenced rasters, about a hundred, what is the simplest method to generate  for each?  In this case the source rasters are either geotiff with embedded georeferencing or .BIL with accompanying .PRJ, but the ideal solution shouldn't care what the format is. I'm hoping to avoid duplicating data.  I have at my disposal Arcgis 10 (Arcinfo & Spatial Analyst), GDAL Utilities (gdal v1.8.0), and Quantum GIS 1.8.


Sorry if this is similar to previous questions, but I need to check if this is the best solution. My issue is that I am writing a document which contains HTTP messages for example of a snippet:     message-header = field-name ":" [ field-value ]    field-name     = token    field-value    = *( field-content | LWS )    field-content  = <the OCTETs making up the field-value                     and consisting of either *TEXT or combinations                     of token, separators, and quoted-string>   much like when using this website the message appears in a grey box is there a best practice way to do this in latex? I have found the following link:  and was wondering whether this is the best solution. I was also hoping to omit the text from a wordcount if possible. Any ideas would be greatly appreciated - I am hoping for the following kind of effect:

I'd like to make my code listing looking more sexy. I found a good example on , but one problem is remaining:  I would like to not only have a horizontal line at the bottom of the listing but also at the left and right side. Therefore I changed frame=b to frame = blr. This works fine, but the problem is now that there is a small gap between the vertical lines and the caption box. How can I correct this? I want a closed box with a caption around my listing.


I would like to know why I got this message:     Mar27 -10 20:31 removed User was removed   I don't remember where I last posted, so, where was my user removed from?  Why didn't I get any warning? I don't think I've broken any rules (yes, I've read posts like ).  I can't imagine why the user would be removed! I mean, to cease its existence!  And without any warning or advice, a MESSAGE... nothing!

Message appearing when a user was removed.     It seems I lost 1765 reputation points on Stack Overflow yesterday. The reason given in my history is "removed", with the description of "User was removed ()". I don't understand what that means. What caused this?


After reading around in SO and this , I still quite didn't understand the scope of local variables. I also read this good  from Ben Alman.    function foo(){   var i=0;   console.log(++i); } foo(); //1 foo(); //1  //##################  var foo = function(){   var i=0;   console.log(++i); };  var x = foo; x(); //1 x(); //1  //##################  function foo2(){   var i = 0;   return function(){      console.log(++i);   }; }  var x = foo2(); x(); //1 x(); //2 -- I don't get this     Why on the third example, it seems that I can have a singleton function, with the same common internal variable after calling it several times, even if it calls i=0?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I am struggling with the correct cast. May someone can show me the right direction? See my example below: public enum E_Enum1 { Value1, Value2, Value3 }  public enum E_Enum2 { Bla, blubb, whatever }  public void myMethod(Enum e) { //print e.value in int //print e.toString() }   myMethod(E_Enum2.whatever); myMethod(E_Enum1.Value2);  I want to get a result of: 2 whatever 1 Value2

Which is the preferred way to convert an Enum to a String in .NET 3.5?   Enum.GetName Enum.Format ToString   Why should I prefer one of these over the others? Does one perform better?


Let's say I have the following code  arr = ["a", "b", "c", "d"...]   I don't know how many items there may be, but I know it'll be a multiple of two. How would I go about appending every pair of items together, leaving me with  arr = ["ab", "cd"...]?

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


I wish to format numbers when passing to a plot annotation so they are 'pretty printed' with "k" for thousand, etc. and precision rounding, for example for 3 digit precision:  13.1    -> 13.1 13.1676 -> 13.2 1246    -> 1.25k 560254  -> 560k 6.234e7 -> 62.3M   I have written a function to do this, but it seems overly complicated:  import math   def num_fmt(num):     i_offset = 15 # change this if you extend the symbols!!!     prec = 3     fmt = '.{p}g'.format(p=prec)     symbols = ['Y', 'T', 'G', 'M', 'k', '', 'm', 'u', 'n']      e = math.log10(abs(num))     if e >= i_offset + 3:         return '{:{fmt}}'.format(num, fmt=fmt)     for i, sym in enumerate(symbols):         e_thresh = i_offset - 3 * i         if e >= e_thresh:             return '{:{fmt}}{sym}'.format(num/10.**e_thresh, fmt=fmt, sym=sym)     return '{:{fmt}}'.format(num, fmt=fmt)

What is an easy way in Python to format integers into strings representing thousands with K, and millions with M, and leaving just couple digits after comma?  I'd like to show 7436313 as 7.44M, and 2345 as 2,34K.  Is there some % string formatting operator available for that? Or that could be done only by actually dividing by 1000 in a loop and constructing result string step by step?


TiWorker.exe uses up 50% of CPU and then suddenly stops when i open task manager, only reason i can see it is i use tasklist/taskkill and msi afterburner to check TiWorker. I've tried everything i could find in the internet, most wouldnt work TiWorker just keeps coming back. I also couldn't run DISM /online /cleanup-image /restorehealth command due to some error that i could search about (An error occurred while attempting to start the servicing process for the image located at C:.)

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have followed all of the proceedures listed in the aforementiond answers to this question with some success. Only, Everytime I boot up the VM, it asks me to either Try Ubuntu or Install it. Why can I not simply work on the system? I've started installing it only to cancel out and seem to be able to work with it some there, but still, this seems wrong/broken. Any Help Please??

I have installed Ubuntu 11.10 using Virtual Box in my Windows XP. I have use Ubuntu 11.10 iso to install it. First time when I installed every thing was fine but when I shutdown the VirtualBox and start Ubuntu again, it asks me to install Ubuntu and try Ubuntu without installing.  Do I need to do some extra settings?


I need to copy a hiddden dot directory from remote to local. I tried this:  scp ssh:/home/ubuntu/.gnupg/ /local/target   But this gives me an error scp: /home/ubuntu/.gnupg: not a regular file

My goal is copy only all files from ~/local_dir to user@host.com /var/www/html/target_dir using scp and do not create local_dir category in local_dir.   /var/www/html/target_dir/files..   but not   /var/www/html/target_dir/local_dir/files.. when use -r parameter


Basically I want to know that. How can I add a directory (/tmp in my case) to the Path permanently from the terminal?

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


I want to prove $\log{n} = O(n^{0.5})$ but I'm not sure how to achieve this. Any help would be appreciated!

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


I'm using the code   \documentclass{book} \usepackage{pgfplots} \begin{document}  \begin{tikzpicture} \begin{axis}[         xmin=-5,         xmax=5,         ymin=-5,         ymax=5,         axis x line=middle,         axis y line=middle,         samples=100,         domain=-5:5,     ]         \addplot[thick](x,{(x+2)^(1/3)}); \end{axis}  \end{tikzpicture}  \end{document}   to plot y= (x+2)^{1/3} which gives me this graph:   but it is not complete, because the right graph is:      How can I plot it like the second screenshot?

I'm beginning to learn pgfplots and I would like to plot some functions: cubic root, inverse, and some trigonometric functions.  The problem is that for y=1/x function, it joins up the points between negative and positive parts of the domain: we can't see the asymptote.  \documentclass{minimal} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[] \addplot [domain=-10:10, samples=100]{x^(-1)}; \end{axis} \end{tikzpicture} \end{document}   With the function y=x^{1/3}, it doesn't display the negative part of the domain. And with the trigonometric functions, it just doesn't do anything right...  \addplot[domain=-27:27]{x^(1/3)}; \addplot[domain=-2*pi:2*pi]{cos(rad(x))};   thank you very much if you can help me a little bit.    thank you very much for your answers, it's really helping. Just a last thing: the cubic root function has a negative part in its domain that cannot be displayed. Do you know why?  \begin{tikzpicture}  \begin{axis}[     width=8cm,xlabel={$x$},     ylabel={$y$},grid=both, axis x line=middle, axis y line=middle,      title={$f(x)=x^{1/3}$}]  \addplot[blue,domain=-27:27, no markers,samples=100] {x^(1/3)};  \end{axis}  \end{tikzpicture}   NB: Yes, the cubic root function has a partially negative domain, and no, there is no imaginary part. NB: i'm sorry i'm insisting on one of my first questions in this comment which is supposed to be an "answer", i'm just new here and, as i'm not registered yet, i don't know how i can ask something related with the topic in a new "question comment"


is anyone aware of a firewall which can block all internet activity in an ubuntu installation but allow specific packages and programs to use internet with a checkbox list provided by a GUI ?   thank you

I would like to use a software to control which program may connect to the internet. I know that this behaviour is associated with the word "firewall", but some Linux users are very upset if somebody demands a Personal Firewall. I don't want to upset you by demand such a program. I don't want to "secure ports" or other stuff a Personal Firewall promises on Windows. I looked into iptables but it does not fit my requirements.  I saw an excellent answer here () but it's very uncomfortable to set this up.  Is there a software that asks for each program if it may access the internet?


had a bounty that was posted 8 days ago.  Its grace period expired earlier today (according to the revision history), and in fact the question does not show a bounty on the front page:    However, it does still show a bounty notice -- one that even says the grace period has expired -- on the question:    Should I blame caching?  I would if the notice showed in both places (question and front page).

I'd like to close-vote  as off-site resource request, but can't, due to a bounty. The bounty has expired, and the grace period has ended, so it seems reasonable that the question can be closed voted.    How long until it can be closed, after the grace period ends? Is there a reason why this period (post-grace lock on cv'ing) exists?   I can't find any reference to this in the  FAQ.


I used following command to delete all directories except the latest one:  rm -r ls -t | awk 'NR>1'  I accidently used the above command on wrong path and deleted many directories from that folder.  If I have to recover all files or directories deleted by this operation what should I do? Also, if I ran the above command multiple times, is it possible to recover all the files deleted in every execution of command.  Thanks.

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


Sometimes when I try to move a vertice it moves the triangles around it to. But it won't do it with a certain mesh. How do I make it so when I move the point it moves all the triangles connected to it?  notice how in the first picture I lift it and only one part comes up  but in the second picture all the shapes around it lift up too. that's what I want to happen

Most of the time when I try to move a vertex or an edge, instead of translating that, it extrudes it, it creates another face or, vertiex or whatever. I do not really get why it behaves like that. I hope I explained it in depth. I am sorry if this is a duplicate post but I could not find anything!


How can I make the following table in my latex document.  This is exactly what I want, this is what I have done so far \usepackage[utf8]{inputenc}  \PassOptionsToPackage{es-tabla,spanish,es-lcroman,es-noquoting}{babel} \usepackage{float}  \usepackage{anysize}                      \marginsize{2cm}{2cm}{2cm}{2cm}   \begin{document}    \section{Introduction}   \begin{table}[H] \begin{tabular}{l|l|l|l|} \hline \multicolumn{1}{|c|}{\textbf{Id}} & \multicolumn{1}{c|}{\textbf{Tipo de riesgo}}            & \multicolumn{1}{c|}{\textbf{Riesgos}}  & \multicolumn{1}{c|}{\textbf{Probabilidad}} \\ \hline \multicolumn{1}{|l|}{}   &  & & \\ \hline \multicolumn{1}{|l|}{}  & \multirow{5}{*}{\begin{tabular}[c]{@{}l@{}}Entorno de desarrollo \\y tecnologías\end{tabular}} & \begin{tabular}[c]{@{}l@{}}Las herramientas de desarrollo no funcionan\\  como se esperaba\end{tabular}  & Probable \\ \cline{1-1} \cline{3-4}   \multicolumn{1}{|l|}{}  & & \begin{tabular}[c]{@{}l@{}}El sistema de gestión de base de datos que se utiliza\\  no permite procesar muchas transacciones por\\  segundo como se esperaba.\end{tabular}   &  \\ \cline{1-1} \cline{3-4}  &  & \begin{tabular}[c]{@{}l@{}}Falta de dominio en las tecnologías que se utilizan\\  para la implementación del sistema\end{tabular}  &  \\ \cline{3-4}  &   &    &   \\ \cline{3-4}  &  & \begin{tabular}[c]{@{}l@{}}Las herramientas de desarrollo no se han elegido \\ bien en función de las características técnicas y no\\  proporcionan las prestaciones previstas\end{tabular} &  \\ \cline{2-4}  \end{tabular} \end{table}  \end{document}

How do I code a table to look like this? I'm not the best at LaTeX and can't seem to wrap my head around \multirow. I checked other examples prior to posting but they used \multicolumn and it just confused me even more. Thanks in advance!    \begin{center} \begin{tabular}{ |c|c|c|c|c|}   \hline  TextA & TextB & TextC & TextD & TextE\\  \hline  A & TextF & TextG & TextH & TextI\\  B & TextJ & TextK & TextL & TextM\\  C & \multirow{2}*{TextF} & TextG & TextH & TextI\\  \cline{3-3}  & TextJ & TextK \\ \hline \end{tabular} \end{center}   I was trying something like this.. I'm starting to have problems as I'm trying to multirow within a multirow? I'm not sure of the process here. I would like TextG to be split into 2 and TextH and TextI to be the cells which are split in 3 but not sure how to go about it. Will then TextJ and TextK be the contents of the split TextG cell?


I have been installing some applications onto my Debian system. Now there are some that have dependencies that I do not want installed with the applications at the moment. I have managed this by using dpkg in some cases. The installed applications work fine without them at the moment.  But now, every time I use apt-get, it complains about unmet dependencies.  How do I cheat apt-get into thinking that all dependencies (2-3) are installed? Is there some file I can edit?

I've installed Oracle Java. I want to be able to remove OpenJDK, but when trying to do so apt wants to install another version of Java.   How can I configure apt so that it knows I already have a third-party Java installed so I can remove these OpenJDK packages?


I am trying to build a garage in java. I have got a NullPointerException when I call the method addOption on my object Lagouna in my Main "Test". It is strange because it works when I call my method setMoteur. My object Lagouna is not null. My object GPS is not null as well.  Main  public class Test {      public static void main(String[] args) {         // TODO Auto-generated method stub      Garage garage = new Garage();         System.out.println(garage);       Vehicule lag1 = new Lagouna();      lag1.setMoteur(new MoteurEssence("150 Chevaux", 10256d));      lag1.addOption(new GPS()); // here is my error      } }   Class Vehicule  public abstract class Vehicule {  protected double prix; protected String nom; protected Marque nomMarque; protected List<Option> options; protected Moteur moteur;   Vehicule(double prix,String nom,Marque nomMarque){     this.prix=prix;     this.nom=nom;     this.nomMarque=nomMarque; } Vehicule(){     prix=0d;     nom="";     nomMarque=null;     options=null;     moteur=null; } public String toString() {     String str="Je suis une voiture "+ nom + " de la marque "+ nomMarque;     return str;     }  public void addOption(Option opt) {     options.add(opt);         } public Marque getMarque() {     return nomMarque;     } public List<Option> getOptions() {     return options;     } public double getPrix() {     return prix;     } public void setMoteur(Moteur mot) {     this.moteur=mot;     } }   Class Lagouna  public class Lagouna extends Vehicule {      Lagouna(){         super();     } }   Class GPS  public class GPS implements Option{  static double prix=113.5d;     public double getPrix() {         return prix;     } }   Class Option  public interface Option {  public double getPrix(); }

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 wrote the following sentence in an article:     Only in June it created repositories.   The editor corrected me:     Only in June did it create repositories.   What's the explanation for "did" in this case? It doesn't sound like emphasis, because the following word is not a verb.

I have seen this construction quite often:      Online ads have been around since the dawn of the Web, but only in   recent years have they become the rapturous life dream of Silicon   Valley.   What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to:      Online ads have been around since the dawn of the Web, but only in   recent years they have become...   And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now.


I'm trying to get the Bibliography inside my Table of Contents by using the tocbibind package, but only the List of Figures shows. I used the package like this: \usepackage[nottoc]{tocbibind}, and everything compiles without any errors, but the Bibliography is not in there. I saw in several forum discussions that people write the \bibliography{bib} command within the document class, after \tableofcontents, but if I try that, I get an error saying that the bibliography command can only be used in the preamble. I've also never seen how people using this package print the bibliography. I do it in the appendix like this: \begin{appendix}     \newpage     \printbibliography     \newpage     \listoffigures \end{appendix}  The bibliography itself looks perfectly fine, it's just not listed in the contents. Does anyone have an idea what might be causing this? This is what it looks like, the Bibliography should be on page 50:

Hi all I have a a preamble as follows but cannot seem to get the bibliography to appear in the table of contents:  %Loading in the packages \documentclass[12pt]{report} \usepackage[a4paper, width=150mm, top=25mm, bottom=25mm ,bindingoffset=6mm]{geometry} \usepackage{graphicx} \usepackage{titlesec} \usepackage{fancyhdr} \usepackage[backend=bibtex, style=alphabetic]{biblatex} \usepackage{courier} \usepackage[acronym, toc]{glossaries} \usepackage{listings} \usepackage{color} \usepackage[nottoc]{tocbibind} \graphicspath{{images/}} \addbibresource{references.bib}   then in the main body do the following roughly:  \begin{document} \maketitle  \tableofcontents  \listoffigures  \printglossary[type=\acronymtype,nonumberlist, style=custom_acronyms]  \chapter{test} \input{chapters/test}  \printbibliography  \end{document}   I successfully have items appearing in the bibliography and the bibliography displays without an issue but it doesn't appear in the table of contents although the list of figures and the glossary appear no issue! having so many issues with Latex sadly...  Any help would be much appreciated.


Let $(X,d)$ be a metric space where $X$ is some set and $d : X \times X \rightarrow \Bbb R$ is a metric. And let $(x_n)$ be a sequence.  What is the definition of a bounded sequence in a metric space?  I would assume it's something of the form $\exists M , |x_n| \lt M$ for all $n$.  But $|x|$ might not have meaning depending on what metric space is used.

I have a small question when we have a bouded sequence in a metric space; we say that there exists a closed ball $B'$ such that $(x_n)\subset B'$ or just there exist a ball $B$ such that $(x_n)\subset B$ ?  Thank you.


I want to ask how C++ stores in the memory the class and struct instantiations and if there is any difference in terms of performance. I know that C# stores the class objects in the heap and the struct objects on the stack, so struct object instances are a bit faster than class object instances. Is it similar in C++?

This question was .  Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.  I'll start with an obvious difference:   If you don't specify public: or private:, members of a struct are public by default; members of a class are private by default.   I'm sure there are other differences to be found in the obscure corners of the C++ specification.


So I see that this is actually a thing. There are several posts in forums that deal with this subject but none of the solutions that I've tried has worked.   Here is the thing. I have a Ubuntu 16.10 installed alongside Windows 10. There are two partitions that I envisioned as sort of transition rooms for file sharing among OSs. The thing is that I can't seem to make any changes to files on other partitions from Ubuntu.  Solutions that I've already tried:  sudo chmod -Rf 777 /media/user/partitionname sudo chown -R user:user /media/user/paritionname sudo chown -R user:user /dev/sda5 sudo chown user:user /dev/sda5 sudo chmod 777 /dev/sda5 sudo chmod 777 /media/user/partitionname   What I get is the following:  chown: changing ownership of '/media/user/partitionname': Read-only file system   Or something along those lines.   New folder and paste options are greyed out.  What I've already tried is changing every single permission option that I could find to read and change or read and modify.  Any help will be greatly appreciated!  PS: I would also appreciate a basic tutorial for solutions proposed :) I'm still learning! Thanks!

I have a script that I need to execute on an NTFS partition. The script's permission is set to 600.  I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file:  $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700  $ chmod 755 script.sh $ stat script.sh    File: `script.sh'   Size: 297070      Blocks: 584        IO Block: 4096   regular file Device: 811h/2065d  Inode: 35515       Links: 1 Access: (0600/-rw-------)  Uid: ( 1000/  xxxxxx)   Gid: ( 1000/  xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700   As you can see, it remains unchanged.


When using \ganttitlecalendar from the , it automatically inserts empty rows between the title rows. Is there a smooth way to prohibit this without having to create my own title?  MWE:  \documentclass[tikz]{standalone} \usepackage{pgfgantt}  \begin{document} \begin{ganttchart}[ x unit=0.7cm, hgrid, vgrid, time slot format=isodate-yearmonth, title/.append style={shape=rectangle, fill=black!10}, bar/.append style={shape=rectangle, fill=black!20}, compress calendar ]{2016-06}{2018-09} \gantttitlecalendar{year, month} \\   \ganttbar{Task1}{2016-06}{2018-07} \\ \end{ganttchart} \end{document}

I think the space between title and bars in pgfgantt is too big. Is there a way to reduce it? For example, this code  \begin{ganttchart}[ x unit = 0.30cm,                     y unit chart = 1.3cm,                     hgrid,                     vgrid={draw=none,dotted},                     time slot format = isodate-yearmonth,                     compress calendar,                     today=2014-4,                   ]{2013-05}{2017-02}     \gantttitle{2013}{8}     \gantttitlelist{2014,2015,2016}{12}     \gantttitle{2017}{2}\\     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{5,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,...,12}{1}     \gantttitlelist[title label font=\tiny ,y unit title = 0.7cm]{1,2}{1}\\     \ganttbar{Task 1}{2013-05}{2014-08}\\     \ganttbar{Task 2}{2013-12}{2015-05}\\     \ganttbar{Task 3}{2014-12}{2016-11} \end{ganttchart}   renders a picture with a too large space between the months and the tasks... making it difficult to read. Is there a way? Thanks


On this recent , a user placed a 500 rp bounty.  The question has attracted four answers of which 3 shows the same net amount of upvotes.   The user didn't choose any of the answers and let the system assign the bounty.  I know that in this case only half of the bounty is given to the answer with more upvotes, but in this case, it is not clear to me why the bounty was assigned to one of the answers which has the same upvotes as the other two.  Can anybody help me understand the dynamics behind this?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


By mistake I wrote something like this:  int tab[2][4] = {{1, 2, 3}, {4, 5, 6}}; int c = tab[1, 2]; /* expect compilation failure */   I expect this syntax cause compilation failure (linux, gcc 4.7), but gcc warn and compile. What is the meaning of the second line? Is the behavior defined in the standard? I don't find answer in it.  Thank you.


Running Ubuntu 16.04 I want to install (programmatically) getopts if it is not installed.   After this  I am doing something like this:  GETOPTS=getopts  if [$GETOPTS==""]     then    echo "Installing getopts"    sudo apt-get install -y libperl4-corelibs-perl fi   But it is not working.  Any Idea how to do this?

I recently installed Ubuntu Server edition 13.10 (Saucy Salamander). But I have run into a bit of problem. At the end of the installation, it asks about several extra packages whether you want them or not, like OpenSSH server and virtual machine host. Here's what I'm looking at:  Now, my problem is that I can't remember if I have checked the "virtual machine host" checkbox. How do I check if my server has the corresponding packages? What packages come with the virtual machine host?


So i'm having an issues unit testing the PermissionRequirementFilter below. This class was perviusly being DI'd into the unit test but something has changed and im unsure whats happend. Its complaining about the protection level of the class as its an internal based class.   MainClass:  public class PermissionRequirementAttribute : TypeFilterAttribute {     public PermissionRequirementAttribute(string permissions) : base(typeof(PermissionRequirementFilter))     {         Arguments = new object[]         {             Regex.Split(permissions, @",\s*").ToList()         };     } }  internal class PermissionRequirementFilter : IAuthorizationFilter {     private readonly IEnumerable<string> _requiredPermissions;     private readonly IOrganisationsServiceProxy _organisationsProxy;      public PermissionRequirementFilter(         IOrganisationsServiceProxy organisationsProxy,         IEnumerable<string> requiredPermissions)     {         _requiredPermissions = requiredPermissions;         _organisationsProxy = organisationsProxy;     }      public void OnAuthorization(AuthorizationFilterContext context)     {     } }   TestConstructor: The test class looks like the code below but the import isnt letting me DI the class into the test class.  public class PermissionRequirementAttributeTests {     private readonly IEnumerable<string> _testPermissions;     private readonly PermissionRequirementFilter _permissionRequirementFilter;     private readonly Mock<IOrganisationsServiceProxy> _organisationProxy;      public PermissionRequirementAttributeTests()     {         _organisationProxy = new Mock<IOrganisationsServiceProxy>();         _testPermissions = new List<string> { "myPermission", "mySecondPermission", "myThirdPermission" };         _permissionRequirementFilter = new PermissionRequirementFilter(_organisationProxy.Object, _testPermissions);     } }   Any help would be great thanks in advance.

I'm new to unit testing and I'm trying to figure out if I should start using more of internal access modifier. I know that if we use internal and set the assembly variable InternalsVisibleTo, we can test functions that we don't want to declare public from the testing project. This makes me think that I should just always use internal because at least each project (should?) have its own testing project. Can you guys tell me why I shouldn't do this? When should I use private?


I have used something like this:   select* from table where cast(CreatedDate as date) = cast(GETDATE() as DATE)   in SQL Server 2008R2 and it works perfectly. But when goes to 2005, it doesn't work because Date is not a defined system type. Can anyone let me know a way that works both 2005 and 2008R2?  The CreatedDate is default as current_timestamp and I want to get data with today's data only.

SELECT GETDATE()   Returns: 2008-09-22 15:24:13.790  I want that date part without the time part: 2008-09-22 00:00:00.000  How can I get that?


I learned for the first time that aluminum alloy frames are said to have a "life expectancy".  This is the bike in question, my 2007 Felt Z80. It has an aluminum alloy frame. I really like it and don't want to buy another road bike for a while. But it is almost 10 years old. My specific frame is a 7005 series alloy.    From what I was told, steel frames show their degradation with rust while aluminium alloy may not show any signs at all even though it is still degrading.  How can you tell if an aluminum alloy frame is starting to degrade before catastrophic failure?  How long can I expect an aluminum alloy frame to last?

My friends say it will last forever, and not to worry about it. Online results show anywhere from two years to 25. I have no clue what to expect!!  Let me give some context. I bought a decade old Specialized Epic Comp for about $550. There are no real problems with it. I needed to bleed brakes and replace the rear wheel, but that's beside the point.  The m5 alu frame shows no signs of fatigue (eg, no cracks, dents, etc). Based on what the previous owner told me, I calculated that he has probably rode about 45 000 km on this bike. Note that this an XC bike so I don't assume that there would have been much opportunity to abuse the frame.  So with all of this in mind, can anyone give me a rough estimate of how long this 10 year old bicycle frame might last?  Sorry if this question is too vague/specific or already answered to a degree. Im new to this forum 😀.


I accidentally made Mewtwo faint and it won't come back. I tried leaving and coming back, but it didn't work. How can I get it back so that I can catch it?

I've heard that legendary Pokemon such as Kyogre/Groudon respawn after you defeat the Elite Four (if you didn't catch them). The only information that I can find seems to relate to the original version of the game.  Can players faint legendary Pokemon in order to progress the story and come back later to capture them? And are there any exceptions?  The reasoning for this is some players, myself included, wish to finish the game in order to unlock post-game features before investing time/effort soft resetting for ideal natures in legendary Pokemon.  Please avoid spoilers where possible.


During installing wine this dialog appeared    I have no idea, how to confirm this dialog? Neither enter nor any other key, ctrl+C or clicking OK with the mouse seems to work. I just want to continue installation. How?

After a recent update, ttf-mscorefonts-installer prompted me to accept its license agreement.     ┌─────────────────┤ Configuring ttf-mscorefonts-installer ├─────────────────┐  │                                                                           │   │ TrueType core fonts for the Web EULA                                          │                                                                               │ END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE                             │                                                                               │ IMPORTANT-READ CAREFULLY: This Microsoft End-User License Agreement           │ ("EULA") is a legal agreement between you (either an individual or a          │ single entity) and Microsoft Corporation for the Microsoft software           │ accompanying this EULA, which includes computer software and may include      │ associated media, printed materials, and "on-line" or electronic              │ documentation ("SOFTWARE PRODUCT" or "SOFTWARE"). By exercising your          │ rights to make and use copies of the SOFTWARE PRODUCT, you agree to be        │ bound by the terms of this EULA. If you do not agree to the terms of          │ this EULA, you may not use the SOFTWARE PRODUCT.                              │                                                                               │                                  <Ok>                                         │                                                                           │   └───────────────────────────────────────────────────────────────────────────┘    Screenshot:   For some reason my terminal will not allow me to accept, or for some reason I am pressing the wrong hotkey...  I've tried every letter on the keyboard and Enter among others...  I'm sure there is a very simple and obvious solution to this.  I've also just tried to remove the package completely however the terminal states that due to the package not being correctly installed, I should reinstall the package before removing it.  Very frustrating!  Essentially, because I cannot successfully install this package, I can't really ever upgrade my system because I always have to end up terminating the terminal with the license agreement (thus the upgrade fails).


Stack Exchange seems to have made it impossible to delete accounts. I can delete the accounts from other individual sites like Ask Ubuntu, but I can't delete the main account on stackexchange.com. I want to be rid of Stack Exchange completely! I don't want a Stack Exchange account whatsoever! I really don't like Stack Exchange and I want nothing to do with it. Please help me delete my stackexchange.com account!

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


Is there any difference between the following two variables:  Mutex m; Semaphore s = 1;   I think they are the same but in a video I am watching about a formula to the reader/writer problem, it says to use 5 semaphores, each of them starting at the value of 1. I find that interesting because I thought if you have a semaphore at the value of 1, then you would just use a mutex.

Is there any difference between a binary semaphore and mutex or are they essentially the same?


I am not understanding the  sql syntax problems I'm getting while launching an injection attack, so any help explaining them is much appreciated. I have a target php login script that takes a username/password combo and then very simply runs.   Select * FROM users WHERE username='$username' AND password='$password'   When i supply the basic   $username = ' OR '1=1  $password = ' OR '1=1   the system logs me in as admin because it evaluates to   Select * FROM users WHERE username='' OR '1=1' AND password='' OR '1=1'   and gets a match for the first user entry in the database (admin). Now I'm trying to get the script to log me in as an arbitrary user named adrian. My thought was to supply   $username = adrian  $password = ' OR (1=1 AND username='adrian') --    which I thought would evaluate to   Select * FROM users WHERE username='adrian' AND password='' OR (1=1 AND username='adrian') -- '   I thought the boolean order of operations was left to right when no parentheses are included:   Select * FROM users WHERE [[[username='adrian'] AND password=''] OR (1=1 AND username='adrian')] -- '   but this is not logging me in as anyone (and giving me no errors). Even if AND's are evaluated last, this statement would evaluate to   Select * FROM users WHERE [username='adrian'] AND [password='' OR (1=1 AND username='adrian')]   Which would still be true for the user adrian.  Meanwhile   $username = adrian  $password = 'or(1=1 and username='adrian') --   is logging me in as adrian properly, which evaluates to   Select * FROM users WHERE username='adrian' AND password=''or(1=1 AND username='adrian') -- '   So why does my approach with "OR" not work while my approach with 'or' does work?  SOLVED: Thank you for the guidance. I understand sql better now, but my real problem was that autofill was removing spaces after the "--" I must've messed up the first time and then foolishly relied on autofill from then on out

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