text:
Q: LWC - How to get field values from record I'm trying to get values from a Record Page and pass that to an Apex class. My question is, since the component works for single record and I have to get some fields from that record and use it in an apex class, what is the best aproach? Pass just the record Id and query the fields in apex (just one record here) or get those fields using using import (getFields)... I'm tryning to do the last option and it isn't working. Could someone help me please? Below I'm providing a sample of what I'm trying to do.
import { LightningElement, api, wire} from 'lwc';
import testMethod from '@salesforce/apex/testClassController.testMethod';
import {getRecord, getFieldValue} from 'lightning/uiRecordApi';
import OBJ_FIELD1 from '@salesforce/schema/Contact.testField1__c'
import OBJ_FIELD2 from '@salesforce/schema/Contact.testField2__c'

const FIELDS = [
    OBJ_FIELD1
    OBJ_FIELD2
];

export default class testJS extends LightningElement {
    @api recordId;

    @wire(getRecord, { recordId:'$recordId', testFields: FIELDS})
    loadFields({error, data}){
        if(error){

        }else if(data){
            const paramField1 = getFieldValue(data, OBJ_FIELD1);
            const paramField2 = getFieldValue(data, OBJ_FIELD2);
        }
    }

    handleClick(){
        testMethod({recId : this.recordId}).then(response => {

        }).catch(error => {
            console.log('Error: ' +error.body.message);
        });
    }
}

A: "Best Approach" is likely dependent on what you need to do.  If you intend to use these (or other) field values directly in the LWC, it probably makes sense to use getRecord/getFieldValue.  If you are only fetching the values to use in the Apex Controller, it is probably simpler to just pass the recordId to your controller and query there.  If if makes sense for your controller method response to include any data you need from the record, it may also make sense to pass only the recordId to Apex, and pass back all data needed in the page.
As to why your current attempt is not working, it is not clear what you mean.  In the code shown, you are not using the fetched field values stored in paramField1 and paramField2; you are only passing recordId to the controller method in handleClick.  If you tried passing them and didn't see any data in apex, try temporarily dumping your results to the Javascript console.  Also, you aren't doing anything with the error response, so it's possible there is an error you are not seeing.  Try updating your wired method like so:
@wire(getRecord, { recordId:'$recordId', testFields: FIELDS})
    loadFields({error, data}){
        console.log('loadFields, recordId: ', this.recordId);
        if(error){
            console.log('error', JSON.parse(JSON.stringify(error)));
        }else if(data){
            console.log('data', JSON.parse(JSON.stringify(data)));
            const paramField1 = getFieldValue(data, OBJ_FIELD1);
            const paramField2 = getFieldValue(data, OBJ_FIELD2);
            console.log('paramField1', paramField1);
            console.log('paramField2', paramField2);
        }
    }

A couple of things to note in the above:

*

*I'm outputting recordId every time this runs.  You are likely to see this run more than once, and the first time it runs, recordId will be blank.  That's just a thing LWC does.  Once the recordId is populated it should run again.

*when debugging in JS, use a comma instead of plus after a label; this allows your browser's javascript console to show the whole object in a collapsable inspector.

*when debugging LWC objects, you often only get the Proxy object, which is useless; wrap in JSON.parse(JSON.stringify(x)) to see the actual data.

Based on the above, you may find:

*

*there is an error, which you can address

*there is no error, but there is no data.  Confirm that recordId was populated.  If not, check your targetConfig.  If so, check CRUD/Sharing/FLS.  Inspecting the console-logged data object may also be useful.

*there is data, but it isn't passed to Apex.  Check how you are passing it - apex param names are case-sensitive when passed from JS.


text:
Q: Chrome Elements When using elements, in the resource tab, there use to be a chart that showed the time it took for file to load on a page and also the size of that file. That chart is no longer there. I see it in Safari but it's not in Chrome anymore. Was something changed or is there something I need to do to enable it?

A: Are you looking for the Network tab? It was recently added. Note that the developer tools must be open before the page is loaded for information to show up.

redpajama_set_name: RedPajamaStackExchange


text:
Q: TypeError: Cannot read property '0' of undefined When I call renderFrame, trying to access newLine[i] throws an error of
Uncaught TypeError: Cannot read property '0' of undefined

Why is this? I've included the relevant code.
rows : ["-","-","-","-","-","-","-","-","-","-",],

generateLine : function(){
    var result = new Array(10);
    for(var i = 0; i < result.length; i++){
        result[i] = " ";
    }
},

renderFrame : function(){
    var newLine = this.generateLine();
    for(var i = 0; i < this.rows.length; i++){
        console.log(newLine[i]);
    }
},

A: You forgot
return result;

at the end of generateLine()
So newLine is now undefined. Hence Cannot read property '0' of undefined


text:
Q: Can a likelihood function be integrated to find the CDF and probabilities? Likelihood analysis uses the likelihood function:
$L(\Theta | data) = P(data | \Theta)$
to determine how likely it is that some value is the true population parameter ($\Theta$) compared to some other value. With likelihood analysis, we can't determine the probability of a value being $\Theta$, only it's relative likelihood compared to other possible values of $\Theta$.
If we want to look at the actual probabilities of possible values of $\Theta$, we need to use Bayesian analysis:
$P(\Theta | data) = \frac{P(data | \Theta)P(\Theta)}{P(data)} = C*L(\Theta | data)$
To do this we need to determine the proper prior to use, which can be a touchy subject in statistics.
My question is: If I want to find the probabilities of possible values of $\Theta$ without dealing with a prior, could I simply normalize the function $C*L(\Theta | data)$ and integrate it (or use MCMC accomplish the same thing)?
Wouldn't this method give me a CDF of $P(\Theta | data)$ without using a prior at all?

A: You can assume $P(\theta) \propto C$, but then you are using a uniform prior over the domain for $\theta$. So, although your goal was to avoid dealing with a prior, you have actually used a uniform prior.
Here are some issues with this approach:

*

*It is not invariant to the parameterization you chose for the model. Thus the development of the Jeffreys prior.

*The normalizing integral, $\int C * L(\theta|data) d\theta$, might not be finite. If using MCMC, this could be worse because it might not be obvious.

*Uniform priors are often extremely unrealistic and extremely informative. Thus, you went from an idea of avoiding the prior to using a prior that is extremely informative toward implausible values.


text:
Q: java.lang.OutOfMemoryError: Compressed class space We are running on java-8-oracle.
We moved to java8 six month ago.
In the past few days we have been getting an OOME from time to time and we haven't been able to identify or reproduce the problem.
When we execute a call to the server (tomcat) we get this error on the stacktrace:
java.lang.OutOfMemoryError: Compressed class space

Restarting the server solves the problem. The same call to other server works, and so does another call of another type to the same server.
When looking on the gc.log we see:
2015-05-27T16:05:42.991+0000: 98774.440: [Full GC (Last ditch collection) 98774.440: [CMS: 575745K->575330K(3495936K), 0.8687777 secs] 575745K->575330K(4107008K), [Metaspace: 97940K->97940K(1396736K)], 0.8696093 secs] [Times: user=0.95 sys=0.00, real=0.88 secs]
2015-05-27T16:05:55.486+0000: 98786.935: [Full GC (Metadata GC Threshold) 98786.935: [CMS: 573414K->578735K(3495936K), 0.9372859 secs] 925046K->578735K(4107008K), [Metaspace: 99428K->99428K(1396736K)], 0.9386626 secs] [Times: user=1.01 sys=0.00, real=0.94 secs]

jstat -gc returns:
 S0C    S1C    S0U    S1U      EC       EU        OC         OU       MC     MU    CCSC   CCSU   YGC     YGCT    FGC    FGCT     GCT
87296.0 87296.0  0.0   3151.4 523776.0 148284.4 3495936.0   574868.5  1395640.0 98066.3 1048576.0 11339.1  12165  636.851  223   116.957

753.808

I don't see any memory problems either in the jstat log or in the gc log.
Trying to run jmap -clstats hangs:
Attaching to process ID 5110, please wait...
Debugger attached successfully.
Server compiler detected.
JVM version is 25.25-b02
finding class loader instances ..

A: With compressed oops and compressed class pointers the available space for classes is constrained due to the necessary pointer mangling. 1GB in your case.
That's a lot of classes, so this might be an indicate that something in your application is creating a lot of classes and never releasing them. Application reload maybe?
If you are certain that your application just needs that much memory for classes you can try bumping the limit via -XX:CompressedClassSpaceSize=... or disabling compressed class pointers via -XX:-UseCompressedClassPointers.
Note that by default compressed class space + compressed heap (+ some overhead) cannot exceed 32GB. Although, AIUI, changing object alignment can bump that limit further.
Otherwise you should take a heapdump and analyze what's holding onto the loaded classes.

A: We faced a similar issue. Unfortunately heapdumps won't help you since the classes are not in the heap but in native memory. Enable these in your JVM settings to troubleshoot the classes loaded:
-XX:+PrintGCDetails -XX:+TraceClassUnloading -XX:+TraceClassLoading

In our case the issue was JAXBContext.newInstance not being singleton.
Good luck,
Albert

