text:
Q: Help with installing Hope in Ubuntu I am quiet new to ubuntu OS. It would be of great help if someone could suggest and explain the commands in installing Hope software.The manual provides the following steps:
I.  To install hope, follow the procedures described below.
1. To install hope, make a bin directory under your home
   directory. Suppose that the home directory is ~cad and
   the source code of hope is under the directory
   ~cad/etg/hope.

2. Go to the directory hope.
   "cd ~cad/etg/hope".

3. To compile hope, type "make".
   An execution file "hope" will be created.

4. Copy or symbolically link hope to the directory ~cad/bin using
   "cp hope ~cad/bin" or
   "ln -s hope ~cad/bin/hope".

II. Before using hope, each user should set the following
    two environment variables as described below.
1. Set  your path (or PATH) environment variable to include
   ~cad/bin in your search path. This variable, in general,
   can be found in your ".cshrc" file. For example, the line

   set path = ( .... ~cad/bin)

   includes ~cad/bin to your search path.

2. Set the HOPE_MAN environment variable to indicate the
   directory hope, where the on-line manual of hope is
   located, using the setenv command as shown below.

   "setenv HOPE_MAN ~cad/etg/hope"

   If you use hope frequently, add the above command to your
   ".cshrc" file.

A: The manual should also tell what to put in the ~cad/etg/hope directory.
All the listed commands should be typed at the Terminal prompt. Hold CTRL and ALT keys, then press T - that will open a Terminal.
Each command needs a press on ENTER at the end, this to get it executed.
Note that ~cad in the description above may be directly replaced by $USER - and the instructions will work directly (with that change).
So "cd ~cad/etg/hope"  becomes cd $USER/etg/hope
Create the hope directory, if it doesn't exist:
mkdir -p $USER/etg/hope
Create the bin directory, if it doesn't exist:
mkdir -p $USER/bin
This more complex command will tell which file that contains "PATH" (the portion before ':' is the name).
cd; grep PATH .* 2>&1 | grep -vE 'dir|denied'
You need to edit that file and append :$USER/bin to the end of the line that contains PATH=
To edit the file, type
nano name_of_the_file
With nano running; the bottom of the screen will contain keys to press to access functions in nano - i.e. saving the file, and exiting nano.
Note that ^ denotes holding down CTRL and pressing the listed key.
If the 'complex command' above doesn't print anything, then there is NO file that contains PATH; then type:
echo >>.bashrc 'set PATH=$PATH:$USER/bin'
note the use of '-quotes, this is an important difference here.
Then:
setenv HOPE_MAN $USER/etg/hope
... add it to the end of the same file (on a new line) as where you put PATH e.g. with
nano .bashrc
... if that is where PATH ended up.


text:
Q: Magento 2: Bulk update "This item has weight" flag for all products? Im using shipping method "Weight vs. Destination". For this all items need to have a weight. I can bulk update the weight for all the products but i cant bulk update the flag "This item has weight".
I searched online and found some articles but none of them have a clear solution. Kindly help.

A: I finally found out that there is no easier way to do this.
The only easier way this can be done is to replace directly in the database.
The other workaround for this is to change the values from 0 to 1 for all the instances of product_has_weight in the below to files.
.\vendor\magento\module-catalog\Ui\DataProvider\Product\Form\Modifier\General.php
.\vendor\magento\module-catalog\Model\Product\Edit\WeightResolver.php

Finally go to Catalog->Products in Magento admin and bulk update all the product you want to change. Thanks it.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Check time of existing PendingIntent in AlarmManager Is it possible to query the Android AlarmManager for the time of the next alarm for a given PendingIntent?  I know I can cancel one using the .cancel(PendingIntent) function, and I can update one using .set(), but is it possible to "query" one?  I use something like this to see if one is already scheduled:
    PendingIntent sender = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_NO_CREATE);

If sender == null, then one is already scheduled.  I'd really like to know "for what time?" if possible.
I know I could save this in a database or other location, when I set it, but I'd really like query "the official source" to be sure.  Possible?

A:
Is it possible to query the Android AlarmManager for the time of the next alarm for a given PendingIntent?

Unfortunately, no. 'AlarmManager' is a write-only interface.


text:
Q: Oracle, trigger to control link between tables I need to create a trigger to control a link between tables. I have the following table structure (image below). an item is linked to a budget and a structure, and this structure should be linked to the same budget.
Sometimes the item receive wrong structures, receive structures different from its own budget budget. I need that when you insert a budget item or edit a budget item to be validated if the id_budget are equal, the id_budget of dg_budget_item is equal to the id_budget dg_budget_structure to which it is being linked

I started building this trigger, but do not know how to continue
CREATE TRIGGER T_BUDGETO_STRUCTURE_ITEM_ID_STRUCTURE
  BEFORE INSERT OR UPDATE OF id_budget_structure ON dg_budget_structure_item
  select id_budget from dg_budget_structure where id_budget_structure = new.id_budget_structure
  FOR EACH ROW
     WHEN (new.id_budget <> ???(result of select?))
  pl/sql_block

A: This should get you close to what you want
CREATE OR REPLACE TRIGGER T_BUDGET_STRUCTURE_ITEM_ID_STRUCTURE
   BEFORE INSERT OR UPDATE OF id_budget_structure ON dg_budget_item
   FOR EACH ROW
DECLARE
   v_id_budget_structure   NUMBER;
   Budgets_do_not_match    EXCEPTION;
   v_code                  NUMBER;
   v_errm                  VARCHAR2(64);
BEGIN
   SELECT id_budget INTO v_id_budget_structure FROM dg_budget_structure WHERE id_budget_structure = :new.id_budget_structure
   IF :new.id_budget <> v_id_budget_structure THEN
      RAISE Budgets_do_not_match;
   END IF;
