I've been trying to put together functions in a more secure way that keeps us safe from injection or manipulating inserts by calling different columns to be updated. In your opinion, is this function safe at all, and if not what would you suggest is a better way to do it, and why. This function is called when a user updates their profile, or specific parts of their profile, as you can see I've made an array with items which is all they can update in that table. Also, the user_id I am getting is from the secure encrypted JSON token that's attached to their session, they are not sending that. Thanks for your time. function updateProfile( $vars, $user_id ) {     $db = new Database();     $update_string = '';     $varsCount = count($vars);     $end = ',';     $start = 1;     $safeArray = array( "gradYear", "emailAddress", "token", "iosToken", "country",  "birthYear", "userDescription" );     foreach($vars as $key => $value) {         if(in_array( $key, $safeArray )) {             if($start == $varsCount) {                 $end = '';             }                       $update_string .= $key . '=' . '"' . $value . '"' . $end;         }             $start++;     }      if($start > 0) {         $statement = "update users set " . $update_string . " where userId = '$user_id'";         $query = $db->updateQuery( $statement );         if($query) {             $response  = array( "response" => 200 );         } else {             $response  = array( "response" => 500, "title" => "An unknown error occured,  please try again");         }      }

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


I installed Kernel and required libraries. I don't know why I'm getting this error   batman@tx:~/kernel/linux$ sudo make menuconfig scripts/kconfig/mconf  Kconfig init/Kconfig:409: unexpected 'endchoice' within menu block init/Kconfig:1759: unexpected end statement make[1]: *** [menuconfig] Error 1 make: *** [menuconfig] Error 2   If run without sudo I'm getting like below  batman@tx:~/kernel/linux$ make menuconfig  *** Unable to find the ncurses libraries or the  *** required header files.  *** 'make menuconfig' requires the ncurses libraries.  ***   *** Install ncurses (ncurses-devel) and try again.  ***  make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1 make: *** [menuconfig] Error 2   Ok, I copied config from /boot/.., so I want to continue without configuration. Again, I got this  batman@tx:~/kernel/linux$ make -j5 KDEB_PKGVERSION=1.veeru dep-pkg scripts/kconfig/conf  --silentoldconfig Kconfig init/Kconfig:409: unexpected 'endchoice' within menu block init/Kconfig:1759: unexpected end statement make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'.  Stop.   In another video, they compiled the kernel like this  batman@tx:~/kernel/linux$ fakeroot make-kpkg -j5 --initrd --append-to-version=veeru kernel_image kernel_headers  exec make kpkg_version=12.036+nmu3 -f /usr/share/kernel-package/ruleset/minimal.mk debian APPEND_TO_VERSION=veeru  INITRD=YES  ====== making target debian/stamp/conf/minimal_debian [new prereqs: ]====== This is kernel package version 12.036+nmu3. test -d debian             || mkdir debian mkdir: cannot create directory ‘debian’: Permission denied make: *** [debian/stamp/conf/minimal_debian] Error 1 Failed to create a ./debian directory: No such file or directory at /usr/bin/make-kpkg line 984.   So, why I'm getting these errors, can someone explain that make.. command(I know -j is for jobs). Most of the times I don't know what I'm doing(What's happening, why I'm doing like, etc). So, is there any articles for newbies like me for GREAT start to know KERNEL stuff :-)   UPDATE:  I just want to know, why those errors are coming even I installed the rightpackages(). What are the way to compile the Kernel. Why different ways?  Ubuntu 14, Downloaded Kernel from kernel.org(4.2 Release)

I'm interested in compiling a new kernel under Ubuntu 12.04 x86 64 bit.  I found  which is basically a mirror for  and there are a lot of steps (git, etc.) that appear useless to me.  With earlier releases/distros, I used to create a .config file and modify a Makefile if I needed to, then just run make and it's done.  Is there is a simple way to do this under Ubuntu?


I want to make a program that will display dynamic data in the way the "top" command does but, I haven't been able to find out how to make the command line interface work. Does anyone know of some resources for building that type of interface?

I want to write a program that can "draw" in the terminal the same way as htop or emacs. By that I mean "get rid of the prompt and make the output dependent on the current size of the terminal".   To make this a bit more clear:   I want to use the terminal this way:     in stead of this way:


I've been playing magic on and off for a long time. The most recent time, however I've been taking a closer look at rules and action orders.  The main thing that I've been doing now is cloudshifting allies in and out of play. I need explanation on returning to exile at the end step. Blessed vs. Cused spotlighted a card that exiles all creatures I want that I control and sends them back at the end step. I didn't know it was any different from returning during the rest of the turn, until a buddy said something about it being different. He basically said that instead of returning one by one and triggering separately each time, they all hit at once and only trigger once.  Is this true? If it is can someone explain the ruling and process?

I was playing modern with the owner of a shop.  He played a  which he used to bring in 7 lands: 5 basic mountains and 2  cards.  He then claimed that each  triggered 5 times (killing me).  I am doubting this now.    Here is my reason: The two  cards entered at the same time as the other 5 basic lands.  That means when they were on the battlefield and their ability was in effect, the other 5 basic lands were already there too.  That seems too late to trigger a "Enters the Battlefield" effect.  So here is my question.  Am I right or wrong?  If I am wrong, please show me how the enter the battlefield effect can trigger for something that enters the battlefield at the same time as itself.  If I am right, please show me the rules that prove it.  I now have two shop owners that are convinced that this is a legal play.  If it is not legal, I am going to need clear rules citations to convince them.    Side note:  If I am wrong and it is a legal play, then I have a follow up scenario.  Say I have 2  cards and 5 other human cards in my graveyard.  If I play a spell that lets me return all of them to the battlefield at the same time (say ), would the  cards get 6 +1/+1 counters on them?    To me, if the trick that was played on me with  is legal then my  cards should also get the +1/+1 counters.


I have an Ubuntu on VirtualBox and I just installed Eclipse. When I tried to start Eclipse, Eclipse claimed      Version 1.6.0_35 of the JVM is not suitable for this product. Version: 1.7 or greater is required   I installed openjdk-7-jre and openjdk-7-jdk using apt-get install to satisfy Eclipse, then I restarted the virtual machine but Eclipse kept giving the same error.   I checked the java version with java -version and realized that Ubuntu seems to think that I am using 1.6 as well.  How can I fix this?  Note: I double checked that I installed the right version of Eclipse (64-bit)

I followed all the instructions stated at this , but am encountering some problems with the last part of it.  I actually have version 6.22 of java and would like to update to version 6.30.  So after moving the extracted directory java-6-oracle into /usr/lib/jvm I do not know what to do, since the script that is pointed out in the answer above updates from java 5 to java 6.  For sake of clearness here is output if I do an ls in dir /usr/lib/jvm:  $ ls -l /usr/lib/jvm total 8  lrwxrwxrwx  1 root root   14 2011-07-12 15:18 default-java -> java-6-openjdk lrwxrwxrwx  1 root root   14 2011-07-12 12:19 java-1.6.0-openjdk -> java-6-openjdk  drwxr-xr-x 10 root root 4096 2012-04-12 12:06 java-6.31-oracle  drwxr-xr-x  7 root root 4096 2012-02-24 14:43 java-6-openjdk   What should I do now?    ADDED PART  Under the suggestion of @fossfreedom I ran the script anyway and actually it updated the java version.  In fact if I run command java -version output will be the following:  $ java -version java version "1.6.0_31" Java(TM) SE Runtime Environment (build 1.6.0_31-b04) Java HotSpot(TM) Server VM (build 20.6-b01, mixed mode)   There is still a problem, if Irun javac -version it gives me the old version installed:  $ javac -version javac 1.6.0_22   And if I use the tester at this  it will tell me that version is   Java Version 1.6.0_22 from Sun Microsystems Inc.   What's going wrong?  It seems that Java Runtime Environment has updated, but Java Compiler and Java plugin for browser have not.  How can I update them?    OTHER ADDED PART  sudo update-alternatives --config java will return following output  $ sudo update-alternatives --config java There are 2 choices for the alternative java (providing /usr/bin/java).    Selection    Path                                      Priority   Status ------------------------------------------------------------ * 0            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      auto mode   1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode   2            /usr/lib/jvm/java-6.31-oracle/bin/java     1062      manual mode  Press enter to keep the current choice[*], or type selection number:   these makes sense with the fact that JRE is correctly updated to version 6.31, issues are on Java Compiler and Java browser plugin.  Any ideas?


So basically my question is this. Let's say I have a list with values  l1st = ['dog', 'cat', 'bird', 'monkey']   And I ask the user to input   input = raw_input('Please enter the word you wish to search for: ')   Here's the big question. Let's say the person wants to search for   dog   but types it in as   Dog   I don't want the program to give him an error message just because he got the capitalization wrong. What is a method I could use for a list.index search to look for, if not the exact word, the closest similar word?

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


Yesterday I've done a completely fresh Windows 8 Pro install on brand new Samsung SSD. I recall that just after the installation Windows was taking about 10GB. I've installed all the updates and when today I entered My Computer I've almost got a heart attack: disk C: 12.3 GB free of 118 GB!  The file explorer, when I enter the disk highlight everything and go to Properties, tells me that the files in there take only 22.5 GB of space which seems reasonable.  So where is my 100 GB?

How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.


Could someone from the dev team explain what defines the rank of SE question in Google search (or Bing search, if it happens to be different)? Do search engines define the rank independently based on their own click and search request statistics, or do they take into account some data from SE? For example, would upvoting a question make it rank higher than a similar non-upvoted question?  I understand the number of views of a question should correlate with its page rank, but is this a coincidence (more views also means more views via  search engines) or is the information about page views statistics accessible to search engines?

What influences findability on a post?   Upvotes Views Asked date Last active time   How is this done in the Stack Exchange internal search engine? And how does Google do it?  Why is it that when searching on Google for 'iPhone development stackoverflow' the fourth result is ?


Unable to register through the application.   App Version: 1.6.6.2 Device: iPhone 5s (Global) OS Version: Version 12.4.5 (Build 16G161)

