I have a question about scalability. Here's what I know so far:  If I have an application that exceeds the provision of a single machine, it's possible to scale horizontally by adding additional machines. A load balancer would distribute traffic among those machines.  However, what happens when the load balancer gets overloaded? Could anyone provide an explanation about how I could set up a second load balancer using NGINX?

I plan to balance load between my app servers using a separate Nginx server as a software load balancer. But actually, it's because a load balancer in front of the app servers allows me to update an app server (OS, application, etc.) when I want without downtime.  Then I realized, how do I update the load balancer itself? i.e. my site is still going to go down when I need to update the OS and Nginx on the server that acts as the load balancer for my application.  As hard load balancing is out of question, I was wondering if it's possible to connect two Nginx webservers together so that they balance load across app servers together, while enabling me to update one at a time, when I need to, without causing downtime.  Is this realistic?


So I'm in love with Ubuntu. It's fast, clean, and efficient. However there are certain things that I can't do that I used to love to do on my Windows 10. I tried creating a bootable USB using UnetBootin, however it failed to actually do anything, and killed my USB drive (Not that I'm mad, I got it specifically with the intention of reinstalling windows, so it was cheap). Now I need to reinstall Windows and I'm in dire need of assistance.  When I tried booting from my USB (before it died on me) it took me straight to the UnetBootin boot page (granted I had to hit F2). However there was no option to boot from USB, and the one thing that happened when I hit enter was that it would start the 'automatic boot' count down again. I let the count down run, and it just simply restarted again. I remember being smart enough when I was younger to dual boot (Back when I had Vista) but this time I just didn't (maybe because I thought I wouldn't want to go back?)  Anyway, I really really really need help.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


How can I determine the model year of my GT Talera bike? The serial number starts out as CM17F5

This is a canonical question that will hopefully encompass all of the questions we get asking us to determine what year a bicycle was manufactured (how old is my bike, how old is my frame, etc.). Each "answer" should address a different way to determine the manufacturing year of a bicycle. To some extent, these will also help you narrow down the model as well as it will tell you what distinguishing features to look at.  The span of answers would include things such as:      Skiptooth cranks Cartridge bottom brackets (BB30/90 etc) Elliptical chainring Quick releases versus contemporary through-axles How the steerer attaches to the fork (quill vs. threadless)  Braking system (especially with mountain bikes: v-brake, direct pull, etc.)   Shifting ramps and pins on cassettes/sprockets and chainrings (versus flat sprockets) Frame material (e.g., shift from tubular steel to use of CF and hydroformed aluminium)  Frame tubing type (e.g. Reynolds 531 tubing introduced around 1934, still used today; Reynolds 501 tubing introduced around 1983). So a frame with an original 501 decal can't be from the 70', 531 decal doesn't help as much because of the range of years produced. Also, see Decals.   *Decals: style/design, amount, placement, color, etc. can help not only determine models, but also year of manufacture. Many changed decal design for the same model bike often yearly, with special/limited editions even more specific. This applies only if decals are original or have been replaced with the identical design. Tubing decals (Reynolds, Columbus, etc.) also changed designs for same tubing made in different years, although the changes aren't made as often, and manufacturers didn't always put tubing Brand decals on every model. Earlier bikes tended to have less fancy, less colorful, less quantity of decals.   Headbadges: most early bikes had actual "badges", often quite detailed and fancy, made of metal, then plastic, and finally just using decals on the headtube. Most bikes lost their metal badges in the 60's and early 70's, although some brands still have actual badges to this day, but in general a real badge indicates an earlier model bike. Dropout style (including the later inclusion of lawyers lips) Presence or absence of CPSC reflectors (USA only) Manufacturing method (shift from lugs to TIG welding, for example)  Number of gears (shift from 2x5 ten-speed to 3x8, 2x9, 1x11, etc.)  Inspection of lug design: pantographs, cut-out, stampings, custom brazing/filing, chrome, fork crow n sweep, etc. Frame/Fork Braze-ons. Race bikes tended have less braze-ons the earlier the year of manufacture. Most 60's racers and earlier had few or none with cable guides/stops, shifters, bidons, etc. being clamp-on. By the 80's if it was clamp-on, it was a sign of very cheap models and most frames had braze-ons for all cables, with multiple bottle and accessory bosses depending on style and use.   and so forth. Please edit this question if you have an answer that isn't in the index above.   A couple of caveats:   A previous owner could have replaced or upgraded components on a bicycle, so this guide only applies to original equipment There is a delay between the introduction of a technology (such as indexed shifting) and when manufacturers start selling products that use it. Low-end manufacturers may continue using technology that is severely outdated (such as one-piece cranks, freewheels, or quill stems) because it is cheaper to do so. A number of bikes are built in a Retro style, but with modern components.  Dutch bikes, trendy coffee cruisers, and beach cruisers may be modern but appear to be 1950s styling.  These tend to have modern rims and brakes as a giveaway.     Note that bicycles.stackexchange does not do valuations of bicycles. How much your bicycle is worth depends on the location of the buyer and seller, how much the buyer wants the bike, etc. etc. etc.


I made a Database in access and i saved it in my Desktop then in Data Grid View I clicked Choose Data Source and then Clicked Add Project Data Source... Then I Clicked New Connection and i choose Microsoft Access Database File (OLE DB) then I Choose My Database From Desktop... Now What user name & password I have to write???My Username & Pass in windows??? I Clicked Test Connection then a message Show :  The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.   What can i do?? Thank You So much :X

I have a Visual Studio 2008 solution with two projects (a Word-Template project and a VB.Net console application for testing).  Both projects reference a database project which opens a connection to an MS-Access 2007 database file and have references to System.Data.OleDb.  In the database project I have a function which retrieves a data table as follows   private class AdminDatabase    ' stores the connection string which is set in the New() method    dim strAdminConnection as string     public sub New()    ...    adminName = dlgopen.FileName    conAdminDB = New OleDbConnection    conAdminDB.ConnectionString = "Data Source='" + adminName + "';" + _        "Provider=Microsoft.ACE.OLEDB.12.0"     ' store the connection string in strAdminConnection    strAdminConnection = conAdminDB.ConnectionString.ToString()    My.Settings.SetUserOverride("AdminConnectionString", strAdminConnection)    ...    End Sub     ' retrieves data from the database    Public Function getDataTable(ByVal sqlStatement As String) As DataTable         Dim ds As New DataSet         Dim dt As New DataTable         Dim da As New OleDbDataAdapter         Dim localCon As New OleDbConnection           localCon.ConnectionString = strAdminConnection          Using localCon             Dim command As OleDbCommand = localCon.CreateCommand()             command.CommandText = sqlStatement             localCon.Open()             da.SelectCommand = command             da.Fill(dt)             getDataTable = dt         End Using      End Function End Class   When I call this function from my Word 2007 Template project everything works fine; no errors. But when I run it from the console application it throws the following exception     ex = {"The 'Microsoft.ACE.OLEDB.12.0'   provider is not registered on the   local machine."}   Both projects have the same reference and the console application did work when I first wrote it (a while ago) but now it has stopped work.  I must be missing something but I don't know what.  Any ideas?


I see that this question has been asked a fair amount of times, but I'm a little confused by the responses. I was hoping that somebody could please take a look at the code below and help me with how to insert text, that contains an apostrophe, into a MySQL database. The two things that are likely to contain apostrophes are full_desc and meta_desc. Thanks!  Also, I realize that this is prone to MySQL Injection, so any pointers on securing it will also be greatly appreciated. Thanks again!  <?php $con=mysqli_connect("mysql.legfly.com","username","password","database"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }  //sql  $sql="INSERT INTO races (event_name, event_date ,start_time, entry_fee, sanctioned,location, address, city, state, zipcode, country, sport, special_info, distance, race_url, reg_url, print_url, event_phone, event_email, meta_desc, full_desc, course_info, directions, other_info, perma_url, perma_year) VALUES ('$_POST[event_name]','$_POST[event_date]','$_POST[start_time]','$_POST[entry_fee]','$_POST[sanctioned]','$_POST[location]','$_POST[address]','$_POST[city]','$_POST[state]','$_POST[zipcode]','$_POST[country]','$_POST[sport]','$_POST[special_info]','$_POST[distance]','$_POST[race_url]','$_POST[reg_url]','$_POST[print_url]','$_POST[event_phone]','$_POST[event_email]','$_POST[meta_desc]','$_POST[full_desc]','$_POST[course_info]','$_POST[directions]','$_POST[other_info]','$_POST[perma_url]','$_POST[perma_year]')";  if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); }  echo "Your race is added!";  mysqli_close($con); ?>   Thanks again!

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?


Twice a week I receive an email to abuse@mydomain.tld that says:  An attempt to brute-force account passwords over SSH/FTP by a machine in your domain or in your network has been detected. Attached are the host who attacks and time / date of activity. Please take the necessary action(s) to stop this activity immediately. If you have any questions please reply to this email.  Host of attacker: <MYIP> => server.mydomain.tld => mydomain.tld Responsible email contacts: abuse@mydomain.tld, abuse@ovh.net Attacked hosts in our Network: 37.228.155.101, 185.39.222.116, 77.75.254.116, 185.39.221.179, 37.228.154.167, 37.228.154.61, 85.158.181.17, 185.39.222.20  Logfile entries (time is MET / GMT+1): Sat Jun 22 06:51:55 2019: user: vnc service: ssh target: 185.39.221.179 source: <MYIP> Sat Jun 22 06:48:29 2019: user: mysqldump service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:46:59 2019: user: testftp service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:45:59 2019: user: www-data service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:44:29 2019: user: ubuntu service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:43:29 2019: user: postgres service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:41:59 2019: user: ubuntu service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:40:59 2019: user: dong service: ssh target: 185.39.222.116 source: <MYIP> Sat Jun 22 06:39:29 2019: user: root service: ssh target: 185.39.222.116 source: <MYIP> [ ... other 4 IPs ... ]   They are always the same 4 IPs. For SSH authentication I use Google 2 factor, I have root user disabled and only an user allowed. I have also changed che port. This is a VPS by OVH where I have a mail server so I'm a little worried.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


The cosine of 90 degrees is 0.  I understand Javascript's Math.cos takes radians, so I've tried:  Math.cos(90 * Math.PI / 180)   Why does this yield 6.123233995736766e-17 instead of 0?

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


In C++ passing variables from functions to the function caller can always have better performance when returning a variable by const & (constant reference).  class A {     private:     std::string name;     public:     inline const std::string& getName() { return this->name; } const }   I am wondering if returning variables from a function in PHP as a reference can have better performance then just returning a variable like normal.  In C++ I understand that when you return a variable without const ref it copies the data into the variable that you are setting it to. So you will have two locations in memory with the same data.  But when you pass around references, you are just passing the address in memory to the same data.  Is this how it works in PHP? Or does PHP do optimization regardless?  Will the following function run faster if it is written like so? Returning a reference?  public function &getDatabaseConnection() { return $this->databaseConnection; }   Or does it not make much of a difference?

In PHP, function parameters can be passed by reference by prepending an ampersand to the parameter in the function declaration, like so:  function foo(&$bar) {     // ... }   Now, I am aware that this is not designed to improve performance, but to allow functions to change variables that are normally out of their scope.  Instead, PHP seems to use Copy On Write to avoid copying objects (and maybe also arrays) until they are changed. So, for functions that do not change their parameters, the effect should be the same as if you had passed them by reference.  However, I was wondering if the Copy On Write logic maybe is shortcircuited on pass-by-reference and whether that has any performance impact.  ETA: To be sure, I assume that it's not faster, and I am well aware that this is not what references are for. So I think my own guesses are quite good, I'm just looking for an answer from someone who really knows what's definitely happening under the hood. In five years of PHP development, I've always found it hard to get quality information on PHP internals short from reading the source.


I need to visualize a large group (say 200, 300) of cylinders from coordinates stored in a text file. One cylinder per line, defined by X1,Y1,Z1 and X2,Y2,Z2 (start and end), and by a diameter.   Is it possible just to import this TXT file and visualize all cylinders?

How can i use the value in column 'lon' and 'lat' as the position of my uv_sphere? For example,read the values from line 4, (116.4559081, 39.9139083), and make these 2 numbers as my uv_sphere x and y position in blender? and gives different colors for different mode, for example i have 4 modes in the csv , i want to make the uv sphere that represents the bus mode to be red, and subway to be green , rail to be blue and tram to be yellow., and use the row ['from'] and ['to'] to connect the nodes with a cylinder with x scale 0.5 , y scale 0.5 and the z scale with the value in ['length'] value.


I have a table like this :   id  | movie   | actorid | actor   | roleid | rolename  ----+---------+---------+---------+--------+------------------  1   |  mi3    |  121    | tom     |   6    |  actor  2   | avenger |  104    | scarlett|   4    |  actress  2   | avenger |  3      | russo   |   2    |  action director   I'm expecting the output like :  id  | movie   | actorid |      actor     | roleid | rolename ----+---------+---------+----------------+--------+-------------------------- 1   |  mi3    |  121    | tom            |   6    |  actor 2   | avenger |  104,3  | scarlett,russo |   4,2  |  actress, action director   For latest SQL Server version, I saw the STRING_AGG function to concatenate columns or row data. But how can I achieve the expected output with SQL Server 2014 using STUFF ?

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


Is it true that $\forall n \in \mathbb{N}, \exists x, y \in \mathbb{N}: x,y$ are squarefree, & $n = x-y$?    I think so, but I am not sure that I am quite proving it. Here is my line of thought: Let $S \subset \mathbb{N}$ be the set of squarefree natural numbers. Represent upper density by $D$. Then we know that $D(S) = \frac{6}{\pi^2} > 0$. There is a proposition that says that, since $S$ has positive upper density, $\exists n \in \mathbb{N}: D(S \cap (S-n)) > 0$ too. Then $\exists x,y \in S: y = x-n$. Therefore $\exists x,y \in S: n = x-y$.  So, I think that I have proven existence of at least one such $n$, but I am not sure that I have universality. The statement is supposed to hold for all $n \in \mathbb{N}$.

(1) For every $n\in \Bbb N$, there exist squarefree numbers $x$ and $y$ such that $x+y=n$, i.e., every natural number can be written as the sum of two squarefree numbers; (2) For every $n\in \Bbb N$, there exist squarefree numbers $k$ and $l$ such that $k-l=n$, i.e., every natural number can be written as the difference of two squarefree numbers.   For the squarefree numbers, I only know the definition of it, and I really did not quite understand how to prove these two from the definition.   Any help, please. Thanks in advance.


I understand KVM's purpose is to control multiple computers from one place (one set of KVM). I am looking for a device that functions the other way around! That is, control/work-on single computer from many places (multiple set of KVM). Planning to run a computer training centre where each student can login to the server and work using his/her KVM. My objective here is cost cutting.   Is there such a device? Is what I am looking for makes sense?

I know that every operating system worth using supports multiple independent users; this makes it easy for several people to share a single computer, with their own documents and everything. However, there is one small problem: the sharing can't occur simultaneously.  Remote Desktop or other similar software allows people to connect to a computer from somewhere else and log-in as any user, without disturbing other users. However I wonder, isn't is possible for multiple people with different user accounts to use a computer at the same time, locally, via multiple monitors and input devices? I tried plugging in a second keyboard, mouse and monitor, however, Windows will mirror or extend the display to the second monitor and the second set of input devices become pretty much like... well... I can't think of anything useless enough to compare them to.  How would I share a single computer with different people? Assume I have a keyboard, mouse and monitor for everyone, connected to multiple video cards (either multiple outputs on a single video card or one monitor/card).


About 2005-10, I read a story in an anthology. Don't recall the title of the anthology, story or author.  Involved the protagonist making repeated trips to the past.  At each return, he found the world a little different, but people kept telling him, "See? Nothing's changed."  At the end there have been numerous cumulative changes      humanity are now intelligent lobster-like arthropods, still maintaining that time travel does not alter history.

A little help please. The story I'm looking for is probably late-50's to mid-60's, and may well have occurred in an SF magazine.  A professor is demonstrating his new time machine to a scientific audience. The machine looks like two large spheres touching each other. In operation, one is sent back into deep time (let's say, although my memory has dropped this particular datum, 10 billion years). It will then return to the present, then bounce off its twin and jump back half that temporal distance (5 billion years), return, bounce half again (2.5 billion years), etc. Each trip will take half the time (in present-day units) as the previous, so the whole thing will be over in a finite time.  Before anyone can stop him, he activates it. He begins lecturing the audience, asserting that whatever has happened has always happened. At decreasing intervals the sphere reappears and bounces with a resonant "Boing!". At each jump, the narrative establishes that the appearance of the sphere did change history, and these changes are reflected in the professor's speech.  So it becomes something like "(Boing!) And those who say that this is dangerous might as well be claiming that the day is not 26 hours long (Boing!) or that there are three moons, not seven (Boing!)", etc. And when the final (Boi-Bo-B-B-Boing!) fades away he raises his tentacles in triumph and cries, "See? Nothing has changed!"


Im trying this code for a pretty chapter title: (), however I cannot get the chapter title on the line instead of next to it. It should be on the right of the page, as in the link. Can someone please help me :)  \titleformat{\chapter}[display]   {\normalfont\scshape\Huge}   {\hspace*{-70pt}\thechapter.~}   {-15pt}   {\hspace*{-110pt}\rule{\dimexpr\textwidth+80pt\relax}{3pt}\Huge} \titleformat{name=\chapter,numberless}[display]   {\normalfont\scshape\Huge}   {\hspace*{-70pt}}   {-15pt}   {\hspace*{-110pt}\rule{\dimexpr\textwidth+80pt\relax}{3pt}\Huge} \titlespacing*{\chapter}{0pt}{0pt}{30pt}