EXCEPTION
   WHEN Budgets_do_not_match THEN
      Raise_application_error (-20001,
         'Budget '||TO_CHAR(:new.id_budget)||' for structure '
         || :new.id_budget_structure || 'does not match the budget trying to be linked';
   WHEN NO_DATA_FOUND THEN
      Raise_application_error(-20002,
         'Invalid budget structure ' ||:new.id_budget_structure);
   WHEN OTHERS THEN
      v_code := SQLCODE;
      v_errm := SUBSTR(SQLERRM, 1 , 64);
      Raise_application_error(-20000,
         'Unexpected error ' || v_code  ': ' || v_errm;
END;

You cannot ROLLBACK within a trigger so your application will need to deal with that.


text:
Q: I need mysql sink connector jar file to pull data from kafka I need mysql sink connector jar file  to pull data from kafka which contain the SinkConnector.class file

A: There's no such thing as a "MySQL sink connector jar".
There's Confluent's JDBC sink connector, which can be found from Confluent Hub website. This can be used with most databases offering JDBC drivers. It can also be used in any Kafka environment, not only Confluent Platform/Cloud.
Then there's the MySQL JDBC Driver JAR, which can be downloaded from MySQL website... but different drivers exist based on the server version, so make sure you get the correct one


text:
Q: Unique count through Pivot I need to count the unique occurrences of brands in a database.
My database looks like that (see below "database"): country in column A and trademarks in column B (here A, B or C). Some brands are duplicated and mentioned twice in one country. I need one list with the count of unique brands per country (see below "results needed"). Excel 2007 does not include "Count unique" in the pivot functions. Any idea how to do that?
Database

Afghanistan  A
Albania      B
Albania      B
Albania      A
Albania      C
Albania      D
Algeria      A
Algeria      A
Algeria      B
Algeria      C

Results needed
Count of unique brands
Afghanistan   1
Albania       4
Algeria       3

A: Use Data > Remove Duplicates before creating the pivot table.


text:
Q: how to replace text ($) with quotation marks in a text file by using powershell I am trying to replace the text ($) with quotation marks in a text file by using PowerShell
Here is the code I am trying, But not giving expected results:
$FilePath = "C:\PT\Test\"
Get-ChildItem $FilePath -Filter *.TXT | ForEach-Object {
(Get-Content $_.FullName) | Foreach-Object {
 $_ -replace  ',"$"', ',"$",'
} | Set-Content $_.FullName
 }

A: The -replace operator:

*

*uses a regex as the search-pattern operand, and therefore requires a verbatim $ to be  escaped as \$ in order to be interpreted as such (an unescaped $ is a regex metacharacter representing the end of the input string)

*also uses $ as a metacharacter in the substitution operand, namely to refer to the text that the regex captured ($&) or parts thereof (e.g. $1 to refer to what the first capture group ((...)) captured). In this case, escape it as $$.

*

*Note: Situationally, even an unescaped $ may work, namely if, in combination with the subsequent characters, if any,  it cannot be interpreted as a placeholder such as $& or $1. However, in the interest of robustness it is better to escape.

Therefore, use:
PS> ',"$"20' -replace ',"\$"', ',"$$",'
,"$",20

Taking a step back:
As Abraham Zinala suggests, for verbatim string replacements, the .Replace() string method is sufficient, whose use doesn't necessitate escaping, and which is faster to boot:
PS> ',"$"20'.Replace(',"$"', ',"$",')
,"$",20

Caveat: Unlike -replace, .Replace() is case-sensitive - invariably in Windows PowerShell and by default in PowerShell (Core) 7+.
See this answer for a detailed juxtaposition of -replace and .Replace(), including how to perform escaping for -replace programmatically.

To put it all together, along with an optimization that reads each file in full, with Get-Content -Raw, for much faster processing (to avoid appending a trailing newline, -NoNewLine is used with Set-Content):
$FilePath = "C:\PT\Test"
Get-ChildItem $FilePath -Filter *.TXT | ForEach-Object {
  (Get-Content -Raw $_.FullName).Replace(',"$"', ',"$",') |
    Set-Content -NoNewLine $_.FullName
}

A: As pointed out by Abraham in his comment, the $ is a reserved character in regex known as Anchor, if you want to match a literal $ using -replace you would need to escape it: \$:
Get-ChildItem $FilePath -Filter *.TXT | ForEach-Object {
    (Get-Content $_.FullName -Raw) -replace ',"\$"',',"$",' |
    Set-Content $_.FullName
}

The other alternative is to use the .Replace(..) string method which will match literal characters.
Get-ChildItem $FilePath -Filter *.TXT | ForEach-Object {
    (Get-Content $_.FullName -Raw).Replace(',"$"',',"$",') |
    Set-Content $_.FullName
}

By looking at your code seems like you want to replace ,"$" with ,"$",, if this was not the case let me know.


text:
Q: Chrome for Mobile shows weird pixel like grid on elements that have background color of #505050 I've noticed some really strange grid that is sitting almost like background image on elements that have background-color: #505050 (shade of grey). Actually that grid is showing also when element has similar (near) hex value like that one.
Tested on couple of android mobile devices that have older version of chrome.
 Namely chrome-57.0-xxxxxxxxx.
The only thing that I've noticed is similar shades of gray are used by chrome developer tools.

.grey {
    overflow:hidden;
    height:300px;
    background-color: #333333;

}
.height500{

  height:500px;
}
.grey50 {

    height:150px;
    margin-top:50px;
    margin-left: 50px;
    background-color: #505050;

}
.size150{
   height:150px;
   margin-top:50px;
   margin-left: 50px;
   width: 150px;
}
.round {

   border-radius: 75px;
}
.grey55 {

    background-color: #555555;
}

 grey50

 grey50 round

 grey55

Can anyone confirm this and why would this be the case?


text:
Q: Batch file that aborts action if current date is not between specific dates I need an if else statement that aborts or continues the batch scripts.
if current date is between specified 2 dates it continues to work
if not, batch file aborts
for example i set the dates as 01.01.2019 to 01.03.2019, if the date is 15.02.2019 batch file works if 01.04.2019 it aborts
the closest answers are from here; In a batch file, how would I check if today's date is after a set date?
@ECHO OFF

SET FirstDate=2015-01-24

REM These indexes assume %DATE% is in format:
REM   Abr MM/DD/YYYY - ex. Sun 01/25/2015
SET TodayYear=%DATE:~10,4%
SET TodayMonth=%DATE:~4,2%
SET TodayDay=%DATE:~7,2%

REM Construct today's date to be in the same format as the FirstDate.
REM Since the format is a comparable string, it will evaluate date orders.
IF %TodayYear%-%TodayMonth%-%TodayDay% GTR %FirstDate% (
    ECHO Today is after the first date.
) ELSE (
    ECHO Today is on or before the first date.
)

and / or

@ECHO OFF
SETLOCAL ENABLEEXTENSIONS

REM -- 2 digit day
SET "_day=%DATE:~-10,2%" & REM day goes first (dd/mm/yyyy); if not, remove this line
SET "_day=%DATE:~-7,2%" & REM day goes second (mm/dd/yyyy); if not, remove this line
REM -- 2 digit month
SET "_month=%DATE:~-10,2%" & REM month goes first (mm/dd/yyyy); if not, remove this line
SET "_month=%DATE:~-7,2%" & REM month goes second (dd/mm/yyyy); if not, remove this line
REM -- 4 digit year
SET "_year=%DATE:~-10,4%" & REM year goes first (yyyy/##/##); if not, remove this line
SET "_year=%DATE:~-4%" & REM year goes last (##/##/yyyy); if not, remove this line

REM -- The variables below are set to year-month-day without separators (yyyymmdd)
SET "today=%_year%%_month%%_day%" & REM today's date based on your selections above
SET "compareDate=20180727" & REM the date you are comparing with today

REM -- Here's where the magic happens with comparing the two dates
IF %compareDate% LSS %today% ECHO The comparison date is in the past.
IF %compareDate% EQU %today% ECHO The comparison date is today.
IF %compareDate% GTR %today% ECHO The comparison date is in the future.
GOTO :EOF

A: The problem with %DATE% is that it returns the current date using the short date format, that is fully (endlessly) customizable. One user may configure its system to return Fri053119, and another user may choose 31/05/2019, which is a complete nightmare for a BAT programmer.
One possible solution is to use WMIC, the command line interface to WMI. See wikipedia's Windows Management Instrumentation.
wmic OS Get localdatetime returns the date in a convenient format to directly parse it with a FOR command.
So, for example, you could,
for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do set wldt=%%a
set today=%wldt:~0,8%

to obtain the current date in a convenient format to use it for dates comparison
so you later can
if %today% gtr 20190101 (
  if %today% lss 20190630 (
    echo Yes!
  )
)


text:
Q: PyQt6 Label is not updating with every iteration of for loop I'm a beginner in programming and I have a problem making a label on my GUI to change its text value to inform the user of word's meaning (working on English dictionary). I would like the label to update itself with every loop, and so to show all the the definitions of a given word. However, the program only updates itself once the entire for loop is completed, and displays only the last definition of a word.
I've learned that I should use a QTimer, and tried it as it's shown in documentation, but with no success.
I would appreciate any help of how to make the label to update itself. Thank you.
Here is the code I am using:
from PyQt6.QtWidgets import QApplication, QWidget, QVBoxLayout, QHBoxLayout, QMessageBox
from PyQt6.QtWidgets import QLabel, QPushButton, QLineEdit, QComboBox, QScrollArea
from PyQt6.QtCore import Qt, QTimer

import json
from difflib import get_close_matches

data = json.load(open("data.json"))

def translate(word):
    word = word.lower()
    if word in data:
        return data[word]
    elif word.title() in data:
        return data[word.title()]
    elif word.upper() in data:
        return data[word.upper()]
    elif len(get_close_matches(word, data.keys())) > 0:
        msg = QMessageBox()
        msg.setWindowTitle('Get close matches')
        msg.setText("Did you mean %s instead? Press Yes if yes, or No if no: " % get_close_matches(word, data.keys())[0])
        msg.setIcon(QMessageBox.Icon.Question)
        msg.setStandardButtons(QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No)
        msg.setDefaultButton(QMessageBox.StandardButton.Yes)
        ret = msg.exec()

        if ret == QMessageBox.StandardButton.Yes:
            return data[get_close_matches(word, data.keys())[0]]
        else:
            return "We didn't understand your entry. Please double check it."
    else:
        return "The word doesn't exist. Please double check it."

def translate2():
    output = translate(text.text())
    if type(output) == list:
        i = 1
        for item in output:
            output_label.setText("%s. %s" % (i,item))
            i+=1
    else:
        output_label.setText(output)

app = QApplication([])
window = QWidget()
window.setWindowTitle('Word Definition')

layout = QVBoxLayout()

layout1 = QHBoxLayout()
layout.addLayout(layout1)

layout2 = QVBoxLayout()
layout.addLayout(layout2)

text = QLineEdit()
layout1.addWidget(text)

btn = QPushButton('Convert')
layout1.addWidget(btn, alignment=Qt.AlignmentFlag.AlignBottom)
btn.clicked.connect(translate2)

output = QWidget()

output_label = QLabel('')
output_label.setFixedSize(600, 50)
layout2.addWidget(output_label)

window.setLayout(layout)
window.show()
app.exec()


text:
Q: How to launch activity and show specific fragment I have a MainActivity that has several fragments which are added and then shown/hidden. This is because the MainActivity uses a NavigationDrawer. Clicking on items in the drawer causes different fragments to be added (if they do not exist), or shown/hidden if they do.
My question is, how can I launch my MainActivity via an intent from a different activity, and at the same time show a specific fragment?
Would I have to pass some extra to my MainActivity and then based on that data, add/show/hide the relevant fragment? Is there another way?

A: When you create your Intent, you can give it an extra that determines the fragment to load.
Intent i = new Intent(this, ActivityClass.class);
i.putExtra("frgToLoad", FRAGMENT_A);

// Now start your activity
startActivity(i);

Now, inside your activity check the extra and load the right Fragment:
OnCreate(){
    ...

    int intentFragment = getIntent().getExtras().getInt("frgToLoad");

    switch (intentFragment){
        case FRAGMENT_A:
            // Load corresponding fragment
            break;
        case FRAGMENT_B:
            // Load corresponding fragment
            break;
        case FRAGMENT_C:
            // Load corresponding fragment
            break;
    }
}

A: You can use sharedPreference to achieve the goals. Save the index after you open you TAB/Fragment.
        //get current tab
        sharedPreferences = getSharedPreferences("MyPrefs", MODE_PRIVATE);
        String position = sharedPreferences.getString("tab_opened", null);
        if(position==null){
            viewPager.setCurrentItem(1,true);
        }else if(position=="0"){
            viewPager.setCurrentItem(0,true);
        }else if(position=="1"){
            viewPager.setCurrentItem(1,true);
        }else if(position=="2"){
            viewPager.setCurrentItem(2,true);
        }

}// <<<~~~ THAT IS END OF onCreate() method.

Please refer to this tutorial : OPEN THIS .

A: In case you are looking for something like this, hope so!
@Override
public void onNavigationDrawerItemSelected(int position) {
    Fragment fragment;
    FragmentManager fManager = getFragmentManager();
    Bundle args = new Bundle();
    args.putInt(MCConstants.ARG_SECTION_NUMBER, position);
    clearAllBackStack();
    FragmentTransaction fTransaction = fManager.beginTransaction();

    switch (position) {
    case 0:
        fragment = new FirstFragment();
        fragment.setArguments(args);
        fTransaction.replace(R.id.container, fragment,
                "FTAG").commit();
        break;
    case 1:
        fragment = new SecFragment();
        fragment.setArguments(args);
        fTransaction.replace(R.id.container, fragment,
                "STAG").commit();
        break;
    case 2:
        fragment = new ThirdFragment();
        fragment.setArguments(args);
        fTransaction.replace(R.id.container, fragment,
                "TTAG").commit();
        break;
    }
}


text:
Q: win32 PE encryptor = antivirus false positive I'm trying to protect my programs against cracking and reverse engineering.
I wrote programs in C++ (Visual Studio 2010) and I also wrote easy encryption algorithms in assembler. Algorithm is added to EXE file and make it harder to cracking, because is loaded before main program. This wasn't hard job.
But... now, I have a lot of false positives cca 50% on virustotal.com. I have also same problem when I'm trying use only upx packer :( ...Every time. I modified algorithms many times but without success.
Can you help me someone, please?
Thank you.

A: A new project called the Taggant is being developed (done now). This embeds a signed marker into the file that identifies the licensee of the packer, as well as the packer vendor. This will help to alleviate false positives, once it is done. Right now we are waiting for the CA agreement to be finalized, then for everyone to implement it (on both sides), so it will be a while.
To get any REAL action taken, you must join this group. If you are a legitimate vendor, I can help you join, but you must be a legitimate vendor. If this is to protect your malware or cracks, then obviously they wouldn't qualify you.
In the meantime, you can report false positives (or find where to report them) at the site dedicated to such - http://falsepositivereport.org
You can also MAKE SURE your files are Digitally Signed after compression/protection. The history of your digital cert will say a lot about how likely false positives might be.


text:
Q: sending sms from javascript or html Phonegap I am from Android background recently started working on PhoneGap I am having a trouble sending sms so can anybody help me with the same
I mean sending sms from javascript or html.
rightnow I am using this code
var link="sms:55555555?body=hssssssss"
window.location.href=link

Thanks in advance

A: It should work perfectly on plain HTML as below.
    Click to Send SMS

However with plain Java Script
   var link="sms:55555555?body=hssssssss"
   window.location.href=link

It not working Hope this helps


text:
Q: Project reference - Type or namespace name 'Library' does not exist in the namespace; target framework matches (Asp.net) I have a project that references several other Projects in the solution. Project.Web references Project.Library; this reference has existed forever, but some changes have been made to Project.Library and now I'm getting the error "The type or namespace name 'Library' does not exist in the namespace 'Project' (are you missing an assembly reference?)"
I checked the target framework of all of my projects- Project.Web, Project.Library, RedirectModule, and SitecoreEloquaConnector - all of them are set to Target Framework = .NET Framework 4.5.2
I tried deleting the reference and readding it but I still get the error.

A: You should remove the references and add them manually.When you click add reference,choose browse and look for the library dll.After that rebuild solution,and it should work.


text:
Q: PHPUnit: Class name conflict in custom bootstrapper I wrote a bootstrapper around PHPUnit_TextUI_Command so that I can run run a series of separate test suites when I don't pass any arguments to phpunit. The gist of the bootstrapper is this block:
// this->_default_tests is an array of argument sets.

$runner = new \PHPUnit_TextUI_Command;
if (count($_SERVER['argv']) == 0) {
    foreach ($this->_default_tests as $test_arguments) {
        $result = $runner->run($test_arguments, false);
        if ($result == \PHPUnit_TextUI_TestRunner::FAILURE_EXIT) {
            exit;
        }
    }
} else {
    $runner->run($_SERVER['argv'], false);
}

However, I'm having a major problem when I run the default test: phpunit crashes with the following error:

PHP Fatal error:  Cannot declare class MyOrganization\MyPackage\Tests\Unit\Filters\FilterTest, because the name is already in use in /me/MyOrganization/MyPackage/core/tests/Unit/Filters/FilterTest.php on line 24

I double-checked FilterTest.php and confirmed that the namespace declaration matches the expected namespace. Actually, this test runs without issue when I specify arguments to my runner, thus bypassing the default behavior I'm trying to implement.
PHPUnit defines a class of its own named FilterTest. There shouldn't be any conflict between PHPUnits classes and my own, and in fact there apparently isn't when I specify arguments to phpunit.
What is going on here and how do I fix it?
Acceptable alternate answer: Is there a way to configure a test suite so that it stops running after the first file or directory of tests that reports an error or failure? (This is what I'm trying to accomplish with the bootstrapper.)

A: You should write bootstrap file where you require your file before require autoload.php. And in phpunit.xml settings you should add attribute bootstrap with your bootstrap file.
PHPUnitBootstrap.php
require "FilterTest.php";
include_once "vendor/autoload.php";

and phpunit.xml
<phpunit bootstrap="PHPUnitBootstrap.php"><testsuites>.....


text:
Q: Automation using an intermediate file Here is the skeleton of what I am doing
#Code PHP
shell_exec("file1.py $args")

#code file1.py
var=sys.argv
..processing..
save to a file.txt

#code file2.py
read from file.txt
..processing..
final output

This is working fine, but my concern is if multiple people access the web page simultaneously the intermediate file may be over written.
Also, Both python files cannot be merged into one.
The data is generated dynamically and needs to be stored somewhere.
Is there a way to prevent over writing or some other way to pass data ?
I tried importing the variable but it doesn't work


text:
Q: C# Visual Studio Code: Building a Hello World executable I am attempting to build a simple hello world executable in Visual Studio Code and don't know what I am doing incorrect? and to explain I will go over my steps.
To start I was following the simple tutorial here https://learn.microsoft.com/en-us/dotnet/core/tutorials/with-visual-studio-code
Once I got down to the bottom I thought I would take my C# project and compile(or build) the project. Well I guess they don't go over this near the beginning because it's not real straight forward.
First of all I had to figure out that Visual Studio and Visual Studio Code do not share the same knowledgebase (at least when it comes to compiling).
The next thing is that visual studio code uses Tasks to build the executable, well at least that is what I got from this How do you compile a console application with VS Code (Windows platform)?
So what I did was
Step 1) Create new folder in windows explorer where I wanted my project to reside
Step 2) Open up visual studio and using the terminal navigate to the folder
Step 3) Type the command >>dotnet new console
Step 4) Type the command >>dotnet restore
Step 5) Make sure my code looks like
using System; //The using keyword is used to include the system namespace in the program