A: You can fix this issue by using one of the two options below.
1. You can increase the limit of class space by using -XX:CompressedClassSpaceSize=n VM flag. Maximum limit is 4GB.
(OR)
2. You can completely disable Compressed class pointer feature by using -XX:-UseCompressedClassPointers VM flag.
Note: Please be aware that disabling this feature will increase heap space usage of your application.
From "Java Performance Optimization: Compressed OOPS" book

Each object has a pointer (_klass) to VM metadata class. This pointer
is also compressed on 64-bit JVM. In JDK 8, permanent generation was
removed and replaced by metaspace memory. This metaspace is
dynamically growing memory and can reach native memory limit if the VM
flags are not configured to control this metaspace memory. Prior Java
8, permanent memory is used and its size is fixed with VM flags. It
can't change its size at run time. When compared with heap memory
space, this permanent memory space (non-heap) is very small and will
usually be within 4GB limit to store class metadata and other
metadata. So the virtual memory address range can be 0 to 4 GB if the
zero-based virtual memory is assigned by operating system to this
permanent memory. So compressing the memory addresses of klass objects
using only 32-bits in this permanent memory location is not a problem.

But in Java 8, permanent memory is replaced with metaspace in order to
support some performance improvements. This memory location can grow
till it reaches the native memory limit if -XX: MaxMetaspaceSize VM is
not set to control this growth. If it can grow till the native memory
limit, then the klass objects might also be stored at any higher
memory boundaries. This will be a problem to compress that memory
location using 32-bit offset. So in order handle this problem and
allocate a separate memory space for klass instances alone, Java
introduced a new memory space called "compressed class space" in Java
8 version. The inclusion of compressed class space memory in Java 8
introduced "Java.lang.OutOfMemoryError: Compressed class space". This
OutOfMemoryError is triggered when the compressed class space memory
reaches its maximum default capacity of 1 GB and there are no more
room to store additional klass instances

In order to know more details about this OutOfMemoryError and about klass filed, you can read below books.
https://javaperformanceoptimization.com/

*

*Java Performance Optimization: Compressed OOPS

*Java Performance Optimization: How to avoid the 10 OutOfMemoryErrors


text:
Q: Vue.js concatenate string in v-text I am trying to concatenate string inside v-text directive. Simple example:

 {{ obj.name }} has {{ obj.vite }} users
    <button v-on:click="removeFw(obj)" v-show="mode == 'edit'">Delete</button>

This works fine. Now, instead of using the text interpolation if i use v-text like below, i still get the text showing up, but the Delete buttons disappear, regardless of the value of the mode property. These buttons should be visible if user clicks the edit button.

    <li v-for="obj in frameworks" v-text="`${obj.name} has ${obj.votes} users`">
     <button v-on:click="removeFw(obj)" v-show="mode == 'edit'">Delete</button>

Here is the fiddle:
https://jsfiddle.net/30a6edvs/
Can anyone please explain why.

A: Using v-text will replace inner text/html of the element and thus you cannot see the delete button inside that. So you have to do as your first example code.

A: Its actually changing the elements and setting the text.
So if you want the text and also button then your first method (Mustache interpolations) is the way

If you need to update the part of
textContent, you should use {{ Mustache }} interpolations.

Details


text:
Q: How can I make it so when a page width is reduced, it eventually stops adjusting? This is kind of hard to explain... Take any major website, CNN.com, Weather.com, etc. and when you pull your browser from the left or right to reduce the window width, the page moves, adjusts to keep the header centered and things like that...
After a point, though, the page stops adjusting, because any more adjusting and the header won't be able to fit, the hyperlinks will overlap onto the next line and it'll look terrible...
What's the code that makes that happen?  I would guess "min-width", however I'm having no luck with that.

A: Through CSS you have min-width and max-width attributes.
max-width: http://www.w3schools.com/cssref/pr_dim_max-width.asp
This attribute will represent the maximum width supported by the element. So what ever forced size or content it contains, this value will be the maximum size this element's width can be.
min-width: http://www.w3schools.com/cssref/pr_dim_min-width.asp
This attribute will represent the minimum width supported by the element. So what ever resize or forced reductions of this element's size, this value will be the minimum size this element's width can be.

These attributes are usually used to control element sizes on cases just as yours, ensuring that the user has the best visual experience possible.
More detailed info on these attributes and nice ways to use them: http://quirksmode.org/css/css2/width.html

A: By default, a block level container's width will be 100% of its parent unless defined otherwise. The effect you're referring to is achieved just by explicitly setting the pixel width of a container (such as a DIV), and then centering that container. The browser will add equal margin to the left and right of that container, keeping it in the center as long as the window is larger that the width you've specified. When the browser window becomes less that the width you specified, the container will anchor to the left edge of the window and a horizontal scroll bar will appear, allowing you to scroll to the right.
In the case of CNN.com, for the content, there is a wrapper DIV with no classes or ID's but the attribute "align=center". Inside that container is a DIV with id="cnn_maincntnr". That container has width: 1000px, which is defined in hplib-min.css.

A: This should work. I outlined where your content will go by a yellow border just so you could see what it would look like. Check out the example to see if that layout is what you want and if it is check out the code.
Example
CODE
Tell me what you think or tell me if this didn't work out for you.
Suprisingly no min-width necessary if you noticed.
EDIT:
Here's what you need to do to put padding in.  You just have to add inner-wrappers and put padding on those. I added content (just to show what it would look like with content) and took the height off of the divs so that they would just have height auto (fit to their contents).  Yeah now it's probably too much markup now to the extent it might be confusing but it illustrates that it has padding now.
DEMO

A: It is in fact "min-width"!
For those who are wondering the same thing in the future, simply assign certain elements in your CSS file with the tag "min-width" and then something like 1200px (most displays are at least that big, might go 1100 to be safe like if the taskbar (Windows) or dock (OS X) are on a side, so: "min-width:1100px".
It'd vary by site, but for me I put "min-width:1100px" in the body element of my primary CSS file.
And then too if you have a responsive site, it'd be a percent or em instead of px...


text:
Q: Folder Watcher doesn't trigger always with a large number of files OnContentsChanged doesn't trigger when folder has a large number of pictures (eg: 200).
QueryOptions folderOptions = new QueryOptions()
                {
                    FolderDepth = FolderDepth.Deep
                };
                folderQuery = windowsFolder.CreateFolderQueryWithOptions(folderOptions);
                folderQuery.ContentsChanged += OnContentsChanged;
                await folderQuery.GetFoldersAsync();

 private void OnContentsChanged(IStorageQueryResultBase sender, object args)
        {
            doSomething();
        }


text:
Q: How to get rid of the "X" on the search bar I'm trying to get rid of the "X" button that shows up when writing something in the search bar, or at least change it:
<input type="search">

I tried the following CSS:
input[type="search"]{-webkit-appearance: none;}

and some more webkit stuff that did not work.

A: I tried searching Google for input type text remove close. I got this result. You can use the following code to remove it on Chrome or Internet Explorer.

/* clears the 'X' from Internet Explorer */
input[type=search]::-ms-clear {  display: none; width : 0; height: 0; }
input[type=search]::-ms-reveal {  display: none; width : 0; height: 0; }

/* clears the 'X' from Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }
<input type="search" />

I got the above code from: Remove the X from Internet Explorer and Chrome input type search | Maxime Rouiller.
Just found that it could be a possible duplicate of Remove IE10's "clear field" X button on certain inputs?

A: Try the following CSS code:
 /* clears the 'X' from Internet Explorer */
 input[type=search]::-ms-clear {
 display: none;
 width : 0;
 height: 0;
 }
 input[type=search]::-ms-reveal {
 display: none;
 width : 0;
 height: 0;
 }

/* clears the 'X' from Chrome */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
display: none;
}

See more at link

A: Thanks this is the code that did the job:
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }


text:
Q: Change Font Color of a Column in a DataGridView Control (C# winforms) I have a DataGridView control with two columns. The default color of the text is black. Is it possible to set the fore color of the entire second row to gray?(or any other color)..
    COLUMN1 | COLUMN2
    -----------------
     black  | gray
     black  | gray
     black  | gray

Please help.. thanks.

A: dgv.Rows[1].DefaultCellStyle.ForeColor = Color.Gray;

or Columns[1], if that's what you meant.

A: Your subject and question are confusing, one refers to the column and one to the rows but anyway.
grid.Columns[1].DefaultCellStyle.ForeColor = Color.Gray;

should handle the column color.
grid.Rows[1].DefaultCellStyle.ForeColor = Color.Gray;

should handle the row color.


text:
Q: Ubuntu 14.014 not detecting my ASUS Zenfone 5 I want to connect my ASUS Zenfone 5 to an Ubuntu OS but the system is not detecting it. I have tried to install mtpfs but still its not working.
Need help on this.
Thanks.

A: Try to plug it into on of your USB 3.0 ports (xhci_hcd) if you have one.
I have the same issue when I plug my zenfone into any of my USB 2.0 ports (ehci-pci), it just detects the phone but doesn't mount it.

A: I just had the same problem with my Zenfone 6.
I found the answer here on the ubuntu forums:
http://ubuntuforums.org/showthread.php?t=2226702
It's actually really simple: you just get the vendorId:productId from running lsusb, add those IDs to two files, restart the "udev" services, and finally reboot your computer. Follow the link above, it'll walk you through.


text:
Q: all labels in form change properties when mouse focus I want to simulate a game menu using labels. What I want to do is when a mouse hovers on it, the font will become bigger and it will change font color. Is there any preexisting code for doing this using just arrays in Visual Basic 6.0? Because if I do it manually, it will take lots of time. Please help me.

A: You'll need to catch the mouse enter, and leave events. This is old, but you can try using the TrackMouseEvent API to catch the mouse events. Here is a link, http://www.vbaccelerator.com/home/VB/Code/Libraries/Subclassing/Generating_MouseLeave_Events_for_a_Window/article.asp, with a class that implements the API, and gives an example of using it. The article is old though and only discusses its use up to Win 95 so you'll need to do a quick test to see if it's still supported.

A: to create an array of labels : place a label on the form, and give it index 0
that will bascially create an array of 1 label, which you can then expand in your code
'1 form with :
'    1 label : name=Label1    Index=0
Option Explicit

Private Sub Form_Load()
  Dim intIndex As Integer
  For intIndex = 1 To 4
    Load Label1(intIndex)
    Label1(intIndex).Visible = True
    Label1(intIndex).Caption = CStr(intIndex)
  Next intIndex
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  OnLabel False
End Sub

Private Sub Form_Resize()
  Dim intIndex As Integer
  Dim sngWidth As Single, sngHeight As Single
  Dim sngLblWidth As Single
  sngWidth = ScaleWidth
  sngHeight = ScaleHeight
  sngLblWidth = sngWidth / Label1.Count
  For intIndex = 0 To Label1.Count - 1
    Label1(intIndex).Move intIndex * sngLblWidth, 0, sngLblWidth
  Next intIndex
End Sub

Private Sub Label1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
  OnLabel True
End Sub

Private Sub OnLabel(blnOn As Boolean)
  Dim intIndex As Integer
  Dim intSize As Integer
  Dim lngColor As Long
  If blnOn Then
    intSize = 20
    lngColor = vbRed
  Else
    intSize = 10
    lngColor = vbBlack
  End If
  For intIndex = 0 To Label1.Count - 1
    With Label1(intIndex)
      .FontSize = intSize
      .ForeColor = lngColor
    End With 'Label1(intIndex)
  Next intIndex
End Sub


text:
Q: cluster computing using starcluster and ipython on AWS I'm trying to experiment some with cluster computing on AWS. I'm completely new at this and having some issues. I'm trying to follow the tutorial found here: http://star.mit.edu/cluster/docs/latest/plugins/ipython.html#using-the-ipython-cluster. I use starcluster to start a cluster instance with the following:
starcluster start mycluster

Everything comes up as expected and it shows that the ipython plugin has loaded. I then try to execute the following command as shown in the tutorial:
starcluster sshmaster mycluster -u myuser

The connection fails, however, and tells me
Permission denied (publickey).

I am able to log in using
starcluster sshmaster mycluster

so I attempted to continue the tutorial logged in to the master but when I try to create the Client I receive and error:
AssertionError: Not a valid connection file or url:
u'/root/.ipython/profile_default/security/ipcontroller-client.json'

The only thing that I saw that seemed out of the ordinary is when the cluster was starting up this appeared:
>>> Running plugin ipcluster
>>> Writing IPython cluster config files
>>> Starting IPython cluster with 7 engines
>>> Waiting for JSON connector file...
>>> Creating IPCluster cache directory: /Users/username/.starcluster/ipcluster
>>> Saving JSON connector file to '/Users/username/.starcluster/ipcluster/mycluster-us-east-1.json'
!!! ERROR - Error occurred while running plugin 'ipcluster':
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/cluster.py", line 1506, in run_plugin
    func(*args)
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/plugins/ipcluster.py", line 276, in run
    plug.run(nodes, master, user, user_shell, volumes)
  File "<string>", line 2, in run
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/utils.py", line 87, in wrap_f
    res = func(*arg, **kargs)
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/plugins/ipcluster.py", line 228, in run
    cfile = self._start_cluster(master, n, profile_dir)
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/plugins/ipcluster.py", line 173, in _start_cluster
    master.ssh.get(json, local_json)
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/sshutils/__init__.py", line 431, in get
    self.scp.get(remotepaths, localpath, recursive=recursive)
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/sshutils/scp.py", line 141, in get
    self._recv_all()
  File "/Library/Python/2.7/site-packages/StarCluster-0.93.3-py2.7.egg/starcluster/sshutils/scp.py", line 242, in _recv_all
    msg = self.channel.recv(1024)
  File "build/bdist.macosx-10.8-intel/egg/ssh/channel.py", line 611, in recv
    raise socket.timeout()
timeout

Any thoughts?

A: The tutorial assumes CLUSTER_USER = myuser in ~/.starcluster/config even though by default CLUSTER_USER = sgeadmin


text:
Q: Why does (c1) return 1, 2, 3 ect.. and not #? This is from the SICP course for the environmental model section:

(define make-counter
   (lambda (n)
     (lambda () (set! n (+ n 1))
       n)))

Below,the interpreter says that (make-counter 0) is a procedure:

> (make-counter 0)
#<procedure:...make_counter.rkt:8:5>

Below, I define c1 to be (make-counter 0).

(define c1 (make-counter 0)

Below is where I get confused as to the reason (c1) returns the counter values instead of "procedure".

>(c1)
1
> (c1)
2
> (c1)
3

My thinking process is that if (c1) points to a procedure, (make-counter), then (c1) should return "procedure:...make_counter.rkt:8:5".
Because procedure -> procedure.
I see what should happen, I am just confused, conceptually, as to how and why.

A: What is your question? Do you doubt it works like the name suggests, or do you not understand how it does?
The first can be tested in 30 seconds, I'll answer the second:
make-counter is a procedure that takes one argument. Now look at the code again: what does it return? A procedure with 0 arguments.
So executing (c1) will return the numbers from 1 on upwards (if starting with 0).
For completeness:
Gambit v4.8.1

> (define make-counter
   (lambda (n)
     (lambda () (set! n (+ n 1))
       n)))
> (define c1 (make-counter 0))
> (c1)
1
> (c1)
2
> (c1)
3
>

Addition after question edit:
c1 is the procedure, but (c1) is procedure application, what you would call "calling the procedure" in another programming world.
> c1
#<procedure #2 c1>
> (c1)
1

BTW a nice piece of functional code, if you have understood this you will look at programming differently.
More questions via comment:

Now, its (make-counter 0). Working it by hand, I am not understanding
  why n is not returned.

The answer is the same we gave you about c1 and (c1):
make-counter returns lambda (), and n is only returned if you call the lambda. Functions (in scheme: procedures, lambdas) are values that can be handed around, functional programming principle. You have to call them (correct term: apply) the get the procedure result.
Now tell me: how do you call a procedure in scheme?
more edits:
Okay, we call a procedure in scheme by enclosing it in parens.
Now tell me: What is the substitution step for (c1) ?

A:
My thinking process is that if (c1) points to a procedure, (make-counter), then (c1) should return "procedure:...make_counter.rkt:8:5".

This is wrong.
What is happening here is that c1 "points to a procedure", as you say, (really it is a name bound to a procedure).
You should remember that in Scheme the form (f e1 e2 ... en) is the way to call the procedure f, passing to it the values of the expressions e1 e2 ... en.
So, (c1) is completely different from c1: it is a way of calling the procedure c1 (that has no parameter). And each time the interpreter/compiler evaluates (c1), it calls the procedure, that increases the value and return it.

A: You have
(define make-counter
   (lambda (n)
     (lambda () (set! n (+ n 1))
       n)))

so evaluating make-counter
returns
   (lambda (n)
     (lambda () (set! n (+ n 1))
       n))

and evaluating (make-counter 0) just replaces make-counter in that call with its value, and proceeds as
( (lambda (n)
     (lambda () (set! n (+ n 1))
       n))
   0 )
=>
(let ((n 0))
     (lambda () (set! n (+ n 1))
       n))

so the closure object is created and returned,
=>
(closure {environment1: ((n 0))}     ; its own binding for `n`
     (lambda () (set! n (+ n 1))
       n))

so after (define c1 (make-counter 0)) this closure is the value of c1.
Evaluating c1 returns its value, the procedure (closure) above. Its printed representation is implementation-dependent (showing e.g. #<procedure> or something similar).
Evaluating (c1) calls this procedure,
(c1)
=>
( (closure {environment1: ((n 0))}     ; its own binding for `n`
     (lambda () (set! n (+ n 1))
       n)) )
=>
(under {environment1: ((n 0))}
  (  (lambda () (set! n (+ n 1))
       n)) )

Calling ((lambda () ...) ) without any arguments just evaluates its body without creating any new environment, since the parameters list is empty and there are no arguments:
=>
(under {environment1: ((n 0))}
    (set! n (+ n 1))             ; perform this first
    n )
=>
(under {environment1: ((n 1))}   ; <--- altered binding for `n`!
    n )                          ; now evaluate this and return its value
=>
1

and it leaves the altered environment1 in its wake. When that procedure (closure) will be called again, (c1), its environment will now contain ((n 1)), and so will be changed to ((n 2)), etc.


text:
Q: Retrieve a list of objects on a specific ID from linking table (JPA / MySQL) in springboot i am trying to retrieve all objects on a specific 'pakketje_id' from a linking table in MySQL.
@Entity
public class Pakketje {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private int id;
    private int code;
    private String status = "In magazijn";

    @ManyToMany
    @JoinTable(
            name = "paketjes_objecten",
            joinColumns = @JoinColumn(name = "pakketje_id"),
            inverseJoinColumns = @JoinColumn(name = "object_id")
    )
    private Set<Object> objecten = new HashSet<>();

I have a linking table called "paketjes_objecten".
I have tried to do this in the JpaRepository:
@Repository
public interface PakketjeRepository extends JpaRepository<Pakketje, Integer> {
    public List<Object> findObjectenBypakketje_id(int pakketjeId);
}

Unfortunately pakketje_id is not recognized.
The error:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'objectController': Unsatisfied dependency expressed through field 'objectService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'objectServiceImplimentation': Unsatisfied dependency expressed through field 'pakketjeRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pakketjeRepository' defined in com.Code.Pakket.management.repository.PakketjeRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int); Reason: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:955) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.23.jar:5.3.23]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.23.jar:5.3.23]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.4.jar:2.7.4]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.4.jar:2.7.4]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.4.jar:2.7.4]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.4.jar:2.7.4]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.4.jar:2.7.4]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.4.jar:2.7.4]
    at com.Code.Pakket.management.PakketManagementApplication.main(PakketManagementApplication.java:13) ~[classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'objectServiceImplimentation': Unsatisfied dependency expressed through field 'pakketjeRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pakketjeRepository' defined in com.Code.Pakket.management.repository.PakketjeRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int); Reason: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[spring-beans-5.3.23.jar:5.3.23]
    ... 20 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pakketjeRepository' defined in com.Code.Pakket.management.repository.PakketjeRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int); Reason: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1391) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1311) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[spring-beans-5.3.23.jar:5.3.23]
    ... 34 common frames omitted
Caused by: org.springframework.data.repository.query.QueryCreationException: Could not create query for public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int); Reason: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.data.repository.query.QueryCreationException.create(QueryCreationException.java:101) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lookupQuery(QueryExecutorMethodInterceptor.java:107) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lambda$mapMethodsToQuery$1(QueryExecutorMethodInterceptor.java:95) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
    at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133) ~[na:na]
    at java.base/java.util.Collections$UnmodifiableCollection$1.forEachRemaining(Collections.java:1061) ~[na:na]
    at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1921) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[na:na]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.mapMethodsToQuery(QueryExecutorMethodInterceptor.java:97) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lambda$new$0(QueryExecutorMethodInterceptor.java:87) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at java.base/java.util.Optional.map(Optional.java:260) ~[na:na]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.<init>(QueryExecutorMethodInterceptor.java:87) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:365) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:323) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.util.Lazy.getNullable(Lazy.java:231) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.util.Lazy.get(Lazy.java:115) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:329) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:144) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.23.jar:5.3.23]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.23.jar:5.3.23]
    ... 44 common frames omitted
Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.Code.Pakket.management.repository.PakketjeRepository.findpaketjes_objectenBypakketje_id(int)! No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:96) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:119) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:259) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:93) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.core.support.QueryExecutorMethodInterceptor.lookupQuery(QueryExecutorMethodInterceptor.java:103) ~[spring-data-commons-2.7.3.jar:2.7.3]
    ... 66 common frames omitted
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property 'findpaketjes' found for type 'Pakketje'
    at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:91) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:438) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:414) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:367) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at java.base/java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:330) ~[na:na]
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:349) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:332) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.query.parser.Part.<init>(Part.java:81) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.query.parser.PartTree$OrPart.lambda$new$0(PartTree.java:250) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[na:na]
    at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1006) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[na:na]
    at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:251) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.query.parser.PartTree$Predicate.lambda$new$0(PartTree.java:384) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[na:na]
    at java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:1006) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[na:na]
    at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[na:na]
    at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:na]
    at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[na:na]
    at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:385) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:93) ~[spring-data-commons-2.7.3.jar:2.7.3]
    at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:89) ~[spring-data-jpa-2.7.3.jar:2.7.3]
    ... 70 common frames omitted

