I'm sending in a comma delimited parameter value to a stored procedure in Oracle. The parameter goes to a WHERE clause, I'm trying to achieve something like this:  valuestring = "ABC123, ABC456, ABC789"    SELECT *    FROM Tbl1    WHERE column IN (valuestring)   Problem is the select statement does not recognize the commas in between the values, it takes it as a single string so when the stored procedure is executed it returns no values.  Any help would be appreciated.

How can I create an Oracle stored procedure which accepts a variable number of parameter values used to feed a IN clause?  This is what I am trying to achieve. I do not know how to declare  in PLSQL for passing a variable list of primary keys of the rows I want to update.  FUNCTION EXECUTE_UPDATE   ( <parameter_list>    value IN int)   RETURN  int IS BEGIN      [...other statements...]     update table1 set col1 = col1 - value where id in (<parameter_list>)       RETURN SQL%ROWCOUNT ; END;   Also, I would like to call this procedure from C#, so it must be compatible with .NET capabilities.   Thanks, Robert


I'm currently using a Ubuntu 20.04 machine with a small root volume. The default snap setup occupies ~1G space, though with only a few packages. And when I tried to remove core from snap I got the following error. # snap remove core18 error: cannot remove "core18": snap "core18" is not removable: snap is being used by snaps gnome-3-34-1804, gtk-common-themes and snap-store.  I understand I can work around the issue by manually remove the dependants first, but is there a one-liner solution that manages the dependencies automatically so that all snaps and snapd can be removed in one go?

How do I remove snap? apt pretends it's not there but I can still call commands with it.  Trying to rm it says "read only file system"  root@tunnel:/# apt remove snap Reading package lists... Done Building dependency tree Reading state information... Done Package 'snap' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@tunnel:/# snap whoami email: -


I was trying to dual boot Kali Linux as a second OS then changed my mind and aborted the installation after renaming a disk partition.   After aborting the installation, I booted Ubuntu the normal way, but I got a GRUB error. What should I do after I identifying the partition with Ubuntu?

This keep happening when I install the Ubuntu as a dual boot for my laptop. I get a black that appears when booting with the following messages.  Minimal BASH-like line editing is supported.    For the first word, TAB lists possible command completions.  Anywhere else TAB lists possible device or file completions.     grub>   grub>   grub>   grub>   grub>   grub>   grub>   grub>   grub>    I have to enter these commands like this:  grub> set prefix=(hd0,msdos6)/boot/grub/  grub> insmod normal  grub> normal   And the GRUB menu appears. How to make my GRUB menu appear without having to type those command at my GRUB prompts?  I tried sudo grub-install and it give me this error message.    I tried to check if i have chosen the right disk, which come two possibilities, /dev/sda1 and /dev/sda6, but neither of these two works, and they gave the same error message.  /dev/sda1/    /dev/sda6


I like to have the date and time in ISO format (2017-10-30 19:57) on the top right of the screen. I also like to be able to configure things from the command line (an issue not addressed in the suggested "duplicate"), so that when I reinstall the OS I can just run a script and get my preferred configuration back.  After some painful digging around (and, I'm sure, some helpful askubuntu posts) way back then, I managed to get what I wanted. The following worked for several releases, up to and including 16.04 LTS:  gsettings set com.canonical.indicator.datetime time-format "'custom'" gsettings set com.canonical.indicator.datetime custom-time-format "'%a %F %R'"   But it no longer works in Ubuntu 17.10 (I haven't tried Ubuntu 17.04). Can anyone figure out the equivalent settings for Ubuntu 17.10?  I launched dconf-editor and a search for "time-format" did not yield any results.  Here on askubuntu there seem to be several posts on changing date/time format but I could not find one relevant to Ubuntu 17.10.

Time indicator is shown as "%a %H:%M" in the center of the top bar.  How do I move it back to the right where it belongs, and make it include the full date and time ("%Y-%m-%d %s %H:%M")?


Occasionally, when I ask a question on some Stack Exchange site, I'll see a page  wanting to verify whether or not I'm human.   I'm trying to figure out what I am doing that looks suspiciously non-human. How is this page triggered?  (Ironically, when I posted this question, it asked me to do the CAPTCHA.)

Really just looking for honest answers from fellow users for this one.   How often do you get CAPTCHAs, and what were you doing when it appeared?  Some future scripts I'm working on may attempt actions that could at times require a CAPTCHA, which would throw a big wrench into the gears. I'm just trying to figure out when I can expect to see them, and when I can expect to avoid them.   I myself have only had to answer a CAPTCHA once, and it was on my first post ever.


The first time I installed LaTeX was in /usr/share/texmf-texlive (~600MB). Yesterday I installed TeX Live from apt-get, I simply don't know where it has been installed (~1GB). Today I installed Tex Live from  (~4.5GB). It's in /usr/local/texlive/2013. However both Kyle and TeXMaker are still using the first installation.  How can I choose which version to use?

Debian and Ubuntu have very good texlive packaging. But I'd like to use tlmgr to have a more fine-grained control about upgrades and which packages I want to be installed.   So how do I install "vanilla" TeXLive on Debian/Ubuntu?   Also how do I make dpkg aware that I have TeXLive installed?


I have installed an Apache HTTP Server in CentOS 7. After installation it runs successfully.  Then I tried to add the mod_jk module following these steps.   I downloaded the Tomcat Connectors ziped sources file. I tried with v.1.2.35 (this version always worked) and v.1.2.42 (lastest version). I unziped the file. Inside $TOMCAT_CONNECTORS_UNZIPED_DIR/native I executed    ./configure --with-apxs=/usr/sbin/apxs && make   I copied $TOMCAT_CONNECTORS_UNZIPED_DIR/native/apache-2.0/mod_jk.so to /etc/httpd/modules I changed the file's owner to root and file's permissions to 755. I added the file 10-mod_jk.conf to /etc/httpd/conf.modules.d/ with this content   LoadModule jk_module modules/mod_jk.so   I restarted Apache to apply changes.   After step 7, I got this:  Redirecting to /bin/systemctl restart  httpd.service Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.  Taking a look to the log, I got this:  ene 11 15:04:42 esvirlcportal02.amaseguros.local systemd[1]: Stopping The Apache HTTP Server... ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: Starting The Apache HTTP Server... ene 11 15:04:43 esvirlcportal02.amaseguros.local httpd[14485]: httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 1 of /etc/httpd/conf.modules.d/10-jk.conf: Cannot load modules/mod_jk.so into server: /etc/httpd/modules/mod_jk.so: cannot open shared object file: Permission denied ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE ene 11 15:04:43 esvirlcportal02.amaseguros.local kill[14486]: kill: cannot find process "" ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: httpd.service: control process exited, code=exited status=1 ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: Failed to start The Apache HTTP Server. ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: Unit httpd.service entered failed state. ene 11 15:04:43 esvirlcportal02.amaseguros.local systemd[1]: httpd.service failed.  I have done these steps many times and I never had a problem. I have repeated them carefully twice more with same result.  Any idea about what could be the problem?  Thanks!  == UPDATE ==  I use the steps explained in  as @Federico_Sierra said, but it is still failing. With the last comand I got this:  # ausearch -m avc -ts recent ---- time->Wed Jan 11 15:46:03 2017 type=SYSCALL msg=audit(1484145963.026:288): arch=c000003e syscall=2 success=no exit=-13 a0=7fcbcb999920 a1=242 a2=1b6 a3=0 items=0 ppid=1 pid=14516 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="httpd" exe="/usr/sbin/httpd" subj=system_u:system_r:httpd_t:s0 key=(null) type=AVC msg=audit(1484145963.026:288): avc:  denied  { write } for  pid=14516 comm="httpd" path="/var/log/httpd/jk-runtime-status.14516" dev="dm-1" ino=139239092 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_log_t:s0 tclass=file  But I have no idea about it means.

When running in strict mode, SELinux would not let me start HTTPD since my mod_jk.so module was copied from an external server.  I copied mod_jk.so externally since I couldn't find the package to install it.  But, now, in order to run HTTPD, I need to put SELinux in Permissive mode.  I read on the  that I could add a custom policy to allow this mod_jk.so to be used.  Is this the recommended way so that I can use my external mod_jk.so file?


So this is the first time I am posting on this website, so I am sorry for any possible breach of etiquette.  I have just finished my first year with a cumulative GPA of 3.55. However, with that I have also received an F on 1st year Writing due to late submission. The excusable reasons were lack of motivation and the pressure from 3 cumulative finals, but the main reason was my procrastination habits. I wonder if grad schools will single out this F as me being a potentially irresponsible person, or will they overlook it if I get good results on most of the other courses. Also, will redoing this course with an A helps the overall outlook of my portfolio much?  I appreciate if anyone can share any anecdotes about accepted grad students with an F or two in their portfolio so that my conscience would stop gnawing on me.

I'm currently an M. Phil student in Math and I failed a course last semester because I was not able to hand in a home work assignment (which was worth 40% of my grade) on time (I was 30 minutes late).   Apart from that I'd say I'm a fairly decent student, I got an upper second class honours bachelors degree, I have a B+ and A's for all my other courses in my current programme and I'm almost finished with my first paper to be published.   I've however been deeply worried about this failure as it would reflect poorly on my transcript if I were to apply to a Ph.D or another Master's programme.   Will my failing grade affect my chances of getting into a competitive programme or greatly lower my chances of getting a scholarship?


If I have Bag(a=1,b=2,c=3) and I want to change the individual values. I can call self.a = 10 so my updated output would be: Bag(a=10,b=2,c=3).   If k = a and I have the code:  temp = ("self." + str(k)) print(temp) --> self.a   How can I do something like:  temp = 10   So it updates the bag (not temp itself to 10)?  Thanks