This is a little bit of a double-question.   Is the mobile app for Stack Exchange (in particular for iOS) still being developed? Is there any hope for adding in advanced features for the various review/mod tools?    (NOTE: To distinguish my question, I am specifically referring to the review and mod tools, not just the users' edit/delete functions.)  I understand that this would be a bit of work in both the front and back-end development if it's not already been put into play, so I don't have any expectations.


I have been trying to find a counterexample of ...  If $d$ and $e$ are topologically equivalent metrics (they generate the same open sets), and $(X,d)$ is totally bounded then $(X,e)$ is totally bounded.  Any ideas?

If a metrizable topological space is totally bounded with one metric, is it totally bounded with all others? A related, stronger question: if every metrization of a topological space is bounded, are they all totally bounded?


$myResult = mysqli_query($con, "SELECT * FROM users WHERE Password=$_POST=['password']");   It won't let me put my $_POST. I need to have it adaptable so it won't be set to just one password.   Here's the rest of my code, this is a localhost learning thing, so I'm not giving anything away  <?php $con=mysqli_connect('localhost','root','Llamabash','whales'); if (mysqli_connect_errno()) {     echo'Database connection error: ' . mysqli_connect_error();     echo'
'; } else {     echo'Connected to database';     echo'
'; } //works fine up till here $myResult = mysqli_query($con, "SELECT * FROM users WHERE Password"); $checkUsername = $_POST['username']; $checkPassword = $_POST['password']; while($check = mysqli_fetch_array($myResult,MYSQLI_ASSOC)) {     //echo $check;     //echo '
';     if($checkUsername == $check['Username'] && $checkPassword == $check['Password']) {         echo'
Logged in.
';         echo'
Hello ' . $check['Username'] . '!
';     } elseif ($checkUsername == NULL) {         echo'
Please Enter Username.
';     } elseif ($checkPassword == NULL) {         echo'
Please Enter Password.
';     } elseif ($checkPassword != $check['Password'] or $checkUsername != $check['Username']) {         echo'
The Username or Password is incorrect.
';     } else {         echo 'something weird is happening';           echo '
';     } }  mysqli_close($con); echo'Exited database.'; ?>

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?


How can I get rid of this annoying red badge on the Settings icon? I want to see such a badge when there is an update available, not for making me use iCloud if I don't want or need it.

How do I remove this very annoying thing under System preferences without signing in to iCloud? I do want to be signed in to the app store.    I do not want to use iCloud.


Jedi apprentices are referred to as "padawans" but is there an equivalent term for the Sith?  Darth Vader, the only Sith whose initiation we see, appears to be immediately granted the title of "Darth" which doesn't seem to fit, as the Sith seem to carry that title with them, rather than outgrowing it.  Legends sources are acceptable, as the new canon doesn't seem to answer this.

Jedi have understudies called Padawans. What is the Sith equivalent of a Padawan?


I heard that you can respawn the ender dragon but I don't know how. Can someone please tell me? I tried putting end crystals on the pillars but it did not work.

I've recently beat the Ender Dragon. I've heard there is a way to respawn her. How do I do that?


I am working with an iron age cemetery in QGIS. I marked every grave in a point layer with several columns; amongst others, burial rite (inhumation, cremation etc.). I inserted a second column for the orientation of the inhumations. I categorized the vector symbols according to the burial rite column and created one simple vector symbol for the inhumations, now I would like it to rotate automatically according to the orientation column.  Is that possible using one layer, or do I have to put all the inhumations in a second layer.

I am trying to apply a rule to rotate symbols based on the value of an attribute.  I tried to copy , which is essentially my question, however it does not work for me.   I have a layer with two attributes, the slope and aspect.  I want to colour the symbols by the slope (this part works) and rotate by the aspect.  The steps I take are:   Layer Properties -> Style -> Graduated -> Symbol -> Change Select Simple Marker (arrow) and press the button to the right of angle -> field type (double) -> Aspect-sel    Applying these commands changes the symbol to an arrow, and I can easily apply the colour gradient, but the symbols do not rotate. The attribute Aspect-sel varies from 2.87 to 334.23.    ETA: I was using Version 2.8.3 - on suggestion I updated to 2.14.10, which solved the problem.


I was recently was trying to use a library that needed a 32-bit version of java. I tried to get my version of java to use the 32-bit version by using the flag -d32. However, I received the error:     Error: This Java instance does not support a 32-bit JVM. Please install the desired version.   I have been trying to find how to download the 32-bit version of java for OS X, but with little success. Any help would be welcome. Is it possible even without an official download to use OpenJDE in 32 bit form?

I have a Java project in Eclipse that requires Java 7 running in 32 bit mode. I tried to force running in 32 bit mode by adding the flag -d32 to the VM arguments.  However, I then get the following message:  Error: This Java instance does not support a 32-bit JVM. Please install the desired version.   I tried the same with Java 6, and there the flag works. So I supposed that I don't have a 32 bit version of Java installed. I checked all installed versions of java with /usr/libexec/java_home -V and get the following list:  1.7.0_75, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home 1.7.0_67, x86_64:   "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home 1.6.0_65-b14-466.1, x86_64: "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home 1.6.0_65-b14-466.1, i386:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home   I then run the same command with the -d32 flag to check for 32 bit VMs and get the following list:  1.6.0_65-b14-466.1, i386:   "Java SE 6" /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home   So it really seems that there is no Java 7 with is compatible to run in 32bit mode available on my system. I checked the Internet, but couldn't find a way how to install 32 bit Java on a Mac. It always is assumed that the -d32 switch is working. My Mac is running Yosemite (10.10.2).  So what am I doing wrong? Is there a step for step tutorial that I can follow to run my application in Eclipse in 32bit mode with Java 7.


Consider the following ODE, $$ x \ddot{x} - \dot{x}^2 - 1 = 0. $$ I can guess that the solution must be $$ x = a \cosh \left(\frac{t - b}{a} \right) $$ How to solve this ODE?

I am looking for help on how to find the solution of the following differential equation,  $$x\ddot{x}-\dot{x}^2=1,$$  which comes from solving the Euler-Lagrange equations for the lagrangian $L=x\sqrt{\dot{x}^2+1}$. It is from an exercise in my field theory course. My professor provided me with the solution $x(t)=c_1\cosh{\left(\frac{t-c_2}{c_1}\right)}$, which is a solution when plugged into the equation, but does not give any derivation.   Is there a way to solve this DE other than an educated guess? If so how?


I have heard, that  will have  enabled by default. How will this be done? By adding a discards option to the  mount options or by running a cron-job?   Will the default options for Trim be automatically compatible with the  and encryption layers of the standard Ubuntu-system encryption?  It would be great to see some details about this.

I know that the Linux kernel supports TRIM as of version 2.6.33, so there should be TRIM support in ubuntu.  Is TRIM enabled by default or do I need to change some settings or install additional software for it to work? If so, how?


I am new to Python and QGIS, and I want to automate a process so I want to learn how to use the QGIS Pyhton API to make our own code and do the job. If anyone knows any tutorial about this then please share, it will be of great help.

I'm looking for some resources for learning PyQGIS.  It would be interesting having a collection of books or websites that provide some practical examples for learning the syntax or accomplishing specific tasks.  Ideally, these resources should give a general guidance for both beginner and experienced users.   is a very similar question, but it gives help for learning QGIS, and not specifically PyQGIS (in fact, it doesn't have the PyQGIS tag).  Any help?


Is it possible, or is this a procedural generation bug?

I keep running into areas where I see a chest in a section of the room that seems completely walled-off. Is there any way to get to these, or is that just the randomly generated dungeon being a tease?  I had to splice two screenshots together to show an example of what I'm talking about:   Is there any way to get in there?


I have been riding a folding bike in the past. I have never replaced its chain.  Recently, I have bought a second handed road bike for $500. I am afraid of the chain breaking suddenly.  How do I know I should replace the chain in advance?

A bike shop employee used a tool he said would check the wear on the chain, and said that it should be changed.   He said it took a measurement that meant the chain had expanded, but it is still hard for me understand why I should change the chain.   He said that the reason was that the expanded chain links will cause the chain rings to wear down.   That is one argument and I have no experience with it, to know if it is true.   But are there more reasons? How do I know when the chain should be changed?   My first thought is to use it until it breaks, but it probably is not the wisest option.


I'm currently trying to run some assembly in macOS 10.13.6.  What I'm trying to achieve is get two inputs and subtracting the first one from the second one and print the result. So... I'm trying to do something like: print -input() + input() in python. I'm relying the input and printing to the libc, by linking with another C object file.  What I cannot understand is that when I change the stack reserving size from 8 to 4, the program crashes.  Below is the working assembly code:  .section __TEXT,__text .globl _main _main:         push %ebp         mov %esp, %ebp         subl $8, %esp         call _input         neg %eax         mov %eax, -4(%ebp)         call _input         add -4(%ebp), %eax         push %eax         call _print_int_nl         add $4, %esp         mov $0, %eax         leave         ret    And below is the code that does not work.  .section __TEXT,__text .globl _main _main:         push %ebp         mov %esp, %ebp         subl $4, %esp         call _input         neg %eax         mov %eax, -4(%ebp)         call _input         add -4(%ebp), %eax         push %eax         call _print_int_nl         add $4, %esp         mov $0, %eax         leave         ret    As you can see, there is no modification except the stack reservation size.  This is the C file I'm linking with:  #include <stdio.h>  void print_int_nl(int x) { printf("%d\n", x); }  int input() {     printf("In input...\n");     int i;     scanf("%d", &i);     return i; }   I'm currently compiling/assembling/linking by:  $ clang -c -arch i386 runtime.c $ as -arch i386 example.s -o example.c $ ld example.o runtime.o -lc -arch i386 $ ./a.out

I can understand this requirement for the old PPC RISC systems and even for x86-64, but for the old tried-and-true x86? In this case, the stack needs to be aligned on 4 byte boundaries only. Yes, some of the MMX/SSE instructions require 16byte alignments, but if that is a requirement of the callee, then it should ensure the alignments are correct. Why burden every caller with this extra requirement? This can actually cause some drops in performance because every call-site must manage this requirement. Am I missing something? Update: After some more investigation into this and some consultation with some internal colleagues, I have some theories about this:  Consistency between the PPC, x86, and x64 version of the OS It seems that the GCC codegen now consistently does a sub esp,xxx and then "mov"s the data onto the stack rather than simply doing a "push" instruction. This could actually be faster on some hardware. While this does complicate the call sites a little, there is very little extra overhead when using the default "cdecl" convention where the caller cleans up the stack.  The issue I have with the last item, is that for calling conventions that rely on the callee cleaning the stack, the above requirements really "uglifies" the codegen. For instance, what some compiler decided to implement a faster register-based calling style for its own internal use (ie any code that isn't intended to be called from other languages or sources)? This stack-alignment thing could negate some of the performance gains achieved by passing some parameters in registers. Update: So far the only real answers have been consistency, but to me that's a bit too easy of an answer. I have well over 20 years experience with the x86 architecture and if consistency, not performance, or something else concrete, is really the reason then I respectfully suggest that is a bit naive for the developers to require it. They're ignoring nearly three decades of tools and support. Especially if they're expecting tools vendors to quickly and easily adapt their tools for their platform (maybe not... it is Apple...) without having to jump through several seemingly unnecessary hoops. I'll give this topic another day or so then close it... Related


How would you skip the arcpy.Merge and arcpy.Clip if 'AAA010.shp' does not exist in the directory that os.walk is going through. I will have more code after the last line in this snippet.  import os, fnmatch, arcpy  arcpy.env.workspace  =  r’C:\Users\sysadmin\desktop\datamanagement\MGCP.gdb’  fcMerged = ‘MergedFeatureClass’  fcClipped = ‘ClippedFeatureClass’  fcToClip = r’C:\Users\sysadmin\desktop\datamanagement\Country.shp’  filesMatched = list()  for root, subfolders, files in os.walk(r’C:\Users\sysadmin\desktop\datamanagement\MGCP_Raw’):    for f in fnmatch.filer(files, ‘AAA010.shp’):     filesMatched.append(os.path.join(root,f))  if 'AAA010.shp' in filesMatched:      arcpy.Merge_management (filesMatched, fcMerged)      arcpy.Clip_analysis (fcMerged, fcToClip, Extraction_Mine)  else: pass

So if shapefile 'AAA010' does not exist, how can I skip the Merge and Clip and move on to the next part of the script? If possible I would like to keep the current script as it is, but by just adding else or if, Sorry still trying to learn the ins and outs.  import os, fnmatch, arcpy   arcpy.env.workspace = r'C:\Users\sysadmin\Desktop\DataMagement\Comp_3\SA_MGCP3.gdb'   fcMerged = 'MergedFeatureClass' fcClipped = 'fcClipped' fcToClip = r'C:\Users\sysadmin\Desktop\DataMagement\Country.shp'  filesMatched = list()  for root, subfolders, files in os.walk (r'C:\Users\sysadmin\Desktop\DataMagement\MGCP_Raw'):      for f in fnmatch.filer(files, 'AAA010.shp'):              filesMatched.append(os.path.join(root,f))      if filesMatched:         print ' files found - merging'         arcpy.Merge_management (filesMatched, fcMerged)         arcpy.Clip_analysis (fcMerged, fcToClip,fcClipped)      else:          print 'nothing found - skipping'


So I have these two wheels parented to the leg of a robot. I wanna make them spin a few times but they're spinning around the wrong axis. With other objects I could just press R, Y, Y to make them spin right when they're already at an angle, but for some reason it doesn't work with these. Would be amazing if someone helped me fixing this!

I'm trying to rotate the blades of a windmill for an animation but the windmill is already at an angle. When I keyframe it on it's own axis (after pressing control + alt + space) and rotate it the blades spin inwards during the animation before coming back at the end. I've tried locking the other axis but that keeps the blades from rotating back to the right orientation. Also, whenever I rotate the object 360 degrees it turns the 360 into a really small number (0.0001) so it plays forward hallway then backwards (with a 180 degree keyframe halfway). Any help would be appreciated!.


$(a)$ Show that there is a complex analytic function defined on the   set $U=\{z\in\mathbb{C} \ | \ |z|>4\}$ whose derivative is   $\displaystyle\frac{z}{(z-1)(z-2)(z-3)}$.      $(b)$ Is there a complex analytic function on $U$ whose derivative is   $\displaystyle\frac{z^2}{(z-1)(z-2)(z-3)}$?   The problem clearly reduces to find a analytic function $f(z)$ on $U$ such that $f'(z)=\displaystyle\frac{z}{(z-1)(z-2)(z-3)}$. But if I integrate both sides over the contour of $U$, the RHS is analytic on $U$. So $f(z)=0$. But this result is too absurd to consider. Again same goes for $(b)$, but which is not the case since we have to prove no such $f$ would exist. I considered the CR-equations but the given function is too large to handle for this. What is the best approach for this problem? Any help is appreciated.

My attempt  I wrote the given function as a sum of rational functions (via partial fraction decomposition), namely  $$ \frac{z}{(z-1)(z-2)(z-3)} = \frac{1/2}{z-1} + \frac{-2}{z-2} + \frac{3/2}{z-3}. $$  This then allows me to formally integrate the function. In particular,  I find that  $$ F(z) = 1/2 \log(z-1) - 2 \log(z-2) + 3/2 \log(z-3) $$ is a complex differentiable function on the set $\Omega = \{z \in \mathbb{C}: |z| > 4\}$ with the derivative we want.  So this seems  to answer the question, as far as I can tell.   The question then asks if there is a complex differentiable function on $\Omega$ whose derivative is  $$ \frac{z^2}{(z-1)(z-2)(z-3)}. $$ Again, I can write this as a sum of rational functions and formally integrate to obtain the desired function on $\Omega$ with this particular derivative. Woo hoo.  My question  Is there more to this question that I'm not seeing? I was also able to write the first given derivative as a geometric series and show that this series converged for all $|z| > 3$, but I don't believe this helps me to say anything about the complex integral of this function.  In the case that it does, perhaps this is  an alternative avenue to head down?  Any insight/confirmation that I'm not overlooking something significant would be much appreciated.  Note that this an old question  that often appears on study guides for complex analysis comps (one being my own), so that's in part why I'm thinking (hoping?) there may be something deeper here. For possible historical context, the question seems to date back to 1978 (see number 7 here):   Thanks for your time.


Considering the ethical and professional implications of self plagiarism, it is very useful to check new manuscript against old ones (which are under review and not yet published) to decrease self plagiarism. In a white paper by ithenticate (download from ), one way to avoid self plagiarism is to significantly paraphrase those text which are need to be used in new article. However, I have difficulties in identifying the similarity percentage of my current work against yet-unpublished works. Online tools (that I know) check the manuscript against published works. I have 3 journal papers, 1 is published, 1 is under review, and 1 is under preparation. Now, I need to check the third one to see the similarity score. Any suggestion?

I am working on my PhD thesis and have to write a monograph based on my publications. To prevent that I plagiarize myself, I came up with the idea to automatically check my thesis against my publications.  Is there already a tool for this work-flow?     Input: PDf of thesis and a pile of PDFs;   Output: annotated PDF of thesis.


I want to know the width (e.g., *pt) of each generated column. How can I do it?  \documentclass{article}   \begin{document}    I want to know the width (e.g., *pt) of each generated column. How can I do it?  \begin{table} \centering \begin{tabular}{|l|l|l|l|}     \hline     Column1 & Col2 & Column------3 & Column--4 \\ \hline     I want & to know & the actual & width of each column. \\ \hline     Is there & any & method & to display the size? \\     I am & now & using & \{tabular\} \{|l|l|l|l|\} \\     \hline \end{tabular} \end{table}  \end{document}

Given Table 1 and Table 2, I want to create a Table 3 whose columns are     Column1(Table3) = max{Column1(Table1), Column1(Table2)}      Column2(Table3) = max{Column2(Table1), Column2(Table2)}      Column3(Table3) = max{Column3(Table1), Column3(Table2)}      Column4(Table3) = max{Column4(Table1), Column4(Table2)}   So, if I copy the elements all from table 1 or all from table 2 to table 3, the layout of table 3 will not change. (The Table 3 below just shows the column width. You can ignore the elements in it.)  \documentclass{article}   \begin{document}     \begin{table} \centering \begin{tabular}{|l|l|l|l|}     \hline     Column1 & Column2 & Column3 & Column4 \\ \hline     The & quick brown & fox & jumps over the lazy dog \\      The & quick brown & fox & jumps over the lazy dog \\     The & quick brown & fox & jumps over the lazy dog\\     \hline \end{tabular} \caption{First table} \end{table}   \begin{table} \centering \begin{tabular}{|l|l|l|l|}       \hline     Column1 & Column2 & Column3 & Column4 \\ \hline     The  quick & brown & fox  jumps & over the lazy dog \\     The  quick & brown & fox  jumps & over the lazy dog \\     The  quick & brown & fox  jumps & over the lazy dog\\     \hline \end{tabular} \caption{Second Table} \end{table}   \begin{table} \centering \begin{tabular}{|l|l|l|l|}       \hline     Column1 & Column2 & Column3 & Column4 \\ \hline     The  quick & quick brown & fox  jumps & jumps over the lazy dog \\      The  quick & quick brown & fox  jumps & jumps over the lazy dog \\     The  quick & quick brown & fox  jumps & jumps over the lazy dog\\     \hline \end{tabular} \caption{Desired Width} \end{table}   \end{document}


The title says it all, I guess. Why $$\sum_{i=0}^{w-1}{2^i} = 2^w - 1$$

I know that the sum of power of $2$ is $2^{n+1}-1$, and I know the mathematical induction proof. But does anyone know how $2^{n+1}-1$ comes up in the first place.  For example, sum of n numbers is $\frac{n(n+1)}{2}$. The idea is that we replicate the set and put it in a rectangle, hence we can do the trick. What is the logic behind the sum of power of $2$ formula?


Nine distinct positive integers are arranged in a circle such that the product of any two non-adjacent numbers in the circle is a multiple of n and the product of any two adjacent numbers in the circle is not a multiple of n, where n is a fixed positive integer. What is the smallest possible value for n.

A cute riddle (but maybe not so easy!) from Gardner:  At a gathering of mathemagicians, the Grand Master and his 8 disciples are seated at a round table. The Grand Master will judge each of his displices on their newest trick. After he has seen all the performances, the Grand Master hands to each of his disciples a card with their score on it (the score is some integer number of points greater than $0$). In return, The Grand Master then performs the trick himself and allows his disciples to judge his own perforamce. The disciples agree on a score and give the Grand Master a card with his score on it. It turns out that each mathemagician at the table has a different score.  The Grand Master then remarks: "I can think of a number that divides the product of my own score and the score of anyone seated at this table, other than the two people sitting beside me.". Each of the disciples look at their own scorecard and then look around the table, and each discplie remarks: "I can also think of such a number!". All at once, everyone seated at the table announces the number they have in mind. Incredibly, they all say same the same number! "Now that is some trick!" the Grand Master laughs.   What is the smallest possible number the mathemagicians could have announced?


How to split meshes created with the array modifier? It didn't split them in Edit mode with P -> By Loose Parts.

I often use an array modifier (or two) to quickly create a grid of identical or symmetric objects, which can be really useful when modeling all sorts of man-made objects. Once I've made the grid, though, is there any way for me to make it so that each of the objects are individually manipulatable?  Simply applying the modifier does not seem to be the full answer, since it still only allows me to select the grid-of-objects as a whole in object mode. Is there any way to separate them so I work with them each individually?


I'm reading mongo resource code, reading using ::std::mutex, but I don't know what's the meaning?  namespace stdx {  using ::std::mutex;            // NOLINT using ::std::timed_mutex;      // NOLINT using ::std::recursive_mutex;  // NOLINT  using ::std::adopt_lock_t;   // NOLINT using ::std::defer_lock_t;   // NOLINT using ::std::try_to_lock_t;  // NOLINT  using ::std::lock_guard;   // NOLINT using ::std::unique_lock;  // NOLINT  }

In C++, what is the purpose of the scope resolution operator when used without a scope? For instance:  ::foo();


We have           $$W[J]\equiv\hbar i\log(Z[J])$$   How do we use it to compute the connected diagrams to some order in perturbative field theory?  I get that we need to take functional derivatives of it but I am not sure how this will give me the required diagrams (if at all it is expected to).  I have gone through the verification of the claim that: it leaves only connected diagrams to first and second order in interaction parameter in $\phi^4$ theory and find it alright.  But suppose I want to extend it to some higher order and other similar theories like phi cubed theory. How to go ahead? Any references are appreciated which has some examples to start with using the above functional.

If $Z[J]$ is the generating functional for the path-integral, could any prove (or more reasonably, refer me to a proof) that $$W[J]\equiv\frac{\hbar}{i}\log\left(Z[J]\right)$$ "generates" only ?   So far I've only seen theory-dependent "examples" (basically showing how in $\phi^4$ theory the two-point function from $W$ gives only connected contributions).  I'm looking for a generic systematic proof for a general field theory.


For logistical reasons, my current sound configuration is the following.           USB-C            3.5mm Macbook ————————➜ Monitor ———————➜ Speaker  While this configuration works well, there's no way to change the volume of the computer without changing the physical dials of the speaker.  Is there any way to set the volume by "software" instead of using the outputs controls?

When I plug my Mac  into a DisplayPort monitor that has loudspeakers, the Mac's volume controls become disabled.    Is Apple assuming that if I have external speakers I am so much better using their own volume control that I have to be forced to do it?   That is annoying because the monitor's volume controls are buried in terrible menus accessed by terrible buttons on the back of the monitor.  Also, if I am inside an app where I can select the audio device and I select the Mac's internal speakers, the volume controls are STILL disabled.  Is there no way to control the volume of an app when an external speaker is connected even if the app is not using the external speaker?????  Some additional info: It's a Macbook Pro 13" 2018 version.  Using a Thunderbolt to Displayport cable, plugging in to a Dell monitor with speakers.    In another location I use the same cable to plug in to Dell monitors with Displayport but without built in speakers in the monitors.   At that location the volume controls remain active and they control the internal speaker in the laptop as they should.


Today I upgraded from Ubuntu 18.04 to Ubuntu 18.10 and something strange happened.   When I fire up the laptop it automatically enters the tty1 interface. Then I need to enter a command to go to graphical interface. This also happened once on 18.04 but then I pressed Ctrl+Alt+f7 and everything was fine, but it doesn't seem to fix it now.   Any idea why is this happening? I tried some thing from the internet and still the same.   Drivers are same as the one I had on 18.04 and everything is updated but I guess that is not a problem since I can enter graphical interface with a command from tty1. I want it to go directly to graphical interface.  I already tried  sudo systemctl set-default graphical.target   but it's still the same after reboot  This command  sudo systemctl start gdm3.service   starts the graphical interface but only after I type it... it is going back to tty1 again after reboot.

After the restart step of upgrading Ubuntu to 18.04, tty is opening instead ubuntu-desktop. And when I enter my login name and password, I am still in the tty. This is happening again in every restart. How can I start the graphical desktop as normal?


This is surely not a new issue, but I can't resolve it using the questions already present:  The launcher said there was an update available, so I upgraded it. Now I am getting this Java error:        Minecraft has crashed!             ----------------------       Minecraft has stopped running because it encountered a problem.  --- BEGIN ERROR REPORT 7cf3a456 -------- Generated 5/1/19 8:02 PM  Minecraft: Minecraft 1.2.5 OS: Linux (amd64) version 4.15.0-48-generic Java: 1.8.0_191, Oracle Corporation VM: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation LWJGL: 2.9.0 OpenGL: AMD CEDAR (DRM 2.50.0 / 4.15.0-48-generic, LLVM 6.0.0)  version 3.0 Mesa 18.0.5, X.Org  java.lang.NullPointerException     at java.io.Reader.<init>(Reader.java:78)     at java.io.InputStreamReader.<init>(InputStreamReader.java:97)     at adn.a(SourceFile:62)     at adn.a(SourceFile:99)     at net.minecraft.client.Minecraft.a(SourceFile:262)     at net.minecraft.client.Minecraft.run(SourceFile:657)     at java.lang.Thread.run(Thread.java:748) --- END ERROR REPORT 596c040e ----------   Curiously, the launcher can start the version 1.14 just fine (in demo mode, because money is tight!) but v1.2.5 (the latest full non-demo version) gives the above error. So something got messed up, but I can't determine what that is - so I can't fix it.   This was from v2.1.1321 to v2.1.1676.  running on Ubuntu Linux 16.04 LTS  using OpenJDK 1.8, here is the "java -version" output:  openjdk version "1.8.0_191" OpenJDK Runtime Environment (build 1.8.0_191-8u191-b12-2ubuntu0.16.04.1-b12) OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode) Nothing is logged into /var/log/syslog so it's not Java itself that crashes. I can't find any hs_err_pid*.log that would yield more hints. There's no log files in ~/.minecraft that cover this time frame.

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


Let , $A$ and $B$ be two orthogonal matrices with $|A|+|B|=0$. Then prove that $(A+B)$ is singular.   From the relation $|A|+|B|=0$ it is clear that $|AB|=-1$.  Also , $|A|=|B|=\pm 1$. But how I find out $|A+B|$ ?

I am trying to solve following problem.      Let $A, B \in \mathbb{R}^{n\times n}$ be an orthogonal matrices and $\det(A) = -\det(B)$. How can it be proven that $A+B$ is singular?   I could start with implication:  $\det(A)=-\det(B) \Rightarrow B$ is created from $A$ by swapping two lines or columns.   But I am not sure if this implication is correct.


I need to find a Energy function (Lyapunov function) for the next nonlinear coupled ODE system  $u'=-u+u^2v\\ v'=b-u^2v$  where $b\in\mathbb{R}^{+}$. The objective of this is to build a proper trapping region, but I can't fugure it out how to do it. I just don't know how to biuld a proper trapping region.  Then, once I got the trapping region, I'll apply the Poincaré-Bendixon theorem in order to prove that there's a limit cycle.

I need to find a trapping region for  $u'=-u+vu^2$  $ v'=b-vu^2$  with $b>0$.  I don't know what theory to use or in wich book I can find some examples to find optimal trapping regions.  Thank you very much.


I wonder if you have a more practical way of doing the following:   Indent the text in 4cm Maintaining justified alignment The text should occupy all available space except the edges and 4cm   Something like the image below (the right alignment is bad)   It is possible to do this also using two minipage, but it is still not very practical

How do I indent a whole paragraph at the same distance from my left margin, with the simplest command or environment?


I want to sort my array in the same as I did it here:   public static void main(String[] args) {     Scanner sc = new Scanner(System.in);     int[] numbers = new int[3];      System.out.println("Enter numbers: ");     numbers[0] = sc.nextInt();     numbers[1] = sc.nextInt();     numbers[2] = sc.nextInt();      System.out.println("Before: " + Arrays.toString(numbers));     Arrays.sort(numbers);     System.out.println("After: " + Arrays.toString(numbers));  }   My problem is, that it should now be reversed. So it shoudln't be ascending but downwards. Can anybody help me?

I've got a large array of primitive types (double). How do I sort the elements in descending order?  Unfortunately the Java API doesn't support sorting of primitive types with a Comparator.  The first approach that probably comes to mind is to convert it to a list of objects (boxing):  double[] array = new double[1048576];     Arrays.stream(array).boxed().sorted(Collections.reverseOrder())…   However, boxing each primitive in the array is too slow and causes a lot of GC pressure!  Another approach would be to sort and then reverse:  double[] array = new double[1048576]; ... Arrays.sort(array); // reverse the array for (int i = 0; i < array.length / 2; i++) {      // swap the elements      double temp = array[i];      array[i] = array[array.length - (i + 1)];      array[array.length - (i + 1)] = temp; }   This approach is also slow - particularly if the array is already sorted quite well.  What's a better alternative?


I am using Ubuntu 14.4.3 and really like the default cyan background.  I want it to not change with time. However, I cannot find the file in /usr/share/backgrounds. I was hoping to construct an image background and install that. Does anyone have a solution for this?  (edited to add the following)  Here is a shot of the one I want

I have recently dual-booted my Windows 7 with Ubuntu 14.10 , and I am really enjoying it. I want to use all the Ubuntu wallpapers for Windows also, how can I get them? (Where are the Ubuntu wallpapers stored? As in , which directory, so that I can just copy them and get it on Windows 7 also.)


I recently noticed while installing some packages and using the command apt-get update  that I ran into the following error:  Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release   Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   As mentioned in  recent question on Ask Ubuntu, Chrome will no longer be supported by 32 bit systems, however I am currently running 64 bit Ubuntu 14.04, with libc6:i386 libncurses5:i386 libstdc++6:i386 installed for 32 bit application support.   Am I seeing this error because dpkg is looking for the i386 packages as a result of the aforementioned install of libc6:i386 libncurses5:i386 libstdc++6:i386?   How do I resolve this error?   EDIT - (I was not able to resolve this question with simply updating Chrome as mentioned in the other thread, and not all the information in the other answer was present at the time I posted this).

I am using Google Chrome 48.0 32-bit. Today when I launched Google Chrome, I got this message:    This computer will soon stop receiving Google Chrome updates because this Linux system will no longer be supported   I thought Ubuntu 14.04 is supported for five years, what's exactly happening here?  And on 64-bit Ubuntu, I get an error from Update Manager and apt-get update:  Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   Some index files failed to download.   They have been ignored, or old ones used instead.


In gedit, one used to be able to use the mouse wheel to scroll through all the tabs opened. Now the function is gone. (mouse wheel working very fine, scroll through tabs still working on earlier versions). Any one knows how to enable, restore or install this very convenient feature?

I use Gedit a lot and thus tend to have a lot of tabs open at any one time. In Gedit 2.* I could switch between tabs using my mouse wheel but since Oneiric I can't. I assume this is because of various GTK "upgrades".  Does anybody know of a plugin (or workable fix -- that doesn't require me to recompile everything and its brother) that will see me back to mousewheeling my day away?


I have 5 various figures. How many ways I can give figure to 3 friends, that every friend has at least one figure.  o - present figure  | - present friend  Choose:  o | o | o o o   $C^{*}{5+3-1 \choose 3-1}={7\choose2}=21$ ways  Is that correct result?

I know the formula for putting $n$ identical balls in $r$ different boxes such that each box has at least 1 ball, but what is the formula for putting $n$ different balls in $r$ different boxes, no box being empty?  Thanks!


I learnt that in Java, == checks whether two variables refer to same objects, .equals() checks whether the value of the two variables are equal. Which I understand well, but this code confusing me again.  public class Application { public static void main(String[] args) {      String one = "Hello";     String two = "Hello";      if(one == two) {         System.out.println("one == two");     }     else {         System.out.println("one != two");     } } }   The output is one == two, but one and two are two different objects, even though they have the same value, how come are they refering to the same object?

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?


My application for a short visit visa to the UK was refused because of insufficient cash in my bank account on 21/06/2018. However, I have some saving certificates which were redeemed on 17/06/2018, increasing my account threefold.  How long should I wait before reapplying, as long as I will provide bank statements supporting that this money was already in my account in form of saving certificates and not a form of funds parking?

I had applied for a PLAB (Doctors) Visa for the UK to appear in PLAB test. I got refused on the basis of two recent large deposits in the bank statement I provided (my mothers). In reality, these are my own savings which I had deposited in her account to make it more strong. The only objection I got was that I must provide evidence for the source of these deposits. Other than this, I have previously travelled to the UK and USA as well as other parts of the world and my travel history is fine. Can someone please advise on how to proceed and re-apply?


This question was answered here previously but i am re asking it since it a was no explained in detail I actually want to know the energy stored in electromagnetic waves move to the electron and gets scattered in different direction(Thomson scattering)how cum energy stored in field moves to the electron does the electron create opposite em wave which cancel the original wave so energy is bsorbed or any differnt phenomenan takes place please explain in detail

I was wondering how light or any electromagnetic radiation can be "absorbed" if it consists of electric and magnetic fields. For example if there is a charge at point A, and the  light reaches point A, it will cause that charge to move depending on the value of the electric field. However, why wouldn't this electric field continue on and influence others particles everywhere else? For example, if you have a static charge creating an electric field, then if you put a charge at point A it will feel its effects and then if you bring a charge at another location B it will also feel its effects, namely it will not have been absorbed. Please shed some light on this. Thanks  edit: Does this mean the electron that absorbs this light moves in such a way that it creates an electric field of its own canceling the initial one? Or am I way off?


I have VC++ 2012 and noticed that if have something like  struct mystruct{      char a[100];      __int64 b; };   then sizeof(mystruct) would yield 112.  Why is this?

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


I want to render every 2nd(or even) frame and every 5th frame that end in '5' is it possible to do that in one render job.....not very good at scripting but will take any advice I can get

I want to render every Nth frame of an animation, in this case every 12th frame. This way I can play back the animation at 2fps and see if everything is going correctly.  I'm a real novice with Blender Python and cobbled this together:  import bpy  for f in range(startframe,endframe,NthFrame):     bpy.context.scene.frame_current = f     bpy.ops.render.render()     bpy.data.images['Render Result'].save_render(filepath="" + str(f) + '.png')    This kind of works, the right images are rendered and saved. However it completely freezes up Blender, and after about an hour it crashes on windows due to being unresponsive I guess. How can I fix this? Preferably I'd like it to work like rendering an animation normally works, i.e. being able to still use Blender and seeing the progress of each rendered frame.


From following array key with ID 16 is comming twice. Hown can we remove this this duplicate ID. (REMOVE IF ID IS DUPLICATE OTHER FIELDS IGNORE)   Array    (      [1] => Array             (                 [ID] => 16                 [username] => dudda                 [message-time] => 2016-08-25 12:12:53             )     [2] => Array             (                 [ID] => 16                 [username] => dudda                 [message-time] => 2016-08-25 12:01:54             )    [3] => Array             (                 [ID] => 3                 [username] => himanshu                 [message-time] => 2016-08-15 12:53:38             )    [4] => Array             (                 [ID] => 15                 [username] => dawinder                 [message-time] => 2016-08-10 11:40:33             )     )

How can I remove duplicate values from a multi-dimensional array in PHP?  Example array:  Array (     [0] => Array     (         [0] => abc         [1] => def     )      [1] => Array     (         [0] => ghi         [1] => jkl     )      [2] => Array     (         [0] => mno         [1] => pql     )      [3] => Array     (         [0] => abc         [1] => def     )      [4] => Array     (         [0] => ghi         [1] => jkl     )      [5] => Array     (         [0] => mno         [1] => pql     )  )


It is showable directly by induction that the following are true:  $$\sum k = \frac{1}{2}n(n+1)$$  $$\sum k^2 = \frac{1}{6}n(n+1)(2n+1)$$  $$\sum k^3 = \frac{1}{4}n^2(n+1)^2$$  etc. Now, by doing some minor rearranging, we can make a new pattern appear. Combining the first two equations, we can observe that.  $$\sum k(k+1) = \sum k^2 + k = \sum k^2 + \sum k = \frac{1}{3}(n)(n+1)(n+2)$$  after some algebraic rearrangements.  Similarly, if we're patient, we can see that $$\sum k(k+1)(k+2) = \frac{1}{4}n(n+1)(n+2)(n+3)$$  It's not hard to imagine that this pattern continues, and in fact a quick google search shows that it does continue. The general formula is $$ \sum \limits_{k=1}^{n} k(k+1)(k+2)...(k+p-1) = \frac{1}{p+1}n(n+1)...(n+p)$$  However, the only way to prove it I can think of is difficult. It involves first finding a formula for an arbitrary sum of powers, and then doing some very ugly rearranging and summing known formulas like in these first two cases. Is there some more obvious or more direct way of proving it?  Edit: The bot is telling me there is a similar question. This is true. In the other question, the answers refer to either a case by case analysis, which I am aware of how to do. In one answer, someone uses a calculus based proof. I'd like to see an algebraic proof if that's possible.

Considering the following formulae:  (i) $1+2+3+..+n = n(n+1)/2$  (ii) $1\cdot2+2\cdot3+3\cdot4+...+n(n+1) = n(n+1)(n+2)/3$  (iii) $1\cdot2\cdot3+2\cdot3\cdot4+...+n(n+1)(n+2) = n(n+1)(n+2)(n+3)/4$  Find and prove a 'closed formula' for the sum  $1\cdot2\cdot3\cdot...\cdot k + 2\cdot3\cdot4\cdot...\cdot(k+1) + ... + n(n+1)(n+2)\cdot...\cdot (k+n-1)$  generalizing the formulae above.  I have attempted to 'put' the first 3 formulae together but I am getting nowhere and wondered where to even start to finding a closed formula.


I'm trying to make an If-else statement to parse input as "int", but I also want to resolve the exceptions. What if the input is a string? How can I make my computer reading different values in order to decide whether the input is right or wrong? Thank you. static void NumberApp() {     Console.Write("Choose a number, I'll count from that to 100: ");     int number = Convert.ToInt32(Console.ReadLine()); // How can I correct this?      if (number >= 100)     {         Console.WriteLine("Choose a number lower than 100.\n");         NumberApp();     }      else if (number < 100)     {         for (int i = number; i < 100; i++)         {             Console.Write(i + " ");         }         Console.Write("100.");     }      else if (number is string) //Error?     {         Console.WriteLine("Choose an integer\n");         NumberApp();     } }

What is the main difference between int.Parse() and Convert.ToInt32()? Which one is to be preferred


On Win7SP1 I have a long job to run and want to save monitor power. I turn off the monitor. A few moments later the Win7 PC goes to sleep (cutting the job). I don't want that.  I want the Win7 PC to continue working on the job with the monitor off. What's the relevant control?

While I'm downloading a large file on Windows 7 using Google Chrome, my computer goes to sleep. I could obviously set the computer to not sleep at all (or change the interval before the computer sleeps).  What I want to know is: Is there a way to make Windows 7 not sleep as long as a download is in progress? (perhaps when any network activity is going on?). I've looked in the Advanced Power settings, and haven't seen any obvious setting.


Let $a_j = 1+\frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{j} - \log{j}$ and $\gamma$ be the limit of this sequence. Show that $$\vert a_j - \gamma \vert \le \frac{c}{j}$$ for some universal constant $c$. I have already proved that this sequence is strictly decreasing and bounded below by 0. Thus, I already showed the sequence limit. But I don't know how to do this inequality. Any method without integral?

I would like to solve the following problem from 'Real Analysis and Foundations' by S. Krantz.  Let $a_n = 1+\frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{n} - \log{n}$ and $\gamma$ be the Euler-Mascheroni constant. Show that $$\vert a_n - \gamma \vert \le \frac{C}{n}$$ for some universal constant $C>0$.  I have no clue how to solve this problem. From searching various sites it seems that $C=\frac{1}{2}$ but I am not sure with this, too. Thanks in advance.


I know that i can set Pivot point to the 3d cursor mode on the tool bar, and then scale selected edges, and edges will be scaled towards the 3d cursor. But how to move the edges to the cursor without scaling?

Is there any way to snap an entire selection to the 3d cursor in edit mode?  Shift+S > Selection to Cursor snaps each individual vertex to the cursor, so the shape is lost:


I'm working through understanding Clay Institute's paper addressing their Navier-Stokes millennium prize. I can't find any resources online stating if there are any infinitely differentiable examples in nature. I looked up vortexes and found the curl is constant inside the vortex, but discontinuous outside of it, which would, I think, deny the vortex to be able to solve the problem for an incompressible fluid. This is also the case with EM fields which are "almost" completely differentiable. However, is gravity infinitely differentiable? Newton's or GR? Is even the law of motion infinitely differentiable? I haven't found any hits on duckduckgo. Thanks in advance to any help.

While it is quite common to use piecewise constant functions to describe reality, e.g. the optical properties of a layered system, or the  at (the impossible to reach exactly) $T=0$, I wonder if in a fundamental theory such as QFT some statement on the analyticity of the fields can be made/assumed/proven/refuted?  Take for example the Klein-Gordon equation. Even if you start with the non-analytical Delta distribution, after infinitesimal time the field will smooth out to an analytical function. (Yeah I know, that is one of the problems of relativistic quantum mechanics and why QFT is "truer", but intuitively I don't assume path integrals to behave otherwise but smoothing, too).


It seems that almost all features in C# were borrowed from another languages (OOP from Java, generics (parametric polymorphism) and lambdas from ML family, LINQ from Haskell's monads and dynamic from dynamic languages), but I don't know the origin of attributes(annotations in Java world). Is C# the first language that introduced attributes?

What languages or platforms influenced the .NET 1.0 Team to build-in the concept of Attributes from the very start? Was this an Aspect-Oriented thing? Serialization? or something else? I was still in VB6-land at this time, and never used any of the pre-1.0 .NET versions.


! Who wins this hand? My friends and I are at a loss. Our hands are located above and below the tabled cards.

In Texas Hold'em poker, there are some cases where a particular card, often called kicker, acts as a tiebreaker between players to determine who wins the pot, or if the pot has to be shared.  For some combinations such as three or four of a kind, there is no doubt: the kicker is the 5th card of the chosen combination, and determines the winner.  Example     Alice has 7 and 10   Bob has 7 and K   On the board are 7, 7, 2, 3, 4   In that case, both have a three of a kind. But because Bob has a king and Alice only a 10, he wins.  Most of poker websites explaining the rules clearly mention the role of the kicker applying to three of a kind and double pairs. But much fewer say something about colors, straights and full houses, and I found many contradicting answers. I also asked the question to some used online poker players and they also gave me contradicting answers.  I have tried to search for official tournament rules, but most of them only explain what happens with bad behaviors, bad deals, incorrect or confusing betting, showing cards when you shouldn't, acting when it's not your turn, etc. without mentioning subtleties about combinations at all.  To simplify my question, I will take three examples; I think it's better to start with examples before getting to the general answer if one exists. So, what's happening in the following 3 examples? Could you give a more generalized answer?  Example 1 - Flushes     Alice has 2♣ and 3♣   Bob has 4♣ and 5♣   On the board are 6♣, 8♣, 10♣, 2♥, 5♦   Contradicting answer 1: it's a tie, because the highest card included in the flush is the 10, which everybody chooses to include in their 5 showdown cards. Contradicting answer 2: Bob wins, because he has the greatest private card that is part of the flush  Example 2 - Straight     Alice has 6 and K   Bob has 6 and J   On the board are 4, 5, 7, 8, 10   Contradicting answer 1: it's a tie, because the greatest card in the straight is the 8 for both Alice and Bob Contradicting answer 2: Alice wins, because she owns an extra king, compared to the jack of Bob  Example 3 - Full house     Alice has 3 and 7   Bob has 3 and 6   On the board are 3, 3, 2, 2, 5   Contradicting answer 1: it's a tie, because one is supposed to choose only five cards to make a combination, and a full house is already five cards. There couldn't be any kicker, and thus their showdowns are strictly equals. Contradicting answer 2: Alice wins because of her extra 7, compared to the 6 of Bob  Thank you very much for your answers.  Note: I'm unable to post next to you, so I edit my own post; strange not be able to answer to an answer.  Ok, So if I summarize what you are saying :   In the flush case, Bob wins because at some point, their hand differs. Technically, I can continue comparing the highest private card to decide who wins. I had it correct. In the straight case, if the highest card of the straight is public, then it's technically always a tie, no matter what the players had as second private card (asuming that only one of the two cards was part of the straight). In a full house if both players have the same triplet and the same pair, it's always a tie, no matter what the players had as second private card (assuming again that only one of the two was part of the full house).   Please confirm me that what I summarized is correct.  Thank you for your answer.


I installed Waterfox but it is not available as an application, just a folder. How do I get it to work like a normal app? Thanks in advance.

The  web browser is a 64-bit-only open source project based on Firefox.  I would like to see how is the performance compared to Firefox, apparently its better.  Being new to Linux, it's a challenge when it comes to packages that are not .deb. On the official site, Waterfox  as a .tar.bz2 file. How can I install Waterfox on Lubuntu 17.04 and also add an entry for it in my menu, under Internet, alongside Firefox?


I'm going to start in photography and I'm looking to build a home photography studio. I'm planning to get a Canon 60D (wished for a 7D though). I'd like to find out what are the recommended lenses for shooting, mostly portraits, in studio. I have the option of the Canon 18-135mm IS or 17-85mm lens bundle. Or should I rather buy the body only and then buy a lens separate? I have a budget of $400-$500 for a standalone lens.   I plan to shoot mostly in studio but will want to shoot outside as well.

I have a Canon T2I, and also a good prime lens (50mm / f1.8) but I cannot seem to take close up portraits like I see in magazines. Do I need a better lens?


I have been trying to post an answer to this question:    I have read  but apparently I miss something probably obvious here because I am not able to post my answer. I get an error:     Your post appears to contain code that is not properly formatted as code...   I have pasted my answer . As you can see, there are two blocks of codes, one with <script> tags and the other with $(window).load().  In an initial attempt, I simply formatted them with the {} icon which tabbed them by 4 spaces. Neither of them was appearing in the preview though, so I placed the <pre><code> tags but again the same error kept coming, being unable to submit the answer.  What is wrong with the code blocks?  UPDATE: After @Mat 's comments, and since there have been no answers regarding to this, I would like to make clear that partly it has been my fault that I have not properly understood that 8 spaces are necessary for code formatting within lists. Nevertheless, I change the question tag to 'bug' since I believe that it would be best for the user interface if the relevant code formatting button would recognize that the code is in a list and add the necessary spaces by itself rather than getting a validation error on posting.

Normally when you want to enter code in an answer you can simply paste your code, highlight it and hit the "format as code" (curly braces icon) on the toolbar above your answer ('Ctrl+K' does the same thing). That indents by four spaces to produce something like this:  alert("hello");   Thats all fine and dandy but if you want to include code in a list, that is where the "format as code" button fails, because it always simply adds (or removes) 4 spaces before the highlighted block. I am proposing that the "format as code" function be modified to detect how deep you are in a list and format the code (add spaces) accordingly. For example:   This is my first list item  alert("Format as code should indent me by 8 spaces");  This is my second list item  alert("Format as code should indent me by 8 spaces");    This list item is indented by four spaces  alert("Format as code should indent me by 12 spaces");    This list item is indented by eight spaces  alert("Format as code should indent me by 16 spaces");


sigh... I am embarrased to admit that my workplace still has us running on Windows XP with IE8 (and that installing Firefox, Chrome or other non-standard software has the extreme potential of getting you fired), so I'm assuming this "bug" is related to my jalopy of a browser and might not even be worth investigating.  I noticed today that the StackExchange™ MultiCollider SuperDropdown™ will not appear if clicked when viewing a question page. It works just fine on the main page and from my profile (and, if memory serves, worked fine yesterday), but when I visit a question and click on it nothing (that I can see) happens.  (This might be related: )

Which browsers are officially supported by Stack Exchange?  Also, what else is needed in order to use every feature of the site?


I need to test the CheckWarehouseAvailability private method in an abstract class.  public abstract class BaseAPI {     private void CheckWarehouseAvailability(Order order)     {         //codes here     } }  public class Processor : BaseAPI {  }   Here is my TestMethod  Processor pro = new Processor(); PrivateObject privBase = new PrivateObject(pro, new PrivateType(typeof(BaseAPI))); var retVal = privBase.Invoke("CheckWarehouseAvailability(order)"); Assert.AreEqual(true, retVal);   When I run the test method, I got this error: An exception of type 'System.MissingMethodException' occured in mscorlib.dll but was not handled in user code

I'm building a class library that will have some public & private methods. I want to be able to unit test the private methods (mostly while developing, but also it could be useful for future refactoring).  What is the correct way to do this?


What is wrong with the following Jennifer Lopez's pop song ?  My Love Don't Cost a Thing

I'd like to know how the sentence "That don't impress me much" sounds to a native English speaker.  The phrase is the title of a song by Shania Twain, and to my eyes it contains a clear error. It is obviously intended, and I want to know what was the effect that the author wanted to obtain.  Other examples that come to mind:   “She's got a ticket to ride, but she don't care” — The Beatles “My love don't cost a thing” — Jennifer Lopez “It don't matter” — Akon “She don't care about me” — heard in the Lost series “It Don't Mean a Thing” — a jazz album title “The Sun Don't Lie” — another album title


I've gotten as far as $\mathbf{n''}+(\kappa^2+\tau^2)\mathbf{n} = 0$, which suggests or at least permits trigonometric expressions for every component of $\mathbf{n}$ -- not something that seems to lead to a standard expression for a helix. Am I just supposed to prove that a helix has constant nonzero curvature and torsion and invoke the fundamental theorem of curves?  ETA: I was able to get further than the point I described, but the equation for the curve I came up with was...  $$\big(c_1\cos{\sqrt{\kappa^2+\tau^2}t}+c_2\sin{\sqrt{\kappa^2+\tau^2}t+c_3t+c_4},c_5\cos{\sqrt{\kappa^2+\tau^2}t}+c_6\sin{\sqrt{\kappa^2+\tau^2}t+c_7t+c_8},c_9\cos{\sqrt{\kappa^2+\tau^2}t}+c_{10}\sin{\sqrt{\kappa^2+\tau^2}t+c_{11}t+c_{12}}\big)$$  ...and I have no idea how to prove that that's a helix, plus I suspect it isn't even right.

Describe all curves in $\mathbb{R}^3$ which have constant curvature $κ > 0$ and constant torsion $τ$.   Any ideas what we can do to describe all such curves?   Do we have to use the formulas of the curvature and of the torsion?


My user validation in my login is working fine, the only problem is that it doesn't stores the PHP SESSION. I've debugged it to see if any session were stored, but they werent. Because when i send the user to the destination page.  The destination page checks with if (!isset($_SESSION['username'])) { etc.. } if the user is logged in or not. Otherwise it sends the user back to the login page. So that is what is going wrong, it sends the user back to the login page.. and ofcourse to confirm the debug says NULL on all.  PHP5:  <?php require ('../lib/config.php'); ?> <?php ob_start();  if (isset($_POST["username"]) && !empty($_POST["username"]) && isset($_POST["password"]) && !empty($_POST["password"])) { $tbl_name='users'; $user_name='Username'; $pass_name='Password'; $salt='';  mysql_connect("$cchost", "$ccuser", "$ccpass")or die("cannot connect");  mysql_select_db("$ccname")or die("cannot select DB");   $myusername=$_POST['username'];  $mypassword=$_POST['password']; $username=str_replace(' ','_', $myusername); $password=hash('whirlpool', $salt . $mypassword);  $username = stripslashes($username); $password = stripslashes($password); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $sql="SELECT * FROM $tbl_name WHERE $user_name='$username' and $pass_name='$password'"; $result=mysql_query($sql); $row=mysql_fetch_array($result); $donator=$row['donator']; $player=$row['player']; $count=mysql_num_rows($result); if ($donator == '1') { $_SESSION['donator'] = $donator; } if ($player == '1') { $_SESSION['player'] = $player; } if($count==1){ $_SESSION['username'] = $username; header("Location: index_ucp.php"); } else { header("Location: login_ucp.php?err=1"); } } else { header("Location: login_ucp.php?err=9"); } ob_end_flush(); ?>

Session variables are apparently not working for me. I don't know what I'm doing wrong. This is the code that I'm using to check for a valid password:  if ($input_password_hash == $password_hash)  {   session_start();   $_SESSION['is_user'] = 1;   header("Location: ../new_look"); //or Location: index.php  } else echo "Wrong password.";   in the index.php file (where it redirects to), I have this code:  if ($_SESSION['is_user'] == 1) {   //show index page with navigation bar for registered user }  else {  //do something else }   but it's not working at all.  The session does apparently start and that can be verified by checking the cookie.  What am I doing wrong?


Even in Binary or Text mode it is working(image,document,...). Then what is the real use of these mode and how to use them.    #include<stdio.h> #include<stdlib.h> int main() {     FILE *fp;     unsigned char buffer[756396];       fp=fopen("ref.jpg","r");    //rb     if(fp==NULL)     {         printf("File not present");         exit(0);         }     else         fread(buffer,sizeof(buffer),1,fp);       fclose(fp);     fp=fopen("ref1.jpg","w");  //wb     if(fp==NULL)     {         printf("File can not be created");         exit(0);         }     else         fwrite(buffer,sizeof(buffer),1,fq);     fclose(fp);     return 0; }    output  Above code create a copy of an image   I want to know the real time application of where and when to use them.

What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);


Apologies for a simple question but my textbook is horrible. I don't seem to understand what this notation means.   $$ \left[     \begin{array}{c} T     \end{array} \right]_b^a $$  I was looking online for resources to help me understand and found the following question:   Suppose a basis for V = R3 is the set C = {(1, 0, 0), (1, 1, 0), (1, 1, 1)}. And the coordinate vector of an element (x, y, z) is $$ \left[     \begin{array}{c} x-y\\ y-z\\ z     \end{array} \right] $$  How would you get the matrix representation of T. The solution is   $$ \left[     \begin{array}{c} 3&4&4\\ 1&1&2\\ 1&1&0     \end{array} \right] $$  but I don't seem to understand how to get there so can someone provide a brief explanation of what is going on?

How does one find the matrix representation of a linear transformation $T:V\to W$ with respect to the basis $B$ for $V$ and $D$ for $W$?


I regularly put my PC into sleep mode. Unfortunately the power button LED blinks every second and it's extremely bright blue which makes sleeping in the same room somewhat challenging. I have resorted to sticking gaffer tape on top but then it becomes difficult to press the button and it leaves a nasty sticky residue on the case/button. Is there a "soft" way to disable this blinking?  This system has a ASRock X79 Extreme6 motherboard and is running Windows 7 64-bit.

Does anyone know how to disable the blinking power LED when Vista enters hybrid sleep mode?  My case has a very bright blue LED that is rather distracting.  I'd rather not disable hybrid sleep, as it works perfectly and allows for much faster resumes than restoring from a hibernated state.


I am using a ticker jQuery plugin and having trouble loading my script files correctly. If I add the scripts in directly into the theme's header.php file my scripts work correctly. Example:  <script src="<?php bloginfo('template_directory'); ?>/js/jquery-ticker.js"></script> <script src="<?php bloginfo('template_directory'); ?>/js/site.js"></script>   If I try to load the scripts from a WordPress plugin I receive an error. Plugin code:  function bbc_frontend_script() { wp_enqueue_script('jquery'); wp_enqueue_script('ticker', plugins_url("/js/jquery-ticker.js", __FILE__)); wp_enqueue_script('js', plugins_url("/js/site.js", __FILE__)); } add_action( 'wp_enqueue_scripts', 'bbc_frontend_script' );   The error I receive is the console outputs that insite.js   Uncaught Reference error:Jquery is not defined .   Can you please help me understand why I am getting the console error when loading the scripts from a WordPress plugin?

I want to load the new entries without reloading the page. I found a great solution for: The ajax script:  <script>     $(document).ready(function() {     var refreshId = setInterval(function()     {         $('#content').fadeOut("fast").load('http://neocsatblog.mblx.hu/new.php').fadeIn("fast");     }, 10000);      }); </script>   And the php:  <?php require_once("wp-blog-header.php"); ?> <div id="content" <?php cyberchimps_filter_content_class(); ?>>          <?php do_action( 'cyberchimps_before_content'); ?>          <?php if ( have_posts() ) : ?>              <?php while ( have_posts() ) : the_post(); ?>                  <?php get_template_part( 'content', get_post_format() ); ?>              <?php endwhile; ?>          <?php elseif ( current_user_can( 'edit_posts' ) ) : ?>              <?php get_template_part( 'no-results', 'index' ); ?>          <?php endif; ?>          <?php do_action( 'cyberchimps_after_content'); ?>      </div>   However, this is a special feature that works perfectly here:  However, the main page refuses to load new entries, I do not understand the reason for this, as we use everything the same.


so I’ve got a Dell laptop with an i5-7300u. I’ve recently upgraded to a 4k monitor at home that I plan on using for video playback and programming (i have a desktop PC for gaming).  Now, according to Intel’s website and other platforms (youtube guides, web articles, etc), the i5 should be able to handle 4k video, etc. It’s alright with general tasks (I’m writing this on the 4k monitor just now). But as soon as I put youtube on at 1080p/4k the CPU hits 100% and stutters like mad. I’m not sure if this is a Ubuntu issue, browser issue or if my CPU just isn’t meant for 4k despite Intel saying it is.  Any advice would be great, sorry if the post is too long I tried to fit as much information in as I could.

My laptop runs Ubuntu 16.04 and has the following specs:    SSD 256  i5 7200u  8 gb RAM nvidia Nvidia GeForce GTX 950M   So ... it properly plays 30fps 4k video on YouTube, but it freezes when I try to play 60fps 4k video though there was no such an issue with it on Windows 10.  I tried different drivers ... and even different browsers ... but it still works properly only on Windows ... but I don't want to go back to Windows!  Further Info: After having a conversation with NVIDIA support - it was found out that upon YouTube 4k play - Ubuntu highly uses CPU like on this System monitor screenshot:


I am pretty sure it was possible to add tags to your favourite tags list in the app, but now I can't find this function any more. Similarly, I can't find a way to delete existing tags from my favourites in the app.

Could we add Favorite / Unfavorite buttons to the Tag Info page in the iOS app?


Why not "messager"? Or "messenge"?  E.g. Why don't we say:     Send me a messenge on instant messager.

Edit: I am looking for a particular linguistic term for this process (which here uses terminal palatalization to indicate such)  of turning passive verbs like drink into active verbs like drench.  I know one such term exists, because I have seen John Lawler use it, but I cannot now find his posts where he did so.  The OED does not mention this general phenomenon in the related etymologies. For all I know, it may be older than OE, perhaps even going back all the way to PIE.    English has a bunch of verb-pairs where the first one ends in a stop and the second in a palatal, usually with vowel-modification, like these:   cling, clench drink, drench hang, hinge meng, minge (now dialectal) stink, stench tint, tinge wring, wrench   What is going on there?  It seems like some hidden regularity of some sort.  What does it mean?  For words that seem to be missing one of the pair, did those once exist?  I’m thinking of words like quench: what happened to *quing?  Does this have anything to do with these pairs:   message, messenger passage, passenger porridge, porringer pottage, pottinger wharfage, wharfinger   Or is that something different and unrelated?


I'm currently using the latest 16w20a snapshot, but AFAIK, anything that works for this problem in 1.9 will work here. Basically, I'm trying to detect when new chunks are loaded. This way I can /spreadplayers some armor stands around the player and generate some structures in the new chunks. The problem is, I don't know how to detect when there are new chunks loaded.  I thought it would help to detect when the armor stands have become unloaded, which I thought I could do by seeing whether /testfor or /execute fail on them...but they never do. I've ensured they're in unloaded chunks, and still both of those commands are successful and I don't understand how.  So, in conclsion, how can I test for the generation of new chunks? I can't just spread the armor stands everywhere all the time, because that would lead to structures generating where there are already structures from the last spread.

I've been trying to search for an answer to this question for some time now (World Load Detection / Chunk Load Detection / Join World / etc)  However, despite my effort, I've been unable to find a solution...  Details:   This is a single-player world, NOT a private or public server The use of command blocks is acceptable It needs to activate when I open the world, but only once    (and every time the save is loaded, but only once)  It is a 1.15 save file   I found a lead on this reddit post:     This also seemed promising but I couldn't quite follow...   However, the solution appears to be outdated (1+ year ago) and no longer works in version 1.15  Does anyone have any ideas?  I've tried the /tag and /scoreboard approach but those only seem to work on servers (local or public) since the command blocks will be running regardless of players being on the server With this being a local save (and not a server), that does not appear to work.


I have a string containing an environment variable, e.g.   my_path = '$HOME/dir/dir2'   I want parse the string, looking up the variable and replacing it in the string:  print "HOME =",os.environ['HOME'] my_expanded_path = parse_string(my_path) print "PATH =", my_expanded_path   So I should see the output:  HOME = /home/user1  PATH = /home/user1/dir/dir2   Is there an elegant way to do that in Python?  thanks!  Conor

I have a string representing a path.  Because this application is used on Windows, OSX and Linux, we've defined environment variables to properly map volumes from the different file systems.  The result is:  "$C/test/testing"   What I want to do is evaluate the environment variables in the string so that they're replaced by their respective volume names.  Is there a specific command I'm missing, or do I have to take os.environ.keys() and manually replace the strings?


Let's say there's  a box with n different items in it and the goal is to collect all different items. This is done by drawing a random item with probability of 1/n, writing the outcome and putting the item back in the box. What is the expected number of drawing that will be made?

Each box of a certain breakfast cereal contains one of ten different coupons, each with the same probability. We win a prize if we manage to obtain a complete collection of all the different coupons. How long on average do we have to wait? (For example, suppose we draw the following coupons in order: 5, 2, 3, 7, 5, 1, 1, 4, 8, 4, 1, 9, 10, 2, 3, 3, 6. With the last coupon 6, we have completed our collection, and so we stop after 17 steps.)


Does anyone pronounce potato that way, rhyming with British tomato?  I've heard of the song before and wondered about potato as it mentioned tomato pronounced both ways, but I've only just listened to it (it's called Let's Call the Whole Thing off) and was surprised that it does say potato that way...

Immortalized in the George and Ira Gershwin song "Let's Call the Whole Thing Off" is the nitpicking of pronunciation differences:      You like potato and I like potahto,   You like tomato and I like tomahto,   Potato, potahto, tomato, tomahto!   According to  and other sources, the English do pronounce tomato as tə-MAH-toh rather than tə-MAY-toh. But this doesn't seem to be the case when it comes to potato.     (From the O.E.D.)           –  Pronunciation: /təˈmɑːtəʊ/     –  Pronunciation: /pəˈteɪtəʊ/   Is "potahto" actually an acceptable way to pronounce potato? Or is the song just wrong?


Solve  Maximize $f(x)=c^Tx$   subject to $x^TQx \leq 1$   where $Q$ is a positive definite matrix.  what is the solution if the objective function is to be minimized ?

Let $A \in \mathbb{R}^{n\times n}$ be a positive definite matrix, $x \in \mathbb{R}^n$ and $c \in \mathbb{R} \setminus \{0\}$. I got to determine the maximum  $$\max\{c^Ty:y\in \mathcal{E} (A,x)\}$$  where $\mathcal{E} (A,x)$ is an ellipsoid defined by $A$ and $x$.   How can I determine this maximum? Can anyone give me a hint?


This is not a duplicate question!  The thread I have been referred to uses highly OS dependent ways of accomplishing this task. I am looking for something that OS independent.  Please remove the duplicate classification.    I am trying to create some forms using hyperref. Looking at , it appears that it is possible to simply generate a PDF (that a user could save to a PDF file) with user input. Using the following code construct:  \begin{Form}{action=XXX} ... \end{Form}   what should XXX precisely be for my case? I could not find any relevant Adobe or hyperref documentation. There are examples of XXX for mailing the form, or sending off the data to a cgi script, but not what I am looking for.

I am using the eforms package in order to build pdf fillable forms. However there is something I haven't found yet, which Adobe product do I need to purchase in order to save the edited forms? Does anyone know if I can use something for free?  I would like to create the forms using LaTeX and then offer them through our website to our customers. They should be able to complete them with their details, save them and send them back to us. We don't want our customers to buy anything extra in order to fill in a form. We just want them to open the pdf using Acrobat Reader, edit it and then send it to us.


In a certain textbook, I see the Cumulative Distribution Function (CDF) of a continuous random variable X defined as $$\int_{-\infty}^{x'} dp(x)$$ where p(x) is the Probability Density Function of X.  Usually, I see the CDF defined thus: $$\int_{-\infty}^{x'} p(x)dx$$ I have only ever seen and solved integrals with respect to a variable, not with respect to a function of a variable, so I don't know if those two are equivalent. Are they? Or is the first expression wrong?

If $f(x)$ is a density function and $F(x)$ is a distribution function of a random variable $X$ then I understand that the expectation of x is often written as:   $$E(X) = \int x f(x) dx$$  where the bounds of integration are implicitly $-\infty$ and $\infty$. The idea of multiplying x by the probability of x and summing makes sense in the discrete case, and it's easy to see how it generalises to the continuous case.  However, in Larry Wasserman's book All of Statistics he writes the expectation as follows:  $$E(X) = \int x dF(x)$$  I guess my calculus is a bit rusty, in that I'm not that familiar with the idea of integrating over functions of $x$ rather than just $x$.   What does it mean to integrate over the distribution function? Is there an analogous process to repeated summing in the discrete case? Is there a visual analogy?   UPDATE: I just found the following extract from Wasserman's book (p.47):     The notation $\int x d F(x)$ deserves some comment. We use it merely   as a convenient unifying notation so that we don't have to write   $\sum_x x f(x)$ for discrete random variables and $\int x f(x) dx$ for   continuous random variables, but you should be aware that $\int x d F(x)$  has a precise meaning that is discussed in a real analysis   course.   Thus, I would be interested in any insights that could be shared about what is the precise meaning that would be discussed in a real analysis course?


There are dozens of different types of fallacies: formal fallacies, informal fallacies, faulty generalizations, red herring fallacies, and so on...  But is there one simple, singular condition that all of these meet that makes them eligible for such a classification?  Such as If x is y, then x is a logical fallacy.  Where x is the proposition and y is the condition that it meets.

I may need to refine this question, since I am mostly grappling with a murky intuition and haven't yet done the real work.  When I encounter many of the well-known paradoxes, such as Zeno's dichotomy, Russell's set containing itself, problems of "zero" and "one," the concept of the infinitesimal in calculus or a "point" in time, Hegel's "identity of identity and difference," even aspects of quantum indeterminacy, they all seem tantalizingly similar. They all seem to arrive at a point-position, like the "origin" in Cartesian coordinates, that must be defined as both "inside" and "outside" the totality under consideration. Or something like that.   Is there some reduction of these and other paradoxes that is "more fundamental" or best clarifies what they have in common, some sort of meta-paradox? As I say, this may be either too wooly or something everyone with a background in logic already knows, but I thought I'd toss it out there.


I have had a few problem with exim4 and various phone mail clients (Windows Phone in particular) that seem to result from bad mail clients together with GnuTLS. I'd like to recompile exim4-daemon-heavy to use OpenSSL to see if that helps anything.  Now, I've gotten used to debian's packaging system and am unsure on how to do this. I've downloaded the exim4 source using apt-get source exim4. I then edited the file Debian/rules to uncomment OpenSSL = 1.  Then I tried make, but was told that I need to copy the template src/EDITME to Local/Makefile and edit it to my taste. My taste would be a drop-in replacement for the existing and running exim4-daemon-heavy, just using OpenSSL. And here I am stumped as there are quite a lot of options there and I don't like to break my email setup more than neccessary.  So... what can I do to make this test?

I want to create a DEB file manually. I would like to just provide a folder which contains data to install, and a script to be executed after installation.  Is this possible?


I am traveling to Indonesia with 2 stops, one in Germany and another in Singapore. Can I use my Albanian passport to leave Albania and pass through Germany and my South African passport to pass through Singapore and enter Indonesia, since South African passport grants me visa on arrival in Indonesia.   Also what documents should I provide at the airport besides ticket and passport?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


Hey guys, I'm just trying to remove all the blue behind the logo I'm creating for our 7's tour group. I've never really used photoshop. As I just want the green image with the yellow outline. Thanks in advance.

I'd like to use this image on a web site.    What I need to do is change the background from black to transparent, so I can use the arrow on my site maintaining the page background.  I used Gimp to convert the image to .png, but how do I proceed now?