text:
Q: How would you rewrite a SASS extends How would you rewrite this SCSS code to make it pass the build
  .form-check-label input[type='checkbox']:focus + label::before {
    @extend .form-control:focus;
  }

When I ran my compile SASS it says to replace @extend .form-control:focus; with @extend .form-control, :focus; but it breaks my site.
Is there any way to rewrite the above SCSS?


text:
Q: Linear independence in the algebraic closure of $\mathbb{C}(z)$ Fix $N>0$. Let $b_i=(b_{i,1}, b_{i,2}, b_{i,3}, b_{i,4})$, $i=1,\ldots, m$, be distinct 4-tuples of integers with with all $0\leq b_{i,j}< N$. (The zero tuple is disallowed.)
Define $w_i=(\prod_{j=1}^4 (z-z_j)^{b_{i,j}})^{\frac1{N}}$.
Consider $w_i$ as an element of the following vector space: the algebraic closure of $\mathbb{C}(z)$ over the field $\mathbb{C}(z)$.
I believe that Puiseux series can be used to show the linear independence of the $w_i$. Are there any other approaches that might show the linear independence of the $w_i$?
More generally, are there any other general techniques for proving linear independence of functions in the given vector space?

A: You can also use Galois theory or monodromy. Take a minimal linear dependence relation and apply the automorphimsm of the algebraic closure that fixes $(z-z_j)^{1/N},j>1$ and fot $j=1$ multiplies the function by an N-th root of unity, thus getting a new relation and you can produce a shorter relation from those two.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Why calling cancelAllLocalNotifications removes/clears Notification Center? Using cancelAllLocalNotifications should basically cancel the delivery of all scheduled local notifications. But it goes ahead and clear the history as well, and as a result the Notification Center doesn't show the last 1/5/10 recent items/notifications.
I'm not sure if it's a bug or is this intentional?
Perhaps i should use cancelLocalNotification: to cancel only scheduled local notifications (that are scheduled to fire in the future). But will that have an impact on the 64 local notifications limit?

A: I've reported this as a bug to Apple. Maybe it's intentional, and maybe not. I ended up using cancelLocalNotification: instead of cancelAllLocalNotifications.


text:
Q: How to traverse nodes to capture text for use in Google Tag Manager? I'm trying to capture the value of the product description when an image link is clicked. Then use that product description in a Google Tag Manager variable. Here's a sample of the relevant page source:

            PRODUCT DESCRIPTION

The user can click either the div class=item2 or div class=list image to trigger the link click.
I'm thinking the answer will involve using .closest() and/or a combination of parentElement, nextElementSibling but I cannot get it to work in Google Tag Manager.
I've tried various combinations using the GTM Datalayer-type Variable and the Custom Javascript-type variable without success.


text:
Q: Is it fully possible to install Ubuntu on a "slave HDD", by using Wubi, I've Windows 7 as primary HDD? Is it fully possible to install Ubuntu on a slave HDD, by using Wubi,  I've Windows 7 as primary HDD ?
I mean will Wubi installation go normal on "slave HDD", like no blue screens of death , or any mishappenings n accidents like data loss etc..
I've HDD structure of 2 X 1TB of 2 HDDs.
Disk0
C: Windows 7 - 40GB
D: Store (for data n all) - 891 GB

Disk1
E: HDD1 - (for backups mostly) - 931GB

Now what I want is to make a 30GB partition from E: (Disk 1 "slave") and install Ubuntu there using Wubi.
So Will WUBI be able to install Ubuntu on "slave HDD" normally, without any fatal mishappenings or accidents or ny kind data loss.

A: The Wubi aim is to enable existing Windows users, unacquainted with Linux, to try Ubuntu without risking any data loss (due to disk formatting or partitioning mistakes). It can also safely uninstall Ubuntu from within Windows.
Wubi (Windows-based Ubuntu Installer) is an official Windows-based free software installer for Ubuntu, which installs the software on an existing Windows partition, thus without need for partitioning.
Wubi adds an entry to the Windows boot menu which allows the user to run Linux. Ubuntu is installed within a file in the Windows file system (c:\ubuntu\disks\root.disk), as opposed to being installed within its own partition. This file is seen by Linux as a real hard disk. Wubi also creates a swap file in the Windows file system (c:\ubuntu\disks\swap.disk), in addition to the memory of the host machine. This file is seen by Ubuntu as additional RAM.
Limitation of Wubi:
Compared with a regular installation, a Wubi installation faces some limitations. Hibernation is not supported and the filesystem is more vulnerable to hard reboots.[1] Also, if the Windows drive is unmounted uncleanly (Windows crash, power failure, etc.), Ubuntu will not be able to mount the Windows drive and boot until Windows has successfully booted and shut down. If the Windows system cannot be booted after the crash, the user also cannot boot Ubuntu.
Performance related to hard-disk access is also slightly slower, more so if the disk image file is fragmented, on a Wubi install compared to a normal one.
Since Wubi installs root.disk on top of the Windows file system which could technically become corrupted and even prevent Windows from booting, running chkdsk /r (may take a significant amount of time to run) to fix the damaged file system and shutting down Windows cleanly may help.

A: As stated Wubi has some of it's own limitations, like some stated above.
So can Ubuntu be installed on a "slave HDD" , "Without Wubi installer, with normal installer" . I mean Will Ubuntu Operating system work OK ! from slave HDD ?
also I'vent enabled RAID yet on my 2 X 1 TB HDDs for I heard somewhere Ubuntu probs with RAID. so I've RAID disabled on my system. and NO RAID drivers 've been installed yet in windows.


text:
Q: Entity Framework with Informix; - How to fix You must set this property to a non-null value of type 'Double' Here is our work environment
Informix Server v 12.10. (recently upgraded from 11.5)
IBM Data Server Client 10.5.3.4 (recently upgraded from 9.7.4)
Entity Framework v 5
C# 4.0
We have a table which has 2 decimal columns, both defined as decimal(11,4).
In entity class. both are declared as type "decimal?" (columns are nullable type)
When updating these two columns with decimal values (ex 123.345M), one column value changing as expected but other one taking only integer value!
Strange right! same code being used to update both columns, but only one get updated!
Here is partial code sample:
Database table DDL
vndr_pack_net_wgt_qty DECIMAL(11,4),
vndr_pack_gross_wgt_qty DECIMAL(11,4)

C#
public partial class Cmrcl_Invc_Line_Item
{
public decimal? vndr_pack_net_wgt_qty { get; set; }
public decimal? vndr_pack_gross_wgt_qty { get; set; }
}

Initializing properties:
var dbContext = new ProductContext();

var lineItem = dbContext.Item.FirstOrDefault(x => x.id == 5139);

lineItem.vndr_pack_net_wgt_qty = 125.337M;
lineItem.vndr_pack_gross_wgt_qty = 126.377M;

dbContext.SaveChanges();

vndr_pack_net_wgt_qty saved with 125, but vndr_pack_gross_wgt_qty saved with 126.377.
We observed same results even with ADO.Net (not using entity framework).
But, when we tried with double data type in C# program, both columns updated as expected.
So, tried to change entity property type to "double". "
public double? vndr_pack_net_wgt_qty { get; set; }
public decimal? vndr_pack_gross_wgt_qty { get; set; }

var lineItem = dbContext.Cmrcl_Invc_Line_Item.FirstOrDefault(x => x.cmrcl_invc_id == 5139);

after changing one property to double, i am getting exception

The 'vndr_pack_net_wgt_qty' property on 'Cmrcl_Invc_Line_Item' could not be set to a 'Decimal' value.You must set this property to a
  non-null value of type 'Double'.

Before upgrade and migration, everything was working as expected.
We are not seeing these issues on another server (production) which runs on Informix 11.5.
We are not sure what went wrong or what causing the problem.

A: When Informix server version upgraded to 12.10 FC7, issue got resolved.


text:
Q: Resizing a div to fit content with maximum height I have a div with dynamic content. When the content loads in the div I want the div to resize to fit the content. But I want this resizing to have a maximum height. If the content needs more than this maximum height I'd like there to be a scrollbar.
I've searched through the questions here but haven't been able to find what I'm looking for (apart from one where the question-asker replied saying he'd figured it out himself). I've read I can do it with jquery but I'm pretty new to that, but I did go through the demos of resizing a div, and changing classes and stuff like that but I'm really at a loss on how to implement what I'm looking for. I have tried to find a solution to this, so please be gentle.

A:  div {height:auto;overflow:scroll;max-height:200px;}

A: Use:

Some dynamic content loads inside the div

Then add:

 before closing the "div":

Some dynamic content loads inside the div

A: You could do this with css, e.g.: max-height: 100px; overflow-y:scroll;


text:
Q: Plugin with id 'com.android.application' not found I have an old project, I import this project in my Android studio, i am getting this error.
Yes I searched for it from internet and i found many solutions for that,but non of them solved my issue.
Here is my build.gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
    jcenter()
}
apply plugin: 'com.android.application'

dependencies {
    classpath 'com.android.tools.build:gradle:2.2.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Here is My module level build.gradle
 here is my build.gradle which is under app>src>build.gradle
apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
    applicationId "com.pedrocarrillo.expensetracker"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 3
    versionName "1.2"
}

signingConfigs {
    release {
        def Properties localProps = new Properties()
        localProps.load(new FileInputStream(file('../local.properties')))
        storeFile file("tracker_expense.jks")
        storePassword localProps["storePass"]
        keyAlias localProps["alias"]
        keyPassword localProps["pass"]
    }
}

buildTypes {
    release {
        signingConfig signingConfigs.release
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
    }
}
}

repositories {
maven { url "https://jitpack.io" }
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
//    compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.android.support:gridlayout-v7:23.0.1'
compile 'com.android.support:support-annotations:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'io.realm:realm-android:0.82.2'
compile 'com.github.PhilJay:MPAndroidChart:v2.1.4'
}