Suppose I have a python object x and a string s, how do I set the attribute s on x? So:  >>> x = SomeObject() >>> attr = 'myAttr' >>> # magic goes here >>> x.myAttr 'magic'   What's the magic? The goal of this, incidentally, is to cache calls to x.__getattr__().


Why exactly I can't use an AutoProperty as an out parameter?  For example (This gives me an error):  public int HeightValue { get; set; }  //...  private void Parse() {     int.TryParse(WidthText.Text, out HeightValue);     //Intellisense Error: out argument is not classified as a variable }

Can I pass a property as an "out" or "ref" parameter if not then why not?   e.g.  Person p = new Person();    . . .  public void Test(out p.Name);


Let $X,Y$ be a Banach space and let $T:X\rightarrow Y$ be a surjective continuous linear operator. As mentinoed in this , we know there exists a right inverse linear operator.   But I want to know whether $T$ has a continuous right linear inverse $S$, i.e., there exists a bounded linear operator $S:Y\rightarrow X$ such that $T\circ S=\mathrm{id}_Y$.   In the case of finite dimensional vector spaces, linear operator is bounded linear operator. So there is nothing to prove.   This question is arisen when I study sum space of two Banach spaces.   Thanks in advance.

Could someone give a simple example of surjective (not bijective) bounded operator in Banach spaces without bounded right-inverse?


Hi Sorry if this is a simple question I just can't seen to get my head at what law is being violated due to a neutral pion decaying into a photon (I have an inclining its to do with 4-vector momentum however that further makes the neutral pion decaying into 2 photons less sense to me.) If anyone could help that would be great, thanks!

I recently read an old physics news about the Higgs boson where it was observed to decay into 2 photons and I was wondering why it wouldn't have decayed into a single photon with the combined energy of 2 photons?


Today, when I tried to login using my iPhone 6 (Chrome browser) on the meta.stackexchange.com during the , I got the following message on my screen:        Okay, I got the reason why the "login is currently unavailable". But, then my eyes caught the "red underline" in one of the tabs listed above (as seen in the screenshot). You can see the label is not visible for the current tab that I'm on. Just the red underline beneath it. This was the default screen loaded upon clicking the "login" link.  So out of curiosity, I clicked on the next tab to it i.e. "Badges", and here is what was displayed to me:        Now, here the current "Badges" tab label is not visible, just the red underline beneath it. But, if look carefully, I now can see the tab name "Users" whose title was invisible in the first screenshot. So, I clicked on the "Users" tab again to see what it loads and here is what was displayed to me:        Now, as doubted, the label "Users" is invisible, just the red underline beneath it. But, at least the "Users" list was shown correctly and not the login screen message.  Please note that this behavior was only occurred during the maintenance read-only mode. You can see the "notice banner" (in light yellow background) at the top of all the screenshots shown above. Now, I can't reproduce the error as the site is out-of-maintenance mode.  Can anyone please explain this.

When a site has a "system message" shown (such as the message shown on recently launched beta sites, like ), the mobile layout suffers:         Compare the above with how the mobile navigation bar normally looks:        Worse yet, a selected tab on the navigation bar is shown in white on white:         Observed in mobile Opera 27 on Android, and also in desktop Chrome 41 on Chrome OS, from where the screenshots are taken.   The problem is that  <div class="system-message-container"> is positioned where the navigation bar is supposed to be; if it is  deleted, the normality is restored.


The logo displayed at the top of each SE site is designed to link to the respective site's homepage. This works fine on most SE sites, except Meta SE.  For some reason, the logo is only clickable on its very left edge, as demonstrated below.    I'm using Opera stable 37.0.2178.43.  Using Inspect Element, this is what I see...

On every other site on Stack Exchange I can click on the site's title and be taken directly to the questions...     Except Meta.stackexchange.com   Here I actually have to click on the word "Questions" as there is no link active on the Meta title and logo.  Now I agree this isn't a big deal, however as I typically visit stack exchange pages up to a couple of hundred times a day, this one that doesn't fit spoils my flow. I am pretty certain it used to work.  It works for me in Firefox, and Safari on iPad, but even closing and reopening Chrome doesn't fix the issue.  Chrome is on Version 53.0.2785.116


I am trying to solve the following problem:   Let $A$ be an $n\times n$ matrix, and let $V$ denote the space of $n$-dimensional row vectors. What is the matrix of the linear operator ‘‘right multiplication by $A$’’ with respect to the standard basis of $V$?  I am not sure where to begin with this problem.


I have forgotten the password to log in to Ubuntu (15.10). My home folder is encrypted. I do have the passphrase. How should I change the user password? There are some procedures  but they do not mention if there is any difference if your home directory is encrypted. How to proceed?

I am using a cloned hard drive in attempts to restore some old files.   The cloned drive has 2 users, one with an encrypted home drive, one without. Both are administrators. When I couldn't get into the main user (with the encrypted home directory), I logged in as the 2nd user and changed the password.   It seems that I somehow broke the relationship between the encryption passphrase and the user. I'm pretty sure I have the passphrase. Is there a way to get to the data?


I am rather new to databases. I was reading up on  and it seems that the consensus is that RAID 10 is      RAID 10 is best is terms of performance and redundancy   However at the end article , the author went on to state      Independent pairs of RAID 1 is superior to RAID 10 provided application knows how to evenly distribute data across multiple volumes   The author:George Ou did an   to proof why independent pairs of RAID 1 is superior to RAID 10 though i cant really understand as i am quite new to databases  However another author : Robin  did his own  and rebuts George Ou analysis.  I am confused over all these analysis which is totally out of my depth.  These are my questions   Is it really true that Independent pairs of RAID 1 is superior to RAID 10 provided application knows how to evenly distribute data across multiple volumes In practice, it is easy to create an application that is able to even distribute data across multiple volumes and how is it done ?? Can someone provide a simplified explanation regarding the above 2 points??

This is a  about RAID levels.    What are:   the RAID levels typically used (including the RAID-Z family)?  deployments are they commonly found in? benefits and pitfalls of each?


How to prove$\forall n\ge5 $      $$\phi(n)\ge \frac{n}{6\log \log (n)} $$    $\phi$ is Euler function  Thanks in advance

Is it true that :  $\frac {n}{5} < \phi (n) < n$ for all $n > 1$ where $\phi (n)$ is  .  Since $\phi(n)$ has maximum value when $n$ is a prime it follows that maximum value of $\phi(n)$ in term of $n$ is $n-1$ , therefore $\phi(n)< n$ for all $n$. What is the best lower bound for $\phi(n)$?


I´ve cloned my production site in a local Xampp installation. My site has Memcached installed (in the server and I´ve got the drupal memcache module installed).  But I´ve got this error at my local site:     You must enable the PECL memcached or memcache extension to use   memcache.inc   (this is repeated at least 30 times, so that line is printed about 30 times at the top of every page).  Now, I´ve disable and unninstalled memcache at my local installation, and the error is still there.  I´ve tried after that deleting the additional settings added to my settings config file:     $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';   $conf['cache_default_class'] = 'MemCacheDrupal';   $conf['memcache_key_prefix'] = 'memcache_sitio';   $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';   But if I do eliminate those lines (after I´ve uninstalled -not only disabled- memcached module), I get WSOD and this error:     Fatal error: Uncaught exception 'PDOException' with message   'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc:2139   Stack trace: #0   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(2139):   PDOStatement->execute(Array) #1   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(664):   DatabaseStatementBase->execute(Array, Array) #2   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc(2318):   DatabaseConnection->query('SELECT expire, ...', Array, Array) #3   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\lock.inc(167):   db_query('SELECT expire, ...', Array) #4   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\lock.inc(146):   lock_may_be_available('schema:runtime:...') #5   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\bootstrap.inc(405):   lock_acquire('schema:runtime:...') #6 C:\Users\Victoria in   C:\Users\Vic\Desktop\XAMPP\htdocs\drupal\includes\database\database.inc   on line 2139   Please note that I´ve deleted all cache, tried disabling (and enabling) all performance options, and I´ve run run cron more than once.  What should I do? Thanks!

Recently I started getting an error every time I try and add a content no matter what type.  This is the error that shows up in the browser:     Additional uncaught exception thrown while handling exception.        Original   PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] => 0 ) in comment_count_unpublished() (line 313 of /Applications/MAMP/htdocs/modules/comment/comment.module).        Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:154:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&gt; 0 ) ";s:9:"%function";s:27:"comment_count_unpublished()";s:5:"%file";s:56:"/Applications/MAMP/htdocs/modules/comment/comment.module";s:5:"%line";i:313;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => ; [:db_insert_placeholder_7] =>  [:db_insert_placeholder_8] => 127.0.0.1 [:db_insert_placeholder_9] => 1338336955 ) in dblog_watchdog() (line 154 of /Applications/MAMP/htdocs/modules/dblog/dblog.module).   I also get the following error in my php error file:     PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/MAMP/htdocs/includes/database/database.inc:2136        Stack trace:   0 /Applications/MAMP/htdocs/includes/database/database.inc(2136): PDOStatement->execute(Array)   1 /Applications/MAMP/htdocs/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)   2 /Applications/MAMP/htdocs/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)   3 /Applications/MAMP/htdocs/includes/lock.inc(167): db_query('SELECT expire, ...', Array)   4 /Applications/MAMP/htdocs/includes/lock.inc(146): lock_may_be_available('theme_registry:...')   5 /Applications/MAMP/htdocs/includes/theme.inc(447): lock_acquire('theme_registry:...')   6 /Applications/MAMP/htdocs/includes/bootstrap.inc(427): ThemeRegistry->set(Array)   7 [internal function]: DrupalCacheArray->__destruct()   8 {main}         thrown in /Applications/MAMP/htdocs/includes/database/database.inc on line 2136   I am having a little trouble deciphering these error messages. Could anyone help me understand what's going on here?