Im trying to recreate this () chapter, however it is not quite working as it says in the comments. I am now doing this, for numbered chapters, however I cannot get the chapter title on the line, instead of right as in the picture. The chapter title should thus be on the line, as far to the right as possible. Also, I have no clue what the 110 stands for (I adjusted it, but nothing changes), so if anyone knows, it would really help me understand the code haha! In addition the fontsize of the chapter name does not seem to change as expected when I change it (I do this in the \normalfont\Large\sffamily by changing \Large to different sizes, but it only changes a little when I change it to \HUGE for instance. It was in the original code done with #1, but I get a "1" in the pdf.  \titleformat{\chapter}[block] {\normalfont\Large\sffamily}{}{0pt} {\parbox[t]{\chapnumb}{%    \fontsize{100}{110}\selectfont\thechapter}%   \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{     \raggedleft     \hfill{\LARGE}     \rule{\dimexpr\textwidth-\chapnumb\relax}{0.9pt}}}


I have 2 links:               When I click on the first one (a-start) I'm disabling it by removing the  element and at the same time I enable the second one (a-stop) by adding the  element:  $(document).ready(function() { $("#a-start").click(function(e){   $("#a-stop-container").html("");   $("#a-start-container").html(""); }) });   When I click on the second one (a-stop) I'm disabling it by removing the  element and at the same time I enable the first one (a-start) by adding the  element:  $(document).ready(function() { $("#a-stop").click(function(e){   $("#a-start-container").html("");   $("#a-stop-container").html("");   }) });   The problem is that it works only for the first click. For example I click on the first one (a-start), then it changes a-start and enables a-stop. But then, when I click on a-stop, JavaScript does not react anymore. The same situation the other way round. Both work fine until the  element gets changed - then I have to reload the page to get it run again.  There is no information in the console.  What am I doing wrong?

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.


I have nvidia processer, but denoiser is not working.

I have a scene of an office. It has chairs, tables, computers, and so on. I would like to know how I can render this scene faster as I am planning to make animation inside the office and don't want the render to take forever. I know of sampling, resolution and most things in render settings. I have also heard of render passes or rendering using layers.


What are some good examples of building complex boolean queries? The requirements for the interface would be:   The user is able to use AND, OR, and NOT statements The user is able to next queries in a flexible manner. For example, "(X AND Y) OR (A OR B OR C AND D) NOT E OR F"   The user would need to make many queries in order to build up complex rule sets using these boolean expressions.

I'm interested to know how people have, or would construct an interface which simplifies constructing logical boolean conditions? (Yes, it's a database query builder) In my mind a bad interface has them typing lots of AND, NOT IN, OR keywords etc. Or else has a million combo boxes.  I'm wondering if anyone has a good example I could glean ideas from? Or some suggestions?  At the moment I'm considering a split screen with a grid for composing the query and a canvas to display a visual representation of the sets of conditions and how they overlap etc. Like a Venn Diagram. This still gives me a problem with the usability/intuitiveness of the controls on the grid.  EDIT:  I'm very interested in ideas which simplify it for less technical users. However, ideas for a version of the UI for advanced users are very helpful as well.


