text:
Q: Variable is not a CFString I am getting value from JSON it gives exception var is not CFString.
   below is the link from which i am getting data
     http://www.krsconnect.no/community/api.html?method=categories&appid=620&mainonly=true
NSString *test = aBook.catId;
Book Class
@interface Book : NSObject {

NSString *catId;

NSString *name;

}
@property(nonatomic,retain)NSString*catId;

@property(nonatomic,retain) NSString *name;

 @end

    #import "Book.h"

    @implementation Book

    @synthesize catId,name;

  -(id)init{

  self=[super init];

    }

   - (id)initWithDictionary:(NSDictionary*) dict {

self.catId = [dict valueForKey:@"categoryId"];
self.name =  [dict valueForKey:@"name"];

      return self;

      }

   - (void)dealloc {
   [catId release];
   [name release];
   [super dealloc];
   }

   @end

A: Its an integer maybe. Use this.
   NSString* test = [NSString stringWithFormat:@"%d",aBook.catId];

A: I think this question should help you
Replace multiple characters in a string in Objective-C?
CFStringRef aCFString = (CFStringRef)aNSString;

works perfectly and transparently. Likewise:
NSString *aNSString = (NSString *)aCFString;


text:
Q: Merge two dataframes, if multiple columns are identical So I searched a bit here, but I couldn't find what I was looking for exactly...
Apologies, if i'm missing something here.
I will use an example to show what I want to accomplish suppose I have the following DFs:
    df1= p1        p2        p3   ...      p13       Data#
        0.000      0.000     0.0005429    0.001539
        0.0243     0.03459    0.00000      0.000019
        ...
       0.0045     0.000       0.000135      0.2145

and df2
   df2= p1        p2        p3   ...      p13          Prospect #
       0.0243     0.03459    0.00000      0.000019
       0.0045     0.000       0.000135      0.2145
       0.000      0.000     0.0005429    0.001539

DF1 has every entry of df2, and far more (700k more), however I want to merge these dataframes when EVERY value, p1-p13 is correct, and have my resulting frame contain the rows from both.
I attempted to use the following code:
 m1 = pd.read_csv(r'df1.csv') #my file with 62k which maps to 1 row in master
 m2 = pd.read_csv(r'df2.csv')#mymasterfile
 m3 = pd.merge(m1, m2, how ='outter', on= ['p1','p2','p3','p4','p5','p6','p7','p8','p9','p10','p11','p12','p13'])

This results in me getting multiple values mapped to a single entry in the master data frame.

I feel like I am missing a very obvious step here, but have been at it for a while now and can't seem to figure it out. Any help would be grealty appreciated.

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to use Krusader to avoid useless taking space on displays? Krusader Version 2.6.0 "Stiff Challenges" takes up too much space on the displays, because it uses long buttons with text instead of icons in both panel toolbars, in the same row as both the paths.

Previous version 2.4.0-beta3 "Single Step" had only icons there.
Isn't this some fault of my installation? (The first desperate idea was to retain the old version and prevent Krusader from updating.)

A: I don't know why this button does not show an icon but only text, since I never used it. But if you want to disable it, do the following:

*

*Go to Settings -> Configure Krusader...

*Go to Panel - Buttons

*At the bottom you can enable / disable "Visible Panel Toolbar buttons"

Most probably you have "Toggle-button for sync-browsing" enabled, which is the one that takes up all the space.
I do not have icons for this, Folder History or Bookman either in this version by the way.


text:
Q: Dockerized .NET 5 Application - System.IO.FileLoadException: Could not load file or assembly I have a .NET 5.0 application (using the Microsoft.NET.Sdk.Worker SDK) that has Microsoft.Extensions.Hosting as its only dependency.
Building and running it locally works fine (Windows x64), but running it dockerized does not work.
This is the Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env

WORKDIR /app