Downloading and setting a new icon theme modifies the top panel icons. I want to keep the panel icons (Ubuntu-mono-dark theme).        Is that possible? How can I change the applications/folders & files icon theme (for example  Moka theme), but keeping the default top panel icons (Ubuntu-mono-dark)?   After setting Moka theme, the panel icons are changed, and I don't like them.

I want to merge the standard Ubuntu Mono icon set and the Faenza icon set. I would like to keep the standard Ubuntu icons in the panel (including icons for the likes of Dropbox, file transfers etc.) and replace all the other application icons with the Faenza versions.   How would I go about this?


What would be the correct article to use in the following sentence?  He proposed a ML-based parameter selection method  Should I use 'a' or 'an' ?

99% of the time, I'm clear on when I should use "a" versus "an." There's one case, though, where people & references I respect disagree.  Which of the following would you precede with "a" or "an," and why?   FAQ FUBAR SCUBA   [Note: I've read the questions  and , but the rules given there don't necessarily apply here.]    [Edited to add]  Here's a shorter (and hopefully clearer) version of the question…  In written English, which is correct (and why): "a FAQ" or "an FAQ"?  Some references with differing opinions:   an: the  and  a: the Microsoft Manual of Style for Tech Publications, 3e either: the  and


I have datetime in following format:      Tuesday, 14 February 2017, 4:10 PM   how to convert it to epoch using python ?

I've got a huge list of date-times like this as strings:  Jun 1 2005  1:33PM Aug 28 1999 12:00AM   I'm going to be shoving these back into proper datetime fields in a database so I need to magic them into real datetime objects.   This is going through Django's ORM so I can't use SQL to do the conversion on insert.


My prof said that the last round of the AES algorithm doesn't use the MixedColumns layer, yet this doesn't decrease security. If so, why the MC layer is used in the other rounds?

All rounds of AES (and Rijndael) have a MixColumns step, save the last round which omits it.  DES has a similar feature where the last round differs slightly.  The rationale, if I recall correctly, was to "make the cipher appear similar in reverse as it does in the forward direction."  Why does this make AES$^{-1}$ look similar to AES?  And how does this help in implementing the block cipher?


I'm studying php and I made this code:  $a = new DateTime('NOW');  $b = $a;  $b->modify("+1 day");  echo "<pre>";  print_r($a);      print_r($b);   And in both my print_r the results are the same, this:  DateTime Object (     [date] => 2017-12-29 15:05:27.000000     [timezone_type] => 3     [timezone] => America/Sao_Paulo ) DateTime Object (     [date] => 2017-12-29 15:05:27.000000     [timezone_type] => 3     [timezone] => America/Sao_Paulo )   Why is that?

It appears that in PHP objects are passed by reference. Even assignment operators do not appear to be creating a copy of the Object.  Here's a simple, contrived proof:  <?php  class A {     public $b; }   function set_b($obj) { $obj->b = "after"; }  $a = new A(); $a->b = "before"; $c = $a; //i would especially expect this to create a copy.  set_b($a);  print $a->b; //i would expect this to show 'before' print $c->b; //i would ESPECIALLY expect this to show 'before'  ?>   In both print cases I am getting 'after'  So, how do I pass $a to set_b() by value, not by reference?


I'm considering changing my 10 spd Shimano 105 cassette to an 11 spd Ultegra cassette. Do I have to change the rear derailleur or can I use the existing derailleur? Can the existing derailleur be adjusted and shift to the additional cog? Are derailleurs "speed" specific - 10 spd derailleurs, 11 spd derailleurs? Same for chains? Are they different for different size cassettes?

I've got a Boardman Road Sport which I use for commuting and doing reasonable length rides during the week etc. I have Shimano Claris as my rear derailleur and so is some of my groupset. I would like to upgrade my cassette to an either 9 or 10 speed to give me a greater variety of gears. To do this do I need to change my rear derailleur from 8 speed to Shimano 105 or something similar? Or can I just change my cassette? Do I also need to change my shifters as well?


Newbie to python.  I looked around the web and found raw_input() had some workaround to achieve timeout. But in 3.6 there is no raw_input()   name1 = str(input("please enter name of preferred student 1: "))  name2 = str(input("please enter name of preferred student 2: "))   I want user to enter input for first line in 5 secs, if he dint enter any input i want my code to skip for second line of code.

I'm calling a function in Python which I know may stall and force me to restart the script.   How do I call the function or what do I wrap it in so that if it takes longer than 5 seconds the script cancels it and does something else?


$\lim _{x\to 0}\left(\frac{a^x-1}{x}\right)$ I replace ${a^x-1} = t$ but dont know, what doing next.

I was messing around with the definition of the derivative, trying to work out the formulas for the common functions using limits. I hit a roadblock, however, while trying to find the derivative of $e^x$. The process went something like this:  $$\begin{align} (e^x)' &= \lim_{h \to 0} \frac{e^{x+h}-e^x}{h} \\ &= \lim_{h \to 0} \frac{e^xe^h-e^x}{h} \\ &= \lim_{h \to 0} e^x\frac{e^{h}-1}{h} \\ &= e^x \lim_{h \to 0}\frac{e^h-1}{h} \end{align} $$  I can show that $\lim_{h\to 0} \frac{e^h-1}{h} = 1$ using L'Hôpital's, but it kind of defeats the purpose of working out the derivative, so I want to prove it in some other way. I've been trying, but I can't work anything out. Could someone give a hint?


Is it permissible to bounty a question that is old (say, a year or older) even if it already has an answer? Is the bounty option specifying that a question needs to receive more attention allowed to be used if the question already has a high view count or has an accepted answer, or can bounties only be applied to questions with low view counts or which moderators consider to be currently unresolved?

A user had put a bounty on . The bounty was later cleared by a moderator, who sent the user a private message citing the reason for revoking the bounty (supplied by the user in chat):     We have cancelled your bounty on [the question]. Now that the issue you were discussing in chat (presumably why you started this bounty) has been cleared up, we see no need to keep highlighting this question. The original question was resolved a year ago.   As far as I understand, bounties can be freely applied to any eligible question by anyone with the required rep for any reason, and there is no explicit policy basis that says that bounties can be revoked simply because the moderators feel that there is no need to "highlight" a given question. (If there is such a policy, it would mean that bounties intended to be awarded to rather old existing answers wouldn't be permitted, but I see those happening and they don't get cancelled.)  Was there some different reason why the bounty was cancelled? Did the fact that they selected the "draw attention" reason play a part in the bounty cancellation? Does the user have a history of abusing bounties that I'm not aware of (hence the mod message warning)? Or was it just a helpful move so that the user doesn't waste the rep?


I need to calculate a expiry date difference.  I will get this epoch time:      1481410800  (06-Dec-2016 (14:42))   now I want to calculate the days until the expiry date (1481410800)  Calendar now = Calendar.getInstance();         SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM-yyyy (HH:mm)", Locale.getDefault());   //Expiry Date         long unixSecondsExpiry = 1481410800; //unixSeconds         Date expiryDate = new Date(unixSecondsExpiry*1000L);            long currentDate = now.get(Calendar.SECOND);          long diff = unixSecondsExpiry - currentDate;         long days = diff / (24l * 60l * 60l * 1000l);             String formattedExpiryDate = sdf.format(expiryDate);         String formattedDateNow = sdf.format(new Date());          Log.w("RUNTEST", "formattedDateNow: " + formattedDateNow);         Log.w("RUNTEST", "formattedExpiryDate: " + formattedExpiryDate);         Log.w("RUNTEST", "days: " + days);   I keep getting 17 days but it should be 5 days till expiry.     RUNTEST: formattedDateNow: 06-Dec-2016 (14:42)      RUNTEST: formattedExpiryDate: 11-Dec-2016 (07:00)      RUNTEST: days: 17

There is this example code, but then it starts talking about millisecond / nanosecond problems.  The same question is on MSDN, .  This is what I've got so far:  public Double CreatedEpoch {   get   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     TimeSpan span = (this.Created.ToLocalTime() - epoch);     return span.TotalSeconds;   }   set   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     this.Created = epoch.AddSeconds(value);   } }


I was just watching a video and came across the below prompt   Seems like lightening image is at the first and some big arrow like structure to display the directory path. Do you know how to do this in putty please? Thanks.

I just ran across a screenshot of someone's terminal:    Is there a list of all of the characters which can be used in a Bash prompt, or can someone get me the character for the star and the right arrow?


Suppose on a 2 dimension infinite grid, all nodes, or equivalently, all $(p,q)$ points, where $p, q \in \mathbb Z$, need to be painted with a color.  Is there a way that, given enough kinds of paiting colors, e.g. $n$, all sqaures will have at least 2 colors? i.e we can avoid to have any square that all its 4 vertexes are painted in the same color?  Or... is this impossible?

Color every point in the real plane using the colors blue,yellow only. It can be shown that there exists a rectangle that has all vertices with the same color. Is it possible to show that there exists a square that has all vertices with the same color ? If it is not possible, please give me an example of a coloring of the real plane that does not have monochromatic squares.  To give the viewers an idea about other similar results (which they might find useful), for any coloring (2 colors) of the real plane:  1) There exists three collinear points having the same color, such that one of the points is the midpoint of the line segment that joins the other two.  2)For any two angles $\theta,\phi$ there exists a monochromatic triangle that has angles $\theta,\phi,180-(\theta+\phi)$  3)For any angle $\theta$, there exists a monochromatic parallelogram with angle $\theta$  Now its natural to ask if there are any monochromatic squares.  Thank you


How can I have incoming texts read out to me? It can be useful when I am driving.