I use ssh to connect to an account based on Kerberos. My Kerberos tickets are only valid for 24h and are not renewed every time I login. Instead they expire and when that happens, ssh keys can't be used for password-less logins since my home directory is not mounted on the shell server, and hence, sshd can't read my authenticated keys.  I don't really care about the security for this account, I only use it to open a tunnel to access an SMTP-server (that in itself requires secure authentication) and therefore wonder if it is possible to somehow echo/pipe/redirect my password (which, BTW, due to stupid password requirements is impossible to remember so I have to have it as a fixed entry in a clipboard manager) into my ssh command so I don't have to enter it manually every time?  ssh -l user host < password

I need to login to a user that I've created on a remote host running Ubuntu. I can't use an ssh key because the ssh login will happen from a bash script ran within a server that I won't have access to (think continuous integration server like Bamboo).   I understand this isn't an ideal practice, but I want to either set the remote host to not ask for the password or be able to login with something like ssh --passsword foobar user@host, kind of like MySQL allows you to do for logins.   I'm not finding this in man ssh and  I'm open to any alternatives to getting around this issue.


I'm using Ubuntu 12.04 on a laptop, I was wondering if there is a way to get notified when the battery become full.

Sometimes my charger remains plugged into laptop even after charging is complete.  Is there a way to get a pop-up message/notification when my battery gets full due to charging or is there any software/package which can provide the functionality?


has      Exile target creature you control, then return that card to the battlefield under your control.   Are creatures already in my graveyard still under my control? Can I return one of them to the battlefield?  (No, I don't think  answers my question. It's not "permanent", but "creature you control")

If i have a sorcery or instant or creature ability that allows me to return target permanent to its owners hand, can I use that ability or spell to return permanents from my graveyard


I am writing a small program to give me the max amount of each coin category (quarters, dimes, etc) when I enter an amount. The modulus operator is not returning a correct value. For example, when I enter the amount "1.64", it should return: Quarters: 6, Dimes: 1, Nickels: 0, Pennies: 4.  But my problem is at pennies. It keeps returning 3 pennies only. Any input would be appreciated!  import java.util.Scanner;  public class Main{     public static void main(String args[]) {         Scanner in = new Scanner(System.in);         System.out.println("Enter amount: ");         double amount = in.nextDouble();          int quarters = (int)(amount / 0.25);         System.out.println("Quarters: " + quarters);          amount = (amount % 0.25);          int dimes = (int)(amount / 0.1);         System.out.println("Dimes: " + dimes);          amount = (amount % 0.1);          int nickels = (int)(amount / 0.05);         System.out.println("Nickels: " + nickels);          amount = (amount % 0.05);          int pennies = (int)(amount / 0.01);         System.out.println("Pennies: " + pennies);     } }   Enter amount:  1.64 Quarters: 6 Dimes: 1 Nickels: 0 Pennies: 3

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


I've been given this one-liner to know how much memory my processes consume.  $ ps -u $USER -o pid,rss,command | \     awk '{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}'   Now I'd like to create an alias for that command, but have an issue escaping ' characters:  $ alias mm=ps -u $USER -o pid,rss,command | \     awk '{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}' bash: alias: -u: not found bash: alias: myuser: not found bash: alias: -o: not found bash: alias: pid,rss,command: not found Total 0 MB   I tried to escape the single quotes, but still it doesn't work.  $ alias mm='ps -u $USER -o pid,rss,command | \     awk \'{print $0}{sum+=$2} END {print "Total", sum/1024, "MB"}\'' >    Can you help me understand how to create this alias?

I'm having trouble with escaping characters in bash. I'd like to escape single and double quotes while running a command under a different user. For the purposes of this question let's say I want to echo the following on the screen:  'single quote phrase' "double quote phrase"   How can I escape all the special chars, if I also need to switch to a different user:  sudo su USER -c "echo \"'single quote phrase' \"double quote phrase\"\""   Of course, this doesn't produce the right result.


I am trying to create a report in table format and values in table have to input from some external file (or excel file). Can this be achieved in Latex? If yes, then the number of table rows should be auto increment according to input data. I tried using \longtablebut could not succeed.  following is my code.  \documentclass{article} \usepackage[a4paper,margin=0.7 in,landscape]{geometry} \usepackage{array} \usepackage[thinlines]{easytable} \usepackage{geometry} \usepackage{fancyhdr, graphicx} \usepackage{tabulary} \usepackage{fancyhdr} \usepackage{lastpage} \usepackage{multirow} \usepackage{longtable} \usepackage{float} \usepackage{ltablex}  \pagestyle{fancy} \setlength\headheight{30pt} \fancyhead[L]{\begin{tabular}{lll}           %  \hline             \multirow{2}{*}{\includegraphics[width=30pt]{logo.jpg}} &          \multicolumn{1}{l}{\textbf{Variable Messsage Sign Report}}  \\                              & \multicolumn{1}{l}{Downloaded by USER on DATE and TIME}   \end{tabular}\\} \cfoot{\thepage\ / \pageref{LastPage}} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \makeatletter \setlength{\@fptop}{0pt} \begin{document} \begin{figure}     \centering     \includegraphics[width=0.3\linewidth]{hcc.jpg} \vspace{-100 px} \end{figure} \vspace{-400 px} \begin{table}[] \textbf{Variable Message Sign Summary} \\ \centering \noindent\begin{minipage}[t][4in][t]{\textwidth} \centering \bgroup \def\arraystretch{2} \begin{longtable}[100pt]    {|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|p{2.5cm}|} \hline  \textbf{Status} & \textbf{SCN} & \textbf{Slide} & \textbf{Message\_Text} &     \textbf{Time} & \textbf{Created\_by} & \textbf{Created\_on} &     \textbf{Updated\_on} & \textbf{Deleted\_on} \\ \hline  &sdfgdfsgdfsg dfg dfgdfgdfg d &  &  &  &  &  &  &    \\ \hline  &gfdgdfgdf  fgdfgdf sdfgg   &  &  &  &  &  &  &    \\ \hline  &  dfgfdg dfgdfg dffgdfg &  &  &  &  &  &  &    \\ \hline  &  dfgdfgd dfgdfg dfgdfg&  &  &  &  &  &  &    \\ \hline  & fgdfg dffgdfgdf dffgdf  &  &  &  &  &  &  &    \\ \hline  &  dfgdfgd dfgdfg dfgdfg&  &  &  &  &  &  &    \\ \hline  & fgdfg dffgdfgdf dffgdf  &  &  &  &  &  &  &    \\ \hline  & fgdfg dffgdfgdf dffgdf  &  &  &  &  &  &  &    \\ \hline  &gfdgdfgdf  fgdfgdf sdfgg   &  &  &  &  &  &  &    \\ \hline  &  dfgfdg dfgdfg dffgdfg &  &  &  &  &  &  &    \\ \hline  &  dfgdfgd dfgdfg dfgdfg&  &  &  &  &  &  &    \\ \hline  & fgdfg dffgdfgdf dffgdf  &  &  &  &  &  &  &    \\ \hline \end{longtable} \egroup \end{minipage} \end{table} \end{document}   PS: pardon for using some packages which are not useful here  Attached is the screenshot of what I am getting as an output.

I want to create a table from a CSV file in LaTex. I am able to do it with numbers  but creating table for strings such as abbrevions does not work. What is the problem?  MVE  This example fires error "Package PGF Math Error: Could not parse input '...' as a floating point number, sorry." \documentclass{standalone} \usepackage{pgfplotstable,filecontents} \pgfplotsset{compat=1.9}% supress warning  \begin{filecontents*}{test.csv} Abbreviation, Description ACG, Azeri Chirag Guneshli bcm, Billion cubic meters BTC, Baku Tbilisi Ceyhan CIA, Central Intelligence Agency Btu, British thermal unit CAC, Central Asia Center EU, European Union LNG, Liquified Natural Gas NATO, North Atlantic Treaty Organization OMV, Österreichische Mineralölverwaltung \end{filecontents*}  \begin{document} \pgfplotstabletypeset[col sep=comma, columns={Abbreviation,Description}]{test.csv} \end{document}


I can see a lot of <a href="javascript:void(0);"> on html pages. From I've read it does nothing by returning undefined. How is this different with <href="#">

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


I hope this is not a repeat question. I tried searching but couldn't come up with the right search words for this question.  I see the following in the sidebar of my flagging history tab:    I notice that I have raised 28 helpful flags from my user page, but I see "27 deemed helpful" and "1 deemed helpful". What is the difference between the top half and the bottom half of the entries in the flagging history sidebar? How should I interpret the results displayed in the sidebar?

