I am using ArcMap One-way replication tool to synchronize feature classes from Oracle to MS SQL Server (once a day), but replication only works for the versioned data with move edits to base option as unchecked and only edits or changes from that specific version are synchronized in MSSQL server.   The version of the feature class (Oracle's) in ArcMap is different from the base tables (the one that is shown in Oracle SQL developer), how can I make sure that the data in base table and the one that is shown in ArcMap are same? How can I make sure the edits or changes that are made in either of the version are reflected to the other? How to make ArcMap aware of the changes that are made in base table?

I want to synchronize some datasets and feature classes from Oracle to MS SQL Server using ArcMap replication tools. Both databases are geodatabase enabled. I don't want to replicate/synchronize data in real time but once a day.  I have created one-way replica(parent to child) and it works fine for only the changes that are made from ArcMap, but when I make changes in the table/feature class from Oracle (SQL Developer) i.e updating the attributes of a record, those changes are not synchronized. How can I synchronize all the changes either made from ArcMap or from SQL Developer?


I'm connected to serverA with SSH. I have one identity file on my local computer, which I use to authenticate to serverA, and one identity file on serverA which I use when I'm at that computer physically. I have ForwardAgent yes in my local ssh config file.  Now, from serverA, I'm trying to open another ssh session to serverB. However, SSH will then try to use the identity file on serverA to connect to serverB, but I would like to use the identity file on my local computer (forwarded using ForwardAgent).  How can I tell SSH on serverA to use the keys forwarded, instead of the keys on serverA, when I am connected to serverA through SSH?  Answer: The problem, it turned out, was that my local computer was running macOS, which does not add keys to the agent by default. Therefore, no keys were forwarded to serverA. After adding AddKeysToAgent yes as well as ForwardAgent yes to my local config, ssh on the remote linux machine uses the forwarded key instead of the remote key by default. So no changes had to be made to the remote machine.

Is it possible to specify forwarded keys using the IdentityFile directive in .ssh/config?    I ran into this quirk when trying to deploy some code via Capistrano/GIT on our production server. Both my personal and my work GIT keys are always loaded in my SSH agent and it just so happened that my personal key was added to the agent first. I use agent forwarding when deploying with Capistrano so when the host tried to authenticate the `git pull` operation it failed with the following error:  ERROR: Permission to `some repo` denied to `your user`.  because it attempted to authenticate using my personal git key before trying the appropriate key (which came later in the ssh agent) and assumed that I was accessing a foreign repo which I don't have permission to access. I can potentially just give my personal user access to every work repo but on my local machine I can get around this problem by defining custom domains in .ssh/config like so:  Host personal.github.com   Hostname github.com   User git   IdentityFile ~/.ssh/some_key  Host work.github.com   Hostname github.com   User git   IdentityFile ~/.ssh/some_other_key  and this way git never gets confused. Is it possible to create .ssh/config rules for forwarded keys on my production boxes so they always know which key to use when pulling in new code? Basically I want to be able to do:  Host work.github.com   Hostname github.com   User git   IdentityFile some_forwarded_key  Thanks!


Since myObj is not a part of the checkObj function, how can checkProp contain myObj's properties/values when you call myObj[checkProp]? I'm new to learning JS and this is going a bit over my head.  var myObj = {   gift: "pony",   pet: "kitten",   bed: "sleigh" };  function checkObj(checkProp) {   if(myObj.hasOwnProperty(checkProp)) {      return myObj[checkProp];    } else {     return "Not Found";   }  }  checkObj("gift");

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


hi all, I'm trying to horizontal align the following 2 font awesome icons with an image contained in an  tag. Currently it looks like this;  I've tried adding a span tag and changing the size of both the icons and the image to align them.

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

testing...


Problem is:     Produce elements a and b in the domain $R := \{x+2y\sqrt{-1} \mid x, y \in \mathbb{Z}\}$ having no gcd.   How can produce this? Actually I use norm function, and brute force, but what I found is that, except in case of y = 4, so many values of norm function are prime. So I can't handle it. Do you have any idea?

Find two elements in the domain $R := \{ x + 2y \sqrt {-1} \mid x,y \in \mathbb{Z} \}$ that do not have a gcd.     I have no idea how to start. But I know if we consider $R^\prime = \{ x + y \sqrt {-1} \mid x,y \in \mathbb{Z} \}$ then every two elements have a gcd. So there must be something wrong with the 2 here.  Any help is appreciated.


I want to create a .htaccess that does the following things:   Routes all files through to /index.php Forces use of SSL Doesnt allow robots to load individual PHP files.  For instance, if a robot wants to load /pages/folder/file.php  It won't allow it.  I'm constantly getting error files because robots load those pages and the database variable isnt set or something.  However I need my website's javascript to be able to access it.     So far I've for the first two down, (I think):          #Redirect all quries to SSL port 443         RewriteCond %{SERVER_PORT} !^443$         RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]          # Don't allow www, redirect to https://         RewriteEngine On         RewriteBase /         RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]         RewriteRule ^(.*)$ https://%1/$1 [R=301,L]          # Route everything via index.php         RewriteBase /         RewriteRule ^index\.php$ - [L]          RewriteCond %{REQUEST_FILENAME} !-f         RewriteCond %{REQUEST_FILENAME} !-d         RewriteRule . /index.php [L]   Is this correct? Is it in the right order? How can I achieve point three?

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I am testing a bit of code in main() and for some reason I am getting "7" instead of "7 8". This is a very basic implementation of a Binary Search Tree, and I can't figure out what the problem is.  public class BSTNode{ public static void main(String [] args) {     BSTNode root = new BSTNode(7);     BSTNode.insert(root, 8);     BSTNode.print(root); }  public Integer val; public BSTNode left = null; public BSTNode right = null;  public BSTNode(Integer val) {     this.val = val; }  public static void print(BSTNode root){     if(root == null) return;     print(root.left);     System.out.print(root.val + " ");     print(root.right); }  public static void insert(BSTNode root, Integer val){     if(root == null) root = new BSTNode(val);     else {         if(val <= root.val) insert(root.left, val);         else insert(root.right, val);     } }   }

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


Does increasing the tension on a string also increase the wave speed

Consider a string under tension, for example, a string on a guitar. When a guitar string is plucked, it vibrates at a certain frequency. When the tension on the string is increased by twisting the tuning peg at the end of the neck, the frequency of the string increases. According to , increasing the tension on a string also increases the speed of the wave moving through it. According to  the speed of a wave is higher in a more dense medium.  Does this mean that increasing the tension also increases the density?  This does not seem very logical to me, since density is the "compactness" of a substance, or how close together the individual molecules are. By twisting the tuning peg on a guitar, you rotate the cylinder that the string is fixed to, wrapping it around more tightly. This pulls more of the string around that cylinder, similarly to when you reel in a fishing rod. Since more of the string's molecules are now wrapped around the peg, there should be fewer molecules over the same distance between the bridge and the nut (the two ends of the vibrating portion of the string), therefore bringing the density down.


I am having a lot of trouble debugging issues with a custom implementation of a UserStore that I've created to use Microsoft.AspNet.Identity without Entity Framework. Specifically, I am running into two issues:   Since the Identity framework provides a default implementation for many things, and the implementation is hidden, I don't know the steps it takes to do things like UserManager.CreateIdentityAsync or AddClaimAsync Since the Identity framework makes use of the async modifier (and I am admittedly not very comfortable/familiar with this yet) this complicates things as I have encountered several instances in which a default implementation failed or returned null. In these cases I had to guess where things might be going wrong   Forgive me if this is a dumb question and/or if it has already been answered but I did not know how to word it appropriately (to find an existing answer)...  I am wondering if there are tools or debugger options that would allow me to step through the interfaces of the Identity framework classes so that I can at least find out how "far" a particular method call got in the process.

I have a project(A) that references an assembly from an external project(B) class library that is located in another vs solution.   I have yet to understand how i can efficiently debug the class library from B while running the program from project A. Is there something i have to enable on project B such as debug info etc so i can step-into at debug time from A?  Thanks in advance.


When I tried to install StarMade from  it told me The file '/home/gabriel/Downloads/StarMade-Starter (1).jar' is not marked as executable.  If this was downloaded or copied from an untrusted source, it may be dangerous to run.  For more details, read about the executable  any answers for me???

I'm out with a new problem. I've downloaded a jdk7.sh file. Now I'm unable to change the permission of the file to allow executing the file as a program. I mark the check box and again it disappears.


In a standard physics course we usually learn that quantization of a system is ambiguous if momentum and position happen to be multiplied in the classical Hamiltonian (i.e. the classical Hamiltonian contains a term like $xp$). This ambiguity of quantization seemed more like of an academic interest to me, until I tried to quantize this simple classical system. Suppose we want to model the oscillations of an electron bubble in a system of . If an alkali metal atom, for instance sodium, is thrown into liquid ammonia (NH$^3$), the ammonia dissolves the metal atom it into Na$^+$ ion and $e^-$ ion (see a video of dissolution ). The $e^-$ ion is formed by ammonia turning with more positively charged hydrogen towards electron, forming a cavity of the radius $R\approx 0.32$ nm around the electron.  The electron occupies the lowest energy level inside the cavity. I would like to model radial quantum oscillation of the bubble within adiabatic approximation, where the energy of the electron is added to the effective potential energy of the bubble (the static bubble model was developed by Cohen and Thompson in ; for a free access review paper see ). From a classical picture, everything is more or less clear. The potential energy of the bubble is assumed to consist of the polarization energy, electron energy and energy of surface tension, and it is a function of the radius of the bubble. The kinetic energy of the bubble is assumed to consist only of the kinetic energy of the liquid around the bubble. The liquid is assumed to be continuous and incompressible, and the bubble is assumed perfectly spherical. Classical Lagrangian looks like this: $$ L(R,\dot{R})=K-\Pi=4\pi \rho R\frac{\dot{R}^2}{2}-\Pi(R).\tag{1} $$ The corresponding classical Hamiltonian looks like this: $$ H=\frac{1}{4\pi\rho R}\frac{p^2}{2}+\Pi(R).\tag{2} $$ Now, I know I cannot quantize the system naively by substituting $p\rightarrow \hat{p}$ and $R\rightarrow \hat{R}$ into the Hamiltonian, because the kinetic energy contains the product $R$ and $p$, which do not commute. Is there any good way of quantizing such system? What do people usually do, if they find that kinetic energy of the classical Hamiltonian depends on the position?

Suppose we have a particle of mass $m$ confined to the surface of a sphere of radius $R$. The classical Lagrangian of the system is   $$L = \frac{1}{2}mR^2 \dot{\theta}^2 + \frac{1}{2}m R^2 \sin^2 \theta \dot{\phi}^2 $$   The canonical momenta are  $$P_\theta = \frac{\partial L }{\partial \dot{\theta }} = m R^2 \dot{\theta }$$ and $$P_\phi = \frac{\partial L }{\partial \dot{\phi }} = m R^2 \sin^2 \theta \dot{\phi }$$  The Hamiltonian is   $$H = \frac{P_\theta^2}{2 m R^2} + \frac{P_\phi^2}{2 m R^2 \sin^2\theta }$$  Now start to quantize the system. We replace $P_\theta $ and $P_\phi $ as $-i\hbar \frac{\partial}{\partial \theta}$ and $-i\hbar \frac{\partial}{\partial \phi} $, respectiely, to obtain   $$H = -\frac{ \hbar^2 \partial^2}{2 m R^2 \partial \theta^2} - \frac{\hbar^2 \partial^2 }{2 m R^2 \sin^2\theta \partial \phi^2 } $$   This is apparently wrong, it should be the total angular momentum!   So what is the right procedure to quantize a system, especially a system in curvilinear coordinates?


I try to install nordvpn on ubuntu 20.04 but it keeps showing me something like this luzw@PL005029:~$ sudo apt install nordvpn [sudo] password for luzw:  Reading package lists... Done Building dependency tree        Reading state information... Done The following NEW packages will be installed   nordvpn 0 to upgrade, 1 to newly install, 0 to remove and 71 not to upgrade. 6 not fully installed or removed. Need to get 0 B/13,8 MB of archives. After this operation, 42,6 MB of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up dash (0.5.10.2-6) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing package dash (--configure):  installed dash package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:  dash E: Sub-process /usr/bin/dpkg returned an error code (1) luzw@PL005029:~$   Does anyone know how to fix it?

I'm trying to install the flashybrid but when I enter the apt-get install flashybrid command, I get this error:  root@user-desktop:/home/user# apt-get install flashybrid Reading package lists... Done Building dependency tree Reading state information... Done flashybrid is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0B of additional disk space will be used. debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up flashybrid (0.15+nmu2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing flashybrid (--configure): subprocess post-installation script returned error exit status 1 Errors were encountered while processing: flashybrid E: Sub-process /usr/bin/dpkg returned an error code (1)   I also tried this one to find what is already using that file:  root@user-desktop:/home/user# lsof | grep /var/cache/debconf/config.dat lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs Output information may be incomplete. dpkg-prec 4672 root 4rW REG 8,6 39658 1697827 /var/cache/debconf/config.dat   But I don't know how to fix this.


After upgrading to Ubuntu 16.04 from Ubuntu 14.04 it said my graphics card would run in software mode versus hardware mode. It's running loud and my screen resolution isn't 1080p when my monitor is capable of it. I'm just learning linux and could use some help. this is my system ati radeon 5770 1gb intel phenom II x4 945 4gb ddr2 800mhz

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


E: The repository 'http://archive.ubuntu.com/ubuntu disco Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu disco-updates Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu disco-security Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   sources.list  deb http://archive.ubuntu.com/ubuntu disco main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu disco-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu disco-security main restricted universe multiverse

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Codingbat.com provides interactive coding exercises, and I'm using it to practice my Java. I do however want to understand where I went wrong with human aid here and there.   Which forum is most appropriate as I don't want to post off-topic?

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


We have a production SQL Server 2008r2 x64. 16GB RAM and this server is used by the application (hosted) and SQL Server.   The max memory setting = 6GB The min memory setting = 128MB.   There are ~25k users access this database server through the application. As the memory usage reaches to the max memory setting value, we will start facing timeout issues and users will not be able to login. Also, we see CPU usage by SQL Server is 100% when this happens.  Is there any way to control this buffer pool memory usage by SQL Server as SQL Server will not release this memory until the OS is in badly need of it. Currently, whenever such a situation occurs, we just restart SQL Server and let it release the memory to the OS. After restarting it works smoothly for few days and again it reaches to the max memory limit and start causing issues.  So how do all huge production environments using SQL Server manage this issue? As memory usage will rapidly be growing.

SQL Server is consuming 87.5 % of my server RAM. This recently caused a lot of performance bottlenecks such as slowness. I researched this issue. One common solution I could find on the internet is to set the maximum limit for SQL Server. This was done and much improvement is gained. I want to know why if the maximum memory value is not set why SQL Server keeps consuming the resources


I have 3 tables: Purchase Order     PO ID PO Requestor     PO123 John Snow   PO567 Heather     Purchase Order Line Item:     PO Line Item ID PO Line Item PO ID Ordered Quantity     1234 Bike PO123 3   1235 Laptop PO567 2   1236 BMW PO123 1     And Receipt:     Receipt Line ID PO Line Item ID Received Quantity Received Date     R123 1234 1 01-Dec-20   R567 1236 1 15-Dec-20   R567 1234 2 15-Dec-20   R987 1235 2 20-Dec-20     I want to join 3 tables into 1 table as below, which is not a challenging task:     PO ID PO Line Item  No PO Line Item Name Ordered Quantity Receipt Line ID Received Quantity Received Date Requestor     PO123 1 Bike 3 R123 1 01-Dec-20 John Snow   PO123 1 Bike 3 R567 2 15-Dec-20 John Snow   PO123 2 BMW 1 R567 1 15-Dec-20 John Snow   PO567 1 Laptop 2 R987 2 20-Dec-20 Heather     In the final table, I want to add a new column: PO Line Item No. Basically, if the group PO ID is the same, it will assign an increment value for each PO Line Item ID/Name. And please note that because 1 PO Line Item can be broken into multiple receipt dates and lines, so the final table may contain multiple lines for the same PO Line Item. In that case, the PO Line Item No should show the same value for those records in the final table For example, PO123 has 2 PO Line Items: Bike (ID 1234) with quantity 3 and BMW (ID 1236) with quantity 1. On 1-Dec-2020, 1 Bike was received with receipt ID R123, and On 15-Dec-2020, Receipt ID R567 received BMW and other 2 bikes to complete the PO123. So in the final table, because bikes were received in 2 receipts, there are 2 records for Bike for PO123. the PO Line Item no should be the same for bikes Please help me to work on this column without using any windows functions. Thank you so much


I try update my android studio 2.2.3 to 2.3 on Linux 16.04. I click on check for update, update and restart. It starts to downloading patch file at the end of downloading it crashes android studio.   How I can update my android studio? Is there any chance by updating android studio through terminal?   SOLVED:  Just delete old version and install new one.

I am trying to update from version 2.0.0 to version 2.1.2 in Ubuntu 64bit/14.04LTS but when I click "update and restart" it says "Downloading patches" and it closes.   It does not start again and if I try to open it, the version is still 2.0.0.   Is there any tutorial to manually update android studio? (keep all settings and etc).


My daughter who is now 7 is still sucking her thumb.  It is a great embarrassment to her and she always talks about how it is her big secret from her friends.  We have tried the finger nail polish, bandaids, and specialized thumb covers, but eventually she overcomes them all because she can not sleep. Suggestions?

My 4-years-old daughter still sucks her thumb while sleeping.  How can help her stopping this habit?  I have tried to give her a pacifier, but she refuses it. She does not have this habit during the day and is also upset in the morning when she sees her nails are flaky and her thumb hurts.


i'm reading the C programming language, question 2-4 asks to write a function called squeeze to delete all char in s1 which is in s2, so i write the code, but it can't run at all.  here is my code  #include <stdio.h>  void squeeze(char s1[], char s2[]);  int main() {     squeeze("tabcdge", "abc"); }  void squeeze(char s1[], char s2[]) {     int i, j, k;      for (i = k = 0; s1[i] != '\0'; i++) {         for (j = 0; s2[j] != '\0' && s2[j] != s1[i]; j++)             ;         if (s2[j] == '\0')             s1[k++] = s1[i];     }     s1[k] = '\0';     for (i = 0; s1[i] != '\0'; i++)         printf("%c", s1[i]); }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


I wish to build a tricycle and one of the limiting factors is getting the front hubs. I search for tricycle hubs on eBay and get nothing useful. I need both the hub and axle or the axle dimension has to be a very common easily obtained bolt size. What would I search for?

What is the name of the hubs used on recumbent tadpole trikes. Those tricycles that have two front wheels and a conventional rear wheel


I was recently asked why the following results holds   \begin{align} 1 \times 8 + 1 &= 9 \\ 12 \times 8 + 2 & = 98 \\ 123 \times 8 + 3 & = 987 \\ 1234 \times 8 + 4 & = 9876 \\ 12345 \times 8 + 5 & = 98765 \\ 123456 \times 8 + 6 & = 987654 \\ 1234567 \times 8 + 7 & = 9876543 \\ 12345678 \times 8 + 8 & = 98765432 \\ 123456789 \times 8 + 9 & = 987654321. \\ \end{align}  I honestly had some trouble giving my friend an answer.  After filling a writing block with pencil equations, I found a hint in a number theory book for a similar result and used the fact that any number can be represented as $N = a_n10^n+a_{n-1}10^{n-1}+\ldots a_110 + a_0$ and playing around with the above equations, one can see algebraically why this holds.    From my notes, I see that I showed that   $$(10-2)(1 \cdot 10^{n-1} + 2 \cdot 10^{n-2} + \ldots + n \cdot 10^0) + n = $$ $$(10-1)10^{n-1} + (10-2)10^{n-2} + \ldots (10-n)10^0.$$.     This is not very satisfactory.  I know from number theory, that there is a result $10 \equiv 1 \pmod9$ and I have seen some interesting consequences of it.  Can this result be used to show why the 'pyramid' holds?  Something similar perhaps?

I came across the following:  $\begin{align} 1 \times 8 + 1 &= 9 \\ 12 \times 8 + 2 & = 98 \\ 123 \times 8 + 3 & = 987 \\ 1234 \times 8 + 4 & = 9876 \\ 12345 \times 8 + 5 & = 98765 \\ 123456 \times 8 + 6 & = 987654 \\ 1234567 \times 8 + 7 & = 9876543 \\ 12345678 \times 8 + 8 & = 98765432 \\ 123456789 \times 8 + 9 & = 987654321. \\ \end{align}$  I'm looking for an explanation for this pattern.  I suspect that there is some connection to the series $\frac{1}{(1 - x)^2} = 1 + 2x + 3x^2 + \cdots$.     asks the same question but has no answers posted.


I have this code which gives a result  double a = 128.73; double roundOff = Math.round(a*100)/100; System.out.println(roundOff); Result is :- 128.0   what I need that if the values after dot is greater than 5 i.e (6, 7, 8 or 9) then its should give result by adding 1 to the given value that has to be rounded off, i.e   128.54 should give result to 128.0 128.23 should give result to 128.0 128.73 should give result to 129.0 128.93 should give result to 129.0

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I've gone through tutorials and get the UV Mapping to work when testing on a simple block. However, when trying this on a bigger model, the UV Mapping won't display in the UV/Image_Editor. The Eiffel Tower model is all one mesh and I select Smart UV Project. Any suggestions.

I'm trying to unwrap a cube (I know, super complicated). I've got the seams marked, the UV editor open in a 2nd window, and all the geo highlighted. When I tell the cube to unwrap nothing happens. That's pretty much the long and short of the problem. Now I've been working off this one file for a couple weeks now, saving it off the original file and continuously cloning geometry. It's entirely possible I did something, pressed a button, something.   Any thoughts.


I need the most simple possible script to add a 3D object to a scene through the addon folder next to the init.py script. I know how to add custom icons and HDRIs to addon .zips, but I can`t find any resources on how to add a premade object to an addon. Any help appreciated.

How do I append a custom object from an external blender file using relative paths so I can pack the file with the addon? I can append the file easily with absolute path like this but I could fined how to do it with a relative path.   external blender file path ---> D:\blend_folder blender file name ---> external_blender_file.blend object name ---> object_2   This is using an absolute path:  # import bpy # bpy.ops.wm.append(filename="OBJECT_NAME", directory="/PATH/TO/BLENDFILE/NAME.blend\\Object\\")  import bpy bpy.ops.wm.append(filename="object_2", directory="D:/blend_folder/external_blender_file.blend\\Object\\")   How to make it work with a relative path?


I have the following problem:  Let $p$ be prime, $\alpha \in \mathbb{N}$ and $x \in \mathbb{Z}_{p^\alpha}$. What is the number of solutions to the equation $x^2 \equiv 1 \pmod{p^\alpha}$?  What I've got so far is $p^\alpha|(x - 1)(x + 1)$ but I don't know what to do next.

if $m$ is an integer greater than 2, and a primitive root modulo $m$ exists, prove that the only incongruent solutions of $x^2 \equiv 1 \mod m$ are $x \equiv \pm 1 \mod m$.  I know that if a primitive root mod $m$ exists, then $m = 1, 2, 4, p^m,$ or $2p^m$, where p is an odd prime and $m$ is a positive integer.  Obviously I can check the cases where $m = 1, 2, 4$ by hand but I am having trouble proving the other two cases.


What WotC 5e D&D content am I and am I not allowed to use in published 3rd-party content? Core books? Books like Xanathar's and Volo's? Unearthed Arcana? How do I avoid plagiarism, copyright infringement, etc?  Right now, I want to provide on my site/blog short campaign settings for dungeon masters to use as starting ideas for their games. If I create enough, I'm considering package them together in a PDF and sell them on something like DriveThruRPG.

I intend to write a D&D module and publish it under the OGL (I know 5e itself isn't OGL, see note below) for use with both D&D 5e and AD&D. I know there are areas where I can't draw directly (copyrighted worlds, spells, characters, etc.), but can I include more generic information drawn from the major core books? For example, in an encounter where the party fights Zombies, can I include the 5e zombie stats like HP, AC, attack types, etc.? Would I need permission from Wizards of the Coast to include specific information like this? Or, since it is a generic monster, am I free to use D&D stats from the Monster Manual or other books? Basically, if I have a party encounter a 'generic' monster like a Skeleton, can I include stats in the description of the encounter like so:  AD&D: AC 6, HP 4, damage: 1d6 or by weapons (or other data drawn directly from the AD&D Monster Manual) D&D 5e: AC 13, HP 13, damage vulnerabilities: bludgeoning, damage resistance (etc., etc., drawn directly from the 5e MM)  So, can I draw in the exact stats and damage info from the D&D manuals regardless of edition, without a license? If I keep it under 400 words, would this fall under the "fair use" clause of copyright?  Note: My understanding of the OGL is that it is not exclusive to the 3e ruleset. And while copyright law seems to indicate that the OGL isn't needed to publish add-ons at all, just about every publisher I've seen includes an OGL statement. And some publishers (such as Frog God Games) are making supplements for 5e while claiming use of the OGL. As I understand it, publishing my module under the OGL is independent of whether the edition of D&D I intend it to be used with is also published under the OGL.


Recently this notification has started showing up quite repeatedly on Stack Exchange sites:    The problem is that it's not necessary, and even if it is, it should not be showing up repeatedly.  In just the last few months, these sorts of notifications have really risen on the Internet (think of YouTube's new notifications in the lower-left hand corner), and they are very stressful to deal with for three reasons:   They add clutter to the site's UI. They are typically not necessary or relevant for the user. Users should not have to dismiss the same notification over and over again.   All of these issues apply here.  Can we please get rid of this notification, and can we please keep the site's UI clean?  A clean, non-spammy UI is one of the reasons Stack Exchange got to be as popular as it is.    EDIT:  As Mark Kirby pointed out in the comments, there was a very similar  to .  That answer and my own post are suggesting two fairly similar things, with one difference:  The one answer suggests making the dismissal of this notification sitewide, and I suggest getting rid of it altogether.  In fact, I suggest never having notifications for things like this in general.  Clean notifications for community activity and such are great, but messy notifications for UI features, news updates, and so on are basically just clutter and an irritant.  So there is some similarity between the two suggestions, but there's a little bit of difference as well.

We are happy to announce that the  follow question and answer feature is now live across the Network, including Stack Overflow, all Stack Exchange sites, and all Meta sites. (International Stack Overflow sites will have it turned on in a day or two once we have translations all set.) You can follow any question or answer (that you did not author) by clicking on the [follow] button that is shown in the menu immediately below the post (alongside the [share] button):    After you have followed a post, you will get inbox notifications for all new answers (in the case where you followed a question), comments, edits, and notices. You will not receive notifications for any action that you performed. As was mentioned in the earlier post, we are not making changes at this point to the notifications received by a post owner, or due to @mentions. The initial release had been planned to only include question following. Thanks to many folks who chipped in over the past few weeks, we are happy to release both question and answer following at the same time. These are available in both the regular and mobile views. We are still planning on two more related releases:  Follows profile tab and question listing filter: A tab for follows will be added to your user profile activity page. Each user will be able to view this tab that will provide a listing of followed questions and answers, with standard sorts, and the ability to unfollow from the listing. Users (with the exception of moderators and authorized staff) will not be able to see this information about other users (nor will it be made public in the API, SEDE, or data dumps). We will be renaming the Favorites feature to Bookmarks. As we mentioned in the preview post, the feature will be the same as Favorites, with the name and icon updated to more accurately represent user expectations and usage. And you will be able to both "bookmark" and "follow" a question.  We hope that this new feature will allow you to have better access to the content that you care about and want to keep tabs on. Update (June 11, 2020): The user profile tab and the rename of Favorites to Bookmarks have been released.


All too often I find myself cycling between two directories to perform different tasks. The directories don't always have an easy-to-use relative path between them. As a result it is quite cumbersome to have to specify a directory path that is essentially the previous working directory.  Is there a command by which I can easily return back to the previous working directory?

In terminal, how can I define a key to go to the previous directory which I was in when changing directory with the cd command?  For example, I'm in /opt/soft/bin and I cd into /etc/squid3 and I want to get back to the first directory.


I'm currently trying to install Ubuntu on my Flash Disk. I have been successful in installing and using rufus to put the OS on the Flash Disk. What I'm worried about is when installing Ubuntu, it asks me the installation type (erase disk and install ubuntu or something else). It says that it doesn't detect any other operating systems. Does that mean I can erase disk and install ubuntu without deleting everything on my PC (Windows 10)? I'm sorry if this question is bad, has been answered already, or doesn't have much details. Sorry and thanks in advanced! Edit 1: I'm installing Ubuntu 20.04.1 LTS Edit 2: Sorry for not mentioning this. I'm using a pc that has Windows 10 on it's hard disk. I'm currently trying to install ubuntu on a usb that's connected to said pc.

How will Ubuntu automatically allocate the disk partition sizes when we select Erase disk and install Ubuntu during installation?    Can the settings for automatic space allocation be changed?


I'm repeating material for test and I came across the example that I can not do. How to calculate this sum: $\displaystyle\sum_{k=0}^{n}{2n\choose 2k}$?


I want to flip over the values in my legend so that I have Low : 0 at the top, and High : 199998 at the bottom. I have manually edited the text in the table of contents, however this doesn't change the data values, they remain the same. I have gone to the symbology properties to try and edit the labels, but when I try to edit the  in  'labelling' it reverts back to the original value when I go to change the next value.

In ArcMap 10.1, we can render a raster in a colour ramp (stretched) symbology to draw a raster layer based on each pixel value. However, the legend for the layer by default starts from the max value (top, red) down to the min value (bottom, green).  How can I draw it like form min (top, green) to max (bottom, red) instead?  Tried Invert checkbox but it didn't help as it was the colour that was inverted.


If $\triangle$ is the diagonal of $X \times X$, show that its tangent space $T_{(x,x)}(\triangle)$ is the diagonal of $T_x(X) \times T_x(X).$ Is the following proof legit?    $T_{(x,x)} \Delta \subseteq \Delta \subseteq T_x X \times T_x X$   All tangent vectors at the point $(x,x)$ in $\Delta$ are described by velocity vectors of curves passing through $(x,x)$. Suppose $c(t)$ is a curve through $(x,x)$ such that $c(0) = (x,x)$, then the velocity vector is given by $c'(0)$. Any $c(t)$ that lies in the diagonal looks like $c(t) = (\gamma(t), \gamma(t))$, where $\gamma(t)$ is a curve in $X$ through the point $x$ i.e., $\gamma(0) = x$ and $\gamma'(0) = v \in T_x X$. Then $c'(t) = (\gamma'(t), \gamma'(t))$ and $c'(0) = (v,v) \in \Delta \subseteq T_x X \times T_x X$.    $T_x X \times T_x X \subseteq \Delta \subseteq T_{(x,x)} \Delta$   All tangent vectors at the point $x$ in $X$ are described by velocity vectors of curves passing through $x$. Suppose $r(t)$ is a curve through $x$ such that $r(0) = x$, then the velocity vector is given by $r'(0)$. Any element that lies in $T_x \times T_x$ looks like $(r^\prime(t), r^\prime(t))$, which is element in $T_{x,x}(\Delta)$.  Thanks.  This question intends to fill in the answer for the question  And I do realize this is a very popular question, here's another identical problem again with partial solution: .

If $\triangle$ is the diagonal of $X \times X$, show that its tangent space $T_{(x,x)}(\triangle)$ is the diagonal of $T_x(X) \times T_x(X).$   I don't have the slightest idea on how to do this.  By definition, the tangent space of $X$ at $x$ is the image of the map $d\phi_0: \mathbb{R}^k \rightarrow \mathbb{R}^N$, where $x + d\phi_0(v)$ is the best linear approximation to $\phi: V \rightarrow X$ at 0. $\phi: V \rightarrow X$ is a local parametrization around $x$, $X$ sits in $\mathbb{R}^N$ and $V$ is an open set in $\mathbb{R}^k$, and $\phi(0) = x$.  Thanks.


I'm trying to create a table that has some merged columns. But after I compile the file, the borders for those merged cells doesn't appear. I don't know how can I fix this. Any suggestions?!    Here is the code :  \begin{table}[h]  \centering  \caption{Query Q1}  \begin{tabular}{|c|c|c|c|}   \hline   \multicolumn{4}\textbf{Search Results} \\   \hline   1  & D7  & R  & \\   2  & D2  & R  & \\   3  & D3  & NR & \\   4  & D5  & R  & \\   5  & D1  & R  & \\   6  & D6  & NR & \\   7  & D12 & R  & \\   8  & D15 & NR & \\   9  & D21 & NR & \\   10 & D9  & R  & \\   \hline   \multicolumn{3}\textbf{Avg} & \\   \hline  \end{tabular} \end{table}

The above can easily be created in MS word, but how can I create something like this in latex?  Basically changing the columns for specific cells, merging a bunch of cells together, wrapping text in a cell?


I'm taking over dba responsibilities for the migration of an environment that the application owners are unable to give enough information on. I need to comment on possibility of optimizing licensing cost. Having compared Enterprise and Standard edition features, the only concerns i have are for Database snapshots and TDE, both of which are only supported by Enterprise in SQL 2012. There are snapshots in SSMS for some of the databases, but how do I know if the application is using them or not? My thoughts are that, if they are not being used then we could look at using Standard edition. For TDE I can check that with sys.dm_database_encryption_keys. Any thoughts to guide me will be appreciated please. Thank you

We're looking to decommission a SQL Server instance which has a couple databases still remaining on it.  How can I tell if they are still being used by users or a web application?  I found a  which had a T-SQL query you could run to retrieve the last query date. It seems to work but I want to know if this information is valid enough to drop databases. Is it?  If you have alternative methods that would help as well.


I would like to search my own CMD history. we could browse within the same session, you can browse it with the up and down arrow keys but what about the history of former CMD sessions?  Is there a file, a log the history gets written to ?if so is it there any way to find the history file?  in linux we could get bash history,is it there any similar way to get cmd history?  Note : i wish to view the command history even after the system shutdown ,but the duplicated  was related to keeping session history

Is there a way to keep the cmd command history between sessions?


Question inspired by reading this ->   Please read Prof. Lockhart's quote in that question    In the quotes he claims that he performed the Homorphus charm and changed a werewolf back to human  It seems he was reading from one of his books and since his books are very popular, I can assume Homorphus charm is a real thing in Harry Potter  However, looking at Lupin in book 3, there doesn't seem to be any cure for lycanthropy at all  Is the Homorphus charm known to cure werewolf bites, in universe? Is the charm itself something Lockhart made up? What, if anything, is known about the Homorphus charm?

‘Nice loud howl, Harry – exactly – and then, if you’ll believe it, I pounced – like this – slammed [the werewolf] to the floor – thus – with one hand, I managed to hold him down – with my other, I put my wand to his throat – I then screwed up my remaining strength and performed the immensely complex Homorphus Charm – he let out a piteous moan – go on, Harry – higher than that – good – the fur vanished – the fangs shrank – and he turned back into a man. Simple, yet effective – and another village will remember me forever as the hero who delivered them from the monthly terror of werewolf attacks.’   Gilderoy Lockhart - Chamber of Secrets - chapter 10 - The Rogue Bludger   Yeah, yeah. I know: consider the source! We all know Gilderoy Lockhart is a fake and a fraud in that he took credit for other heroic wizards' work. However, it occurred to me that in order to sell his books, he would have had to have written accurate and real spells and charms and potions, etc, into the books, or else everyone would have known right away that he was a turkey.   So is it possible there's an actual Homorphus Charm that will change a werewolf back into a human before the werewolf's moon cycle is over? If so, why on earth would they not have used it on Remus Lupin (for Lupin's safety) or Fenrir Greyback (for the community's safety)?


This question is kinda aimed towards PHP but it probably applies to other languages aswell. In PHP you can only extend one class. But what if you need more classes?  Suppose i have the following classes:  class MyClass extends Observer, Logger, OtherUtilClass   MyClass can't extend more than one class. But it needs to be an observer. And it might need some other base class aswell to fully function. What would be the best approach for this?

If I have several classes with functions that I need but want to store separately for organisation, can I extend a class to have both?  i.e. class a extends b extends c  edit: I know how to extend classes one at a time, but I'm looking for a method to instantly extend a class using multiple base classes - AFAIK you can't do this in PHP but there should be ways around it without resorting to class c extends b, class b extends a


Watching a game review, I've noticed a phrase whose meaning confused me. The reason why I got confused is that the author used a base form of the verb "to explore" in pair with the singular subject "friend". The question is, is it correct to do this? I will write below two more options as I would use this verb in that case. Could you also explain if my bets are correct or, maybe, even preferable (I doubt it)? Here's the original sentence:  Watching my friend explore the environment with only a sense of wonder was my favourite part of the game.  Needless to say, this sentence might be grammatically correct, furthermore, it sounds natural for me, yet I must admit I do not speak and write English perfectly, not even close. These are two more mentioned options:  Watching my friend exploring the environment with only a sense of wonder was my favourite part of the game.  or  Watching my friend explores the environment with only a sense of wonder was my favourite part of the game.  Are these two both also acceptable? I appreciate your help. Besides, I ask for your forgiveness for the mistakes if there are some in my question.

"Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why?


Considering how  for the crew of a space station to have at their disposal a 1g environment (or more) at the rim to a 0g environment at the axis of rotation, why aren't modern space stations like the  built around a centrifuge design à la ? And if they already exist, why haven't I heard of them?

Will a machine or a technique ever be possible that allows  in interplanetary space?  And I ask out of pure curiosity. I know there is the "Vomit Comet" that allows for a non-gravity 'simulation' (for lack of a better word) on Earth, and I was thinking about if there would be a way to reverse that and rather have gravity in space.    edit: Say I was building a space shuttle because I'm dying to go to the moon (true story). Unlimited budget, the smartest people you can fathom helping me build my space shuttle.  I get motion sickness and the whole "anti-gravity" thing wouldn't really work for me.  Would there be a way to have gravity on my space shuttle? Perhaps by using a type of machine or magnets or something of the like?


What are the advantages of having a python method, like lower(), being applied to an appropriate object, s, via the dot notation (i.e., s.lower()) versus a method, like len(), being also applied appropriately receiving the object as an argument, e.g. len(s) ? If I want to create such a method / function, what are the critical points I should consider choosing the first or the second implementation? Thanks!

I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len.


I have a listview in which images gets downloaded when I scroll so whatever I have understand till now is the element which are visible only that element's images gets downloaded. Suppose only 7 elements are visible at a time and when I Scroll previous views are recycled with the new once so what happens to the process which was downloading the image of the previous views is it also cancelled or it queues the new request of downloading images of the new Views.I am asking about the process that queueing of process happens or the process which are not completed yet are cancelled. with process I mean downloading images in background

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they are downloaded?   The total number of images is not fixed.


I want to know the way to collect all the information from a table from a web page.  At the moment I am able to get only the records which are visible in UI. (18 rows). However there are 96 rows in the table and i need to either scroll in the table frame or need some script to get all the data from the table.  please help. here's my UI page

I have the following element element(by.css("span[aria-label='Picker ID, TESTUSER']")  I want to assure the text on this filed is TESTUSER, so I tried:  expect(element(by.css("span[aria-label='Picker ID, TESTUSER']")).getAttribute('value')).toEqual('TESTUSER');  then I got the error: Expected null to equal 'TESTUSER' So I tried: element(by.css("span[aria-label='Picker ID, TESTUSER']")).getText().then(function (value) {         console.log(value);       })  And I got this error: Expected '' to be 'TESTUSER'.  How to get the value of this field and expect it is TESTUSER?


The question says -      Let $f(x) = x^x$, $x  \in (0,\infty)$ and let $g(x)$ be the inverse of $f(x)$, then $g'(x)$ must be?   I tried taking log on both sides of the given equation but I get stuck. I cannot find any other way to proceed. Try answering this question on a high school level.

How can I find the inverse function of $f(x) = x^x$? I cannot seem to find the inverse of this function, or any function in which there is both an $x$ in the exponent as well as the base. I have tried using logs, differentiating, etc, etc, but to no avail.


CMake Error at CMakeLists.txt:1 (cmake_minimum_required):   CMake 3.6.0 or higher is required.  You are running version 3.5.1 -- Configuring incomplete, errors occurred!   I know Ubuntu uses stable releases that it can support, but some repos require later versions of cmake. I want to overwrite the old cmake with the later version of cmake, but the common PPA doesn't carry the cmake I need. How can I upgrade cmake to use the needed version without conflicts with the older version?

I am trying to install latest cmake in my linux box and I am always getting the below exception -   userName@phx5qa01c-4e23:~/build$ wget http://www.cmake.org/files/v2.8/cmake-2.8.11.tar.gz --2013-10-08 14:39:55--  http://www.cmake.org/files/v2.8/cmake-2.8.11.tar.gz Resolving www.cmake.org... 66.194.253.19 Connecting to www.cmake.org|66.194.253.19|:80... failed: Connection timed out. Retrying.  --2013-10-08 14:40:17--  (try: 2)  http://www.cmake.org/files/v2.8/cmake-2.8.11.tar.gz Connecting to www.cmake.org|66.194.253.19|:80... failed: Connection timed out. Retrying.  --2013-10-08 14:40:40--  (try: 3)  http://www.cmake.org/files/v2.8/cmake-2.8.11.tar.gz Connecting to www.cmake.org|66.194.253.19|:80...   It is always retrying... Any thoughts?  Does anyone know what wrong I am doing here? Or is there any better way of installing latest version of cmake in my linux box?  userName@phx5qa01c-4e23:~/build$ uname -a Linux phx5qa01c-4e23 2.6.35-22-server #33-Ubuntu SMP Sun Sep 19 20:48:58 UTC 2010 x86_64 GNU/Linux


I want to obtain record type info like:  List<RecordType> lstrecord = new List<RecordType>([Select id,Name from RecordType where sObjectType = 'Move__c' and Name = 'Draft' ]);   using schema

public static map<id,RecordType> MapRecordtype = new Map<id,RecordType>([SELECT id, DeveloperName FROM RecordType where sobjecttype ='move__c' and                                         Developername in('Assignment','Draft','Domestic_Draft','LTST_Draft','MX_Domestic','MX_Domestic_draft','Termination','International_Relo','Localization','J1',                                        'Back_To_Back','Repatriation','PAM','US_Domestic_Relo','CHN_Domestic_Relo','CHN_Domestic_Draft')])   Can we write schema for above query?


Using ubuntu 18.04 and 19.04 I created a windows 7 install usb using image writter.   It will not boot.   Ie: boots into the grub for ubuntu but no way does the win7 usb get booted.   I am new to ubuntu.   I can not get unetbootin to install.   Added repository and all.   So can someone point me to something that will help or tell me if it's possible to create windows install usb on ubuntu?   I do not have a windows computer only ubuntu.   I have set boot order ect ect.   Pleaae respond and thank you.

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


I found this thing floating in my orange juice this morning. I pulled it out and it appears to be some sort of protozoa or something. It's about a quarter the size of my pinky nail. Was not moving at all.  Should I be worried about this? Either way I will be notifying the store. Location is Okinawa, Japan.

I found these "things" by chance on my wild strawberries which I grow in my organic garden. Basically, some strawberries are completely covered with them.    They're transparent, they have dots equally aligned and they don't move. I've tried searching for transparent slugs and worms and also faeces but to no avail.


In local news [1] comes with information that 58% of people is for something. This information is based on option pool that ask 500 people from 10.5 million about that question. What is confidence interval for people that are for that something?  To solve this I try following. The $n$ people from $10^7$ is for something. I randomly select 500 of them and I will try to find $n_1,n_2$ for which:  $$     n_1: \frac{\binom{n_1}{290}\binom{10^7-n_1}{210}}{\binom{10^7}{500}}<0.05 $$  $$     n_2: \frac{\binom{n_2}{290}\binom{10^7-n_2}{210}}{\binom{10^7}{500}}>0.95 $$  But this is not easy to solve. So I am looking for some solvable algorithm.  [1]

I have a random sample of Bernoulli random variables $X_1 ... X_N$, where $X_i$ are i.i.d. r.v. and $P(X_i = 1) = p$, and $p$ is an unknown parameter.  Obviously, one can find an estimate for $p$: $\hat{p}:=(X_1+\dots+X_N)/N$.  My question is how can I build a confidence interval for $p$?


I have a header file Customer.h and a source file Customer.cpp.  The Header file is as follow:  #ifndef CUSTOMER_H #define CUSTOMER_H #include "GeoPosition.h"  class Customer{     private:         std::string name;         std::string address;         int pin;         GeoPosition position;      public:         static int anzahl;         Customer();         Customer(std::string name, std::string address, float lat, float lon);         void getPosition();         void setPosition();         std::string getName();         void getPin();         void print(); };  #endif   The source file is as follow:  #include <iostream> #include "Customer.h"  Customer::Customer(){}  Customer::Customer(std::string name, std::string address, float lat, float lon){     this->name = name;     this->address = address;     this->position = GeoPosition(lon, lat); }   std::string Customer::getName(){     return this->name; }  void Customer::getPosition(){} void Customer::setPosition(){} void Customer::getPin(){} void Customer::print(){}  int main(){     return 0; }   My question is that every time I create a new object, I want to increment the member variable Customer::anzahl.  I know that it is not possible to initialize a static member in the constructor like this:     Customer::Customer(std::string name, std::string address, float lat, float lon){         this->name = name;         this->address = address;         this->position = GeoPosition(lon, lat);         anzahl++;     }   Is there a workaround or what can I do to increment anzahl every time I create a new object of Customer?  I get always the following error:  Undefined symbols for architecture x86_64:   "Customer::anzahl", referenced from:       Customer::Customer(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, float, float) in Customer-141888.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   I can't initialize or reinitialize an static member in the constructor of the source file. What should I do instead?

Very simply put:  I have a class that consists mostly of static public members, so I can group similar functions together that still have to be called from other classes/functions.  Anyway, I have defined two static unsigned char variables in my class public scope, when I try to modify these values in the same class' constructor, I am getting an "unresolved external symbol" error at compilation.  class test  { public:     static unsigned char X;     static unsigned char Y;      ...      test(); };  test::test()  {     X = 1;     Y = 2; }   I'm new to C++ so go easy on me. Why can't I do this?


While answering questions, adding comments and even more during reviews or edits, I often find myself in the need to quote some external reference, that I know of without remembering the exact URL. Some are often needed, like RFC2606 or RFC6302 for tokens to use in obfuscation, or various software documentation, etc.  It would be handy if I could have a page, in my profile, completely private, where I could basically fill out a free-form text box where in my case I could put my "most needed links". Already like that it would be useful, as tied to my account, and a further improvement would be if it could be made available in some way at the time we are on a question, like with a small search text box that would hit this page or something like that.  Of course I can reach almost the same goal by having all the resources as bookmarks in my browser (which is what I am doing right now failing to have a better solution), but it would be more convenient to have them in each Stack Overflow site (because I may use different computers/browsers that are not necessarily linked on the bookmarks-level together, or using the Stack Overflow  mobile application, etc. and I may not like using a cloud application for that).  I am also open to suggestions from other active participants that have the same problem and how they solve it, as I may have missed obvious ways to do that.  Update 1: Ok for the duplicate question, I have searched before posting, but this question with a score of -9 never popped up in results. The answers there do not 100% answers my question anyway...  Update 2: Let me re-emphasize again that the core idea is to store a list of links that I often need when replying to questions on Stack Overflow. It is not for storing unrelated texts. And even better if they are easily available when answering questions.

I would love a simple, personal notes taking feature. Not for everything on this page, but just on my personal page. Just for me to take some personal notes about stuff on this page, some useful metaqueries, links related to this site, etc.  I know I could use bookmarks, but those are only local to the browser, and I use the site from different places a lot, and so, for taking notes about a page, the page itself is the most logical location.  And it's only one extra column in the user table, so I shouldn't take too long for you to develop :))


By using the fact that $\log(n)<<n$，evaluate $$\lim_{n\to \infty} n^{1/n}$$  How to use $\log(n)<<n$ to evaluate that?

Thomson et al. provide a proof that $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$ in . It has to do with using an inequality that relies on the binomial theorem:  I have an alternative proof that I know (from elsewhere) as follows.  Proof. \begin{align} \lim_{n\rightarrow \infty} \frac{ \log n}{n} = 0 \end{align} Then using this, I can instead prove: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} &= \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \newline & = \exp{0} \newline & = 1 \end{align}  On the one hand, it seems like a valid proof to me. On the other hand, I know I should be careful with infinite sequences. The step I'm most unsure of is: \begin{align} \lim_{n\rightarrow \infty} \sqrt[n]{n} = \lim_{n\rightarrow \infty} \exp{\frac{ \log n}{n}} \end{align} I know such an identity would hold for bounded $n$ but I'm not sure I can use this identity when $n\rightarrow \infty$. Question: If I am correct, then would there be any cases where I would be wrong? Specifically, given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n = \lim_{n\rightarrow \infty} \exp(\log x_n) \end{align} Or are there sequences that invalidate that identity?  (Edited to expand the last question) given any sequence $x_n$, can I always assume: \begin{align} \lim_{n\rightarrow \infty} x_n &=  \exp(\log \lim_{n\rightarrow \infty} x_n) \newline &=  \exp(\lim_{n\rightarrow \infty} \log x_n) \newline &=  \lim_{n\rightarrow \infty} \exp( \log x_n) \end{align} Or are there sequences that invalidate any of the above identities? (Edited to repurpose this question). Please also feel free to add different proofs of $\lim_{n\rightarrow \infty} \sqrt[n]{n}=1$.


I have an external 12v power supply with arduino mega, I want to control a 12v led strip from ardunio mega, so I'm confused little bit can I connect arduino ground to 12v ground? Is this connection damage my ardunio ?

Background I am building a scale RC helicopter and ordered a bunch of 3mm LEDs to give it some nice navigation and strobe lights which I plan to drive with an Arduino Nano. Problem is that I goofed and didn't notice that the LEDs are 12v until they arrived.  I know that the Arduino Nano can accept 12V on pin 30, but I think the voltage output on any of the "D" or "A" pins is always 5v (correct??). Question If the voltage output of the Arduino pins is 5v, then how can I drive the 12v LEDs using the Arduino, or is it impossible?


I have already followed the instructions  but it doesn't seem to work, as my ifconfig output still shows the same "em1","em2" and "lo". I just need a way to rename one of these to eth0 in Fedora 19, since other methods dont seem to work. Matlab needs eth0 to activate, and I am stuck.

I've just installed a Fedora 19 on VMware workstation 9. The default network device is "ens33" instead of "eth0" on RHEL.  The reason I have to use "eth0" is that the license component of one of our products has be to be linked with "eth0".  There are some posts discussing about similar issues, most of which are for older OS. I haven't found one that exactly match my situation.


I have created my spreadsheet with protected cells scattered throughout the document in Google Sheets.  Now I want to duplicate the spreadsheet and have the protected cells in the new worksheet keep the same protection. The new spreadsheet would be in the same workbook (tabs). I have tried copy and paste into the new worksheet and everything copies but the protection.  How would I accomplish this task?

In a Google Spreadsheet called Attendance there is a sheet called Template. The user duplicates this sheet, renames the sheet with current date and uses this sheet to mark attendance for students. The Template sheet contains protected cells and the attendance is marked by entering Student's ID number in the space given (unprotected cells). I use the following script to duplicate multiple sheets and rename them everyday:  function createDailyAttendance() {   var ss = SpreadsheetApp.getActiveSpreadsheet();   var refss = ss.getSheetByName("DataPointers");      // Get the range Row and Column information.   var dataRangeRow = refss.getRange("K2").getValue();   //var dataRangeCol = ss.getRangeByName(ColName).getValue();      // Get the range of cells that store Duplicate sheet name.   var AttendanceDataRange = refss.getRange(dataRangeRow);    var AttendanceObjects = AttendanceDataRange.getValues();    var template = ss.getSheetByName('Template');    for (var i=0; i < AttendanceObjects.length; i++) {       // Put the sheet you want to create in a variable      var sheet = ss.getSheetByName(AttendanceObjects[i]);        // Check if the sheet you want to create already exists. If so,       // log this and loop back. If not, create the new sheet.         if (sheet) {            Logger.log("Sheet " + AttendanceObjects[i] + "already exists");         } else {            template.copyTo(ss).setName(AttendanceObjects[i]);            }         }   return; }   This script helps me create multiple copies of sheets from Template but the duplicate copies do not retain the Cell/Range permissions. Is there a way to add a loop function which extracts permission from Template and applies it every time the loop template.copyTo creates a sheet?


I sold 250 shares of a stock at a loss of (-1,000). 2 weeks later bought a single put contract (100 shares) n the same stock. If I sell the put option for profit a few days later, is this a partial superficial Loss (wash sale)? If so, how do I calculate it? (CRA, Canada)

I sold 250 shares of a stock at a loss of (-1,000).  2 weeks later bought a single put contract (100 shares) n the same stock.  If I sell the put option for profit a few days later, is this a partial wash sale?  If so, how do I calculate it? (IRS)


while searching around the internet i found two ways of writing javascript function.  One is Function() constructor  var myFunction = new Function("a", "b", "return a * b");  var x = myFunction(4, 3);   Second is simple defining function  var myFunction = function (a, b) {return a * b};  var x = myFunction(4, 3);   When i used above both method i found no difference between these 2.  Is there any difference between these 2 or is there any use of using function constructor??

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


Duplicate of   For the Companions, I have a job that is telling me to kill an escaped bandit in Hjaalmarch.  Where can I find him?

I have a quest from the 'Companions' to kill an escaped prisoner. He is said to be roaming Haarfingar.   When I bring up the journal and highlight the quest, It offers no clues on the map.  I have been to Solitude and search a few keeps etc. Also tried the 'Clairvoyance' abilty.  In all honesty he/she could be anywhere in a large area !!  Anyone have any advice please ?


If I have a 16-bit number named n and another 16-bit number named n2, and I want to set the first 8 bits of n2 to n. Only the first 8 bits of n should be the same as n2, the remaining 8 should not change. What should I do in such a case? I tried shifting the numbers by 8 but I don't know how to extract the MSB of n and set it to the MSB of n2 and then shift. Can someone please help me out? Thanks!

How do you set, clear, and toggle a bit?


The flat FLRW metric written in terms of conformal time $\eta$ is given by $$ds^2=a^2(\eta)(d\eta^2-dx^2-dy^2-dz^2)\tag{1}$$ where the scale factor $a(0)=1$. The interval of proper time $\tau$ measured by a comoving observer is given by $$d\tau=a(\eta)d\eta.$$ The coordinate system used to describe the metric in Eqn.(1) is that of a stationary observer fixed at the origin $(\eta,x,y,z)=(0,0,0,0)$ with four-velocity $$U^\mu=(1,0,0,0).$$ Assume that he observes a particle moving along a nearby path $x^\mu(\lambda)$ with four-velocity $$V^\mu=\frac{dx^\mu}{d\lambda}.$$ The four-momentum of the particle is $$P^\mu=mV^\mu.$$ The energy $\epsilon$ of the particle as measured by the stationary observer fixed at the origin $\eta=0$ is given by $$\epsilon=U_\mu P^\mu.$$ Now let us assume that the path $x^\mu(\lambda)$ is a geodesic. Using the metric in Eqn.(1) it can be shown that the covariant derivative of the energy $\epsilon$ along $x^\mu(\lambda)$ is given by $$\frac{d\epsilon}{d\lambda}=m\frac{\dot a}{a}V^\mu V_\mu.$$ Consider two types of particle; a massless particle and a stationary massive particle. The massless particle has $V^\mu V_\mu=0$ therefore $$ \begin{eqnarray} \frac{d\epsilon_{\rm massless}}{d\lambda} &=& 0\\ \epsilon_{\rm massless} &=& {\rm constant.} \end{eqnarray} $$ The massive particle has $V^\mu V_\mu=1$ therefore $$ \begin{eqnarray} \frac{d\epsilon_{\rm massive}}{d\tau} &=& m\frac{da/d\eta}{a}\\ &=& m\frac{da/d\tau\ d\tau/d\eta}{a}\\ &=& m\frac{da}{d\tau}\\ \epsilon_{\rm massive} &=& ma. \end{eqnarray} $$ Thus the constant energy $\epsilon_{\rm massless}$ is the energy of a massless particle as it propagates into the future with respect to the stationary observer fixed at the origin at $\eta=0$. The energy $\epsilon_{\rm massive}=ma$ is the energy of a stationary massive particle as it propagates into the future with respect to the stationary observer fixed at the origin at $\eta=0$.  Now, using natural units with $\hbar=c=1$, the Friedmann equation for the vacuum is given by $$\Big(\frac{da/d\tau}{a}\Big)^2\sim \frac{1}{M_{\rm pl}^2}\rho_{\rm vac}$$ where $M_{\rm pl}$ is the Planck mass. The vacuum density $\rho_{\rm vac}$ is given by $$\rho_{\rm vac} \sim P_{\rm pl}^4$$ where $P_{\rm pl}$ is the Planck momentum.  According to the stationary observer fixed at the origin $\eta=0$ $$ \begin{eqnarray} M_{\rm pl} &=& M_{\rm pl}^0\ a(\tau)\\ P_{\rm pl} &=& P_{\rm pl}^0 \end{eqnarray} $$ where $M_{\rm pl}^0$ and $P_{\rm pl}^0$ are the Planck mass and momentum measured at the origin.  Thus, using Planck units where $M_{\rm pl}^0=P_{\rm pl}^0=1$, the Friedmann equation for the vacuum becomes $$ \begin{eqnarray} \Big(\frac{da/d\tau}{a}\Big)^2 &\sim& \frac{1}{a^2}\\ a(\tau) &\sim& \tau. \end{eqnarray} $$ Thus the scale factor $a$ is a linear function of the proper time $\tau$ as measured by a co-moving observer. This is very different from the standard vacuum cosmology which expands exponentially.  In fact we can define the scale factor $a(\tau)=\tau$ so that the scale factor is simply the age of the universe in Planck units.  We can also redefine the energy scale so that by definition a co-moving observer always measures a constant Planck mass. In that case the energy density of the vacuum, $\rho_{\rm vac}$, must vary as $$\rho_{\rm vac} \sim \frac{1}{a^2} \sim \frac{1}{\tau^2}.$$  The age of the universe, $\tau$, is approximately $10^{60}$ in Planck units so that the current density of the vacuum $\rho_{\rm vac}\sim 10^{-120}$. This is consistent with observation.

Does the Friedmann vacuum equation have a linear solution rather than an exponential one?  Using natural units one can write Friedmann's equation for the vacuum as $$ \begin{eqnarray} \left(\frac{\dot a}{a}\right)^2 &=& \frac{8\pi G}{3}\rho_{vac}\\\tag{1} &=& L^2 \left(\frac{\rho_0}{L^4}\right) \end{eqnarray} $$  where I define the Planck length $L=(8\pi G \hbar / 3 c^3)^{1/2}$, $\hbar = c = 1$, and $\rho_0$ is a dimenionless constant.  Now let us interpret the Planck length $L$ to be the size of the smallest volume of space that can be described by general relativity.  But the Weyl postulate, together with cosmological observations, also imply that space is expanding.  Therefore we must have  $$L = a(t) L_0\tag{2}$$  where $L_0$ is the Planck length measured at the reference time $t_0$ where $a(t_0)=1$.  Inserting Eq.(2) into Eq.(1) we find  $$\left(\frac{\dot a}{a}\right)^2 = L_0^2 \left(\frac{\rho_0}{a^2L_0^4}\right)\tag{3}$$  where the Friedmann equation (3) has been rescaled in terms of the Planck length $L_0$ measured at the reference time $t_0$.  Eq.(3) has a linear solution  $$a(t) = \frac{t}{t_0}.$$  The scaled mass density $\rho(t)$ of the vacuum is not constant but rather given by  $$\rho(t) = \frac{\rho_0}{a^2 L_0^4} = \frac{1}{t^2 L_0^2}.$$


I have 4 servers and I want each one of them to execute a reboot on Sunday.   Server 1 - first Sunday of the month (first week) Server 2 - Second Sunday of the month (2nd week) Server 3 - third Sunday of the month (3rd week) Server 4 - fourth Sunday of the month (4th week)   how can I do it with Crontab? Thanks! Dotan.

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I wanted to hack around with wicd so I went ahead, downloaded a tarball, removed the wicd packages on my system, and installed from source (with the no gnome extensions flag), but now I'm having issues reverting to the wicd package.  The installed-from-source version works OK, except for the fact that every time I restart my computer it prompts me to enter my password (which never happened with the package version). I tried using  sudo apt-get install -d wicd...andrandomrependencies   to download the wicd package, and then running the source's uninstall.sh, but I got the following error.  There does not appear to be an installation log present, most likely because you did not install Wicd from this directory.   That "most likely reason" is untrue, but even if I try installing wicd from source and immediately running uninstall.sh, I still get the error.  Worse still, the source version seems to take precedence over the package version- even with the wicd package installed now, I'm still getting that prompt on bootup to elevate the wicd daemon's privileges.  Do you know of any ways to properly uninstall wicd?

I used source code to build one package such as below:  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static make make install   But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:  # pkg-config --list-all | grep Myplugin myplugin-.... $ ls /usr/lib/myplugin/libXYZ.so exist....   How do you remove this now?


Thanks for your Edit!   This edit will be visible only to you until it is peer reviewed.   I'm sure you've seen that, somewhere at some time in the past.  Those who know, can go to their own profile, activity, suggestions (or all) and then click on the suggested edit link for the most recent edit.  Granted, thats a few clicks.  For those that don't know all the ins and outs of the profile, this is just a statement that reads much like "Thank you for your call, your call is important to us."  The request is to provide a glimpse into the "where is this suggested edit" in the process? Just make that "peer reviewed" a link to the review task that was generated.  It becomes much easier for those who go back to the post and wonder why the review is taking so long on a site and it helps introduce the peer review process (this isn't random people clicking random buttons most of the time).

When a user without editing privileges suggests an edit to the post, a banner gets displayed until it is reviewed. Can the banner also provide a link to the Suggested edit? For example, I made an edit to a post on Unix&Linux.SE. Can the banner also link to my ?     I know I can access the link through my Profile → Activity → Suggestions. But linking it directly on the face of the post would have immense benefits:  I have been a prolific editor on Ask Ubuntu (my first encounter with Stack Exchange Network) with a lot of Rep derived through Suggestions. I didn't get to know about these suggested edit links until very late (I guess I already had got about 400 edit suggestions approved by the time this came to my knowledge).  This means I didn't know about  when it mattered the most.  I never got to know why my suggestions got rejected because of my ignorance.  This would help reduce the barrier between Reviewers and Editors.  This would also help in case of Anonymous edits. Right now, there is no way an anonymous editor can access it unless the edit gets approved and he comes back to go through the Revision page of that particular post in order to access the Suggested Edit Review link. If the edit gets rejected - it's the end of the road for that anonymous editor. I just made an anonymous edit on one of the SE sites where I don't have an account and already feel like it's the end of the road for me since I just can't access the review link unless it gets approved.    Possibly also expand the banner to mention that they can also access the link to the suggestion via Profile → Activity → Suggestions.


I want the blue tag to be right in the middle of the gray tag.  Using the position of this tag is not in the middle       .container {       width: 100vw;       height: 100vh;      }     .parent {       width: 200px;       height: 200px;       background-color: gray;       border-radius: 30px;       margin: 0 auto;       position: relative;         }      .child {        width: 20px;        height: 20px;        background-color: lightblue;        position: absolute;        top: 50%;        left: 50%;       }

How can I horizontally center a
 within another
 using CSS?

Foo foo


Is the following sentence correct, regarding the starting of the sentence with "because" followed by a comma?     Because, I have more of it, then I know what to do with.

Personally, I use “but” and “so” to start sentences, but not “and” and “because”.  Today I was talking to a friend of my brother on this matter, who is in 6th Grade. He takes tuition from a private tutor who told him that in early days using “and”, “but”, “so” to start a sentence was okay, but now-a-days it is becoming obsolete and that we should not use them to start a sentence. He is a reputed teacher here and he keeps track of current affairs. (He is the one who told me, when I was his student, that “will” is being used after “I” now-a-days and I followed the advice.) So I could not deny this information. Tried to find in Google about this but no source made me think it is trustworthy. So I would like to know this in StackExchange,   What is the actual rule and is this rule being changed?    PS- I don't use “because” to start sentences but I always had a doubt. So I added it!


I have a form in Drupal. On a select list I am using the ajax built into the form api to trigger a callback on change.  I need to be able to add an option to the select list via javascript. Set the value on the select list to be that new value and then trigger the ajax call.  I have something like:  var select_list = $('#edit-example');  select_list.append($("<option></option>")   .attr("value", data.ObjectID)   .text(data.Name)); select_list.val(data.ObjectID); select_list.change();   Where data is a JSON object.  So the option is being added to the select list. The value has changed to my new option. I trigger the ajax event. However I am getting the error message:     An illegal choice has been detected. Please contact the site administrator.   The callback is working fine except the error is displayed. What can I do to stop this message appearing?

I have a view that has three expose filters (Manufacturer, Type, Model), three options list (term reference to Printer vocabulary) .  Vocabulary: Printer (3 levels)   -- HP            ---- xxx      ------ xxxx   -- Apple ---- xxxx ------ xxxxxx -- Dell ---- xxxx ------- xxxxx -- ... -- ... (thousands of terms)   Since Form API AJAX doesn't work on views expose form, I am unable to make the them dependent select for exposed form fields. So I used jQuery to make the exposed form fields "dependent select / cascading select".    Basically, I empty all the options in views_exposed_form_alter() firstly:  $form['manufacturer_id']['#options'] = $form['type_id']['#options'] = $form['model_id']['#options'] = array();   then populate the option lists with my jQuery code accordingly.  However I get "An illegal choice has been detected." on page load, and form submit.  Form submission is prevented due to Drupal form validation mechanism .    It's the form validation detect the options generated by jQuery are not come with the original form data, as I removed the options in form alter. Value of a select box is not present in its defined options .  So I tried to remove form validation in form alter as:  unset($form['#validate']);   still doesn't work, the illegal choice error remains.  ============ UPDATED =================  Inspired by @kiamlaluno 's answer below, the only solution I came up is hack/patch the core.  Here is what I done:  Edited /includes/form.inc : (line 2014)    I removed the code:  $element['#needs_validation'] = TRUE;   and added:  // if not these fields, mark for validation as usual.  // so if are these fields, validation will be passed.   if ($element['#name'] != 'manufacturer_id'  &&      $element['#name'] != 'type_id'          &&      $element['#name'] != 'model_id' ) {    $element['#needs_validation'] = TRUE; }   It works, the exposed form select option bypassed the validation.   But my solution is very ugly which modified the core.   I wonder if there is any other solution without touching the core? How can I bypass the validation of these exposed form fields?  Thanks!


I have file1.txt and file2.txt, both contain URLs, I want to create a new file with the unique URLS present in file2.txt and not in file1.txt.  Example urls file:  aspencabinets.com.au iiatca.org energyoil.co.za tevelatino.com handball-schule.com lindaestelle.com latindancegrooves.com ugurlu-ozturk.com robertsdoneright.com pactoconvex.com ghaudit.org keiramontalli.net taksid.ee katanics.hu baggotpureescape.com naechstenliebe.net wiki.mbremer.de boxplandesign.com.sg lhasa.ca roboticengineeringprojects.com killergaming.info nhswga.com culnue.eu fmovers.com corpuschristicarolstream.org promedmedikal.com creationprints.com.au tsukihime.com

I have a large file composed of text fields separated by semicolons in the form of a large table. It has been sorted. I have a smaller file composed of the same text fields. At some point, someone concatenated this file with others and then did a sort to form the large file described above. I would like to subtract the lines of the small file from the big one (i.e. for each line in the small file, if a matching string exists in the big file, delete that line in the big file).  The file looks roughly like this  GenericClass1; 1; 2; NA; 3; 4; GenericClass1; 5; 6; NA; 7; 8; GenericClass2; 1; 5; NA; 3; 8; GenericClass2; 2; 6; NA; 4; 1;   etc  Is there a quick classy way to do this or do I have to use awk?


Let's consider this simple example of a TikZ picture that defines the node distance and a style called mynode within the square brackets:   \begin{tikzpicture}[   node distance=2.5em, auto,   mynode/.style={draw=black, rectangle, minimuim size=2em}, ] \node[mynode] (name) {label}; \end{tikzpicture}   When create another TikZ picture within the same LaTeX document, I can copy the content between the square brackets to get the same style.  However, I have to update all figures separately to change the style. How can I define the content between the square brackets in a central place and use it in multiple TikZ figures?

Sorry if this question sounds too elementary. I am new to TikZ, although I have experience with LaTeX.  Say I have multiple TikZ statements in a LaTeX document like the following:  \tikz\draw[line width=2mm] (0,0.1) -- (4,0.1);\hfill\textsc{\Large This is a block}%  \hfill \tikz\draw[line width=2mm] (0,0.1) -- (4,0.1);   I would like to define variables (e.g. line_thickness and line_width:  line_thickness = 2mm line_width = 4   that I could use in all such statements so that, if I want to change the parameters of my drawings in my LaTeX document, I could just change the value of my variables where I define them.  Is it possible to do this in TikZ?  I am interested in a relatively general solution, e.g. some of these variables may specify color, length, relative coordinates, etc. although a solution to addresses my particular problem above would already help a lot.  I have read the solutions in these threads:        but I don't know how to apply the answers to my problem.


I want to triple boot Windows 7, Backtrack, and Ubuntu. Windows and Backtrack are already installed. The problem is that both of them take 4 partitions: 3 for Windows, and 1 for Backtrack. When I try to make another partition, it says I can't have over 4. How can I install Ubuntu with this problem? Note: The 3 Windows partitions are PQSERVICE, SYSTEM RESERVED, and eMachines. I don't really know if I can delete one.

I would like to install Ubuntu alongside Windows 7 on a HP G62 Notebook. Although I have installed  Ubuntu in a dual-boot many times before, I found out that this model has already four partitions.    Partitions:   SYSTEM (NTFS, 199MB, used 66.59MB) Partition without any tag: NTFS (579GM, used 129GB)  RECOVERY (NTFS 16.74 GB, used 2.42GB)  HP_TOOLS (FAT32, 103.34 MB, used 13.23MB)   Since I am not an expert with partitions I would like to get advice on how to do this.  My first idea is this one:   Free some space from /dev/sda2 (I don't know if could also free some other space) delete the HP_Tools partition (I have already created a backup) create an extended partition with the free space in #1 containing three parititions: swap (1gb); / (EXT4, 30GB);  /home (EXT4, 120GB)   Another option is to use wubi instead.  What do you think? Is there any other way to achieve this?  PS: I really think this HP policy of using 4 partitions is not a coincidence  PS: I tried using gparted from the live CD and I got a warning message saying that if I freed some space from /dev/sda2 I could create serious issues in the system


I was reading on the hack against the Transmission Bittorrent Client.   It got me thinking about how would Ubuntu protect itself against this kind of thing. Do the Ubuntu Devs review all software that they put in their repositories or do they trust that software is secure and host it anyway?

I couldn't find much info on the security of Ubuntu (and Linux in general) update verification/security.  The connection appears to be plain ftp. but the packages are signed using a private key and the corresponding public key is stored in the system as a trusted key.  So what are the details? Is the package itself signed or just the hash? Is it an RSA 4096 bit key? What are the chances of a malicious entity being able to mess with the updates and who owns the private key?


Can I use the 5th edition Druid cantrip  to fly by using the following:   Take a 5 ft cube of water say from a lake or well and cast the cantrip once to freeze it. Stand on top of your cube of frozen water (lasts an hour) Cast it again on the cube and this time use it to move the cube 5 feet up in the air. Repeat as needed to move it wherever you want and ride on top of your newly made flying block of ice.    Spell says up to 2 effects active on your water at a time so would this work?

If I understand the first bullet correctly        You instantaneously move or otherwise change the flow of the water as you direct, up to 5 feet in any direction. This movement doesn’t have enough force to cause damage.      One could freeze the water in a 5 ft cube, step onto it, and then raise the cube into the air, though only 5 feet per round. Since the cantrip doesn't mention any carry limit.   Is this possible, or does the first bullet not apply once the water has been frozen?


It is a lemma used in `On the Reducibility of Cyclotomic Polynomials over Finite Fields' by Brett Harrison.  TP: For $a\in \mathbb{Z}$, $x^2 = a$ has a solution $x \in \mathbb{Z}$ IFF $x^2 \equiv a \pmod n$ for all $n \in \mathbb{Z}$.  P: "$\Rightarrow$". Assume $x^2 = a$, if we reduce this equality $\pmod n$, we obtain $x^2 \equiv a \pmod n$.  "$\Leftarrow$". Assume $x^2 \equiv a \pmod n$ for all $n \in \mathbb{Z}$. Let $b \in \mathbb{Z}$, s.t. $x^2 = a + b$, and reduce this expression $\pmod a$, using the assumption we find $b \equiv 0 \pmod a$, i.e. $b$ is a multiple of $a$. So we can write $x^2 = n a$ for some $n \in \mathbb{Z}$.  Now I'm stuck, probably the square needs to be used now.

The following question popped up during a conversation with a friend of mine: is there any integer $n$ such that $n$ is not a square in $\mathbb{Z}$ but it is a square in every field $\mathbb{Z}_p$ with $p>n$?  It sounds like an elementary question, and I am almost sure that the answer is no (mostly because of some distant memories of mine about a theorem of Hasse and Minkowsky), but I was not able to find a definitive answer.    I tried to apply some Model Theory to it, but I don't think it can be a fruitful path to follow. Another thing I noticed is that if I can prove that there is an $a$ such that $n=a^2$ in two different fields $\mathbb{Z}_p$ and $\mathbb{Z}_q$, then the the statement must be false: otherwise, writing $$a^2=n+bp$$ and $$a^2=n+cq$$ for the smallest possible $b$ and $c$, we would have $bp=cq$, a contradiction since neither $b$ nor $c$ can be $0$. But again, I got stuck after this consideration. Do you have any ideas or suggestions?


(self answered question, thanks for the hints Derek Holt provided:-))  problem 18,section 4 chapter 2 in Herstein's abstract algebra: Using the results of Problem 15 and 16,prove that if p is an positive odd prime number, then $(p-1)!\equiv -1 \pmod p$. (self answered question, thanks for the hints Derek Holt provided:-))  Problem 15: If $x^2\equiv 1 \pmod p$, then $x\equiv 1\pmod p$ and/or $x\equiv -1\pmod p$ Problem 16: If $G=${$a_k|1\leq k\leq n$} is a finite abelian group, then $(\prod^n_1 a_k)^2=e.$