When I'm driving with a headset active (Bluetooth or wired), I want my Android to read me any incoming text messages.  Any references?


I'm trying to dual boot Ubuntu with Windows 10. I shrunk my windows 10 partition to create space for Ubuntu but when I try to partition the free space I am told I can't make more than 4 partitions. I'm not sure what to do/if I can delete either one of those 2 450MB partitions?

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


Assume $K/F$  be a field extension and $A,B \in M_n(F)$ and $P\in GL_n(K)$ such that $PAP^{-1}=B$. Can we find $C\in GL_n(F)$ such that $CAC^{-1}=B$?

Given a field $F$ and a subfield $K$ of $F$. Let $A$, $B$ be $n\times n$ matrices such that all the entries of $A$ and $B$ are in $K$. Is it true that if $A$ is similar to $B$ in $F^{n\times n}$ then they are similar in $K^{n\times n}$?   Any help ... thanks!


I am trying to solve the following problem, so some help would be appreciated. Prove that the ring $R=k[t^2,t^3]/(t^4)$ is Artinian and find a composition series for the ring. Where $k$ is a field and the ring $k[t^2,t^3]$ is defined as the set $\{f(t^2,t^3)|f \in k[x,y]\}$ with the obvious ring structure. So for the first part I noticed that, $R= \mathrm{span}_k([1],[t],[t^2],[t^3])$, considering $R$ as a $k$ vector space. An ideal $\mathfrak{a} \unlhd R$ is a $k$ vector subspace, considering considering $R$ as a $k$ vector space. So a descending chain of ideals,is a descending chain of vector subspaces which   it has to stabilize since R is finite dimensional. This I think proves that $R$ is Artinian. For the second part, I don't now how to proceed. I thought that somehow I would manipulate a chain of vector subspaces into a composition series of ideals, but I don't see a reasonable way to do so. On second thought, I tried to manipulate the ring $$\frac{k[x,y,z]}{(x-z^2,y-z^3,z^4)} \simeq R$$ but it seems even more complicated.  Putting the above problem in a broader context I would like to introduce my question: Let the ring $R$ be a $k$ algebra, such that $R$ is finite dimensional $k$ vector space and thus a Artinian ring. Is there a method to find a composition series of ideals for the ring $R$?

I came across the following problem Let $k$ be a field and $R=k[t^2,t^3]/(t^4)$. The ring $k[t^2,t^3]$ is defined as the set $\{f(t^2,t^3)|f \in k[x,y]\}$ with the obvious ring structure.  prove that the ring R is Artinian find ideals $A_0, \dots , A_n \unlhd R$ such that $$R=A_0 \supseteq \cdots \supseteq A_n$$ with each $A_i/A_{i+1}$ be a simple $R$ module.  for the first part, I know that in a short exact sequence of R-modules, the middle R-module is Artinian iff the two others are. I thing that $R \simeq k[x,y,z]/(x-z^2, y-z^3, z^4)$ but I don't now how is this helpful. for the second part I don't have a single clew how to proceed. Any hints, useful remarks or theorems that may help are appreciated.


Is landing in Italy as the port of first entry allowed on a Schengen visa issued by Greece? Is there any official website to take a print for records?

In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa?  Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa?  What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)?