The  (click on your number of helpful flags in your profile) is cool, however some posts have a gray background, some don't. What does it mean?  example:


In circular motion is the angular velocity vector always perpendicular to centripetal acceleration?  Are there any exceptions? Why or why not?

In circular motion of a particle is the velocity of particle always perpendicular to the centripetal acceleration? Are there any exceptions? Why or why not ?


Say I'm writing a post on meta, and I want to direct the reader to a specific section of their profile page. One thing one can do is to just link to the profile page of the OP who asked the question, say,  ,  and this will work for OP ─ but any future readers will be redirected to Jane's profile page instead of their own. Is there a smart way to use the SE url handling (say, something along the lines of    or something similar) which will send any logged-in user to their profile page? (And which, ideally, will carry along any additional attributes such as ?tab=badges and the like?)

Six years on, is this possible yet?    I ask as I wanted to link up all the sites in the first list, here:  but I can't without a generic link.  Unlike the first question though, I'm not suggesting we base it off of name, but the user id should be stored somewhere in the page request (?) in Django it's just request.user to get the user object. The site is Ruby on Rails, so I'm guessing it will be different but similar.  Not sure if this is currently possible so taggin as both  and .


Given a parabola of the form $Ax^2 + Bxy + Cy^2 + Dx + Ey + F = 0$, where $B^2 - 4AC = 0$, what is the formula for the focal length?

