I need to combine the multiple rows into either single row or two rows by comma separator as per the specified length as below:  +-------------------------------------+--------------------------------+     ID                                         Name +-------------------------------------+--------------------------------+      1                                       Rohit     1                                       Virat     1                                       Dhawan     1                                       Vijay     2                                       Mohit     2                                       Raina +-------------------------------------+--------------------------------+   Here we are trying to combine multiple rows into single row but it needs to be with condition that if the first rows crosses the length of 12 then insertion of new record as need to be shown as below:  +-------------------------------------+--------------------------------+           ID                                         Name +-------------------------------------+--------------------------------+          1                                       Rohit,Virat         1                                       Dhawan,Vijay         2                                       Mohit,Raina +-------------------------------------+--------------------------------+
I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)
Does the logistic map have an attractor for a particular value of the parameter? Background:  Currently I am studying a course on non-linear dynamics. We have been studying about attractors only intuitively, so I do not have a definition for an attractor. Let me give you a couple of examples.  Consider a problem where a ball is slipping in a parabolic valley. It is clear intuitively and quantitatively that the lowermost point of the parabola is the attractor for it.   Say we are talking about a . We may not guess intuitively that there is an attractor, a priori, but using simulations for different values of initial conditions, we may qualitatively (and maybe quantitatively too) compare the trajectories for different initial conditions and convince ourselves that we have an attractor.  Problem:  Consider the  given as   $$x_n = ax_{n-1}{(1-x_{n-1})}.$$  Let us fix a value of the parameter where we "know" that the logistic map exhibits chaos. Say $a=3.9$.  Let us take the definition for the term attractor from :  An attractor is a subset $A$ of the phase space characterized by the following three conditions:   $A$ is forward invariant under $f$: if $a$ is an element of $A$ then so is $f(t,a)$, for all $t &gt; 0$. There exists a neighborhood of $A$, called the basin of attraction for $A$ and denoted $B(A)$, which consists of all points $b$ that "enter $A$ in the limit $t → ∞$". More formally, $B(A)$ is the set of all points $b$ in the phase space with the following property: For any open neighborhood $N$ of $A$, there is a positive constant $T$ such that $f(t,b) ∈ N$ for all real $t &gt; T$. There is no proper subset of $A$ having the first two properties.   How might we demonstrate/convince ourselves of/disprove the statement that the logistic map does have an attractor for a particular choice of the parameter at which the map exhibits chaos? Bread and butter is/are my breakfast? Bread and butter (is or are) my breakfast?  And what's the difference between the above sentence and saying "My breakfast is bread and butter"?  Thanks. Can I load a .NET assembly at runtime and instantiate a type knowing only the name? Is it possible to instantiate an object at runtime if I only have the DLL name and the class name, without adding a reference to the assembly in the project? The class implements a interface, so once I instantiate the class, I will then cast it to the interface.  Assembly name:     library.dll    Type name:      Company.Project.Classname     EDIT: I dont have the absolute path of the DLL, so Assembly.LoadFile won't work. The DLL might be in the application root, system32, or even loaded in the GAC. Formal proof for $q \land \neg q \vdash r \land \neg r$ Selecting all files in directory for merging in QGIS Processing? I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the saga:mergeshapeslayers algorithm to merge all the files in the Output folder. I have used the Model Builder and although it is helpful to an extent, I find that it is used for specific purposes whereas I am attempting to make a script for generic purposes.   Code:  ##Test=name ##Select_folder=folder ##Result=output vector  import os import glob  path_1 = Select_folder path = path_1 os.chdir(path)  def function():      output = glob.glob(path_1 + './*.shp')     x = 0      while output[x]:         for fname in glob.glob("*.shp"):             outputs_1 = processing.runandload("qgis:fieldcalculator", output[x], 'Number', 1, 10, 0, True, 1 , "C:\Users\Me\Desktop\Output\\"  + fname)             multiple_0 = glob.glob("*.shp")             x = x + 1          if x + 1 &gt; len(output):             processing.runalg("saga:mergeshapeslayers", output[0], ";".join(multiple_0) , Result)             break         else:             continue  if path_1:     function() else:    pass #!/bin/bash - no such file or directory Can the size of pointers vary between data and function pointers? I have a .net client application which is connected to a remote database. Is it safe to keep a single connection open for the lifetime of the client (hours)? Does the answer hold if I have multiple (10 or 100) clients running? Awesome symbols and characters in a bash prompt I just ran across a screenshot of someone's terminal:    Is there a list of all of the characters which can be used in a Bash prompt, or can someone get me the character for the star and the right arrow? Placing nodes midway on paths using |- or -| in tikz I make frequent use of |- and -| with computed points in diagrams, like so:  \coordinate (a) at (0,0); \foreach \x in (1,...,10) {     \coordinate (b) at ({whateverFunction(\x)},{whateverOtherFunction(\x)});     \draw (a) |- (b); %Straight line segment     \draw (b) -| (a); %Another straight line segment     \coordinate (a) at (b); }   To get plots like:   I would like to be able to label the midpoint of each line segment, but doing something like node[midway,above] {a} does not act like expected:    I want something like:    Why does midway not work, and what is a good workaround here? How to find modulo of large numbers like $9801\! \pmod {\!32}$ It is easy to calculate small examples like $26\pmod {5}$ but how do you calculate examples like $9801 \pmod {32}$ without a calculator. Unexpected voltage with switch turned off I am doing some work on a ceiling light and I notice that, even though the light-switch is off, my voltage tester shows voltage present.  Answers to other questions (below) explain about phantom voltages but how exactly do I test for these and know what voltages are real and what are phantom so that I can work safely?    Phantom voltage questions We are using Nginx to serve static files on a development platform. As it is a development platform, we'd like to disable caching so that each change is propagated to the server. The configuration of the VHost is quite simple:  server {   server_name  static.server.local;   root /var/www/static;    ## Default location   location / {     access_log        off;     expires           0;     add_header        Cache-Control private;   }  }   When we access an HTML file (http://static.server.local/test.html), we have no issue: the server returns a code 304 Not Modified as long as the file is not changed, and a 200 OK response with the modified file when the file is changed. However, it seems to behave differently with a Javascript or a CSS file. Once the file is changed, we get a 200 OK response as expected, but with the old text. Is there an internal cache mechanism in Nginx that could explain this behaviour? Or some configuration that we should add?    As a side note, here is the header returned by Nginx when the file has been modified (it seems correct):  Accept-Ranges:bytes Cache-Control:max-age=0 private Connection:keep-alive Content-Length:309 Content-Type:text/css Date:Fri, 13 May 2011 14:13:13 GMT Expires:Fri, 13 May 2011 14:13:13 GMT Last-Modified:Fri, 13 May 2011 14:13:05 GMT Server:nginx/0.8.54   Edit After trying different settings with the expires directive and Cache-Controlheader, I made some further investigations. In fact, the server is installed on a VirtualBox guest Ubuntu, and data are read from a shared folder that is on the Mac OSX host. If the file is edited from an IDE (NetBeans) on the host, it seems that changes do not appear whereas if I edit it directly on the guest (using VIM), it is refreshed. The strange thing is it does not behave similarly with HTML files. Quite puzzling.  Edit 2 (ANSWER) Indeed, the origin of the issue was more on the VirtualBox side. Or rather a conflict between VirtualBox and the "sendfile" option of the server. This link  gave me the solution: switch the sendfile flag in the server configuration to off:  sendfile  off;   Hope this could also help other person using VirtualBox for development. :) There are some additional information on the . Are the square roots of all non-perfect squares irrational? Keeping chunks loaded in minecraft I have built an iron farm somewhere far away from my actual spawn chunks in my single player world. In hindsight, this was a dumb idea, but I can't exactly change it anymore. I'd like to keep the thing running all the time, so I'm looking for a way to keep the chunks loaded.  I'm running minecraft 1.12.1, is it possible at the moment? I have looked at some chunk loader mods, but chicken chunk loader hasn't been updated yet, and the others simply didn't work.  I have tried moving the spawn chunks, but that hasn't done anything either.  Edit: I have worked this out with IronAnvil, and it ended up being a render setting in optifine which didn't load them correctly somehow. It has been working fine after I reset my optifine settings to default. Calculate probability (area) under the overlapping area of two normal distributions Can't get my model out of wireframe mode I'm new to Blender and this site, so I apologize in advance if I'm not following any of the proper etiquette.  I'm no artist, but I'm trying to learn Blender so that I have some programmer art for me to work around in Unity.    I followed a tutorial for making a basic human model, I rigged it with rigify, and now I'm starting to export it following yet another tutorial.  The thing is, when I was trying to rig the model, I couldn't get the model to go transparent so that I could see the bones inside the model.  Eventually, I managed to get it into wireframe mode, but I can't get it back into solid mode.    It's probably just a display thing and not a property of the model itself, but I want to be sure.  I'm looking at the display options under the "Figure" pane in Blender, and none of the Display check boxes are checked, including the one that says "Wire".  I don't want to import a plain wireframe model into Unity, and even if that doesn't happen, this is functionality of Blender that I should really know anyway, so I'd appreciate any help that anyone has to offer.  If necessary, I can upload the .blend file, but I'm not sure what site people would prefer that I upload it to. The origin of the value of speed of light in vacuum Meaning, why is it the exact number that it is? Why not 2x10^8 m/s instead of 3? Does it have something to do with the mass, size or behavior of a photon? To be clear, I'm not asking "how we determined the speed of light". I know there isn't a clear answer, I'm really looking for the prevailing theories. The title word filter is one of the worst ideas ever implemented on SO There are numerous (, , ) questions concerning this problem. I realize this is a borderline duplicate, but I'll re-iterate the futility of this particular filter and why it should be outright removed from Stack Overflow.  Do you know how effective this is in preventing users who just don't care from posting questions with bad titles? 100% ineffective. What do these users do?   Replace it with a synonym: "issue," "trouble," "predicament," "botheration" or what have you. Or worse, they simply work around the filter by deliberately misspelling the word or inserting space or punctuation:    () ?    and the coup de grâce:      I mean, even Jeff . This adds zero value to the title. In fact, it looks worse. Why, oh why are people  to scrap a bad feature? All this does is:   Prevent people who have a  to use the word "problem" in the title from posting questions with an appropriate title. Break the search feature because of workarounds or the need to use less descriptive titles than the error itself   This is an extraordinarily useless (and harmful) feature. Please, for the love of Cthulhu,  remove, eliminate, abolish, eradicate, extirpate this "feature" from Stack Overflow.    Bonus:     So I can't mention the Halting Problem in the title? – Keith Thompson Nov 1 at 19:05      @KeithThompson Maybe it's a "Halting Issue". Or "Need help with Halting". Or the "Halting thing in Computability Theory". – slhck Nov 1 at 19:14 Stuck on two valid squares in minesweeper How to solve? The 1 indicates that ones of the two questioned flags is a mine and 3 also indicates the same. How to choose logically between any one of them?