Process finished with exit code 1

Any ideas how i retrieve object from a specific 'pakketje_id' ?


text:
Q: How can I merge rows (of a particular column) having the same value in  SQL Server Reports RDL? I'm new to working with SQL Server 2005 Reporting Servives using RDLs in BIDS.
I need to modify an existing report so that I can merge cells in adjacent rows which would have the same value for that particular column.
Ex: consider this is the table returned from the stored procedure used by the reports RDL.
_________________________________________________
Id      SubCategory    Field1     Field2   Total
_________________________________________________
1       a              Bob        US       17
1       b              John       UK       17
2       a              Mary       AUS      12
3       d              Ram        IND      19
4       b              Alex       UK       09
4       c              Abby       FR       09
5       e              Tim        IT       03
_________________________________________________

Table Example - Couldn' Format Text :( Image here : http_://i.stack.imgur.com/gWEH5.png_
What I need to do is I want the cells merged into one where two adjacent rows in the same column have the same value.
Like Id 1 is repeated twice, so the cells for these must be merged. (Also 4)
Similarly for the last column Total for cells with Ids 1 and 4 must be merged.
The RDL has "TextBox" for columns, I saw some other questions in this forum but were related to Tablix or Matrix, so I thought it would be better if I mentioned it.
I need this merging to be done in the RDL, and this should also be present when exported to Excel.
Hoping someone will be able to help soon.

A: Change the SQL query to use a group by on ID.

A: in reporting services drag Id On Row group Of Tablix Upaer than Detail Group
and drag other Fields(except Total) Besid ID  and befor vertical dash line In the table.
and drag Total to first cell afte vertical dash line


text: Q: Apple Not turning on My iPhone 6s has had its battery replaced 2 times now and the first time I got it replaced it worked but then shut down during the night and never turned back on even when trying the factory reset, the second time I got it replaced it was working and again it shut down during the night and is not turning back on I have tried everything including the factory reset nothing is working


text:
Q: How to resize an external SWF to fit into a container? What I want to accomplish is to resize an external SWF so that it fits into the display object that is presented as a container on the stage. For now it show up outside of the container.
Important: I do not want an external SWF to occupy the whole stage; I have a special place (that container) for it on the stage.

A:   public function loaderComplete(event:Event):void
  {
      var content:MovieClip = MovieClip(event.currentTarget.content );

      //the dimensions of the external SWF
      var _width:int = content.width;
      var _height:int = content.height;

      // you have several options here , assuming you have a container Sprite
      // you can directly set to the dimensions of your container, if any
      if( container.width < _width )
          _width = container.width // and do the same for height

      // or you could scale your content to fit , here's a simple version
      // but you can check the height too or keep checking both value
      // until it fits
      if( container.width < _width )
      {
          var scale:Number = container.width / _width;
          content.scaleX = content.scaleY = scale;
      }

      // when all done, you can add your content
      container.addChild( content );
  }

You could also check greensock.com ,
http://www.greensock.com/
they have a great set of Loading classes where you can specify the width & height of the content you want to load , set a container to load it into and even specify how you'd like the content to fit, saves you all the code above ;)


text:
Q: how to force an element to the top when z-index is not working? I am writing a chrome extension which using injection to modify the element in target webpage.
I want to show a message bubble when cursor move on an element. But I encounter a problem that sometimes the message bubble is hidden by some other elements. I found that it was because z-index will not work if  an element B sits on top of element A, a child element of element A(message bubble) can never be higher than element B.
To demonstrate it,Here is an example. That obj2 will always be hidden by obj3, although obj2's z-index is 1000000.
Is there any solutions for it?
.aaa{
    background-color:blue;
    width:100px;
    height:100px;
}
.ccc{
    background-color:red;
    width:80px;
    height:80px;
    z-index:1000000;
}
.bbb{
    background-color:green;
    position:relative;
    top:-50px;
    left:50px;
    width:100px;
    height:100px;
}

A: z-index is only applied when the container is also marked as position: relative/absolute. If you change your ccc rule to the following it will work correctly:
.ccc{
    position: relative;
    background-color:red;
    width:80px;
    height:80px;
    z-index:1000000;
}

http://jsfiddle.net/RrUbh/


text:
Q: Splitting List into two Lists? Is there a clean way of splitting a List in half and making two of them, one for the first half and the other for the second half?
The goal is to create a two column slds grid to show the list evenly in two smaller columns rather than one long column. Maybe a helper method to set the new lists or using an index during the aura:iteration?

A: Just use a lightning:layout and put your lightning:layoutItems inside with a size of 6. The styles will take care of laying them across two columns.
<lightning:layout multipleRows="true">
  <aura:iteration items="{!v.items}" var="item">
    <lightning:layoutItem size="6">
      {!item}
    </lightning:layoutItem>
  </aura:iteration>
</lightning:layout>