The latus rectum of the parabola defined parametrically by $x=at^2+bt+c$ and $y=a't^2+b't+c'$ is---  I tried to eliminate $t$ from both the equations and I got the following equation $$(a'x-ay+c'a-ca')^2=(ab'-ba')(b'x-by+c'b-cb')$$  However I could not find out the length of latus rectum. I also tried to find out the equation of axis using  but it turned out a bit complex. Please help me in this regard. Thanks. :)


table = new myObject*[TABLE_SIZE];   I know that * are for declaring pointers variable and to obtain the value of the variable from a pointer, but what does this mean?

I am trying to create an array of pointers. These pointers will point to a Student object that I created. How do I do it? What I have now is:   Student * db = new Student[5];   But each element in that array is the student object, not a pointer to the student object. Thanks.


Find the partial derivatives of $f (x,y) = x^2\sin(1/x)+y^2$ at $(0,0)$  Is this function differentiable at the origin?   $$f(x,y) =  x^2\sin(1/x)+y^2 \quad \text{if $(x,y) \ne 0$}  $$ $$   = y^2 \qquad \text{if $(x,y) = 0$} $$  I found that $$\frac{df}{dx} =2x\sin(1/x)-\cos(1/x)$$ $$\frac{df}{dy} =y^2$$  df/dy(0,0) is easy it's df/dy=0^2=0  But df/dx(0,0) is a bit more complicated as $\sin(1/x)$ is undefined at x=0 perhaps i can use squeeze theorem to say that the limit of df/dx as it approaches x=0 is 0 but that would be the limit and not df/dx(0,0)  How do i find $\frac{df}{dx}(0,0)$

Let $f(x) = x^2 \sin{\frac{1}{x}}$ for $x\neq 0$ and $f(0) =0$. (a) Use the basic properties of the derivative, and the Chain Rule to show that $f$ is differentiable at each $a\neq 0$ and calculate $f'(a)$. You may use without proof that $\sin$ is differentiable and that $\sin' =\cos$.  Not even sure what this is asking.  (b) Show that $f$ is differentiable at $0$ and that $f'(0) =0$.  $\frac {f(x)-f(0)}{x-0} \to \lim_{x \to 0} x \sin(1/x)$. $x \sin(1/x) \leq |x|$ and $\lim_{x \to 0} |x|=0$. Thus $f(x)$ is differentiable at $0$; moreover $f^{'}(0)=0$.  (c) Show that $f'$ is not continuous at $0$.  $f{'}(x)=x^{2} \cos(1/x) (-x^{-2}) + 2x \sin (1/x)$. In pieces: $\lim_{x \to 0} \cos (1/x)$. $f^{'}(0-)$ nor $f{'}(0+)$ exists as $x \to 0$ $f^{'}(x)$ oscillates infinity between $-1$ and $1$ with ever increase frequency as $x \rightarrow 0$ for any $p>0$ $[-p,0]$, $[-p,p]$ or $[0,p]$ $f$ is not continuous. Question: How to show more rigorously?


When Marcus was beaming his daughter on board she was running while it was happening.   How did she not die if you're supposed to stay still when you're energizing?

In Star Trek (2009), when Kirk and Hikaru Sulu are falling from the drill, at the last moment Ensign Chekov locks on them and is able to transport them inside the ship.   By the time they were transported, they have gained a lot of momentum due to free fall, but when they are inside the ship they just experienced a mild thud.    Where did that much amount of momentum go? Does momentum conservation not apply to Teleportation in the Star Trek Universe?   As far as i know from the game 'Portal', momentum was being conserved there.


This is all the code. the error is this.         query failYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Title','',now(),'macbook-retina-wallpapers-hd.jpg','Content','Tag','4','Status'' at line 1   <?php  if(isset($_POST['create_post'])){       $post_title = $_POST['title'];      $post_author = $_POST['authror'];      $post_category_id= $_POST['post_category_id'];      $post_status = $_POST['post_status'];      $post_image = $_FILES['image']['name'];      $post_image_temp = $_FILES['image']['tmp_name'];      $post_tags= $_POST['post_tags'];      $post_content = $_POST['post_content'];      $post_date = date('d-m-y');      $post_comment_count = 4;       move_uploaded_file($post_image_temp, "../images/$post_image");        $query = "INSERT INTO posts(post_category_id, post_title, post_author, post_date, post_image, post_content, post_tags, post_comment_count, post_status)";       $query .= "VALUES({$post_category_id},'{$post_title}','{$post_author}',now(),'{$post_image}','{$post_content}','{$post_tags}','{$post_comment_count}','{$post_status}') ";        $create_post_query = mysqli_query($connection, $query);       if(!$create_post_query){          die ("query fail" . mysqli_error($connection));        }     }  ?>     <form action = "" method="post" enctype="multipart/form-data">
          Title         <input type="text" class="form-control" name="title">

          Category         <input type="text" class="form-control" name="category">

          Author         <input type="text" class="form-control" name="author">

          Status         <input type="text" class="form-control" name="post_status">

          Image         <input type="file" name="image">

          Tags         <input type="text" class="form-control" name="post_tags">

          Content         <textarea type="text" class="form-control" name="post_content" id="" cols="30" rows="10"></textarea>

         <input class="btn btn-primary" type="submit" name="create_post" value="publish post">
    </form>   So I am running a query when you enter the fields inn the form and submit post to database. For some reason it is not working. If you have any suggestions it would be great.  if(isset($_POST['create_post'])){       $post_title = $_POST['title'];      $post_author = $_POST['authror'];      $post_category_id= $_POST['post_category_id'];      $post_status = $_POST['post_status'];      $post_image = $_FILES['image']['name'];      $post_image_temp = $_FILES['image']['tmp_name'];      $post_tags= $_POST['post_tags'];      $post_content = $_POST['post_content'];      $post_date = date('d-m-y');      $post_comment_count = 4;       move_uploaded_file($post_image_temp, "../images/$post_image");        $query = "INSERT INTO posts(post_category_id, post_title, post_author, post_date, post_image, post_content, post_tags, post_comment_count, post_status)";       $query .= "VALUES({$post_category_id},'{$post_title}','{$post_author}',now(),'{$post_image}','{$post_content}','{$post_tags}','{$post_comment_count}','{$post_status}') ";        $create_post_query = mysqli_query($connection, $query); }

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?


For my first games, they will be well made, complete, but extremely simple, while i father enough funds to actually fund a game company.  But because I plan on releasing quality content under {insert my name here} Studio (trademark)(c)  and of course all of my games will be superseded by a (c), despite the fact I haven't even registered anything.  But the real question is, what steps do I need to take to make sure my content does not get stolen while im financially stable enough to file all the paperwork needed to maintain proper copyrights?  I'd also like to release a major title, but I'm scared to, because I know someone is going to try and steal it.

we started new pirate game, and I just want to ask some questions about rights. So I am new in game dev, I guess there are a lot of answers, but I guess professionals can advise something for first steps.  So we started some things like:   concept arts sounds we are working on the name of the game (just use temp one for now) we develop some models of ships and characters   I have question what's my step to protect everything I listed above. Do I need to protect everything separately? Do I need to register a game somewhere? Can I use my already made domain and subdomain for the game? Or do I need to register unique one domaine.


I want to find a linux command that can return a part of the string. In most programming languages, it's the substr() function. Does bash have any command that can be used for this purpose. I want to be able to do something like this... substr "abcdefg" 2 3 - prints cde.    Subsequent similar question:

Given a filename in the form someletters_12345_moreleters.ext, I want to extract the 5 digits and put them into a variable.  So to emphasize the point, I have a filename with x number of characters then a five digit sequence surrounded by a single underscore on either side then another set of x number of characters.  I want to take the 5 digit number and put that into a variable.  I am very interested in the number of different ways that this can be accomplished.


I have a circuit like below.   I wanted to know how these resistance values were calculated. I wanted to use 12V/24V in place of 9V.   Let me know selection of opto-coupler and resistance value.

This question is in regards to the EL817 Opto-coupler().  I'm trying to choose a suitable resistor to lower the current/resistor of the Opto's LED. With a source of 3.3v, an LED forward voltage of 1.2v at 20ma, I've calculated the resistor value to be 105ohms. Is this correct?


A cartoon with two boys and a girl fighting by transforming into monsters and capturing the defeated monsters.  If I remember correctly, the guy had a fire monster and his friend (the other guy) had an ice monster. Iforgot what the girl had.  I remember at the end they had a tournament at the end with the bad guys and it was shown that the main character's dad was still alive?

Looking for a show about a group of three kids/teens who, using cards to change into monsters, fight and recover relics. I believe there are two or three other groups of three also trying to get the relics.  In the main group there are two boys and a girl. The boys were both white, one is from a farm and I don't know where the other is from. The girl was dark skinned and either black or blue hair. The three travelled around the world using a red plane.  I think they only use one monster primarily. The girl uses a monster created from gas and at one point is green. One of the boys uses a metal robot most of the time and at one point is given another better version of that card to use. I believe the episode for this was called something like green with envy.  All I'm getting from the internet is that it may be Chaotic, but that isn't the right show.  I also believe the girl's name was Mai and one of the boys were Ky, but I may be wrong.


Is the following sentence grammatically correct:      I was wanting to know if I could sent you a link.    It does not sound correct to me.

I posted a question today about ""and I used the verb "find" in the progressive.:  I'm finding more and more that "having to" is also used instead of "have to".  Someone comments it's a "recency illusion" or a stereotypical characteristic of Indian English. I'm not a native speaker of English, and I never have been in touch with Indian a bit. I've been reading about stative verbs in the progressiveand I've seen and heard them not a few times in movies, dramas, novels, games, grammars, most of which are put out in the U.S.A. or the U.K., so I thought it would be OK to use the special progressive use in proper contexts, but now I think I'm missing something important, and I'm confused a lot. If you know what it is, please tell me about it with good explanations and examples. Now I'm going to show you some of the examples of the progressive with stative verbs that I've been collecting on my own for two years or so, (quite a few of them from grammars, some from dramas, novels and stuff...) and I want to know you native speakers' opinions on that. If your views on the usage diverge a lot, I'm going to have to think about which side I'm on,and one of the two is preferred over the other, then I'll follow it.        It’s mattering more and more which university you get your degree at.   She is not finding London totally easy.   I’m finding (=discovering, realizing) that his problem is more complicated than I had expected.   No, I’m sort of thinking that I’d like to try a bit higher level heel, anyway.   I’m thinking that we should pay a short visit to Clara.   One night in the middle of the night, I'm hearing dripping.   How are you liking your new job?   I was quite liking the performance until the first interval.   Tim, are you wanting any fruit?   It sounds that you're wanting to take care of yourself physically as well.   The only thing I'm lacking is a wardrobe.   He’s forgetting his French faster and faster.    I'm already forgetting what I was taught this morning.   You're forgetting that our resources are not unlimited.   I’m forgetting that I promised to visit Smith this evening.   The river is smelling particularly bad today.   My scarf is no longer smelling of lavender.   She’s looking much stronger this week.   You’re looking more like a sleep dog than most sleep dogs.   He’s looking worse and worse by the minute.   Your soup is tasting better every day.   That example is sounding less and less acceptable with each repetition.       ※. What I'm asking you is as follows:  1. the validity of the expression "I'm finding more and more that..." in the context of the original post 2. whether or not stative verbs in the progressive is widely acceptable     and questions about your opinions on that     (As I already said, if most of you reject the usage like the examples, then I should avoid it.      If most of you welcome it, I'll keep on with it.)


In my 64 bit Ubuntu 16.04.1 skype crashes (disappears) after logging in and no error message is displayed. Previously this problem was not present. What could be the reason?

Skype for Linux Beta shows the following message when running the application. Is there a new version of Skype for Linux?  Sorry, this version of Skype is not supported anymore.   How can I get it work?


According to my idea, downvoting without a comment is not helpful neither for the user nor the community.  Do you see any constructive feedback by just downvoting?  Just downvoting would not let the user to improve. What do you think if we make a comment mandatory if we downvote for a question, but not for an answer?

I am not sure if this comment about a suggestion on stackoverflow should be written here, but I do think so.   I would recommend, if this is possible, when downvoting a question, to be mandatory for the downvoter, to write the reason why he/she downvoted. I think this should be much more helpful for the OP to understand better what he did wrong, in order to fix it, if he does not want to get more downvotes. Downvoting itself, does not help the OP much, nor the people that might have a similar programming problem.  Please write what do you think guys. I know that most of you will disagree with me, but I find that giving feedback when downvoting is more useful for all of us.


which software is suitable in ubuntu for remote desktop management using internet. not home network (LAN).

Poll on best VNC / remote desktop software for assisting others on Windows/Mac machines from Ubuntu?    I've heard good things about TeamViewer and Fog Creek Copilot, but I'm wondering if the included GNOME Vinaigre VNC client is good enough for this.  To specify, I'm looking for best option based on:   SIMPLEST ease-of-use for client to download/use on their end. See #1. Works cross-platform I am able to control client's mouse and/or keyboard from remote machine.


How to download torrents anonymously with Transmission? I also have Tor browser.

I am trying to get Transmission to connect through a SOCKv5 proxy.  I am not able to find any settings in the graphical interface to Transmission that allows me to change proxy server for the program.   Is there any other program that could help me tunnel the transmission traffic - for example like Proxifyer for Windows?


import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException;  public class Example {      public static void main(String[] args) {         BufferedReader input = null;         BufferedWriter output = null;         try{             int c;             input = new BufferedReader(new FileReader("readfile.txt"));             output = new BufferedWriter(new FileWriter("writefile.txt"));             while ((c=input.read())!= -1) {                 output.write(c);             }         } catch (FileNotFoundException fnfe){                 System.err.println("The file was not found.");                 fnfe.getMessage();         } catch (IOException ioe) {             System.err.println("The file could not be read.");             ioe.getMessage();         }finally {             try {                 output.close();             } catch (IOException e) {                 System.err.println("The file was not opened.");                 e.printStackTrace();             }             try {                 input.close();             } catch (IOException e) {                 System.err.println("The file couldn't be closed.");                 e.printStackTrace();             }          }       }  }   The above code throws an unexpected exception - NullPointerException in one of the try block on the following line: output.close();. Can anyone explain the reason for that? Any help would be appreciated. Thanks in advance.

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?


Recently I installed Picasa in my Ubuntu 14.04 using Wine. After performing a Wine configuration I was able to access all the images in the NTFS partitions on my hard disk. I performed Wine configuration as said in .   After 3 days, it became unable to access 2 NTFS partitions. But I can access 1 NTFS partition(named E, see image below).    As you can see in the screenshot, I am unable to expand both D and F. How can I fix this issue permanently ?

Ubuntu was installed alongside Windows 7 on my system. After some days, I deleted and formatted the Windows partition and didn't format the other NTFS partitions.  Before that, I installed Wine on my Ubuntu. I used it to install some software like Picasa. When I tried to open some images on a NTFS partition using Picasa, I was unable to view or access these partitions. I will show my partition details -    As you see, I have 4 NTFS partitions in total. When I opened Picasa and searched for the partitions in which the images are saved, I was unable to find some partitions (sda5, sda6 and sda7).    This is the window that was opened by Picasa when I tried to search image files. How can I access the partitions in which the images are stored from Picasa?


Please tell me how we can solve the problem of jumping cursor while typing. I am using Ubuntu 16.04 LTS and have Dell inspiron 5559.  At least tell me how to change sensitivity of touchpad.

This option, which was present in the "Mouse and Touchpad" settings panel in previous versions, is for some reason absent in 16.04 LTS. Does anyone know why this is, and/or how to fix it? Thanks.


I play a Gnome Alchemist with the Preservationist archetype. In my formulae I have Summon nature's allies (I, II, IV and so on...), which allows me to summon creatures to help me do things (fight, and other things). Usually I summon (fire) elementals.  What are the limitations of the interactions between them and me / them and the group ? Can I give them simple orders such as "attack this thing"? At what cost? Can I give them complex orders such as "Go look over that wall and then come back to tell me what you saw"? Would either of those require a roll for Handle Animal? Would either of those require communicating with the summoned creature in a non-innate way (for example learning Ignate language)?  For example when I summon a fire elemental to "burn that house" what actions are required from me after the actual summon?     Speak "Burn the house" in common to the Elemental? Speak "Burn the house" in ignate, the fire elemental's language? Gesture towards the house? Concentrate and wish it really hard until it works?   I feel I have a huge need to learn Ignate eventually but I'd like to know how far can I go without it.

The  and  spells mention:     If you can communicate with the creature, you can direct it not to   attack, to attack particular enemies, or to perform other actions.   In that situation, what exactly is "communicate"? Do you need to speak the same language? If the summons is intelligent enough, can you use gestures (e.g. pointing toward a specific enemy you want it to attack) or similar nonverbal communication? Can you use someone else as a translator?  An answer from RAW would be appreciated, or at least something as RAW as possible.


so I have a pattern as a PNG. I was wondering if Blender had a way of turning the PNG into a mesh. It's kinda like how if you put a transparent shader on a plane with an image texture you get a 2d picture/sprite thing. I was wondering if I could do something like that but extrude it so it's a 3d mesh. If any of that made sense, how could I do this/is there a way to do this without modelling it all over?  Thanks in advance

I have a plane with a texture with both transparent and opaque elements. I would like to give that texture thickness. If I solidify the plane, the texture is only on the faces, not 'through' the solidified plane. I could apply array modifier in very tiny increments to build the thickness, but that's not optimal and seems not really smart either.  UPDATE: More details:  My initial request for this project:   I am trying to recreate series of confocal microscopic images into 3D structures. Each image is flat, I tried to give them thickness by adding array of 6 planes but it looks awful. If I could give each plane thickness, they would stack in nice 3D shapes.     UPDATE 2 David - I tried your suggestion, but I'm getting no effect after displacement. I added solidify modifier on top of that, but I only get fill on edges / rims:    FINAL UPDATE: I followed atomicbezierslinger method - it gave me pretty decent results with very good 3D reconstruction. I used 100x100 cubes per picture, resized z-size to 0.2. Attached is a render of 13 z-stacks from confocal. I need to tweak noise a bit, but I guess there's no better way to go. Now I need to write a Python code to automate it - each data set is 100 z-stacks - too much to do it by hand. I appreciate all suggestions and your help.    FOLLOW UP: I probably was unclear asking initial question and didn't explain my goal well. Confocal microscope uses laser to scan fluorescent-labeled animal tissue. Each laser pass reads a plane of ~1 micron thickness then, the next scan goes deeper and deeper. This way z-stacks are created. There is a software for 3D reconstruction of z-stacks (e.g. ImageJ) but I am exploring possibilities and limitations of Blender in this application. Please see below image for the explanation.   Picture source: Hammad et al., Arch Toxicol (2014) 88:1161–1183


I've been trying to write a regular expression to match the URL of a website. Apparently  (http:\/\/www.)([a-zA-Z0-9])(\.[a-zA-z])\/"\s   does not work. The URL has to start with http://www. and can have up to one or more alpha numeric characters.

How can I check if a given string is a valid URL address?  My knowledge of regular expressions is basic and doesn't allow me to choose from the hundreds of regular expressions I've already seen on the web.


I have a list of n letters as strings such as: input: ["A", "B", "C", "D"]  What I need to do is create all possible combinations of these letters with given length, for example if: L = 2 output: ["A", "B"], ["A", "C"], ["A", "D"], ["B", "C"], ["B", "D"], ["C", "D"]  L = 3 output: ["A", "B", "C"], ["A", "B", "D"], ["A", "C", "D"], ["B", "C", "D"]

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


I have a broken Ubuntu OS.  I have tried many a ways to restore/recover the hard drive.  Boot-repair, Windows recovery, Ubuntu live usb repair disc option.... nothing is working.    The 750gb partition that is shown was where Ubuntu was previously installed in place of my Windows installation.  Yes that is right, I installed Ubuntu over Windows instead of the dual booting option like a fool.  Let us move past that.    Right now I want to format my partitions so as to repair my Windows OS and then install Ubuntu as a dual boot.  Please step by step or semi-detailed instructions in using GParted or possibly the terminal.  I'd appreciate any help offered and I thank you in advance!

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


$\lim \limits _{n \to \infty} (3^n+1)^{\frac{1}{n}} = ?$  The help tip says I should use squeeze theorem but somehow still can't figure it out :/

Find $\lim _{ n\rightarrow \infty  }{ { \left( { 3 }^{ n }+1 \right)  }^{ \frac { 1 }{ n }  } } $ using the squeeze theorem  I have come across ways to do this but none mention the squeeze (or sandwich) theorem. I know I need to find $2$ functions which squeeze the given function but can only think of using $(3^n)^{1/n}$ i.e. $3$ as the $\le $ function


package base;  import java.util.concurrent.TimeUnit;  public class Page{          public static WebDriver driver;           public Page() {         if(driver==null) {           WebDriverManager.chromedriver().setup();           driver.get("https://www.zoho.com/");           driver.manage().window().maximize();           driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);         }     } }

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 would like to ask if the following statement is true.  Consider a quadratic integer ring $R$ that is a Euclidean domain and $p$ a prime element of $R.$ Then $R/(p)$ is a field and is isomorphic to a finite field $\mathbb{F}_q$ where $q=|N(p)|$ (the absolute value of the norm of the element $p$).  If this is true, in what book can I find a proof of it? Thank you so much!

