Remove mix-blend-mode from child element

Question: How can I set mix-blend-mode on an element, but not it's children?  Setting the children to the default value of normal does not seem to work:
http://jsfiddle.net/uoq916Ln/1/
Comment: It is the same issue as with opacity. It is not really that the property is inherited, it is that all the block is rendered with this effect
Answer: The solution on how to avoid mix-blend-mode affects children:

Make child element position relative, give it a width and height;
Create some real or pseudo element inside the child with absolute position, and apply mix-blend-mode to it;
Create inner element inside the child for your content. Make it's position absolute, and put it on top of other elements;

Live example
html

Header

css
.blend {
    position: relative; /* Make position relative */
    width: 100%;
    height: 100%;
}

.blend::before { /* Apply blend mode to this pseudo element */
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 1;
    background-color: green;
    mix-blend-mode: multiply;
}

.inner { /* This is our content, must have absolute position */
    position: absolute;
    z-index: 2;
}

h1 {
    color: white;
}

Answer: I know this was asked over two years ago, but it could be useful in the future as it could be a better solution than creating pseudo-elements.
There is the CSS isolation property that allows to choose wether the child element should be rendered in its parent's context (auto) or as part of a new context, thus without any blend mode applied to it (isolate).
Check out this page for examples
Comment: If I'm right isolation only guards siblings of an element against mix-blend-mode. It does not work on children.
Answer: someone commented that the the whole block is rendered with the effect and that is why you're having the issue. I am able to accomplish what you're are trying to do by removing the h1 from the block, position absolute, and a z-index of 1. here is a jsfiddle to show the effect.
html

Header

css
.blend {
    background-color: green;
    mix-blend-mode: multiply;
    width: 700px;
    height: 35px;
}
h1 {
    color: white;
    position: absolute;
    top: -15px; left: 10px;
    z-index: 1;
}

https://jsfiddle.net/jckot1pu/
Comment: Well that is a tough question. While it accomplishes what you want you may not consider this a solution and I can understand that. However in my experience I have found sometimes to accomplish the css styling you want sometimes you have to do things in a round about way.
Answer: It's impossible to remove an element's mix-blend-mode from its children.
MDN says that mix-blend-mode:

sets how an element's content should blend with the content of the element's parent and the element's background

To achieve the desired effect, place the child in a separate stacking context and make sure it renders on top of the element with mix-blend-mode set.
You need two things to make this work:

Make sure that your opaque content (your text) is not a child of the element that sets the background and the blend mode. For example, with CSS Grid Layout.
Make sure the text is rendered over, and thus not affected by, the element that sets the background and the blend mode. Setting mix-blend-mode on your background will create a stacking context for it, and you may need to give your content its own stacking context to ensure it gets rendered above it.

Position your elements with CSS Grid:

define a grid container with one auto-sized grid area
place both the background element and the text element into that one grid area (so that they overlap)
let the text element dictate the size of the grid area
have the background element stretch to the size of the grid area, which is dictated by the size of the text element

Then, set isolation: isolate on the text element to ensure it gets rendered above, and not under the background element.
A working example

.container {
  display: grid;
  grid-template-areas: 'item';
  place-content: end stretch;
  height: 200px;
  width: 400px;
  background-image: url(https://picsum.photos/id/237/400/200);
  background-size: cover;
  background-repeat: no-repeat;
}

.container::before {
  content: '';
  grid-area: item;
  background-color: seagreen;
  mix-blend-mode: multiply;
}

.item {
  grid-area: item;
  isolation: isolate;
  color: white;
}

h1,
p {
  margin: 0;
  padding: 10px;
}

HEADLINE

Subhead

Answer: An important note if you're using the excellent pseudoelement ::before/::after solution posted by Rashad Ibrahimov.
I found that I had to remove z-index from the parent element and apply it only to the pseudoelements and child elements before mix-blend-mode: multiply would work.
For example
#wrapper {
    position: relative;
}

#wrapper .hoverlabel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* z-index: 90; Uncomment this to break mix-blend-mode. Tested in Firefox 75 and Chrome 81. */
}

#wrapper .hoverlabel::before {
    position: absolute;
    content: "";
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    mix-blend-mode: multiply;
    z-index: 90;
    background-color: rgba(147, 213, 0, 0.95);
}


How can I prove that I have a Salesforce Certification?

Question: I passed a Salesforce Exam in Developer 1. What proves that I did this?
Answer: You don't need to do anything; anyone can verify your certification on the verification site. Simply give them your name or primary email, and the site can display your certifications. For example, based on your user name, it appears that you passed "Salesforce Certified Platform Developer I" on September 25, 2018. However, you also should have been given a virtual certificate (an image file) that contains your certification number by email, with instructions on how to use the image in various formats. Also see this post for a screenshot of what the certification email looks like (may be outdated).
Answer: You can verify your certification providing the input in this url
http://certification.salesforce.com/verification


Categories of finite objects

Question: In my experience, category theory is very successful at providing powerful machinery to reason about large objects or objects unrestricted in size, for example (logical) models (via accessible categories) or "nice" topological spaces (via simplicial sets). However I haven't seen many impressive applications of category theory to categories of finite objects, for example finite graphs or more generally finite models, whose behaviors can be radically different from the corresponding objects of unrestricted size. I certainly haven't read widely enough, but I want to ask anyway: is this finite/infinite divide a conception or misconception? If the former, are there any intuitive explanations? If the latter, what are some convincing counterexamples (for example, applications that provided major insight in what graph theorists would be interested in)?
Comment: Fraïssé limits should be mentioned, I guess https://golem.ph.utexas.edu/category/2009/11/fraisse_limits.html
Comment: It may (or may not) be helpful to note that "small" (finite?) objects are often characterised by being *compact* in their category. E.g. a compact $k$-vector space is the same as a finite-dimensional space, or (at the other end of the range of concreteness) a compact object in the stable homotopy category is the same as the natural generalisation of a finite CW complex. This way of embedding small (finite) objects into categories of huge objects is actually very useful, c/f Brown representability.
Comment: I don't really understand the question. You might be claiming that category theory doesn't say much about finite graphs, to be concrete, that combinatorialists might care about, but I think category theory doesn't say much about infinite graphs that combinatorialists might care about either. I think finitude is a red herring here and that your question is about something else.
Comment: @QiaochuYuan that's part of the question, whether this finitude is a red herring.
Comment: On the other hand, why there hasn't been more interaction between category theory and say graph theory (the kind that might appeal to Erdos) is IMO a rather interesting question. The Robertson-Seymour theorem on graph minors being quasi-well-ordered is an intensely interesting structural result that I would love to see category theorists pay attention to.
Comment: Could you give a precise definition of what you mean when you speak about finite objects in a category?
Comment: What I had in mind was along the lines of 1) the typical objects that combinatorists work with (graphs, matroids, etc) and typical areas of interest exemplified by Szemerédi's theorem or graph minor theorem, or 2) data structures and things like circuits in CS (relatedly, finite model theory and descriptive complexity).
Comment: @TomBachmann Compact objects in the (∞, 1)-category of spaces are more general than finite CW complexes, however.
Answer: I would say you could make good headway on this by looking over some of the research projects of Tom Leinster, Mark Meckes, and Simon Willerton (and others I may be forgetting), centering on various notions of size/magnitude for graphs, finite metric spaces, and various other structures. You could start by perusing the entries under "Size" on Leinster's webpage. Many of the entries with link to "discussions" refer to discussions taking place at the $n$-Category Café over a period of years.
Answer: I don't exactly understand the question, but I think you should familiarise yourself with the notion of a fully dualisable object in a (possibly higher) symmetric monoidal category. For example, a vector space is fully dualisable iff it is finite dimensional. In the bicategory of algebras and bimodules, the separable algebras are fully dualisable. This notion often captures desirable finiteness conditions.
Comment: Dualizability requires a monoidal structure to be well-defined, and with respect to either the product or the coproduct it's uninteresting (exercise). The OP explicitly gives the example of finite graphs, which dualizability doesn't capture. As I said in the comments, I think finiteness is a red herring here; the details of the OP's question seem to be about something else.

Categories of finite objects


Help finding equations of motion from Hamiltonian with integral of motion