Edited  I want to draw an SVG circle on my page with . I have constructed a skeleton custom module and I am returning the following render array from src/Controller/MyModuleController.php:  namespace Drupal\my_module\Controller;  class MyModuleController {   public function myModule() {     return array(       '#markup' => '

',       '#attached' => array(         'library' =>  array(           'social_statistics/circle',         ),       ),     );   } }   In my libraries.yml (located in the root of my module folder) I have:  circle:   js:     circle.js: {}     dependencies:       - social_statistics/d3  d3:   remote: https://d3js.org   version: 4.x   license:     name: BSD     url: https://opensource.org/licenses/BSD-3-Clause     gpl-compatible: true   js:     https://d3js.org/d3.v4.min.js: { type: external, minified: true }     # d3.min.js: { minified: true }   In circle.js, (also located in the root of my module folder) I have:  d3.select("#data-vis")   .append("svg")   .append("circle")   .attr("cx", 30)   .attr("cy", 30)   .attr("r", 20);   I'm getting the below error in the console, which suggests circle.js is being loaded, but not the d3 library dependency?     Uncaught ReferenceError: d3 is not defined

I'm trying to include a Javascript gallery () on my new Drupal 8 site and wrote a field formatter for this purpose.   Now I need to add the jQuery lightGallery to pages using this field formatter and call the library when the page is ready. I am confused about how I am supposed to do this, though.   I defined the library in the module containing my field formatter, but I'm not sure how I attach it only on sites that contain the field.   The documentation of the library uses the jQuery $(document).ready function to call the libary, how would that work inside a Drupal module?


I'm looking for a way to transfer files between two servers. I currently ssh into one server and use rsync inside a screen session to initiate a transfer from the other host. This works, but I'm looking for a web interface to do the same thing.  I'm imagining something I can run on one machine that shows the local files and can connect to some other box, list the files, and transfer across. It'd be like an FTP client but the client machine would be the one serving the web application rather than the one running the browser (which is what  does).   I've searched for web-based ftp and rsync applications but can't seem to find anything. Does something like this exist?

Is there a tool which I can user to send files between two remote servers? For example, I have hosting at hostgator and I create a directory there. Then I use that tool to send files from some other remote storage to that directory.   I want to skip the step of downloading files to my computer and uploading it to another storage.


$$\sqrt{ 3x }= x + \sqrt {3}$$  Give x in the form  $$A \sqrt {B} + C $$ Can you show me how this is done step by step.   The answer I have in the book is:  $$\frac {1}{2} \sqrt{3} + \frac {3}{2} $$  this is where I got stuck:  $$ \frac {x^2 +2x \sqrt{3} +3}{3x} $$

$$\sqrt{ 3x }= x + \sqrt {3}$$  this is what i tried   $$\sqrt{ x }= (x + \sqrt {3})^2\\ = x^2 + 3 $$  Give x in the form  $$A \sqrt {B} + C $$ Can you show me how this is done step by step.   The answer I have in the book is:  $$\frac {1}{2} \sqrt{3} + \frac {3}{2} $$


What is it?: A science fiction (TV) movie, or pilot episode. Tell us what it isn't: It is not Star Trek, Buck Rogers, Battlestar Galactica. I have skimmed lists of science fiction movies from the 70s, 80s and 90s on Wikipedia, but haven't been able to find it. Tell us what made it memorable: It felt less campy than most sci-fi of the time. The crew of a spaceship exercises using small patches on their bodies simulating gravity/weight. There was a bald villain who was related (brother?) to one of the (female?) characters of the crew. The finale takes places on a barren surface with the villain climbing some metal frame construction. When did you see this film?: Early 90's on Dutch TV. It was probably broadcast more than once.  How old was it?: Unsure, but it has an 80s (early 90s) vibe. What language was it?: English. Was it part of a series?: Probably not (though it could be the pilot of one). What details can I recall?: Set and costumes were minimalistic. Not very colourful, cool tones (blue). The pace/action was a bit slower. Other details: The intro might have shown the characters' faces partly as wireframes (or similar effect). The movie probably did not contain any aliens or non-human characters (at least not in appearance).

When I was a kid we had a VHS tape of some Disney live action (not animated) sci-fi movie. It may have been a mini-series or a made-for-tv movie, but I'm not sure. I'm also not sure about the year but it would probably have been late 80s or early 90s based on when I would have seen it. I know it was Disney because they had some live action Goofy and Mickey running around the movie's set as an introduction discussing the plot with a host before the movie.  The plot is basically as follows:   A starship is loaded with mostly children and teenagers as a cross-galaxy human settling effort. Accidents (which are not really accidents and later revealed) cause adult crew members to be killed.  They travel to another planet and face all sorts of troubles. It arrives at the new planet after overcoming obstacles.   Other memorable scenes that may help:   Navigating out of earth's asteroid belt made out of space junk. One of the adults was killed via an airlock malfunction. The ship was supposed to be peaceful with no weapons. At one point they bring on board some crazy guy who puts together a rail gun. There's a memorable line like "Do you want no weapons at all or a well aimed rock?"  There's a planet or space station (I can't remember which) that has a fight scene with the evil bad guy. This scene takes place on what looks to be a carnival or fairground. The bad guys are trying to steal the ship the kids are on because it has some kind of really good futuristic space drive.   Hopefully you remember it better than I do! I've tried looking online for it before with no luck.


public class Test3 {  public ArrayList<String> list;   //storing all data in this lsit  //test() is main test method where program gets triggered  @Test public void test(){     list=new ArrayList<String>();      list.add("1");     list.add("2");     list.add("3");     Testing t=new Testing();      //creating object to call testmtd     t.testmtd();     System.out.println(list);     } }  public class Testing { public void testmtd()   {        Test3 t=new Test3();       //created object to access list of Test3 class      System.out.println("run1");     for(int i=0;i<=t.list.size();i++)         {         String data=t.list.get(i);           //here i am not able to access the data present in the list of Test3 class         System.out.println(data);         }     } }

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


I've defined the function  def f(array):     return list(filter(lambda x: (x is not 0.0) and (x is not 0), array))   and here's what happens we I try to pass a list with a 0.0 in it.  >>> f([0.0, 1, 0, 2, False]) [0.0, 1, 2, False]   What I'd expect returned is [1, 2, False] since my filter should have thrown out the 0.0 and 0, but not the False.  For some reason, the filter is not picking up the x is not 0.0 part, but it's working on the x is not 0 part fine.  I'm dumbfounded.    Edit: I've added in a False value to show why I'm not just using x != 0.

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


After few hours of trying, I registered here to ask you.. I want to install Line messenger on my Ubuntu 12.4. Among other things, I tried to do this:    But it just doesn't work. Is there any way that Line works in Ubuntu, or I really have to switch to Windows because of this :/

I would like to install  chat platform on my Ubuntu 12.04 LTS system. Please, could anyone provide me the steps to successfully install this software?. I've been trying to install this software using wine but I couldn't succeed it.


I have this simple bit of code:  import re kek = "./${COMPUTERNAME}/exe/jej" reg = r"\${(COMPUTERNAME)}" print kek print reg match2 = re.match(reg, kek) print (match2)   which output:     ./${COMPUTERNAME}/exe/jej      \${(COMPUTERNAME)}      None   So it doesn't match. I tested the string on regex101.com and on other websites as well, and it is working as intended (this is actually a test regex since i was trying to debug a larger regex), and i can't find why would it not work with python...  I also tried multiple combination with more or less backslashes.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


I'm a total beginner with my Nikon D5100 and i'm trying to shoot in auto mode. When I attach the AF-S Nikkor 18-55 mm lens, the camera says "lens not attached" unless I have it in M (manual) mode. I have checked and the lens is switched to A. Any help would be appreciated!

I have a Nikon D3100 camera, and am trying to use an "Automatic Fixed Mount Vivitar 200mm lens" with it. When I attach the lens, I get the message "Lens not attached". and nothing works. HELP!  I can't easily take it to a camera shop, as I live in the Mojave Desert, about 200 miles away from any camera shop. This is a new lens, and a new camera.


i tried making a program that executes X minutes after the user gets to that point in the code. i thought of making a variable for the minutes and making another variable wich is that +X. and than a while loop. but if you have 10 minutes for example and the current time is 12:53 that is not going to work as well.

I would like to know how to put a time delay in a Python script.


How many non-isomorphic Abelian groups of order $2^7 3^4 5^2$ are? How to find?

Is there a number $n$ such that there are exactly 1 million abelian groups of order $n$?   Can anyone please explain. I would yes because numbers are infinitive, and so any number n can be expressed as a direct product of cyclic groups of order n.  Can anyone please help  me understand.  Thank you.


I am extracting a string and need to check whether it follows a particular pattern      <![any word]>   if so I need to replace it with "". I am trying the following code  string1 = "<![if support]> hello" string = re.sub(re.compile("<![.*?]>"),"",string1) print(string)   But I am getting the output as  <![if support]> hello    I wish to get the output as hello. What am I doing wrong here?

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I'm dealing with some problems in a few files about the encoding. We receive files from other company and have to read them (the files are in csv format)  Strangely, the files appear to be encoded in UTF-16. I am managing to do that, but I have to open them using the codecs module and specifying the encoding, this way.  ENCODING = 'utf-16' with codecs.open(test_file, encoding=ENCODING) as csv_file:     # Autodetect dialect     dialect = csv.Sniffer().sniff(descriptor.read(1024))     descriptor.seek(0)     input_file = csv.reader(descriptor, dialect=dialect)      for line in input_file:        do_funny_things()   But, just like I am able to get the dialect in a more agnostic way, I 'm thinking it will be great to have a way of opening automatically the files with its proper encoding, at least all the text files. There are other programs, like vim that achieve that.  Anyone knows a way of doing that in python 2.6?  PD: I hope that this will be solved in Python 3, as all the strings are Unicode...

I received some text that is encoded, but I don't know what charset was used. Is there a way to determine the encoding of a text file using Python?  deals with C#.


Let $f$ be a continuous function for $x\in[0,1]$ and it has this property that $$ \lim_{x\rightarrow 0}\frac{f(x+1/3)+f(x+2/3)}{x} = 1 $$ How to prove that there exists $t\in[0,1]$ such as $f(t)=0$.

Let f be continuous function on [0,1] and $$\lim_{x→0} \frac{f(x + \frac13) + f(x + \frac23)}{x}=1$$ Prove that exist $x_{0}\in[0,1]$ which satisfies equation $f(x_{0})=0$  I suppouse that the numerator should approach $0$ which would implicate that for  x near $0$ $f(x + \frac13)$ would be of opposite sign then $f(x + \frac23)$ or both be $0$.  Then by intermediate value theorem we would know that there is $x_{0}\in[\frac13,\frac23]$ which fulfill  $f(x_{0})=0$  Yet, I have no idea how to prove that numerator $\rightarrow 0$


I'm trying to fetch the data from SQLite database in the form of String array.  In my Activity:  public class CreateTagActivity extends Activity  {      ListView tagList;     DBFunctions db;     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_create_tag);          tagList=(ListView)findViewById(R.id.list_of_tags);         db=new DBFunctions(CreateTagActivity.this);          String[] tagsLists=db.getAllTag();          ArrayAdapter adapter=new ArrayAdapter(CreateTagActivity.this,android.R.layout.simple_list_item_1,tagsLists);         tagList.setAdapter(adapter); } }   In my Database File :  public class DBFunctions extends SQLiteOpenHelper { private static final String DATABASE_NAME="maindb"; private static final int VERSION=1; private static final String event_tags="CREATE TABLE "+TABLE_TAGS+"(_id INTEGER PRIMARY KEY AUTOINCREMENT,tag TEXT)";  private final Context context;  public DBFunctions(Context context) {     super(context, DATABASE_NAME, null, VERSION);     this.context=context; }  @Override public void onCreate(SQLiteDatabase db) {      db.execSQL(event_tags); }  @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {      db.execSQL("DROP TABLE IF EXISTS "+event_tags);     onCreate(db); }  public long insertTag(String tag) {     SQLiteDatabase db=this.getWritableDatabase();     ContentValues values=new ContentValues();     values.put("tag",tag);     long id=db.insert(TABLE_TAGS,null,values);     return id; } public String[] getAllTag() {     SQLiteDatabase db=this.getWritableDatabase();     String[] columns={"tag"};     Cursor cursor=db.query(TABLE_TAGS,columns,null,null,null,null,null);     int length=cursor.getCount();     String[] value=new String[length];     while(cursor.moveToNext())     {         int i=0;         int index=cursor.getColumnIndex("tag");         value[i]=cursor.getString(index);         i++;     }     return value; } }   then i got an error as NullPointerException in tagsList.  here is the Error log:  09-17 11:17:03.695    3084-3084/? E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: pack.proj PID: 3084 java.lang.NullPointerException         at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:394)         at android.widget.ArrayAdapter.getView(ArrayAdapter.java:362)         at android.widget.AbsListView.obtainView(AbsListView.java:2255)         at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)         at android.widget.ListView.onMeasure(ListView.java:1175)         at android.view.View.measure(View.java:16540)   Please help me on this. Thanks.

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


I am studying divisibility and come across this rule. I think the rule is too complicated and hard to understand and remember. What is the best way to judge whether a number is divisible by 13 without having to remember this rule?      Delete the last digit from the number, and then subtract 9 times the deleted digit from the remaining number. If what is left is divisible by 13, then so is the original number. Repeat the rule if necessary.

I've been trying to figure out if a number is divisible by $13$.  As I'm saying this in first person, I think I'm supposed to take the rightmost digit of the number, for example, $39$, multiply it by 9, and finally subtract the digit from the rest of the digits put in order to the left of that rightmost digit.  The final result has to be divisible by $13$.  So, in $39$, $9*9=81-3=78$, and $78$ is divisible by $13$.  I think this is it.  Am I on the right digit track?  I just want some answers with words that will satisfy me.


Looking for a LaTeX editor for Windows with the following features:   Live preview. (Inherited live preview, not something achievable if you do some tricks.) RTL language support. (Hebrew for example) Auto-complete LaTeX keywords. (Like in )    Googled and browsed other questions here, on SO and on . All I find is either only for mac or have no live preview.   Can someone please point one app that support all the features stated above?

What editors/IDEs are available for easing the process of writing TeX/LaTeX documents? Please state some useful features like code completion, spell checking, building final DVI or PDF files, etc.  This question is undergoing a systematic refurbishment, see  on Meta. If you’d like to see another editor feature covered here or to take care of an editor that’s not covered yet, share your ideas in that meta question.  List of editors Links to answers.


What is a relationship between the focal length of the lens and the sensor size to achieve the same image area ?

I'm reading that a 50mm lens is recommended as a first prime lens for DSLR owners as it's supposed to give a 'natural' perspective, but when used on (most) DSLRs, the view is cropped, as if you were zoomed in by 1.5-1.6x, so it's more of a telephoto lens when used on a DSLR. I've also read however that the 50mm lens gives the same perspective on a DSLR and a 35mm, and shouldn't really be considered to be 'equivalent' to an 80mm lens as the crop factor isn't really a magic focal length changer.  Can someone explain how the image is different from (for example) a 50mm lens on a DSLR and an 80mm lens (assuming 1.6x crop factor) on a 35mm camera?


I visited New York City, USA on an ESTA at the end of last year and stayed for ten days. I now want to visit for two months from 28th Feb.  Do I need to apply for another ESTA or am I covered by the last one?

I wish to travel to the US and think I am eligible to do so under the Visa Waiver Program. I found a lot of information out there but am still having some trouble understanding how this works.  What is the US Visa Waiver Program? What is an ESTA?


What does it mean and what does 'ain't' mean here in particular? Also this kind of double negative surprised me, is it correct?

I know the ultimate meaning of this is "I have no money."  But why? If ain't means have not, then isn't it true that "I ain't got no money" would be read as "I have not got no money"?  Can I have not got [no money] be interpreted as double negative, and hence determining that "I have money", which is not the true meaning of such saying?


I have a problem with my If statement. The code runs without any problems, but it does not show the outputs for my if statements. It runs through all my JOptionboxes all the way to the end. Until it goes through my if statements.   import javax.swing.JOptionPane;  public class CurrencyConversion {  public static void main(String[] args) {  int x = 0; double result,result1, result2; String THAI = "THAI", EURO ="EURO", JPY = "JPY";  String name = JOptionPane.showInputDialog("What is your name: "); String message = String.format("Welcome %s, to the Currency Exchange Program ", name); /*inputs name in %s*/  JOptionPane.showMessageDialog(null,  message); //displays the String format message String currency = JOptionPane.showInputDialog("Which currency do you wish to exchange: "+THAI+ ", "+EURO+ ", "+JPY); x = Integer.parseInt (JOptionPane.showInputDialog("Insert US Dollar Amount: ")); result = x * 32.57; //US TO THAI result1 = x * .86; //US TO EURO result2 = x * 117.50; //US TO JPY   if (currency == "THAI"){     JOptionPane.showMessageDialog(null,"US Dollar Amount of "+x+ " dollars to be converted to "+THAI+" is: ");     JOptionPane.showMessageDialog(null,result+ " BAHT"); }if (currency == "EURO"){         JOptionPane.showMessageDialog(null,"The Amount of "+x+ " dollars to be converted to "+EURO+" is: ");         JOptionPane.showMessageDialog(null,result1+ " EURO"); }if (currency == "JPY"){             JOptionPane.showMessageDialog(null,"The Amount of "+x+ " dollars to be converted to "+JPY+" is: ");             JOptionPane.showMessageDialog(null,result2+ " JPY"); }//end THAI if   }//end main

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


I installed the nvidia drivers using the Software & Updates GUI. Alas, when trying to install  I realized that something was not working:  ignacio@ignacio-XPS-8930:~$ nvidia-smi -a NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA  driver. Make sure that the latest NVIDIA driver is installed and running.   This screenshot shows that ubuntu is telling me that the nvidia driver is installed    How can I fix this?

This issue happens only on UEFI systems with enabled Secure Boot.  When I try to install DKMS modules like VirtualBox, Nvidia, or Broadcom drivers, they do not install and I get Required key not available when I try to modprobe them.  VirtualBox complains that vboxdrv is not loaded.  Broadcom wl driver is shown in lspci -k as a kernel module but is not in use. sudo modprobe wl throws Required key not available.  Also this issue may happen when I install some kernel modules from git sources.  This issue may appear after a kernel update as disabled wireless adapter, black screen after a reboot, etc.   How can I fix it?


What techniques are out there that allow you to create a gradient like the ones pictured above? Is this a product of a specific brush set? Or is there some type of Noise Manipulation / Gradient Pattern going on in this image?

I am trying to achieve, for lack of a better term, a speckled shading in Photoshop. I'm not getting the right effect using noise (even with a gaussian blur) or setting the layer to dissolve.   Here are a couple of good examples of what I'm referring to (they are not exactly the same, but they seem to employ a similar style):       (less so the top edge, more so everything else)  I'd appreciate any help (and, if I'm referring to this technique incorrectly, please let me know)!


i want to search a title that include apostrophe in it. i call the title from variable.  for example:  $mytitle = "Daddy's Home";   then i try to search it.  $apostrophe = $val; $replacementsapostrophe = [ "'" => "''", ]; $newval = strtr($apostrophe, $replacementsapostrophe);  $query2 = $db->prepare ("SELECT category, id_master_post, master_post_name FROM `master_post` WHERE master_post_name = '$newval'"); $query2->execute(); $value2 = $query2->fetch();   Error given     Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or   access violation: 1064 You have an error in your SQL syntax; check the   manual that corresponds to your MariaDB server version for the right   syntax to use near 's Home 2'' at line 1 in   C:\xampp\htdocs\piratefiles\list.php:31 Stack trace: #0   C:\xampp\htdocs\piratefiles\list.php(31): PDOStatement->execute() #1   {main} thrown in C:\xampp\htdocs\piratefiles\list.php on line 31   im already try '%''%' still not working.

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


I have a Main class:  public class Retrigger {     public static void main(String[] args){         Long i= 97944605L;         com.armus.flow.Implement rdf = new com.armus.flow.Implement();         try {             rdf.retrfail(i);         }         catch(Throwable e){             System.out.println("In exception a = "+e+" "+i);             e.printStackTrace();             return;                     }     } }   I am calling method retrfail of the Implement class and passing a long value:  import com.armus.common.Dsessionservice;  public class Implement     extends Remote     implements DMSer, Ajaxser {      private Dsessionservice flowservice;      private Dsession getDsession(long sessionId)       throws ServiceException {       try {           dss = this.flowservice.getprocessname(Long.valueOf(sessionId));       }       catch (ServerException e) {           //some code       }       //some code     }      public void retrfail(long sessionId) {         Dsession dss = getDsession(sessionId);         // some code     } }   The implementing class passes the id to other Dsessionservice interface to get the process name.  public abstract interface Dsessionservice  {   public abstract Dsessionservice getprocessname(Long paramLong)     throws ServerException;   }   The program compiles fine. But I am getting java.lang.nullpointerexception when running the program at the below line  dss = this.flowservice.getprocessname(Long.valueOf(sessionId));   What am I doing wrong here.   Can someone please help?

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


I'm looking at this IC:   And noticed under "typical application" a simple circuit diagram. What is the purpose of the capacitor that connects Vin directly to ground?  How does this affect the current/voltage being applied to vdd and the LED?  I have virtually no understanding of how/why capacitors are used in general. My very limited electronics experience has just about covered resistors. Would appreciate small words, and possibly somewhere to get further information (free online courses?)

What is a decoupling capacitor (or smoothing capacitor as referred to in the link below)?  How do I know if I need one and if so, what size and where it needs to go?    mentions many chips needing one between VCC and GND; how do I know if a specific chip is one?   Would an  4-bit parallel access shift register used with an Arduino need one? (To use my current project as an example) Why or why not?  I feel like I'm starting to understand the basics of resistors and some places they're used, what values should be used in said places, etc, and I'd like to understand capacitors at the basic level as well.


I would like to add a small quotations as we can find in books before a chapter.  Is there a simple command to do this ?  I use Xelatex and biblatex, with author-year style

I recall seeing a package to make quotes like that of the following image at the start of a chapter, but I can't seem to find it again.    (This image is from the book Combinatorics and Graph Theory by Harris, Hirst, and Mossinghoff)


By mistake, I tried the command sudo apt-get update while I was connected by vpn. However, I closed the vpn connection and now when I try to update the following error appears:  Hit:1 http://packages.microsoft.com/repos/vscode stable InRelease  Get:2 http://security.ubuntu.com/ubuntu focal-security InRelease [107 kB]                                        Ign:3 http://ppa.launchpad.net/webupd8team/java/ubuntu focal InRelease                                                                 Err:4 http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release                                                                     404  Not Found [IP: 91.189.95.83 80]  Hit:5 http://in.archive.ubuntu.com/ubuntu focal InRelease                                                                   Hit:6 http://dl.google.com/linux/chrome/deb stable InRelease                                                                Get:7 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [107 kB]                                                  Get:8 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease [98.3 kB] Get:9 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [16.6 kB] Get:10 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [122 kB] Get:11 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [208 B] Get:12 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [59.8 kB] Get:13 http://in.archive.ubuntu.com/ubuntu focal-updates/main Translation-en [44.6 kB] Get:14 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [90.4 kB] Get:15 http://in.archive.ubuntu.com/ubuntu focal-updates/universe i386 Packages [27.3 kB] Get:16 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [68.3 kB] Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/universe Translation-en [28.3 kB] Get:18 http://in.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [136 kB] Get:19 http://in.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 48x48 Icons [66.0 kB] Get:20 http://in.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 64x64 Icons [104 kB] Get:21 http://in.archive.ubuntu.com/ubuntu focal-updates/universe DEP-11 128x128 Icons [264 kB] Get:22 http://in.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [532 B] Reading package lists... Done        E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu focal Release' does not have 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.   Is this a vpn issue or an IP issue? I am unable to figure it out. Please suggest.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I have to compute  $$ \lim_{n\to\infty} \exp(-n)\left(1+n+\frac{n^2}{2}+\ldots+\frac{n^n}{n!} \right)$$  I think the value is 1, but i don't know how to proof this. Do I have to estimate the remainder of the Taylor expansion of the exponential function? Does anyone have a hint for me?   So do I have to show that $$ R_{n} (x) = \int_{-\infty}^{x} \frac{\exp(t)}{n!} \left(x-t\right)^{n}\mathrm{d}t $$ goes to 0? Or is there an easier way?

I'm supposed to calculate: $$\lim_{n\to\infty} e^{-n} \sum_{k=0}^{n} \frac{n^k}{k!}$$ By using WolframAlpha, I might guess that the limit is $\frac{1}{2}$, which is a pretty interesting and nice result. I wonder in which ways we may approach it.


I'm in a discipline where it is common to make preprints publicly available on arXiv as soon as they're ready to be submitted to a journal, so naturally I list them on my CV. Before the review comes in I would just list the paper as "Preprint" and after it's been officially accepted I would list it as "To appear in XYZ". I wonder what is the best course of action between those two states, that is, after the paper has received positive reviews but there are still corrections to be applied and it has not been officially accepted (but I'm willing to bet that it will be). Is it reasonable mention that the paper is "Submitted to XYZ" in such a case? That has the benefit of providing more complete information, and is definitely a statement that I can justify if pressed. Or is it always preferable to stick with "Preprint" until officially accepted?

there are similar questions on how to list on CV publications that have not passed the accepted or in press stage when applying to junior research positions ( PhD/postdoc).  I am not clear if such publications should include the journal name or not, and what would be the reason for either choice.


Our relatives in the Philippines have just been given their visitors' visas for coming to the UK, but the starting date is given (on the visas) as 27th March, rather than  29th April as given by them on their application forms.  Expiry of the visas is therefore given as 27th September.  Can they nevertheless stay for 6 months from their entry date, or do they have to leave within the dates given on their visas?  They potentially lose a month at least...

UK visitor visa allows you to stay for 180 days for say a 2-year period between 01/01/2018 to 31/12/2020. Does this mean you need to leave the UK on or both 31/12/2020?  I know that on a Chinese visa the "to" date is the last day you are allowed to enter China. You can for 90 days afterward. I presume this is not the case for a UK visa?


Travelling from Busan to Hanoi with EU passport. Do I need to show flight ticket out of Vietnam?  Departing Busan, arriving in Hanoi.  I have an EU passport (Swedish). Do I need to show a flight ticket out of Vietnam at either of the airports? My plan is to fly to Hanoi and then take a bus out of the country. I do not need a visa as I have visa free entry for 14 days. But the question is if I need to show anything but the one way ticket to Hanoi.  Vesa

I am Lithuanian (EU citizen), on a single entry 3-month visa. I have crossed from  do I need one when coming into Vietnam from Malaysia by air?


Hi i've been struggling a bit and i cant seem to find why the methods i found dont work, could be "fixture-0"   First Object array   personformdata[i]: "{"isInvalid":false,"agentRole":"role"}"   Second   address_ids[i] : "[{"address_id": "fixture-0" }]"   preferable out come, something like this.  "{"isInvalid":false,"agentRole":"role", "address_id": "fixture-0"}"

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I'm a first year physics student and i've just learnt this equation for angular velocity in spherical polar coordinates:   $\omega=\dot{\phi}\mathbf{e_z}+\dot{\theta}\mathbf{e_\phi}$   The diagram i am using is on the RHS of this link:    I don't understand why this eqn is correct. Let's take the case where we imagine a vector going around in purely the xy-plane, a horizontal circle. Therefore $\theta=constant$ so in the above equation, $\dot{\theta}\mathbf{e_\phi}=0$. Now  $\omega$ should be a vector that only has $\mathbf{e_x}$ and/or $\mathbf{e_y}$ component since it is only moving in that xy plane. But, from the equation, we're left with $\omega=\dot{\phi}\mathbf{e_z}$. But $\mathbf{e_z}$ is perpendicular to xy plane, so $\omega$ which is always pointing in a direction on this horizontal circle should have no $\mathbf{e_z}$ component.   I feel like i'm missing something very key. Anyone help me get out?  Much appreciated.

Angular velocity is the rate of angular displacement about an axis. Its direction is determined by right hand rule.  According to right hand rule, if you hold the axis with your right hand and rotate the fingers in the direction of motion of the rotating body then thumb will point the direction of the angular velocity.  The direction of angular velocity is above or below the plane. But what does it mean? I mean in linear velocity the direction of velocity is in the direction of motion of body but what does it mean that body is moving in one direction while the direction of its angular velocity is in another direction?


I've been trying to send a string of data from my activity to a fragment using bundle but when I try to access it, it gives a nullpointerexception.  The oncreate method in the activity looks like this   @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_chart);      // Setup toolbar and title     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);     readDb();     printChart();     printTop10();      Bundle bundle = new Bundle();     bundle.putString("edttext", myString);     // set Fragmentclass Arguments     ToolbarFragment fragobj = new ToolbarFragment();     fragobj.setArguments(bundle);  }   and the fragment on the onCreateView looks like this  @Override public View onCreateView(LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {      String strtext = getArguments().getString("edttext");     // Inflate the layout for this fragment     return inflater.inflate(R.layout.fragment_toolbar, container, false); }   any help to get rid of the nullpointer would be appreciated, I'm trying to send data to the fragment so it can use the share button and share the data

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


Shortly I will leave from the UK to the EU, bringing with me my laptop which I purchased here in the UK. When I go back to the UK, do I need to declare my laptop? I have purchased it years ago in the UK for a bigger price than the one allowed by the personal allowance sum (390£).

Until now when arriving from EU to the UK I was walking green corridors and life was good. Now gov.uk website says this ():  You can bring in other goods worth up to £390 (or up to £270 if you arrive by private plane or boat). If you go over your allowance you pay tax and duty on the total value of the goods, not just the value above the allowance. You may have to pay customs duty if you exceed your allowances. You may also have to pay import VAT.  Does that mean that now I should go in the red corridor and declare my iPhone 12 and my Apple Watch Series 6? And pay every time I move through the border? Or keep receipt?


I am using the following counter:  \newcounter{foo}   \newcommand\num{     \refstepcounter{foo}       \thefoo.}   Two (2) spaces are automatically inserted between the preceding word and the counter -- e.g., word \num shows up in the pdf file as word  1.  Is there a way to have just one space between a word and a counter?  If possible, I'd like to avoid writing word\num and would prefer to write it like word \num

I see that the code in many packages and examples contains percent signs % at the end of (many) lines. What are they used for? Do they affect the parsing of those lines?


Around Earth spacetime is curved but what about space? It's still Euclidean around Earth but what about more massive bodies.  geometrically how different is space around a massive body.   NO COORDINATES.

Gauss went out and measured triangles made up of mountain peaks to show that the angles sum up to 180 degree.  However, general relativity leads to non-Euclidian space and I would like to get a better feeling for it.   What would be the sum of angles in a triangle that has all corners on earth's orbit (and with sides of equal length)? The sides are defined by light beams traveling between the corners.


I have physically swapped the my two screens around and have used the display setting to switch them so that the mouse moves between the two screens in the expected way.  But now the launcher is attached to the screen on the right, so how can I move it to the left screen?

I have two monitors. The left monitor is set as primary, but the Unity Launcher appears on the right monitor.    How can I move it to the other monitor?


I am building a simple voltmeter circuit that needs to measure up to about 35 volts.  Looking around the web, I am finding all sorts of suggestions for voltage divider values, like 1 Mohm / 10 Kohm, and the one I am currently experimenting with, which is 10K/2K.  I am having issues with allowing enough time between readings for the Arduino Nano to settle down, of course, but that is not the question.  Using 10K/2K it maxes out at a reading of 1020 on A6 with an input of 27 volts.  I do not understand why one posting says to use resisters in the Mohm range and the other (that I am using) is a total of 12k.  Question:  Is there a rule of thumb that should be used to decide what resistances should be used for the divider for measuring this level of voltage?   And how important might it be to keep the resistance between Vcc and GND higher than what I am using?   -- EDIT:  EE asked me if this was the same as another suggested Q/A - and this is only different because it is specific to the Arduino's ADC input impedance.  The other answer only talked about the ratios.    The answers to this are great for my particular application.    --FURTHER EDIT:  Based on the collective berating from the powers that be, I would mention that this started in an Arduino forum where I was concerned about the particular ADC, then it got moved here.  Calling this a duplicate is incorrect.  It is very specific to the Nano application.  I wanted to make sure my small values wouldn't cause problems by being between Vcc and GND.  Plus, I did not know the proper input impedance for the Nano's ADC.  It all got answered here, nicely.  Thus I believe it stands as being unique here.  I can find no duplicates of this particular question.  Being marked this way with no explanation is frustrating.  If there really are duplicates then I would like to see their answers.  But finding none, this one adds to the community and I believe it should not be marked as a duplicate here.  And the good thing is that one respondent brought up smoothing capacitors.  So now I am using one, and it helps stabilize the readings.  So this has been a positive experience.  The problem now is that Arduino people won't necessarily know to look here for this answer when they try to use their Arduinos this way.  So there will likely be duplicate questions there which just got answered here.

I understand that the output voltage is determined by the ratio between the two resistor values, and that if the both resistors are same then output voltage will be exactly same for all; but what's the basis of picking the resistor values?there is any need of consider output current to choose resistor value.


Given $A \subseteq \mathbb{N}, A \neq \emptyset$, prove that A has a minimum element.   Can anyone help me with this problem?

I have to show that in any non empty subset of $N$ there is least element. Note: This is not a homework question.   So this is how my incomplete proof looks like. And I tried this by induction: let $S$ be nonempty subset of $N$. I defined $M = \{m \in N \mid m\le s \text{ for all } s \in S\}.$ Then I showed $1$ is in $M$. I did this using proof by contradiction. Now if $s$ is in $S$ then $s < s^+$. So $s^+$ is not in $M$. Thus $M$ is not equal to $N$.  Thus there exists $z$ in $M$ such that such that $z^+$ is not in $M$. Now I have to show $z$ is the least element of $S$. Since $z$ is in $M$ by the way $M$ is defined $z$ must be least element of $S$. But what if $z$ is not in $S$? What should I do? Help please.


Here is my DDL statement:  create table if not exists 'fmrecruit'.'resource_type'(   'ID' bigint not null auto_increment,   'type' bigint null,   'first_name' varchar(30) not null,   'middle_name' varchar(30) null,   'last_name' varchar(30) null,   'org_name' varchar(45) null,   'notes' varchar(256) null,   'primary_skills' varchar(256) not null,   'seconadary_skills' varchar(256) null,   'created_by' varchar(25) not null,   'created_date' timestamp not null,   'updated_by' varchar(25) null,   'updated_date' timestamp null,   primary key('ID'),   index resource_type_fk_idx('type' asc),   constraint resource_type_fk foreign key('type') refrences fmrecruit.resource_type('ID')   on delete no action   on update no action)   engine=innodb;

In MySQL we can create queries with or without the backtick (`) symbol. Example:   SELECT * FROM TEST; SELECT * FROM `TEST`;   Both works fine in mysql-console.  Is there any technical difference between them?  Is there any benefit using (`) over over simple queries?


I am running Ubuntu 15.10 in VMware Workstation.  HOST OS -WINDOWS 10  Now my hard disk  is full and i attached a new vmdk hard disk and rebooted the system but while trying to mount it using  sudo /dev/sdb1 /data it's giving following error   mount: wrong fs type, bad option, bad superblock on /dev/sdb    How to properly mount hard vmdk disk?

Is it possible to mount a virtual hard disk (VHD, HDD, VDI, VMDK) on Ubuntu? How can this be done?


struct Node {     char        c;     double      d;     int         s; } Node;   I recently started studying linked lists and in between just trying random things to explore. I tried getting size of the node at first i thought it would be 13 later on googling i found there is concept of padding and data alignment.  So My system has 64bit processor and according to that i calculated  (1(char) + 7(for padding) + 8(double) + 4(int) ) = 20  So why it comes out be 24.  Also as you can see iam beginner can you provide some references where i can read more fundamental stuff or things which will be helpful.  I appreciate any advice you give. Thanks

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


What I wanted to make was a villager that depending on what other actions you do (let's simplify that to clicking buttons) gets extra trades. I figured out how to set the trades of a villager:  /entitydata @e[type=Villager] {Offers:{Recipes:[{rewardExp:0b,maxUses:2147483647,uses:0,buy:{id:diamond,Count:1},buyB:{id:emerald,Count:5}}]}}   But I cannot figure out how to add a trade to this without removing, or having to re-specify this trade, add another trade to this villager. Is there a way of doing this?

I am trying to add another custom trade to a pre-existing wandering trader without clearing all of its previous trades.  I have tried running this command:  /data modify entity @e[type=wandering_trader,limit=1] Offers.Recipies[] append value {maxUses:99999,buyB:{id:"minecraft:air",count:0b},buy:{id:"minecraft:stone",Count:1b},sell:{id:"minecraft:acacia_log",Count:1b}}   However, this does not work.  Does anyone know the proper syntax to do this, and if this is even possible?


My Windows firewall gives me security alert that my device is affected by Program:Win32/Cayunamer.A!ml. But when I try to remove it by selecting action as Remove, no change occurs. It loads for a time and the alert is back that my device is affected. Can anyone suggest me a way to remove this from my device without the help of 3rd party apps? Thank You

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


Albert Einstein in his equivalence principle stated that a freely falling body does not experience force, but if I let a ball free fall its velocity increases periodically (it accelerates). How is this possible without a force being involved?

On , it is written that      So, we see things falling with an acceleration which we call the acceleration of gravity,and thinking that we live in a straight line , uniformly moving or stationary inertial frame, we attribute that acceleration to a force, the force of gravity. Whereas in reality,objects falling towards the Earth are moving along geodesic paths with no acceleration and according to modified version of law of inertia, have no force acting on them. They fall simply because the curved space-time near the Earth ...   Now, why do the objects falling towards the Earth move along the geodesic paths with no acceleration? That means the objects don't have any force acting on them, but why? A body in a free-fall moves with acceleration $g$, so, why is it written like that? Why does the author use Law of inertia on freely falling body?? Law of Inertia can only be applied when no external force acts on the body. So, is the freely-falling body accelerates under force of gravity or moves uniformly while moving through geodesic paths as quoted by the author?


I am running lampp on linux and trying to access Mysql using command line, but getting error as -bash: mysql: command not found

I downloaded MySQL's rpm bundle from the site, converted it to a .deb file using alien and installed it by saying sudo dpkg -i mysql-server_5.6.14-2_amd64.deb. However, when I say mysql in the command line, it gives an error that it is not installed. What do I do?  I am on Ubuntu GNOME 13.10 64-bit


How do I search for a Hashmap that contains String as a key and list of objects as value?  HashMap<String,List<PageObjectBaseClass>> ObjList1;   When I used  for (HashMap<String,List<PageObjectBaseClass>> map : ObjList1)   Am getting the error "Can only iterate over an array or an instance of java.lang.Iterable"

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


I have four variables CurrentMonth, CurrentYear, Month, year. I want to have a SQL statement which displays all the months and years between (Month,Year) to (currentMonth,CurrentYear). The below displays months but I need months and year and I dont have dates but only month and year of start and End.  DECLARE @StartDate  DATETIME,         @EndDate    DATETIME;  SELECT   @StartDate = '20110501'                 ,@EndDate   = '20110801';   SELECT  DATENAME(MONTH, DATEADD(MONTH, x.number, @StartDate)) AS MonthName FROM    master.dbo.spt_values x WHERE   x.type = 'P'         AND     x.number <= DATEDIFF(MONTH, @StartDate, @EndDate);

I need to get all the dates present in the date range using SQL Server 2005


How would I go about solving $x^y = y^x$?  $$\frac{y}{\ln y} = \frac{x}{\ln x} $$  Is trivial to find, but I'm not sure where I'd go from here.   Thanks in advance

It's not too difficult to figure out that $x$ and $y$ can both be 1, and also $x$ can be 2 and $y$ can be 4 (and vice versa). But I can't rule out if there are other solutions. Does it have anything to do with inverse functions? Is there a way to see the solutions by graphing, or algebraically?


My blender file contains cubes, and texture, texture size is quite small ~5MB, but they have high resolution : 10.000 x 10.000  Here is RAM usage before I open blender file   And here is after open   Is that a bug ?

Using a single 6K texture at only 227kb in size, spikes the memory usage to a crazy 144mb of memory in Blender.  It was brought up in , but closed.  Why can image editors (Photoshop/Gimp/Krita) handle such large images but not Blender?  Whats going on, and more importantly, what can be done to improve it?


I am using Websphere and trying to upload a PDF attachment with file size of 51M, it failed with java.lang.OutOfMemoryError: java heap space.   Can someone help me out to check that issue?

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


I have a header file, let's call it SomeClass.h in which a class is defined as usual: class SomeClass { ... };  The implementation of SomeClass is in another file, say SomeClass.cpp. Then I have another header file, say AnotherClass.h which tries to use the SomeClass class to define another class, as shown below. #include <SomeClass.h>  class AnotherClass { ... protected:   std::unique_ptr<SomeClass> s;  // (*) };  when I try to compile, I get the following error: error: 'SomeClass' was not declared in this scope  but this is quite surprising, since CLion is not detecting this error and when I click on SomeClass in the instruction commented with // (*) above, CLion correctly goes to the definition of SomeClass in SomeClass.h So the question is: why is CLion seeing SomeClass while the compiler is not seeing it?

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies between C++ classes in different header files (can happen also in the same file). But fortunately(?) this doesn't happen often enough for me to remember the solution to this problem for the next time it happens again.  So for the purposes of easy recall in the future I am going to post a representative problem and a solution along with it. Better solutions are of-course welcome.     A.h  class B; class A {     int _val;     B *_b; public:      A(int val)         :_val(val)     {     }      void SetB(B *b)     {         _b = b;         _b->Print(); // COMPILER ERROR: C2027: use of undefined type 'B'     }      void Print()     {         cout<<"Type:A val="<<_val<<endl;     } };       B.h  #include "A.h" class B {     double _val;     A* _a; public:      B(double val)         :_val(val)     {     }      void SetA(A *a)     {         _a = a;         _a->Print();     }      void Print()     {         cout<<"Type:B val="<<_val<<endl;     } };       main.cpp  #include "B.h" #include <iostream>  int main(int argc, char* argv[]) {     A a(10);     B b(3.14);     a.Print();     a.SetB(&b);     b.Print();     b.SetA(&a);     return 0; }


I am a Costa Rican citizen living in Costa Rica.  I am looking at visiting Kenya, and my best option seems to fly to Dubai on a larger airline, then get a smaller airline from Dubai to Kenya.  Let's say I arrive at Dubai December 1st, and my return ticket is December 31st. I also have tickets from Dubai to Kenya for December 2nd and back to Dubai on December 28th.  From what I understand, there's a 96-hour transit visa that lets you stay 4 days or less. Is this true? What are the requirements, where and how is it requested, how much does it cost and can a Costa Rican citizen get it?  Would this allow me to arrive back in Dubai a few days before my outbound flight and visit Dubai?  Edit: A lot of information online and other StackExchange questions are about US or EU citizens. I haven't found information specifically about Costa Rican citizens.

I'm travelling from Madrid to Brisbane, but I have a 9 hours layover at Dubai Airport. I do not plan to leave the airport, and the connection is with the same airline (Emirates). I'm from El Salvador.    Do I need a transit visa?


Python offers the following syntax to initialize a python List functionally:  mylist = [item for item in iterable]   Is there a similar syntax in C# for initializing a C# List?  EDIT:  I guess I should be more specific. I'm trying to emulate the following syntax:  mylist = [operation(item) for item in iterable]

I want to generate a list in C#. I am missing python's list comprehensions. Is there a C# way to create collections on the fly like list comprehensions or generator expressions do in python?


I have found various proofs of this question usig primitive roots, but I want to prove it without using primitive roots!  Here is my question again:  Let $p$ be prime. Prove that there are the same number of quadratic residues modulo p as there are non-residues. Clearly state where you have used that $p$ is prime.  Thanks! :)

Help needed in understanding proof: Every odd prime $p$ has exactly $(p-1)/2$ quadratic residues and $(p-1)/2$ quadratic nonresidues.   We assume there exist $k$ incongruent quadratic residues and each yield two solutions of the equation $x^2 \equiv a (\mod p)$. Also each of these solutions are incongruent, right ? So we have $2k$ solutions to quadratic congruences.  Then there are $p-1$ squares of the least residues, $1$ through $p-1$. But these need not be incongruent (consider $p = 7$ and $1^2, 6^2$). Then $2k = p-1$, why ?  Could someone explain to me in details what the reasoning is ?