A: I hope you are using lightning you can use the array.slice(start, end) to split the initial array of record in your init method.
var sobList = 'get your data here"
var firstHalf;
var secondhalf;
if(sobList.length > 2){
  var midIndex = parseInt(sobList.length/2);
  firstHalf = sobList.slice(0, midIndex );
  secondhalf = sobList.slice(midIndex +1 , sobList.length -1);
}


text:
Q: How can I do traffic shaping in Linux by xen guests? I want to be able to set up two xen guests like this:
xen-create-image --hostname=xen1.example.com --size=10Gb --swap=512Mb --ip=192.168.0.101 --force --memory=256Mb --arch=i386 --debootstrap

and
xen-create-image --hostname=xen1.example.com --size=10Gb --swap=512Mb --ip=192.168.0.102 --force --memory=256Mb --arch=i386 --debootstrap

(the difference is the ips '192.168.0.102' and '192.168.0.101')
I want to set it up so that '192.168.0.102' has dial-up speed and '192.168.0.101' has unshaped connection speed to xen1.example.com.
I don't know anything about traffic shaping, or what i need to install to do this.
So i guess when you answer be ultra noobie-concerned.
    #! /bin/bash
NETCARD=eth0
MAXBANDWIDTH=100000

# reinit
tc qdisc del dev $NETCARD root handle 1
tc qdisc add dev $NETCARD root handle 1: htb default 9999

# create the default class
tc class add dev $NETCARD parent 1:0 classid 1:9999 htb rate $(( $MAXBANDWIDTH ))kbit ceil $(( $MAXBANDWIDTH ))kbit burst 5k prio 9999

# control bandwidth per IP
declare -A ipctrl
# define list of IP and bandwidth (in kilo bits per seconds) below
ipctrl[192.168.1.1]="256"
ipctrl[192.168.1.2]="128"
ipctrl[192.168.1.3]="512"
ipctrl[192.168.1.4]="32"

mark=0
for ip in "${!ipctrl[@]}"
do
    mark=$(( mark + 1 ))
    bandwidth=${ipctrl[$ip]}

    # traffic shaping rule
    tc class add dev $NETCARD parent 1:0 classid 1:$mark htb rate $(( $bandwidth ))kbit ceil $(( $bandwidth ))kbit burst 5k prio $mark

    # netfilter packet marking rule
    iptables -t mangle -A INPUT -i $NETCARD -s $ip -j CONNMARK --set-mark $mark

    # filter that bind the two
    tc filter add dev $NETCARD parent 1:0 protocol ip prio $mark handle $mark fw flowid 1:$mark

    echo "IP $ip is attached to mark $mark and limited to $bandwidth kbps"
done

#propagate netfilter marks on connections
iptables -t mangle -A POSTROUTING -j CONNMARK --restore-mark

i did see this above, but i don't know what config file i need to edit.
So just to be clear. I want two ip's to access the same site, but one ip has dial-up speed and the other has untouched.
Thanks so mcuh!

A: I use my pfsense firewall for this..
ipfw and freebsd rocks for this type of thing over the Linux's
Hope you try this out :D


text:
Q: Is it possible to upload my own PDF to kindle app for windows 8? Unlike "kindle for windows", for Windows 8 metro version of kindle app where is no "My Kindle Content" folder where i can place my own PDF files. Is it any way i can upload my own PDF file to it? I'm using Windows 8 Pro, not an RT.

A: According to Amazon, no. Look at http://www.amazon.com/gp/help/customer/display.html?nodeId=200939480. The last entry is:

Are Personal Documents supported?
Sending Personal Documents to Kindle for Windows 8 is not currently supported.

So no, sorry to have to tell you that, however the phrasing suggests that eventually, maybe.


text:
Q: Splitting Existing Partitions in SQL 2014 I have a SQL Server table that contains over 20 billion rows, with 13 billion rows in the last partition.
The table is currently partitioned 6 ways by a "Time" field:
2011
2012
2013
2014
2015
2016/2017/2018

The 2016/2017/2018 partition needs to be split into their own partitions so there is a 2016, 2017, 2018 partition.
How can this be done and in the process avoiding a massive log file growth? The database is in Simple Recovery and currently each partition is in a separate file group on its own set of disks.
CREATE TABLE [dbo].[Log](

      [RefNo] [nchar](7) NOT NULL,

      [DevID] [nvarchar](7) NOT NULL,

      [Time] [datetime] NOT NULL,

      [summary] [float] NULL,

      [staging] [float] NULL,

      [position] [float] NULL,

CONSTRAINT [PK_Log] PRIMARY KEY CLUSTERED

(

      [RefNo] ASC,

      [DevID] ASC,

      [Time] ASC

)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 96)

)

A: Below is an example script to create the new yearly partitions. You may need to tweak the script for your actual partition function name and new filegroup names. This method assumes the operation is performed in a maintenance window when there are no inserts into the table and data for 2016 and later isn't needed for queries.
The summary of the steps performed by the script are:

*

*create new partition function and scheme like the originals

*create new aligned staging table like the original

*switch the partition containing data > 2016-01-01 into the staging table

*add 3 new partitions to the original partition function/scheme

*rebuild the staging table on the original partition with DROP_EXISTING=ON

*switch the 3 new partitions from the staging table back into the original table

There are a couple of issues with your existing table partitioning you should be aware of. Because of the RANGE LEFT function, datetime values that are exactly midnight on the first of the year will be placed in the wrong partition. For example, a row with Time value '2012-01-01T00:00:00' will be in partition 1 along with year 2011 data instead of partition 2 with the rest of year 2012 data as desired. This might not be a concern unless you purge data by partition.
Be mindful that the last partition if a RANGE LEFT function can never be removed. The implication is that the filegroup of the last partition is permanently part of the partition schemes that use the function. In your case, filegroup Year6FileGroup will always be the last filegroup of the psYearlyPartition_Log scheme, although it can also be used for another partition, such as for year 2016 here.
The partitions after the script is run will be as below and it is expected the last partition will be empty (assuming you have no future year data). You should create the partition for next year before the start of the year to avoid splitting a non-empty partition or avoid jumping through these hoops again.
+------------------+----------------+----------------+----------------+
| Partition Number | Lower Boundary | Upper Boundary |   Filegroup    |
+------------------+----------------+----------------+----------------+
|                1 | NULL           | <= 2012-01-01  | Year1FileGroup |
|                2 | > 2012-01-01   | <= 2013-01-01  | Year2FileGroup |
|                3 | > 2013-01-01   | <= 2014-01-01  | Year3FileGroup |
|                4 | > 2014-01-01   | <= 2015-01-01  | Year4FileGroup |
|                5 | > 2015-01-01   | <= 2016-01-01  | Year5FileGroup |
|                6 | > 2016-01-01   | <= 2017-01-01  | Year6FileGroup |
|                7 | > 2017-01-01   | <= 2018-01-01  | Year7FileGroup |
|                8 | > 2018-01-01   | <= 2019-01-01  | Year8FileGroup |
|                9 | > 2019-01-01   | NULL           | Year6FileGroup |
+------------------+----------------+----------------+----------------+

I generally recommend a RANGE RIGHT function when partitioning on incremental values like datetime because the behavior is more intuitive. See Table Partitioning Best Practices for this and other considerations.
--create identical partition function and scheme
CREATE PARTITION FUNCTION pfYearlyPartition_Log_Staging(datetime)
    AS RANGE LEFT FOR VALUES(
      '20120101'
    , '20130101'
    , '20140101'
    , '20150101'
    , '20160101'
);
CREATE PARTITION SCHEME psYearlyPartition_Log_Staging
    AS PARTITION pfYearlyPartition_Log_Staging TO (
      Year1FileGroup
    , Year2FileGroup
    , Year3FileGroup
    , Year4FileGroup
    , Year5FileGroup
    , Year6FileGroup
);

--create identical aligned staging table
CREATE TABLE [dbo].[Log_Staging](
      [RefNo] [nchar](7) NOT NULL,
      [DevID] [nvarchar](7) NOT NULL,
      [Time] [datetime] NOT NULL,
      [summary] [float] NULL,
      [staging] [float] NULL,
      [position] [float] NULL,
CONSTRAINT [PK_Log_Staging] PRIMARY KEY CLUSTERED
(
      [RefNo] ASC,
      [DevID] ASC,
      [Time] ASC
)
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 96)
) ON psYearlyPartition_Log_Staging(Time);

--switch last partition into staging table
ALTER TABLE dbo.Log
    SWITCH PARTITION $PARTITION.pfYearlyPartition_Log('20170101')
    TO dbo.Log_Staging PARTITION $PARTITION.pfYearlyPartition_Log_Staging('20170101');

--create new partitions for main table (assuming filegroups already exist for years 7 and 8)
ALTER PARTITION SCHEME psYearlyPartition_Log
    NEXT USED Year6FileGroup;
ALTER PARTITION FUNCTION pfYearlyPartition_Log()
    SPLIT RANGE('20170101');
ALTER PARTITION SCHEME psYearlyPartition_Log
    NEXT USED Year7FileGroup;
ALTER PARTITION FUNCTION pfYearlyPartition_Log()
    SPLIT RANGE('20180101');
ALTER PARTITION SCHEME psYearlyPartition_Log
    NEXT USED Year8FileGroup;