Question: I've given this Hamiltonian with one degree of freedom:
$$
H(x,p)=\frac{p^2}{2}+\frac{\omega_0^2x^2}{2}+\lambda\left(\frac{p^2}{2}+\frac{\omega_{0}^2x^2}{2}\right)^2
$$
I need to find the general solution for the motion of this particle $(x(t),p(t))$. It's required to solve the equations of motion, not only find them.
I showed that $f = p^2+\omega_{0}^2x^2 $ is time independent by computing:
$$\{f,H\}=0$$
But I'm having a hard getting the final solution. I tried doing:
$$
2p\dot{p}+2\omega_{0}^2x\dot{x}=\dot{f}=0
$$
$$
\dot{p}=-\frac{\omega_{0}^2x\dot{x}}{p}
$$
And then:
$$
\newcommand{\pder}[2][]{\frac{\partial#1}{\partial#2}}
\dot{p}=-\pder[H]{x}
$$
Same for $\dot{x}$. Yet, I don't obtain nicer differential equations and I don't think it's the right approach. Could someone give me a hint?
Comment: Hi. Do you need to find the equations of motion or solve the equations of motion? Thanks.
Comment: I need to solve them
Answer: I want simplification, so I'll take $\omega_0 = 1$. You can rescale $x$ and always get this kind of simplification, if $\omega_0$ is a constant. The Hamiltonian then becomes
$$H(x,p) = \frac{p^2}{2} + \frac{q^2}{2} + \lambda \left( \frac{p^2}{2} + \frac{q^2}{2} \right)^2 \, .$$
Hamilton's equations are given by
\begin{align}
\begin{cases}
 \dot{q} &= p + 2 \lambda p \left( \frac{p^2}{2} + \frac{q^2}{2} \right) \\
 \dot{p} &= -q - 2 \lambda q \left( \frac{p^2}{2} + \frac{q^2}{2} \right)
\end{cases} \quad \Rightarrow  \quad
\begin{cases}
 \dot{q} &= p \left[1 + 2 \lambda \left( \frac{p^2}{2} + \frac{q^2}{2} \right) \right] \\
 \dot{p} &= -q \left[1 + 2 \lambda \left( \frac{p^2}{2} + \frac{q^2}{2} \right) \right]
\end{cases} \, .
\end{align}
Assuming $q, \dot{p} \neq 0$, divide one equation by the other to get
$$ \frac{ \left( \frac{dq}{dt} \right)}{ \left(\frac{dp}{dt} \right)} = \frac{p \left[1 + 2 \lambda \left( \frac{p^2}{2} + \frac{q^2}{2} \right) \right]}{-q \left[1 + 2 \lambda  \left( \frac{p^2}{2} + \frac{q^2}{2} \right) \right]} = -\frac{p}{q} \, .$$
The solution will, therefore, be the same as for the SHO, with the exception that the new frequency will increase as the orbit gets farther away from the origin.
As I believe this is homework, I'll give no further details. The problem is basically solved.
Answer: what if same question is asked to find equation of motion.
i know equations of Hamilton. i am having hard time in finding meaning full solutions. i think my apporoch is not good.
can you suggest similar other example?
thanks
Comment: This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://physics.stackexchange.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://physics.stackexchange.com/help/whats-reputation), you can also [add a bounty](https://physics.stackexchange.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/358544)


How to export test cases from test plan in QC

Question: We use QC for test management tool in our project. Usually, we write test cases & test steps in spreadsheets and load into QC using 'Export to QC' excel add-in. We have a set of test cases already present in QC and they need to be updated.
Is there a way I can export the test cases (along with test steps for each test case) from QC back to excel so that I can update them to load it back to QC??
Comment: Is there any update for this? We are looking forward to one solution now.
Answer: This is how I do it:

Login to Quality Center.
Click Test Lab/Test Plan/Wherever you keep your test cases.
After creating the test set, configure the columns to display in the desired order.
Right click within the Test Set list and select Export > All.
Name the Export file and click save.

Exporting a test set is a lot easier than exporting from the test plan section, I've found. So if possible, consider bundling the tests, then exporting.
However if you really want to export from the Test Plan, click View > Test Grid. Then use a column to filter the displayed tests and export as explained above.
The third option is to export using SQL within Quality Center, but I've never explored that option too much as I've always had success with the first two methods.
Comment: I have attempted your solution from both the Test Lab and the Test Plan and unfortunately it does not export the Test Steps is the OP had requested.  This only exports one line for the Test with Test level details.
Answer: Follow the steps to get the Excel:

Select the folder in test plan.
Click on the Analysis > Project Report > Tests with design steps.
This will generate the report in web page.
On the top right corner you will see "Generate" option:
Click that, and it will generate the HTML.
Right-click and Export to Microsoft Excel.
Comment: Nice option! This is available in IE11, not seen it in the other browsers, and only when Excel (2016?) is installed on the system.
Answer: there's a sample .vbs (but it was uploaded as .txt) in this forum -> http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/Test-Plan-export-from-QC-to-Excel/td-p/4807563
I haven't tried it myself though, but I do hope it helps you.
Comment: The link is broken, can you fix it?
Answer: https://sites.google.com/site/quickinfopocket/qtp-probs-solve/tools
small functionality with respect to end user requirement. Currently this tool is proving the functionality of exporting manual test cases(Bulk export) from Quality center to predefined excel file and download qtp result from QC to local drive
Answer: Don't need to download anything below works fine:
Click Test Lab/Test Plan/Wherever you keep your test cases.
After creating the test set, configure the columns to display in the desired order.
Right click within the Test Set list and select Export > All.
Name the Export file and click save.
Comment: is there something we have missed here? we want to export test cases with the test step and description of every steps in the test cases. When i follow your advise, when i configure the column there is no option to select step name and step description. Thanks in advance
Answer: Using SQL you can use the following to get you tests out of the DB
select * from
TEST t,
DESSTEPS d

where
 t.ts_test_id = d.ds_test_id

 order by
 t.ts_test_id, d.ds_step_order

Answer: Here's something I found on some other SQA forum while searching for the same functionality:
Qc to Excel Add-in for Excel
Just need to make sure of a couple of things for this to work:

Extract this file into the path - Appdata>Microsoft>Addins

Change the Macro security settings in Microsoft Excel so that macros can be enabled.

Happy testing :)
Answer: Sub ExportTestCasesFromALM()

Dim wd, QCConnection, sProject, sTestPlanPath, TestFolderPath, strNodeByPath

qcURL = InputBox("Please enter ALM URL", "", "http://alm.optum.com:8080/qcbin")
If qcURL = "" Then
  MsgBox ("ALMURL cannot be blank")
  Exit Sub
End If

sDomain = InputBox("Please enter your Domain" & vbNewLine & "Eg:CORE_SYSTEMS", "", "CORE_SYSTEMS")
If sDomain = "" Then
  MsgBox ("DomainName cannot be blank")
  Exit Sub
End If

sProject = InputBox("Please enter your ProjectName" & vbNewLine & "Eg:RADC;GCM(As per ALM Project)", "", "GCM")
If sProject = "" Then
  MsgBox ("ProjectName cannot be blank")
  Exit Sub
End If

sUser = InputBox("Please enter your Username" & vbNewLine & "Eg:MSID", "", "")
If sUser = "" Then
  MsgBox ("UserName cannot be blank")
  Exit Sub
End If

sPass = InputBox("Please enter your Password", "", "")
sFolderpath = InputBox("Please enter your ALM Folderpath" & vbNewLine & "<Subject\FolderStructure>", "", "Subject\RADC Project\2015\Q2_2015\May")
If sFolderpath = "" Then
  MsgBox ("FolderPath cannot be blank")
  Exit Sub
End If

Set QCConnection = CreateObject("TDApiOle80.TDConnection")

QCConnection.InitConnectionEx qcURL
QCConnection.ConnectProjectEx sDomain, sProject, sUser, sPass

'If (QCConnection.Connected <> True) Then
'    MsgBox "QC Project Failed to Connect to " & sProject
  '  WScript.Quit
'End If

sTestPlanPath = "Enter QC Test PlanFolder Path"
sTestPlanPath = sTestPlanPath & (Chr(13) & Chr(10))
sTestPlanPath = sTestPlanPath & sFolderpath
'TestFolderPath = InputBox(sTestPlanPath, "Folder Path")

'Displays the Test Plan Folder Path
'MsgBox TestFolderPath
TestFolderPath = sFolderpath
'Call ExporttestCases Funtion and Pass Folder Path parameter
'Call ExportTestCases(TestFolderPath)
strNodeByPath = TestFolderPath

 Dim Excel, Sheet

    Set Excel = CreateObject("Excel.Application") 'Open Excel
    'Excel.
    'Excel.WorkBooks.Add() 'Add a new workbook
    'Get the first worksheet.
    Set Sheet = ActiveSheet

    'sheet name as Tests
    'Sheet.Name = "Tests"

'Specify the Excel Sheet Properties
 With Sheet.Range("A1:H1")
        .Font.Name = "Cambria"
        .Font.FontStyle = "Bold"
        .Font.Size = 12
        .Font.Bold = True
        .HorizontalAlignment = xlCenter
        .VerticalAlignment = xlCenter
        .Interior.ColorIndex = 15  'Light Grey'
    End With

'Excel Sheet Column Header Values
    Sheet.Cells(1, 1) = "Subject"
    Sheet.Cells(1, 3) = "Description"
    Sheet.Cells(1, 2) = "Test Name"
    Sheet.Cells(1, 4) = "Step Name"
    Sheet.Cells(1, 5) = "Step Description"
    Sheet.Cells(1, 6) = "Expected Result"
    Sheet.Cells(1, 7) = "Level"
    Sheet.Cells(1, 8) = "Designer"
    Sheet.Cells(1, 9) = "Type"
    Sheet.Cells(1, 10) = "TestType"
    Sheet.Cells(1, 11) = "Status"
    Sheet.Cells(1, 12) = "Automation Status"
    Sheet.Cells(1, 13) = "Active Status"
   ' Sheet.Cells(1, 9) = "Application ID"
    ' Sheet.Cells(1, 10) = " Project Identifier"
    ' Sheet.Cells(1, 11) = "Count"
    'Sheet.Cells(1, 3) = "Description"
   ' Sheet.Cells(1, 4) = "Designer "
    'Sheet.Cells(1, 5) = "Status"

'Designer
    'Call PrintFields(TestFactory)
    Dim TreeMgr, TestTree, TestFactory, TestList

    'Connection to TreeManager which Represents the System tree and containing a subject tree and all hierarchial field trees
    Set TreeMgr = QCConnection.TreeManager

    'Specify the folder path in TestPlan, all the tests under that folder will be exported.

    'Gets the node at specified TreePath and strNodeByPath is a a Subject\.... folder path
    Set TestTree = TreeMgr.NodeByPath(strNodeByPath)

    'To Get the a list from all from Node, NewList will bring all the testcases from the perticular node
    Set TestFactory = TestTree.TestFactory
    Set TestList = TestFactory.NewList("")

    'Specify Array to contain all nodes of subject tree.
    Dim NodesList()

    'To Protect all the Nodes specify as Preserve
    ReDim Preserve NodesList(0)

    'Assign root node of subject tree as NodeByPath node.
    NodesList(0) = TestTree.Path

    ' Call sub Getnodes list which will gets subnodes and return list in array NodesList
    Call GetNodesList(TestTree, NodesList)

    Dim Row, Node, TestCase, Counter
   'Starts saving Testcases from the 2nd Row
    Row = 2
    Counter = 1
    For Each Node In NodesList
        Set TestTree = TreeMgr.NodeByPath(Node)
        Set TestFactory = TestTree.TestFactory
        Set TestList = TestFactory.NewList("") 'Get a list of all from node.

        'Iterate through all the tests.
        For Each TestCase In TestList
            Dim DesignStepFactory, DesignStep, DesignStepList
            Set DesignStepFactory = TestCase.DesignStepFactory
            Set DesignStepList = DesignStepFactory.NewList("")
                    Sheet.Cells(Row, 1).Value = TestCase.Field("TS_SUBJECT").Path
                    Sheet.Cells(Row, 3).Value = stripHTML(TestCase.Field("TS_DESCRIPTION"))
                    Sheet.Cells(Row, 2).Value = TestCase.Field("TS_NAME")
                    Sheet.Cells(Row, 7).Value = TestCase.Field("TS_USER_01")
                    Sheet.Cells(Row, 9).Value = TestCase.Field("TS_TYPE")
                    Sheet.Cells(Row, 10).Value = TestCase.Field("TS_USER_02")
                    Sheet.Cells(Row, 11).Value = TestCase.Field("TS_STATUS")
                    Sheet.Cells(Row, 12).Value = TestCase.Field("TS_User_04")
                    Sheet.Cells(Row, 13).Value = TestCase.Field("TS_User_03")
           ' Sheet.Cells(Row, 3).Value = stripHTML(TestCase.Field("TS_DESCRIPTION"))
           ' Sheet.Cells(Row, 9).Value = TestCase.Field("TS_User_02")
           ' Sheet.Cells(Row, 10).Value = TestCase.Field("TS_User_05")
          '   Sheet.Cells(Row, 11).Value = Counter
             Counter = Counter + 1
            If DesignStepList.Count = 0 Then
                'Save a specified set of fields.
                 Sheet.Cells(Row, 1).Value = TestCase.Field("TS_SUBJECT").Path
                 Sheet.Cells(Row, 3).Value = Trim(TestCase.Field("TS_DESCRIPTION"))
                Sheet.Cells(Row, 2).Value = TestCase.Field("TS_NAME")

               'Sheet.Cells(Row, 4).Value = Trim(TestCase.Field("TS_DESCRIPTION"))
                 Sheet.Cells(Row, 7).Value = TestCase.Field("TS_USER_01")
                Sheet.Cells(Row, 8).Value = TestCase.Field("TS_RESPONSIBLE")
               ' Sheet.Cells(Row, 5).Value = TestCase.Field("TS_STATUS")
               'Sheet.Cells(Row, 9).Value = TestCase.Field("TS_User_02")
               'Sheet.Cells(Row, 10).Value = TestCase.Field("TS_User_05")

          Row = Row + 1
            Else
            Dim replaceString
            replaceString = vbNewLine & vbNewLine
                For Each DesignStep In DesignStepList
                   'Save a specified set of fields.
                   Sheet.Cells(Row, 1).Value = TestCase.Field("TS_SUBJECT").Path
                   'Sheet.Cells(Row, 2).Value = TestCase.Field("TS_DESCRIPTION")
                    Sheet.Cells(Row, 4).Value = stripHTML(DesignStep.StepName)
                    'Sheet.Cells(Row, 4).Value = Trim(stripHTML(DesignStep.StepDescription))
                    Sheet.Cells(Row, 5).Value = Replace(Trim(stripHTML(DesignStep.StepDescription)), replaceString, "")
                     'Sheet.Cells(Row, 4).Value = Trim(Sheet.Cells(Row, 4).Value)
                    'Save the specified design steps.
                    'Sheet.Cells(Row, 5).Value = stripHTML(DesignStep.StepExpectedResult)
                    Sheet.Cells(Row, 6).Value = Replace(Trim(stripHTML(DesignStep.StepExpectedResult)), replaceString, "")
                  'Sheet.Cells(Row, 7).Value = TestCase.Field("TS_USER_01")
                    Sheet.Cells(Row, 8).Value = TestCase.Field("TS_RESPONSIBLE")
                    Row = Row + 1

                Next
            End If
        Next
    Next

    'Call PrintFields(DesignStepFactory)

    'Excel.Columns.AutoFit

    'Set the Column width for the following columns.
    'Excel.Columns("C").ColumnWidth = 80 'Description
    'Excel.Columns("G").ColumnWidth = 80 'Step Description(Action)
    'Excel.Columns("H").ColumnWidth = 80 'Expected Result

    'Set Auto Filter mode.
    If Not Sheet.AutoFilterMode Then
        Sheet.Range("A1").AutoFilter
    End If

    'Freeze first row.
    Sheet.Range("A2").Select
    'Excel.ActiveWindow.FreezePanes = True

    'Save the newly created workbook and close Excel.
   ' Excel.ActiveWorkbook.SaveAs ("C:\" & sProject & "_TESTCASES.xls")
   ' Excel.Quit

   ' Set Excel = Nothing
    Set DesignStepList = Nothing
    Set DesignStepFactory = Nothing
    Set TestList = Nothing
    Set TestFactory = Nothing
    Set TestTree = Nothing
    Set TreeMgr = Nothing
QCConnection.Disconnect

'If the Export is successful you will get the message Completed.
MsgBox "TestCase Export Completed successfully"

'Logout the QC Session
QCConnection.Logout
QCConnection.ReleaseConnection
End Sub

Sub GetNodesList(ByVal Node, ByRef NodesList)
    Dim i
    'Run on all children nodes
    For i = 1 To Node.Count
        Dim NewUpper
        'Add more space to dynamic array
        NewUpper = UBound(NodesList) + 1
        ReDim Preserve NodesList(NewUpper)

        'Add node path to array
        NodesList(NewUpper) = Node.Child(i).Path

        'If current node has a child then get path on child nodes too.
        If Node.Child(i).Count >= 1 Then
            Call GetNodesList(Node.Child(i), NodesList)
        End If
    Next
End Sub

'Option Explicit
''
'Strips all the HTML tags from a string.
'
'@param:    strHTML A string with HTML tagges embedded.
'
'@return:               A string with all HTML tags stripped.
Function stripHTML(strHTML)
    'Strips the HTML tags from strHTML

    Dim strOutput
   Set objRegExp = New RegExp

    objRegExp.IgnoreCase = True
    objRegExp.Global = True
    objRegExp.Pattern = "<(.|\n)+?>"

    'Replace all line breaks with VB line breaks
    strOutput = Replace(strHTML, "
", vbLf)

    'Replace all HTML tag matches with the empty string
    If Left(strOutput, 6) = "" Then
        strOutput = objRegExp.Replace(strOutput, "")
    End If

    'Replace all <, >, and " with <, >, and "
    strOutput = Replace(strOutput, "<", "<")
    strOutput = Replace(strOutput, ">", ">")
    strOutput = Replace(strOutput, """, Chr(34))

    Set objRegExp = Nothing

    stripHTML = strOutput    'Return the value of strOutput
End Function

''
'Truncates a string to 32,767 characters for excel.
'
'@param:    strText String to be truncated.
'
'@return:               Truncated string.
Function Truncate(strText)
    'Excel Max Cell Length = 32,767
    Dim sNotice
    sNotice = vbLf & "Contents Truncated..."

    If Len(strText) > 32767 Then
        strText = Left(strText, 32767 - Len(sNotice))
        strText = strText & sNotice
    End If

    Truncate = strText
End Function

Comment: Please add some explanatory text to your code.
Answer: There isn't an easy to use manual method for exporting from HP ALM to Excel.
The only easy to use manual method for exporting will give you a HP report which is hard to use for your purposes.
Those steps are:

Go to Test Plan view
Select a test folder
Go to the top menu and selected Analysis > Project Report > Tests with Design Steps

Unfortunately you'll need to use a technical method or tool for creating an excel file with the test cases.
HP ALM provides a technical method where you can run SQL by going to Dashboard > Analysis View > New Excel Report


How do I make .htaccess work on the current directory and not subdirectories?

Question: I'm using mod rewrite to access my PHP files in the root directory of my website indirectly. Currently, I have something like this,
RewriteRule ^(blog|about|page3|etc)$ /$1.php [L]

But what I would like to use is
RewriteRule ^(.*)$ /$1.php [L]

So that I wouldn't have to update my .htaccess file whenever I wanna add a new page to my website. The problem with this however is that it affects my subdirectories too. Which makes CSS, javascript, images unaccessable because it redirects to "/dir/example.png.php".
So what is the best solution here?
Answer: Try this rule:
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -f
RewriteRule .* $0.php [L]

Answer: Edit the .htaccess to this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /$1.php [L]

After starting the rewrite engine, it will first check to see if the requested file is an actual file on the system, or if it is actually a directory. If it is neither of those, it will execute the rule, which in this case is to try and find the file by appending .php and serving that up.
Subdirectories, images, CSS and the like will be fine because they will step out of the rewriting once they are found.
Comment: Problem with this one though is it gives me a server error whenever the file is not there.
Comment: That's not good then. Will update if there's another way other than the one suggested by Gumbo.
Answer: I'd do it with filters to ignore sub-directories. That way you only have to change it if you add a sub folder. You'll need to add a line like Sosh's if you have images or other files in the folder
The following would ignore "images" and "js" sub folders and redirect everything else
RewriteRule   ^images*   -  [L]
RewriteRule   ^js*       -  [L]
RewriteRule   ^(.*)$     /$1.php   [L]

Answer: Something like this (note the !):
RewriteRule !\.(js|ico|gif|jpg|png|css|zip|gz|html|xml)$ index.php

Comment: That won't ignore sub folders


Can Robots push when moving sideways?

Question: With "Boink" and "Crab Legs" robots can move sideways. Can they push other robots then when not facing them?
Answer: As you can see from page 6 of the rules:

Pushing Other Robots
When robots collide, one will push the other. Robots can be pushed
  anywhere on the board (or off the side!), even into a pit or onto a
  conveyor belt. A robot can't be pushed through a wall, though, so the
  movement of a pushing robot will simply stop if the pushed robot runs
  into a wall. Robots can run into walls all day long without taking any
  damage from it, so they don't accumulate Damage tokens this way.

You always push robots, unless a wall prevents them from moving. So there is no mention of direction. As long as they collide they are moved.
This also works recursively. If robot A pushes robot B and robot B collides with robot C, then robot C is moved too (as long as there is no wall preventing movement of either robot.
Comment: That is not the relevant rule book.. The 2016 wording is: If a robot enters a space occupied by another robot, the robot in motion will push the robot in the direction the pushing robot is moving until it ends is move.
Comment: That still leads to the same conclusion.
Answer: Robots always push when moving into other robots.

Can Robots push when moving sideways?


Is there any arduino module to control water flow?

Question: I want to build my super cool auto flower water gadget. I'm looking for some arduino module like valve or water gate, which can be controlled by input power. So, it can open or close water flow from some bottle by a signal. Any ideas?
Comment: Maybe you could use solenoid valve plus one of the relay modules for Arduino.
Comment: Sounds interesting...
Answer: Do you need to control only the on/off flow of water? Do you need control over variable flow? What amount of flow and pressure are you talking about? As you can see, there are a lot of additional questions that would shape an answer.
From a bottle suggests fairly low flow and pressure. I am not really familiar with something that size (maybe a drip irrigation system valve); but I have controlled solenoids before with power transistors and/or relays. Solenoids such as what you'd find on a Rainbird irrigation valve. These are often 24VAC and pull somewhere from 125 to 250 mA (depending on model). (I've also used these successfully with small air cannons like for confetti throwers.)
If you connect the valve with some PVC pipe to your bottle you should be able to control the on/off state easily. If you need the ability to control the flow in a variable way, you will probably need to look for some kind of a stepper-motor or servo controlled valve.
Answer: You can use a 5v logic level mosfet + a solenoid(google valves4projects)
But you will also need to provide a higher voltage power source for the solenoid. This can come from any dc source, I would just use a higher voltage acdc wall adapter.
Answer: Due to the date of post this is more for others who come across this question in search of a solution for a similar project.
Most sprinkler related valves require a high pressure system similar to what your city water supply has (~60-90 PSI). To open the valve requires both a "high" pressure source of water and the solenoid to be activated. If you are connecting to a garden hose this is fine. If not this is no easy feat.  I used a 390 GPM pump and couldn't open the valve.
If you are connected to a 2L bottle or rain barrel you'll need something designed for low pressure.  Look for a gravity fed solenoid valve instead. Here the maximum pressure is around 7ft of head with water (or 3 PSI) and there is typically no minimum pressure. I ended up using one from valves4projects (suggested by earlier answer) and was happy with the results.


How long can an ELT run before the battery is dead?

Question: I recently learned that ELTs are required to run a maximum of 60 minutes before the power supply battery has to be recharged or replaced.  This really doesn't seem like a great amount of time for this device to operate in order to facilitate locating by search and rescue crews.  I would have said a more reasonable figure would be around 24 hours.  Is it really true that ELTs are only effective for such a short period of time?
Comment: The 406Mhz ELT's are picked up by the [Cospas-SARSat](http://www.cospas-sarsat.int/en/) satellites and sent to a dispatch center with the location (5km accuracy without GPS, 100m with GNSS) so they don't need to run a long time. The older 121.5/243Mhz models used to be monitored by the same system but are no longer monitored.
Answer: The reference you quote is correct as it defines the "useful life" of the battery.  that is: if you use it for more than 1 hour (that would include the cumulative test time) it must be recharged or replaced before being returned to service.  But that isn't what you are asking about.  You are asking for the duration of operation.
The requirement for Duration of Operation is 24 hrs.
RTCA DO-204A, MOPS for 406 MHz ELTs, states

1.5 Operational Goals
b. Operability
(1) The technical requirements of the 406 MHz beacon radiated signal
  are based on the COSPAS-SARSAT system.
(a) The 24-hour operating life requirement (§2.2.1) is based upon the
  maximum COSPAS-SARSAT system waiting time, the number of satellite
  overpasses required to optimize the beacon location solution and
  battery capacity limitation at low temperatures.

and

2.2.1 Duration of Operation
Refer to COSPAS-SARSAT document C/S T.001.

and from C/S T.001

4.5.1 Duration of Continuous Operation
The minimum duration of continuous operation shall be at least 24
  hours* at any temperature throughout the specified operating
  temperature range.
The minimum duration of continuous operation for an ELT(DT) to meet
  the ICAO GADSS requirement at any temperature throughout the specified
  operating temperature range shall be 20† hours.
Answer: You're misinterpreting a section of FAR 91.207.
That regulation says, in part:

c) Batteries used in the emergency locator transmitters … must be replaced (or recharged, if the batteries are rechargeable) —

When the transmitter has been in use for more than 1 cumulative
  hour; or

. . .

This does not say the ELT/battery only has to operate for one hour, it says that if the ELT has been transmitting for one hour you must replace the battery, even if it's still perfectly good.
The one hour period is cumulative and includes the required annual ELT tests (91.207 paragraph D) and any accidental or incidental activations from a hard landing, inadvertently bumping the panel switch, etc.
This battery replacement requirement exists to ensure that the ELT will be able to function properly in a real crash & will transmit for at least the amount of time it's supposed to.
Per COSPAS/SARSAT specifications new 406MHz ELTs are required to be able to transmit continuously for a minimum of either 24 or 48 hours (depending on the type of beacon).
I believe the older 121.5 MHz ELTs also have a 24-hour continuous transmission requirement.
Answer: Edit: Damn, I type slow. 3 other (and better) answers were posted while I was typing.

I think the premise of your question is not quite accurate. The only thing "required" (within this context), is that the battery must be recharged or replaced IF it has been transmitting for 1 cumulative hour. That does not really imply that an ELT battery is only "required" (i.e. there is a regulation somewhere) to operate for at least one hour.
An ELT transmitter might have been in use for 1 cumulative hour for several possible reasons, the most likely of which is accidental triggering, or bench testing it multiple times. I've been involved in several ramp searches because a random ELT was going off in a parked, unoccupied, plane.
The FAR that applies is 91.207.  Paraphrased as:

No person may operate a U.S.-registered civil airplane unless... there
  is attached to the airplane an approved automatic type emergency
  locator transmitter that is in operable condition. Batteries used in
  the emergency locator transmitters must be replaced (or recharged, if
  the batteries are rechargeable) when the transmitter has been in use
  for more than 1 cumulative hour; or When 50 percent of their useful
  life (or, for rechargeable batteries, 50 percent of their useful life
  of charge) has expired, as established by the transmitter
  manufacturer.

So, if the ELT has been (or did) "go off" for at least one hour, the plane may not be operated until the ELT's battery is replaced or recharged.
Other documentation:

TSO-C126 describes requirements for the newer 406 Mhz ELTs.
TSO-C91 describes requirements for the older, 121.5 Mhz ELTs.
RTCA Document No. DO-188 describes the technical aspects of the batteries that must be used... type (lithium, etc.), ventilation requirements, mounting requirements, etc....
RTCA DO-204A (no public link that I could find) specifies a 24-hour continuous operation capability
Answer: I presume you are referring to this FAR.
§91.207   Emergency locator transmitters.

(c) Batteries used in the emergency locator transmitters required by
  paragraphs (a) and (b) of this section must be replaced (or recharged,
  if the batteries are rechargeable)—
(1) When the transmitter has been in use for more than 1 cumulative
  hour; or
(2) When 50 percent of their useful life (or, for rechargeable
  batteries, 50 percent of their useful life of charge) has expired, as
  established by the transmitter manufacturer under its approval.

If you read it carefully you will notice that it doesn't say that they have a maximum life of 1 hour. Just that they must be replaced if they have been in use for more than 1 hour. This only applies to TSO C91 (121.5MHz) ELTs. The 406Mhz batteries have different lifetimes.
Getting information on how long they must transmit is surprisingly hard. Many of the technical documents cost money to access, e.g. DO-204A, Minimum Operational Performance Standards (MOPS) for 406 MHz Emergency Locator Transmitters (ELTs) so I can't read them.
I found one reputable source for the lifetime once activated.

"Depends on a lot of factors. The design criteria is that they
  transmit for at least 48 hours at 0-degrees, some will transmit much
  longer if the weather is warm, the battery fresh, etc. Or they will
  transmit for less if it's colder, if the battery hasn't been replaced
  when it was supposed to, etc." --Richard A. De Castro -N6RCX NREMT SAR
  Tech

http://pansar.voices-inc.com/ELT.htm


Can one have a glass candelabra with seven branches?

Question: I know that the halacha is that you can't make a copy of the menorah with seven branches, and that you shouldn't have a candelabra  with seven branches, either. What if it's made out of glass?
Answer: Rabbi Cohen of Dose of Halacha writes that it's ok:

The Gemara (Rosh Hashana 24a; Menachos 28b) writes that it is assur deoraisa to create a seven-branched candelabrum as the Torah (Shemos 20:20) forbids imitating any of the kelim of the mishkan.
The rishonim debate whether this applies to all seven-branched candelabra or just exact replicas of the original menora. The Bechor Shor (Rosh Hashana 24a) holds that any seven-branched candelabrum regardless of its size or shape, etc. is assur while Meiri (Rosh Hashana 24a) writes that if it is even slightly different from the original menora, then it is permitted (See Chacham Zvi 60). The Shulchan Aruch (YD 141:8) follows the Maharik (75) who writes that if it would be kosher bedieved in the mishkan then it is assur.
R' Yosef Chaim Sonnenfeld (Salmas Chaim 272) writes that one shouldn't even make a model of a menorah for educational reasons. R' Moshe Feinstein (Igros Moshe YD 3:33), however, disagrees, writing that Rambam (Beis Habechira 7:10) allows one to make a seven-branched candelabrum out of wood or earthenware as such candelabra would not be fit as a menora in the mishkan (ibid 1:18).
Based on this, one would be able to buy such a candelabrum made out of glass.
Comment: If the menorah could be made out of a non-metal, then glass might be an allowable material (unlike earthenware or wood). It would not become "dirtied" by the burning oil and might be considered "pretty" enough to be used to ornament the bais hamikdash. If that is the case (and I do not know if it is) then it would also be asur now.
Comment: Is this statement your or part of the quote: "Based on this, one would be able to buy such a candelabrum made out of glass." - I am not sure I understand how this is an obvious conclusion.
Comment: if it's not metal, it isn't kosher even bedieved
Answer: As Zvi pointed out in the comments, glass is not kosher at all in the Beis Hamikdash. The gemara in Menachos 28b says that any metal is kosher, but not earthenware. Various commentaries say that bone or glass would be the same as earthenware.
Rabbi Akiva Eiger in Yoreh Deah 141(8) says that anything that is not kosher for the menorah in the Beis Hamikdash, is allowed to make for yourself. His example is a gold menorah with no cups, knobs, or flowers. This would be the same: Glass is fine.


How do search engines identify keywords in domain names?

Question: Do search engines identify keywords in domain names as substrings or special character separated strings, or both? For example: abcwidgets.com vs abc-widgets.com (obviously with "widgets" as the keyword).
Answer: Okay, just for the sake of explanation, I thought I would jump in. This is a simple process to understand. I thought I would explain it theoretically so that you can take the concepts forward with you into the future and apply it in other areas.
There are a few things you need to know in order to understand how this works.
The first is how Google stores terms in the index.
Google stores terms in a relatively simple index file. This file contains known dictionary terms along with terms found on the Internet that exists on more than one site and can be understood using semantic analysis. Each term within the index has a checksum number assigned to it that uniquely identifies the term. A checksum is a numerical algorithm that can be used to quickly check if two things are identical. When a checksum is created, it can represent a block of text, generally used against content or terms in search engines, with a unique number. If a term is found on the web and Google wants to see if it is a known term, a checksum of the found term is created and then looked up in the index. Google does not compare words when comparing numbers is far more efficient and smaller.
How Google matches terms to a web page.
That said, Google creates a series if indexes that tie the terms to the web page. Google originally explains two indexes that consist of a document ID (web page) and a term ID where one is sorted by term ID and the other by document ID. The reason for this so that Google can find what terms are on a web page and what web pages contain a particular term through standard forward indexes. Heavily hinted are the semantics behind all of this. Google tells us the title tag is important along with any link text where the web page is the target, the URL/URI, and the description meta-tag. This indicates that additional indexes exist specifically for this purpose.
How are terms discovered in a domain name?
Programmers understand word boundaries. Word boundaries are segments of alpha-numeric text between delimiters generally a space or special character. This is not to be confused with an actual term which it may not be- it is just a segment of readable characters. In the case of domain-name.com, the hyphen (-) would be the delimiter that separates domain and name and the period (.) separates the domain name from the TLD. If Google wants to check if valid terms exist within a domain name, it simply creates a checksum for each text segment found in a domain name and looks it up in the term index.
In the case of a domain name that does not contain a delimiter, the process changes slightly. For domainname.com, the domain name could be examined by extracting and adding characters of the domain name one at a time in a loop. This is an old-school method no longer used and just mentioned for illustration. For example, domainname.com could discover domain and name by extracting d, then do, then dom, then doma, etc till each term is discovered.
Another similar method is using n-grams which is what Google and search engines actually uses. In this case, n is a number where Google will take n number of characters at a time. For example, 3-gram would get dom, then oma, then mai, etc. and Google would attempt to see if the n-gram segment is a valid term by creating a checksum and looking it up in the term index. N would be increased by one and the process would start over again and again until all the terms are found. This allows a term like headache to be indexed as headache, head, and ache.
If a valid term is found for a domain name, then an entry is entered into the URL/URI index for the term and the site/page. Google does not give too many clues on this except that it appears that the domain name, directory path, and file name are at least segmented. This can be stored in a single index or not. But let's assume for the moment that it is not. Based upon this assumption, the domain name would have it's own index that identifies the domain name as having domain and name as terms found within it.
Simple huh?
So you can see that Google and indeed all search engines can easily find terms that exist within a domain name no matter how the domain name is actually presented.
It is important to recognize that when we talk about rank, we are talking about two things; site and page. Terms found in a domain name do not help a site to rank, but do help pages rank in the SERPs only as a last resort when search query matches are limited. This is due to over optimization and previous spam sites that took advantage of the over optimization.
Answer: Google's senior trends analyst John Mueller says keywords within the base domain name don't influence SEO (2020) Mueller (though they undoubtedly influence humans).
Closetnoc's answer (2015) suggests n-gram segments within the domain name might be used by the search engine as a last resort, if there are few pages found. To make this work probably Google would have to do this analysis for all domain names. It's unclear whether Google would go to the trouble of generating such n-grams when they now have an average of 2 MB of stuff per page to go by without bothering to dissect n-grams (other than considering plurals and suchlike). Closetnoc mentioned the letters are converted to a unique checksum, but I suspect Google uses a very short checksum for economy, with the result that the same checksum is occasionally generated for different words. That would explain why searches occasionally return a page that lacks the search term entered.
Answer: They can do both. But keywords in the domain name are no longer a ranking factor, which could give you an edge comparable to your competitor.
Comment: (I removed the double negative, which I assume was unintentional?) However, keywords in the domain could still "give you an edge". Even if keywords in the domain name are no longer a ranking factor, the domain is still visible in the search results so could help with CTR (an "edge").
Comment: @w3d, an admin, who makes use of, should clearly differentiate an edge caused by ranking factor vs. caused by CTR, also by user metric.
Comment: Actually, *domain name are no longer a ranking factor* is not exactly true. The semantic value of having keywords in a domain name still exists and will never be removed. However, the effect is significantly less these days. Direct keyword matches are near the bottom of the list in SERP list ranking and generally only appears when the search query is not returning enough results. The mechanics are exactly the same, they just dialed down the volume.
Comment: @closetnoc i meant it rather as: _domain name are no longer a ranking factor, which grants advantages_  they are a ranking factor indeed, but to hope, it would make any site rank higher because of it is irresponsibly. _Direct keyword matches are near the bottom of the list in SERP list ranking and generally only appears when the search query is not returning enough results_: full acknowledgment
Comment: We have to be careful using the terms *ranking factor*. It has been made extremely fuzzy and confusing. Exact terms found in a domain name does not help a *sites* rank (meaning the rank of the site which includes stuff like trust rank), but does help *pages* rank within the SERPs. It is a two-part process. In this case, the terms found in a domain name do help pages rank in the SERPs, however, due to spam and previous over optimization, this effect has been significantly reduced down to near last resort.
Answer: The beauty of the new domain extensions is that you can have a new structure called keyword.keyword. When you can now have actual words on the right side of the dot, the game has changed. In the case of coffee.club, the site managed to rank on page 1 for the term "coffee club" within weeks. The only signal to Google was the anchor text from links, which in most cases was the domain name.


Gnome Shell extension window list doesn't utilize space in top panel

Question: As you can see in the image , gnome shell extension window list doesn't utilize left space properly. There is some limit approximately in the middle of the screen.
After that it doesn't expand. Is there any way to customize the window list extension to use proper space according to our needs ... like I can apply a particular amount of boundary between status icon(notification icon) and windows list.
Answer: my problem is solved after using this extension... https://extensions.gnome.org/extension/51/extend-left-box/


E3D V6 underextruding always?

Question: I have an E3D v6 1.75mm bowden.
When I print, there is a gap between infill lines, and also when printing rectilinear/hexagonal infill lines seem to be pretty slim.
My settings:

Slicer: Slic3r
Nozzle size: 0.4mm
Print speed: 30mm/s
First layer print speed: 15mm/s
Travel speed: 90mm/s
Retraction length: 0.8mm
Retraction speed: 40mm/s
Extrude ratio: 1 (tried also with 0.48mm extrusion width, I remember it's the default S3D setting, so I gave it a try)
Print temperature: 220 °C
Material: PLA

Firmware settings:

Firmware: Marlin 1.1.0-1
Motion system: CoreXY
Acceleration: 1000
VMax X: 300
VMax Y: 300
VMax Z: 5
VMax E: 80
Xsteps/mm: 80.05
Ysteps/mm: 80.05
Zsteps/mm: 400
Esteps/mm: 96.5

Disclaimer: I set Esteps/mm to 96.5 because I calibrated the printer as described here, so I'm 100% sure it's an accurate setting. Same for X,Y,Z steps. I printed a cube and calculated the real steps per millimeter, and it's accurate too. The extruder motor works, it's not the issue.
Here you can find some pictures that show what I'm trying to describe:

While printing I tried to release the extruder motor clamp and push the filament by hand: it extruded 1mm thick lines, so the extruder is not clogged and is perfectly capable of extruding the required amount of PLA.
Is it possible that the VMax E parameter is preventing the extruder motor to extrude properly? I mean, could it be that it's trying to extrude at a higher speed than the maximum allowed? Seems weird to me, because comments in Marlin's Configuration.h file say Default Max Feed Rate (mm/s) for that parameter, so if the limit is set to 80mm/s it should extrude just fine. If this is the issue, how should I solve it?
Comment: Maybe this would help http://manual.slic3r.org/advanced/flow-math
Comment: This problem could be related to your slicer.  Have you tried using a different slicer (Cura for example)?  I have seen the  gapping reported several times for slic3r that went away when they used a different slicer.
Comment: @markshancock I use Slic3r since more than a year without issue, so I think it should work... I thought about a Marlin issue because this is a printer I assembled with components from another printer that had repetier. Same Slic3r settings which worked perfectly with the old Repetier firmware don't seem to work with Marlin, this is weird... Or maybe it's just that I had a direct extruder before and bowden requires some special settings...?
Comment: I am not saying that Slic3r is a bad slicer; but, every product has its vulnerabilities and I have seen several reports where people saw something like this and used a different slicer and they didn't see it; so, I didn't want to claim that as an answer; but, thought you should try it as an experiment to see if it resolves what you are seeing.
Comment: Another trick I have hears to workaround this is to lie about your nozzle diameter.
Comment: Look at https://3dprinting.stackexchange.com/questions/4133/slic3r-settings-for-flat-slopes-on-top/4138#4138 for an example of a slic3r specific issue
Comment: @markshancock I didn't say that Slic3r is the best slicer out there, I just said that with the exact same components I didn't have issues. Plus, I already sliced and printed the round-shaped model in this question with Slic3r, same filament and my old printer setup, it came out perfect. As I said, issues came after switching to Marlin and E3D V6, so let me think this is not a slicer issue, whatever the slicer is.
Answer: Major factors affecting extrusion:

Nozzle diameter
Extrusion ratio
Extrusion stepper calibration
Filament actual diameter
Extrusion width setting
Nozzle temperature

According to the photos, temperature is acceptable (may be a bit high, but it is not a problem in this case). Extrusion ratio is 1 and should not be changed in normal operation. Extrusion width is often set to auto but sometimes calibrating it gives better results in slic3r. If stepper is calibrated properly, then I would check for nozzle and filament diameters. For nozzle it should be enough to verify that 0.4 bit fits in and 0.5 doesn't. Filament can be measured by digital caliper. Difference between 1.75 and 1.73mm may have significant difference resulting in under-extrusion.
Comment: Everything is calibrated. Extrusion width is set to 0.4, I also tried 0.48 (because Simplify3D does this by default, so I thought I could try that too), no luck. Stepper is calibrated, as wrote in the question. The filament actual diameter is quite accurate, as I said I never experienced this type of issue with the stock direct extruder and Repetier: all the troubles came when I switched to Marlin + E3D V6
Comment: Do you use EEPROM in Marlin? Try to get current parameters via M503 command and check if they are the same as you expect

E3D V6 underextruding always?


Inherited house and principal residence exclusion for capital gains on IRS Form 104

Question: I'm the personal representative of an estate in Massachusetts.  A home in probate was recently sold and the estate received a 1099-S.  There are about $50,000 in capital gains from the sale.  I lived in the house for over 2 years after the death of the owner.  Is the estate able to use the principal residence exclusion for the capital gains on IRS Form 104?  There are 5 heirs.
Answer: The basis for real estate owned by a decedent in the U.S. (i.e. the number you subtract from the net proceeds to determine capital gain) is adjusted to fair market value as of the date of death, regardless of the purchase price, the capital improvements made, or depreciation deductions taken (which is how the basis would have been determined prior to death).
So, only appreciation from the date of death to the date of sale is taxable as a capital gain. (That appreciation s taxable income to the estate subject to a distributable net income deduction that could pass a portion determined by law and regulations of the tax due to an heir via a K-1.)
To qualify for the principal residence exclusion you need to both own the property of record for two of the five years preceding the sale, and must reside there for two of the five years preceding the sale, but they need not be the same two year periods and don't even have to overlap. But, this would probably be interpreted to only include the time period after the date of death through the sale.
Since the estate rather than you personally owned the residence for the entire time period from the death until the sale and you are not the sole heir, the principal residence exclusion would not apply.


Re filling out ESTA - On the form do I say yes to transit or no?

Question: Re filling out ESTA - I am flying into the US staying 2 days then flying onto Rome tthen returning 6 weeks later for 4 nights then flying home to NZ. On the form do I say yes to transit or no?
Answer: You're staying two days in the country, so that's not a transit.  You're exiting the airport (I assume you're not staying two days in the airport!) and visiting the US.
From the ESTA help page:

Do nationals or citizens of countries that participate in the Visa
  Waiver Program require travel authorization if they are only
  transiting the United States en route to another country?
Eligible
  nationals or citizens of countries that participate in the Visa Waiver
  Program require either a travel authorization or a visa to transit the
  United States. If a traveler is only planning to transit through the
  United States en route to another country, when he or she completes
  the travel authorization application in ESTA, the traveler should
  select "Yes" to the question "Is your travel to the US occurring in
  transit to another country?".
Comment: If you're staying 2 days at the airport do you put Yes or No?
Answer: if you're stupid like me... i read the answer as 'not a transit' incorrectly.
Yes = you're staying in the airport and moving on to somewhere else
No = you're actually going into the country and staying over in a hotel etc.
So if your going the USA for a holiday select NO and fill out the extra info.
Comment: It can still be a transit even if you stay in a hotel overnight and get a plane the next day. The US does not require transiting passengers to stay in the airport. But if you actually are on holiday in the US, then it is "No" not a transit.


What's the difference between PWM and VPW?

Question: What's the difference between pulse-width modulation (PWM) and variable pulse width (VPW)?
Comment: What in the other questions concerning these terms and Wikipedia articles is missing to make this distinction?
Comment: I'd need to see the term in use, but my guess would be that VPW is PWM, but with a variable frequency.
Comment: @JarrodChristman Pretty much exactly that.
Comment: @jippie: They are two different modulations of SAE J1850 (OBD-II protocol).
Comment: Where did you find the terms? (esp. VPW)?
Answer: The word 'width' in Pulse Width Modulation is a bit misleading. PWM actually encodes an analog value as the ratio of High or On time ('pulse width') to the total period of a rectangular waveform.
VPW is another name for Pulse Length or Pulse Duration Modulation (PDM). It encodes an analog value in the absolute width of the pulse. The period between pulses is unimportant.
PDM is used in RC servos, which typically respond to a pulse width varying from 1 to 2ms. The nominal repetition frequency is 50Hz (20ms between pulses) but most servos will work between 40~70Hz - and some go up to almost 500Hz (the theoretical maximum repetition frequency of a 2ms pulse).
Comment: According to the Alliance for Telecommunications Industry Solutions (ATIS) PWM is deprecated and replaced by PDM, but almost everybody still calls it PWM. J1850 VPW uses a form of PDM that alternates high and low pulses (end of high pulse is start of low pulse and vice versa). J1850 PWM encodes each bit in a pulse whose width is 1/3 or 3/2 of a fixed period (similar to 'regular' PWM).
Comment: But [Pulse Duration Modulation](https://en.wikipedia.org/wiki/Pulse_duration_modulation) in Wikipedia redirects to PWM...
Comment: That comment explains very well what I wanted to know. But since I did a generic question, I accept your answer as-is. Thanks!


Boss keeps saying there's no money for payroll

Question: I've been working at my job for 1.5 years now. Right after I was hired, my coworkers told me horror stories about the 'early days' when they all took pay cuts/furloughs to keep the company afloat. Although they acted like these stories were in the distant past, there have been several red flags that the company is still on shaky financial ground. Most recently, my boss (very unprofessionally, imo) told me in casual conversation that he didn't know if he could make payroll this month. It's odd to me because two people have quit since I started and they were both making significantly more money than I do so that overhead is gone...shouldn't we be OK financially? To top all of this off, company morale is terrible. My boss can be very combative and difficult, even in casual conversations. The work is highly stressful and we often work nights. This is my first job out of school and I think it's safe to say I'm completely burned out. I've been looking for other jobs but haven't had any luck so far. I'm honestly panicking at this point...I'm living paycheck to paycheck and am really reliant on a steady income...mainly as a result of my significant student loans. I guess I'm wondering if anyone out there has dealt with a similar situation and has any advice.
Comment: You should get your resume out in the wind, honestly.  Not sure if this sort of question is on topic, though...
Comment: This site exists to ask questions that have practical answers, it's not a place to vent nor is it a forum.
Answer: If you find out that you might not get paid, then you update your CV and apply everywhere to find a new job.
The way you describe your boss, that's not just something that makes it unpleasant to work for him, that's also something that makes it unpleasant to do business with him, so his income will tend to dry up, which explains why he cannot make payroll.
And looking for other jobs isn't based on luck. Take your CV to someone who is good at writing CVs (ask around in your family or ask friends, or have it done professionally). At the very least, look at your CV and ask if you would hire that person. If not, then rewrite your CV with the attitude "I'm great and you should hire me, and here's why...".
Answer: We obviously can't tell how your company is doing, but going on the information you've provided:
You are describing my previous job almost exactly (except for people quitting, in my case they were let go). I'll echo other answers to update your CV and get back out looking for a job.
1: Your boss can't pay his staff and you have to work (presumably unpaid) overtime? This suggests he doesn't have a viable business.
2: Stressful work? You don't go into detail here, but if it's anything like my case: unhappy & demanding customers? Everything going wrong and you're run off your feet trying to fix it? Possibly even you might have to deliver products / services that might be out of your company's established skill set. Stressful work is part of a job, but it should only be occasional (e.g. important deadlines approaching), not a constant of the job. If it's continuously happening then it's a sign the company is struggling, and has dug itself into a hole that is very difficult to get out of.
Most customers don't get unhappy for no reason. It's usually because your company is in over its head and so can't provide the products/services that they agreed to provide with good enough quality.
3: Difficult/unapproachable boss, bad morale. I'm making a few assumptions here (small company, he represents the majority of management) but it sounds like bad management within the company.
4: Your personal sanity is suffering. This alone should be enough to make you leave.


For a while or in a while

Question: Ok so... My friend and i used to walked to school sometimes but we haven't done that recently.
I messaged him " we haven't walked in a while "
He replied " for a while* "
And now we're arguing over it.
Which is correct?
Thanks
Comment: The correct thing to do is get better friends who don't message you to correct your diction.
Answer: I've heard both, but I believe "in a while" is more commonly used in this case.
"... in a while" would be used more for things that are not actively occurring, to denote the time since it last happened or until it will happen again.
"... for a while" would indicate how long something happened or has been happening.
Think of how "a little while" would be used in the same example.  "I will walk in a little while" would mean that I'm not walking now, but will relatively soon.  "I will walk for a little while" would mean that I'll start walking (probably soon) but I won't walk for a long amount of time.

For a while or in a while


Error on installing .apk file with version 2.1

Question: I just worked my Android application with device (HTC Magic) version 1.5 and it loads properly and when i try to load the same application  with the other phone by installing the .apk file of version1.5 with android version 2.1  and kernel version 2.6.29 omap1 but now i couldnt find my application getting installed on my device...
I have sent a link to view the screenshot for error http://img137.imageshack.us/img137/6411/img0981jw.jpg.
In the screenshot you can see Quadmon icon on top and it says it can not install app in Korean.
I have just followed the instructions given in this link  (http://www.waxworlds.org/edam/software/android/how-to-install-an-apk-on-your-android-device) to install .apk file into my htc magic phone.
Is there any other way to get distributed my apk file into the device?
Answer: Look here :) : http://developer.android.com/guide/developing/device.html


What does "were on" mean in this context?

Question: She lifted her head like a queen when those earings "were on".
I really want to know the meaning of "were on" in this sentence.
Comment: "earrings were on" is not a complete sentence. Max's answer might be right, but we don't really know without more context. For example, if the complete sentence were "Jane's earrings were on the far side of tasteful," it would mean something completely different.
Answer:
on

b :  in or into a position of being attached to or covering a surface; especially :  in or into the condition of being worn <put his new shoes on>

In other words, the earrings were on means she was wearing earrings.
Similar examples are

The man had a cap on.  (The man was wearing a cap.)
Do you have shoes on? (Are you wearing shoes?)
She has pants on. (She is wearing pants.)


Looking for log file after QGIS startup crash

Question: I have a problem with QGIS 1.8 with OSGEO4W installer (windows 7 - 64 bit).
QGIS crash on startup, it shows the splash screen and then nothing.
I have updated from an old 1.7.4 QGIS version.
I have done the same procedure in a portable computer and it works fine.
The problem is only in the workstation.
Is there a log file to view what the problem is?
Comment: try unistall and reinstall. is your workstation old? perhaps it is not 64 bit or windows 7.
Comment: I have tried to uninstall and reinstall QGIS and then OSGEO4W completely, but the problem doesn't solve. My workstation is relatively new, 64 bit windows 7 service pack 1, I have just controlled in control panel.
Answer: Today i stumbled on the same problem (Win 7 64-bit, QGis 1.8.0). In search of a solution i disabled all plugins (in the registry), deleted the .qgis folder, Qgis registry entries and reinstalled, but nothing helped. However, i had QGis working just fine about a week or two ago. My QGis was crashing when the splash screen displayed "Starting python" (or something similar) and i remembered that i recently upgraded from Python 2.7.2 to 2.7.4.
So, i reinstalled python 2.7.2, changed environment variables to point to python 2.7.2 and now my QGis works again. Check your python version, you might have the same problem.
Comment: Great, the problem was this, thank you very much. I have disinstalled all version of python and purged every reference in register, and now QGis start again. Now I need only to reinstall Python 2.7.2. Thank again.
Comment: @AlessandroBattistini :
I'm glad you got things sorted out :) I would be grateful if you marked my answer as the accepted solution, if it helped you out :)
Answer: You may have to delete your .qgis folder. Usually under c:\windows\users\. See also: https://gis.stackexchange.com/a/57335/3438
Comment: I have deleted .qgis folder in C:\Users\Alessandro. I have also tried to remove the registry key KEY_CURRENT_USER\Software\QuantumGIS. When I launch QGIS, it re-create the folder and the key but doesn't start.
Answer: I had a similar issue and I just solved the issue with Nathan W (a real Guru!). I had a file called path.txt in my c:\ and this caused QGIS-Dev build to fail (Lisboa worked fine though).
Just rename the file (c:\path.txt) if it exists. Also install OSGEO4W in admin.
See QGIS Dev install issues for details.


Delete questions to prevent down-votes

Question: Is it possible to delete a sensible but poorly asked question to prevent down-votes?
Comment: If you improve your poorly asked question, you might receive a couple of reverts.
Answer: You can if it does not have any upvoted or accepted answers. But you risk a question ban if you do it more than once.
The better approach is to try to improve your question.
Comment: *more than once*, [citation-needed]
Comment: @AmitJoki: The algorithm of the ban is secret. So there is no concrete post for this. But it is commonly known that deleted post works towards the ban.

Delete questions to prevent down-votes


Price Elasticity for a group of products

Question: I am given a list with items and corresponding prices and units sold. Those items can be clustered into product groups. For most of the items, between 2 and 3 different prices can be observed. This seems to be very little information to calculate a price elasticity of demand for the different items. An idea I had is to take all of a groups' items, normalize the prices and use all the data points to calculate the elasticity of demand. Since this topic is new to me, I would very much appreciate some feedback whether this approach makes sense or not.
Answer: It would make sense if the products/items are homogenous (same) eg. different brands of milk, bottled water etc.
If they are heterogenous then each product demand will have different elasticity so trying to calculate elasticity out of multiple heterogenous products does not make sense.
Also, do not forget price and quantity demanded are endogenous, so when you are estimating your demand function to get the elasticity you need to account for reverse causality.
Comment: Thank you very much for your answer. Regarding your comment about reverse causality. When I observe a price increase of a retailer aiming on increasing the margin and not due to higher (marginal) costs or due to a competitor increasing its price, I supply is supposed to be constant and I am not facing this issue, right? Thanks
Comment: @PatrickBalada there is also problem of demand not being constant across time (unless you have just cross-section data all collected at the same point of time). In that case you can observe increase in price together with increased quantity sold even if in fact what was that demand shifted left so it was not effect of price on quantity but shift in demand. If you have cross-sectional data it would be easier to justify but there you still have problems with expectations -marginal costs did not changed now but maybe the seller expected them to change next time period so they already hiked prices
Comment: Thank you! I accepted your answer :-) One last question. From your experience, how bad is ignoring the reverse causality and simply fit a regression model on historic data (price, number of sold items, ...). I have the impression that a lot of companies do not use instrumental variables or simultaneous equations to infer price elasticities and set optimal prices.
Comment: @PatrickBalada it's extremely bad. Ignoring reverse causality means you will not be able to discover true relationship between price and sales. Ignoring reverse causality could only make sense when you do short run forecasting (although even there state of the art structural model may perform better especially when you forecast more than just few days/weeks ahead). If you want to use the model for strategic pricing decisions then don't even bother if you ignore this issue. I know many business are not aware of this - consequently many business make poor strategic decisions based on the model
Comment: But times are changing, for example one of the professors that taught my PhD econometrics now set up a consulting business in amsterdam where he offers to do this sort of more complex data analysis for business and he always says his business is booming and before he gets involved business usually use bad models as you say so there is a lot of money to be made in this industry because estimating demand is important for optimal pricing decisions and those are important for profitability.


My alarm key box dont work on a 1996 toyato Avalon

Question: I replace the battery the key box, and It still doesn't work.
Its a factory alarm in my car. Can I get a replacement for this, Due to the year of the car. 1996 Toyota Avalon.
Comment: Welcome to Motor Vehicle Maintenance & Repair! Do you have a second key fob? If so, does it work?
Comment: No. I just purchase the car last month @ an Action. I only had the one key to start the car and the alarm box.
Comment: Did the current key fob ever work for you?
Comment: I have no clue what you're talking about.  I only had the one key to start the car and the alarm box. (the remote for the alarm and it doesn't work ..with a new battery)
Comment: I know what you're talking about. I never had a key fob.
Comment: What do you mean "Alarm Box"? I have never heard the term. If you are referring to the little device with buttons used to lock/unlock doors and arm/disarm the alarm, that is called a key fob. (http://searchsecurity.techtarget.com/definition/key-fob) If you are referring to something else, please explain or provide a picture.
Answer: The key fob probably needs to be programmed to the car again. The below procedure should work for 2003-2008 Avalons.
Procedure To Program Toyota Wireless Remote Transmitters:
Begin with: The driver's door open and unlocked. Key out of the ignition.

Insert and remove the key from the ignition switch 2 times within 5
seconds.

NOTE: Steps 2 and 3 should be performed within 40 seconds.

Close and open driver's door TWICE.
Insert the key in the ignition and remove it.

NOTE: Steps 4 - 6 should be performed within 40 seconds.

Close and open the driver's door twice.
Insert the key in the ignition.
Close the door.
Turn the ignition switch from "Lock" to "On" and back to "Lock" 1 time.
Remove the key from the ignition.
To confirm you are in program mode, the power locks will now cycle "lock" to "unlock" 1 time.

NOTE: If Confirmation or Prohibition modes have been selected, opening the door will complete the procedure.

To Add a remote, do the following within 40 seconds

Procedure Lock confirmation:
A. Press both car transmitter Lock and Unlock buttons simultaneously
  between 1 and 1.5 seconds and release.
B. Within 3 seconds of step A, press the transmitter Lock button for
  more than 1 second and release.
If the keyless entry remote transmitter has been successfully
  programmed, the power locks will cycle "lock" to "unlock" once at this
  time.
If there are problems with the remote transmitter or the procedure up
  to this point, the locks will cycle twice. If this occurs, verify that
  you have received the correct transmitter, and then repeat the above
  procedure.
C. If multiple remotes are to be reprogrammed, repeat steps A and B.

Open the driver's door to conclude programming mode.

Source - How to program Toyota Keyless Remote Keyfob
Note: Some steps were removed to make these instructions specific to what you are trying to do. More detailed programming instructions are at the link.


How To Play FLV Files?

Question: Whats the best free video player that will play .flv files on my PC?
Answer: VLC is definitely the way to go on this one.  It will play almost anything you throw at it.
http://www.videolan.org/vlc/features.html
Comment: Agreed; I've yet to run across a file that makes VLC choke plus I can standardize my video player across platforms.
Answer: VLC is the best, and there is also a portable version for USB devices from portableapps.com
Answer: Media Player Classic or VLC.
Answer: Media Player Classic Home Cinema.
It has better support for Vista over the older version which has not been updated for over a year.  It is freeware, open source, very snappy and light on resources.
Answer: Unlike the rest of the known universe, I don't really like VLC, so instead I'm going to suggest mplayer - which I use to play everything.
Comment: worry not, you're not alone :)
Comment: Same here. I'd rather use Media Player Classic for my movie viewing.
Comment: mplayer != MPC :)
http://www.mplayerhq.hu/design7/news.html
Comment: I agree. In my opinion MPlayer is much superior to VLC as it is not only smaller but also faster and well-conceived. The console interface is just great. It is very easy to learn. You can even play movies in the framebuffer. VLC is slow and bloated while not giving any real benefits. :)
Answer: The open source KMPlayer will play FLV (along with pretty much everything else) without having to install additional codecs. Looks good too.
It's reviewed on the Gizmo's Freeware site.
Answer: VLC as well as Media Player Classic do the job just fine.
Answer: Desktop-based FLV player:
Microsoft Windows, Mac OS X, Unix-based
Adobe Media Player (freeware)
Media Player Classic (free software)
MPlayer (free software)
RealPlayer (freeware)
VLC media player (free software)
Winamp (freeware)
Answer: CCCP includes all codecs necessary to play FLV files (as well as most popular formats), and also comes with Media Player Classic, which is my favorite player.
Answer: SMPlayer is a free, open source front-end for MPlayer. It plays pretty much any media file under the sun and the subtitle features are superior to any other player.

A portable version is available here.
Answer: VLC's a great open source media player, but for Windows I prefer the KMPlayer's GUI, customization features and overall ease of use than VLC.
Like VLC, it can play almost anything you throw at it (including FLV files).
The KMPlayer in Wikipedia: http://en.wikipedia.org/wiki/K-Multimedia_Player
Note: KMPlayer is a Windows software and is freeware, but not open source.
Answer: Besides the previously mentioned really good players (like VLC media player which does work on very much platforms, and supports very much formats, or Media Player Classic Home Cinema, which also has 64 bit support), I can also suggest BS.Player (with e.g. Phoenix skin or Mgc3WMP skin, which are very nice).
This player also supports very-very many formats, and its subtitle correction and subtitle appearance customization options are very handy too, which is very important to me when watching films in other languages - in very many players, subtitle appearance customization is too complicated or oversimplified (I know VLC also has this capability, but I think it's a bit over-elaborated...).
It works only on Windows platforms (no Linux or Mac support) for the time being though (Windows 98/ME/2000/XP/Vista/Windows 7), but for Windows it's a really useful media player.
Phoenix skin:

Mgc3WMP skin:
Comment: @slhck: OK, thanks for calming me down, I thought someone would rate my comment as a spam or something for suggesting a player I like... :D Personally I use the free version of it, which is totally enough for my purposes. I only suggest the free one, I wouldn't recommend anyone to buy a player when there are perfect free alternatives on the market (like VLC, MPC-HC). :)
Comment: I edited in the links for you. Note that as per the [FAQ] you would have to mention any affiliation of a product you're recommending. So if that's the case, please add it.
Comment: @slhck: thanks for editing the post. BUT I don't really understand, why would I have ANY affiliation of this product?! I recommended a product which I personally like, and which I found really easy-to-handle. If you mentioned this rule under my comment, why didn't you do it under all the other comments in this thread too? :) Others also mentioned products THEY PERSONALLY LIKE, similarly to me.
Comment: Then it's perfectly okay, no worries! You wouldn't know, but every day there are quite a few promotional posts (the player you linked to has a paid version, that's why I asked).

How To Play FLV Files?


Choosing a tour of Europe

Question: My brother and I are looking at touring around Europe for about 3-4 weeks. We haven't done much travelling before, so we think that it could work out much better than if we tried to organise everything ourselves. Obviously I want to look at the price, accommodation, countries visited and activities included. Is there anything else I should be asking about before deciding to take a particular tour?
Comment: Duplicate? http://travel.stackexchange.com/questions/5733/what-is-the-best-route-to-do-europe-in-4-weeks
Comment: Hi Casebash, welcome to Travel.SE. Unfortunately, the question as you have left it right now is overly broad. Could you please edit it to list criteria or *what* exactly you are looking for before this question can be re-opened.
Comment: Good link: http://www.ricksteves.com/plan/tips/998tourtips.htm
Answer: Beside price + accomodation + countries + activities, you may want to know :

Your fellow tour member. Do they allow children or grandparents to join the tour? If you are a youngster, you may want to join tour for youngster also. Travelling with children and grandparent might annoy you. ( Grandparent = slow pace , children = noisy bus )
Do they have tour manager or tour guide? Tour guide will guide you in the city, Tour Manager does not. It means that if your tour only has tour manager, you need to plan where do you want to go.
Does the tour provide you with breakfast, lunch and dinner? Meal in Europe is quite expensive. Some tour only provide you with breakfast.
What is the procedure if you are missing the tour bus? Last time I have a fellow Japanese tour members that got lost twice and miss the bus.
Does the tour have extra activities? Some of the tour give option for you to pay more for extra activities. (For example : Moulin Rouge in Paris)
Can you extend your tour? Some of the tour able to be extended.

Choosing a tour of Europe


Counter example for limit

Question: I have a question,we know that limit of $3x$ when $x$ approaches $2$ is $6.$ We can prove that with epsilon and delta definition. Suppose I wrongly assume the limit is $7$ then by definition for some epsilon I must be unable to find a delta. What is that epsilon? Just trying understand the notion of limit using counter example. That is for what value of epsilon this fails? $|3x-7|< \epsilon$ whenever $|x-2|< \delta.$
Comment: Why didn't you mark any of the answers as correct?
Comment: Can I do that? I thought only those who have a higher reputation can do it. Never knew this.
Comment: No I'm seriously not trolling. I thought upvoting and marking answers as correct can only be done by people with high reputation. Thank you for letting me know.
Comment: No idea if you're trolling or serious, but it's disrespectful for people to use their time to answer questions without getting anything from it
Answer: In a more general setting: suppose that $\lim_{x\to a}f(x)=b$ and $c\neq b$.
Then $|b-c|>0$ so we can take $\epsilon:=\frac12|b-c|$.
The triangular inequality tells us that: $$2\epsilon=|b-c|\leq|f(x)-b|+|f(x)-c|$$
So whenever we have $|f(x)-b|<\epsilon$ we also must have $|f(x)-c|>\epsilon$.
Answer: Let epsilon = 1, so for any x such that $|x-2|<\delta$ then $|3x-7|<1$

Since $|2-2+\frac{\delta}{2}|< \delta $ it should $|3\cdot (2-\frac{\delta}{2})-7|<1$ or $|-1-\frac{3\delta}{2}|<1$ since $\delta>0$ then
we get $1+\frac{3\delta}{2}<1$ or $\frac{3\delta}{2}<0$ so contradiction.
Answer: I notice that two answers have offered two distinct values of $\epsilon.$
This reflects the fact that there is no such thing as "the" value of $\epsilon$ that you should use in a counterexample; there are many values of epsilon that you can use.
In the particular example you mention, whenever $x < 2,$
then $\lvert 3x - 7 \rvert = 7 - 3x > 1.$
Now let $0 < \epsilon \leq 1,$ that is choose any value of $\epsilon$ you like as long as it is positive and not greater than $1.$
Then there is no positive value of $\delta$ such that
$\lvert 3x - 7 \rvert < \epsilon$ whenever $\lvert x-2 \rvert < \delta,$
because no matter what positive value of $\delta$ we might try,
the value $x = 2 - \frac\delta2$ satisfies
$\lvert x-2 \rvert < \delta$ but not $\lvert 3x - 7 \rvert < \epsilon.$
Personally, unless there is a need to identify exactly when a statement is true and when it is false, I like counterexamples that are not "right on the edge," so in your particular example I'd probably set $\epsilon = \frac12$
rather than $\epsilon = 1.$ (Why $\frac12$? Because I want a number between zero and $1,$ so I might just split the difference.)
But that's just personal preference. You can set $\epsilon = 1,$ or you can set $\epsilon = \frac{1}{1000}.$

Counter example for limit


How do I get various peak values from a 2-D array or a matrix?

Question: I'm working on 2D array analysis or an image analysis and get to know the different block of peak values marked "circle" in attached plot [e.g. 2*2 matrix] of the 2D array [as shown in Fig. 01].

The image formation of the plot look like as Fig. 02
I visited the link https://stackoverflow.com/questions/3684484/peak-detection-in-a-2d-array/3689710#3689710 and use the following script
<code>#NOTE: I get the code from the link above
from scipy import *
from operator import itemgetter
n = 3  # how many fingers are we looking for
#d = loadtxt("paw.txt")
#data = [DATA of a 2d array]
width, height = data.shape
# Create an array where every element is a sum of 2x2 squares.
fourSums = data[:-1,:-1] + data[1:,:-1] + data[1:,1:] + data[:-1,1:]

# Find positions of the fingers.
# Pair each sum with its position number (from 0 to width*height-1),
pairs = zip(arange(width*height), fourSums.flatten())
# Sort by descending sum value, filter overlapping squares

def drop_overlapping(pairs):
    no_overlaps = []
    def does_not_overlap(p1, p2):
        i1, i2 = p1[0], p2[0]
        r1, col1 = i1 / (width-1), i1 % (width-1)
        r2, col2 = i2 / (width-1), i2 % (width-1)
        return (max(abs(r1-r2),abs(col1-col2)) >= 2)
    for p in pairs:
        if all(map(lambda prev: does_not_overlap(p,prev), no_overlaps)):
            no_overlaps.append(p)
    return no_overlaps

pairs2 = drop_overlapping(sorted(pairs, key=itemgetter(1), reverse=True))

# Take the first n with the heighest values
positions = pairs2[:n]

# Print results print(data, "\n")
for i, val in positions:
    row = i // (width-1)
    column = i % (width-1)
    print("sum = %f @ %d,%d (%d)" % (val, row, column, i))
    print(data[row:row+2,column:column+2])
</code>
The above script provides 2 adjacent matrix[2*2] of the same peaks.
<code>## 01: Local matrix of the peak
sum = 0.002482 @ 128,190 (65342)
[[0.0006202  0.00062187]
 [0.00061926 0.00062093]]
## 02: Local matrix of the peak
sum = 0.002479 @ 128,191 (65343)
[[0.00062187 0.0006184 ]
 [0.00062093 0.00061746]]
</code>
Also, I've tried with varying 'n' and no. of rows and columns but it gives me different local matrix for the same peak (probably I missed something) which does not match with my expectation. I want to find local peaks or a number of local maxima as shown in fig. 01 and Fig. 02. How can I get the local maxima efficiently? Can anybody help me in this regard?
Comment: Do you mean finding a pair of indices, $n, m$ so that $y[n,m] > y[n\pm1, m\pm1]$?
Comment: Yes, a pair of indices with data (inside the 2 blobs but I got pair of indices inside 1 blob). In Fig. 02, I want to find two local maxima of size [P*Q] from the 2 red blobs encircled. However, I got the 2 maxima of size [2*2] at location (128,190) & (128, 191) that represents 2 maximum data block but located in the same blob.
Comment: Please don't cross-post. https://stackoverflow.com/q/71175329/7328782
Answer: Look at the 1d function findpeaks. It is well documented.
All needed is to implement those simple ideas in 2d.
Mostly the minimum distance between 2 peaks.


sufficient condition for mean convergence in $L^1$:prove or disprove

Question: Let $f_n \; \colon (0,1) \to \mathbb{R} $ a sequence of Lebesgue integrable functions which converges almost everywhere in $(0,1)$ to $0$. Prove or Disprove: if there exists $p \in (1,+ \infty)$ such that $(f_n)$ is bounded in $L^p(0,1)$,then $\lim_{ n \to \infty} \int_0^1|f_n(x)| \, dx =0$.
Answer: I think the property is true and Egorov's theorem will help here. Fix $\varepsilon >0$. Since $f_n \to 0$ a.e., there is a set $E \subset (0,1)$ such that $\lvert E\rvert < \varepsilon$ and $f_n \to 0$ uniformly on $(0,1)\setminus E$. Now fix $\delta > 0$ and $N$ large enough that $\lvert f_n \rvert < \delta$ on $(0,1)\setminus E$ whenever $n \ge N$. Then for $n \ge N$, \begin{align*} \int^1_0 \lvert f_n(x)\rvert dx &= \int_{(0,1)\setminus E} \lvert f_n(x)\rvert dx + \int_E \lvert f_n(x)\rvert dx \\
&\le \delta \int_{(0,1)\setminus E}dx + \lvert E \rvert^{1/q}\|f_n\|_{L^p(0,1)}\\
&\le \delta + \varepsilon^{1/q}M
\end{align*} where $M$ is the bound on $f_n$ in $L^p(0,1)$, and $q$ is the dual exponent to $p$. Since $\varepsilon$ and $\delta$ are arbitrary, this shows that $\int^1_0 \lvert f_n(x)\rvert dx \to 0.$
Answer: For future readers: this answer is a failed attempt at a counterargument.  I'm leaving it here instead of deleting it since I think my faults here can be instructive.  Read the comments below for more detail.
Here's a modification to what I posted earlier:  let $f_n:(0,1)\to\mathbb{R}$ be defined by
$$
f_n(x) =\begin{cases}
n\ln(n), & \text{if} \;\; x\in\left(0,\frac{1}{n}\right)\\
0, &\text{otherwise}
\end{cases}.
$$
We see that the $f_n\to0$ point wise, however we find that
$$
\int_0^1 |f_n|dx = \frac{1}{n}\cdot n\ln(n) = \ln(n).
$$
Comment: @Mnifldz Each function is in $L^p$, but the sequence is not bounded in $L^p$ since $\|f_n\|_{L^p} \to \infty$
Comment: @GiuseppeTenaglia The question seems to be this: assume that $f \to 0$ a.e and $(f_n)$ is bounded in $L^p$ for a fixed $p \in (1,\infty)$. Prove or disprove that $\|f\|_{L^1} \to 0$. If that is indeed the question, then my above answer proves that the property is true.
Comment: @Mnifldz no problem! Glad we could resolve this
Comment: hmmm, interesting. I posted what I think is a valid proof, so either this sequence isn't bounded in $L^p$ for any $p > 1$, or I made a mistake.

EDIT: This function sequence is not bounded in $L^p$ since $\|f_n\|^p_{L^p} = n^{p-1}(\ln(n))^p$
Comment: @User8128 I believe these functions are $L^p$ bounded because they are essentially step functions.  I believe we can show that $||f_n||_p= n^{\frac{p-1}{p}}\ln(n)$.
Comment: My question was for $p \in (1, \infty )$
Comment: @User8128 Thank you for this.  I'm a little rusty in my analysis so this is helpful for me.  Sorry my answer wasn't sufficient.


Calendar overlays sharepoint 2010

Question: I have created calendar overlays with the colors I want by overriding CSS.
example following
How can I change the color dropdown list item names.
is it possible ?
 Screenshot attached.
Answer: Display the calendar that you wish you change the 'dropdown' name.
Click MODIFY VIEW
In the settings   VIEW NAME   change it to what you would like for it to show in the dropdown.
lq
Comment: I screenshot I have named the dropdown for which I neet to change display items. Its color list. I am not getting your answer.
Answer: I made a calendar in SharePoint 2013, where the user can select a category and e.G. category1 I changed the color to red. So I only needed one Calender without the overlay stuff.
If you need more information about it you can check my blogpost.
It is in German, but the scripts and the formular should work. You can give it a try, if this solution will work for you and test it in the SP2010 Environment.

Calendar overlays sharepoint 2010


handling Callable, CompletableFuture and Flux

Question: As of spring 5 seems like Flux/Mono can be also be a returned value of spring rest controller method.
I looked at spring reference guide 4.3 and read a pretty nice description of how Callable and DeferredResult are handled (https://docs.spring.io/spring/docs/4.3.x/spring-framework-reference/htmlsingle/#mvc-ann-async)
I also read on some blog posts that CompletableFuture can also be returned from controller methods. If it is true than can anybody shed some light how
CompletableFuture and Flux/Mono are handled in Spring MVC ?
Are they handled more less the same way as DeferredResult/Callable, i.e. "processing" done in an external thread and then Spring MVC dispatches the request back to DispatcherServlet (so the HTTP Response is written to and flushed on servlet container thread)
Answer: Indeed, as of Spring Framework 5.0 Spring MVC can handle Publisher-like return types in controller handlers. Depending on the cardinality of the returned type (one or multiple possible values?), Spring MVC will handle it with:

a DeferredResult if returning a single value
a DeferredResult<List<?>> if it's returning an asynchronous collection, collecting all elements in a list
a ResponseBodyEmitter or SseEmitter if you're streaming data to the client

Now the underlying processing model is using Servlet 3.0 async support, moving the blocking I/O operations to a non-container thread, dispatching back to the container when it's done.
On the other hand, Spring WebFlux is fully asynchronous and non-blocking (using Servlet 3.1 support for Servlet containers); in that case, fewer threads will be used.
More on that in the reference documentation.
Comment: thx a lot. Based on last paragraph of https://docs.spring.io/spring-framework/docs/current/spring-framework-reference/web.html#mvc-ann-async-reactive-types does it mean that spring MVC uses SyncTaskExecutor for writing to ServletResponseOutputStream (to not block "event-loop thread") but at the same time this particular executor shall not be used on production ? So In spring mvc if i wanna use reactive types as controller return methods shall i explicitly configure MVC TaskExecutor ? Why MVC TaskExecutor does not need to be configured for DeferredResult in Spring 4.3 ?
Answer: This video nicely explains what's going on in spring mvc https://www.infoq.com/presentations/servlet-reactive-stack. Simply startAsync is used to resume(dispatch) to servlet thread to write (in a blocking way) to servlet response.


Semantic analysis for C language

Question: I've been searching for a semantic analyzer for C language lately, but couldn't find any. I've found flex and yacc C language files to generate a parser. I've managed to modify them and generate a parser. But now i need to perform next step. I'll appreciate if someone could point me to some examples of semantic analysis for C and building the tree. Any information about semantic analysis will be helpful either. I've found some tiny C compilers but they use their own parsers so they doesn't suite me.
Comment: This link may help you : http://www.cs.sjsu.edu/faculty/louden/cmptext/
Answer: Our DMS Software Reengineering Toolkit and its C Front End probably provide what you need.
DMS provides general purpose parsing, tree building, and program analysis machinery.  The C front end specializes this for the C language.   It handles many common dialects/variants of C (GCC, Microsoft, Green Hills) with their dark corners, parses and builds ASTS, builds control and data flow graphs, points-to analysis as well as global call graphs accounting for indirect function  pointers.
You can try to do all of this yourself, but you'll find it takes man-years to get all this right.

Semantic analysis for C language