There is something I do not understand in my lecture notes, mainly because I do not understand quotients very well. We consider a number field $K = \mathbb{Q}(\sqrt{d})$ where $d$ is squarefree.  If $\mathcal{O}_K$ denotes the ring of integers of $K$, it has a basis $\langle 1, \omega \rangle$ where $\omega$ is either $\sqrt d$ or $\frac{1+\sqrt{d}}{2}$ depending on $d \bmod 4$. We let $f(x) \in \mathbb{Z}[x]$ be the minimal polynomial of $\omega$ (so $f$ is monic of degree 2).  What I do not understand is first of all that we can write  $ \mathcal{O}_K = \mathbb{Z}[x] / f(x) $. Also, if $p \in \mathbb{Z}$ is prime, the notes then say $$ \frac{\mathcal{O}_K}{(p)} = \frac{\mathbb{Z}[x]}{(p,f(x))} = \frac{\mathbb{F}_p[x]}{f(x) \bmod p} $$  I do understand how to go from the first expression to the second(trivial when you know the above) but not how to go from the second to the third.  Also, the lecturer then gives the expression $\frac{\mathcal{O}_K}{(p)}$ when $p$ is ramified, split or inert. I do not really see why, in the sense how does it help to know that when $p$ is inert then  $$ \frac{\mathcal{O}_K}{(p)} = \frac{\mathbf{F}_p}{f(x)} = \mathbf{F}_{p^2} $$ for example ?  Thank you very much for your help !


I am reading this paper  $ <$Interlacing Families IV: Bipartite Ramanujan Graphs of All Sizes$>$, which proved the existence of the Ramanujan Graphs of all sizes.  This paper uses the notion of Haar measure on $O(n)$, the orthogonal group on $\mathbb{R}^n$.  I searched on Google and Wiki about this  but it is too hard for me since I am not familiar  with abstract measure theory.   I am wondering if there is an easier way to understand the specific example, which is the Haar measure on $O(n)$. What I know about measure theory is the Lebesgue meausre and to construct the integral given an meausre.

I am interested in describing the group of special orthogonal matrices $SO(n)$ by a set of parameters, in any dimension. I would also like to obtain an expression of the density of the Haar measure in this set of parameters. Could anyone help me on this or indicate a good reference? Thanks


The question is in the title. I'm mostly asking because I'm wondering whether this is subjective or not (this is regarding a sample like avg engineer salaries by state).  I know it's more appropriate to use the mean if the distribution is symmetric, or normal. But wouldn't all real life distributions be skewed, technically? What's a good rule of thumb here? When should I say, skewness value of $\pm \, x$ so the median is more representative of the average salary?

I know that "deviations in the data are devil", and when the distribution is highly skewed, it is better to consider median as average rather than mean, but how to decide these hard-limits.  For example:   CASE 1:   Assume X = 10,20,30,40,50,60,70 In this case, I think that it is better to use mean and that it will give very accurate results.  CASE 2:   Assume X = 10,20,30,40,50,60,70,7000 In this case, I think that it is better to use median instead of using the mean.  CASE 3:    Assume X = 10,20,30,400,500,600,700 In this case, I think it is better to use IQR (Inter Quartile Range)    But I'm stuck with how to decide these hard-limits i.e. which to use in which condition, in general.   I've found a tool working on subjected principle, which takes context-less sample-distribution as input and determines whether mean is close/moderate or against the null-hypothesis.  Find References:-     (For Mean Test)  (For Median Test)   What I'm really looking is a good answer which states how to derive these conclusions.


When using cascade encryption, can you actully decrease the security, for example if you do something wrong, or is it only depend on which algorithm or mode of encryption you use?

As was pointed out in  I cannot prove this, but it seems intuitively impossible.  An encryption function is supposed to obscure the plaintext to the point where no information can be obtained about it. If the underlying encryption algorithm can even be determined, that goal has not been achieved.  Is this correct? Can double-encrypting (with either the same or separate algorithms) weaken security?