ALTER PARTITION FUNCTION pfYearlyPartition_Log()
    SPLIT RANGE('20190101');

--we must specify IGNORE_DUP_KEY=OFF in order to use DROP_EXISTING_ON here
--but, since the original table PK index definition is unchanged, that's a non-issue
CREATE UNIQUE CLUSTERED INDEX [PK_Log_Staging] ON dbo.Log_Staging
(
      [RefNo] ASC,
      [DevID] ASC,
      [Time] ASC
)
WITH (DROP_EXISTING=ON, PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 96)
ON psYearlyPartition_Log(Time);

ALTER TABLE dbo.Log_Staging
    SWITCH PARTITION $PARTITION.pfYearlyPartition_Log('20170101')
    TO dbo.Log PARTITION $PARTITION.pfYearlyPartition_Log('20170101');
ALTER TABLE dbo.Log_Staging
    SWITCH PARTITION $PARTITION.pfYearlyPartition_Log('20180101')
    TO dbo.Log PARTITION $PARTITION.pfYearlyPartition_Log('20180101');
ALTER TABLE dbo.Log_Staging
    SWITCH PARTITION $PARTITION.pfYearlyPartition_Log('20190101')
    TO dbo.Log PARTITION $PARTITION.pfYearlyPartition_Log('20190101');


text:
Q: When to spell out non-alphanumeric characters? If a term contains non-alphanumeric characters, when (if ever) should these characters be spelled out? For example:

C++   written as   C Plus Plus
C#      written as   C-Sharp

If they are spelled out, what are the conventions regarding capitalization and hyphens (e.g. C Plus Plus or C-plus-plus)?

A: I hope I'm not stepping out of line, but since the comments contained several good answers, I thought it worthwhile to group them together into a properly credited answer. Currently it seems the community has found four reasons to spell out non-alphanumeric characters:

*

*FumbleFingers noted that programming code can require spelling out such symbols to avoid creating problems during the parsing phase of a compiler/interpreter.

*Waggers added that spelling out symbols can clarify pronunciation (e.g. "C#" as "C-sharp" rather than "C-hash" or "C-pound")

*Hugo mentioned the concept of avoiding reserved characters in a tagging/keyword/categorization system.

*Jay added that explaining the origin and meaning of such a term could require spelling it out. I think there's a lot of overlap between this and Waggers' answer about pronunciation.


text:
Q: Why spurious pulses are likely in partial discharges? My notes

The gas multiplication in the proportional counters is based on the
  secondary ionization created in collisions between electrons and
  neutral gas molecules, resulting in some visible or ultraviolet
  photons.  Those photons are undesirable below the Geiger-Mueller
  region because they can lead to spurious pulses, \cite{knoll}, here $\Delta A > 0$.

I am also interested in how you can minimize such pulses in partial discharges.
Why spurious pulses are more likely in partial discharges than complete discharges?
Complete discharge corresponds to the Geiger-Mueller region.


text:
Q: Angular material switch between mat-icon-button and mat-button Is there any prettier way to switch between mat-icon-button and mat-button, depending on media queries? I've made a demo of my current solution, but it needs two independent button.
<button type=button mat-icon-button fxHide fxShow.lt-sm (click)="onEdit($event)">
  <mat-icon>edit</mat-icon>
</button>
<button type="button" mat-button fxHide.lt-sm (click)="onEdit($event)">
  <mat-icon>edit</mat-icon> Edit
</button>

DEMO

A: Got the same problem, currently using this solution.
Component.html:
<button
        mat-button
        [ngClass]="isBigDevice() ? 'mat-stroked-button' : 'mat-icon-button'"
        color="accent"
        type="button"
        (click)="coolMethodToDoStuff()"
        [disabled]="isSelected() && contextTypeIsSomething()">
    <span *ngIf="isBigDevice()">Edit</span>
    <mat-icon *ngIf="!isBigDevice()">edit</mat-icon>
</button>

There is a problem/annotation: You need to add the base button style/property mat-button. If you dont, you will get an error that color is no property for this kind of html-element. The advantages are, if you have multiple properties on one button or conditions for disabled, hidden or *ngIf you dont need them twice. I know with *ngIfthe readability is lacking, but currently its the best way to avoid a huge junk of duplicate code.
Next step for me: I will build an directive for things like this.
Edit:
More over this is my MediaQueryService:
import {Injectable, OnDestroy} from '@angular/core';
import {BreakpointObserver, Breakpoints, BreakpointState} from '@angular/cdk/layout';
import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';

@Injectable({
    providedIn: 'root'
})

export class MediaQueryService implements OnDestroy {

private _breakpointArray = {
    isXSmall: false,
    isSmall: false,
    isMedium: false,
    isLarge: false,
    isXLarge: false,
};
private _destroy$ = new Subject();

constructor(
    private _breakpointObserver: BreakpointObserver,
) {
    this._breakpointObserver
        .observe([
            Breakpoints.WebLandscape,
            Breakpoints.WebPortrait,
        ])
        .pipe(
            takeUntil(this._destroy$)
        )
        .subscribe((state: BreakpointState) => {
            _breakpointObserver.isMatched(Breakpoints.WebLandscape)
                ? this.webOrientationChangeLogger('landscape')
                : this.webOrientationChangeLogger('portrait');
        });

    this._breakpointObserver.observe([
            Breakpoints.XSmall,
            Breakpoints.Small,
            Breakpoints.Medium,
            Breakpoints.Large,
            Breakpoints.XLarge,
        ]
    )
        .pipe(
            takeUntil(this._destroy$)
        )
        .subscribe((state: BreakpointState) => {
            this._breakpointArray.isXSmall = _breakpointObserver.isMatched(Breakpoints.XSmall);
            this._breakpointArray.isSmall = _breakpointObserver.isMatched(Breakpoints.Small);
            this._breakpointArray.isMedium = _breakpointObserver.isMatched(Breakpoints.Medium);
            this._breakpointArray.isLarge = _breakpointObserver.isMatched(Breakpoints.Large);
            this._breakpointArray.isXLarge = _breakpointObserver.isMatched(Breakpoints.XLarge);
        });
}

public ngOnDestroy(): void {
    this._destroy$.next();
    this._destroy$.complete();
}

public get isSmallDevice(): boolean {
    return this.getBreakpointBoolean('isXSmall') || this.getBreakpointBoolean('isSmall');
}

public get isBigDevice(): boolean {
    return this.getBreakpointBoolean('isXLarge') || this.getBreakpointBoolean('isLarge');
}

public getBreakpointBoolean(breakpointName: string): boolean {
    return this._breakpointArray[breakpointName];
}

private webOrientationChangeLogger(orientation: string) {
    console.log(orientation);
}

}
And inside the component where I am using the button I just call the isBigDevice() method and return the boolean.
Component.ts:
public isBigDevice(): boolean {
    return this._mediaQueryService.isBigDevice();
}

You could also try use this the fxShow, fxHide properties of angular material.

A: Try
<button mat-button [ngClass]="condition ? 'mat-raised-button' : 'mat-icon-button'">Button</button>


text:
Q: NSIS: How to delete file matching wildcat pattern in nsis script When users install my software, it creates shortcut on the user's desktop. The name of the shortcut also reflects the version being installed.
It turns out that some of my clients do install multiple versions (although that is no problem, no conflicts or whatever) but it means that user's desktop is bloated with lots of shortcuts for the several various different versions that they have installed over time. (e.g. SchoolServer 7.1.lnk, SchoolServer 7.2.lnk, SchoolServer 8.5.lnk and then the current SchoolServer 9.0.lnk)
They have to be deleting these obsolete shortcuts manually.
How can I achieve this in my NSIS script?
Note: I have tried deleting the shortcuts on the desktop with wildcat for all versions and then create the shortcut for the installed version, but it created the new shortcut and still left the old shortcuts there. Code I used is below:
;first delete stale shortcuts matching the wildcat
Delete "$DESKTOP\SchoolServer *.lnk"
;create the new shortcut
CreateDirectory "$INSTDIR"
CreateShortCut "${ICON_URL}" "$INSTDIR\SchoolServer.exe" "" "" "" SW_SHOWMAXIMIZED ALT|CONTROL|SHIFT|F5 "SchoolServer"

A: Use SetShellVarContext prior to deleting, to switch to the current user:
SetShellVarContext current
Delete "$DESKTOP\SchoolServer *.lnk"
SetShellVarContext all


text:
Q: indexPath not mutable? Swift I'm trying to increment my indexPath using
selectedPrevious = mons[indexPath -= 1]

But I get the error stating indexPath is a let constant. There seems to be no way to change it to a variable however. I've tried creating and Int variable and assigning it to the index like so
index = indexPath.row -= 1
selectedPrevious = mons[index]

But now, trying to use += or -= gives the new error.

Cannot subscript a value of type '[Monster]' with an index of type '()'

How can I increment this. The intended purpose is to reload data in my second Viewcontroller. Just passing over the index variable by itself does not affect the data reload.

A: Parameter(arguments) passed to swift functions (pass by value) are let by default. What it means is you can read the value of the parameter that are passed to functions but you can not modify.
And this is applicable to all the variables not just the indexPath :)
So what you were doing was wrong :) If you want to modify the value of indexPath here is what you can do :)
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "myCell", for: indexPath)
        var copiedIndexPath = indexPath
        copiedIndexPath.row = copiedIndexPath.row + 1
}