# Copy csproj and restore as distinct layers
COPY *.sln .
COPY ProjectName/*.csproj ./ProjectName/
COPY ProjectName.Test/*.csproj ./ProjectName.Test/

RUN dotnet restore

# Copy everything else and build
COPY . ./

RUN dotnet publish -c Debug -o out

# Build runtime image
FROM mcr.microsoft.com/dotnet/runtime:5.0

WORKDIR /app

COPY --from=build-env /app/out .

ENTRYPOINT [ "dotnet", "SolutionName.dll" ]

Running it produces the following error:
container-name_1  | Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
container-name_1  | File name: 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
container-name_1  |    at ProjectName.Program.CreateHostBuilder(String[] args)
container-name_1  |    at ProjectName.Program.Main(String[] args) in /app/ProjectName/Program.cs:line 18
container-name_container-name_1 exited with code 139

A quick ls -lisa in the /app directory of the container confirms the dll is there at least:
container-name_1  | 245918   40 -rwxr--r-- 1 root root   37440 Nov 10  2018 Microsoft.Extensions.DependencyInjection.Abstractions.dll

I have tried explicitly including this dependency in my project, but that produces the same error.
I have also tried downgrading the version of Microsoft.Extensions.Hosting to 3.1.12, but that produces the same error for the same dll but with version 3.1.12.
Can you help me solve this problem?

A: This issue was related to the ProjectName.Test project. Deleting that project fixed the error.


text:
Q: How to jump from an event handler in story board to the code I have a "Hello" button in the main view. I have set its Touch Up Inside handler to changeGreeting() in HelloWorldViewController.m. From the Connections Inspector, I can clear see this association:

My question is, how to jump to changeGreeting() function in the .m file from here (the story board view)?
I would expect simply clicking on that "Hello World View Controller changeGreeting:" button would bring me to the source code. But it turns out not the case.

A: There is no way (as far as I can tell) to jump directly from that panel to the changeGreeting: method.
You can press Command-Shift-O (or choose File > Open Quickly…) and type changeGreeting: (or some prefix of it) to jump to the definition.
If you want Apple to add a better way, go to https://bugreport.apple.com/ and file a feature request.

A: You could go to the 'Jump Bar' which is the horizontal bar at the top of the main viewer. Here change the file to the .m file and then start typing 'change' or 'greeting' to see all the methods in this file that match the filter.


text:
Q: Too Few Parameters Expected 1 I am using front end as Business Objects and backend MS Access database.
I have one field with following syntax and when i pull this field in query getting error like "Too Few Parameters Expected 1"
Format(Votes.`Vote Received`,"yyyymm")

This syntax is parsing but when pulled this object in query giving error. I think it's something related to quotes on field name but this how that field is named. When i am pulling just below field query not giving error.
Votes.`Vote Received`

Appreciate your inputs..

A: In case it works for anyone else. I had the same problem "too few parameters" and it worked if using back quote for field escaping and single quote for defining date format. Dont know why it worked but you can try.
Format(tableused.`fieldused`, 'mm/dd/yyyy')

A: According to this you need to escape with a backquote:
Format(Votes.`Vote Received`, "yyyymm");

A: Try it with square brackets instead of backquotes surrounding the field name.
Format(Votes.[Vote Received],"yyyymm")

If that doesn't resolve the error, check the spelling of all the items in your query's SQL.
I don't understand why Format() is still failing for you.  You can use a different method to produce your "yyyymm" format.  Concatenate "0" with the output from Month() and take the right-most 2 characters.
SELECT
    Year(Votes.[Vote Received]) &
        Right("0" & Month(Votes.[Vote Received]), 2)
        AS year_month
FROM YourTable;

Since that second query also failed, try it directly in Access as a new query.  If that attempt fails, at least it will let you know which item the db engine thinks is the missing parameter ... it will display a message box titled "Enter Parameter Value" and below that title you will find the name of the "missing parameter".  And, if it doesn't fail when run directly in Access ... maybe this is a problem with the way Business Objects interacts with the MS Access ODBC driver.


text:
Q: No color in xubuntu wallpaper For some reason, my ubuntu wallpaper suddenly turned black and white.  If I try to change the desktop wallpaper image it always shows in black and white only (i.e. no color).  Where the heck can I change this strange behavior?
I'm running the xubuntu desktop (i.e. xfce) on an ubuntu 11.10 installation (switched to the xubuntu desktop after giving up on unity).

A: I asked in #xfce and the answer is to set the
saturation  = "1"

I bet yours is set to "0" like mine was.


text:
Q: PHP & MySQL: Fuzzy Duplicate Detection/Indexing of Text This is for a real-world problem. I am trying to detect whether a large text file already exists within a database for the purpose of duplicate detection.
The text is generated by OCR so it is not ever identical even if it is of the same thing. For example, "this is the beginning of the file" and "th1s is  the begiming ef the file"
I need to be able to quickly (as in pre-indexed) find whether any file already exists within the database before adding it.
Currently I have done this by comparing the new item to the existing items like this:

*

*Language must be the same, and

*Number of words must be within 10%, and

*50 most common words must match 90% of the time

There are two problems with this approach, both relating to 3. Firstly the accuracy of this is good but not perfect; secondly it is very slow because all common words have to be compared to all other common words for matches of 1 & 2.
I really need to come up with a more accurate and faster solution, preferably something that does not require millions of comparisons, but instead can use an index.
This appears to be a very difficult problem, although easy for a human. There must be a way to do it: some way to convert the text into a general representation, e.g. a number whereby a similar number would indicate another very similar file (more-or-less the same words in more-or-less the same order.)


text:
Q: Format links text in the bibliography to be exactly like other links I want to use biblatex for the bibliography with a normal color that is used for links. However, I do not want the link to be clickable
\begin{filecontents*}{sample.bib}
@misc{CIGREConnection2016,
    title = {{Connection of Wind Farms to Weak AC Networks}},
    howpublished = {CIGRE Brochure},
    year = {2016},
    month = {Dec},
    url = {https://e-cigre.org/publication/671-connection-of-wind-farms-to-weak-ac-networks},
    urldate = {2019-5-20}
}
\end{filecontents*}

\documentclass{book}

\usepackage[x11names]{xcolor}

\usepackage{hyperref}

\hypersetup{citecolor=DodgerBlue3, urlcolor=Blue1, colorlinks=true}

\usepackage[style=ieee,refsection=chapter]{biblatex}
\addbibresource{sample.bib}

\begin{document}

\cite{CIGREConnection2016}
\printbibliography

\end{document}

A: In a comment, you wrote that the objective is to

make sure that the URL is not underlined or otherwise appear as a hyperlink

An easy way to achieve this objective is to set urlcolor=black in the hypersetup instruction, i.e., to change
\hypersetup{citecolor=DodgerBlue3, urlcolor=Blue1, colorlinks=true}

to
\hypersetup{colorlinks, citecolor=DodgerBlue3, urlcolor=black}

If the typeset URL string must use the standard text font rather than a monospaced font, I suggest you also load the xurl package, followed by \urlstyle={same}.

\RequirePackage{filecontents}
\begin{filecontents*}{sample.bib}
@misc{CIGREConnection2016,
    title = {{Connection of Wind Farms to Weak AC Networks}},
    howpublished = {CIGRE Brochure},
    year = {2016},
    month = {Dec},
    url = {https://e-cigre.org/publication/671-connection-of-wind-farms-to-weak-ac-networks},
    urldate = {2019-5-20}
}
\end{filecontents*}

\documentclass{book}
\usepackage[x11names]{xcolor}
\usepackage{xurl}
\urlstyle{same}
\usepackage{hyperref}
\hypersetup{colorlinks,citecolor=DodgerBlue3,urlcolor=black}

\usepackage[style=ieee,refsection=chapter]{biblatex}
\addbibresource{sample.bib}

\begin{document}
\cite{CIGREConnection2016}
\printbibliography
\end{document}

If you want the package to apply normal hyperlink preferences in the text and exclude only the bibliographies, use the command \appto{\bibsetup}{\urlstyle{same} \hypersetup{urlcolor=black}} instead of \urlstyle={same}. That way, the arguments will apply only to the bibliography while text in the body will stay unmodified

\begin{filecontents*}{sample.bib}
@misc{CIGREConnection2016,
    title = {{Connection of Wind Farms to Weak AC Networks}},
    howpublished = {CIGRE Brochure},
    year = {2016},
    month = {Dec},
    url = {https://e-cigre.org/publication/671-connection-of-wind-farms-to-weak-ac-networks},
    urldate = {2019-5-20}
}
\end{filecontents*}

\documentclass{book}

\usepackage{etoolbox}

\usepackage[x11names]{xcolor}

\usepackage{hyperref}
\hypersetup{citecolor=DodgerBlue3, urlcolor=Blue1, colorlinks=true}

\usepackage{xurl}

\usepackage[style=ieee,refsection=chapter]{biblatex}
\addbibresource{sample.bib}

\appto{\bibsetup}{\urlstyle{same} \hypersetup{urlcolor=black}}

\begin{document}

\url{https://e-cigre.org/publication/671-connection-of-wind-farms-to-weak-ac-networks}

\cite{CIGREConnection2016}

\printbibliography

\end{document}

A: Replacing \url with \nolinkurl in the field macro:
\begin{filecontents*}{samplea.bib}
@misc{CIGREConnection2016,
    title = {{Connection of Wind Farms to Weak AC Networks}},
    howpublished = {CIGRE Brochure},
    year = {2016},
    month = {Dec},
    url = {https://e-cigre.org/publication/671-connection-of-wind-farms-to-weak-ac-networks},
    urldate = {2019-5-20}
}
\end{filecontents*}

\documentclass{book}

\usepackage[x11names]{xcolor}

\usepackage{hyperref}

\hypersetup{citecolor=DodgerBlue3, urlcolor=Blue1, colorlinks=true}

\usepackage[style=ieee,refsection=chapter]{biblatex}
\addbibresource{samplea.bib}

\DeclareFieldFormat{url}{\mkbibacro{URL}\addcolon\space{\color{Blue1}\nolinkurl{#1}}}

\begin{document}

\cite{CIGREConnection2016}
\printbibliography

\end{document}

(some pdf viewers will nevertheless make it a hyperlink because they search the text for typical internet addresses and make everything clickable which looks like a link, e.g. has www, http...)


text:
Q: How to make the compiler process this function? I use a function in all of my code that turns a string literal such as "0;1;6" into a double value (in this case 0.125). The function, double doztof(const char *string) does this by calling several other of my functions and sscanf(). I naively expected the compiler to run the function and replace the call with the constant result, by which I mean doztof("0;2;3") will always yield a constant value of 0.1875, however neither compiler I use does this, and when used in a loop I end up with sscanf() running every single time to process the same constant string literal over and over.
Why would the compiler not optimise this out? Doesn't a string literal passed as a const indicate clearly enough that it will never change and that it's safe to optimise out? What else am I missing? Here's the full relevant code:
char *skip_string(const char *string, const char *skipstring)       // skipstring must be terminated by a %n
{
    int n=0;
    sscanf(string, skipstring, &n);
    return &string[n];
}

char *skip_whitespace(const char *string)
{
    return skip_string(string, " %n");
}

char *string_parse_fractional_12(const char *string, double *v)
{
    int i, n=0, ret=1, count=0, neg=0;
    double divisor=1., digit;
    char *p = string;

    *v = 0.;

    p = skip_whitespace(p);

    if (p[0] == '-')
    {
        neg = 1;
        p++;
    }

    for (i=0; i<20 && ret==1; i++)
    {
        n=0;
        ret = sscanf(p, "%lf%n", &digit, &n);
        p = &p[n];
        if (ret==1)
        {
            count++;
            *v += digit / divisor;
            divisor *= 12.;
        }

        n=0;
        sscanf(p, ";%n", &n);
        p = &p[n];

        if (p[0]==' ' || p[0]=='\t')    // detect whitespace so that the next sscanf avoids reading the numbers after the whitespace
            ret = 0;
    }

    if (count==0)
        return string;

    if (neg)
        *v = -*v;

    return p;
}

double doztof(const char *string)
{
    double v;
    string_parse_fractional_12(string, &v);
    return v;
}

A: "Constant folding" or "constant propagation" would be the term to describe such an optimization, if it existed. But it applies to much simpler things, like
int x = 6 / 2;
int y = strlen("foo");

Your function is insanely complicated compared to any reasonable expectation of constant folding. If a compiler did compile-time evaluation of even a single call to sscanf I'd be very impressed.


text:
Q: Setting up RADIUS on Windows Server 2003 I want to set up Radius on one of my Win2k3 Server servers to test authenticating a Cisco router against it.

*

*Does the IAS server have to be a
domain controller, is it better or worse if it is?

*Will installing IAS via Add/Remove
Components knock out or require the
restart of other services? (If it has
to be a DC, then its going to have to
be a production one).

*This guide or maybe this one looks okay, but can anyone
how has done it tell me if they seems
okay, and/or recommend another guide?

*Other advice is of course (almost) always welcome :-)

A: This is the exact way I have my cisco gear currently setup.
To answer your questions

*

*No it does not have to be a domain controller, I can't really think of anything compelling for/against. I have mine on the DC's local to the equipment because a) they are already doing authentication and for network gear auth you won't be adding that much load and b) didn't really have anywhere else to put it at the time.

*Nope won't cause a reboot or start/stop of services

*The first guide looks pretty much spot on for the windows side. See below for example code from my configs to get the cisco side running.

*One thing you want to do is make sure you have local accounts that you can fail back to when your radius server is unavailable. and make sure you have an active console session that is set to not timeout when setting this up. You can easily lock your self out of the router while doing the setup.

This is for authenticating console access not VPN access, i'm going to leave it here in case someone finds it useful.

aaa new-model
aaa authentication login default group radius local
radius-server host <server_ip/name> auth-port 1812 acct-port 1813 key <encrypted_shared_key>

A: *

*no IAS does not need to be on a DC although performance can improve if it is.

*depends on the rest of the system, but in my experience no it does not require a reboot

*both guides look complete.

Pay close attention to wild cards matching for your policies since that's how you can have multiple policies on the same group for different hosts. if you don't limit them down any 'allow' match will grant access to the resource.


text:
Q: Can you use scanf() to define a variable set with #define? If I initialize a variable using #define, can I then set its value using scanf()? i.e. does this work:
#define miscellaneous
printf("What value would you like to use for this example: ");
scanf("%g",&miscellaneous);

If I can't do it this way, is it even possible to set the value of a variable defined this way?

A:
If I can't do it this way, is it even possible to set the value of a variable defined this way?

miscellaneous is not a variable at all. What you have defined is a macro. And no, you cannot set the value of a macro at runtime. Macro processing happens before compilation which happens before the program is run.
P.S. Avoid unnecessary use of macros.

A: #define miscellaneous means that every time you write miscellaneous, you would like the compiler to replace it with nothing. #define is automated copy-paste and in this case it pastes nothing.
So when you write scanf("%g", &miscellaneous); the macro (the #define) causes it to be changed to scanf("%g", &); which is not valid at all. This is not a variable.

A: You can not assign value to macro. Using #define directive compiler only in compile time using it, in runtime everything defined using #define directive does not exist.


text:
Q: Quiero convertir el segundo decimal de un precio a un redondeo Si por ejemplo un precio es 21.03 se redondee a 21.00,si es 21.04 o 21.06 a 21.05 y si es superior a 21.07 o igual se quede en 21.10. He intentado un round,tambien convirtiendo el decimal a entero para hacer los if, pero nada me sale.

A: Por lo que entiendo lo que necesitas es esto
<?php
$numero = 15.07;
// divido el numero por el . y obtengo una lista con la parte entera "15" y la decimal "07"
list($entera, $decimal) = explode('.', $numero);
// comparo
if($decimal > 0.7){
    // obtengo el numero redondeado
    echo $entera + 0.10;
} else if( // otras comparaciones ){
    // otras acciones
}

?>

Salida: 15.10


text:
Q: finding repeated value in objects inside an array in javascript have an array of data for example :
const array=[{ a:"cat"}, { a:"dog"}, { a:"dog"},{ a:"dog"}]
iterating over the array and looking for a logic to check the value of " a " to see if it is repeated or not, if repeated return only once otherwise return

A: You can try like this

const array=[{ a:"cat"}, { a:"dog"}, { a:"dog"},{ a:"dog"}]
const unique = array
     .map(e => e['a'])
     .map((e, i, final) => final.indexOf(e) === i && i)
     .filter(obj=> array[obj])
     .map(e => array[e].a);
     console.log(unique)

A: let values = new Set()
newArray = array.filter(obj => {
    if(values.has(obj.a)) return false;
    values.add(obj.a);
    return true;
  });

I would suggest, if you intend to use a as basically a key, using a Map or Object instead of an Array to hold data.


text:
Q: Область влияния переменных в c#? Я немного запутался, вот есть два куска кода, в котором в одном из них поле помечено модификатором static  -значит оно глобальное и объявлено вне метода, как и положено
class Program
{
    static int x=1;
    static void Main()
    {

а в другом случае - поле просто объявлено вне метода без модификатора static
class Program
{
     int x;
    static void Main()
    {

- влияет ли это на что либо и будет ли она считаться глобальной? Знаю, вопрос Дурацкий, но я просто запутался в областях видимости(влияния переменных).

A: static говорит о том, что некоторое поле принадлежит не одному экземпляру, а всему классу:
class ProgramA
{
  public static int x;
}

class ProgramB
{
  public int x;
}

int xFromProgramA = ProgramA.x;

ProgramB k = new ProgramB();
k.x = 10;

ProgramB j = new ProgramB();
j.x = 20;

k.x == j.x // => false

Доступная в пределах всей программы а не только данного - класса

Вы, судя по всему, о модификаторах доступа: public/private/protected/internal. В вашем случае: нет, обе переменные private по умолчанию, а следовательно доступны только внутри экземпляра/класса.


text:
Q: when i have to calculate mape rmse before or after inverse_transform hello i want to know when i have to calculate mape rmse  before this code
predictions1 =scaler.inverse_transform(predictions)or after it. because the result is different in two propositionsthat's it what i m doing :predictions = gru_model.predict(X_test)print("Mean Absolute Error - mape : " + str(mape...(y_test, predictions)))
MAPE:  0.06919089575979946
mse et rmse for train and test
Train Score: 0.0003 MSE (0.0167 RMSE)
Validatin Score: 0.0029 MSE (0.0536 RMSE)


text:
Q: Select multiple rows with the MAX SUM of a value grouped by another column I have a "resources" table that contains information about how resources of a specific weight are placed inside a territory by an user.
territory_id        user_id     weight
1                       1           1
1                       1           4
1                       1           2
1                       2           2
2                       3           2
2                       2           3
2                       2           3
3                       1           1
4                       1           1
4                       1           1
4                       2           2
4                       3           3
4                       3           1
4                       3           2
5                       3           2
5                       3           3
5                       2           1
4                       3           1

I want to calculate, for each existing territory, which user has the highest total weight of resources (and what is this value).
So this should be an expected outcome for the previous data:
territory_id        best_user_id        best_user_total_weight_of_resources
1                       1                       7
2                       2                       6
3                       1                       1
4                       3                       6
5                       3                       5

I have already tried several nested queries with SUM, MAX, GROUP BY but I really didn't find the proper way to calculate this.
I have found a lot of similiar question, but not solving this exact problem.
Any help? Thanks in advance!
EDIT:
I found out right now that the double GROUP BY (i.e. "GROUP BY territory_id, user_id") with double ORDER BY partially solves my problem, but it shows also information that I don't want (not only the best user, but each single user that placed at least one resource).
SELECT territory_id, user_id AS best_user_id, SUM( weight ) AS best_user_total_weight
FROM resources
GROUP BY territory_id, user_id
ORDER BY territory_id ASC, best_user_total_weight DESC;

A: You can run a first query to determine SUM(weight) for each couple (territory_id,user_id) and then run a second SELECT query on that result set to retrieve the row corresponding to max summ value:
SELECT territory_id, user_id, MAX(summ)
FROM (
  SELECT territory_id, user_id, SUM(weight) AS summ
  FROM resources
  GROUP BY territory_id, user_id
) AS t1
GROUP BY territory_id


text:
Q: Error compiling code for downloading string and progress bar I have some simple code, but it won't compile. I get an error I don't understand.
Trying to compile this code:
private void Button1_Click(object sender, EventArgs e)
{
    XmlDocument doc = new XmlDocument();
    WebClient wc = new WebClient();

    wc.DownloadProgressChanged += (s, e) => { progressBar1.Value = e.ProgressPercentage; } ;
    wc.DownloadString("example.com");
 }

And have this error:

"CS0136  C# A local or parameter named 'e' cannot be declared in this scope because that name is used in an enclosing local scope to define a local or parameter"

What's going wrong?

A: You can;t use same placeholder e for two different "things"
Try changing one of them to e2 for example


text:
Q: Google Deployment Manager ordering of resources using references for kubernetes cluster I am trying to use the api exposed by a k8 cluster in other resources.
I want the k8 cluster to be up first and later other resources make use of the api exposed by this k8 cluster.
I tried to use the references to lay out an implicit order on the resource creation, but I see that even before the k8 cluster is fully up, another resource is trying to access an API exposed by the k8 cluster.
More details:
https://gist.github.com/VarunkumarManohar/508454c42afa481771e2c600120ca7ac

A: This is not how kubernetes works.
Kubernetes uses a process called reconciliation, where specs/resource definitions that describe an end state get created without any explicit or implicit expectation around ordering. Individual resources/applications/controllers try and retry and retry again to reconcile themselves with that desired end state.
All cross-application references/dependencies have to be explicitly and literally specified prior to submitting the specs/resources. There is no variable interpolation or substitution or anything like that in k8s, unlike some application configuration management systems.
Part of the spec for individual services involves what to do when they fail- should they retry, how many times, for how long, etc. When you have layers of dependent services, the services that have no dependencies may come up and get to a state of readiness right away, whereas other services that have dependencies may try to locate those dependencies, fail, and then get restarted/retried by kubernetes.
Eventually all the parts, sometimes after many individual restarts, are up and ready and therefore reconciled with the desired end state.


text:
Q: Creating folders and sub-folders with a VBA macro I'm looking to use a spreadsheet I've created to generate folders and sub-folders based on what is in each column.
The first column is the top level, the second column the next level down (sub-folder) and so on.
    A                 B                   C                   D
1   TOP FOLDER 1      Sub Folder 1.1      Sub Folder 1.2      Sub Folder 1.3
2   TOP FOLDER 2      Sub Folder 2.1      Sub Folder 2.2      Sub Folder 2.3
3   TOP FOLDER 3      Sub Folder 3.1      Sub Folder 3.2      Sub Folder 3.3

I've tried another program already and it made the folders but put them all in one folder! I need it with sub-folders, but I think an issue might be separating the folders, here's an example:
I'm thinking it may be problematic to separate the sub-folders into their parent folders because they are in the same columns...

A: This creates a folder structure with VBA. Short and beautiful.
Sub CreateFolderStructure()
    Dim objRow as Range, objCell as Range, strFolders as String

    For Each objRow In ActiveSheet.UsedRange.Rows
        strFolders = "C:\myRootFolder"
        For Each objCell In objRow.Cells
            strFolders = strFolders & "\" & objCell
        Next
        Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))
    Next
End Sub

No error handling!
What it does

*

*Loop through every used row of your active Excel sheet

*Set the root folder in which our new folders should be created. Must be done in every loop

*Loop through every used cell in the current row

*Concatenate the root folder with a backslash and the new sub folder.
Do this for every sub folder in that row until we get something like
"C:\myRootFolder\TOP FOLDER 1\SUB FOLDER 1.1\SUB FOLDER 1.2\SUB FOLDER 1.3"

*Now comes the magic. We do not use VBA's mkdir function.
Instead we use Shell(cmd /c md) which can make several folders with one command. It also produces no error if a folder already exists. Such a beautiful command

Some notes

*

*Avoid these characters in folder names: © ® " - & ' ^ ( ) @

*Empty Excel cells are no problem. The MD command can handle strings like C:\root\\subfolder with two consecutive backslashes

*Spaces in folder names are no problem since we wrap the complete structure with two quotation marks (chr(34))

A: Sub MkDirs()

    Const RootPath = "C:\your\path"
    Dim rng As Range

    Set rng = Selection

    For Each rw In rng.Rows
        ChDir RootPath
        For Each cl In rw.Cells
            If cl <> "" Then
                MkDir cl
                ChDir cl
            End If
        Next
    Next
End Sub

A: Here is a better answer that allows you to choose a root file instead of defining it in the code:
Sub FolderCreator()

    Dim objRow As Range, objCell As Range, strFolders As String, rootFolder As String

    With Application.FileDialog(msoFileDialogFolderPicker)
        ' show the file picker dialog box
        If .Show <> 0 Then
            rootFolder = .SelectedItems(1)
              End If
    End With

    For Each objRow In ActiveSheet.UsedRange.Rows
        strFolders = rootFolder
        For Each objCell In objRow.Cells
            strFolders = strFolders & "\" & objCell
        Next
        Shell ("cmd /c md " & Chr(34) & strFolders & Chr(34))
    Next

End Sub


text:
Q: Wireguard double hop - no internet I have two ubuntu servers and I need to create following vpn conf (single+double hop simultaneously):
client -> server1 -> internet
client -> server1 -> server2 -> internet
I use docker image for it. Everything is fine with single hop. For double hop I use following docker-compose.yml
version: '3.7'
services:
  wireguard-client:
    image: linuxserver/wireguard
    container_name: wireguard-client
    restart: unless-stopped
    networks:
      - backbone
    volumes:
      - '~/wireguard-client/config:/config'
      - '/lib/modules:/lib/modules'
    environment:
      - PUID=1000
      - PGID=1000
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    ports:
      - 51821:51820/udp

  wireguard-server:
    depends_on:
      - wireguard-client
    image: linuxserver/wireguard
    container_name: wireguard-server
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - SERVERURL=SERVER1_URL
      - SERVERPORT=51821 # because 51820 is for single hop conf
      - PEERS=4
      - PEERDNS=auto
      - INTERNAL_SUBNET=10.13.13.0
      - ALLOWEDIPS=0.0.0.0/0
    volumes:
      - ~/wireguard-client/server:/config
      - /lib/modules:/lib/modules
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    restart: unless-stopped
    network_mode: service:wireguard-client
networks:
  backbone:
    driver: bridge

After creating containers, I certainly have tunnel to my server2, because docker exec -it wireguard-client curl -w "\n" ifconfig.me and docker exec -it wireguard-server curl -w "\n" ifconfig.me shows me SERVER2_IP. But I can't connect to it from my client. Tunnel is created but no access to internet.
wireguard-client config:
[Interface]
Address = 10.13.13.2
PrivateKey =
ListenPort = 51820
DNS = 10.13.13.1
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

[Peer]
PublicKey =
PresharedKey =
Endpoint = SERVER2_IP
AllowedIPs = 0.0.0.0/0

I'm connecting to SERVER1 by following conf:
[Interface]
Address = 10.13.13.2
PrivateKey =
ListenPort = 51820
DNS = 10.13.13.1

[Peer]
PublicKey =
PresharedKey =
Endpoint = SERVER1_IP:51821
AllowedIPs = 0.0.0.0/0

I suppose that something is wrong with IP forwarding, maybe in PostUp/PostDown rules, but don't know what exactly.


text:
Q: Saving Controls in C# Windows Application I am creating an application that creates a list of buttons from video files.
Each button is generated to open the file on click, and then I use an open api (omdb.com) to get the movie posters for each one. However, not only is doing this process each time you launch the application slow, but it is also an unnecessary load on the website.
What is the most efficient way to save a control after it is dynamically generated in the backend.
So far I have tried using Properties.Settings, but without any luck.
SettingsProperty newSetting = new SettingsProperty("Movie_Button");
newSetting.Name = "Movie_Button_" + *an int that I generate*.ToString();
newSetting.Attributes.Add(Width, 200);
//Carry on setting attributes

So far this process hasn't yielded any results, even when just trying to create a SettingsProperty that's just a simple string. And I have tried with and without Properties.Settings.Default.Save().
Is there a way to save a control created at run time so it carries over to the next launch of the application?
If there is no way to do this, then can someone please help me create the new SettingsProperty to hold a string, or possibly an XML that I could use.

A: Since I couldn't find a way to save a control, I decided to instead save the images in a new folder and then create an XML containing the path to the image (and some additional information such as title, year, etc.).
To create the XML I used the XmlDocument doc = new XmlDocument(); method, downloaded the images to a folder at the exe path (using Application.ExecutablePath to get the path), then WebClient webclient = new WebClient(); and webclient.DownloadFile(netPath, localPath) to download each image.
Then on form load I regenerate the buttons using the info from the XML.
This method is much faster than my original method of making multiple web requests for the image url or calls to the api.


text:
Q: Customised Infowindow not working? Im trying to customize my Infowindow, but I cant bind the TextViews with the strings. The InfoWindow sometimes shows the raw xml, sometimes just not working. I feel myself a little bit lost.
The loading function seems to be working fine. In my opinion the problem begins at the mMap.addMarker function.
private void placeAllMarkers() {

    mContext = getActivity();
    mPrefManager = new PrefManager(mContext);
    List <MapMarker> allMapMarker;

    allMapMarker = mPrefManager.loadAllMapMarker();

    if (allMapMarker.size() > 0) {

        for (int counter = 0; counter < allMapMarker.size(); counter++) {

            price = allMapMarker.get(counter).getSum();
            shop = allMapMarker.get(counter).getShop();
            date = allMapMarker.get(counter).getDate();
            Float GPS_X = allMapMarker.get(counter).getGPS_X();
            Float GPS_Y = allMapMarker.get(counter).getGPS_Y();

            LatLng Position = new LatLng(GPS_X, GPS_Y);

            mMap.addMarker(new MarkerOptions()
                    .position(Position)
                    .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));

            mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {

                @Override
                public View getInfoWindow(Marker marker) {
                    InfoView = getActivity().getLayoutInflater().inflate(R.layout.custom_infowindow, null);

                    setShop = (TextView) InfoView.findViewById(R.id.setShop);
                    setSum = (TextView) InfoView.findViewById(R.id.setSum);
                    setDate = (TextView) InfoView.findViewById(R.id.setDate);

                    setShop.setText(shop);
                    setSum.setText(price);
                    setDate.setText(date);

                    return InfoView;
                }

                @Override
                public View getInfoContents(Marker marker) {
                    return null;
                }
            });

        }
    }
}

Thanks for your time.
EDIT
It is something with the strings:

FATAL EXCEPTION: main
                                                                            Process: hu.mosomaci.flagsproject, PID: 4983
                                                                            android.content.res.Resources$NotFoundException: String resource ID #0xd98
                                                                                at android.content.res.Resources.getText(Resources.java:252)
                                                                                at android.content.res.MiuiResources.getText(MiuiResources.java:108)
                                                                                at android.support.v7.widget.ResourcesWrapper.getText(ResourcesWrapper.java:52)
                                                                                at android.widget.TextView.setText(TextView.java:3895)
                                                                                at hu.mosomaci.flagsproject.fragments.MapForFlags$1.getInfoContents(MapForFlags.java:136)
                                                                                at com.google.android.gms.maps.GoogleMap$7.zzi(Unknown Source)
                                                                                at com.google.android.gms.maps.internal.zzd$zza.onTransact(Unknown Source)
                                                                                at android.os.Binder.transact(Binder.java:361)

A: First of all set your marker like below. Set snippet for both price and date and add % sign between them.
mMap.addMarker(new MarkerOptions()
.position(Position)
.icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_RED)));
.title(shop)
.snippet(price + "%"+date));

Try to set the text and other work inside getInfoContents(Marker marker) methode ( as getInfoContents(Marker marker) is used to define the content.) instead of getInfoWindow(Marker marker) of setInfoWindowAdapter.
And when setting text to TextView split the snippet and get price and date by index
mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {

                @Override
                public View getInfoWindow(Marker marker) {
               return null;
                }

                @Override
                public View getInfoContents(Marker marker) {
                    InfoView = getActivity().getLayoutInflater().inflate(R.layout.custom_infowindow, null);

                    TextView setShop = (TextView) InfoView.findViewById(R.id.setShop);
                    TextView setSum = (TextView) InfoView.findViewById(R.id.setSum);
                    TextView setDate = (TextView) InfoView.findViewById(R.id.setDate);

                    String snippet = marker.getSnippet();
                    String[] splited_text = snippet.split("%");
                    String price = splited_text[0];
                    String date = splited_text[1];

                    setShop.setText(marker.getTitle());
                    setSum.setText(price);
                    setDate.setText(date);

                    return InfoView;
                }
            });


text:
Q: Error when starting the Rails server on Windows Right after launching rails server command Ruby terminal doesn't start the server and writes following:
C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:6:in `require': cannot load such file -- sqlite3/sqlite3_native (LoadError)
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:6:in `rescue in <top (required)>'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/sqlite3-1.3.11-x64-mingw32/lib/sqlite3.rb:2:in `<top (required)>'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
    from C:/Sites/testing/config/application.rb:7:in `<top (required)>'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `require'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:88:in `block in server'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
    from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

When looking for answers to similar question, I haven't found any working solution. I can say that:

*

*Application is created in directory, in which path are only English symbols.

*I tried to fix problem using:
gem cleanup
bundle install

*I tried to start the server using: bundle exec rails server.

*I tried to delete the gems which contain "problem" in the gemfile.

*Also tried to fully reuninstall Ruby and Rails with all gems.

All that didn't help, so I would really appreciate for working in my case solution!
P.S. I am working on: Windows 8.1 (64-bit), Ruby 2.3.0, Rails 5.0.0

A: Find your sqlite3 gemspec file. One example is
`/usr/local/share`/gem/specifications/sqlite3-1.3.7.gemspec`

Windows: C:\Ruby21\lib\ruby\gems\2.1.0\specifications.
You should adjust according with your Rubygem path and sqlite3 version. Edit the file above and look for the following line
s.require_paths=["lib"]

change it to
s.require_paths= ["lib/sqlite3_native"]

Hope that helps!!!


text:
Q: Unity AndroidJavaClass.CallStatic on Android plugin. Is this possible? I'm trying to make an old Flurry plugin to work with the new Flurry Android SDK.
I'm trying to call this "logEvent" on Flurry .jar file
static FlurryEventRecordStatus logEvent (String eventId)

The FlurryEventRecordStatus is an enum, like this:
enum FlurryEventRecordStatus { FlurryEventFailed, FlurryEventRecorded, FlurryEventUniqueCountExceeded, FlurryEventParamsCountExceeded, FlurryEventLogCountExceeded, FlurryEventLoggingDelayed }

On my Unity C# code I want to do something like this:
Enum status = FlurryAgent.CallStatic<Enum>("logEvent", eventId);

But this obviously doesn't work.
Is there a way to get this enum from java as a Return Type directly from Unity?

A: This is an old post :( but for future reference:
I ended up just using 'AndroidJavaObject' for the return type and calling: flurryAgent.CallStatic<AndroidJavaObject> ("logEvent", eventId);


text:
Q: Hibernate cannot resolve type with enum I have two entities and one with a field of a specific enum. Now I want to retrieve all that have a specific enum value.
@Entity
@Table(name = "AlarmEvent")
@XmlRootElement
public class AlarmEvent implements Identifiable {
    @Id
    @GeneratedValue(generator = "increment")
    @GenericGenerator(name = "increment", strategy = "guid")
    @Column(name = "Id", columnDefinition = "uniqueidentifier")
    private String id;

    @ManyToOne
    @JoinColumn(name = "AlarmType_Id")
    @XmlJavaTypeAdapter(EntityAdapter.class)
    private AlarmEventDefinition alarmType;

    @Column(name = "Timestamp", nullable = false)
    private Date timestamp;

    @Override
    @XmlTransient
    public String getIdentifier() {
        return id;
    }

    public AlarmEventDefinition getAlarmType() {
        return alarmType;
    }

    public void setAlarmType(AlarmEventDefinition alarmType) {
        this.alarmType = alarmType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Date timestamp) {
        this.timestamp = timestamp;
    }
}

and the second entity
@Entity
@Table(name = "AlarmEventDefinition")
@XmlRootElement
public class AlarmEventDefinition implements Identifiable {
    public static enum AlarmEventDefinitionType {
        Start, End, Trigger, Report
    }

    @Id
    @Column(name = "Id")
    private Integer id;

    @Column(name = "Name_DE", length = 256)
    private String nameDe;

    @Column(name = "Type")
    @Enumerated(EnumType.STRING)
    private AlarmEventDefinitionType type;

    @OneToMany(mappedBy = "alarmType", fetch = FetchType.LAZY)
    @XmlTransient
    private List<AlarmEvent> events;

    public List<AlarmEvent> getEvents() {
        return events;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getNameDe() {
        return nameDe;
    }

    public void setNameDe(String nameDe) {
        this.nameDe = nameDe;
    }

    public AlarmEventDefinitionType getType() {
        return type;
    }

    public void setType(AlarmEventDefinitionType type) {
        this.type = type;
    }
}

Now I want to do this
List<AlarmEvent> result = (List<AlarmEvent>) session.createCriteria(AlarmEvent.class)
        .add(Restrictions.eq("alarmType.type", AlarmEventDefinitionType.Trigger))
        .list();

To retrieve all AlarmEvents thiers AlarmEventDefinitions type is Trigger.
Hibernate says:

org.hibernate.QueryException: could not resolve property:
  alarmType.type of: datamodel.AlarmEvent

A: You just have an alarmType property defined in the AlarmEvent class, there is no alarmType.type. That's the error message is saying.
You need to extend the criteria to the associated class AlarmEventDefinition.  The code should be something like this:
List<AlarmEvent> result = (List<AlarmEvent>) session.createCriteria(AlarmEvent.class)
        .createCriteria("alarmType").add(Restrictions.eq("type", AlarmEventDefinitionType.Trigger))
        .list();


text:
Q: 'Value cannot be null' 'Parameter name: key' during compile with no obvious(?) reason I've already been browsing the site for a while now, trying to find a solution for these pretty mysterious errors — none of the ones I found helping my particular case.
I should note that I know basically nothing about C# or how WPF actually works, which might also explain why none of the threads here looked like solutions to my problem.
After (I really don't know what I did), VS is now coming up with two (identical) errors:
Description: Value cannot be null.
Value cannot be null.
Parameter name: key

Apart from these, the solution does not contain any errors or warnings.
Double-clicking the errors opens the files MainWindow.xaml and App.xaml at Ln: 1 Ch: 1 with nothing highlighted as an error or warning.
// MainWindow.xaml

<Window x:Class="solution_alpha_pack_roll_generator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d"
        Title="MainWindow" Height="470" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock Name="Rarities_1" Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Lato" Text="Common" />
        <TextBlock Name="Rarities_2" Grid.Row="1" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Lato" Text="Uncommon" />
        <TextBlock Name="Rarities_3" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Lato" Text="Rare" />
        <TextBlock Name="Rarities_4" Grid.Row="3" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Lato" Text="Epic" />
        <TextBlock Name="Rarities_5" Grid.Row="4" Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Lato" Text="Legendary" />

        <TextBox Name="Rarities_1_C" Grid.Row="0" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Consolas" Width="140" Height="50" Text="0.330" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
        <TextBox Name="Rarities_2_C" Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Consolas" Width="140" Height="50" Text="0.285" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
        <TextBox Name="Rarities_3_C" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Consolas" Width="140" Height="50" Text="0.224" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
        <TextBox Name="Rarities_4_C" Grid.Row="3" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Consolas" Width="140" Height="50" Text="0.125" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
        <TextBox Name="Rarities_5_C" Grid.Row="4" Grid.Column="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="NoWrap" TextAlignment="Center" FontSize="25" FontFamily="Consolas" Width="140" Height="50" Text="0.036" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />

        <Button Name="Rarities_Defaults" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="25" FontFamily="Lato" Width="300" Height="50" Content="Reset to defaults" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Click="Rarities_Defaults_Click"/>
    </Grid>
</Window>

// App.xaml

<Application x:Class="solution_alpha_pack_roll_generator.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
</Application>

EDIT: (Re)Building is not possible with VS printing this in the Output window:

1>------ Rebuild All started: Project: solution_alpha-pack-roll-generator, Configuration: Debug Any CPU ------
1>App.xaml : error : Value cannot be null.
1>App.xaml : error : Parameter name: key
1>MainWindow.xaml : error : Value cannot be null.
1>MainWindow.xaml : error : Parameter name: key
1>Done building project "solution_alpha-pack-roll-generator.csproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

EDIT 2: GitHub repository here: https://github.com/DeBedenHasen/alpha-pack-roll-generator

A: I think the problem is that you are referencing Xamarin.Formsand Xamarin.Essentials in your csproj. I cloned your repository, and after removing these references (and adding some using statements to MainWindow.xaml.cs, App.xaml.cs and AssemblyInfo.cs), it builds fine.


text:
Q: 405 - Request method 'POST' not supported Spring MVC + Spring Security Sorry for duplicate i have seen so many questions for this topic but no one couldn't help me.
When i put correct login data in login form all works. When i put incorrect login data in login form redirect to 'loginProcessingUrl()' is '/sign-in-handler' but i don't have in controller POST-endpoind for /sign-in-handler mapping because this endpoind must handle by spring security. But i have 405.
Here is my code:
SecurityConfig.java
@Configuration
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Autowired
    private UserDetailsService userDetailsService;
    @Autowired
    private DataSource dataSource;

    @Bean
    public PersistentTokenRepository persistentTokenRepository() {
        JdbcTokenRepositoryImpl persistentTokenRepository = new JdbcTokenRepositoryImpl();
        persistentTokenRepository.setDataSource(dataSource);
        return persistentTokenRepository;
    }

    @Bean
    public PasswordEncoder getPasswordEncoder() {
        return new BCryptPasswordEncoder();
    }

    @Override
    protected void configure(AuthenticationManagerBuilder auth) throws Exception {
        auth.userDetailsService(userDetailsService).passwordEncoder(getPasswordEncoder());
    }

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
                .csrf().disable()
                .authorizeRequests()
                .antMatchers("/my-profile", "/edit", "/edit/**", "/remove").hasAnyAuthority(Constants.USER)
                .anyRequest().permitAll()
                .and()
                .formLogin()
                .loginPage("/sign-in")
                .loginProcessingUrl("/sign-in-handler")
                .usernameParameter("uid")
                .passwordParameter("password")
                .defaultSuccessUrl("/my-profile")
                .failureForwardUrl("/sign-in-failed")
                .and()
                .logout()
                .logoutUrl("/sign-out")
                .logoutSuccessUrl("/welcome")
                .invalidateHttpSession(true)
                .deleteCookies("JSESSIONID")
                .and()
                .rememberMe()
                .rememberMeParameter("remember-me")
                .key("resume-online-key")
                .tokenRepository(persistentTokenRepository());
    }
}

sign-in.jsp
        <form action='<spring:url value="/sign-in-handler"/>' method="post">
            <c:if test="${sessionScope.SPRING_SECURITY_LAST_EXCEPTION != null}">

                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        ×
                    </button>
                        ${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message }
                    <c:remove var="SPRING_SECURITY_LAST_EXCEPTION" scope="session" />

            </c:if>

Вы можете использовать Ваши UID или Email или Phone в качестве логина

                Логин <input id="uid" name="uid" class="form-control" placeholder="UID или Email или Phone" required autofocus>

                Пароль <input id="password" type="password" name="password" class="form-control" placeholder="Password" required>

                <input type="checkbox" name="remember-me" value="true"> Запомнить меня

                <button type="submit" class="btn btn-success">Войти</button>
   </form>

ViewLoginController.java
@Controller
public class ViewLoginController {

    @GetMapping("sign-in")
    public String signIn() {
        return "sign-in";
    }

    @GetMapping("/sign-in-failed")
    public String signInFailed(HttpSession httpSession){
        if(httpSession.getAttribute("SPRING_SECURITY_LAST_EXCEPTION") == null){
            return "redirect:/sign-in";
        }
        return "sign-in";
    }
}

But i have - https://prnt.sc/s79zwz
I tried: change url on jsp spring:url, c:url, ${pageContext.request.contextPath}, just '/', daoAuthenticationProvider...
Thanks for help

A: I think that you may use failureUrl, instead of failureForwardUrl, for example:
and()
      .formLogin()
      .loginPage("/login")
      .loginProcessingUrl("/login/authenticate")
      .failureUrl("/login?param.error=bad_credentials")

The difference between the two is that failureForwardUrl may perform a server side forwarding (e.g. the POST that you observe to your endpoint) while failureUrl uses the default redirecting strategy of the platform and will cause a browser redirect (HTTP 302). The documentation is really vague and causes lots of confusion at least to me.


text:
Q: Onload in javascript/jquery not working I am working on an application and have the following jquery code in included .js file
function b(){}
b.prototype.expand=function(w){
    w.preventDefault();
    $(".sidebar-container").removeClass("sidebar-collapsed");
    $(".sidebar-collapse").show();
    $(".sidebar h2").show();
    $(".sidebar ul").show();
    $(".sidebar-expand").hide()
};
b.prototype.collapse=function(w){
    w.preventDefault();
    $(".sidebar-container").addClass("sidebar-collapsed");
    $(".sidebar-expand").show();$(".sidebar h2").hide();
    $(".sidebar ul").hide();
    $(".sidebar-collapse").hide()
};
b.prototype.listen=function(){
    $(document).on("click",".sidebar-collapse",this.collapse);
    $(document).on("click",".sidebar-expand",this.expand)
};

By Default the side panel is in expand condition and this code works fine for clicks but I have spent over 2 hours to make it to collapse by its By Default condition but no luck!
I am new to javascript and followed different methods by searching google and stackoverflow but no luck!
Any help would be much appreciated,
Thanks in advance.

A: You still hadn't posted your HTML code, so judging from what you have here, I'd do the following:
$(document).ready(function() {
    $(".sidebar-container").addClass("sidebar-collapsed");
    $(".sidebar-expand").show();
    $(".sidebar h2").hide();
    $(".sidebar ul").hide();
    $(".sidebar-collapse").hide()
});


text:
Q: How can I make page header region full width in Drupal bootstar theme? I am using the Bootstrap 3 theme. How can I make the page-header full width.  Similar full-width region you can see on this site.
HTML code:
starting from <header in the following code

Corresponding page.tpl.php
<div class="main-container <?php print $container_class; ?>">

    <?php if (!empty($site_slogan)): ?>

<?php print $site_slogan; ?>

    <?php endif; ?>

    <?php print render($page['header']); ?>

theme.info file
regions[navigation]     = 'Navigation'
regions[header]         = 'Top Bar' //THIS is correspond to that region
regions[highlighted]    = 'Highlighted'
regions[help]           = 'Help'
regions[content]        = 'Content'
regions[sidebar_first]  = 'Primary'
regions[sidebar_second] = 'Secondary'
regions[footer]         = 'Footer'
regions[page_top]       = 'Page top'
regions[page_bottom]    = 'Page bottom'

I tried adding "container-fluid" class in the page.tpl.php file at this code   but it is not changing.
The thing is I do not want entire main-content to be fluid, just that region. YOU CAN JUST SEE THE GitHub PAGE which I have linked above.
Thanks.

A: You need to change all the container classes inside the navbar to container-fluidThere is one right agter navbar navbar-default navbar-fixed-top


text:
Q: How to update List entity in room database? I have an entity in my app which contains a column of List. I can store and view with no issues but when i try to update i get an error.
I tried using ArrayList. That didn't work either.
This is what is the function in my DAO.
@Query("UPDATE Circles SET members = :list WHERE ID LIKE :search")
public void updateMembers(List<String> list, String search);

This is the columninfo:
@ColumnInfo
private List<String> members;

I was expecting that it would update the current list. However it is giving ab error:
Caused by: android.database.sqlite.SQLiteException: near "?": syntax error (code 1): , while compiling: UPDATE Circles SET members = ?,? WHERE ID LIKE ?


text:
Q: How to fetch structured API data to HTML (JSON.parse?) I've been working on a website that has to show data retrieved from an API, but I'm not that familiar with Javascript. Even after following some tutorials and looking up other topics on Stack Overflow, I don't seem to understand the logic. So I hope that anyone here could help me.
Right now I am pulling data from specified API's, for example:
$.get( "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=EUR",
    function( data ) {
        $( '#btcwaarde' ).text( data["EUR"] );
    }
);

This actually works, but only for retrieving 1 piece of data per API request. What I would like to do, is retrieve data from a bigger piece of JSON data, for example: from a result like this.
To do that I need to understand which function I should use and the array logic. I've also taken a look at JSON.parse but I don't really understand how it works.
Could anyone please explain this to me or give me an example that I can use to further build the code?
EDIT: What I would like to achieve, is to display the data in an HTML element on my website. So the HTML will be something like:

The unique s then have to display the data pulled from the API relevant to the .
For example #BTCprice has to show the info from [DISPLAY][BTC][EUR][PRICE] while #ETHmktcap has to show the info from [DISPLAY][ETH][EUR][MKTCAP].

A: After OP's edit. More complex sollution:
$(function() {

 $.get( "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH,DASH,LTC,XRP&tsyms=EUR", function( data ) {
  $.each(data['DISPLAY'], function( index, value ) {

    var spanPrice = $('')
        .attr('id', index+"price")
        .html(value['EUR']['PRICE']);

    var spanMktcap = $('')
        .attr('id', index+"mktcap")
        .html(value['EUR']['MKTCAP']);

    var $newDiv = $("
")   // creates a div element
        .attr("id", index)  // adds the id
        .addClass("element")   // add a class
        .append(spanPrice)
        .append(spanMktcap)

         $("code").append($newDiv);
  });
});

});

https://jsfiddle.net/d3gzz6x1/

A: Object access
The following was posted before a question update; see the answer updates farther below:
Without knowing exactly how you want to access the data, it is difficult to provide an answer that shows you exactly what you're looking to achieve.
But basically, an object in JavaScript has a key: value structure, which can be accessed in many different ways, and which way to use depends on the circumstances.

var req = new XMLHttpRequest();
req.addEventListener( "readystatechange", function() {
  if ( req.readyState === 4 ) {
    if ( req.status === 200 ) {
      var rt = req.responseText, // this is a string
          json = JSON.parse( rt ); // parse the string to an object
      // access the object values
      console.log( json[ "RAW" ][ "BTC" ][ "EUR" ][ "TYPE" ] );
      // or
      console.log( json.RAW.BTC.EUR.TYPE );
    } else if ( req.status ) {
      console.warn( req.status );
    } else {
      console.error( "Danger Will Robinson!" );
    }
  }
}, false );
req.open( "GET", "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH,DASH,LTC,XRP&tsyms=EUR", true );
req.setRequestHeader( "Accept", "application/json" );
req.send();

Updates (as mentioned above)
You've got a couple of options here; you can either populate hard-coded HTML or dynamically create new HTML as required.
Population
Since the HTML elements are already in place, you'd do well to have a map to them that tells you what to fill them with. This could be more dynamic than demonstrated by changing the element ids to more closely resemble the path(s) through the json to the data, but for a simple demo:

function updateHTML( json ) {
  const lookup = function( id ) {
      return { "BTCprice":  json.DISPLAY.BTC.EUR.PRICE,
               "BTCmktcap": json.DISPLAY.BTC.EUR.MKTCAP,
               "ETHprice":  json.DISPLAY.ETH.EUR.PRICE,
               "ETHmktcap": json.DISPLAY.ETH.EUR.MKTCAP
               // etc.
      }[ id ] || "Unknown";
    },
    spans = document.querySelectorAll( "span[id]" );
  spans.forEach( function( v ) {
    v.textContent = lookup( v.id );
  } );
}

function requestStuff( addr ) {
  var req = new XMLHttpRequest(), sts;
  req.addEventListener( "readystatechange", function() {
    if ( req.readyState === 4 ) {
      sts = req.status;
      if ( sts === 200 ) {
        updateHTML( JSON.parse( req.responseText ) );
      } else if ( sts ) {
        console.warn( sts );
      } else {
        console.error( "Danger Will Robinson!" );
      }
   }
  }, false );
  req.open( "GET", addr, true );
  req.setRequestHeader( "Accept", "application/json" );
  req.send();
}

requestStuff( "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH,DASH,LTC,XRP&tsyms=EUR" );
span:before {
    content: attr( id ) ": ";
}
span:first-child:after {
    content: ", ";
}

Dynamic creation
This would be a very similar process as above, but instead of mapping to already existent HTML, we build it as needed, using an object of nested arrays as the map of what to build and with what we fill it.

function updateHTML( json ) {
  const props = {
    "BTC": [ [ "BTCprice",  json.DISPLAY.BTC.EUR.PRICE ],
             [ "BTCmktcap", json.DISPLAY.BTC.EUR.MKTCAP ] ],
    "ETH": [ [ "ETHprice",  json.DISPLAY.ETH.EUR.PRICE ],
             [ "ETHmktcap", json.DISPLAY.ETH.EUR.MKTCAP ] ]
    };
  var prop, div, span;
  for ( prop in props ) {
    if ( props.hasOwnProperty( prop ) ) {
      div = document.createElement( "div" );
      props[ prop ].forEach( function( v ) {
        span = document.createElement( "span" );
        span.textContent = v[ 1 ];
        span.id = v [ 0 ];
        div.appendChild( span );
      } );
      document.body.appendChild( div );
    }
  }
}

function requestStuff( addr ) {
  var req = new XMLHttpRequest(), sts;
  req.addEventListener( "readystatechange", function() {
    if ( req.readyState === 4 ) {
      sts = req.status;
      if ( sts === 200 ) {
        updateHTML( JSON.parse( req.responseText ) );
      } else if ( sts ) {
        console.warn( sts );
      } else {
        console.error( "Danger Will Robinson!" );
      }
   }
  }, false );
  req.open( "GET", addr, true );
  req.setRequestHeader( "Accept", "application/json" );
  req.send();
}

requestStuff( "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH,DASH,LTC,XRP&tsyms=EUR" );
span:before {
    content: attr( id ) ": ";
}
span:first-child:after {
    content: ", ";
}

Why aren't the demos written in jQuery?
As you (the OP) stated in the question:

I'm not that familiar with Javascript. Even after following some tutorials and looking up other topics on Stack Overflow, I don't seem to understand the logic.

As jQuery is a JavaScript library, to better understand how to use it, you should first have a basic understanding of vanilla JavaScript.
DOM manipulation, reading and writing data to and from arrays and objects, making asynchronous HTTP requests etc. is the backbone of JS.
I wrote the demos in JavaScript to better show what is actually happening.
Learn and use jQuery once you are familiar with JS.


text:
Q: Making calculated column fo weeknum in sharepoint 2007 Im using sharepoint 2007, and there is no weeknum function built-in.
how can I add calculated column in sharepoint list to show weeknum of date in another column?

A: here is a formula to show a weeknum in sharepoint (no built-in function).
=IF(ROUNDUP((ROUNDDOWN([Date],0)-(DATE(YEAR(ROUNDDOWN([Date],0)),1,1))+WEEKDAY((DATE(YEAR(ROUNDDOWN([Date],0)),1,1))))/7,0)>52,1,ROUNDUP((ROUNDDOWN([Date],0)-(DATE(YEAR(ROUNDDOWN([Date],0)),1,1))+WEEKDAY((DATE(YEAR(ROUNDDOWN([Date],0)),1,1))))/7,0))

the formula returns always up to 52 weeks, and the week that has 1st January is the first week in a year.
the week starts on a weekday depended on your SP server settings.
if you need to use the 53 weeks standart, use this part only
=ROUNDUP((ROUNDDOWN([Date],0)-(DATE(YEAR(ROUNDDOWN([Date],0)),1,1))+WEEKDAY((DATE(YEAR(ROUNDDOWN([Date],0)),1,1))))/7,0)


text:
Q: The problem with guards in Laravel (Auth::login($user) function does not work) When creating multiatorization in laravel, I edited the file config/auth.php as follows:
<?php

return [

    /*
    |--------------------------------------------------------------------------
    | Authentication Defaults
    |--------------------------------------------------------------------------
    |
    | This option controls the default authentication "guard" and password
    | reset options for your application. You may change these defaults
    | as required, but they're a perfect start for most applications.
    |
    */

    'defaults' => [
        'guard' => 'client',
        'passwords' => 'clients',
    ],

    /*
    |--------------------------------------------------------------------------
    | Authentication Guards
    |--------------------------------------------------------------------------
    |
    | Next, you may define every authentication guard for your application.
    | Of course, a great default configuration has been defined for you
    | here which uses session storage and the Eloquent user provider.
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | Supported: "session"
    |
    */

    'guards' => [
        'client' => [
            'driver' => 'session',
            'provider' => 'clients',
        ],
        'master' => [
            'driver' => 'session',
            'provider' => 'masters',
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | User Providers
    |--------------------------------------------------------------------------
    |
    | All authentication drivers have a user provider. This defines how the
    | users are actually retrieved out of your database or other storage
    | mechanisms used by this application to persist your user's data.
    |
    | If you have multiple user tables or models you may configure multiple
    | sources which represent each model / table. These sources may then
    | be assigned to any extra authentication guards you have defined.
    |
    | Supported: "database", "eloquent"
    |
    */

    'providers' => [
        'clients' => [
            'driver' => 'eloquent',
            'model' => App\Models\Client::class,
        ],
        'masters' => [
            'driver' => 'eloquent',
            'model' => App\Models\Master::class,
        ],

        // 'users' => [
        //     'driver' => 'database',
        //     'table' => 'users',
        // ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Resetting Passwords
    |--------------------------------------------------------------------------
    |
    | You may specify multiple password reset configurations if you have more
    | than one user table or model in the application and you want to have
    | separate password reset settings based on the specific user types.
    |
    | The expire time is the number of minutes that each reset token will be
    | considered valid. This security feature keeps tokens short-lived so
    | they have less time to be guessed. You may change this as needed.
    |
    */

    'passwords' => [
        'clients' => [
            'provider' => 'clients',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
        'masters' => [
            'provider' => 'masters',
            'table' => 'password_resets',
            'expire' => 60,
            'throttle' => 60,
        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Password Confirmation Timeout
    |--------------------------------------------------------------------------
    |
    | Here you may define the amount of seconds before a password confirmation
    | times out and the user is prompted to re-enter their password via the
    | confirmation screen. By default, the timeout lasts for three hours.
    |
    */

    'password_timeout' => 10800,

];

*

*client - designed for client authentication

*master - designed for authentication of masters

When following the route to register the master, my Auth::login($user) method does not authenticate the him. And when calling the dd(Auth::user()) function, it returns null.
As I later found out, only the default guard (i.e. the client) is triggered for me.
How do I make it so that guard master is triggered for authentication of masters, and guard client is triggered for authentication of clients
Additionally:
my routes:
Route::middleware('guest')->group(function () {
// client:register
Route::get('/client/register', [ClientRegisterController::class, 'create'])
Route::post('/client/register', [ClientRegisterController::class, 'store'])
// master:register
Route::get('/master/register', [MasterRegisterController::class, 'create'])
Route::post('/master/register', [MasterRegisterController::class, 'store'])
});

my MasterRegisterController:
class MasterRegisterController extends Controller
{

    /**
     * Display the registration view.
     *
     * @return \Illuminate\View\View
     */
    public function create()
    {
        return view('auth.masterRegister');
    }

    /**
     * Handle an incoming registration request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\RedirectResponse
     *
     * @throws \Illuminate\Validation\ValidationException
     */
    public function store(Request $request)
    {
        $request->validate([
            'name' => ['required', 'string', 'max:255'],
            'email' => ['required', 'string', 'email', 'max:255', 'unique:masters'],
            'password' => ['required', 'confirmed', Rules\Password::defaults()],
        ]);

        $user = Master::create([
            'name' => $request->name,
            'email' => $request->email,
            'password' => Hash::make($request->password),
        ]);

        // add role to master
        $user->attachRole('master');

        event(new Registered($user));

        Auth::login($user);

        return redirect(url('/master/dashboard'));
    }
}


text:
Q: Request body arrives in different form on Heroku (new line characters) Weird problem. As an assignment I have to accept only requests with data {'title':'some movie title'}. On local host my code works fine. On Heroku data is always recognized as incorrect.
views.py:
class MovieViewSet(viewsets.ModelViewSet):
    queryset = Movie.objects.all()
    serializer_class = MovieSerializer

    def create(self, request, *args, **kwargs):
        print("Data of the post request for debug:")
        print(request.data)
        title = request.data.get('title')
        if not title:
            return Response({'Error': "Body should be {'title':'The title of the Movie'}"}, status=status.HTTP_400_BAD_REQUEST)

So for example request with content {'title':'Lord of the rings'} returns invalid body error. Tried with browser (django api site), curl and some web request generator. Locally is fine, on Heroku - invalid request.
So I printed it on Heroku and this is what I got:
<QueryDict: {'_content_type': ['application/json'], '_content': ['{\r\n    "title": "snatch"\r\n}']}>

Apparently Heroku adds some whitespace characters to received requests. Any idea why this is happening?


text:
Q: How is 'bolt-on' the same or different from add-on, extension, or module? I hear the term 'bolt-on' used in many contexts, specifically in my organization where PeopleSoft is used extensively.  I don't know exactly how it differs from an 'extension' of an existing product, a new module within an application, or an 'add-on' like you would purchase for a product you own.  Is there a more formal definition of 'bolt-on' that I'm not familiar with?

A: Most of those terms only have meaning in a specific context. In particular, I've only heard bolt on used with respect to PeopleSoft, where it means a separate application that integrates with the PeopleSoft ecosystem. Here's an article about the difference between bolt-ons and customizations (tl/dr: a customization is a change to some part of the PeopleSoft system, a bolt-on is a separate thing that uses the PeopleSoft system).
The other terms you used, module, extension, and add-on also need to be considered in a particular context. For example, in some contexts a module could be some source code component that needs to be compiled into a program, while in others it may just be a functional component of the program that can be added without modifying the original.
If you're unsure of what someone in your office means by a particular term, ask them. If you feel you can't do that without looking uneducated, check the documentation for the pieces of software that they're talking about.

A: As M. Dudley stated in a comment below the answer, "bolt-on" is used to identify a component that is quickly and easily added to another system. This distinguishes it from components that require more sophisticated integration or customization.

I would also add that this is mainly a slang term, and can also mean anything added to a system hastily, without regard for suitability or esthetics.


text:
Q: Limits to solve for equation of line If $\lim\limits_{x \to 0^+} f(x)=3$, $\lim\limits_{x \to 0^-}\ f(x)=3$ and $\ f(0)=5,f'(x)<0$ for x belonging to (-inf,0) and $\ f'(x)>0$ for x belonging to (0,Inf) , then the LINE $\lim\limits_{x \to 0}\ f(\cos^3x-\cos^2x) = x \lim\limits_{x \to 0}\ f(\sin^2x-\sin^3x)$  is ?
PS, can that x on RHS be taken inside the limit, even if that wouldnt help in this case?


text:
Q: Remove Duplicates from MySQL Table with Many-to-Many Relationships I have four tables (queue, songs, titles, songs_titles) that are related to each other and I need to remove duplicates that occur in the queue table.
Queue table structure is:
ID (primary key)
songID (foreign key from song table)
sortID

Titles table has structure such as:
ID (primary key)
title
author
lyrics

Songs_Titles table is structured as:
songID (foreign key from song table)
titlesID (foreign key from titles table)
info

Song table has a number of fields, but includes an ID field that is referenced in queue tables and songs_titles table.
How do I go about removing duplicate records from the queue table that have song records containing the same title?
Here's sample data return by this SQL statement from queue table.
SELECT * FROM queue;

ID    songID    sortID
7021    9722    8000
7018    5971    6000
7017    5953    10000
7016    10145   4000
7020    16469   14000

The queue table has duplicate titles that I need to remove from the table. I tried using this SQL statement. It does show duplicate title on "Zion Hears the Watchmen's Voices" but the "Away in a Manger" is not a duplicate, but the SQL statement duplicates it in the return statement.
SELECT ti.title AS TitlesTableTitle,
          q.songID AS SongsTableID,
          q.ID AS QueueTableID
    FROM queue q
    INNER JOIN songs_titles st ON q.songID = st.songID
    INNER JOIN titles ti ON st.titlesID = ti.ID;

TitlesTableTitle                       SongsTableID   QueueTableID
Away in a Manger                        9722           7021
Away in a Manger                        9722           7021
O Come, Little Children                 9722           7021
Zion Hears the Watchmen's Voices        5971           7018
Hush, My Dear, Lie Still and Slumber    5953           7017
Gentle Mary Laid Her Child              10145          7016
Zion Hears the Watchmen's Voices        16469          7020

A: I came up with a solution to my problem using this SQL. It locates records in queue table that have duplicate titles and then removes the duplicate having the highest ID.
DELETE FROM
  queue
WHERE
  ID IN (
    SELECT
      MAX(ID)
    FROM
      (
        SELECT
          DISTINCT(t1.ID),
          t1.title
        FROM
          (
            SELECT
              ti.title,
              q.songID,
              q.ID
            FROM
              queue q
              JOIN titles ti ON EXISTS (
                SELECT
                  *
                FROM
                  songs_titles st
                WHERE
                  q.songID = st.songlistID
                  AND st.titlesID = ti.ID
              )
          ) t1
      ) t2
    GROUP BY
      t2.title
    HAVING
      COUNT(t2.title) > 1
  );

A: Sqeeze the bridge-table out of the main query (you are not selecting any columns from it)

SELECT ti.title AS TitlesTableTitle
        , q.songID AS SongsTableID
        , q.ID AS QueueTableID
 FROM queue q
 JOIN titles ti ON EXISTS (
        SELECT *
        FROM songs_titles st
        WHERE q.songID = st.songID
        AND st.titlesID = ti.ID
        );


text:
Q: How to order month name starting from current month Say this is the array used to store the months,
String months[] = {"January", "February", "March", "April",
            "May", "June", "July", "August", "September",
            "October", "November", "December"};

I have used this method to get the current month
int monthName=calendar.get(Calendar.MONTH);

What is the best way to reorder the array into a new array or arraylist starting from the current month.
Ex: The current month is August, so the desired array or Arraylist would be
months[] = {"August", "September", "October", "November",
            "December", "January", "February", "March", "April",
            "May", "June", "July"};

A: just another option for those that soon or later want to do the same using java 8 :)
List<Month> myMonth = Arrays.asList(Month.values());

Collections.rotate(myMonth, 1 - LocalDate.now().getMonthValue());

the output:

[AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER, JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY]

A: You can use Collections.rotate. To rotate left you can use negative value of elements.
String months[] = {"January", "February", "March", "April",
        "May", "June", "July", "August", "September",
        "October", "November", "December"};

int monthIndex = LocalDate.now().getMonth().ordinal();//indexed from 0

Collections.rotate(Arrays.asList(months), -monthIndex); //negative value rotates to left

System.out.println(Arrays.toString(months));

Output: [August, September, October, November, December, January, February, March, April, May, June, July]

A: With Java 8's Month.values(), and Collections.rotate():
int monthOffset = LocalDate.now().getMonth().getValue() - 1;
List<Month> months = Arrays.asList(Month.values());
Collections.rotate(months, -monthOffset);
System.out.println(months);

Prints:
[AUGUST, SEPTEMBER, OCTOBER, NOVEMBER, DECEMBER, JANUARY, FEBRUARY, MARCH, APRIL, MAY, JUNE, JULY]

A: Because you already define the names of months in an array :
String months[] = {"January", "February", "March", "April",
    "May", "June", "July", "August", "September",
    "October", "November", "December"};

You can use a simple loop like this :
String[] newArray = new String[12];

Calendar calendar = Calendar.getInstance();
int monthName = calendar.get(Calendar.MONTH);
int i = 0;
do {
    newArray[i] = months[(monthName + i) % 12];
    i++;
} while (i < 12);

System.out.println(Arrays.toString(newArray));

Output
[August, September, October, November, December, January, February, March, April, May, June, July]

A: this how could i do it
int pos = -1;
for(int i=0;i<months.length;i++)
  if(months[i].equals(monthName))
  {
    pos = i;
    break;
  }

String[] newOrderedMonths = new String[12];
int index = 0;
for(int i = pos ; i < months.length; i++ )
  newOrderedMonths[index++] = months[i];

for(int i = 0 ; i < pos; i++ )
  newOrderedMonths[index++] = months[i];

A: Try something like this:
String[] newMonths = Arrays.copyOfRange(months, monthName, monthName + 12);
System.arraycopy(months, 0, newMonths, 12 - monthName, monthName);

A: Whole solution using Comparator.
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Date;
import java.util.List;

/**
 * The Class Test.
 */
public class Test {

    /**
     * The main method.
     *
     * @param args the arguments
     */
    public static void main(String[] args) {
        // First convert to List.
        String[] monthsAsArray = { "August", "September", "October", "November", "December", "January", "February",
                "March", "April", "May", "June", "July" };
        List<String> months = Arrays.asList(monthsAsArray);

        // Comparator can do a lot of the work for us...
        final Comparator<String> dateCompare = new Comparator<String>() {
            public int compare(String o1, String o2) {
                Date month1 = null, month2 = null;
                try {
                    SimpleDateFormat s = new SimpleDateFormat("MMM");
                    month1 = s.parse(o1);
                    month2 = s.parse(o2);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                return month1.compareTo(month2);
            }
        };
        Collections.sort(months, dateCompare);
        System.out.print(months);
    }
}

A: This should do it, use Collections.rotate.
Logic of rotation time is given, code accordingly
import java.util.*;

public class Rotate {
    public static void main(String[] args) {

        String months[] = { "January", "February", "March", "April", "May", "June", "July", "August", "September",
                "October", "November", "December" };

        List<String> mons = Arrays.asList(months);

        System.out.println("Before : " + Arrays.toString(months));

        // September is at 9the position so rotate it 4 times, i,e 13th position, 13%12 = 1
        Collections.rotate(mons, 4);

        months = (String[]) mons.toArray();

        System.out.println("After : " + Arrays.toString(months));
    }
}

A: How about this:
import java.util.Arrays;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;

public class RotateDemo {
    public static void main(String[] args)
    {
        String months[] = {"January", "February", "March", "April",
                "May", "June", "July", "August", "September",
                "October", "November", "December"};

        Date date = new Date();
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        int month = cal.get(Calendar.MONTH);

        System.out.println(month + "Date: " + date);
        System.out.println("Original Array : " +
                Arrays.toString(months));

        Collections.rotate(Arrays.asList(months), month-2);

        System.out.println("Modified Array : " +
                Arrays.toString(months));
    }
}

A: If you don't want to alter the input array you might have a look at this possible solution
public class MonthDemo {

    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();

        String[] months = {"January", "February", "March", "April",
            "May", "June", "July", "August", "September",
            "October", "November", "December"};

        // get index of current month
        int monthIndex = calendar.get(Calendar.MONTH);

        // array to keep the orderen month names
        String[] monthOrdered = new String[months.length];

        // create a stream with indexes for one year start with current month
        IntStream.range(monthIndex, monthIndex + 12)
                .sequential()
                // fill the ordered array
                .forEach(i -> monthOrdered[i - monthIndex] = months[i % 12]);
        System.out.println("monthOrdered = " + Arrays.toString(monthOrdered));
    }
}

output (wrapped)
monthOrdered = [August, September, October, November, December, January, \
    February, March, April, May, June, July]


text:
Q: Why Does Iron-Router onBeforeAction Logic Not Affect the DOM? I've decided to implement a quick little animation between pages for Meteor. The way I've decided to do this is by using a onBeforeAction hook, to set a DOM element to display:none, and then to animate it in with an onAfterAction.
The problem is, the element never disappears off the screen. I'm not sure what I'm doing wrong. Here's my route:
Router.route('/priority/:_id', {
  path: '/priority/:_id',
  template: 'priority',
  data: function(){
    return Priorities.findOne({_id: this.params._id})
  },
  onBeforeAction: function() {
    $('.show-title').css('display', 'none');
    this.next();
  }
  // ,
  // onAfterAction: function() {
  //   $('.show-title').velocity('transition.fadeIn', 1000);
  // }
})

And for reference, here's the template:
<template name="priority">

Priority: {{title}}

</template>

Am I not understanding how to use these actions properly?

A: The hooks are called immediately, before the DOMs ready.
You need to do that in the template's rendered function instead:
Template.priority.rendered = function() {
    $('.show-title').css('display', 'none');
    $('.show-title').velocity('transition.fadeIn', 1000);
}


text:
Q: Meet endless restart when create unique constraint after neo4j-admin import I'm setting up a new neo4j v3.5.4 community instance. After install, considering my machine contains 32G RAM, I set the initial and max heap size for neo4j to 16G, and the page cache to 40G. Then I did below steps:

*

*use neo4j-admin tool to import my data into db, which contains

  119263908 nodes
  221814590 relationships
  119263975 properties

*start neo4j.

*One of my node label is called "Contact", which contains a "tel" property. Since the tel for each contact is unique, I want to create unique constraint as below:

  CREATE CONSTRAINT ON (c:Contact) ASSERT c.tel IS UNIQUE

Then I met the endless restart... As below log shown, neo4j starts to populate index, after several minutes, the graph.db becomes unavailable, then it restarts. After restart, it tries to populate the index, and after several minutes, it restarts again, endless. There is no exception or error in log.
2019-04-25 06:08:57.100+0000 INFO [o.n.k.i.a.i.IndexPopulationJob] Index population started: [:Contact(tel) [provider: {key=native-btree, version=1.0}]]
2019-04-25 06:14:03.535+0000 INFO [o.n.g.f.m.e.CommunityEditionModule] No locking implementation specified, defaulting to 'community'
2019-04-25 06:14:03.718+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Creating 'graph.db' database.
2019-04-25 06:14:03.795+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Requirement `Database available` makes database graph.db unavailable.
2019-04-25 06:14:03.798+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Database graph.db is unavailable.
2019-04-25 06:14:03.853+0000 INFO [o.n.i.d.DiagnosticsManager] --- INITIALIZED diagnostics START ---
...
.....
.........
2019-04-25 06:14:06.222+0000 INFO [o.n.k.i.a.i.IndexPopulationJob] Index population started: [:Contact(tel) [provider: {key=native-btree, version=1.0}]]
2019-04-25 06:19:11.935+0000 INFO [o.n.g.f.m.e.CommunityEditionModule] No locking implementation specified, defaulting to 'community'
2019-04-25 06:19:12.106+0000 INFO [o.n.g.f.GraphDatabaseFacadeFactory] Creating 'graph.db' database.
2019-04-25 06:19:12.186+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Requirement `Database available` makes database graph.db unavailable.
2019-04-25 06:19:12.188+0000 INFO [o.n.k.a.DatabaseAvailabilityGuard] Database graph.db is unavailable.

I have no idea why it happens. Any suggestion will be appreciated!