I'm trying to make a place where nether mobs are friends but I don't know how to. How do I make a mob friendly? (I'm making the map in Creative mode.)

Ok, I want my character to either be ignored by zombies or unable to die (invincible). I've tried:   Adding a health scoreboard but this is uneditable  A repeating command block that gives the player instant health   effect give @a[scores={ifBeast=1..}] minecraft:instant_health 1 10  Making the player invisible (If you get close to the zombies they chase you)   None of the above work. The option that I would prefer is for the Zombies to completely ignore the player, but if I must resort to them being invincible to zombies while still getting hit (irritating) then I will accept that.


I want to know how I can get transit visa to Brazil because am going to Guyana soon... I am in Nigeria and I also want to know what requirements I need to put in place to get the transit visa from Nigeria to Brazil.

Do I need a transit visa in Brazil on the way to Ecuador. I am a Nigerian national.   I am travelling to ecuador and I was asked to get a Brazilian transit visa as I am to board another airline from Sao Paulo.


My wife and I are debating the correct ending of a sentence that ends with, "... I did not return to school as I had intended" in a (college level) school paper that is being written.  One of us thinks the sentence should end, "..as I had intended to," the other is violently opposed to ending the sentence with the word "to."  What says the community?

Which of these is grammatically correct?   As educators, we are always looking for ways to reach all the learners in our classroom as effectively as we are able.   As educators, we are always looking for ways to reach all the learners in our classroom as effectively as we are able to.


I want quick function which may be part of my xml parser, I do not want to parse whole string and check if it correct xml.

The list of valid XML characters is well known, as defined by the spec it's:  #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]   My question is whether or not it's possible to make a PCRE regular expression for this (or its inverse) without actually hard-coding the codepoints, by using Unicode general categories. An inverse might be something like [\p{Cc}\p{Cs}\p{Cn}], except that improperly covers linefeeds and tabs and misses some other invalid characters.


I am having problems with my Wi-Fi connection. I just installed Ubuntu 18.04 on my Asus TP500LA, and in the Wi-Fi setting it says "No Wi-Fi Adapter Found"  Can someone please help me figure out this Wi-Fi dilemma. Thank You in advance!  Output of lspci -knn | grep Net -A3:  03:00.0 Network controller [0280]: MEDIATEK Corp. MT7630e 802.11bgn Wireless Network Adapter [14c3:7630]     Subsystem: Foxconn International, Inc. MT7630e 802.11bgn Wireless Network Adapter [105b:e074]

It worked with the pre-installed Ubuntu, but after re-installing Ubuntu dual-boot with Windows 8.1, the WiFi is not working.  Is there a driver for this adapter that will work on Ubuntu 12.04?


Please help me to prove the following result:  I recall that the holomorph $Hol(\Gamma)$ of a group $\Gamma$ is the semidirect product $Hol(\Gamma)=\Gamma\ltimes_{\phi} Aut(\Gamma)$ where $\phi: Aut(\Gamma)\to  Aut(\Gamma)$ is the identity map.  Let $G=Hol(C_8)$. In addition let $f(x)\in \mathbb{Q}[x]$ be an irreducible polynomial of degree $8$, $L$ a splitting field of $f(x)$ over $\mathbb{Q}$ and suppose that $Gal(L/\mathbb{Q})\cong G$     Show that there is a subgroup of $S_8$ isomorphic to $G$   Thanks in advance.

Would you please help me to prove this problem.  Let $G=\mathrm{Hol}(C_8)$. And let $f(x)\in \mathbb{Q}[x]$ be an irreducible polynomial of degree $8$, $L$ a splitting field of $f(x)$ over $\mathbb{Q}$ and suppose that $\mathrm{Gal}(L/\mathbb{Q})\cong G$.     Show that there is a subgroup of $S_8$ isomorphic to $G$.   I am reviewing for my test and i find this good exercice    Thanks.


I use bash and have been using Latin1 encoding my whole life, since I've always had problems when trying to migrate to the advised UTF-8. I finally gave up, and I am migrating everything to UTF-8. What a pain... I have a specific problem when doing SSH with all rxvt, urxvt and xterm. My remote prompt is set as:  PS1="\033[32m\[\h:\W> \]\033[0m"  This shows a nice green thing like  MyBox:~>   After migrating to utf-8 (all lang and locales from en_US to en_US.UTF-8), my UP, DOWN arrows (back/forward history), DEL and BS don't get track of the position in the line (destroying the prompt, deleting the wrong letters, etc). A mess. Example: Orion:~> ssh me@MyBox.mydomain... Last login: Sat Oct  3 13:47:42 2020 from NNN.NNN.NNN.NNN MyBox:~> ls amp/  ap/  bin/  phantomjs/  varios/ MyBox:~>   After hitting UP several times to go backwards in history, it reads: MyBox:~vi .basrc  instead of MyBox:~> vi .basrc  so some characters vanished. This makes a mess to edit a command line, for example. I tried fiddling with the ~/.inputrc file in the remote SSH machine without luck. It seems the shortcuts are correct. Any ideas?

I have an issue with my terminal prompt line. When the line is too long it wraps on the same line and then Up arrow makes it look even worse.   I have already checked , but it looks like I am apparently closing all the squared brackets for non printable characters.  This is my PS1:   \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot) }\[\033[01;36m\]\u@\h\[\033[00m\]\033[01;34m\]\w\033[00m\][$(type __git_ps1 >/dev/null 2>&1 && __git_ps1 "(%s)")]   Consider this as my standard prompt line   MELISC@work~/dev/bin_tools[((main))]   I was able to get  assdasdasdasdasdadasdsadadasdaddasdadadasdadsadasdsa((main))] asdsadsadsadsadasdasdassdasdasdassdasdassdasdasdasdasdasdasdsadsad   I have already checked my .bashrc  I have and shopt -s checkwinsize should autocheck the columns


I have had a question in mind for a long time:   Imagine that I posted a good answer to a question. Is it okay for the OP to up-vote all of my posts (answers and questions) without my knowledge? I know that the OP can accept my answer and up-vote it, but is it legitimate for the OP to up-vote all of my posts?  For example, if I had 200 questions and 100 answers, the OP up-voting all of my posts would result in a high reputation gain, like 1000 rep at the one time. What should I do about it?  Can I up-vote all of a user´s posts without knowing him? Will I or the OP get banned? Will all of the reputation be taken away?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I have an excel sheet (mac, Excel 2011) that contains names (1st row), job titles (2nd row), and company/institution (3rd row) in one big column. I am trying to separate them into three different columns. I've tried all the macros i could find. Please help.   So instead of reading like this, as it does now:  Joe Joe SomeJob MyCompany   It would read   JoeJoe    |   SomeJob   |  MyCompany

Can I reference a cell in another worksheet like this?  Example:   Worksheet A A1 Data1 A2  A3 Data2 A4  A5 Data3   Worksheet B (I want to copy by referencing the cells in Worksheet A)     B1 'Worksheet A'!A1    B2 'Worksheet A'!(A1+2) ~ meaning I want to copy cell 'Worksheet A'!A3    B3 'Worksheet A'!(A3+2) ~ meaning I want to copy cell 'Worksheet A'!A5 ... Note that A3 in this formula comes from the formula in B2 by skipping one row in Worksheet A.    B4 'Worksheet A'!(A5+2)   The reason for this is so that I can skip the A2 and A4 cells and be able to drag the formula in Worksheet B to extend it without the need to point manually each cell that I want to copy from Worksheet A.


If $K<H\triangleleft G$, does it follow that $K\triangleleft G$? All help is appreciated.

Suppose $G$ is a group and $K\lhd H\lhd G$ are normal subgroups of $G$. Is $K$ a normal subgroup of $G$, i.e. $K\lhd G$? If not, what extra conditions on $G$ or $H$ make this possible?  Applying the definitions, we know $\{ghg^{-1}\mid h\in H\}=H$ and $\{hkh^{-1}\mid k\in K\}=K$, and want $\{gkg^{-1}\mid k\in K\}=K$. Clearly, the best avenue for a counterexample is if $gkg^{-1}\not\in K$ for some $k\in K$ and $g\in G-H$.  If no such element exists, $\{gkg^{-1}\mid k\in K\}\subseteq K$ implies $\{gkg^{-1}\mid k\in K\}=K$ because if $k'\in K$, $gk'g^{-1}=k\in K\Rightarrow k'=g^{-1}kg\in\{gkg^{-1}\mid k\in K\}$.


Encountered this word for the first and only time at an Anglican church, from a rector.  I suspect that it is a word from Christian liturgy.  I had pointed out that two of the beliefs he had been promoting were completely contradictory - i.e. if one held one of them it was not possible to hold the other at the same time.  He took this in stride, smiled easily, and used the word I am looking for.  In reply to the replies below:  Thanks all for the input.  "Antinomy", from philosophy, might be close, and "koan" might be another word for what the rector was describing!  Uh oh ... I'll admit that I am now wondering whether memory serves me well enough to recognize the word when I see it!  Could antinomy be it?  Koan is too short.  I'm guessing that the best bet for a definitive answer will come from a student of this level and form of Christianity.  (Anyone care to call up their well-schooled rector?  Orthodox Anglican as mentioned below.)  To answer questions posed to me here:  Unfortunately I do not recall the beliefs promoted.  It was in Canada and, when pressed, the rector - who did have a high-level affiliation with the Church of England - said that this flavour of Anglican would be "orthodox".  More as of April 13 2017:  I don't understand how this board works.  Seems 5 users have claimed that my question is a duplicate.  I am asked to explain why this is not the case.  But I don't see where those 5 users have provided the "duplicate" question and answers ...  Also, there is a 2nd claim that this question has already been asked and answered - which includes a question which is clearly not the same as mine ...  Anyway, I've seen evidence neither of my question having been asked before nor its answer (though koan and antinomy are closest and on the right track).  Thanks.

I think some good words would be conflicted, or confused. As an example of context, think of someone who believes in freedom of speech, but, at the same time, they would support banning comedians who make jokes about certain issues that person cares about.


What is the correct or most acceptable way to refer to the main character of Doctor Who?   The Doctor Dr. Who Doctor Who Doctor The Dr.   I was searching and couldn't find any explanation on how I should say it!   I remember seeing something like, the name changed depending on the incarnation — the presentation of the name of the actor in the episode changed the nomenclature of the Doctor. If I'm not wrong, William Hartnell was called "The Doctor" while Baker was "Doctor Who".

I recently decided to watch Doctor Who, and started viewing the 2005 version. I have the first two episodes from the first season, and I can't help but wonder what is the etymology of the name "Doctor Who"? And why does the protagonist call himself "the Doctor" (or is it "the doctor")?


I have a drupal multi-site project, that I've inherited. I am stuck on the process of trying to clone or import the database from a live server to the local enviroment. Does anyone have any suggestions as to how I might be able to do this?  It would have to be done via the command line, as the I don't have access to phpmyadmin from the live server. I know this can be done, with a series of commands and scripts -- I'm just not sure how...

I'd like to copy my live site so I can run it on localhost and test some modules before installing them on the livesite.  Is there a step-by-step way to do this? I have access to PHPyAdmin, so I can easily export the database. I know there's more to it than just exporting, thought.


I already have schengen type D visa for Poland for one year expiring in November 2018. However, due to change in circumstances, I have not travelled to Poland and like to visit Italy for one week for holidays in April 2018. Is it possible to apply for overlapping type C visa for Italy even though I have type D visa?

Is it possible to have Schengen Type C and Type D visas at the same time? What if I have a Type D visa and due to change in circumstances, I would like to visit the country as a tourist only?


I am having quite an ununderstable problem here.  I want my x value to get from 0.0 to 1.0, increasing by 0.05.   It seems like a quite eazy thing to do. However, at the end of my loop when evaluating x <= L ( with x = 1.0 and L = 1.0) I get a 0 value.  I also tried hard writing L, It does not change the behaviour.  std::ofstream& operator<<(std::ofstream& ofs, Solver& s) {  double x = 0.0; double L = 1.0; while( x <= L){     //Do stuff related to my project      x += 0.05; } std::cout << "x= : " << x << std::endl;// 1 std::cout << "L= : " << L << std::endl;// 1 std::cout << "(x <= L)= : " << (x <= L) << std::endl;// 0 std::cout << "(1 <= L)= : "<< (1 <= L) << std::endl;//1 std::cout << "(1.0 <= L)= : "<< (1.0 <= L) << std::endl;//1 std::cout << "(x <= 1)= : "<< (x <= 1) << std::endl;//0 std::cout << "(x <= 1.0) : "<< (x <= 1.0) << std::endl;//0 std::cout << "(1.0 <= 1)= : "<< (1.0 <= 1) << std::endl;//1  } return ofs; }   At the end of the code you can see some printing test that I have performed.   Normally all of those test results should be 1.  Does anyone has an idea of how and why the test doesn't pass ?

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


I used to hear people say "how are you doing?" in the meaning of "how do you feel" (and that's why people used to answer "very good" or something like it. As a non native English speaker it's difficult for me to understand it and it always interests me to know what is the relation between "doing" to the meaning of feeling.   Editing:  I checked the question that was said to be duplicate, and I didn't find any similarity to my question. I am asking about the relation of the noun "doing" to the meaning of "feel". No relation between them for my opinion.

When I was in New York the workers at the counter (in a shop) always said      Hi, how are you doing?   I was, and still am very confused if they just mean "hello", or actually want to know how I feel.  Could someone please tell me if this is just an empty phrase or if the speaker is genuinely interested.


Earlier this year I had to pin my kernel because an update came down the pipe that broke WINE compatibility with Win16 apps.  I followed the directions here:   It appears as though the issue has been fixed because tests have shown that Win16 applications once again work with later kernel builds.  I've removed the changes I made, but the kernel is still not updating.  What am I missing?

I am running Ubuntu 12.04.1 LTS i686 on VirtulBox. Every time I check the updates, there's a new Linux kernel. If I install the new kernel, I have to install the Virtulbox Guest Additions again and reboot the server. I don't want to do this every week. I know I can manually uncheck the kernel packages from update manager, but is there a way to skip the kernel update automatically? I found an answer here, but it's for Ubuntu 10. Thanks.


If I click with the middle mouse button on Chrome in the taskbar, it opens a new window. That's the first part of what I want (a new window with its own set of tabs), but the caching is the same as the other window.  Is there any way to open multiple instances of Chrome that don't share caching or cookies? I can do this through Incognito mode but that has various limitations that make it unacceptable.  Why would I want to do this? Different sets of accounts for different activities (eg: business1, business2, personal etc). I don't want to use profiles either, rather I'd prefer it be possible to open multiple instances of Chrome that are separate from one another entirely.  Any ideas?

I use Chrome as my main browser.  I also spend a lot of time on a particular webapp that my company uses.  I'd like to keep those two things separate.  I can run the webapp in a separate window - but I'd like to go further than that.  I'd like to have it be identified by a different task in the Win 7 taskbar; ideally a different icon; and ideally a different title in Process Monitor.  How can I run a second, independent instance of Chrome, with a different title and icon, that won't merge with my main Chrome browser.


Proving that a given numbers is divisible by an other number is often simple but when it comes to big numbers i don’t know how to deal with them.  Prove that $97 \mid 2^{48}-1$.  My Attempt: $$2^{12} \equiv 22 \mod 97 \iff (2^{12})^{4} \equiv 22^4\equiv1 \mod 97$$ $$\iff 2^{48} \equiv 1 \mod 97 \iff 97 \mid 2^{48}-1 $$ It seems short but the problem here is that $2^{48} \equiv 1 \mod 97$ Should be proven, but i’ve just used a calculator to prove it, So is there a better method to prove thi type of problem.

I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:   $13^{100} \bmod 7$ $7^{100} \bmod 13$   I've also heard of this formula:  $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$  But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)  Any hints or pointers in the right direction would be great.


There are G girl students and B boy students in a class that is about to graduate. You need to arrange them in a single row for the graduation. To give a better impression of diversity, you want to avoid having too many girls or too many boys seating consecutively. You decided to arrange the students in order to minimize the gender regularity. The gender regularity of an arrangement is the maximum number of students of the same gender (all girls or all boys) that appear consecutively. Given G and B, calculate the minimum gender regularity among all possible arrangements.  can someone give me the intuitive approach of solving this problem by using pigeon hole principle?  Link to problem

Let us consider that there are G girl students and B boy students in a class, we need to arrange them in a single row, but arrangement of students should be in order to minimize the gender regularity*. Find the minimum gender regularity among all possible arrangements.  *The gender regularity of an arrangement is the maximum number of students of the same gender (all girls or all boys) that appear consecutively.


I looked through -   but can't update that as i'm a newbie here.  tried a "take ownership" script i've added to the context menu which has worked in the past, no change.   tried unlocker and normally when that fails, 10Bit unlocker with forced mode delete works.  not this time though.  process explorer says the thumbs.db file (only file in this folder tree) is in use by system.  i've been able to take ownership via security tab in the past but this time around it's really weird.    under security on file properties it just says "you must have read permissions etc". had it before and no worries. go into advanced and on the permissions, auditing and effective access tabs i have the "continue" option but on clicking i just straight to the "permissions/effective access" tabs and both just say:  you do not have permission to view or edit ........  under owner i just see "unable to display current owner", click change and get the above message again.  at 1 point it did say i needed permission from, well me.  my username which i am signed in as.  normally i'd get the delete prompt on screen, force a chkdsk to kill off handles and hit delete as soon as it's done but i'm 3 days in to a 7 day video encode and don't want to waste that time.  i hate windows sometimes.  help?  --EDIT  thanks but the fix i saw on the other thread was to  disable "display file icons on thumbnails" in folder's view.  i never had this enabled though.  choosing to always show icons instead of thumbs worked but i then had to disable this as i want thumbnails, just no thumbs.db created.

I often have problem to delete a folder that contains a thumbs.db file. Also tools like  fail. It seems to be loccked by os for some unknown reason. The only solution i found in the net was to disabling thumbnails in windows but this is a bad workaround isn't it?  Is there a "normal"(or official, supported by MS) way to delete an empty folder that only contains a thumbs.db?


While  I was studying thermodynamics I am confused about internal energy of universe.   here a question confused me. "If the internal energy of the universe is constant then where did all energy come from originally?" I would like to thank the person who explained it to me thanks for your help!!!

The simplistic undergrad explanation aside, I've never really understood what energy really is. I've been told that it's something when converted from one kind of something to another kind, or does some "work", as defined by us, but what is that something?  Moreover, if the total amount of energy in the universe is finite and we cannot create energy. Then, where did it come from? I've learned from thermodynamics where it goes, but where does it come from?  I know this sounds like something trivially simple, but there is so much going on in the physical universe and I just can't grasp what it is. Maybe it is because I lack the mathematical understanding that I can't grasp the subtle things the universe is doing. Still, I want to understand what it is doing.  How do I get to the point of understanding what it's doing?  (Note: What prompted me to ask this was . I'm afraid that it just puzzled me further and I sat there staring at the screen for a good 10 minutes.)


While going through the source code, I noticed the following syntax being used in the asyncio library:  @coroutine def sleep(delay, result=None, *, loop=None):     """Coroutine that completes after a given time (in seconds)."""     if delay == 0:         yield         return result      if loop is None:         loop = events.get_event_loop()     future = loop.create_future()     h = future._loop.call_later(delay,                                 futures._set_result_unless_cancelled,                                 future, result)     try:         return (yield from future)     finally:         h.cancel()   what does the * do in the argument list?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I'm really an electrical noob who tries to understand voltage, current and resistance. I know the formulas and can somehow come up with basic explanations about the physics of electricity. However, what I really don't get is the different effect of current and voltage in a circuit.  From what I understand is that power is voltage times current. I'd like to know some physical properties of a high voltage based power in comparison to a high current based power. So far I only know that high voltage power can be transmitted with much less losses. But what are other physical effects of the two types of power? How does a resistor react on high current vs. high power? I don't understand why 1000v with 1amp has a different effect on resistors than 1v with 1000amp. Maybe someone can provide me with some examples to understand the difference a bit better?  Thanks!

OK, very basic question here.  I read lots of books, searched quite a bit, and every description I read seemed to talk about the flow of electrons and right away go too deep in theory for me to grasp the basic principle of their use.  I understand a resistor limits the "flow", so that an LED doesn't blow up for example. But I fail to understand exactly what a resistor does to current and voltage...  Do resistors affect both current and voltage? In what manner?


After reading tons of articles and StackOverflow responses I still don't get what is the industry standard approach for dealing with user's inputs (textarea and input type="text"). What and how should I escape chars? What and how should be stripped / replaced so JSON will not break, especially when the user can copy-paste some of the weirdest characters ever?  The doubtful solution that I have put in place a long time ago was:  String.prototype.escapeChars = function () {  return this.replace(/\&/g, '&#x26;') .replace(/\n\r?/g, '&#13;') .replace(/\n/g, '&#13;') .replace(/\r/g, '&#13;') .replace(/\s/g, '&#32;') .replace(/\</g, '&#x3c;') .replace(/\"/g, '&#34;') .replace(/\'/g, '&#39;') .replace(/\>/g, '&#x3e;') .replace(/\\/g, '&#x27;') .replace(/[^\x00-\x7F]/g, ''); };   I would tremendously appreciate if someone will explain in detail or point to a good tutorial on how it should be done PROPERLY with vanilla js.

I need to display external resources loaded via cross domain requests and make sure to only display "safe" content.   Could use Prototype's  to remove script blocks. But handlers such as onclick or onerror are still there.  Is there any library which can at least   strip script blocks, kill DOM handlers, remove black listed tags (eg: embed or object).   So are any JavaScript related links and examples out there?


Is there any way to copy all .text and exe files in folder?  like,  cp *.[exe|txt] c:\temp

I want to copy all files of a certain type (like .docx, .pdf, etc) on my PC into a folder. How can I do that?