Putting char into a java string for every 4 characters
Putting char into a java string for each N characters
I am trying to prove that the affine hull of a set $X \subseteq \mathbb{R}^d$ is equal to the affine hull of the clojure of that set: $$ \text{aff}(X) = \text{aff}(\text{cl}(X)). $$  Proving $\text{aff}(X) \subseteq \text{aff}(\text{cl}(X))$ is easy, but containment in the other direction is harder.  I am assuming there is a sequence $\{ x_k \}_{k=1}^\infty \subseteq X$ such that $\lim_{k\to \infty} x_k = x^*$. The point $x^*$ is obviously contained in $\text{aff}(\text{cl}(X))$. But I am not sure how to show it is also in $\text{aff}(X)$, specifically because I am not sure how to show that $x^*$ lies on a line connecting two points in $X$.  Any suggestions on how to surmount this hurdle are welcome. How to Improve Mathematical Thinking and General Problem Solving Skills? I'm a sophomore in university and seriously feel that I'm bad at solving mathematical and algorithmic problems (be it discrete math, calculus or just puzzles). I noticed that I'm only good at solving questions that are similar to the ones that have been taught to us.  Here's how I generally approach it:   What is the problem? What do I need to do here? Does it look like I've encountered this before?  Can I think of a smaller problem to solve instead?   If the answer is no to all the above then I sort of blank out. I stare at it and force my brain to run through a wide variety of stuff, almost like a brute force attempt of solving it. Obviously that leads me to nowhere everytime. I simply can't think "outside the box."   What can I do to improve my situation? Why enums require an explicit cast to int type? Height of an HTML select box (dropdown) Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.   The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either. Gauss's mean value theorem problem Suppose that  $f(z)$ is analytic and $f(z)\neq0$  on the disc $|z|&lt;1$ .  Show that for $0&lt;r&lt;1$,  $$ \exp\left[\frac{1}{2\pi}\int_{0}^{2\pi}{\log}|f(re^{i\theta})|\,d\theta\right] = |f(0)| $$  Any other theorems needed to solve this problem? I don't have any idea just with "Gauss's MVT"  Thank you in advanced. I could not install my modem driver so I have to update and install applications offline. For this I want to use keryx but to install keryx, Python and wxPython have to be installed first. So how do I install Python and wxPython offiline on Ubuntu 13.04?  Note : I don't have internet connection in Ubuntu. So I'll have to download the required file from my Windows 7. How to test that Apex Batch finish() sends an email? I have a Batch class that sends an Email from its finish method and want to test that. a But....I cannot test it. The the above test fails as there was no email invocation at all. BUT: I see it in the Limits view of my Dev Console that indeed one email invocation happens. Why?!  The batch class:  public MyBatch implements Database.Batchable&lt;SObject&gt; {      ...      public void finish(Database.BatchableContext context) {         sendEmail();     } }   The test method:  @isTest private static void sendsEmailOnFinish() {      Test.startTest();        MyBatch b = new MyBatch();     Database.executeBatch(b);     Test.stopTest();       // Verify     System.assertEquals(1, Limits.getEmailInvocations()); }   I thought this might be connected to using Test.startTest() and stopTest() but even moving the assertEquals before the Test.stopTest() doesn't make my test run. I have a sight hosted on .ie domain but it is near the NI(Northern Ireland) border and the business has a lot of NI traffic. So when someone searches in NI with certain key words I would like the site to appear in the results, it currently doesn't.   I have seen this post    But was wondering the best way around this. Would it be to create a .co.uk version that redirects to the .ie site? Or would I have to create a separate .co.uk site?  Any help appreciated thanks. Example of a finitely generated module with submodules that are not finitely generated If a black body is a perfect absorber, why does it emit anything? I'm trying to start understanding quantum mechanics, and the first thing I've come across that needs to be understood are black bodies. But I've hit a roadblock at the very first paragraphs. :( According to :     A black body (also, blackbody) is an idealized physical body that absorbs all incident electromagnetic radiation, regardless of frequency or angle of incidence.   OK, that's nice. It's an object that absorbs (takes in itself and stores/annihilates forever) any electromagnetic radiation that happens to hit it. An object that always looks totally black, no matter under what light you view it. Good. But then it follows with:     A black body in thermal equilibrium (that is, at a constant temperature) emits electromagnetic radiation called black-body radiation.   Say what? Which part of "absorbs" does this go with? How can it absorb anything if it just spits it right back out, even if modified? That's not a black body, that's a pretty white body if you ask me. Or a colored one, depending on how it transforms the incoming waves.  What am I missing here? Trying to purge MySQL fails I'm running in circles currently, trying to fix some mysql problem.  I couldn't use apt-get for a while now, because it always stuck at the line Setting up mysql-server-5.6 (5.6.27-0ubuntu0.15.04.1) ... and didn't let me do anything. So I tried to reinstall mysql, purging it. While I was able to remove mysql-server and mysql-client eventually, I'm still unable to purge mysql-common. Obviously, I managed to corrupt something, but how can I get my system back and running at this point?  ...:~# apt-get purge mysql-common Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   mysql-common* 0 upgraded, 0 newly installed, 1 to remove and 5 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 423600 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: /var/lib/dpkg/alternatives/my.cnf corrupt: invalid status dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common E: Sub-process /usr/bin/dpkg returned an error code (1)   -  ...# sudo dpkg -P --force-all mysql-common (Reading database ... 424733 files and directories currently installed.) Removing mysql-common (5.6.27-0ubuntu0.15.04.1) ... Purging configuration files for mysql-common (5.6.27-0ubuntu0.15.04.1) ... update-alternatives: error: no alternatives for my.cnf dpkg: error processing package mysql-common (--purge):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  mysql-common   -  ...:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid   My goal is to just get it back and running again (mysql). Uploading an image from the web can leave paste broken in editor Meaning of "over in" I read this sentence in a book:     I just took part in a study over in the Psychology Department.   Why do we add over in front of in the here? My wife and I didn't know we're pregnant and in a weekend fun with friends we smoked a bit of weed - we don't usually smoke weed or cigarettes.  This is not something we're regulary doing as I said, but how bad to the fetus can it be ? I need to extrude a circular shape from a surface that's basically just a grid of quads. What's the best practice to do this without screwing up the topology too much?  I basically want to have a circular face I can extrude, in order to have a cylinder like protuberance on the object, something like this: Masking NetCDF time series data from shapefile using Python I have a 3-D time-series precipitation data (187 x 1800 x 3600), stored in a NetCDF file. I need to obtain the precipitation data for a shapefile. import matplotlib.pyplot as plt from netCDF4 import Dataset, num2date,  from matplotlib.pyplot import figure from datetime import datetime, date, timedelta import numpy as np import xarray as xr import pandas as pd import geopandas as gpd       MSWEP_monthly = 'D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4'  MSWEP_monthly = Dataset(MSWEP_monthly, 'r') Pre_MSWEP = MSWEP_monthly.variables['precipitation'][:]   MSWEP_monthly2 = xr.open_dataarray('D:\G3P\DATA\Models\MSWEP\MSWEP_monthly.nc4')  Lon_MSWEP = MSWEP_monthly2.lon Lat_MSWEP = MSWEP_monthly2.lat  Africa_Shape = gpd.read_file('D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp')    from osgeo import gdal,osr,ogr  def makeMask(lon,lat,res):     source_ds = ogr.Open(shapefile)     source_layer = source_ds.GetLayer()       # Create high res raster in memory     mem_ds = gdal.GetDriverByName('MEM').Create('', lon.size, lat.size, gdal.GDT_Byte)     mem_ds.SetGeoTransform((lon.min(), res, 0, lat.max(), 0, -res))     band = mem_ds.GetRasterBand(1)       # Rasterize shapefile to grid     gdal.RasterizeLayer(mem_ds, [1], source_layer, burn_values=[1])       # Get rasterized shapefile as numpy array     array = band.ReadAsArray()        mem_ds = None     band = None     return array  shapefile = 'D:\G3P\DATA\Shapefile\Africa_SHP\Africa.shp' source_ds = ogr.Open(shapefile)  # calculate the cellsize cellsize = Lon_MSWEP[:][1] - Lon_MSWEP[:][0]   # create the mask mask = makeMask(Lon_MSWEP,Lat_MSWEP,cellsize)  Now if I implement the following code, the precipitation data for the first day (from the time-series) can be obtained with shape of 1800x3600: precip = np.ma.masked_where(mask==0,Pre_MSWEP[0,:,:])  I tried to use a for loop to mask the precipitation data for the entire time series (time, lon, lat) over the area of interest. however, the below code gives me a 2-D data, probably for the last day. Why is that? for i in range(len(Pre_MSWEP)):     precip = np.ma.masked_where(mask==0,Pre_MSWEP[i,:,:]) Random contacts on my iPhone 5 I recently bought a new iPhone 5. When I was going through my contacts today, I noticed a lot of email adresses stored along with the other numbers. I didn't even know most of them! What has happened? I'm trying to install Linux alongside my 64-bit Windows 8 and went into my partition manager to find this structure.    In order to create partitions for my Linux install I need to free up some space. I see that the last partition is an empty recovery partition, as you can see highlighted, it's 100% free.  I was wondering is it okay to just remove this partition seeing as it doesn't appear I'll be losing anything?  Not sure if this helps but this is on a Fujitsu AH532 running Windows 8 64-bit with UEFI. What are some strategies that I can employ to handle a power gamer that constantly outshines the rest of the party? This is a friend of us all and we don't want to boot him, but combat simply isn't fun when the party has nothing to do while he mops up an encounter by himself. Where can I obtain an English dictionary with structured data?