As you can see I created a local copy of index path and modified its value :)
EDIT :
Statement
indexPath.row -= 1

not only will subtract the row of indexPath by one but will also try to assign the data back to indexPath which is let by default. If you really want to modify the indexPath value itself you can do what I mentioned above.
If your intention was simply to calculate the row index and not to modify the indexPath it self
index = indexPath.row - 1


text:
Q: Botón no envia formulario Estoy creando un formulario y tengo un error que no soy capaz de detectar. Con un bucle creo un listado, y en cada vuelta de ese bucle abro y cierro una etiqueta <form> para poder modificar los datos que contiene cada vuelta. Pues bien, visualmente lo veo todo correcto, sin embargo al pulsar el botón de guardar no hace nada, no envía el formulario. He probado a ponerle type="submit" y tampoco, ¿Sabeis porque?
Ahí va mi código:
$consulta_escandallo = $Produccion->listarlineasEscandallos("");
if($coes = mysqli_fetch_array($consulta_escandallo)){
           echo '

';
           echo '

         Referencia
         Nombre
         Cantidad
         Unidad medida

';
           echo '

';
      do{
           $ides = $coes['id'];
           $idart = $coes['id_articulo'];
           $datos_articulo = new Articulos(intval($idart));
           $cantidad = $coes['cantidad'];
           $idum = $coes['unidad_medida'];
           echo '<form method="POST">

         '.$datos_articulo->referencia.'
         '.$datos_articulo->nombre.'
         <input type="hidden" name="id_linea" value="'.$ides.'">
         <input type="hidden" name="id_articulo" value="'.$idart.'">
         <input type="number" class="form-control" step="0.0001" name="cantidad_linea" id="cantidad_linea" value="'.$cantidad.'">

             ';
             $comprobar_um = $Produccion->listarUM("");
             if($clium = mysqli_fetch_array($comprobar_um)) {
                  echo '<select name="um_linea"  id="um_linea" class="form-control" style="width: 100%;">';
                 do {
                   $idumlin = $clium['id'];
                   if($idum == $idumlin){
                   $marcaum = "selected";
                   }else{
                   $marcaum = "";
                   }
                   echo '<option '.$marcaum.' value="'.$clium['id'].'">'.$clium['nombre'].'</option>';
                 }while($clium = mysqli_fetch_array($comprobar_um));
                   echo '</select>';
                 }
          echo'

         '; ?>
         <button  class="btn btn-dark pull-right" >Guardar cambios</button>
         <button type="button" name="borrar" class="btn btn-danger" onclick= "borrarID1(<?=$coes['id']?>,15)">Borrar</button>
           <?php echo'

</form>';
      }while($coes = mysqli_fetch_array($consulta_escandallo));
echo '

';

A: La verdad es que este error "Tonto" me ha dado muchos problemas, y al final lo he solucionado (Pongo como por si a alguien más le pasa). La solución al final ha estado moviendo la apertura y cierre del  dentro de la etiqueta .
Gracias a todos por vuestras respuestas!


text:
Q: Converting prj to EPSG code? I am a complete novice.
I have the following .prj file:
PROJCS["EO_Lambert_Conformal_Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",1000000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-84.0],PARAMETER["Standard_Parallel_1",44.5],PARAMETER["Standard_Parallel_2",54.5],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]

I need to get the EPSG code for this, but when I try http://prj2epsg.org/search I keep getting the following error

Recursive call while creating a 'HTTP_AuthorityFactory' object.

I have searched all over, but cannot figure this out.  I have tried http://spatialreference.org/ and found http://spatialreference.org/ref/sr-org/7149/ which I think is the same .prj file, but 7149 is not a valid SRID according to PostGIS.

A: EPSG and SRID are not the same thing. SRID is a tag identifier for Spatial Referencing Systems. The EPSG Geodetic Registry is a set of SRIDs created by the European Petroleum Survey Group. It's been around for quite a while, and encompasses many of the most widely used SRS', so it kind of became an informal industry standard, but it's but no means the only one. ESRI, for one, has its own SRID set. The biggest authority in it is probably SpatialReference.org, which you have already visited.
Many GIS softwares accept different combinations of SRID sets. QGIS accepts many types, whereas PostGIS only accepts EPSG (and not even the entire set, but a subset of about 5000 codes as of version 2.2.0). Your projection does not seem to be part of EPSG (you can search for EPSG projections at their website), so you won't be able to just use a code (in fact, the code you found on SR.org for your projection means an entirely different SRS in EPSG).
However, PostGIS lets you define your own SRS, and give it a custom SRID, which you'll then be able to use in your queries from then on (it's basically an insert in the spatial_ref_sys table, which all PostGIS-enabled DBs have). For how to set your own SRID, check this answer to a previously asked question.


text:
Q: What does "[Pre-Login] initialisation=xyz" mean in an SQL Exception? What does the [Pre-Login] initialisation=A; handshake=B; [Login] initialization=C; authentication=D; [Post-Login] complete=E; portion mean in an SQL Timeout Exception?
For example, in the following SQL Timeout exception message, are they seconds, milliseconds, units or apples?
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original server was - [Pre-Login] initialization=28; handshake=24; [Login] initialization=0; authentication=0; [Post-Login] complete=1;
---> System.ComponentModel.Win32Exception: The wait operation timed out

Context
I'm trying to understand the root cause of an SQL Timeout on SQL Azure
Thanks.
Longer StackTrace
---> NHibernate.Exceptions.GenericADOException: could not execute batch command.[SQL: SQL not available]
---> System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
This failure occurred while attempting to connect to the routing destination. The duration spent while attempting to connect to the original
server was - [Pre-Login] initialization=28; handshake=24; [Login] initialization=0; authentication=0; [Post-Login] complete=1;
---> System.ComponentModel.Win32Exception: The wait operation timed out
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
at System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
at System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
at System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
at System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Data.SqlClient.SqlCommandSet.ExecuteNonQuery()
at NHibernate.SqlAzure.ReliableSqlClientBatchingBatcher.ExecuteBatch(IDbCommand ps)
--- End of inner exception stack trace ---
at NHibernate.SqlAzure.ReliableSqlClientBatchingBatcher.ExecuteBatch(IDbCommand ps)
at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
at Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatchWithTiming(IDbCommand ps)
at NHibernate.AdoNet.AbstractBatcher.ExecuteBatch()
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at ____.Shared.NHibernate.NHibernateRepoSession.Dispose() in c:\\_____\\NHibernateRepoSession.cs:line 48
at ____.Store(String sourceId, String userId, ImageData imageData) in c:\\_____.cs:line 44
...

A: I hunted down this issue and got a response from SQL support: A, B, C, D, and E represent the steps of a connection attempt:
[Pre-Login] initialization=A; handshake=B; [Login] initialization=C; authentication=D; [Post-Login] complete=E;
A.      The connecting client and the server introduce themselves.  The client and server let the other know how it intends to communicate.
B.      A Secured Socket Layer connection is established.
C.      The connecting client introduces itself to the Master database / database.
D.      The Master database / database are referenced to complete authentication.
E.       A connection has been successfully established.


text:
Q: Filling a template causes some fields as NaN using Google Scripts Introduction
I am creating a Google Script that fills a Google Doc template based on the fields of a Google Forms and sends the generated PDF via email to the user. Now I need to implement the possibility that the user can edit its submit after he press on "Send Form".
This is the Doc template example:

This is how the Spreadsheet looks like (2nd row is added by me for columns enumeration):

Time stamp
Dirección de correo electrónico
Surname
First name
Year
Model
Birthday (1)
Car (1)
Add a new row?
Birthday (2)
Car (2)
Add a new row?
Birthday (3)
Car (3)
When

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14

2/04/2021 20:30:53
example1@gmail.com
A
F1
2005
Z
15/03/2008
MM
Y
12/12/1996
-
N

3/05/2009

2/04/2021 20:31:05
example2@gmail.com
B
F2
2006
X
3/02/2005
WW
N

24/08/2000

3/04/2021 21:40:04
example3@gmail.com
C
F3
2018
Y
-
TT
Y
3/03/2004
54
Y
-
43
24/12/2019