namespace HelloWorldApplication //A namespace is a collection of classes
{
    class HelloWorld
{
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
            Console.ReadKey();
       }
    }
}

After that I pressed F1 typed in "Run Build Task"
A prompt asking me to create a build task where I selected .NET core creating a tasks.json file
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
    {
        "label": "build",
        "command": "dotnet build",
        "type": "shell",
        "group": "build",
        "presentation": {
            "reveal": "silent"
        },
        "problemMatcher": "$msCompile"
    }
]
}

Now I press ctrl+shift+b select build and well nothing happens.
I went down to the terminal and typed dotnet build and got the following terminal response
d:\VS_Sandbox\HelloWorldApplication>dotnet build
Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for d:\VS_Sandbox\HelloWorldApplication\HelloWorldApplication.csproj...
  Generating MSBuild file d:\VS_Sandbox\HelloWorldApplication\obj\HelloWorldApplication.csproj.nuget.g.props.
  Restore completed in 134.6 ms for d:\VS_Sandbox\HelloWorldApplication\HelloWorldApplication.csproj.
  HelloWorldApplication -> d:\VS_Sandbox\HelloWorldApplication\bin\Debug\netcoreapp2.2\HelloWorldApplication.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.03

To which I go and look for my brand new executable and well nothing? I attempted to go take a look at the help on microsoft here https://code.visualstudio.com/docs/editor/tasks
but thought I was going to find how to use csc.exe in my tasks but I don't know how and I am not even sure I am supposed too?
If anyone knows what I am doing wrong please let me know.

A: Go to [program_name]>bin>debug>[the_only_foler_in_there] the executable should be there

A: I followed your all steps and it works for me.
1> Go command prompt
2> Go to folder .. bin\Debug\netcoreapp2.1
3> Run command dotnet HelloWorldApplication.dll


text:
Q: Android Local Tests vs Instrumented Test I'm trying to check if my API is available within a unit test, to be sure that it responds with 200.
Now, my problem is that I'm not really sure when to use Local Test and when I have to use Android Instrumentation Tests. I know that I have to use Instrumented Tests for UI testing but how to test the endpoint?
I use Retrofit2 for communication. And tried to test Endpoint in 2 ways with Local Tests.
Example 1 (synchronous, does not work)
public class EndpointTest {

    EndpointApi api;
    SimpleInjection simpleInjection;

    @Before
    public void setUp() {
        simpleInjection = new SimpleInjection();
        api = simpleInjection.getEndpointApi();
    }

    @Test
    public void endpoint_1_isAvailable() {
        Call<ApiResponse> rootCall = api.getRoot();
        try {
            int reponseCode = rootCall.execute().code();
            Assert.assertEquals(200, reponseCode);

        } catch (IOException e) {
            Assert.fail();
        }
    }
}

Example 2 (asynchronous, does work)
public class EndpointTest {

    EndpointApi api;
    SimpleInjection simpleInjection;

    @Before
    public void setUp() {
        simpleInjection = new SimpleInjection();
        api = simpleInjection.getEndpointApi();
    }

    @Test
    public void endpoint_2_isAvailable() {
    Call<ApiResponse> rootCall = api.getRoot();

        rootCall.enqueue(new Callback<ApiResponse>() {
            @Override
            public void onResponse(Call<ApiResponse> call, Response<ApiResponse> response) {
                Assert.assertEquals(200, response.code());
            }

            @Override
            public void onFailure(Call<ApiResponse> call, Throwable t) {
                Assert.fail();
            }
        });
    }
}

Do I have to use Android Instrumentation Test for asynchronous mode?

A: The decision of whether to run your tests on a local JVM on your development machine or on an Android device/emulator is not based on whether your code is synchronous or not. Usually you would only want to run unit tests locally, as it's a lot faster and allows you to use TDD. Your tests do network requests, so they're not unit tests per say, since they have the dependency on the server - they are integration tests. It's preferable to run integration tests on an Android device to get better feedback.


text:
Q: How do I extract column from CSV with quoted commas, using the shell? I have a CSV file, but unlike in related questions, it has some columns containing double-quoted strings with commas, e.g.
foo,bar,baz,quux
11,"first line, second column",13.0,6
210,"second column of second line",23.1,5