How can I show that $(n-1)!\equiv-1 \pmod{n}$ if and only if $n$ is prime? Thanks.


I have two arrays array1 of size 3 and array2 of size 2. I wish to form a pair of each item from both arrays. That is;  int array1[] = {1, 2, 3}; int array2[] = {9, 4};   Results I'm hoping to achieve: 1 , 9  1 , 4  2 , 9  2 , 4  3 , 9  3 , 4   This is what I have tried:  #include <iostream>  using namespace std;  int main(int argc, const char *argv[]) {     int array1[] = {1, 2, 3};     int array2[] = {9, 4};      int arrayOneSize = sizeof(array1);     int arrayTwoSize = sizeof(array2);      for (size_t i = 0; i < arrayOneSize; i++)     {         for (size_t j = 0; j < arrayTwoSize; j++)         {             cout << array1[i] << " , " << array2[j] << endl;         }      }      return 0; }   But for some reason I am getting a whole bunch of weird combinations like:  1,9 1,4 1,1 1,2 1,3 1,1029505037 1,-531587312 ...             (It's really long, just want to shorten the results a little) 0,-411331072 1,9 1,4 1,1 1,2 1,3 1,1029505037 1,-531587312 1,-411331072  Sorry for the noob question. I am still new to C++ so, I will gladly appreciate any help. And also why am I getting numbers which are not part of the array?   Thanks in advance.

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


In the tutorial it says I need at least a 2 GB usb drive to boot ubuntu from a thumb drive. I only have a 1 GB usb drive right now. The ISO file is ~ 904,000 KB, which can be stored on the usb drive. I have tried putting it on the usb drive with the Universal USB installer to no avail. It seems that this does not matter.   I just received a new Samsung Windows 8 laptop, and it is not giving me the option of booting from the USB stick. I have turned off the 'fast-startup' and from what I've read this should have given me the option to boot from the usb stick.   My end goal is to be able to dual boot both Windows 8 and Ubuntu on this laptop. I guess I am just looking for some advice from here.   Thanks guys.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I want to select a function based on the value of a dictionary:  dict = {"func_selector":"func1", "param_value":"some_value"}  # defined a function def func1(param):   # some function code   Now, I want to select the function based on the value of some key, so that it can achieve something like:  # calling a function based on some dict value dict["func_selector"](dict["param_value"])   The syntax is probably wrong, but I am wondering if it is possible to do that in Python or something similar.

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.