Script
Thanks to Rubén's answer I could handle some fields. This is my code so far:
function onSubmit(e) { // Function taken from https://medium.com/swlh/hacking-it-generate-pdfs-from-google-forms-3ca4fcc5a0aa
  const rg = e.range;
  const sh = rg.getSheet();

  const values =  e.range.getValues().flat();

  const cEmail = e.namedValues['Dirección de correo electrónico'][0] ? e.namedValues['Dirección de correo electrónico'][0] : values[1];
  const cSurname = e.namedValues['Surname'][0] ? e.namedValues['Surname'][0] : values[2];
  const cFirstName = e.namedValues['First name'][0] ? e.namedValues['First name'][0] : values[3];
  const cYear = e.namedValues['Year'][0] ? e.namedValues['Year'][0] : values[4];
  const cModel = e.namedValues['Model'][0] ? e.namedValues['Model'][0] : values[5];

  // EXTRACT DAY, MONTH AND YEAR from https://stackoverflow.com/a/66909780/11617040

  const monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];

  // Birthday 1
  var dateStrBirthday1 = e.namedValues['Birthday (1)'][0] ? e.namedValues['Birthday (1)'][0] : values[6];
  var dateArrBirthday1 = dateStrBirthday1.split("/");
  var newDateBirthday1 = dateArrBirthday1[1] + "/" + dateArrBirthday1[0] + "/" + dateArrBirthday1[2];
  var dateBirthday1 = new Date(newDateBirthday1);
  var cBDay1 = dateBirthday1.getDate();
  var cBMonth1 = dateBirthday1.getMonth()+1; // To use month with letters write monthNames[cMonth]
  var cBYear1 = dateBirthday1.getFullYear();
  // Birthday 2
  var dateStrBirthday2 = e.namedValues['Birthday (2)'][0] ? e.namedValues['Birthday (2)'][0] : values[9];
  var dateArrBirthday2 = dateStrBirthday2.split("/");
  var newDateBirthday2 = dateArrBirthday2[1] + "/" + dateArrBirthday2[0] + "/" + dateArrBirthday2[2];
  var dateBirthday2 = new Date(newDateBirthday2);
  var cBDay2 = dateBirthday2.getDate();
  var cBMonth2 = dateBirthday2.getMonth()+1; // To use month with letters write monthNames[cMonth]
  var cBYear2 = dateBirthday2.getFullYear();
  // Birthday 3
  var dateStrBirthday3 = e.namedValues['Birthday (3)'][0] ? e.namedValues['Birthday (3)'][0] : values[12];
  var dateArrBirthday3 = dateStrBirthday3.split("/");
  var newDateBirthday3 = dateArrBirthday3[1] + "/" + dateArrBirthday3[0] + "/" + dateArrBirthday3[2];
  var dateBirthday3 = new Date(newDateBirthday3);
  var cBDay3 = dateBirthday3.getDate();
  var cBMonth3 = dateBirthday3.getMonth()+1; // To use month with letters write monthNames[cMonth]
  var cBYear3 = dateBirthday3.getFullYear();

  const cCar = [];

  for (var i=1; i<=3; i++) {
    cCar.push(e.namedValues['Car (' + i + ')'][0] ? e.namedValues['Car (' + i + ')'][0] : values[7+(i-1)*3]);
  }

  const cWhen = e.namedValues['When'][0] ? e.namedValues['When'][0] : values[14];

  //Build a new invoice from the file
  //Folder and file IDs
  const folderAnswersID = '....';
  const folderAnswers = DriveApp.getFolderById(folderAnswersID);

  // Add actual time to the file name
  var today = new Date();
  const newFileName = 'Example - ' + cSurname + ' ' + cFirstName + ' ' + today.getDate() + ' ' + (today.getMonth()+1) + ' ' + today.getFullYear() + ' ' + today.getHours() + '_' + today.getMinutes();

  const temapleFileID = '........';

  //Make a copy of the template file
  const newAnswersFileID = DriveApp.getFileById(temapleFileID).makeCopy(newFileName, folderAnswers).getId();

  //Get the invoice body into a variable
  var document = DocumentApp.openById(newAnswersFileID);
  var body = document.getBody();

  //Replace all the < > text in the invoice body
  body.replaceText('<Surname>', cSurname);
  body.replaceText('<FirstName>', cFirstName);
  body.replaceText('<Year>', cYear);
  body.replaceText('<Model>', cModel);

  body.replaceText('<BDay1>', cBDay1);
  body.replaceText('<BDay2>', cBDay2);
  body.replaceText('<BDay3>', cBDay3);
  body.replaceText('<BMonth1>', cBMonth1);
  body.replaceText('<BMonth2>', cBMonth2);
  body.replaceText('<BMonth3>', cBMonth3);
  body.replaceText('<BYear1>', cBYear1);
  body.replaceText('<BYear2>', cBYear2);
  body.replaceText('<BYear3>', cBYear3);

  for (var i=1; i<=3; i++) {
    body.replaceText('<Car' + i + '>', cCar[i-1]);
  }

  body.replaceText('<When>', cWhen);

  document.saveAndClose();

  // From https://stackoverflow.com/a/66862676/11617040
  var docblob=document.getAs('application/pdf').setName(newFileName + '.pdf');
  var dupdocs=folderAnswers.getFilesByName(newFileName);
  while(dupdocs.hasNext()) {
    dupdocs.next().setTrashed(true);
  }
  var file=folderAnswers.createFile(docblob);

  var emailTitle = 'Your answer was submitted!';
  var emailBody = 'Dear ' + cSurname + ':

The document ' + newFileName + ' was submitted correctly. Please see the attachment.';

  var attachment = DriveApp.getFileById(newAnswersFileID);
  GmailApp.sendEmail(
    cEmail,
    emailTitle,
    "",
    {
      htmlBody: emailBody,
      attachments: [attachment.getAs(MimeType.PDF)]
    }
  );
}

I also have 2 triggers:

*

*On submit: When the user press "Send Form".

*Edit: When the user edits its Form after he press "Send Form".

There are 2 types of "Fields" that I need to care about:

*

*"Non-repetitive fields": Surname, First name, Year, Model, WHEN. These fields do not require a for loop so the code is not so long:

*

*"Non-date fields": Surname, First name, Year. They aren't special.

*"Date fields": WHEN. This is a Date field on Google Forms but nothing special.

*"Repetitive fields": Day, Month, Year, Car. These fields do require a for loop so the code is not so long:

*

*"Non-date fields": Car. I created a for loop for this field.

*"Date fields": Day, Month, Year. These fields were Date fields but they need to be separated so I have days, months and years separately. This was solved in a previous question but I don't know how to make a for loop for this ones.

Test and results
The user submits the 1st row:

2/04/2021 20:30:53
example1@gmail.com
A
F1
2005
Z
15/03/2008
MM
Y
12/12/1996
-
N

3/05/2009

This is the output:

Problem
There are a NaN values that I don't want them to appear. Instead they should be blank. How to solve this?


text:
Q: Intercept Delphi 2007 Form Creation Process to Time Component Creation I have a form with a lot of components on it that is taking a LONG time to display.  I have isolated the issue to being before the OnShow gets called so it must be one (or more) of the components on the form taking a long time to create.  Is there a way to hook in to the TForm component creation logic to see what component is causing the issue?

A: Through trial and error I figured out which component it was and determined that it was something to do with the debugger as running the application outside of Delphi had much better performance than from within.


text:
Q: Subtracting days in new Date() in a view I got this piece of code:
    xtype: 'datefield',
    editable: false,
    itemId: 'start-date-field',
    fieldLabel: 'Från',
    labelWidth: 50,
    format: 'Y-m-d',
    value: new Date(),
    disabled: true

and I'm trying to subtract some days from "new Date()" but my googlefu isn't good enought and this is probably easy enough for most people. I've tried new Date().getDay - 30 but that only generates an error.

A: xtype: 'datefield',
editable: false,
itemId: 'start-date-field',
fieldLabel: 'Från',
labelWidth: 50,
format: 'Y-m-d',
value: (function() {var lastMonth = new Date(); return lastMonth.setDate(lastMonth.getDate()-30), lastMonth;})(),
disabled: true

JSFiddle


text:
Q: Sorting a table by nested value in Lua I have a program which aggregates for every user the total number of downloads performed with an aggregate of the total downloaded data in kb.
local table = {}
table[userID] = {5, 23498502}

My aim is that the output of the printTable function will produce the entire list of users ordered in descending order by the amount of kb downloaded v[2]
local aUsers = {}

...

function topUsers(key, nDownloads, totalSize)
    if aUsers[key] then
        aUsers[key][1] = aUsers[key][1] + nDownloads
        aUsers[key][2] = aUsers[key][2] + totalSize
    else
        aUsers[key] = {nDownloads, totalSize}
    end
end

function printTable(t)
    local str = ""

    -- How to sort 't' so that it prints in v[2] descending order?

    for k,v in pairs(t) do
        str = str .. k .. ", " .. v[1] .. ", " .. v[2] .. "\n"
    end

    return str
end

...

Any ideas how could I do that?

A: You can get the keys into a separate table and then sort that table using the criteria you need:
local t = {
  a = {1,2},
  b = {2,3},
  c = {4,1},
  d = {9,9},
}
local keys = {}
for k in pairs(t) do table.insert(keys, k) end
table.sort(keys, function(a, b) return t[a][2] > t[b][2] end)
for _, k in ipairs(keys) do print(k, t[k][1], t[k][2]) end

will print:
d   9   9
b   2   3
a   1   2
c   4   1


text:
Q: Cannot find symbol class error I have problem i have added new class in Library called ExpandableTextView. Now when i have to use this class i have imported it in my MainActivity.class like this import com.image.ExpandableTextView; and when i run my app it shows me this error.
cannot find symbol class ExpandableTextView. It gets weird because in Library there is also another class in the same package and imported like this: import com.image.SlidingLayer; But it does not show the error and it is used in MainActivity. Has anyone have any idea what is happening?

A: Do you have the class modifier for ExpandableTextView set to private or package-local?