A: Try This : Project Level Gradle File...
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Module Level Gradle File...
apply plugin: 'com.android.application'
//apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'
    defaultConfig {
        applicationId "com.pedrocarrillo.expensetracker"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 3
        versionName "1.2"
    }

    signingConfigs {
        release {
            def Properties localProps = new Properties()
            localProps.load(new FileInputStream(file('../local.properties')))
            storeFile file("tracker_expense.jks")
            storePassword localProps["storePass"]
            keyAlias localProps["alias"]
            keyPassword localProps["pass"]
        }
    }

    buildTypes {
        release {
            signingConfig signingConfigs.release
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    //    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.android.support:gridlayout-v7:23.0.1'
    compile 'com.android.support:support-annotations:23.0.1'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile 'com.android.support:recyclerview-v7:23.0.1'
    compile 'com.android.support:cardview-v7:23.0.1'
    compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
    compile 'io.realm:realm-android:0.82.2'
    compile 'com.github.PhilJay:MPAndroidChart:v2.1.4'
}

A: In your top-level file you have to remove this line:
apply plugin: 'com.android.application'


text:
Q: Show AxB is countable Want to show if A, B are countable $\implies$ AxB is countable.
I know I want to show that the elements of AxB can be enumerated (hence, AxB is bijective to $\mathbb{N}$), but how can I proceed from the table of elements of AxB below?

A: Consider $c_{n(n-1)/2+k}=(a_n,b_{n+1-k})$ for $n\in\mathbb N$ and $k=1,\dots,n$.
This enumerates all elements of $A\times B$, so $A\times B$ is countable.


text:
Q: Does the Java API or an open source library provide for a TreeMap-like data structure with constant-time lookup? I get that a TreeMap has log(n) insertion and lookup runtime complexity.  However, a HashMap pointing to nodes in a linked list will provide for the same runtime complexity, but also constant-time lookup, which is a pretty big advantage.  However, you would have to implement the search/insert/delete functionality yourself.  I'm wondering if something in Java or another open-source library provides this for you?
I do realize that TreeMap's red-black tree might be better suited than a HashMap in certain situations, but certainly constant time lookup with natural-ordering is preferable in others.
NOTE: I know LinkedHashMap provides a built-in linked list for insertion order, but I'm talking about maintaining natural ordering like a TreeMap would do.

A: Only if your keys adhere to a pattern that you can take advantage of in the data structure.
A good example would be a TrieMap. See Wikipedia for a description and here for a discussion containing references to implementations.
I posted a Trie implementation here some time ago. Not sure how efficient it is but it works. I have certainly improved it since that post.


text:
Q: Thunderbolt 3 to Ethernet adapter I have just ordered one of the new Nov 2018 MacBook Airs that only come with Thunderbolt 3 (USB-C) ports. Just looking for a simple clean solution for a high performance adapter using the USB-C physical connector.
Notes:

*

*I am aware of the many USB-C to gigabit ethernet adapters that exist -- but I am looking for an adapter that takes advantage of Thunderbolt 3, the lower latency, and lower overheads. For example, on my old MacBook Air (2014), I use a Thunderbolt to Ethernet adapter ---> NOT a USB to Ethernet adapter.

*I am aware I can buy a Thunderbolt 3 to Thunderbolt adapter, and then plug in my Thunderbolt to Ethernet adapter ... but I don't want a double dongle. Who does?
Does there exist a Thunderbolt 3 to Gigabit ethernet adapter?
(n.b. the rest of this should be made into an answer and edited out including this editor's note...)
Note on the USB-C to Ethernet that Apple sells (Belkin)
If you read the reviews on the USB-C to Ethernet adapter that Apple officially sells (made by Belkin), there are a number of reviews that suggest that speed is throttled by using the USB-C adapter (compared to Thunderbolt).
A review by Elias A states:

"Compared the old macbook dongel that has thunderbolt with this one. Got close to 1000Mbits. With this Belkin USB-C dongel I get around 200-300 Mbits"

A review by William S states:

Not really gigabit
  This adapter is only recognized as a 100BaseTX, even if you try to set it manually. Returned it and bought a Thunderbolt 3 (USB-C) to Thunderbolt 2 adapter since I already had an old Thunderbolt to Ethernet adapter from Apple. This combo may not be elegant, but it gives me full gigabit speed

It is these reviews that prompted my question. There are other reviews that note that Thunderbolt also involves lower system resources than USB-C.
Update after buying Belkin USB-C to gigabit Ethernet adaptor
Based on one of the answers below, I unfortunately purchased the Belkin USB-C to gigabit ethernet adaptor ... and report below some comparison timings which reflect very poorly on the product.
In the following tests, I compare the speed to transfer, on the same Cat6 ethernet network, over the same cables, through the same routers:

*

*2014 Macbook Air:  using Apple Thunderbolt to Ethernet adaptor

*2018 Macbook Air Retina:  using Belkin USB-C (plugged into Thunderbolt 3 port) to Ethernet adaptor

Test 1:  3.8GB file

*

*2014 Mac - Apple Thunderbolt adaptor:  35 seconds

*2018 Mac - Belkin USB-C:  110 seconds. (Repeat tests returned 35 secs)

Test 2:  9.6 GB folder (with many files)

*

*2014 Mac - Apple Thunderbolt adaptor:  5 min 50 seconds

*2018 Mac - Belkin USB-C:  6 min 45 seconds

Test 3:  4 GB movie

*

*2014 Mac - Apple Thunderbolt adaptor:  63 seconds

*2018 Mac - Belkin USB-C:  87 seconds

The Belkin adaptor also got very very hot, and smelled burnt. I cannot explain the wildly variable results from the Belkin product either. An adaptor that returns worse results on a much faster 2018 Macbook Air (using USB-C) than Apple's own Thunderbolt adaptor on the 2014 Macbook Air frankly beggars belief. Whether the fault is the Belkin unit (of which there are many complaints on the Apple store site) or some inferior aspect of using USB-C compared to Thunderbolt ... I cannot say.
I will be returning the Belkin unit to the Apple store for a full refund: the product or technology is plainly inferior to what was available 4 years ago.

A: The ridiculous answer to your question is: buy the Apple Thunderbolt 2 to Ethernet adapter AND the Apple Thunderbolt 2 to Thunderbolt 3 adapter and daisy chain them.
As far as I can tell, that is currently the only way to get your ethernet to show up as Thunderbolt on the newer MacBook Pros.

A: We use the Belkin USB-C on all our thunderbolt 3 Macs and get speeds far in excess of the review people. I would expect they either got a bad adapter (it happens - even the best hardware companies can't ship every product perfect - that's what warranty support and service are for - to fix that).
We've never had a case where we needed to get a more expensive 10 GB adapter in our experience. We also get 500 to 700 MBps from the MacBook which only does USB with the Belkin adapter.
I would get those until you have a specific case you can't fix with networking checks and quality switches rather than spend more on an exotic combination of 10 GB adapters that run $200+ from the good vendors:

*

*https://www.sonnetstore.com/collections/thunderbolt-10gbe-adapters/products/solo-10g

*https://www.sonnetstore.com/collections/thunderbolt-10gbe-adapters/products/twin-10g-thunderbolt3-edition
Sonnet's Thunderbolt 2 adapters do very well in our high bandwidth use cases - MacPro serving files or accessing a SAN as do their thunderbolt to SFP adapters. They are pro supported and designed gear for always on use. We rarely if ever need to put them in a design studio or for ProSumer use, but if you have the funds, these are fun adapters that really work well.
For 95% of our use cases - the Belkin is the adapter to choose.

A: The only Thunderbolt 3 Ethernet adapters I'm aware of are either part of TB3 docks or really bulky 10GigE Ethernet adapters.
A USB-C GigE adapter will do just fine. I got one by Aukey for about 10€ which works pretty much just like the TB2 Ethernet adapter from Apple (it even looks the same). Same speed (100+ MB/sek realworld speed to my NAS), no latency or overhead issues.

A: Thunderbolt 1 supports 10GB symmetric (10GB each way), Thunderbolt 2 is 20GB symmetric, and Thunderbolt 3 is 40GB symmetric.  USB-C on Macs support USB3.1, which supports 10GB symmetric.
For Ethernet, nearly all  devices now support Gigabit Ethernet at most, which is 1GB. 10GB Ethernet is, as expected, 10GB, though few devices support this, and even fewer homes or even businesses have it.
Even the fastest Ethernet, 10GB, is easily supported by USB-C, so offering a Thunderbolt 3 to Ethernet adapter serves no benefit. For this reason, most such adapters are USB-C, which does support the full speed of Ethernet. Note that if you were to extend Thunderbolt using a Thunderbolt cable in order to reach say, your router, Thunderbolt is limited to cable lengths of half a meter, after which speed slows. (Thunderbolt cables are probably too expensive to even consider this option.)
Simply purchase the Belkin USB-C to Ethernet adapter and enjoy your highspeed Ethernet.


text:
Q: How to use Spring io Direct channel for passing messages from one queue to other ? Please give a context configuration example I want to pass message from one queue to other without any processing - how to configure in spring io ?

A: <int:jms-message-driven-channel-adapter channel="foo" ... />

<int:channel id="foo" />

<int:jms-outbound-channel-adapter channel="foo" ... />

See the documentation for full details.


text:
Q: assigning the same arrays to a list of rows I have an nx2 matrix corresponding to some x,y values and what I'd like to do is replace a subset of the 1x2 rows with some values. Currently I get that subset using find(). for instance, if I had the following matrix:
 k=    [1 2
        3 4
        5 6
        7 8
        9 0]

and I used find() on some other related 5x1 array to get say, the indices
indices = [1 3 5]

I would then like to quickly change rows 1, 3, and 5 in k to the same, predetermined row like for instance [-2 -6]. So the result would be...
 k=     [-2 -6
          3  4
         -2 -6
          7  8
         -2 -6]

I know that for an individual row I can just do k(1,:) = [-2 -6] but I can't seem to find the syntax for doing this generally to a list of rows. k(indices,:) = [-2 -6] is not a valid syntax. There is of course the two-line solution of doing it for column 1 and then column 2 but I would thing there is a compact way of doing this. Thanks.

A: You need to make sure that the size of the matrix you want to place into the old matrix is the same as the size of the elements being replaced.  In this case, size(k(indices,:)) = [3 2].  Use repmat to generate a matrix of the appropriate size, and then the assignment will succeed.
replacement = [-2 -6];

k(indices,:) = repmat(replacement,length(indices),1)

k =

-2    -6
 3     4
-2    -6
 7     8
-2    -6

A: You could also repeat the row by using one-indices:
row = [-2 -6];
k(indices,:) = row(ones(size(indices)),:);


text:
Q: Why is the affine $1$-space $\mathbb{A}^1$ non-compact? A topological space $X$ is called compact if every open cover has a finite (open) subcover, by definition. Why is the affine $1$-space $\mathbb{A}^1$ considered non-compact, in the topology used in algebraic geometry, where the zero-locus of polynomials in $1$-indeterminates are the closed sets and we do not have the Hausdorff property. I know that irreducible closed sets are all singletons and all other closed sets, except the whole space $\mathbb{A}^1$, are finite sets. Every open set equals the whole of $\mathbb{A}^1$ with a finite number of points removed. I am not sure how I can construct an open cover of $\mathbb{A}^n$ that has no finite (open) subcover?

A: Every affine variety is quasi-compact in the sense that every open cover has a finite subcover. This boils down to a fact from algebra: If $(I_s)_{s \in S}$ is a family of ideals of a ring $R$ with $\sum_{s \in S} I_s = R$, then $\sum_{s \in T} I_s = R$ for a finite subset $T \subseteq S$.
Most authors define compact := quasi-compact (i.e., the term "quasi-compact" is not necessary at all), but some authors (in particular within the Bourbaki school) define compact := quasi-compact + Hausdorff (see also Wikipedia). In this sense, only zero-dimensional varieties are compact, and in particular $\mathbb{A}^1$ would be non-compact (but quasi-compact).
In my opinion, overloading such a central notion of topology should be avoided at all costs. Also, there is no reason why the Hausdorff property should be included in the notion of a compact space, since the word "compact" refers to a kind of smallness, and Hausdorffness has nothing to do with smallness – it is a separation property. So I would suggest that we all agree on the definition compact := every open cover has a finite subcover. This has the benefit that no reader has to wonder if an author talking about compact spaces assumes Hausdorffness or not. It would also eliminate the need for an extra term like "quasi-compact". (Unfortunately, this will probably not happen, since the terminologies of quasi-compact schemes and morphisms are already too much engrained in the algebraic geometry community and literature.) And when you need both properties, you can just say "compact Hausdorff", as most authors already do.
There is a similar discussion for settling the notion of a ring, see Poonen's Why all rings should have a 1.


text:
Q: Start an Activity from Splash Screen, should I use run() or runOnUiThread()? I have a Splash Screen (Logo Activity) to show the company name for 3 seconds before app starts. I start Main Activity from a thread, here is the code:
public class Logo extends Activity {

Thread t;
public boolean dead = false;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.logo);

    t = new Thread() {
        public void run() {
            try {
                Intent i = new Intent(Logo.this, Main.class);
                Thread.sleep(3000);
                if (!dead) {
                    startActivity(i);
                }
                finish();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    };
    t.start();
}

The Main Activity is called from a worked thread, is this correct? What are the differents with this code (using runOnUiThread)?
...
if (!dead) {
    runOnUiThread(new Runnable() {
        @Override
        public void run() {
           Intent i = new Intent(Logo.this, Main.class);
           startActivity(i);
        }
    });
}
...

I see no difference with this code in debug mode (The same threads, the same operation, etc.).  Which is correct?

A: Starting an intent I think is not an UI operation. runOnUI thread runs UI operation on UI thread. So you can use either of thread (runOnUI or normal). May be normal thread will be good in this situation. But I would like to suggest you use timer instead.

A: To be honest, I don't like the Thread.sleep. PLease take a look at my solution:
new Timer().schedule(new TimerTask() {
    @Override
    public void run() {
      // Do your work here like... startActivity...
    }
}, SPLASH_DURATION); // SPLASH_DURATION IS IN MILLISECONDS LIKE 3000

Also you can block the user to prevent the back key like this:
@Override
public void onBackPressed() {
    // do nothing! disable user interaction!
}

A: You should use AsyncTask in "doInBackground" background thread and than sleep your thread(this thread not UIThread) "PostExecute" run on UI Thread than start your new activity
private class mSplashViewer extends AsyncTask<Void,Void,Void>{

 protected void doInBackground(Void params){

   Thread.currentThread().sleep(3000);
   return null;
 }

 protected void onPostExecute(){
  startActivity(...);
 }

}


text:
Q: boost::regex - \bb? I have some badly commented legacy code here that makes use of boost::regex::perl. I was wondering about one particular construct before, but since the code worked (more or less), I was loath to touch it.
Now I have to touch it, for technical reasons (more precisely, current versions of Boost no longer accepting the construct), so I have to figure out what it does - or rather, was intended to do.
The relevant part of the regex:
(?<!(\bb\s|\bb|^[a-z]\s|^[a-z]))

The piece that gives me headaches is \bb. I know of \b, but I could not find mention of \bb, and looking for a literal 'b' would not make sense here. Is \bb some special underdocumented feature, or do I have to consider this a typo?

A: As Boost seems to be a regex engine for C++, and one of the compatibility modes is perl compatibility--if that is a "perl-compatible" expression, than the second 'b' can only be a literal.
It's a valid expression, pretty much a special case for words beginning with 'b'.
It seems to be the deciding factor that this is a c++ library, and that it's to give environments that aren't perl, perl-compatible regexes. Thus my original thought that perl might interpret the expression (say with overload::constant) is invalid. Yet it is still worth mentioning just for clarification purposes, regardless of how inadvisable it would be tweak an expression meaning "word beginning with 'b'".
The only caveat to that idea is that perhaps Boost out-performs Perl at it's own expressions and somebody would be using the Boost engine in a Perl environment, then all bets are off as to whether that could have been meant as a special expression. This is just one stab, given a grammar where '!!!' meant something special at the beginning of words, you could piggyback on the established meaning like this (NOT RECOMMENDED!)
s/\\bb\b/(?:!!!(\\p{Alpha})|\\bb)/

This would be something dumb to do, but as we are dealing with code that seems unfit for its task, there are thousands of ways to fail at a task.

A: (\bb\s|\bb|^[a-z]\s|^[a-z]) matches a b if it's not preceded by another word character, or any lowercase letter if it's at the beginning of the string.  In either case, the letter may be followed by a whitespace character.  (It could match uppercase letters too if case-insensitive mode is set, and the ^ could also match the beginning of a line if multiline mode is set.)
But inside a lookbehind, that shouldn't even have compiled.  In some flavors, a lookbehind can contain multiple alternatives with different, fixed lengths, but the alternation has to be at the top level in the lookbehind.  That is, (?<=abc|xy|12345) will work, but (?<=(abc|xy|12345)) won't.  So your regex wouldn't work even in those flavors, but Boost's docs just say the lookbehind expression has to be fixed-length.
If you really need to account for all four of the possibilities matched by that regex, I suggest you split the lookbehind into two:
(?<!\bb|^[a-z])(?<!(?:\bb|^[a-z])\s)


text:
Q: HP DesignJet hardening / close ports I am trying to close unnecesary ports at our HP designjet plotter and I still have ports 280, 8086 and 8085 open.
I have switched off everyting except raw print 9100 and these three ones are still open.
The biggest problem I am facing is that I have abosolutely no idea what are these ports for.
Thanks for any tips!

A: If your device itself has no way to control this, then you'll have to add additional hardware in between. For example a dual network port embedded device, maybe a smart switch supports such things, that has a bridge between the device and the network, and has a firewall that only has the used ports you have whitelisted.


text:
Q: How can i get ID of any widget outside the MainActivity.java class file? I want to fetch information from MySQL database and display it in a ListView for this purpose i write code in separate class whose name is "BackgroundWorker.java". I'm getting everything from the database but I don't know how can i get id of TextView widget of my layout file in "BackgroundWorker" class to display result.
MainActivity.java code
new BackgroundWorker(this).execute()

BackgroundWorker.java code
protected void onPostExecute(String result) {
    //here i want to get id of layout widget to display result
}

A: For this type of problem, Android offers WeakReference, that you can get the reference to anything you want if you can manipulate this class
private static class SampleTask extends AsyncTask<Integer, Integer, String>{
    private WeakReference<MainActivity> activityReference;
    MainActivity activity;

    SampleTask(MainActivity context)
    {
        activityReference = new WeakReference<>(context);

    }

    //....
    @Override
    protected void onPostExecute(String s)
    {
        super.onPostExecute(s);
        activity = activityReference.get();
        if (activity == null || activity.isFinishing())
        {
            return;
        }
        //Now you have the activity you can access your fields including

    }
}

Visit here for more and detailed info


text:
Q: Statement always true I have a script where if there is a second argument the script will run else it will run an else statement but even if there is no second argument it will always run the script
if(member && args.slice(1) !== undefined)
  {
    member.kick(args.slice(1).join(' ')).then(() =>{
        message.channel.send("Successfully kicked " + "`" + user.tag + "`" +" for " + "**" +args.slice(1).join(' ') + "**" + " ")
    }).catch(err =>{
        channel.message.send("An unexpected error occured. Logs were sent to the devs")
        console.log(err);
        return;
    });
  }else{
    if(member){
        member.kick().then(() =>{
            message.channel.send("Successfullys kicked " + "`" + user.tag + "`")
            console.log (args[2], args)
        }).catch(err =>{
            channel.message.send("An unexpected error occured. Logs were sent to the devs")
            console.log(err);
            return;
        });

A: Assuming args is an array, .slice() will always return an array and never undefined. You should check for the length directly:
if (member) {
  const kick = args.length > 1 ? member.kick(args.slice(1).join(' ')) : member.kick();
  kick.then(() =>{
    message.channel.send("Successfully kicked " + "`" + user.tag + "`" +" for " + "**" +args.slice(1).join(' ') + "**" + " ")
  }).catch(err =>{
    channel.message.send("An unexpected error occured. Logs were sent to the devs")
    console.log(err);
  });
}

A: args.slice(1) will never be undefined. If the array args is too short, its result will be the empty array []. This is different from undefined.


text:
Q: C++ Class with member varialble vector  I have an assignment to make Information system about resorts in a country, be able to read/write data for the resorts from/to file and modifying it.
class CTоurist{
    string m_StrName;
    string m_StrCountry;
    int m_iAge;
public:
    //constructors, mutators, accessors overloading operator <<,>>

};

I don't have problem writing this class. And here I have class which contains as member variable vector of the first class's objects
class CHotel
{
    string m_strHotelName;
    int m_iNumberOfBets;
    double m_dAveragePrice; //average price per bet in the hotel
    vector <CTourist> m_vecTourists; //vector of tourists rested in the hotel
public:
.....
};

And one more class Resort containing as member variable vector of the second class's objects
class CResort
{
    string m_ResortName;
    unsigned m_Height;
    vector<CHotel*> m_Hotels;
public:
.....
};

So here is the problem. I'm not sure how to write the accessor,mutator and constructors for that vector variable so I can use them property. Thank you for checking and if someone could help me figure out these functions I'll be really grateful!

A: if i understand correctly you want to know the best way to get your hotels from cResort.
i would recommend
cHotel* GetHotelByName(std::string& a_sName)
{
    for(int i = 0; i < m_Hotels.size(); ++i)
    {
        if(m_Hotel[i].GetName() == a_sName)
            return m_Hotel[i]
    }
return nullptr; // if non found return return null
}

and add a GetName function to your hotel class which returns a string of its name.
this also allows you to SetName etc.

A: 1) Accessor, mutator: There are plenty of options.
You can create another class like CTouristList (and CHotelList respectively), that wraps the vector, have it referenced from the CHotel class (accessor methods like CTouristList& CHotel::GetTouristList() and const CTouristList& CHotel::GetTouristList() const) and implement methods like CTouristList::Add, CTouristList::Remove, CTouristList::Get, etc.
Or you can add methods like CHotel::AddTourist() directly on the CHotel class.
2) Constructor. Nothing needed in constructor. But for vector<CHotel*> you may need destructor in CResort to explicitly free the CHotel instances. Though not sure why you want to use pointers to CHotel.

A: You can put the accessor and mutator functions in CTourist just like you would if they were not being stored in a Vector.
To utilize them once they are in CHotel you could add a function in CHotel that returns a pointer to a CTourist.
// Access a CTourist
Hotel.getTourist(1)->setName("Tourist name");

Adding a method that returns the number of tourist that visited a hotel would make it easier to loop through them.
for(int i = o; i < Hotel.touristCount(); ++i)
{
  // Do something useful
  std:: cout << "Hello " << Hotel.getTourist(i)->getName();
}

In that case your CHotel::touristCount() would be a wrapper around the vector<>.size();
If you do not want code outside of CHotel to have direct access to a CTourist object then create wrapper functions in CHotel that do what you would want to do externally.
i.e.
    std::cout << Hotel.getTouristName(1);
instead of
std::cout << Hotel.getTourist(1)->getName();


text:
Q: Error Uploading When Using ListData.svc and HTTPS SharePoint 2016 on premise
Site Collection admin
Using ListData.svc, I can create list items.
Exact code works with SP10 with no errors.
Using the code below, I'm able to upload a file, but I'm receiving an error.
string sharePointSvc = "https://sp2016.some.url/sites/random/_vti_bin/ListData.svc";

            using (FileStream file = File.Open(@"C:\test1.docx", FileMode.Open))
            {
                ServRef.RandomDataContext ctx = new ServRef.RandomDataContext(new Uri(sharePointSvc));

                ctx.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;

                string filename = Path.GetFileNameWithoutExtension(file.Name);
                string path = "/sites/random/dropofflibrary/" + Path.GetFileName(file.Name);
                string contentType = "Interest Summary";

                ServRef.DropOffLibraryItem documentItem = new ServRef.DropOffLibraryItem()
                {
                    ContentType = contentType,
                    Name = filename,
                    Title = filename
                };

                ctx.AddToDropOffLibrary(documentItem);
                ctx.SetSaveStream(documentItem, file, false, contentType, path);

                try
                {
                    ctx.SaveChanges();
                }
                catch (Exception ex)
                {
                    var err = ex.Message;
                    throw;
                }
            }

Errors
Output error:  An error occurred while processing this request.
Errors from Fiddler:
                Auth:
No Proxy-Authenticate Header is present.
No WWW-Authenticate Header is present.
Caching:
Under RFC2616, HTTP/500 responses will not be cached regardless of what caching headers may be present.
HTTP/1.1 Cache-Control Header is present: no-cache
This response does not specify explicit HTTP Cache Lifetime information and does not specify a Last-Modified date. Heuristic expiration is typically based on Last-Modified date. Lacking Last-Modified, this response may be revalidated on every use or once per browsing session, depending on the browser configuration.
This response contains neither an ETAG nor a Last-Modified time. This will prevent a Conditional Revalidation of this response.

A: Including the Path property fixed the issue I was having.
ServRef.DropOffLibraryItem documentItem = new ServRef.DropOffLibraryItem()
{
        Path = path,
        ContentType = contentType,
        Name = filename,
        Title = filename
};


text:
Q: uwsgi plugin "python3" works with Python 3.6 and not with Python3.8 I have the following uwsgi config:
[uwsgi]
callable=app
mount = /labs=/home/vinzee/projectname/app/wsgi.py
manage-script-name = true
touch-reload=/home/vinzee/projectname/app/wsgi.py
socket=/tmp/labshome.sock
processes=5
threads=1
venv=/home/vinzee/.virtualenvs/projectnamevenv38
chdir=/home/vinzee/projectname/app/
plugin=logfile,python3
logger=delete file:/dev/null/c.log
log-route = delete (\] POST \/save => generated )
pythonpath=/home/vinzee/projectname/

The virtual environment specified in venv uses Python3.8. And when reloading uwsgi, I get the classic error:
ModuleNotFoundError: No module named 'flask'

The same error happens when uwsgi's plugin is python and the project uses Python >= 3, as can be seen in this answer.
When I switch to Python3.6, the ModuleNotFoundError disappears and everything works properly.
I already have the package uwsgi-plugin-python3 to the latest version.
How can I get rid of this error for Python3.8? What package do I need to install?

A: It seems that this is a problem of creating a virtual environment.
virtualenv flask

cd flask

source bin/activate    (for activate env )

also you can try to add your python path in wsgi file config
sys.path.append('/home/deployer/anaconda3/lib/python3.5/site-packages')

or
export PYTHONPATH=/root/environments/my_env/lib/python3.6/site-packages/

finally.. run :
python -m flask run


text:
Q: Wrapping text around figures in poster headerboxes I am working on a poster with headerbox elements. In one of the boxes I try to have an image on the right side and have the text left of it. I tried different minipage and wrapfigure examples but the image ended up beeing all over the poster and not in the headerbox at the right position. :/
\headerbox{dataset}{name=dataset,column=1,span=2,row=0}{
\begin{wrapfigure}{l}{1in}
 \includegraphics[width=1in]{dataset}
 \noindent
 \hrulefill
 \end{wrapfigure}
 Lore ipsum
 \vspace{0.5em}
}

A: To place the wrap figure at the right , you have to use r not l. Another fact is that it should have enough text in the surrounding so as to wrap properly. If you want to force the placement **exactly here* you can use the capital R (or L, I, or O). Fot details see the documentation of wrapfigure. (texdoc wrapfig). Here is a complete MWE:
\documentclass{article}
\usepackage{graphicx,wrapfig,lipsum}
%------------------------------------------
\begin{document}
This is where the figure goes with text wrapping around it. There should be enough text around the wrapfigure so that it is warpped properly.
%------------------------------------------
\begin{wrapfigure}{r}{6cm}
\includegraphics[width=6cm]{example-image-a}
\caption{A wrapped figure going nicely inside the text.}\label{wrap-fig:1}
\end{wrapfigure}
%------------------------------------------
\lipsum[3]
\par
Figure~\ref{wrap-fig:1} is a wrapped figure. \lipsum[4]
%------------------------------------------
\begin{wrapfigure}{R}{6cm}
\includegraphics[width=6cm]{example-image-a}
\caption{A wrapped figure going nicely inside the text.}\label{wrap-fig:1}
\end{wrapfigure}
%------------------------------------------
\lipsum[5]
%------------------------------------------
\end{document}


text:
Q: Curve fitting to step function If all that is known of a plot is that the curve passes through certain squares on a grid, is there any way, other than by estimation or trial & error, to work out what the equations to the curves may be?
Please see example below:

From the filled squares, I would like to work out the maximum curve, minimum curve, & the resultant step function.
(In the above example, the max & min curves are clearly $x^2$ & $(x-1)^2$. The blue curve enters the shaded squares on the LHS & the red curve exits the shaded squares on the RHS.)

A: If the problem is to have a smooth "mean" curve, the equation is y(x)=(x-(1/2))²
If the problem is to have a stepped curve, the exact equation involves a Fourier series . An approximate is obtained with the the series limited to a number of terms depending on the expected accuracy.
$$y(x)=\left(x-\dfrac12+\dfrac1\pi\sum_{k=1}^\infty\dfrac1k\sin(2k\pi x)\right)^2$$

A: I'd suggest curve fitting the bottom corners and the top corners of the shaded cells. One easy way to experiment with curve fitting is to use Excel. You can chart the data and then use the "Add Trendline" function to do fitting with various types of curves.
Alternatively, fit a curve through the centers of the cells, and then create the min and max curves by translating the mid curve upwards and downwards by half the cell height.


text:
Q: CodeIgniter throwing Error 404 when posting certain values through form submit I'm using and older version of CodeIgniter (1.7.1), and I'm having problems submitting forms.
I have a form with some text fields and a textarea field which has a TinyMCE editor attached.
If I insert only text into textarea, everything works fine.
If I insert an image like this:

Everything works fine as well.
The problem occurs whenever I insert an image through TinyMCE (and an upload manager). In this case, something like this is inserted:

When I hit the Post button, I get a "404 Page Not Found" page. I can't even print what is getting posted. It just throws this error immediately.
Thank you for your answers!
EDIT:
View file
Controller file
It is really old code (hence the 1.7 CI version), that is why it is a little messy.

A: Try to change the src using JavaScript to the first one and then submit the form. That may work.
If you could post your code, we could more easily give you an answer for the 404 error message.


text:
Q: non-symmetric version of compact = totally bounded + complete It is well-known that a metric space is compact iff it is totally bounded and complete. More generally, it is well-known that a uniform space is compact iff it is totally bounded and complete. Is there a similar such characterization of compactness for quasi uniform spaces?

A: This answer is preliminary. Now I am looking in the papers and soon I shall extend the answer.
I am related with the subjects, but I am not a specialist. I looked into papers and can say you the following. If you are so interested and want to have a perfect answer, you may ask Hans-Peter Künzi (use this e-mail: Hans-peter.Kunzi (at) uct.ac.za).
So, IMHO, it seems the following.
A quasi-uniformity on a set $X$ is a filter $\mathcal U$ on $X\times  X$ satisfying the conditions: Each $U\in\mathcal U$ is reflexive, and for each $U\in\mathcal U$ there is $V\in\mathcal U$ such that $V^2:=V\circ V\subset U$. Here $$V\circ V :=\{(x, z)\in X\times X:\mbox{ there is }y\in X\mbox{ such that }(x, y)\in V\mbox{ and }(y, z)\in V\}.$$ For each quasi-uniformity $\mathcal U$ the filter $\mathcal U^{-1}$ consisting of the inverse relations $$U^{-1}=\{(y, x)\in X\times X: (x, y)\in U\}$$ where $U\in\mathcal U$ is called the conjugate quasi-uniformity of $\mathcal U$. A quasi-uniformity $\mathcal U$ is said to be a uniformity if $\mathcal U^{-1}=\mathcal U.$ If $\mathcal U_1$ and $\mathcal U_2$ are quasi-uniformities on $X$ such that $\mathcal U_1\subset \mathcal U_2$, then $\mathcal U_1$ is called coarser than $\mathcal U_2$. The coarsest uniformity $\mathcal U^s$ finer than $\mathcal U$ is generated by the subbase $\mathcal U\cup\mathcal U^{-1}$. [Kü1]
A quasi-uniform space $(X,\mathcal U)$ is called precompact (resp. totally bounded) if for each $U\in\mathcal U$, a cover $\{U(x): x\in X\}$ has a finite subcover (resp. $\mathcal U^s$ is precompact). A uniform space is totally bounded iff it is precompact. Every totally bounded quasi-uniform space is precompact but the converse does not hold, in general. [Lam] A quasi-uniform space $(X,\mathcal U)$ is totally bounded iff it is doubly hereditarily precompact, that is both $\mathcal U$ and $\mathcal U^{-1}$ are hereditarily precompact. [Kü1] Each compact quasi-uniform space is precompact, but the converse does not hold, in general, too. As a simple example I can propose Sorgenfrey circle that is the unit circle $\Bbb T=\{e^{i\varphi}:\varphi\in\Bbb R\}$ endowed  with a quasi-uniformity generated by a base $\{U_n\}$, where $U_n=\{(x,y)\in\Bbb T: y=xe^{i\varphi}$ and $\varphi\in [0,1/n)\}.$ Sorgenfrey circle is a precompact quasi-uniform space, which is neither compact nor totally bounded.  On the other hand, a quasi-uniform space is precompact if and only if every ultrafilter is a Cauchy filter [FL]. At last, there exists a compact quasi-uniform space which is not totally bounded: let $a<b$ be real numbers; endow the set of the reals with a quasi-uniformity generated by a base $\{\{(x, y):x = y$ or $a < x < b\}\}$ [Lam]. From the other side, for an arbitrary topological space $X$ the Pervin quasi-uniformity is the finest compatible totally bounded quasi-uniformity of $X$. I recall that each topological space $(X; \tau)$ is quasi-uniformizable, since $\tau$ coincides with the topology induced by the Pervin quasi-uniformity generated by the subbase $\{[X\setminus G\times X]\cup [X \times G] : G\in\tau\}$. [Kü1]
There are several notions of completeness for quasi-uniform spaces [Kü1-2].
A quasi-uniform space $(X, \mathcal U)$ is called bicomplete provided that $\mathcal U^s$ is a complete uniformity. So, a quasi-uniform space $(X, \mathcal U)$ is totally bounded and bicomplete iff $(X, \mathcal U^s)$ is a complete precompact uniform space iff $(X, \mathcal U^s)$ is compact. In this case the space $(X, \mathcal U)$ is compact too. Sorgenfrey circle is bicomplete and precompact, but it is neither compact nor totally bounded.
A topological space is supersober if the convergence set of each convergent ultrafilter is the closure of some unique singleton. In particular, each Hausdorff space is supersober. The class of locally compact strongly sober spaces (sometimes also called skew compact; see Kopperman [Ko, Comment 4.12]), is a suitable analogue in the category $Top_0$ of $T_0$-spaces to the class of compact spaces in the category of Hausdorff spaces. Here "strongly sober" means "compact and supersober". The strongly sober locally compact spaces (see also the articles of Hötzel Escardó [HE], Lawson [Law], Salbany and Todorov [ST] and Smyth [Sm] for further details) can be characterized as the topological $T_0$-spaces that admit a totally bounded bicomplete quasi-uniformity. It is the coarsest compatible quasi-uniformity of such spaces. [Kü2]
A filter $\mathcal F$ on a quasi-uniform space $(X, \mathcal U)$ is said to be left $K$-Cauchy (resp. right $K$-Cauchy) if for each $U\in \mathcal U$ there is $F\in \mathcal F$ such that $U(x)\in \mathcal F$ (resp. $U^{-1}(x)\in \mathcal F$) whenever $x\in F$. A quasi-uniformity is called left (resp. right) $K$-complete provided that each left (resp. right) $K$-Cauchy filter converges. A quasi-uniform space is compact iff it is precompact and left $K$-complete [Kü3]. A quasi-uniform space $(X, \mathcal U)$ is hereditarily precompact if and only if each ultrafilter is left $K$-Cauchy (equivalently, each filter is co-stable). Here a filter is called co-stable if it is stable in the conjugate space. A filter $\mathcal F$ on a quasi-uniform space $(X, \mathcal U)$ is called stable if $\bigcap_{F\in\mathcal F} U(F)\in\mathcal F$ whenever $U\in\mathcal U$. [Kü1]
References
[FL] P. Fletcher, W.F. Lindgren, Quasi-Uniform Spaces, Lecture Notes Pure Appl. Math. Vol. 77, Dekker, New York, 1982.
[HE] M. Hötzel Escardó , The regular-locally compact core of a stably locally compact locale, J. Pure Appl. Algebra, 157, 41-55.
[KMRV] H-P. A. Künzi, M. Mršević, I.L. Reilly, M.K. Vamanamurthy, Convergence, precompactness and symmetry in quasi-uniform spaces, Mathematica Japonica, 01/1993, 38:2.
[Ko] R. D. Kopperman, Asymmetry and duality in topology, Topology Appl., 66, 1-39.
[Kü1] H-P. A. Künzi, Quasi-uniform spaces, (April 28, 2001).
[Kü2] H-P.A. Künzi, Quasi-uniform spaces in the year 2001, (? in Recent Progress in General Topology, II, 313-344, North-Holland, Amsterdam, 2002).
[Kü3] H-P.A. Künzi, Nonsymmetric topology, in Topology with Applications, Bolyai Soc. Math. Studies, Vol. 4, Szekszárd, 1993, 303-338.
[Kü4] H-P.A. Künzi, Totally bounded quiet quasi-uniformities, Topology Proceedings, 01/1990, 15.
[Lam] P. Th. Lambrinos, On precompact (quasi-) uniform structures, Proc. Amer. Math. Soc., 62:2, 1977, 365-366.
[Law] J. D. Lawson, Order and strongly sober compactifications, in: Topology and Category Theory in Computer Science, Reed, G. M., A. W. Roscoe and R. F. Wachter, eds., Clarendon Press, Oxford, 179-205.
[Sm] M. B. Smyth, Stable compactification I, J. London Math. Soc., 45, 321-340.
[ST] S. Salbany, T. Todorov. Nonstandard analysis in topology: Nonstandard and standard compactifications, Journal Symbol. Logic, 65, 1836-1840.


text:
Q: Multiple labels in match painfully slow? I have a cypher query that looks like this
START user=node(8313)
MATCH user-->contact:X-->endpoint1:Y-[r1?]->another:Z
WHERE r1 IS null
RETURN user;

It seems to hang Neo4J 2.0.0-M05.
If i run the query without one the labels it seems to be working better
START user=node(8313)
MATCH user-->contact:X-->endpoint1-[r1?]->another:Z
WHERE r1 IS null
RETURN user;

Should i not use multiple labels in a match?
Also, it seems after i ran this queries for a while my nodes increased a lot? I started out on about 250 and now, without i can rembembering adding anything, have 16k nodes and 100k+ relationships.

A: This is now a verified bug:
Read more on Neo4j google group


text:
Q: API and database calls on same page I have a PHP form on page A.
I submit that form to page B, where the info goes into the database.
I also need to make an API call to add the submitted email address to MailChimp.
I'm using this mailchimp-api script: https://github.com/drewm/mailchimp-api
The form that enters the data works by itself, and the API that adds the email works by itself.
But when I try to do both on the same page, I get:
This page isn't working
XYZ.com is currently unable to handle this request.
HTTP ERROR 500

The relevant code is below. I've tried switching the order of the calls (API and database). And I tried putting the API call inside the conditional statement:
if ($conn->query($sql) === TRUE) { }

Here is the whole code block:
    <?php

// API call

include('MailChimp.php');

use \DrewM\MailChimp\MailChimp;

$MailChimp = new MailChimp('xxxxxxxxxxxxxxx-us1');

$list_id = 'xxxxxxxxxxx';
$email = $_POST['email'];

$result = $MailChimp->post("lists/$list_id/members", [
                'email_address' => $email,
                'status'        => 'subscribed',
                'interests'    => ['xxxxxxxxxxx' => true],
            ]);

// database call

if(isset($_POST['addauth'])){

$email = $_POST['email'];

$conn = new mysqli("localhost", "xxxxxxxxxxx", "xxxxxxxxxxx", "xxxxxxxxxxx", 3306);
if ($conn->connect_errno) {
    echo "Failed to connect to MySQL: (" . $conn->connect_errno . ") " . $conn->connect_error;
}

$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email = $_POST['email'];
$implanted = $_POST['implanted'];
$pacemaker = $_POST['pacemaker'];
$over_21 = $_POST['over_21'];
$updates = $_POST['updates'];

$sql = sprintf("INSERT INTO patients (FIRST_NAME, LAST_NAME, EMAIL, IMPLANTED, PACEMAKER, OVER_21, UPDATES, DATE) values ('%s','%s','%s','%s','%s','%s','%s', CURDATE())",
    mysqli_real_escape_string($conn,$first_name),
    mysqli_real_escape_string($conn,$last_name),
    mysqli_real_escape_string($conn,$email),
    mysqli_real_escape_string($conn,$implanted),
    mysqli_real_escape_string($conn,$pacemaker),
    mysqli_real_escape_string($conn,$over_21),
    mysqli_real_escape_string($conn,$updates));

if ($conn->query($sql) === TRUE) {
    //echo "New record created successfully" . $sql;
} else {
    echo "Error: " . $sql . "<br>" . $conn->error;
}

$conn->close();

} ?>


text:
Q: How to scrape service and corresponding price, selected by string? On specific, given website I want to:

*

*Check if specific service (provided by string) is available

*If available I want to get its price

Let's assume that pricing is stored in table which name I don't know.
I've used beautifulsoup to find this service by variable called strServiceVersion on webiste (looking for columns which contains string).
arrDataCell = soup.find_all('td', text=strServiceVersion)
            if len(arrDataCell)>0:      #found data cell with given string
                print("\nPrint whole data cell: ")
                print(arrDataCell)
                print("\nPrint parent of the 1st data cell: ") #print below
                print(arrDataCell[0].parent())

So I know this text (name of service) exist on the webpage in some table.
I can print parent of the 1st data cell:
[ Some_Text_1	, Some_Text_2, Price_1	, Price_2]

Now I know this X table has two columns and I know its class names (column-1 and column-2 I presume?)
Now I would like to get this table as an object and being able to loop through it and extract it by row and column.
How do I do that?
Or any other solution?

A: [I got soup simply with url='https://optimdent.pl/cennik/'; soup=BeautifulSoup(requests.get(url).content).]
If you're sure that the td cells have classes column-1 and column-2 respectively, you can get the first cell [if it contains strServiceVersion] of each row with such cells (and no other cells) with
tcrSel1 = 'tr:has(td.column-1~td.column-2):not(:has(td~td~td))'
tcrSel2 = f'td.column-1:first-child:-soup-contains("{strServiceVersion}")'
arrDataCell = soup.select(f'{tcrSel1} {tcrSel2}')

(NB: You'll probably need to have html5lib installed to be able use pseudo-classes like -soup-contains.)
It's pretty much the same as
arrDataCell = soup.find_all(
    lambda t: t.name == 'td' and 'column-1' in t.get('class', [])
    and strServiceVersion in t.get_text() #and t.get_text()==strServiceVersion
    and t.find_parent('tr') and t == t.find_parent('tr').td
    and len(t.find_next_siblings('td', {'class': 'column-2'})) == 1
)

it's longer, but using find+lambda lets you specify exact (full) text, and even use regex if you want.
(Btw, for this particular site, your soup.find_all('td', text=strServiceVersion) is probably also fine, but I couldn't know before how many tables/rows might contain the same text but have different structure.)

With either version,
dictList = [{
  'column-1': a1.get_text(strip=True), 'column-2': a2.get_text(strip=True)
} for a1,a2 in [a.parent.find_all('td', recursive=False) for a in arrDataCell]]

should give you this list of dictionaries:
[
   {'column-1': 'Wybielanie zębów w gabinecie preparatem Prevdent', 'column-2': '1600'} ,
   {'column-1': 'Aparat stały (za jeden łuk): zamki metalowe | zamki ICONIX | zamki ceramiczne', 'column-2': '2500 | 2900 | 3500'} ,
   {'column-1': 'Wizyta kontrolna w trakcie noszenia aparatu: 1 łuk | 2 łuki', 'column-2': '240 | 280'} ,
   {'column-1': 'Leczenie aparatem INVISALIGN (przeźroczyste nakładki): diagnostyka | pakiet Standard | pakiet Full', 'column-2': '2000 | 11000 | 18000'} ,
]

OR, to get a single dictionary,
adcDict = {
    a1.get_text(' ', strip=True): a2.get_text(' ', strip=True) for
    a1,a2 in [a.parent.find_all('td', recursive=False) for a in arrDataCell]
}

{
 'Wybielanie zębów w gabinecie preparatem Prevdent': '1600',
 'Aparat stały (za jeden łuk): zamki metalowe | zamki ICONIX | zamki ceramiczne': '2500 | 2900 | 3500',
 'Wizyta kontrolna w trakcie noszenia aparatu: 1 łuk | 2 łuki': '240 | 280',
 'Leczenie aparatem INVISALIGN (przeźroczyste nakładki): diagnostyka | pakiet Standard | pakiet Full': '2000 | 11000 | 18000'
}

Results will look a bit different with read_html, since it will grab the whole table instead of specific rows (and you can't specify the td class or cells per row).
# dfList = pandas.read_html(url, match=strServiceVersion) # OR
# dfList = pandas.read_html('\n'.join([str(a.find_parent('table')) for a in arrDataCell])) # OR
# dfList = pandas.read_html('
\n'+'\n'.join([str(a.find_parent('tr'))+'\n
' for a in arrDataCell])) # OR
dfList = pandas.read_html(str(soup), match=strServiceVersion)
dictList = []
for df in dfList: dictList += df.to_dict('records')

(It looks like merged columns are split and duplicated...)
[
   {0: 'Licówka porcelanowa', 1: '2000'} ,
   {0: 'Dbamy o każdy szczegół wykonywanej pracy, aby przyszłe uzupełnienie w największym stopniu odzwierciedlało naturalny, piękny zdrowy uśmiech. Przed przystąpieniem do pracy wykonujemy waxup, dzięki któremu możemy zwizualizować i ocenić przyszłe efekty leczenia. Współpracujemy z uznanymi pracowniami dentystycznymi bazującymi na najnowszych materiałach oraz technologiach.', 1: 'Dbamy o każdy szczegół wykonywanej pracy, aby przyszłe uzupełnienie w największym stopniu odzwierciedlało naturalny, piękny zdrowy uśmiech. Przed przystąpieniem do pracy wykonujemy waxup, dzięki któremu możemy zwizualizować i ocenić przyszłe efekty leczenia. Współpracujemy z uznanymi pracowniami dentystycznymi bazującymi na najnowszych materiałach oraz technologiach.'} ,
   {0: 'Bonding zębów metodą Flow-Injection (za ząb)', 1: '450'} ,
   {0: 'Dzięki bogatemu doświadczeniu i wiedzy naszych specjalistów, jesteśmy w stanie przywrócić naturalny i piękny uśmiech, którym możesz dzielić się z innymi. Często przed wykonaniem odbudowy wykonujemy wizualizację w jamie ustnej, dzięki czemu możesz ocenić efekt przed ostateczną realizacją. Bonding wykonujemy techniką Flow-Injection, która jest zdecydowanie dokładniejsza niż tzw. odbudowa z ręki.', 1: 'Dzięki bogatemu doświadczeniu i wiedzy naszych specjalistów, jesteśmy w stanie przywrócić naturalny i piękny uśmiech, którym możesz dzielić się z innymi. Często przed wykonaniem odbudowy wykonujemy wizualizację w jamie ustnej, dzięki czemu możesz ocenić efekt przed ostateczną realizacją. Bonding wykonujemy techniką Flow-Injection, która jest zdecydowanie dokładniejsza niż tzw. odbudowa z ręki.'} ,
   {0: 'Wybielanie zębów w gabinecie preparatem Prevdent', 1: '1600'} ,
   {0: 'Metoda wybielania preparatem Prevdent jest w 100% bezpieczna i pozwala uzyskać naturalny efekt estetyczny. Cała procedura wykonywana jest w gabinecie stomatologicznym w trakcie jednej wizyty, która trwa około 2 godzin.', 1: 'Metoda wybielania preparatem Prevdent jest w 100% bezpieczna i pozwala uzyskać naturalny efekt estetyczny. Cała procedura wykonywana jest w gabinecie stomatologicznym w trakcie jednej wizyty, która trwa około 2 godzin.'} ,
   {0: 'Wybielanie nakładkowe (szyny + 4 strzykawki Opalescence)', 1: '950'} ,
   {0: 'Metoda nakładkowa polega na trójwymiarowym zeskanowaniu zębów pacjenta, a następnie przygotowaniu specjalnych, indywidualnych szyn, do których nakłada się żel wybielający Opalescence. Procedura wymaga 2 wizyt w odstępie paru dni (skan wewnątrzustny oraz oddanie nakładek). Efekt wybielania jest po około 7-10 dniach noszenia nakładek.', 1: 'Metoda nakładkowa polega na trójwymiarowym zeskanowaniu zębów pacjenta, a następnie przygotowaniu specjalnych, indywidualnych szyn, do których nakłada się żel wybielający Opalescence. Procedura wymaga 2 wizyt w odstępie paru dni (skan wewnątrzustny oraz oddanie nakładek). Efekt wybielania jest po około 7-10 dniach noszenia nakładek.'} ,
   {0: 'Zabiegi z zakresu ortodoncji wykonuje lek. dent. Karolina Różycka-Popadiak (właściciel OptimDent). W trakcie leczenia wykorzystujemy światowe standardy i rozwiązania. Każdy przypadek jest inny dlatego leczenie rozpoczynamy od wnikliwej analizy klinicznej, starając się dobrać jak najodpowiedniejszy sposób leczenia.', 1: 'Zabiegi z zakresu ortodoncji wykonuje lek. dent. Karolina Różycka-Popadiak (właściciel OptimDent). W trakcie leczenia wykorzystujemy światowe standardy i rozwiązania. Każdy przypadek jest inny dlatego leczenie rozpoczynamy od wnikliwej analizy klinicznej, starając się dobrać jak najodpowiedniejszy sposób leczenia.'} ,
   {0: 'Aparat stały (za jeden łuk): zamki metalowe | zamki ICONIX | zamki ceramiczne', 1: '2500 | 2900 | 3500'} ,
   {0: 'Wizyta kontrolna w trakcie noszenia aparatu: 1 łuk | 2 łuki', 1: '240 | 280'} ,
   {0: 'Leczenie aparatem INVISALIGN (przeźroczyste nakładki): diagnostyka | pakiet Standard | pakiet Full', 1: '2000 | 11000 | 18000'} ,
   {0: 'Posiadamy najnowocześniejszy aparat rentgenowski. Aby wykonać zdjęcie nie musisz się umawiać, cała procedura trwa kilka minut, a wynik jest dostępny tuż po wykonaniu zdjęcia w wersji cyfrowej lub na kliszy.', 1: 'Posiadamy najnowocześniejszy aparat rentgenowski. Aby wykonać zdjęcie nie musisz się umawiać, cała procedura trwa kilka minut, a wynik jest dostępny tuż po wykonaniu zdjęcia w wersji cyfrowej lub na kliszy.'} ,
   {0: 'Pantomogram (zdjęcie 2D wszystkich zębów)', 1: '90'} ,
   {0: 'Cefalometria (zdjęcie boczne 2D używane głównie w ortodoncji)', 1: '90'} ,
   {0: 'Tomografia komputerowa: odcinka | szczęki lub żuchwy | całość', 1: '140 | 250 | 350'} ,
   {0: 'Pakiet Pantomogram + Cefalometria', 1: '150'} ,
]

Although, you could filter down to rows with numbers in the second column with something like
dictList = [d for d in dictList if d[1].split(' | ')[0].isdigit()]

[
   {0: 'Licówka porcelanowa', 1: '2000'} ,
   {0: 'Bonding zębów metodą Flow-Injection (za ząb)', 1: '450'} ,
   {0: 'Wybielanie zębów w gabinecie preparatem Prevdent', 1: '1600'} ,
   {0: 'Wybielanie nakładkowe (szyny + 4 strzykawki Opalescence)', 1: '950'} ,
   {0: 'Aparat stały (za jeden łuk): zamki metalowe | zamki ICONIX | zamki ceramiczne', 1: '2500 | 2900 | 3500'} ,
   {0: 'Wizyta kontrolna w trakcie noszenia aparatu: 1 łuk | 2 łuki', 1: '240 | 280'} ,
   {0: 'Leczenie aparatem INVISALIGN (przeźroczyste nakładki): diagnostyka | pakiet Standard | pakiet Full', 1: '2000 | 11000 | 18000'} ,
   {0: 'Pantomogram (zdjęcie 2D wszystkich zębów)', 1: '90'} ,
   {0: 'Cefalometria (zdjęcie boczne 2D używane głównie w ortodoncji)', 1: '90'} ,
   {0: 'Tomografia komputerowa: odcinka | szczęki lub żuchwy | całość', 1: '140 | 250 | 350'} ,
   {0: 'Pakiet Pantomogram + Cefalometria', 1: '150'} ,
]

A: Question could be improved by some details and expected result - However, to select a element by containing specific string you could go with:
for e in soup.select('td:-soup-contains("Kompleksowe badanie")'):
    print(e.text,e.find_next_sibling('td').text)

Note: soup.find_all('td', text=strServiceVersion) will only work if you have the exact matching string

Alternative would be to create a dict to filter:
{s.text:s.next_sibling.text for s in soup.select('td:has(+td.column-2)')}

and too deal with | prices:
d = {}
for k in soup.select('td:has(+td.column-2)'):
    v=k.next_sibling.text
    k=k.text
    if '|' in v:
        d.update(dict(zip([' '.join((k.split(':')[0], itm)) for itm in k.split(':')[-1].split(' | ')], v.split(' | '))))
    else:
        d.update({k:v})
d

Example
import requests
from bs4 import BeautifulSoup

headers = {'User-Agent':'Mozilla/5.0'}
url = 'https://optimdent.pl/cennik/'

soup = BeautifulSoup(requests.get(url, headers=headers).text)

d = {}
for k in soup.select('td:has(+td.column-2)'):
    v=k.next_sibling.text
    k=k.text
    if '|' in v:
        d.update(dict(zip([' '.join((k.split(':')[0], itm)) for itm in k.split(':')[-1].split(' | ')], v.split(' | '))))
    else:
        d.update({k:v})
d

Output
A dict that could be filtered an manipulated:
{'Kompleksowe badanie stomatologiczne jamy ustnej': '150',
 'Kompleksowe badanie stomatologiczne jamy ustnej poszerzone o badanie stawów skroniowo-żuchwowych': '250',
 'Konsultacja: endodontyczna | periodontologiczna | chirurgiczna | protetyczna | implantologiczna': '150',
 'Konsultacja ortodontyczna': '250',
 'Całkowite opracowanie i odbudowa ubytku zęba materiałem Estelite Asteria  małe': '330',
 'Całkowite opracowanie i odbudowa ubytku zęba materiałem Estelite Asteria średnie': '380',
 'Całkowite opracowanie i odbudowa ubytku zęba materiałem Estelite Asteria duże': '420',
 'Całkowite opracowanie i wysokoestetyczna odbudowa ubytku zęba materiałem Enamel HRI  małe': '370',
 'Całkowite opracowanie i wysokoestetyczna odbudowa ubytku zęba materiałem Enamel HRI średnie': '410',
 'Całkowite opracowanie i wysokoestetyczna odbudowa ubytku zęba materiałem Enamel HRI duże': '450',
 'Leczenie kanałowe zęba  1 kanałowego': '800',
 'Leczenie kanałowe zęba 2 kanałowego': '1000',
 'Leczenie kanałowe zęba 3 kanałowego': '1300',
 'Leczenie kanałowe zęba 4 kanałowego': '1450',...}


text:
Q: Reading snappy parquet files on Windows causes python to crash I'm unable to read snappy parquet files via pyarrow on Windows.
import dask.dataframe as dd
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randint(0,100,size=(15, 4)), columns=list('ABCD'))
dd_df = dd.from_pandas(df, npartitions=1)
dd_df.to_parquet("my_df.snappy.parquet", engine="pyarrow", compression="snappy")
dd_df_copy = dd.read_parquet("my_df.snappy.parquet", engine="pyarrow")
dd_df_copy.compute() #<--- This is where it crashes

I've replicated this problem in a clean Anaconda environment with Python 3.8.  After creating the environment, I ran pip install "dask[complete]" and pip install pyarrow
The error is:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: python.exe
  Application Version:  3.8.3150.1013
  Application Timestamp:    5ed53446
  Fault Module Name:    arrow.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   5ebd3029
  Exception Code:   c000001d
  Exception Offset: 00000000007abfc7
  OS Version:   6.3.9600.2.0.0.16.7
  Locale ID:    1033
  Additional Information 1: d8e4
  Additional Information 2: d8e42c04b828d96accf490cd13472bea
  Additional Information 3: aebe
  Additional Information 4: aebe917bfb5c1b58e884baa1f9c3d3d2

Similar versions of the crash obtain when I try using conda -c conda-forge dask pyarrow:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name: python.exe
  Application Version:  3.8.3150.1013
  Application Timestamp:    5ed53446
  Fault Module Name:    arrow.dll
  Fault Module Version: 0.0.0.0
  Fault Module Timestamp:   5ecf56ac
  Exception Code:   c000001d
  Exception Offset: 0000000000521587
  OS Version:   6.3.9600.2.0.0.16.7
  Locale ID:    1033
  Additional Information 1: e863
  Additional Information 2: e8638a01b9fb70505b0604ef9b98f3c6
  Additional Information 3: 1e47
  Additional Information 4: 1e47c852f479606e071f3ea8f80878a1

A: Updating packages fixed this as of July 1, 2020.  I think it was a pyarrow update that did it.


text:
Q: How do I farm effectively as a lone Assassin (Zero)? I've been following this site for months, yet haven't ever seen any legit experience farming techniques for the Assassin, unless coupled with teammates.
I'm a level 48 in TVHM, trying to level up a bit quicker. I don't have friends playing on console so I'm on my own, meaning most of these tactics and techniques aren't useful for me.
I can't find any when searching, either, all I find is the methods for Sal, etc. So what tactics and strategies should I be taking for experience farming as a lone Assassin?

A: I pretty much only play solo, and I've got a level 72 zer0 and he is absolutely a blast. I've found that the most efficient way to play him for me was pure melee, especially for farming.
I've found two shield/gun combos to be effective and i'll go over them both.
The first is the law/order combo. You can get both of these for doing easy quests in sanctuary near the end of the main storyline. No killing of enemies required. The order is a shield that gives a pretty large boost with roid damage, and when you melee enemies with the law all damage you do to them also heals you.
The second is the rubi/love thumper combo. You get the rubi as a quest reward from moxxi for turning the "rakkaholics anonymous" quest in to her. the love thumper you'll get as a quest reward in overlook for doing the "best mothers day ever" quest. The best rubi to get is a slag rubi, if you have the time to spend farming the quest to get one. 12% of all damage you do with the rubi returns to you as health, and the love thumper is a pretty strong roid shield that also does explosive damage when depleted.
The reason you'll want either of these combos is because they heal you while you're in combat, and healing is one of the main things missing as a skill from Zer0's skill tree. This means you can get right up in the face of anything, and as long as you can hit them, you can generally let them wail on you without going down.
As for a build, i'd suggest going with this one.
and as you level up, try to work down the cunning tree to get death blossom (if you have the dlc's that let you level up past level 50). many must fall + death blossom in tandem is incredibly powerful.
the main strategy with this build is getting up in the face of what you are fighting, hit it to apply deathmark, let it take down your shield (so you get the roid damage buff and make counter-strike active), go into deception and get behind the enemy (hitting from behind activates ambush/backstab), wait until the deception timer is under 1 second left (to get the max melee damage boost from deception), and then smacking them with execute. it takes a good bit of practice, some set up, and some skill - but once you get the basic concept down... zer0 becomes VERY powerful. especially once you get the health of a major enemy down to ~30% when killing blow kicks in. if your enemy is slagged, you will be hitting them for MILLIONS each melee blow. one more point, is to try to go for critical hits as much as you can as they will basically double the damage you are doing.
if you have any more questions about anything specific - let me know. zer0 is probably one of the strongest solo players in the game, but he does require a little bit of equipment and practice to get that way

A: All characters and their associated builds have an ideal target to farm for XP. For melee Zer0, Mick Zaford is a great choice. To do this:

*

*Complete the whole clan wars series of missions except the last one (get up to the point where you choose which side to kill).

*Go to Lynchwood, unlock the fast travel and do some setup i.e. make sure the second weapon you equip is the one you want in your hands when you kill Mick (like the rapier).

*Use the (NOT fast) travel and go to The Dust, you should spawn right next to Mick and can instakill him (because melee Zer0 is strong).

*Immediately after killing Mick, Save+Quit, and do it again over and over until your are the desired level.

*When the desired level is reached, Save+Quit to reset Mick, then just leave. This ensures Mick doesn't die and you can farm him again later.
Hope that's a good answer for you and others.


text:
Q: How to [politely?] tell software vendor they don't know what they're talking about Not a technical question, but a valid one nonetheless.  Scenario:
HP ProLiant DL380 Gen 8 with 2 x 8-core Xeon E5-2667 CPUs and 256GB RAM running ESXi 5.5.  Eight VMs for a given vendor's system. Four VMs for test, four VMs for production. The four servers in each environment perform different functions, e.g.: web server, main app server, OLAP DB server and SQL DB server.
CPU shares configured to stop the test environment from impacting production. All storage on SAN.
We've had some queries regarding performance, and the vendor insists that we need to give the production system more memory and vCPUs. However, we can clearly see from vCenter that the existing allocations aren't being touched, e.g.: a monthly view of CPU utilization on the main application server hovers around 8%, with the odd spike up to 30%. The spikes tend to coincide with the backup software kicking in.
Similar story on RAM - the highest utilization figure across the servers is ~35%.
So, we've been doing some digging, using Process Monitor (Microsoft SysInternals) and Wireshark, and our recommendation to the vendor is that they do some TNS tuning in the first instance. However, this is besides the point.
My question is: how do we get them to acknowledge that the VMware statistics that we've sent them are evidence enough that more RAM/vCPU won't help?
--- UPDATE 12/07/2014 ---
Interesting week.  Our IT management have said that we should make the change to the VM allocations, and we're now waiting for some downtime from the business users.  Strangely, the business users are the ones saying that certain aspects of the app are running slowly (compared to what, I don't know), but they're going to "let us know" when we can take the system down (grumble, grumble!).
As an aside, the "slow" aspect of the system is apparently not the HTTP(S) element, i.e.: the "thin app" used by most of the users.  It sounds like it's the "fat client" installs, used by the main finance bods, that is apparently "slow".  This means that we're now considering the client and the client-server interaction in our investigations.
As the initial purpose of the question was to seek assistance as to whether to go down the "poke it" route, or just make the change, and we're now making the change, I'll close it using longneck's answer.
Thank you all for your input; as usual, serverfault has been more than just a forum - it's kind of like a psychologist's couch as well :-)

A: I suggest that you make the adjustments they have requested. Then benchmark the performance to show them that it made no difference. You could even go so far to benchmark it with LESS memory and vCPU to make your point.
Also, "We're paying you to support the software with actual solutions, not guesswork."

A: Either ask to escalate the ticket or ask for a different rep.  Depending on which vendor it is escalation may help if you say that you feel that the current level of support doesn't adequately address the issue.  If they will not escalate then asking for a different rep may help because that requires much less "justification" since all it needs is to not be happy with the current one.
If it's a large vendor then simply closing the ticket and opening a new one on the same issue may work as it may be routed to a different rep, but I'd advise against it because it's poor form.
You could also stand your ground and ask for a rationale as to how more RAM/vCPU will help, or you could just give it more RAM/vCPU to prove that it won't help.

A: Providing you are confident you are within the given system specs they document.
Then any claim they are making in regards to requiring more RAM or CPU they should be able to back up. As the experts in their system I hold people to account on this.
Ask them specifics.

*

*What information provided on the system indicates more RAM is needed and how did you interpret this?

*What information provided on the system indicates more CPU is needed and how did you interpret this?

*The data I have - at first glance - contradicts what you are telling me. Can you explain to me why I may be interpreting this incorrectly?

*I am interpreting this [obvious series of data] to mean [obvious interpretation]. Can you confirm I am interpreting it correctly with regards to my problem?
Having dealt with support in the past I have asked the same questions. Sometimes I was right and they were not focusing their attention on my problem properly. Other times however, I was wrong and I was interpreting the data incorrectly, or failing to include other data which was important in my analysis.
In any case, both of these situations were a net benefit to me, either I learnt something new I did not know before - or I have got their support teams to think harder about my problem to get a a decent root cause.
If the support team are unable to provide you with a logical expansion of their argument to a basis you can be satisfied with (you need to have an open mind to compromise yourself, be reasonable to accept your interpretation of the data is wrong) then it should become very present in their response. Even in the worst case scenario you can use this as a basis for escalating the problem.

A: I'll throw in my two cents.  We've been pretty successful with this approach -- much better outcomes and less frustration on everyone's part.  It requires a lot more effort than the blame-game and blindly adding resources, but it also has better chances of finding the underlying problem.
When we have serious issues with our on-premise apps that are backed by vendor support contracts, and the vendors begin their dodge shuffling dance (which always seems to include outlandish non-data-driven demands for more CPU or RAM), we tend to do these 3 things:

*

*Escalate the priority to system-down equivalent -- they usually balk, but usually back down when you explain it is effectively unusable even if it's technically "working".  Treat it as a serious problem for them to solve.  Around here we refer to that as a tiger team, which meets daily to get status updates from all the stakeholders.  Usually the vendor will be asking you to change stuff.  If it's a prod system, that's problematic, but if you want them to help, you will need to accept the responsibility to help them isolate the problem, so it helps if you've got a dev/staging environment where you can run tests.

*Tell the vendor you want them to replicate your environment, so that THEY can isolate the problem in their lab.  They can even host stuff in some cloud environment if need be.  It does not have to be an exact match of your environment, although that would be ideal. The point is that you want the VENDOR to be actively trying to replicate your problem, so that they can test their guesswork on their system instead of yours.  Ask them for the diagrams, specs, etc of that replicated environment to make sure they are doing it.

*Provide them (under NDA of course) with your actual dataset so that they can run/replay it for real instead of guessing.  In our case, most of our vendor-provided app issues (both transient and chronic) frequently turn out to be issues with the accompanying vendor-provided databases.  I cannot count the number of times we've done this and they have finally pinpointed the problem down to something unexpected in the actual data -- weird artifacts from app upgrades 2 years ago where something didn't convert cleanly; stale records exposing a problem with the GC settings; queries not working quite right because OUR data values breaking some transmog routine in the vendor code, etc.  Stuff we would never be able to identify on our own.
We've done this with quite a few vendors over the last few years, and they are initially very resistant to doing it our way.  However, after it works, it always comes up as a positive highlight in the quarterly reviews we hold with our vendors.  And it helps cement our technical relationship with those vendors.  They don't want vague problems.  They do want specific problems that they can analyze to improve their products.
Hope the suggestion helps.  I know it's not a one-size-fits-all approach, but if you can swing it I think you'll find it worthwhile.

A: The real question is, who is in charge here? If you can't realistically switch to an alternative vendor, then they have the power, and all you can really do is go along with whatever they say and hope it will work out. Not a happy situation! Otherwise, I suggest you ask for another rep (as others have said), but make it clear you are not happy with the service and will look elsewhere if they cannot do the job.
Don't just "make the adjustments they suggested" if you're sure they won't work, as that is setting up a pattern for your relationship that will hurt you in the long run. You are paying them to provide you a service, and they shouldn't be able to dictate your actions any more than someone I hire to paint my house can dictate what colour it will be.
This may sound drastic, as it sounds like this is not a hugely critical issue, but the fact is that if they are messing you around on something minor, they will likely do the same for something big, and the last thing you want is to run into some sort of horrible charlie foxtrot six months down the line and have the same trouble with the vendor then.
Make sure that whatever steps you take to resolve the issue now, will work equally well when you're two days from a deadline and everything breaks...

A: I'm going to post a view from the vendor's side.
We had this customer that had this recurrent problem where the performance of the software would drop off every few hours or so to some truly abysmal rate then come back a few hours later.
The bulitin profiler in the system indicated the system CPU (or possibly memory) speed was disgustingly slow, something like 100MHZ rather than the expected 2GHZ. Doubling the CPU provided by the VM didn't change the symptom and they thought we were being wasteful.
As they couldn't get a faster CPU (more CPUs wasn't going to help), we then tried swapping TEST and PROD VMs. The problem then showed up on TEST the next day. Then we tried promoting one of the clients to a standalone (serverless) instance. No problem on that workstation while the server was choking.
They produced reports from the VM host indicating no performance problems and tried again to claim it was an application problem.
Finally I [an engineer] (I had zero support from those in dedicated support roles) asked specifically for a physical box. The customer screamed bloody murder but with nobody having any other potential solution they did it. What do you know, the problem magically disappeared.
We never did find out what the problem was. All benchmark programs showed normal but the application profiler was telling us computing resources simply weren't adequate. There's kind of a specific signature we look for in the profiler now. If we see it, we know before we get any farther the problem is VM interaction, but it just wasn't known at the time.
They sure thought I was full of it. I wasn't. I was out of options.
EDIT, Update from years later:
With more and more customers wanting to run on VMs and management willing to attempt to solve the problem at all cost, we got good VM hardware. I was able to construct a specialized VM burn program that ran in userspace (and required no privileges) on two single-core VMs with 512mb RAM, that was able to drain 1/3 memory performance out of another single-core VM with only 4 total cores out of 16 in use on the VM host and most of its ram still free. The program raised no alarms, and showed nothing out of the ordinary on the VM host nor any of the guests, except for memory access was slow.
Now we can tell customers we know that there is a problem with VMs, and it's not our software. We still get customer requests from time to time for VM compatible software. I wonder why management doesn't let support tell them we were able to develop a piece of software that slows down every other VM on the same host.
The scary thing is the technique involved is a simple transform of well-known programming technique involving lock-free synchronization. Hundreds of software vendors could have this VM drainer in their software and not know it. Getting an atomic instruction lock that hotly contested should be rare but not impossible. The amusing part of it all is I was getting the lock to contest ACROSS VMs.

A: The big thing is to be able to prove that you are using best practices for your system allocation, notably RAM and CPU reservations for your SQL server.
All this being said the easiest thing is to make the adjustments requested, at least temporarily. If nothing else it tends to get vendors over feet dragging. I can't count the number of times I've needed to do something crazy like this to satisfy a tech on the other end of the line that it really is their software not behaving.

A: For this specific situation (where you have VMware and application developers or a third party who does not understand resource allocation), I use a week's worth of metrics obtained from vCenter Operations Manager (vCops - download a demo if needed) to pinpoint the real constraints, bottlenecks and sizing requirements of the application's VM(s).
Sometimes, I've been able to satisfy the more stubborn consumers by modifying VM reservations or changing priorities to handle contention scenarios; "If RAM|CPU are tight, YOUR VM will take precedence!". Bad-bad things have happened when I've allowed software vendors to dictate their requirements on my vSphere clusters without real analysis.
But in general, numbers and data should win-out.

An example of something I used to justify VM sizing to the developer of a Tomcat application:
Dev: The VM needs MOAR cpu!
Me: Well, memory is your biggest constraint, and here's a heat map of your performance versus time... Wednesdays at 6pm are the most stressful periods, so we can spec around that peak period. Oh, and here's a sizing recommendation based on the past 6 weeks of production metrics...

A: I used to work in support - and part of what you're asking sounds highly rational (and probably is): but there are a few questions to ask yourself prior to just doing the "performance enhancement" they're requesting

*

*are you running at least at the vendor's stated minimum system requirements already?

*if you're at least at minimum sysreqs, are you already at their "recommended" system settings?

Vendors will 99 times out of 100 (in my experience - both on the support side and the customer/field side) not even deal with performance-related issues until/unless the systems match what their documentation calls for. Maybe it's a system that runs fine 99.5% of the time with 1 CPU and 512M RAM - but if the system requirements say 4 CPUs and 4G RAM and you've only got 2 CPUs and 1G RAM, they're well within their rights to demand more resources be assigned*.
It is probable that they're asking you to increase system resources because of something they found in the lab/development wherein an issue magically disappears if you cross a specific threshold; if this is the case, yes it's an example of potentially-poor debugging on their end, but keep in mind they don't have time to eliminate every possible bug/issue that arises - some just need to be worked-around, and if that is the case here, just go with it.
There's also a not-insignificant chance that the issues you're seeing aren't even part of "their" software, but a component they rely on from some other source (vendor, OSS library, etc). I ran into this exact situation related to swap size, BEA WebLogic, and the Sun JRE at a customer a few years ago.
tl;dr:
In short, work with their support team, escalating as needed, until you find a resolution - but don't be surprised when some of the suggestions/debugging steps/fixes sound off-the-wall or pointless.

*If it truly doesn't "need" those extra resources, you're likely in a place to be able to file a doc bug / RFE for future versions - but don't push that route until you've demonstrated it's not the issue at hand
^an eBook I wrote you may find helpful on the topic: Debugging and Supporting Software Systems

A: I would suggest a very different approach to the ones mentioned so far. Before argueing with the vendor, why not look more closely at the problem reported and see what that tells you.
What are the actual problems being reported and what are the users expectations. If a user is saying something "take too long", ask them exactly what 'it' is (so you can reproduce it), how long they think it should take, and why they think it should take that long. If their expectations are reasonable, measure the actual performance and system impact of what they are trying to do. The fact that your system shows a 30% spike over a month does not mean it is not running at >100% when the user is trying their query. If you can demonstrate to your vendor that cpu and memory are not being strained by the problematic task, then you can ask the vendor to justify recomendations that will cost you money.


text:
Q: Getting CardView with id in Java Hello I am currently working on an android studio project and I need to set the visibility of a cardview to gone in my layout.
I am currently able to get the webview which is nestedinside the cardview in java as such.
WebView webViewCO2;
webViewCO2 = (WebView) view.findViewById(R.id.webviewCO2);

Is there a way for me to do the same thing to get the Cardview?

A: Give CardView an id, say, cv_id;
Do,
CardView cardView = (CardView) view.findViewById(R.id.cv_id);

afterthis, where-ever you need to set it's visiblity to gone, do,
cardView.setVisibilty(View.GONE);


text:
Q: Visual C++ 2008 Issues Okay, this is getting stupid, I have Microsoft Visual Studio 2008, was working fine, now whenever I run a .cpp program my command prompt windows has a default color of gray when I initially had lime green for the output.
Error Message:
'Testing.exe': Loaded 'C:\Users\codebox\Documents\Visual Studio 2008\Projects\Testing\Debug\Testing.exe', Symbols loaded.
'Testing.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll'
'Testing.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll'
'Testing.exe': Loaded 'C:\Windows\SysWOW64\KernelBase.dll'
'Testing.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcp90d.dll'
'Testing.exe': Loaded 'C:\Windows\winsxs\x86_microsoft.vc90.debugcrt_1fc8b3b9a1e18e3b_9.0.30729.1_none_bb1f6aa1308c35eb\msvcr90d.dll'
The program '[2644] Testing.exe: Native' has exited with code 0 (0x0).

Why is the IDE loading Testing.exe, I
 just want to test a .cpp?
Code below works fine, except,now  i get the above error message, I suspect the IDE:
// This program will assist the High Adventure Travel Agency
// in calculating the costs of their 4 major vacation packages.
#include <iostream>
#include <iomanip>
using namespace std;

// Constants for the charges.
const double CLIMB_RATE = 350.0;       // Base rate - Devil's Courthouse
const double SCUBA_RATE = 1000.0;      // Base rate - Bahamas
const double SKY_DIVE_RATE = 400.0;    // Base rate - Sky diving
// This program is a driver for testing the showFees function.
#include <iostream>
using namespace std;

// Prototype
void showFees(double, int);

int main()
{
   // Constants for membership rates
   const double ADULT = 40.0;
   const double SENIOR = 30.0;
   const double CHILD = 20.0;

   // Perform a test for adult membership.
   cout << "Testing an adult membership...\n"
        << "Calling the showFees function with arguments "
        << ADULT << " and 10.\n";
   showFees(ADULT, 10);

   // Perform a test for senior citizen membership.
   cout << "\nTesting a senior citizen membership...\n"
        << "Calling the showFees function with arguments "
        << SENIOR << " and 10.\n";
   showFees(SENIOR, 10);

   // Perform a test for child membership.
   cout << "\nTesting a child membership...\n"
        << "\nCalling the showFees function with arguments "
        << CHILD << " and 10.\n";
   showFees(CHILD, 10);
   return 0;
}

//*****************************************************************
// Definition of function showFees. The memberRate parameter      *
// the monthly membership rate and the months parameter holds the *
// number of months. The function displays the total charges.     *
//*****************************************************************

void showFees(double memberRate, int months)
{
    cout << "The total charges are $"
         << (memberRate * months) << endl;
}

How is a guy suppose to get his/her code on, with this happening?
Or what am I suppose to change, I just want to code in C++ and test my code that's all, not mess around with the damn IDE.

Solution:
  Ctrl+5
http://msdn.microsoft.com/en-us/library/ms235629.aspx
To build and examine the program
1.
  On the Build menu, click Build Solution.

  The Output window displays information about the compilation

progress, for example, the location of
  the build log and a message that
  states the build status.
     2.
  On the Debug menu, click Start without Debugging.

  If you used the sample program, a command window is displayed and

shows whether certain integers are
  found in the set.

A: There's no error... the messages you reported are just VC++ notifying you about which dlls are loaded, which debug symbols are available, etc. The last line tells you that the program terminated with return code 0. If you don't see your program running it's just because it's very fast, and at its end the console automatically closes.
To see the output of your program you have many options: you may set a breakpoint on the return 0 (so the program is paused there, and you can have a look at the console window before it closes), or you may start the program without debugging (in that case VC++ asks you to press a key before ending the program); you could also add the lines
cout<<"Press Enter to exit.";
cin.sync();
cin.ignore();

before the return 0: in this way the key press before exit will be included in the application (I don't recommend this approach, though, because if you want to run the program from an already opened console you end up having always that annoying message at the end of the application).
By the way, this question may hold the record of "most asked question" about VC++ and many other IDEs :)

Why is the IDE loading Testing.exe, I just want to test a .cpp?

You know... to run a .cpp you must compile it first... and what do you get from a compilation? A .exe... >_>

I just want to code in C++ and test my code that's all, not mess around with the damn IDE.

When you'll have to debug a big application you'll bless that "damn IDE".