(of course it's longer, and the number of quoted commas is not necessarily one or 0, nor is the text predictable.) The text might also have (escaped) double-quotes within double-quotes, or not have double-quotes altogether for a typically-quoted field. The only assumption we can make is that there are no quoted newlines, so we can split lines trivially using \n.
Now, I'd like to extract a specific column (say, the third one) - say, to be printed on standard output, one value per line. I can't simply use commas as field delimiters (and thus, e.g., use cut); rather, I need to something more sophisticated. What could that be?
Note: I'm using bash on a Linux system.

A: Here is a quick and dirty Python csvcut.  The Python csv library already knows everything about various CSV dialects etc so you just need a thin wrapper.
The first argument should express the index of the field you wish to extract, like
csvcut 3 sample.csv

to extract the third column from the (possibly, quoted etc) CSV file sample.csv.
#!/usr/bin/env python3

import csv
import sys

writer=csv.writer(sys.stdout)
# Python indexing is zero-based
col = 1+int(sys.argv[1])
for input in sys.argv[2:]:
    with open(input) as handle:
        for row in csv.reader(handle):
            writer.writerow(row[col])

To do: error handling, extraction of multiple columns. (Not hard per se; use row[2:5] to extract columns 3, 4, and 5; but I'm too lazy to write a proper command-line argument parser.)


text:
Q: backbone overriding url for collection create Is it possible to change the URL that gets loaded when create() is called on a collection? I am doing it on models as noted here:
Backbone.js Model different url for create and update?
Here is an example of my collection code:
var GroupsCollection = Backbone.Collection.extend({
    model:Group,
    url:"/api/groups/get_all/",
    parse:function(res){
        return res.groups;
    },

    sync: function(method, model, options) {
        var methodUrl = {
            'add': '/api/group/create/'
        };
        if (methodUrl && methodUrl[method.toLowerCase()]) {
            options = options || {};
            options.url = methodUrl[method.toLowerCase()];
        }
        Backbone.sync(method, model, options);
    }
});

I coped the sync function from my model class (Group). I am using the key 'add' in methodUrl because the Backbone documentation says an "add" event is triggered when create() is called. I've tried "create" instead of "add" as well (doesn't work).
Calling create() always just loads the url: "/api/groups/get_all"
Help? Open to any ideas about best practices around this stuff too. Thanks!

A: Read the backbone.js source, you will find that: Collection.sync is only invoked by  Collection.fetch .  So your override doesn't work.  You should override  Model.sync in your Group model.

A: I'd highly recommend sticking with your original approach of overriding Backbone.sync. It sounds like the reason what you had didn't work is because you've set the url once in the collection and once in the model. You only need to -- and should -- set the url in either the model or the collection. If that wasn't the reason it didn't work, it definitely didn't work because backbone's 'add' method is called create. From the source:
var methodMap = {
  'create': 'POST',
  'update': 'PUT',
  'delete': 'DELETE',
  'read':   'GET'
};

A few simplifications to your sync override:
sync: function(method, model, options) {
    options || (options = {});

    if (method === 'create') {
        options.url = '/api/group/create/';
    }

    Backbone.sync(method, model, options);
}

None of the above really addresses the source of your problem though: Your server should be routing the request based on the HTTP verb. For example if you're POSTing, your server should route to an method that takes the incoming parameters and creates a new object from them. That will allow you set a generic /api/groups/ url on your Backbone collection, regardless of whether you're creating, reading, updating, or destroying.

A: I'd say it might be easier to read if you could folow the rest "convention" and let Backbone handle your URL with it's default. (It's pretty easy to switch on request.method in most servers).
Anyway, you could simply change the URL at creation time :
 groupCollection.create(
   {attr1: 'val1', etc: '...'},
   {url: '/api/group/create/'}
 ).save()


text:
Q: Given the orthonormal base of a given vector, find the coordinates of that vector on another base
In an orthonormal base, the coordinates of the vector $\vec{v}=(2,-5)$. Find the coordinates of $\vec{v}$ on the base $B=((1,-1),(0,-1))$

Attempt. Actually not 100% sure on what the intuition of a base in general is, I'm trying to understand it through exercises. Anyways, my attempt:
Any base $B$ is defined as $B=a\vec{x}+b\vec{y}$ where $a$ and $b$ are constants. If the base is orthonormal, it means the vectors that form that base form 90 degrees and have a length of 1. I related this base to the usual $\hat{i}$ and $\hat{j}$ one. On any case, I did: $$\vec{v}=a\hat{i}+b\hat{j}$$ and found $a=2$ and $b=-5$. The new base will have the same constants $a$ and $b$? Don't know at all if this method is valid but here it is: the new base is $B'=a(1,-1)+b(0,-1)$ and as we know $a=2$ and $v=-5$, $\vec{v}$ will be this? $$\vec{v}=2(1,-1)-5(0,-1)=(2,3)$$ which actually gives the right answer in the book but I'm afraid the procedure is bad or if I feel like I have some concepts wrong about bases.

A: 2 ways to do this.
One is to say $e_1 = (1,-1), e_2 = (0,-1)$  These are our basis vectors of $B.$
There exists some combination basis vectors such that $a e_1 + b e_2 = v = (2,-5)$
This provides a system of equations to solve.
$(a,-a) + (0,-b) = (a, -a-b) = (2,-5)\\
a = 2\\
-a-b = -5\\
a = 2, b = 3$
And, this is probably how your Prof. expects you do to solve this.
But, this is worth knowing.
$B = \begin{bmatrix} 1&0\\-1&-1 \end {bmatrix}$
$Bu$ will take a vector $u$ represented in the basis $B$ and translate it to the standard basis.
That means that $B^{-1}v$ will take a vector $v$ in the standard basis and represent it in terms of the basis $B$
The reason the method you use above gives the right answer is that in this case $B^{-1} = B$


text:
Q: .NET - Dynamically Loading App Configurations Based on URL I'm creating a business application in .NET using MVC4. The application will be used by multiple corporate customers, each possessing their own branding elements (including a stylesheet and logo image). The UI calls web services for a back-end platform in order to populate various regions of the application; customer-specific parameters must be provided when calling these web services.
My goal is to deploy a single instance of the application while making the application dynamically load the appropriate brand scheme and web service parameters based on a portion of the URL itself. The application will be a public-facing consumer application (hosted by my organization on behalf of the corporate customer), so the URL must be easy to remember (and thereby not rely on querystring parameters for access), such as https://mysite.com/companyname.
The intent is to provide a product with a single code base and feature set (making the product easier to support than having multiple distinct deployments for each corporate customer) while supporting a limited degree of branding. I'm OK with a small bit of manual operational setup (such as creating a new app.config, web.config, or virtual directory for each customer).
Can anyone recommend a suggested approach or best practices for implementing this type of application? Note that if the URL structure must be parsed, I'll need to ensure that the structure can be replicated properly in development, QA, and staging environments.
My current approach requires distinct deployments of the application to different customer-specific environments, with the custom branding and web service parameters referenced as "appsettings" keys in the web.config file, which is different for each customer. This is OK for a small number of deployments, but will get unwieldy as feature upgrades / bug fix pushes become necessary for tens or hundreds of customer sites. Thank you!

A: The easiest solution is to use a dynamic stylesheet for most of it.  There is an ok example here Dynamic CSS for ASP.NET MVC? and a full source example http://www.codeproject.com/Articles/171695/Dynamic-CSS-using-Razor-Engine
The rest of it is details.  You'll want to parse the company identifier out of the url (or cookie - useful for testing it in dev/qa).  You'll want to pull the customer specific values out of storage, database or config file whatever is appropriate for you.  One unrelated thing to think about. https://mysite.com/companyname.  What if the company changes their name?  You might want a user friendly looking but secretly technical url like https://mysite.com/companyname/590.  You can show the user friendly name, but ignore it in your code and just use the company id.  Then if the company changes names, no biggie - https://mysite.com/somethingElse/590.

A: One way to achieve this is to create a directory structure having one folder for each customer. Then in every folder has its own customer specific files e.g css, templates, brandings etc.
You can also have a shared/common folder that gets applied at the start of your application which is shared among all the customers.
The only thing then you need to extract from your URL is the name of the client (if possible somehow). This will decide which folder and its contents to load and apply.


text:
Q: How to evaluate whether a table's good or bad in a database system? How can we evaluate whether a table's good or bad in a database system?  What aspects do we need to analyse? Can I build a model for doing such evaluation? If yes then how?

A: A non-exhaustive list. For all these questions, yes is a good answer and no is bad.

*

*Does the table serve a clear business function? How well does it fit the application's purpose?

*Is the table well-named? Are the table's columns well-named? Would a business user understand what they mean?

*Does the table have a primary key?

*Does the table have unique constraints on all the business (candidate) keys?

*Are all the foreign keys defined?

*Do all the columns with constrained values have a foreign key to a reference data table or a check constraint (or an enum for MySQL)?

*Do all the columns have the correct (strongest) data type?

*Is the table correctly normalised? (In an OLTP environment that means at least Boyce-Codd Normal Form, things are different in data warehouses.)

*Is the table free of any columns which hold "smart keys", CSV strings, JSON, XML, different data items whose meaning is dependent on metadata held in another column (or another table), or any other exotic structure which seemed like a good idea at the time but which will incur a legacy of horrible code and data corruption for years after?

*Are all the columns scalar, using recognised Oracle built-in data types (i.e. no nested tables or user-defined types)?

*Does the Physical Data Model diagram include the table?

*Is the table derivable from entities in the Logical Data Model diagram?

*Do you have scripts of the DDL for the table and its dependent objects? Are those scripts in source control?

*Does the table conform to whatever modelling and coding standards you have (if any)?

*Is the table physically implemented properly (e.g. all necessary indexes, index-organized if appropriate, partitioning if appropriate)?

*Is the table defensible? How comfortable would you be explaining it to another experienced data modeller, database developer or business user?

As you can tell, this is an opinionated list (which is why some people have voted to close your question). Some points are rather imprecise. It's probably a long way from the model you were hoping for.
People will want to argue with some of these measures. For instance, the point about non-atomic data structures like JSON. Of course there are times when such structures are appropriate; I once worked on a system which would have been much simpler if we had stored the data in XMLtype columns instead of shredding it into relational tables. But those are isolated cases. Read some of the questions on this site about smart keys, tokenising CSV strings or writing queries against an Entity-Attribute-Value anti-model to understand how much grief these things cause. First Normal Form should be a given, and developers who flout it don't deserve to have databases.
Other points are bellwethers. If your organisation doesn't maintain an up-to-date Physical Data Model then it's likely most if not all of your tables are bad (not inevitable, just likely). It's astonishing how many places don't seem to keep their DDL scripts under source control. How do they manage their deployments to test and production? I think prayer features heavily.


text:
Q: yesod devel fail when starting development server I was starting to read about Yesod and I tried to install it on my Linux Mint Maya 64-bit machine.
The haskell platform was already installed, I just installed the yesod-platform package with cabal install yesod-platform and all worked very well.
Next step was to call yesod init with respond to all the questions - the application name: test. The problems starts when I called yesod devel... here it is what I've got:
Yesod devel server. Press ENTER to quit
Resolving dependencies...
Configuring test-0.0.0...
Rebuilding application...
Building test-0.0.0...
Preprocessing library test-0.0.0...
Registering test-0.0.0...
Starting development server: runghc -package-confdist/package.conf.inplace devel.hs

devel.hs:2:1:
    Failed to load interface for `Application'
    It is not a module in the current program, or in any known package.
Exit code: ExitFailure 1

I'm a little bit lost with this issue - I made a lot of research related to it but I have no luck...
Can anyone help with this problem?
Here it is my ghc-pkg list:
    /var/lib/ghc/package.conf.d:
    Cabal-1.14.0
    GLUT-2.1.2.1
    HDBC-2.3.1.1
    HDBC-odbc-2.2.3.0
    HTTP-4000.2.2
    HUnit-1.2.4.2
    MonadCatchIO-mtl-0.3.0.4
    OpenGL-2.2.3.1
    QuickCheck-2.4.2
    SHA-1.5.0.0
    aeson-0.6.0.0
    ansi-terminal-0.5.5
    array-0.4.0.0
    asn1-data-0.6.1.3
    attoparsec-0.10.1.1
    attoparsec-conduit-0.2.0
    attoparsec-enumerator-0.3
    authenticate-1.0.0.1
    base-4.5.0.0
    base-unicode-symbols-0.2.2.3
    base64-bytestring-0.1.1.0
    bin-package-db-0.0.0.0
    binary-0.5.1.0
    blaze-builder-0.3.1.0
    blaze-builder-conduit-0.2.0
    blaze-html-0.4.3.1
    byteorder-1.0.3
    bytestring-0.9.2.1
    bytestring-lexing-0.4.0
    case-insensitive-0.4.0.1
    cereal-0.3.5.1
    certificate-1.1.0
    cgi-3001.1.8.2
    clientsession-0.7.4.1
    conduit-0.2.0
    containers-0.4.2.1
    convertible-1.0.11.0
    cookie-0.4.0
    cprng-aes-0.2.3
    crypto-api-0.9
    crypto-conduit-0.1.3.1
    crypto-pubkey-types-0.1.0
    cryptocipher-0.3.0
    cryptohash-0.7.4
    css-text-0.1.1
    data-default-0.3.0
    deepseq-1.3.0.0
    directory-1.1.0.2
    dlist-0.5
    email-validate-0.2.8
    entropy-0.2.1
    enumerator-0.4.18
    extensible-exceptions-0.1.1.4
    failure-0.2.0
    fast-logger-0.0.2
    fgl-5.4.2.4
    file-embed-0.0.4.1
    filepath-1.3.0.0
    (ghc-7.4.1)
    ghc-prim-0.2.0.0
    hamlet-0.10.8
    hashable-1.1.2.3
    haskell-src-1.0.1.5
    (haskell2010-1.1.0.1)
    (haskell98-2.0.0.1)
    hjsmin-0.0.15
    hoopl-3.8.7.3
    hpc-0.5.1.1
    html-1.0.1.2
    http-conduit-1.2.5
    http-date-0.0.2
    http-types-0.6.9
    integer-gmp-0.4.0.0
    language-javascript-0.4.10
    largeword-1.0.1
    lifted-base-0.1.0.3
    mime-mail-0.4.1.1
    monad-control-0.3.1
    mtl-2.0.1.0
    network-2.3.0.10
    old-locale-1.0.0.4
    old-time-1.1.0.0
    parallel-3.2.0.2
    parsec-3.1.2
    path-pieces-0.1.0
    persistent-0.8.0.1
    persistent-template-0.8.1.1
    pool-conduit-0.0.0.1
    pretty-1.1.1.0
    primitive-0.4.1
    process-1.1.0.1
    pureMD5-2.1.0.3
    pwstore-fast-2.2
    random-1.0.1.1
    ranges-0.2.4
    regex-base-0.93.2
    regex-compat-0.95.1
    regex-posix-0.95.1
    resource-pool-0.2.1.0
    rts-1.0
    safe-0.3.3
    semigroups-0.8
    shakespeare-0.10.3.1
    shakespeare-css-0.10.7
    shakespeare-i18n-0.0.1
    shakespeare-js-0.11.0.1
    shakespeare-text-0.10.5
    simple-sendfile-0.2.0
    skein-0.1.0.5
    socks-0.4.1
    stm-2.2.0.1
    syb-0.3.6
    system-filepath-0.4.6
    tagged-0.2.3.1
    tagsoup-0.12.6
    template-haskell-2.7.0.0
    text-0.11.1.13
    time-1.4
    tls-0.9.0
    tls-extra-0.4.3
    transformers-0.2.2.0
    transformers-base-0.4.1
    unix-2.5.1.0
    unix-compat-0.3.0.1
    unordered-containers-0.1.4.6
    utf8-light-0.4.0.1
    utf8-string-0.3.7
    vault-0.1.0.0
    vector-0.9.1
    wai-1.1.0.1
    wai-app-static-1.1.2
    wai-extra-1.1.0.1
    wai-logger-0.1.4
    warp-1.1.0.1
    xhtml-3000.2.0.5
    xml-conduit-0.5.3
    xml-types-0.3.1
    xss-sanitize-0.3.1
    yaml-0.5.2
    yesod-0.10.1.3
    yesod-auth-0.8.1.1
    yesod-core-0.10.2.1
    yesod-form-0.4.2
    yesod-json-0.3.1
    yesod-persistent-0.3.1
    yesod-routes-0.0.1
    yesod-static-0.10.1
    zlib-0.5.3.3
    zlib-bindings-0.0.3.2
    zlib-conduit-0.2.0

/home/ionica/.ghc/x86_64-linux-7.4.1/package.conf.d:
    Cabal-1.16.0.1
    HDBC-2.3.1.1
    HDBC-odbc-2.3.1.0
    HDBC-sqlite3-2.3.3.0
    HaXml-1.23.3
    SHA-1.5.1
    aeson-0.6.0.2
    ansi-terminal-0.5.5
    asn1-data-0.7.1
    attoparsec-0.10.2.0
    attoparsec-conduit-0.5.0.2
    authenticate-1.3.1.1
    base-unicode-symbols-0.2.2.4
    base64-bytestring-1.0.0.0
    blaze-builder-0.3.1.0
    blaze-builder-conduit-0.5.0.1
    blaze-html-0.5.1.0
    blaze-markup-0.5.1.1
    byteorder-1.0.3
    cairo-0.12.3.1
    case-insensitive-0.4.0.3
    cereal-0.3.5.2
    certificate-1.2.8
    cipher-aes-0.1.2
    clientsession-0.8.0.1
    conduit-0.5.2.5
    conduit-0.5.2.6
    convertible-1.0.11.1
    cookie-0.4.0.1
    cpphs-1.14
    cprng-aes-0.2.4
    cpu-0.1.1
    crypto-api-0.10.2
    crypto-conduit-0.4.0.1
    crypto-pubkey-types-0.1.1
    cryptocipher-0.3.5
    cryptohash-0.7.5
    css-text-0.1.1
    data-default-0.5.0
    date-cache-0.3.0
    derive-2.5.11
    dlist-0.5
    email-validate-0.2.8
    entropy-0.2.1
    failure-0.2.0.1
    fast-logger-0.3.1
    file-embed-0.0.4.6
    filesystem-conduit-0.5.0.1
    ghc-paths-0.1.0.8
    gio-0.12.3
    glib-0.12.3.1
    gtk-0.12.3.1
    hamlet-1.1.1
    hashable-1.1.2.5
    haskell-src-exts-1.13.5
    hjsmin-0.1.3
    hspec-1.3.0.1
    hspec-expectations-0.3.0.2
    html-conduit-0.1.0.2
    http-conduit-1.6.1.2
    http-date-0.0.2
    http-types-0.7.3.0.1
    language-javascript-0.5.5
    largeword-1.0.3
    lifted-base-0.1.2
    lifted-base-0.2
    mime-mail-0.4.1.2
    mime-types-0.1.0.0
    monad-control-0.3.1.4
    monad-logger-0.2.1
    network-conduit-0.6.0
    network-conduit-0.6.1.1
    pango-0.12.3
    parallel-3.2.0.2
    parallel-3.2.0.3
    parallel-io-0.3.2.1
    path-pieces-0.1.2
    pem-0.1.1
    persistent-1.0.1.3
    persistent-sqlite-0.8.0
    persistent-sqlite-1.0.0
    persistent-template-1.0.0.2
    polyparse-1.8
    pool-conduit-0.1.0.3
    primitive-0.5
    primitive-0.5.0.1
    pureMD5-2.1.2.1
    pwstore-fast-2.3
    ranges-0.2.4
    resource-pool-0.2.1.1
    resourcet-0.4.0.1
    resourcet-0.4.0.2
    safe-0.3.3
    semigroups-0.8.4.1
    shakespeare-1.0.1.4
    shakespeare-css-1.0.1.5
    shakespeare-i18n-1.0.0.2
    shakespeare-js-1.0.0.6
    shakespeare-text-1.0.0.5
    silently-1.2.0.2
    simple-sendfile-0.2.8
    skein-0.1.0.9
    socks-0.4.2
    split-0.1.4.3
    stringsearch-0.3.6.4
    system-fileio-0.3.10
    system-filepath-0.4.7
    tagged-0.4.4
    tagsoup-0.12.8
    tagstream-conduit-0.5.3
    tar-0.3.2.0
    tar-0.4.0.1
    tls-0.9.11
    tls-extra-0.4.7
    transformers-base-0.4.1
    uniplate-1.6.7
    unix-compat-0.4.0.0
    unix-time-0.1.2
    unordered-containers-0.2.2.1
    utf8-string-0.3.7
    vault-0.2.0.1
    vector-0.10
    vector-0.10.0.1
    void-0.5.8
    wai-1.3.0.1
    wai-app-static-1.3.0.2
    wai-extra-1.3.0.3
    wai-logger-0.3.0
    wai-test-1.3.0
    warp-1.3.4.1
    xml-conduit-1.0.3.1
    xml-types-0.3.3
    xss-sanitize-0.3.2
    yaml-0.8.1
    yesod-1.1.2
    yesod-auth-1.1.1.2
    yesod-core-1.1.3.1
    yesod-default-0.6.1
    yesod-default-1.1.0.2
    yesod-form-1.1.3
    yesod-json-1.1.0
    yesod-persistent-1.1.0
    yesod-platform-1.1.4
    yesod-routes-1.1.0.1
    yesod-routes-1.1.0.2
    yesod-static-1.1.0.1
    yesod-test-0.3.0.1
    zlib-bindings-0.1.1.1
    zlib-conduit-0.5.0.1

A: After a complete clean up of the system - I mean uninstall haskell-platform, yesod-platform and delete files related to haskell, yesod and ghc - then a fresh install for haskell-platform + yesod-platform all goes splendid.


text:
Q: How is the data used for speech recognition collected and prepared? As far as I can tell, most speech recognition implementations rely on binary files that contain acoustic models of the language they are trying to 'recognize'.
So how do people compile these models?
One could transcribe lots of speeches manually, but that takes a lot of time. Even then, when given an audio file containing some speech and a full transcription of it in a text file, the individual word pronunciations still need to somehow be separated. To match which parts of the audio correspond to the text one still needs speech recognition.
How is this gathered? If one is handed over thousands of hours' worth of audio files and their full transcriptions (disregarding the problem of having to transcribe manually), how can the audio be split up at the right intervals where one word ends and another begins? Wouldn't the software producing these acoustic models already have to be capable of speech recognition?

A:
So how do people compile these models?

You can learn about process by going through CMUSphinx acoustic model training tutorial

One could transcribe lots of speeches manually, but that takes a lot of time.

This is correct, model preparation takes a lot of time. Speech is transcribed manually. You can also take already transcribed speech like movies with subtitles or transcribed lectures or audiobooks and use them for training.

Even then, when given an audio file containing some speech and a full transcription of it in a text file, the individual word pronunciations still need to somehow be separated. To match which parts of the audio correspond to the text one still needs speech recognition.

You need to separate speech on sentences of 5-20 seconds long, not on words. Speech recognition training can learn model from sentences called utterances, it can segment on words automatically. This segmentation is done in unsupervised way, essentially it is a clustering, so it does not require the system to recognize the speech, it just detects the chunks of similar structure in the sentence and assigns them to phones. This makes speech training way easier than if you'd train on separate words.

How is this gathered? If one is handed over thousands of hours' worth of audio files and their full transcriptions (disregarding the problem of having to transcribe manually), how can the audio be split up at the right intervals where one word ends and another begins? Wouldn't the software producing these acoustic models already have to be capable of speech recognition?

You need to initialize system from some manually transcribed recording database of size of 50-100 hours. You can read about examples here. For many popular languages like English, French, German, Russian such databases already exist. For some they are in progress in the dedicated resource.
Once you have initial database you can take a large set of videos and segment them using existing model. That helps to create databases of thousands of hours. For example such database was trained from Ted talks, you can read about it here.


text:
Q: Does texting internationally use data? I have been texting a friend in Mexico for several months. One of my friends was alarmed and said I was using my data. Is that true?

A: you always use data to text using imessage, although if you have it set to text message. it will not
( as seen in picture )


text:
Q: Firefox not showing fixed heading correctly with slide-out menu Here's the heading and slide-out menu I am working on: http://computerdirectoutlet.com/CDOBiz/
In Chrome and IE, the fixed menu will slide properly when the menu is expanded, but in Firefox it stays fixed over the menu. Any idea how I can fix this issue?
I'm using the mmneu jquery plugin

A: Try adding the "mm-fixed-top" class to your #header element:
<div class="mm-fixed-top" id="header">


text:
Q: jQuery not responding when moved from HTML to PHP? The Venkman debugger says this:
    $("#aboutbox") is null
[Break On This Error] $("#aboutbox").hide();

But I don't know what to do to fix it!
It worked perfectly in HTML: http://leventhan.webfactional.com/static/
But when I moved it to PHP, it just stopped working.
Here's the index.php:
    <?php

require_once dirname(__FILE__)."/src/phpfreechat.class.php";
$params = array();
$params["title"] = "Quick chat";
$params["nick"] = "guest".rand(1,1000);  // setup the intitial nickname
$params['firstisadmin'] = true;
//$params["isadmin"] = true; // makes everybody admin: do not use it on production servers ;)
$params["serverid"] = md5(__FILE__); // calculate a unique id for this chat
$params["debug"] = false;
$chat = new phpFreeChat( $params );

?>
<!DOCTYPE html>

  <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <title>phpFreeChat- Sources Index</title>
  <link rel="stylesheet" title="classic" type="text/css" href="style/styles.css" />
  <link rel="stylesheet" title="classic" type="text/css" href="style/content.css" />

GeoChat is the perfect chat app to hatch your world domination plans. A place on the web where you can point to maps and chat at the same time.
    A great way for teachers to teach and students to learn with an interactive map.

GeoChat

Toggle backgroundChat HelpWhat's all this about?

  <?php $chat->printChat(); ?>
  <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
  <?php } ?>

&#10084 Made by Author with love.Go up &#8593

Here's the live broken site: http://leventhan.webfactional.com/phpfreechat-1.3/

EDIT: Yeah, jQuery worked again when I commented out the chat app (phpFreeChat), this part:

  <?php $chat->printChat(); ?>
  <?php if (isset($params["isadmin"]) && $params["isadmin"]) { ?>
  <?php } ?>

And it turns out the problem is really because jQuery is conflicting with Prototype.js (phpFreeChat uses Prototype apparently.) The solution is to use:
jQuery.noConflict();

A: Edit: Oh, that is actually in your static version, so the static versions seems to be broken. Given this, it is impossible to tell what does not work in your PHP version.
I get an error

oracle.js:4 Uncaught ReferenceError: hide is not defined

The line where the error is thrown is
 $("#aboutbox").live(hide());

Maybe you meant $("#aboutbox").hide(); ?

A: It worked!
It was jQuery and Prototype not getting along with each other.
Here's what I did:

*

*add:

jQuery.noConflict();

*change all occurences of:
$(document).ready(function(){
to:
jQuery(document).ready(function($) {

*in my external js do a find and replace.
find: $
replace: jQuery (case sensitive).

A: I am seeing an error here (Chrome)
function showInDiv(text)
{
    var sidediv = document.getElementById('content_window');
    sidediv.innerHTML = text; // Cannot set property 'innerHTML' of null
}

What's content_window? I could not find it on the page


text:
Q: C - Replace $$ in string with ID from getpid()? If I have a string like the following:
char* exampleString = "test$$";

Let's say that getpid() returns 1587.
How can I replace the $$ in the string with the result of getpid() such that the result would be a string "test1587"?

A: Since "test$$" is immutable and a pointer to it should better be char const* instead of char* you'd have to copy it to an array where you then can replace "$$".
Possible solution:
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>

#include <unistd.h>

int main(void)
{
    char const *input = "foo$$bar";
    pid_t pid = 1234;

    size_t format_length = strlen(input);
    char *format = calloc(format_length + 2, 1);
    if (!format) {
        fputs("Couldn't allocate memory :(\n\n", stderr);
        return EXIT_FAILURE;
    }

    // copy input to format replacing "$$" with "%ld" in the process
    bool replacement_done = false;
    for (size_t i = 0; i < format_length + replacement_done; ++i) {
        if (!replacement_done && i + 1 < format_length &&
            input[i] == '$' && input[i + 1] == '$')
        {
            format[  i] = '%';  // just
            format[++i] = 'l';  // being
            format[++i] = 'd';  // safe.
            replacement_done = true;
            continue;
        }

        format[i] = input[i - replacement_done];
    }

    if (!replacement_done) {
        free(format);
        fputs("Nothing to do :(\n\n", stderr);
        return EXIT_FAILURE;
    }

    char *result = malloc(1);
    if (!result) {
        free(format);
        fputs("Couldn't allocate memory :(\n\n", stderr);
        return EXIT_FAILURE;
    }

    // there is no guesswork needed, snprintf() will tell the needed size
    int bytes_needed = snprintf(result, 1, format, (long)getpid());
    if (bytes_needed < 0) {
        free(format);
        free(result);
        fputs("snprintf() failed :(\n\n", stderr);
        return EXIT_FAILURE;
    }

    char *temp = realloc(result, ++bytes_needed);
    if (!temp) {
        free(format);
        free(result);
        fputs("Couldn't allocate memory :(\n\n", stderr);
        return EXIT_FAILURE;
    }
    result = temp;

    int written = snprintf(result, bytes_needed, format, (long)getpid());  // long should be big enough
    if(written < 0 || written >= bytes_needed ) {
        free(format);
        free(result);
        fputs("snprintf() failed :(\n\n", stderr);
        return EXIT_FAILURE;
    }

    puts(result); // done.

    free(format);
    free(result);
}

A: You can't do a direct substitution because your string (character array) is not long enough to hold the pid, and of course, if declared as a string literal is also not mutable.
There are a couple of ways you could go with this, but here's a reasonably elegant one:
/* Modify the existing string to be a pattern string for snprintf */
int len = strlen(exampleString) - 1; /* Can you see why I might do this? */
char* formatString = strdup(exampleString); /* Because we can't modify a literal */
int newLen = len + 12; /* How about this? */
char *pidString = malloc(newLen);
int i;
for (i = 0; i < len; i++) {
  if (formatString[i] == '$' && formatString[i+1] == '$') {
    formatString[i] = '%';
    formatString[i+1] = 'd';
    break;
  }
}
snprintf(pidString, newLen - 1, formatString, getpid());

Can you follow how this works?
How would you enhance this to fail gracefully if the exampleString does not contain $$ ?


text:
Q: What does '%BZ' mean in materials science?
Also, for that matter, what does k_II mean?

A: *

*The abbreviation BZ stands for Brillouin Zone, almost universally.

*The material depicted is not a uniform solid, and it has at least two components each with different sizes of unit cell and thus different sizes of Brillouin zone. The SiC subscript denotes that the axis is in units of the BZ for the bulk silicon carbide component.

*The percentage sign means simply that $k$ is measured in percentage of the size of the SiC BZ.

*The $||$ subscript indicates the parallel component of the vector $\vec k$. This presumably means the component parallel to the surface, but that could change depending on the details of the context provided by the text surrounding the figure.


text:
Q: Fit a non-mobi web-site to a mobile browser I have a small project with one bureaucratic organisation where I need to create a mobile app based on data from their web-site. The site isn't optimized for mobiles and it's extremely difficult for users to use the site from their gadgets. The aim of the project is to provide information in convenient view and simplify the working processes of users (actually, I need to create 3 buttons/links and when a user press a button he/she can see some information).
The first button is easy to develop because it should only show news of the company which is shared for everyone. There are many opportunities to get this data and one of them is to get the source of the page and parse tags.
But, two other buttons is a pretty tough task, because to get the data for them a user should be logged on… Despite the company is very bureaucratic, the site was made by some outsource organisation, so neither they nor I have access to database and the site sources.
I tried to find out the type of POST request (recording tcp-dump), but, of course it's encoded. I believe there's a simpler solution, but I can't find it, and need your help. Unfortunately, I'm not a web-developer and don't know resources of web technology…
Could you kindly advise me please, whether it's possible to make some kind of a wrapper which would make dynamic design of web-page according to the browser? For instance, when a user presses one of these two buttons I show custom login screen (customized login screen of the company's website, I virtually remove all design and make input fields and button bigger), the user provides details, press login button and I show customized view of a report (removing all needless stuff, etc.)
In other words, just imagine, you're login to you gmail account which design of login page is customized
After some manipulations with Chrome's element inspector you can get something like this
Although the web page was modified, if I press "Sign in" button I still can login to my account. How can I get/develop similar tool for my android app?
Perhaps you have a better solution, please don't hesitate to propose :) If my explanation of the problem isn't clear just let me know please and I'll add some more information.
Thank you!

A: the reason nobody has answered yet is probably because your question is unclear.
Do you have access to the code? If so, why don't you just insert a link to a css file in which you style the elements differently according to the size of the visitors browser?
You can do this with Media Queries. You can use them to trigger certain parts of your css only when the visitors Browser/Screen size is lower or higher than a certain value. Use them to give out different css for smartphones, tablets, netbooks, desktops etc. Here you can see some good examples here: Example of various media queries for responsive web design.
I hope this helped you somehow.


text:
Q: Allow clients in network to communicate to client connected via OpenVPN Network topology is like this:
OpenVPN Server:
Private IP (eth0): 10.0.4.23/16
Public IP (eth1): 77.20.30.40/24
Routes:
default via 77.20.30.1
10.0.0.0/16 (not routable, so no gateway)
10.8.0.0/16 via 10.0.0.65

On same private subnet we have dedicated addresses in range of 10.0.13.0/24 network for clients connected via OpenVPN. So clients see the OpenVPN Server address as 10.0.13.1 as a gateway.
Client Machine:
Public IP: 217.40.50.60

Currently, when Client connects to VPN Server, it cannot see subnets in private range. So I've added routes to those networks using OpenVPN Servers tun0 IP (10.0.13.1)
ip r add 10.0.0.0/16 via 10.0.13.1
ip r add 10.8.0.0/16 via 10.0.13.1

It doesn't work. So I've added POSTROUTING iptables rule on OpenVPN Server
iptables -A POSTROUTING -s 10.0.13.0/24 -o eth0 -j MASQUERADE

At that point it worked. But, the problem is, when i connect to a server in that private subnet, for example 10.0.4.20, that server will see originating IP address as OpenVPN Private address 10.0.4.23.
Currently we have Microsoft VPN established and when we use that, all servers can see clients IP addresses that are assigned to by VPN, so it can be done (maybe) but I'm not sure where i got it wrong.
This is OpenVPN Server config file, comments stripped for readers convenience.
port 1194
proto udp
dev tun
user nobody
group nobody
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.0.13.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 10.0.0.1"
push "dhcp-option DNS 10.0.0.2"
push "route 10.0.0.0 255.255.0.0"
push "route 10.8.0.0 255.255.0.0"
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_oy94rAaIiMtrnvAB.crt
key server_oy94rAaIiMtrnvAB.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
log /var/log/openvpn/openvpn.log
verb 3

plugin /opt/openvpn-ldap-auth/lib/openvpn-auth-ldap.so /etc/openvpn/auth/ldap.conf
client-cert-not-required

I've tried setting server 10.0.13.0 255.255.255.0 to server 10.0.13.0 255.255.0.0 as that should be the network, but OpenVPN server doesn't like that config and don't want to start if first octet in subnet is not 0.
So to make it simple:
How do i make some server that is on 10.0.0.0/16 network, reach VPN Client that is on 10.0.13.0/24. Or better yet, how do i make OpenVPN Server assign to clients IP addresses in range of 10.0.13.0/24 but actually make them belong to 10.0.0.0/16? Do i maybe need a separate DHCP Server on same server?

A: I've managed to get this resolved with the help of Ethernet Bridging.
These would be the steps:

*

*Stop the OpenVPN Server, on CentOS: systemctl stop openvpn@server

*Install bridge-utils package on CentOS 7 yum install bridge-utils

*Create tap0 Virtual ethernet device openvpn --mktun --dev tap0

*Create a bridge brctl addbr br0

*Add eth0 device (the one with private IP) to new bridge brctl addif br0 eth0

*Add tap0 device to bridge brctl addif br0 tap0

*Enable promiscuous mode to tap0 device ifconfig tap0 0.0.0.0 promisc up

*Enable promiscuous mode to eth0 device ifconfig eth0 0.0.0.0 promisc up

*Assign an IP address that was set to eth0 previously to br0 ifconfig br0 10.0.4.23 netmask 255.255.0.0 broadcast 10.0.255.255

*Add iptables rules so new interfaces can accept traffic

    iptables -A INPUT -i tap0 -j ACCEPT
    iptables -A INPUT -i br0 -j ACCEPT
    iptables -A FORWARD -i br0 -j ACCEPT

*

*Open up VPN Server config file, for example /etc/openvpn/server/server.conf, comment out the dev tun and add the dev tap0 right bellow or above it.

*Comment out the entire line that begins with the server and add IP address that was originally on eth0 and now on br0, also add the DHCP range of the addresses that the VPN will assign to clients, like this:

bridge 10.0.4.23 255.255.0.0 10.0.13.2 10.0.13.254

This will allow server to lease addresses from 10.0.13.2 - 10.0.13.254 to clients.

*

*Now start the openvpn server and enjoy :) systemctl start openvpn@servers.

A: From your description I see one missing configuration: you didn't tell your other servers how to reach the VPN clients.
Lacking that configuration, any host having an address of the 10.0/16 network will by default assume that any other address of that same network, thus including the 10.0.13/24 sub-network, is "on-link" i.e. reachable directly with no intervening router.
Just as an example test, try ip r add 10.0.13.0/24 via 10.0.4.23 to any one of your other Linux servers (not the OpenVPN server) belonging to the 10.0/16 network: after that, traffic should flow regularly between that particular Linux server and the OpenVPN clients.
Of course the same applies to all and any host on your 10.0/16 private network, be it Linux or Windows or Mac or Cisco or whatever. In practice, you should put that route on all your hosts of your private network.
Naturally this may be undesirable if you have many hosts. A better approach (networking-wise) would be to make your OpenVPN server host a sort of central gateway for your entire private network, perhaps literally the default gateway for all those hosts.
Presuming that is not feasible, if you already have such a "central gateway" in your private network (perhaps your 10.0.0.65 host ?), then you could try and configure just that one with the route above: the other hosts (the ones referring to that gateway) should normally obey and comply. However this solution can usually be sub-optimal because it makes those hosts be frequently re-routed by the "central gateway" towards the OpenVPN server gateway.
Other alternatives would involve to set special configurations up on your Linux server that is acting as OpenVPN server, in order to make it also act as a sort of "proxy-arp" for your OpenVPN client's addresses. Possible, but complex and advanced.
The bridging solution is certainly a solution, quick and easy, but implies that all broadcast traffic, which can be chatty in a medium-size LAN, is propagated to all your OpenVPN clients, thus occupying your OpenVPN server's resources and your Internet connection to and from your clients, each single broadcast frame multiplied by the number of clients connected.


text:
Q: biber, why does my MWE not work? Please help me, I have no idea why this MWE does not work. I am using the TeXnicCenter.
I get the error message:
Citation 'author2000' on page 1 undefined on input line 29.
\listfiles                % shows used packages in a list in log file
\RequirePackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{author2000,
  author  = {AuthorA},
  title   = {Title of Article},
  journal = {Name of Journal},
  year    = {2000},
}
\end{filecontents*}

\documentclass{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[german]{babel}
\usepackage{csquotes}

\usepackage[%
  style=authoryear
 ,backend=biber         % to force biblatex to use biber
 ,sortlocale=de_DE
]{biblatex}
\addbibresource{\jobname.bib}

\begin{document}

hi.\autocite{author2000}

\nocite{*}              % all bib entrys are printed

\printbibliography

\end{document}

geh.blg just says

[0] Config.pm:320> INFO - This is Biber 1.9
[0] Config.pm:323> INFO - Logfile is 'geh.blg'


text:
Q: how to create navbar without float?
I have question about that how to create a navbar without float.
I created something like this:

list numeber 1

list numeber 2

list numeber 3

list numeber 4

with this style:
* {
    padding: 0;
    margin: 0;
}
.wrap {
    width: 800px;
    margin: 100px auto;
}
a{
    text-decoration: none;
}
nav {
    background: yellow;
}

ul {
    list-style: none;
}
li {
    float: left;
    padding: 10px 15px;

}
ul li:hover {
    background: #ffff99;
    border-bottom: 4px solid red;
    padding: 8px 15px;

}

so, i dont like to use

 in my design. then i delete the clear div and add some css to my style like this:
ul.h:after {
    content: " ";
    clear: both;
}

but i didnt work!!! :(
how can i fix it using something like above code?
TnX

A: Why not use display:inline-block?
jsFiddle here
HTML

list numeber 1

list numeber 2

list numeber 3

list numeber 4

CSS
li {
    background: red;
    display: inline-block;
    padding: 10px;
    border: 1px solid black;
}

A: Change float:left; to display:inline-block; in your li css.
Here you go: http://jsfiddle.net/rJRBh/

A: if you dont like floats you can use inline-block, just be careful because inline-block is sensitive to whitespace
you can also use CSS tables
ul { display: table; }
li { display: table-cell; }

A: You can use this code.
We at Oodles Technologies, follow this approach.
First of all, create HTML Structure like this.
1
    Open
Now we use Css so that navbar looks better
#close{position: absolute;
    top: 10px;
    right: 10px;
    color: #fff;
}
.nav{width: 100%;
    height: 100%;
    position: fixed;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, .5);
    left: -100%;
    backface-visibility: hidden;
}
ul{float: left;
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    text-align: center;
}
li{width: 100%;
    float: left;
    list-style: none;
}

After that we will include some jquery functions to show hide our menu
$(function(){
    $("#open").click(function(){
        $(".nav").animate({left: "0px"});
    });
    $("#close").click(function(){
        $(".nav").animate({left: "-100%"});
    });
});

You can modify this according to your need.
In this way we can create a full screen navbar using css and jquery
Hope It Helps.


text:
Q: Xcode Fails to Launch iPhone Simulator I am attempting to launch the iPhone simulator from Xcode, but I keep getting the following error:

Error from Debugger: Failed to launch simulator: Operation failed with underlying error: 4294967253.

I've found a number of posts where Xcode failed to launch the simulator, but none of them match the specific error code I'm receiving.

A: Glad you got things solved senfo.  I've found that doing a full rebuild can work as well as checking your system console log for erroneous error message/warnings.  Xcode unfortunately seems to be rather poor at conveying errors when deployments fail to the simulator.

A: Whenever I've had issues like this, Force Quitting the simulator from the dock (Alt-Right click), followed by Xcode seemed to do the trick. After doing that I could reload my project and it would run fine.
Failing that, I hear it might help to reboot your mac (though I've never needed to go that far).

A: I'm not sure why I didn't try this earlier, but installing the latest version of Xcode fixed the problem.


text:
Q: How to manage Windows firewall ports while running an MSI installation? I have MSI Windows Installer files created by using the Wix Toolset and Wix files (*wxs). My requirement is that I need to open or close specific firewall ports while running the MSI installation.
Is there a way that it can be managed through specifications in the Wix files (*wxs) used to make the MSI installer?

A: There is an extension called FirewallException in WiX. You need to reference it inside your Visual Studio project. Find it at: C:\Program Files (x86)\WiX Toolset v3.11\bin\WixFirewallExtension.dll for a standard installation of WiX.
As to the usage of the actual element:

*

*You can find sample markup on github.com.

*Bob Arnson's blog:
http://www.joyofsetup.com/2008/05/17/new-wix-feature-firewall-extension/
Basic usage step-by-step:

*

*In Visual Studio project, add reference to C:\Program Files (x86)\WiX Toolset v3.11\bin\WixFirewallExtension.dll

*

*Right click your WiX project

*Click "Add => Reference..." & browse to above path and double click file

*Add to top level Wix element in your Project.wxs source file:  xmlns:fire="http://schemas.microsoft.com/wix/FirewallExtension"

*Then add the markup. Something along these lines:
<Component Feature="ProductFeature">

  <File Source="$(env.SystemRoot)\myexecutable.exe">
     <fire:FirewallException Id="FWX1" Name="Service" Port="[PORT]" Protocol="tcp" Scope="any" />
  </File>

</Component>


text:
Q: Having trouble with decimal points in SQL I have a function that I am using to insert values in to my DB.  Here is the relevant part of my insert function:
BEGIN
....
INSERT INTO TABLE1   (AMOUNT)
VALUES (pAmount);

......
So this statement works fine, but if pAmount = 531.42, it inserts 531 to my DB.  So it does not take into consideration anything after the decimal point.   Fyi, I have also tried:
VALUES (to_char(pAmount, '99,999.99'));

And this also cancels the decimal.  Is there a quick fix to this?

A: What is the datatype of the column?  If it is NUMBER(10,0) for example then that means 10 digits max, 0 decimal places.  You would want NUMBER(10,2) to allows for 2 decimal places for example.

A: What is the data type of AMOUNT? I'll bet it is an integer or numeric that rounds to integer.


text:
Q: How to show when a subspace is dense in $l^p$? Let's call $Z$ the linear subspace of sequences which converge to $0$ (i.e. after $n>N$) in
$p\in [1,\infty]$ for $l^p$. When would it be a dense subspace of $l^p$?
I barely know the definition of 'dense' but how would one isolate the subspace? Can the thought process be explained? Thanks!

A: In fact even the subset $c_{00}:=\{\ x \in \ell^p \mid \exists\, N_x \ \forall \, i \geq N_x \, \colon x_i=0\ \} \subseteq Z \subseteq \ell^p$ is dense in $\ell^p$ for $p \in [1,\infty)$ and therefore $Z$. To see this consider, for a given $x \in \ell^p$, the sequence $(\hat{x}_n)_n$ with $\hat{x}_i = (x_1, x_2, \dots, x_i,  0, 0,\dots)$ and show that it converges in $\ell^p$. (see here)
In case of $p=\infty$ try approximating $(1,1,1,\dots)$ with elements of $Z$. (This can't be done, since Z is not dense in $\ell^\infty$.) (see here)


text:
Q: Function doesn't send data I have following code. The problem is that ajax doesn't send data, I don't know why. It seems that problem could be in the javascript function. Can you help me please?
When I place the submit button out of the form, it works, why?

Fill email

                                <form class="contact">

                                        <input type="text" name="Email" class="form-control input-lg" placeholder="email">

                                            <button id="submit" class="btn btn-lg-sub model-btn" name="name">submit</button>

                                </form>

$(function() {
    $("button#submit").click(function(){
        $.ajax({
            type: "POST",
            url: "process.php",
            data: $('form.contact').serialize(),
            success: function(msg){
                $("#thanks").html(msg)
                $("#form-content").modal('hide');
            },
             error: function(){
                 alert("failure");
             }
        });
    });
});

A: Buttons without the type attribute are considered as a submit button, so when you click the button you need to prevent the default behaviour which submits the form, or you can add type="button":
$(function() {
    $("button#submit").click(function(e) {
        e.preventDefault(); //You need this
        $.ajax({
            type: "POST",
            url: "process.php",
            data: $('form.contact').serialize(),
            success: function(msg) {
                $("#thanks").html(msg)
                $("#form-content").modal('hide');
            },
            error: function() {
                alert("failure");
            }
        });
    });
});

Or:
<button id="submit" type="button"
        class="btn btn-lg-sub model-btn"
        name="name">submit</button>

I hope this will help you.


text:
Q: Injecting variable in DAO from controller I have DAO classes which are extending 'GenericDAO'
Generic dao has LanguageId variable with getter and setter.
I get my languageid from session.
Is there any way that I can set my language ID in genericDAO directly. So that every time i use dao class i dont have to pass languageId from my controller?
At last what i want is, I should be able to getLanguageId() in my dao object.

A: Usually DAOs are set up as singletons, so there is only one instance that all the different threads use. If that is the case, then you can't set the language for one user without others possibly getting impacted, and passing it in as a method argument is the only safe way to make sure other threads don't inadvertently get the wrong language id. So whether you can do what you want depends on what scope your DAOs have.

A: The very point of DAO is they're stateless while session represents some stateful information. All stateful information is supposed to be passed to DAOs via methods' arguments.
So, if you still want to have getLanguageId() in DAO, you are doomed to create DAO instance per each session and inject languageId to it during creation.


text:
Q: Fragments not working? I want to create multi fragments. When device is in portrait mode the list fragment and detail fragment should replace each other and when the device rotates the list and detail fragment should display side by side i.e., 50-50. However, I'm not getting my desired results the UI is blank/ error in setContentView(R.layout.activity_main).
Here is my code
DetFrag.java (Detail Fragment)
 public class DetFrag extends Fragment {

        public DetFrag() {
            // Required empty public constructor
        }

        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            // Inflate the layout for this fragment
            return inflater.inflate(R.layout.fragment_det, container, false);
        }

    }

Listfrag.java (List Fragment)
public class Listfrag extends ListFragment {
    ArrayList<String> myList = new ArrayList<String>();
    @Override
    public void onCreate( Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        myList.add(0, "1");
        myList.add(1, "2");
        myList.add(2, "3");
        myList.add(3, "4");
        myList.add(4, "5");

    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        ArrayAdapter<String> myAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, myList);
        setListAdapter(myAdapter);
        return super.onCreateView(inflater, container, savedInstanceState);
    }
}

MainActivity.java
public class MainActivity extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        FragmentManager fManag = getFragmentManager();
        FragmentTransaction fTrans ;

        if (findViewById(R.id.fragHolder) == null) {
            Fragment flist = fManag.findFragmentById(R.id.listFrag);
            Fragment fDet = fManag.findFragmentById(R.id.detFrag);
            fTrans = fManag.beginTransaction();
            fTrans.add(R.id.listFrag, flist);
            fTrans.add(R.id.detFrag, fDet);
            fTrans.commit();
        }
        else {
            Fragment list = fManag.findFragmentById(R.id.fragHolder);
            fTrans = fManag.beginTransaction();
            fTrans.add(R.id.fragHolder, list);
            fTrans.commit();
            Intent i = new Intent(this, Portrait.class);
            startActivity(i);

        }
       }
       }

Portrait.java (To start new activity when in portrait)
public class Portrait extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_portrait);

        FragmentManager fManag = getFragmentManager();
        FragmentTransaction fTrans ;

        Fragment detFrag = fManag.findFragmentById(R.id.detailFragHolder);
        fTrans = fManag.beginTransaction();
        fTrans.add(R.id.detailFragHolder, detFrag);
        fTrans.commit();
    }
}

activity_main.xml (portrait)
<?xml version="1.0" encoding="utf-8"?>

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android" >

    <fragment
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/fragHolder"/>
</FrameLayout>

landscape(activity_main)
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <fragment
        android:id="@+id/listFrag"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight=".5"
        />

    <fragment
        android:id="@+id/detFrag"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_weight=".5"/>

</LinearLayout>

fragment_det.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context="oryx.com.blueprint.DetFrag">

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="44dp"
        android:text="Button" />

    <Button
        android:id="@+id/button2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignBottom="@+id/button"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:text="Button" />

    <Button
        android:id="@+id/button3"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/button2"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="56dp"
        android:text="Button" />
</RelativeLayout>

activity_portrait.xml
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_height="match_parent"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:id="@+id/detailFragHolder">

</FrameLayout>

A: Instead of this:
@Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                                 Bundle savedInstanceState) {
            // Inflate the layout for this fragment
            return inflater.inflate(R.layout.fragment_det, container, false);
        }

Use this:
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
    final View view = inflater.inflate(R.layout.detFrag, container, false);
        return view;
    }

And instead of this:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    ArrayAdapter<String> myAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, myList);
    setListAdapter(myAdapter);
    return super.onCreateView(inflater, container, savedInstanceState);
}

Use this:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.listFrag, container, false);
ArrayAdapter<String> myAdapter = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_list_item_1, myList);
setListAdapter(myAdapter);
return view;
}


text:
Q: any idea....fast tool/way to find what was added? can anyone please help with a tool or even quicker method?
e.g. If I had 163.78 and wanted to make it 200.00 is there a way to find out what was added to make it 200.00?  (+36.22 in this case)
I need this everyday, and would be greatly appreciated as im not good using my slow manual method.
Regards,
Peter

A: You may use a calculator to find the answer quickly.
All you have to do enter $200-163.78$ and push enter to get the answe $36.22$
If you do not use calculator then you can get the answer in few steps.
First take $160$ out of $200$ to get $40$
Then take $3$ out of $40$ to get $37$
Then take $0.70$ out of $37$ to get $36.30$ and finally take $0.08$ out of $36.30$ to get $36.22$
It sounds messy but with practice you can do it fast.

A: You could write a computer program for this. For example in Python:
print 200.0-163.78


text:
Q: How to copy data into cells, make a table and add more data to it UI looks like:
Account:Wessex bank plc
Income: 200€
Costs:
Date: 28.02.2021
Output should be a list below in the cells:
Date: | Account: | Income: | Costs: |
28.02.2021 | Wessex Bank plc | 200€ |
28.02.2021 | Food | - | 175€ |
Hint: I would like to have a list of 5-7 bookings and when
making a new booking the latest booking is going to be at the top   position and the first booking in the last row, like when the table starts at row 13 and I make 5 bookings with different accounts, the first booking will be at 17 in the end.
this is copying the content in the table
Sub MyBuchenMakro
    Dim currDoc As Object
    Dim currSheet As Object
    Dim curr Cell As Object
    Dim destCell As Object
    Dim oDate As Date
    Dim einnahmen As Currency
    Dim ausgaben As Currency
    currDoc = ThisComponent
    currSheet = currDoc.sheets(0)
    currCell = currSheet.getCellByPosition(1, 5)
    destCell = currSheet.getCellByPosition(1, 12)
    destCell.String = currCell.String
    currCell = currSheet.getCellByPosition(1, 6)
    destCell = currSheet.getCellByPosition(2, 12)
    destCell.setValue(CCur(currCell.getValue()))
    currCell = currSheet.getCellByPosition(1, 7)
    destCell = currSheet.getCellByPosition(3, 12)
    destCell.setValue(CCur(currCell.getValue()))
    currCell = currSheet.getCellByPosition(1, 8)
    destCell = currSheet.getCellByPosition(0, 12)
    destCell.setValue(CDate(currCell.getValue()))
For i = 160 To 13 Step 1
  destCell = currSheet.getCellByPosition(0, i)
  If destCell == "" Then
     GoTo Continue
  End if
destCell = currSheet.getCellByPosition(0,i+1)
destCell.setValue(CDate(currCell.getValue()))
currCell = currSheet.getCellByPosition(1,i)
destCell = currSheet.getCellByPosition(1,i+1)
destCell.String = currCell.String
currCell = currSheet.getCellByPosition(2,i)
destCell = currSheet.getCellByPosition(2,i+1)
destCell.setValue(CCur(currCell.getValue()))
currCell = currSheet.getCellByPosition(3,i)
destCell = currSheet.getCellByPosition(3,i+1)
destCell.setValue(CCur(currCell.getValue()))
 Next i
End Sub

  [1]: https://i.stack.imgur.com/Mw7pJ.png

A: In fact, it is written a little shorter:
Option Explicit
Sub BuchenMacro
Dim oCurrentController As Variant   ' get Activesheet and select first cell of form
Dim oSheet As Variant   ' Activesheet
Dim oSourceRange As Variant ' Range B6:B9 - fields of input form
Dim oDataArray As Variant           ' Data from input form
    oCurrentController = ThisComponent.getCurrentController()
    oSheet = oCurrentController.getActiveSheet()
Rem Range with data
    oSourceRange = oSheet.getCellRangeByName("B6:B9")
Rem Data from this range as "array of arrays"
    oDataArray = oSourceRange.getDataArray()
Rem To prevent insert empty row - validate source cells:
Rem If 3 first cells are empty then stop:
    If Trim(oDataArray(0)(0))+Trim(oDataArray(1)(0))+Trim(oDataArray(2)(0)) = "" Then Exit Sub
Rem "Transpose" source data to single row:
    oDataArray = Array(Array(oDataArray(3)(0), oDataArray(0)(0), oDataArray(1)(0), oDataArray(2)(0)))
Rem Insert new row after header and shift all other rows down:
    oSheet.getRows().insertByIndex(12, 1)
Rem Paste data from form to this new row
    oSheet.getCellRangeByPosition(0, 12, 3, 12).setDataArray(oDataArray)
Rem Clear input cells to prevent duplicates
Rem (Only the data is cleared, the formulas remain in place.
Rem Put in cell B9 the formula =TEXT(TODAY();"DD.MM.YYYY")
Rem and it will always show the current date)
    oSourceRange.clearContents(7)
Rem Select first cell
    oCurrentController.Select(oSheet.getCellByPosition(1,5))
Rem Deselect cell
    oCurrentController.Select(ThisComponent.createInstance("com.sun.star.sheet.SheetCellRanges"))
End Sub


text:
Q: UISlider animation duration Im new to swift and I'm trying to create an app where a slider moves back and forth form a value of 1- 100 for 60 second by pressing a button.However,I am not sure how to make the slider move smoothly from 1-100.This is my code so far:
@IBOutlet weak var button: UIButton!
@IBOutlet weak var timer: UILabel!

var county = 5
    @IBAction func animateSlider(sender: AnyObject) {if (county == 59){

        _ = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: Selector("update"), userInfo: nil, repeats: true)}

    if (county>0){
    Slider.setValue(100, animated: true)

    }

The Problem? The UISlider value instantly moves from 1-100.So, how do I slow down this animation to 5 seconds or so?
Im aware of a similar thread but i'm new to Swift and I believe the other thread is written in Objective-C.Thus,I would love if anyone could help me explain in terms of swift.Thanks in advance!

A:     @IBAction func uiSliderShowProgress(sender: UISlider) {
if sender.value == 100 {
    var transition: CATransition = CATransition()
    transition.startProgress = 0
    transition.endProgress = 1.0
    transition.duration = 0.8
    uiSliderShowProgress.layer.addAnimation(transition, forKey: "transition")
    uiSliderShowProgress.value = 0
    lblSliderProgress.text = "\(Int(uiSliderShowProgress.value))"
}
else {
    var transition: CATransition = CATransition()
    transition.startProgress = 0
    transition.endProgress = 1.0
    transition.duration = 0.8
    uiSliderShowProgress.layer.addAnimation(transition, forKey: "transition")
    uiSliderShowProgress.value = 100
    lblSliderProgress.text = "\(Int(uiSliderShowProgress.value))"
}
}

@IBAction func btnChangeSliderValueClick(sender: UIButton) {
    self.uiSliderShowProgress(uiSliderShowProgress)
}

This changes the value of slider from 0-100 and 100-0 on buttons click and makes the thumb of the slider fade in and out, creating an illusion of being delayed!!! Hope this will help you...


text:
Q: How to protect access to the Wildfly HAL Management Console by Keycloak SSO using elytron-oid-client? How to migrate from using keycloak-wildfly-elytron-oidc-adapter as described at https://developer.jboss.org/docs/DOC-55623 or https://docs.jboss.org/author/display/WFLY/Protecting%20Wildfly%20Adminstration%20Console%20With%20Keycloak.html to protect access to the Wildfly HAL Management Console by Keycloak SSO to new elytron-oid-client in Wildfly 26.1.2 ?
According https://issues.redhat.com/browse/WFLY-15260, the ability to secure the admin console with OpenID Connect seems not yet implemented.

A: EDIT: This feature currently isn't available due to WFLY-15260 (see comments below). Once it is implemented, the original answer quoted below should work.

The schema of the internals is mostly similar to that of the adapter (except where secure-server is now just secure-deployment), so you should be able to basically copy your existing configuration from the adapter to the elytron-oidc-client. You can use the XML config file or an oidc.json file as described here.
I'm not sure on the configuration when within the Admin Console itself, but it should be similar to the existing steps.