text:
Q: Spark Kubernetes - spark-submit --archives switch does not copy zip to the spark-driver pod I think this may be a bug in the spark-submit --archives switch when running in cluster mode with kubernetes.  In this example the data.zip is copied to the /tmp folder on the client but not the spark-driver pod.
The spark-driver pod tries to unpack the zip file and can't find it.
simplified example command ran from the client to submit to the EKS cluster:
${SPARK_HOME}/bin/spark-submit \
  --name spark-pi \
  --master k8s://https://xyz.gr7.us-east-1.eks.amazonaws.com \
  --deploy-mode cluster \
  --class org.apache.spark.examples.SparkPi \
  --conf spark.executor.instances=2 \
  --conf spark.kubernetes.namespace=spark \
  --conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
  --conf spark.kubernetes.container.image=myrepo.local:5000/spark-py:v3.3.1-j14 \
  --conf spark.kubernetes.file.upload.path=/tmp \
  --archives data.zip \
  --verbose \
  local:///opt/spark/examples/jars/spark-examples_2.12–3.0.1.jar

log excerpt from spark-submit:
22/11/03 10:57:38 INFO KubernetesUtils: Uploading file: /home/user/gitrepos/k8s-spark/data.zip to dest: /tmp/spark-upload-8a7d669e-3ca2-4a8a-b37a-51686f5d3395/data.zip...
22/11/03 10:57:39 INFO LoggingPodStatusWatcherImpl: State changed, new state:
         pod name: spark-pi-6cb5ce843dff6023-driver

log excerpt from the spark-driver pod:
Unpacking an archive file:/tmp/spark-upload-8a7d669e-3ca2-4a8a-b37a-51686f5d3395/data.zip from /tmp/spark-upload-8a7d669e-3ca2-4a8a-b37a-51686f5d3395/data.zip to /opt/spark/work-dir/./data.zip
Exception in thread "main" java.io.FileNotFoundException: /tmp/spark-upload-8a7d669e-3ca2-4a8a-b37a-51686f5d3395/data.zip

Instead the file was copied to the folder list above on the client.  It did not copy it to the spark-driver pod at least in a way that the automatic unpack can find it.
$ ls /tmp/spark-upload-8a7d669e-3ca2-4a8a-b37a-51686f5d3395/
data.zip

NOTE: I realize that there are alternative approaches, but I am trying to avoid packaging any data files into the docker image or using shared filesystems and just let the spark-submit call handle this.
My expectation is that the spark-driver pod can find and extract a zip file that is specified with the --archives switch call to spark-submit
Have I misused the archives functionality or could this be a bug?

A: spark.kubernetes.file.upload.path must be a path on a distributed/shared file system (HDFS/S3/NAS/etc.). The spark-submit process uploads the files to that path, and the driver and executors will try to download it from there. Looks like you are referencing some local /tmp folder.


text:
Q: Webbrowser Control - displaying text using "write" I'm using the IWebBrowser2 interface to render a page from an HTML string created at runtime. I have written a method (let's call it DisplayHtmlString) that takes an HTML string and renders it as shown in this example. The method also calls Navigate2 with "about:blank" first, to ensure a document is present, and it also calls close after calling write.
The first time I call DisplayHtmlString, the page is always rendered correctly, i.e. the browser displays HTML according to the string I pass. The problem is that subsequent calls sometimes do not work correctly, but render a blank page instead. What could be causing this?
I have found out that when the blank page is shown, this is the result of navigating to about:blank. This was determined by navigating to a local file instead, which is then shown (whereas the HTML string should be shown instead, due to the subsequent write/close). So the call to Navigate2 works, while the calls to write and close sometimes don't.
I considered IE-internal security checks as a possible cause (cross-domain checking?), but my gut feeling is that this isn't what's happening here.
It seems more likely to me that it is some kind of synchronization problem, along the lines of "IE hasn't finished rendering yet before the next call to DisplayHtmlString comes along". My code originally didn't check the browser's ready state (because the example doesn't). I added an experimental waiting loop with a call to get_readyState and observed that the state never got beyond "loading" before returning from the method - probably because rendering is asynchronous(?). I also notice that when successive calls to DisplayHtmlString work correctly, the program's main message loop has run (giving Windows a chance to process messages), which is not the case in the scenario where successive calls to DisplayHtmlString fail.
So I'm pretty sure I need to provide correct synchronization here, but how? I notice there's a method named onreadystatechange, but haven't experimented with that yet, due to the multitude of other things I tried while groping in the dark. Could that be the solution, and how does one use it correctly? Or, alternatively, shall I just process the message loop inside DisplayHtmlString until the ready state changes to "complete"?
UPDATE: Added message loop processing to DisplayHtmlString. In the first call (which works), the ready state gets to "interactive", but no further (which doesn't seem to be a problem). In the subsequent call (when it fails), the ready state stays at "loading", even though the message loop is processed.

A: You should handle readystatechange event on the document object. In JavaScript, it would look like this:

Hi, this is going to be replaced!

To get it done with C++ or C#, probably the easiest way would be to provide an implementation of IDispatch interface to IHTMLDocument2::put_readystatechange. Then IDispatch::Invoke(DISPID_VALUE) will be called back upon readystatechange event.
I might be able to help with a code sample if you specify the language in use.
[EDITED]
You can grab the complete example (C++/ATL/VS2012) from here. The code does it asynchronously by posting a custom message to the main window. It's too long to cite here, below are the relevant parts.
IDispatch implementation, for onreadystatechange Event Sink:
class CEventSink:
  public CComObjectRoot,
  public IDispatch
{
private:
  HWND m_hwnd;
  UINT m_message;

public:
  CEventSink()
  {
    m_hwnd = NULL;
    m_message = NULL;
  }

  BEGIN_COM_MAP(CEventSink)
    COM_INTERFACE_ENTRY(IDispatch)
  END_COM_MAP()

  // Init
  void Init(HWND hwnd, UINT message)
  {
    m_hwnd = hwnd;
    m_message = message;
  }

  // IDispatch
  STDMETHODIMP GetTypeInfoCount(UINT* pctinfo) {
    return E_NOTIMPL; }

  STDMETHODIMP GetTypeInfo(UINT itinfo, LCID lcid, ITypeInfo** pptinfo) {
    return E_NOTIMPL; }

  STDMETHODIMP GetIDsOfNames(REFIID riid, LPOLESTR* rgszNames, UINT cNames, LCID lcid, DISPID* rgdispid) {
    return E_NOTIMPL; }

  STDMETHODIMP Invoke(
    DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags,
    DISPPARAMS* pDispParams, VARIANT* pvarResult,
    EXCEPINFO*  pExcepInfo, UINT* puArgErr)
  {
    if ( dispidMember != NULL )
      return DISP_E_MEMBERNOTFOUND;

    // Just post a message to notify the main window
    ::PostMessage(m_hwnd, m_message, 0, 0);
    return S_OK;
  }

};

Using it:
CComObject<CEventSink>* p = NULL;
hr = CComObject<CEventSink>::CreateInstance(&p);
if ( FAILED(hr) )
  return 0;
p->Init(m_hWnd, WM_DOCUMENTREADYSTATECHANGE);
m_eventSink = p; // does AddRef

// ...

m_htmlDocument2->put_onreadystatechange(CComVariant(m_eventSink));

For more details, get the sources and look at WebOcHost.cpp. The error checks are very basic, for brevity.

redpajama_set_name: RedPajamaStackExchange


text:
Q: Perl debugger on test modules I'm running into problems testing a new addition to a module. (Specifically - the ~ operator seems to be not working in Math::Complex for this new feature only.)  It's too bizarre to be what it appears but the ideal scheme would be to add the -d option on the top line of the .t program.
Well, I was quickly disabused of that idea! It does not invoke the debugger.
If I wanted to use the debugger, I'd need to create an edit of the .t program that:

*

*Uses (the use command) the module directly. not in the form of
BEGIN { use_ok('My::Module') };

*Does not "use Test::More;"

*A few other edits that cause gluteal pains

The problem with doing that is that any changes I make in the edited test program I still need to transfer back to the true test program use in "make test".  Error prone as best.
I am already using "make test TEST_VERBOSE=1" so that my stdio output shows up.  But there's GOT to be a simpler way to invoke the debugger on the .t
Thanks for ideas here.
-- JS

A: use_ok tests are great, but you should have them in test files of their own, not test files that also test other things.
I'm not sure why you would need to avoid Test::More or use_ok to run the debugger, though.  What does happen when you try your test directly:
perl -d -Mblib t/yourtestfile.t?

If all else fails, you can try using Enbugger in your test script.


text:
Q: I'm having trouble playing audio in javascript at the same time So far, I have tried using this function to create a new audio element every time it is called:
function createAudio(src, type){
  var sound = new Audio();
  var source = document.createElement('source');
  source.type = type;
  source.src = src;
  sound.appendChild('source');
  sound.play();
};

That way, if you want to play a single audio file called, for example, "gunshot.mp3", but multiple times you can use this line of code:
createSound('gunshot.mp3','audio/mpeg');

This works ok, but what will happen is that when the sound is loaded a bunch of times, it will just stop running entirely. Every time that you reload the game its like rolling dice to see which sounds will or won't run, and even when it does run its patchy and inconsistent.
I'm guessing that it has something do with the html page being overloaded with new elements, so is there maybe a way to clear the elements every once and a while, like clearing a particle array so it doesn't get too long? Or is it just that my function is not correct in the first place?
Thanks!


text:
Q: JSP Custom tags - Fragment Attribute not working I am trying to create my jsp custom tag for layout purpose.
I created panelLayout.tag file like
<%@ tag language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<%@ attribute name="heading" required="false" %>
<%@ attribute name="footer" fragment="true"%>

    <c:if test="${not empty heading}">

            <c:out value="${heading}"></c:out>

    </c:if>

        <jsp:doBody/>

        <jsp:invoke fragment="footer"/>

And I am using it in one of the jsp as below
<%@taglib prefix="t" tagdir="/WEB-INF/tags" %>

<t:panelLayout>
    This is my body
   <jsp:attribute name="footer">
       This is my footer
   </jsp:attribute>
</t:panelLayout>

And I am getting below error
org.apache.jasper.JasperException: /WEB-INF/pages/Groups.jsp (line: 86, column: 33) jsp:attribute must be the subelement of a standard or custom action
    org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
    org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
    org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:89)
    org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1126)
    org.apache.jasper.compiler.Parser.parseElementsScriptless(Parser.java:1499)
    org.apache.jasper.compiler.Parser.parseBody(Parser.java:1666)
    org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:986)
    org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1258)
    org.apache.jasper.compiler.Parser.parseElements(Parser.java:1451)
    org.apache.jasper.compiler.Parser.parse(Parser.java:138)
    org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)
    org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
    org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:354)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:341)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:662)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:364)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
    org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:263)
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:939)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:827)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.64 logs.

If I remove footer fragment, it is working fine.
I got the reference from here
https://docs.oracle.com/cd/E19879-01/819-3669/bnamr/index.html
Searched stackoverflow and other reference as well, but couldn't find what I did wrong.
Any help appreciated.

A: You can try to enclose the body between <jsp:body></jsp:body>:
<t:panelLayout>
    <jsp:attribute name="footer">
        This is my footer
    </jsp:attribute>
    <jsp:body>
        This is my body
    </jsp:body>
</t:panelLayout>

Check The Java EE 5 Tutorial - Types of Tags:

jsp:body Element
You can also explicitly specify the body of a simple tag by using the jsp:body element. If one or more attributes are specified with the jsp:attribute element, then jsp:body is the only way to specify the body of the tag. If one or more jsp:attribute elements appear in the body of a tag invocation but you don't include a jsp:body element, the tag has an empty body.


text:
Q: excel countif multiple sheets I have a summary sheet with names in one column and I want to consolidate (count) the names which are appearing in different sheets on the same workbook.  Names are not necessarily appear in same Columns across all worksheets.  Column is changed in every sheet.  I am using excel 2010 version.
Summary Sheet
NameA
NameB
NameC

Sheet2
In column L, I have these names (NameA, NameB, Namec, etc.)
Sheet3
In Column M, I have these names (NameA, NameB, Namec, etc.)
Sheet4
In column K, I have these names (NameA, NameB, Namec, etc.)

A: You can use the following Formula:
=COUNTIF(Sheet2!$L:$L,A2)+COUNTIF(Sheet3!$M:$M,A2)+COUNTIF(Sheet4!$K:$K,A2)
A2 is the first name in the summary sheet (NameA in your example)
in B2 write the formula
$L:$L the names in sheet2 in column L
$M:$M the names in sheet3 in column M
$K:$K the names in sheet4 in column K
even when you add more names in the corresponding columns it will be counted


text:
Q: Change the state of a boolean once button is clicked Developing a C# application for appointments. I want the admin to be able to go into the details page and click a button to confirm an appointment, which is a boolean set to false to start. Once its clicked, I'll have the page to reload with the appointment confirmed.
I'm having trouble understanding how to achieve this.
Here's my controller:
    [HttpPost]
        [ValidateAntiForgeryToken]
        public ActionResult Details([Bind(Include = "AppointmentId,Confirmed")] Appointments appointments)
        {
            if (ModelState.IsValid)
            {
                db.Entry(appointments).State = EntityState.Modified;
                db.SaveChanges();
return RedirectToAction("Details", new { id = appointments.AppointmentId });
            }

            return View(appointments);
        }

And my details page where I want to do this part:

        @Html.DisplayName("Appointment Status")

        @if (Model.Confirmed == false)
        {

                    <input type="submit" value="Confirm Appointment" class="btn btn-default" />

        }
        else if (Model.Confirmed == true)
        {

                @Html.DisplayName("Appointment Confirmed")

        }

I've been at this project all day so maybe tired eyes are playing with me

A: Looks like you're most of the way there. But your submit button needs to be within a form which will post back again.
Here's one way to do it, where it posts to a specific "ConfirmApppointment" action method on the server which will confirm the appointment (since that appears to be the only field you want to update, there's no real need to post back the whole appointment model).
I think you also need to put the appointment ID in a hidden field so it gets posted back to the server in order to know which appointment to confirm:
Details view will be something like this:
Appointment Status
@if (Model.Confirmed == false)
{

  @using (Html.BeginForm("ConfirmAppointment", "Appointment", FormMethod.Post))
  {

        <input type="submit" value="Confirm Appointment" class="btn btn-default" />
        <input type="hidden" name="appointmentID" value="@Model.Id"/>

  }

}
else if (Model.Confirmed == true)
{
  Appointment Confirmed
}

And in your controller (I have assumed your controller is called "Appointments", but if not please amend it in the Html.BeginForm) above:
//this method is just for displaying your Details view. I'm not sure how exactly your code gets to here, since you didn't specify much (apart from a button gets clicked), so if the method signature is wrong, that'll be something for you to fix yourself, or ask another question about
public ActionResult Details(Appointments appointment)
{
    return View(appointment);
}

//this method receives the postback when the "Confirm Appointment" button is pressed, and updated the appointment details. Then it returns to the user to the same screen, where this time they should see the "Appointment Confirmed" message instead of the button
[HttpPost]
public ActionResult ConfirmAppointment(int appointmentID)
{
  var appt = db.Appointments.Find(appointmentID);
  appt.Confirmed = true;
  db.SaveChanges();
  return View(appt);
}


text:
Q: How to use zxing core.jar into my own app I'm developping an app, and i need to store the product's barcode,so i need to read them.
I'v been reading other posts about what should i do to read a barcode without having to install BarcodeScanner.
I saw the post:
"The complete source code is available from the ZXing project. You want to build core.jar from core/ and put it in your Android lib/ folder to include the core decoder in your app. You do not want to include javase. You can look to the code in android/ as it is the source to Barcode Scanner, but as the authors we'd suggest you not just copy and paste it."
But,I am beginning at Android and don't know HOW exactly to do what it describes. Could someone be a little more specific how i do that?
Sorry if it is a stupid question.

A: *

*Get the latest core-x.x.x.jar from https://repo1.maven.org/maven2/com/google/zxing/core/

*Switch to project folder view in Android Studio and copy the .jar into your app/libs folder

*Right click on the .jar and choose "Add As Library..."
This will automatically add the dependencies to your build.gradle so you can just start to use the library e.g. to generate and display a barcode as easy as in this example:
    import com.google.zxing.BarcodeFormat;
    import com.google.zxing.WriterException;
    import com.google.zxing.common.BitMatrix;
    import com.google.zxing.qrcode.QRCodeWriter;
    ...
    ImageView qrImg = (ImageView)findViewById(R.id.qrImageView);

    int width = 512;
    int height = 512;
    QRCodeWriter writer = new QRCodeWriter();
    try {
        BitMatrix bitMatrix = writer.encode("Hello World", BarcodeFormat.QR_CODE,width,height);
        Bitmap bmp = Bitmap.createBitmap(width,height, Bitmap.Config.RGB_565);
        for (int x = 0; x < width; x++) {
            for (int y = 0; y < height; y++) {
                // Copy pixel-by-pixel
                bmp.setPixel(x, y, bitMatrix.get(x, y) ? Color.BLACK : Color.WHITE);
            }
        }
        qrImg.setImageBitmap(bmp);
    } catch (WriterException e) {
        // Handle exception
    }


text:
Q: Update custom field from Identity user Hey I try to persist updated fields from my Identity User like this:
 var storage = new UserStore<ApplicationUser>(new SpomunicateContext());
 var manager = new Microsoft.AspNet.Identity.UserManager<ApplicationUser>(storage);
 await manager.UpdateAsync(user);

This doesnt work because I get this error:

"Attaching an entity of type 'SpommunicateWebAPI.Models.ApplicationUser' failed because another entity of the same type already has the same primary key value. This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate.",

And I have no idea what happend..  There is no entity like Application User.
I only got this class:
   public class ApplicationUser : IdentityUser
{
    public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManager<ApplicationUser> manager)
    {
        // Note the authenticationType must match the one defined in CookieAuthenticationOptions.AuthenticationType
        var userIdentity = await manager.CreateIdentityAsync(this, DefaultAuthenticationTypes.ApplicationCookie);
        // Add custom user claims here

        return userIdentity;
    }

    public virtual ICollection<Function> Functions { get; set; }
    public virtual ICollection<Participation> Participations { get; set; }
    public virtual ICollection<Team> Teams { get; set; }
    public string Firstname { get; set; }
    public string Lastname { get; set; }
    public string Mobile { get; set; }
    public DateTime Birthdate { get; set; }
}

}
could that be the problem?
Before owin I got a Entity Person with the same fields but I dropped my Db and removed the entity so I think that could not be the problem.
EDIT
I get my user from here:
public static ApplicationUser GetUserByUsername(string username)
    {
            return HttpContext.Current.GetOwinContext().GetUserManager<ApplicationUserManager>().FindByNameAsync(username).Result;
    }


text:
Q: SSIS expression previous date without DateAdd() Currently developing a package that passes an expression from a previous date to a filename. The current code I have is the following as a string variable:

(DT_WSTR,20)DATEPART("YYYY",Dateadd("DD",-1,dateadd("MM",datediff("MM",
  (DT_DATE) "1900-01-01",getdate())-2, (DT_DATE) "1900-01-01")))
  + RIGHT("0"+(DT_WSTR,20)DATEPART("MM",Dateadd("DD",-1,dateadd("MM",datediff("MM", (DT_DATE) "1900-01-01",getdate())-5, (DT_DATE) "1900-01-01"))),2)
  + "01"

This currently produces the output of:

20171101

This is currently incorrect because I'd like the date to be from the previous year:

20161101

Here's the forumula I'd like:
Return the 1st day of the month that is 7 months in the past from today's date.
Example: 5/2/2017 would return 11/1/2017; 6/21/2017 would return 12/1/2016; 7/10/2017 would return 1/1/2017; etc.
Is this possible to do via a variable in SSIS?

A: Your expression can be modified (and simplified) to this
(DT_WSTR, 8)( ( YEAR( DATEADD( "MM", -7, GETDATE() ) ) * 10000 ) + ( MONTH( DATEADD("MM", -7, GETDATE() ) ) * 100 ) + 1 )

*

*subtract 7 months from current date

*multiply resulting year by 10000

*subtract 7 months from current date

*multiply resulting month by 100

*add year-value, month-value and 1 (first day)

*convert to string

Credit to @Rangani in Yesterday's date in SSIS package setting in variable through expression for "multiply and add instead of string concat" trick

A: SELECT LEFT(CONVERT(VARCHAR, DATEADD("MM", -6, '2017-05-02'), 112), 6) + '01'
SELECT LEFT(CONVERT(VARCHAR, DATEADD("MM", -6, '2017-06-21'), 112), 6) + '01'
SELECT LEFT(CONVERT(VARCHAR, DATEADD("MM", -6, '2017-07-10'), 112), 6) + '01'


text:
Q: relocating the .git folder I don't think this is possible without a bit of hacking but just throwing it out there.
In Git is it possible to relocate the bulk of the .git folder (/objects i assume) to another location. I am having a problem without my current hard drive filling up with git and i want to be able to move it to a separate hard drive to free up space.

A: There are three possibilities I can think of:

*

*The GIT_DIR environment variable tells Git where to look for the repository. The default is .git, obviously, but you can also set it to /some/where/else, if you want.

*The GIT_OBJECT_DIR environment variable does the same, but just for the .git/objects subdirectory, not the whole repository.

*You can use the file .git/objects/info/alternates or the environment variable $GIT_ALTERNATE_OBJECT_DIRECTORIES to "borrow" objects from another repository.

See the git-repositorylayout(5) manual page for details.

A: Git has a command line option called --git-dir. Whenever you run git, use the --git-dir option.
 git --git-dir=a_different_git_directory status

Perhaps you could put that in a batch file or something to make your life easier.

A: Usually the .git directory isn't that big. When is the last time you did a garbage collection?
git gc

This cleans up unreferenced objects in the git store.


text:
Q: Write a string list to a file and retrieve it How to write a list of strings to a file and then retrieve the list?Basically how do I write a small custom serializer and deserializer for this custom job.

A: Seems that is a case that serialization will do the work, as you pointed is trivial to select a separator that is not used on the string.
md5 clearly you cannot use it,becouse is a one way encripting, so you will not be able to obtain the list laster.
The other option if you don´t want to use serialization, is to convert each string in base64, and then keep a empty line as separator per example.
About serialization:
How to write and read java serialized objects into a file


text:
Q: How to get Telerik's RadEditor's Spell checker to start automatically when incorrect word is typed? Currently I have to click the Spell check button on RadEditor's toolbar to see the word suggestions. Is there any way for that? I did find a way to run Spell Checker on Submit Button click but how do I get what I want? I have gone through forums but in vain. Need help please. Thanks
Telerik people have not replied. It's been three days now so asking here. Anybody who is familiar with Telerik controls please help me out.
edit:
Anybody in here who is familiar with Telerik controls please help me out.

A: I don't think there is a way for the spellchecker to check each word right after you type it - you have to click the spell tool (or you can assign a keyboard shortcut for it). By the way - all modern browsers except IE already offer built-in spellcheck support that is available inside the RadEditor as well - you can try it by opening a RadEditor page with Firefox, Chrome, etc. - RadEditor demo. Just start typing and the incorrect words will be marked.

A: you can try this solution, it took a time interval after stop typing:
 <script type="text/javascript">

    //setup before auto spellchecking functions
    var typingTimer;                //timer identifier
    var doneTypingInterval = 2000;  //time in ms, 2 second for example

function InitializeRadEditor() {
        var editor = $find("<%= RadEditor1.ClientID %>");

        //  Getting a reference to content area and attach events to it
        var myInput = editor.get_contentArea();

        myInput.attachEvent("onkeyup", Func_onkeyup);
        myInput.attachEvent("onkeydown", Func_onkeydown);
    }

//  RadEdit content area event function
    function Func_onkeyup() {
        typingTimer = setTimeout(doneTyping, doneTypingInterval);
    }
    //  RadEdit content area event function
    function Func_onkeydown() {
        clearTimeout(typingTimer);
    }

//user is "finished typing," fire the spellchecker
    function doneTyping() {
        var editor = $find("<%= RadEditor1.ClientID %>");
        if (editor.get_text() != "") {
            editor.fire("AjaxSpellCheck"); //fire the spellchecker "Or any name in your tools.xml file , that related to SpellCheck"
            return false;
        }
    }

</script>

<telerik:RadEditor runat="server" ID="RadEditor1" SkinID="DefaultSetOfTools"   Height="515"
 OnClientLoad="InitializeRadEditor" EditModes="Design,Preview" Width="680" DialogHandlerUrl="~/Telerik.Web.UI.DialogHandler.axd"
  ToolsFile="~/ToolsFile.xml"></telerik:RadEditor>


text:
Q: Post to Facebook timeline Can anyone provide me the steps using an app to post using facebook php sdk on my timeline.
What permissions are needed?
I have already tried various methods. But it would be helpful if you'll can share any link which you'll found working for you'll.
I am facing issues with the post. With the error saying that that user has not authorised the app. However the user has authorised it.
Something with the access token is causing an issue which i cannot trace.
I have already posted my code but I haven't received much response there.
Post to facebook fan page as a user

Update: I was receiving error as I was using older version of php-sdk. changing it to the latest one, fixed my problem.

A: you should ask for the 'publish_stream' permission, here you can find a complete example:
https://developers.facebook.com/docs/php/howto/postwithgraphapi


text:
Q: How can I consolidate repositories? I have a number of repositories that I'd like to consolidate into one called Z.  so if I have repos A, B and C, I'd like to end up with Z/A, Z/B and Z/C.  in other words, each repository becomes a folder in the one repo Z
my approach was: clone Z, change directory into it and clone the others, but when I tried to add I got the following:
warning: adding embedded git repository: A
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint:   git submodule add <url> A
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint:   git rm --cached A
hint:
hint: See "git help submodule" for more information.

but in reading about submodules, I don't think it's what I want because it's basically  a reference to a repo inside of another and I want to move this code
what I ended up doing is the same as above but rm -rf A/.git -- but of course, I lose the history and I'd like to keep it.
how can I do this?

A: You can't.
Well, you can, sort of, but overall it's not well-defined: what does it mean to retain the history of a separate Git repository?  The history in a repository is nothing more or less than the commits in that repository.  The hitch here is that we find commits using (mostly) branch and tag names, and while you can add as many commits (and other objects) you like to the commits-and-other-objects database, as each unique object has a unique name–its hash ID—so that no two names will ever collide, that's not the case in general for the branch and tag names.
Let's take a concrete but simplified example, where we invent two repositories A and B, which you'll want to claim as Z/A and Z/B.  Repository A has two commits, which were created on 1 Jan 1990 and 31 Dec 2032 (ten years into the future).  Repository B has three commits, which were created on (respectively) 1 Jan 1970, 1 Jan 1990, and 31 Dec 1999.
How many commits should exist in Z?  Two?  Three?  Four?  Five?  Why?
If your answer is two, what should be in the first and last commits and what should their dates be?
If your answer is three, or four, or five, what should their dates and contents be, and why?
Once you can answer this systematically, you can come up with a procedure for transforming the original commits into new (different) commits in your combined repository.  The new commits won't relate to the original commits in any way other than whatever your combining system dictates.
Submodules sidestep this problem by not trying to store some other repository's commits.  Instead, we make a "super-module" Z that has however many commits it has.  Let's say it has two:

*

*One, made on 2 Jan 1990 after the first commit in A and second in G, says: use the first commit in repo A, and the second commit in repo B: here are their two hash IDs.

*Another, made more recently but not yet using the future-dated commit in repo A, says: use the first commit in repo A, and the third commit in repo B: here are their two hash IDs.  The hash ID of the commit to use in A matches the one in the earlier commit in this same repository.
You can now make a third commit in Z if you like, to update the reference to repo A to say to use the future-dated commit, if you like.  You can have this third commit continue to use the third commit in B, or retreat back to one of the earlier B commits.  Z's only responsibility here is to say which commits we're to use from A and B; A and B retain their history, and Z has its own separate history, and all is simple, except for the fact that submodules are painful.  (Note that the superproject in Z does not use any branch or tag names for either A or B.  It uses only the unique hash IDs as "names" within those clones.)


text:
Q: get positive integer value in objective c Might be this is a silly question but I'm not able to do this. Is there any way to get only positive value of integer even if my int value is negative. for example I have an int having -15 but I want to use only 15 so is there any way to do this?

A: abs().

See manpage for details.


text:
Q: MS Sql Server dacpac deploy  var svc = new DacServices(connectionString);
    using (var dacPak = DacPackage.Load(dacpacPath))
    {
     svc.Deploy(dacPak, databaseName);
    }

Returns below error: using .net Framework 4.7.2
Microsoft.SqlServer.TransactSql.ScriptDom.SqlScriptGeneratorOptions.set_AllowExternalLibraryPaths(Boolean)
Stacktrace:
at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.ScriptGeneratorFacade..ctor(DeploymentContext context, Func1 getTargetDboUserSecurityId) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeploymentPlanGenerator.OnInitialize(SqlDeployment engine) at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.InitializePlanGeneratator() at Microsoft.Data.Tools.Schema.Sql.Deployment.SqlDeployment.CreateController(Action1 msgHandler)
at Microsoft.SqlServer.Dac.DacServices.CreateController(SqlDeployment deploymentEngine, ErrorManager errorManager)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.<>c__DisplayClass5.b__1()
at Microsoft.Data.Tools.Schema.Sql.Dac.OperationLogger.Capture(Action action)
at Microsoft.SqlServer.Dac.DeployOperation.<>c__DisplayClass3.b__0(Object operation, CancellationToken token)
at Microsoft.SqlServer.Dac.Operation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.ReportMessageOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.CompositeOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.DeployOperation.Microsoft.SqlServer.Dac.IOperation.Run(OperationContext context)
at Microsoft.SqlServer.Dac.OperationExtension.Execute(IOperation operation, DacLoggingContext loggingContext, CancellationToken cancellationToken)
at Microsoft.SqlServer.Dac.DacServices.InternalDeploy(IPackageSource packageSource, Boolean isDacpac, String targetDatabaseName, DacDeployOptions options, CancellationToken cancellationToken, DacLoggingContext loggingContext, Action3 reportPlanOperation, Boolean executePlan) at Microsoft.SqlServer.Dac.DacServices.Deploy(DacPackage package, String targetDatabaseName, Boolean upgradeExisting, DacDeployOptions options, Nullable1 cancellationToken)
at dacpac.Migrations.Program.CreateAndInitializeFromDacpac(String databaseName, String connectionString, String dacpacPath) in C:\Users\myself\source\repos\ConsoleApp3\Program.cs:line 63
at dacpac.Migrations.Program.Main(String[] args) in C:\Users\myaelf\source\repos\ConsoleApp3\Program.cs:line 25
references:


text:
Q: Comparison of the gradients of two harmonic functions near the boundary Let $\Omega$ an open bounded  domain in $R^n$. Let $u,v$ be nonconstant smooth functions in the interior of $\Omega$  and harmonic in $\Omega$. Suppose that $u,v \in C(\overline{\Omega})$ and $u \geq v$ in $\Omega$. Suppose that exists $x_0 \in \partial \Omega$ with $u(x_0) = v(x_0)$ and $|\nabla u| \leq 1$  in $\Omega$. (I took $1$ for convenience). Is the following inequality true?
$$ \limsup_{y \rightarrow x_0} |\nabla u (y)| \geq \limsup_{y \rightarrow x_0} |\nabla v (y)| $$
I dont know if is true, but if yes, it will help me to understand a passage of a paper. I tried to prove, but no success.
Someone could give me a help?
thanks in advance!
This question is related to the last inequality of the case i) (and the case ii)) of lemma 2.3 of the article Existence of classical solutions to a free boundary problem for the p-Laplace operator, (I) by A. Henrot and H. Shahgholian
(the article is in the right side of the page)

A: No, this is not true. Let $\Omega$ be unit disk in the plane, and let $u(x_1,x_2) = x_1$. Define $v$ on the boundary so that  $v(x_1,x_2) = x_1 - M|x_2|$, where $M$ is large. Then $\partial v/\partial \theta$ is the harmonic function which takes large values on the boundary near $(1,0)$, approximately $\pm M$. Therefore, it will take on large values near $(1,0)$ inside the domain.


text:
Q: WPF project can't load assembly....This assembly is built by a runtime newer I have a WPF project.  It's using a library I created with all the business logic and services.  It compiles fine.  The .NET framework (library) targets is .NET 4.  The .NET framework the WPF project targets is .NET 4.
Every dependency that each one of these use is .NET 4.  My only suspicion is with NuGet and the versions of Castle.Core and Castle.Windsor it installs, although in my other WPF projects with NuGet and installing Castle Windsor I haven't had this problem.  I'm lost, no suggestions in the other posts about this same error have resolved the issue.
Any ideas on where else I can look in the project for clues?
Here's the order in what happens when I run the application:

*

*first error says: "Error while trying to start the project: Unable to start program 'C:....pathtoBin\DbInstallerWPFForm.exe'"  I then press ok.

*I then try Debug a second time and the following error comes up (doesn't happen on the first run, only the second):
System.BadImageFormatException was unhandled
Message: Could not load file or assembly 'DBInstallerWPFForm.exe' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.


text:
Q: How to insert CSS file below styles.css in Magento 2? I can add a custom CSS file by adding this to Magento_Theme/layout/default.xml:
<head>
    <css src="css/local.css" />
</head>

However, it is still loaded before /pub/media/styles.css -- how do I get this file to load AFTER styles.css?

A: Unfortunately not possible with default functionality. You need to build a module for that behaviour.
I'm using this https://github.com/quickshiftin/mage2-ordered-assets module which works out of the box:
<css src=".." order="20"/>

A: It turns out /pub/media/styles.css is a file that contains only styles for the Luma homepage promo blocks, so if you have your own homepage design then you can safely remove it entirely by going to Admin / Stores / Configuration / General / Design / HTML Head and removing the link tag from the Miscellaneous Scripts field.
CSS files are not even supposed to be placed in the Miscellaneous Scripts field, as it's really meant for JavaScript files (you can tell by how styles.css is placed below the rest of the JS files). If you want to create a stylesheet that is only loaded on the homepage, then it's better to put your styles in a file called something like home.css and add it to only the homepage by overriding the cms_index_index.xml layout file.
Credit for locating styles.css: Gordova's answer to this question.

A: You can include all your code into the built in less functionality in the theme you have created. Make a file at:
web/css/source/_extend.less
and place your css code there. You don't have to write less in these files, you can write vanilla css and will work just fine.
This file will be automatically and complied with the rest of the less files on the site and your code will be the last in the compilation process giving you CSS Specificity. The two files that get generated are /pub/static/frontend/{{vender_name}}/{{your_theme}}/en_US/css/styles-l.css and /pub/static/frontend/{{vender_name}}/{{your_theme}}/en_US/css/styles-l.css. These are the primary styles for the whole build. More info about that process
For a decent work flow, you are going to have to pick the way that works best for you. If you are doing a lot of editing with a lot of css, you might want to get Grunt up and running. If you just have a little bit of work to do, client side compilation might be the best bet. Read Here for more information on setting that up.


text:
Q: R - how to paste from console into text editor keeping format? basic question: how can I export a table that I print into the R console and paste into a text editor (e.g this dialog box) keeping a decent format. Consider that I want to print the head of my table:
> head(cytoplasmic)

I will get the following output in the console:
   V1                V2            V3                  V4                   V5                    V6
3  LdBPK_020440.1 cytoplasmic: 0.54 nuclear: 0.45  mitochondrial: 0.0 Golgi apparatus: 0.0      peroxisomal: 0.0
5  LdBPK_201720.1 cytoplasmic: 0.89 nuclear: 0.06 mitochondrial: 0.02    peroxisomal: 0.01 Golgi apparatus: 0.01
6  LdBPK_070130.1 cytoplasmic: 0.61 nuclear: 0.32   peroxisomal: 0.05  mitochondrial: 0.02  Golgi apparatus: 0.0
7  LdBPK_040060.1 cytoplasmic: 0.52 nuclear: 0.43 mitochondrial: 0.02  extracellular: 0.01     peroxisomal: 0.01
13 LdBPK_191560.1 cytoplasmic: 0.49 nuclear: 0.46 mitochondrial: 0.03    peroxisomal: 0.01  Golgi apparatus: 0.0
15 LdBPK_364730.1 cytoplasmic: 0.93 nuclear: 0.06  mitochondrial: 0.0     peroxisomal: 0.0  Golgi apparatus: 0.0
                      V7                   V8      V9            V10
3   plasma membrane: 0.0   extracellular: 0.0 ER: 0.0 lysosomal: 0.0
5     extracellular: 0.0 plasma membrane: 0.0 ER: 0.0 lysosomal: 0.0
6   plasma membrane: 0.0   extracellular: 0.0 ER: 0.0 lysosomal: 0.0
7  Golgi apparatus: 0.01 plasma membrane: 0.0 ER: 0.0 lysosomal: 0.0
13  plasma membrane: 0.0   extracellular: 0.0 ER: 0.0 lysosomal: 0.0
15    extracellular: 0.0 plasma membrane: 0.0 ER: 0.0 lysosomal: 0.0

Which does not have a decent format in this text dialog at all.
I also tried using the kable function from the knitr package with the following code:
> kable(head(cytoplasmic, format = "markdown"))

then I get the following output:
   |V1             |V2                |V3            |V4                  |V5                   |V6                    |V7                    |V8                   |V9      |V10            |
|:--|:--------------|:-----------------|:-------------|:-------------------|:--------------------|:---------------------|:---------------------|:--------------------|:-------|:--------------|
|3  |LdBPK_020440.1 |cytoplasmic: 0.54 |nuclear: 0.45 |mitochondrial: 0.0  |Golgi apparatus: 0.0 |peroxisomal: 0.0      |plasma membrane: 0.0  |extracellular: 0.0   |ER: 0.0 |lysosomal: 0.0 |
|5  |LdBPK_201720.1 |cytoplasmic: 0.89 |nuclear: 0.06 |mitochondrial: 0.02 |peroxisomal: 0.01    |Golgi apparatus: 0.01 |extracellular: 0.0    |plasma membrane: 0.0 |ER: 0.0 |lysosomal: 0.0 |
|6  |LdBPK_070130.1 |cytoplasmic: 0.61 |nuclear: 0.32 |peroxisomal: 0.05   |mitochondrial: 0.02  |Golgi apparatus: 0.0  |plasma membrane: 0.0  |extracellular: 0.0   |ER: 0.0 |lysosomal: 0.0 |
|7  |LdBPK_040060.1 |cytoplasmic: 0.52 |nuclear: 0.43 |mitochondrial: 0.02 |extracellular: 0.01  |peroxisomal: 0.01     |Golgi apparatus: 0.01 |plasma membrane: 0.0 |ER: 0.0 |lysosomal: 0.0 |
|13 |LdBPK_191560.1 |cytoplasmic: 0.49 |nuclear: 0.46 |mitochondrial: 0.03 |peroxisomal: 0.01    |Golgi apparatus: 0.0  |plasma membrane: 0.0  |extracellular: 0.0   |ER: 0.0 |lysosomal: 0.0 |
|15 |LdBPK_364730.1 |cytoplasmic: 0.93 |nuclear: 0.06 |mitochondrial: 0.0  |peroxisomal: 0.0     |Golgi apparatus: 0.0  |extracellular: 0.0    |plasma membrane: 0.0 |ER: 0.0 |lysosomal: 0.0 |

which, on the R console looks somewhat better, it is although not really readable here.
Thanks


text:
Q: find value in multidimensional array I have to find value in a multidimensional array, size of array is not defined.
Let suppose user enters 1601 , result will be 011.
and if 1605 , the result will be 015 according to array
   array (size=6)
      0 =>
        array (size=2)
          0 => string 'Zipcode' (length=7)
          1 => string 'Territory Code' (length=14)
      1 =>
        array (size=2)
          0 => string '1601' (length=4)
          1 => string '011' (length=3)
      2 =>
        array (size=2)
          0 => string '1602' (length=4)
          1 => string '012' (length=3)
      3 =>
        array (size=2)
          0 => string '1603' (length=4)
          1 => string '013' (length=3)
      4 =>
        array (size=2)
          0 => string '1604' (length=4)
          1 => string '014' (length=3)
      5 =>
        array (size=2)
          0 => string '1605' (length=4)
          1 => string '015' (length=3)

A: If Zipcode is unique then you can do:
echo array_column($array, 1, 0)[1601];

Or if Territory Code is unique:
echo array_search(1601, array_column($array, 0, 1), true);

array_column() extracts a column from the multi-dimensional array to create a one dimensional array.

array array_column ( array $input , mixed $column_key [, mixed $index_key = null ] )

The second parameter $column_key defining which column you want to get from the multidimensional array as values into the one dimensional array. And the third parameter $index_key defining which column you want to use as keys for the one dimensional array which you get back. If $index_key is not defined, the array will be numerical enumerated.
First code example
So the first example extracts an array such as:
array(1601 => '011', 1602 => '012')

Using the value 1601 as the key you get the desired output 011.
Second code example
The second example uses an array such as:
array('011' => 1601, '012' => 1602)

And searches for 1601 with array_search() to get the key 011, which is the desired output.
See these two examples for what the second and third parameters do:
print_r(array_column($array, 1, 0));
print_r(array_column($array, 0, 1));

A: I wrote a nested function that does it:
$read=[
    ['Honar','607836545742426','IRO7P0001'],
    ['Danial','2304906587905','IRO7KHEP01'],
    ['Key'=>['sub_key'=>'sub_value']]
];

function is_exists_value($array,$needle){

    if(!is_array($array) || is_null($needle))
        exit("Error: check input");

    if (array_key_exists($needle, $array)){
        return true;
    }elseif(in_array($needle,$array)){
        return true;
    }else{
        foreach ($array as $value)
            if(is_array($value))
                if(is_exists_value($value,$needle))
                    return true;
    }

    return false;
}

var_dump(is_exists_value($read,"sub_value")); // Return True
var_dump(is_exists_value($read,"Key")); // Return True


text:
Q: What is the best way to find where things are in a large Backbone codebase? I just started my first dev job, and I'm kind of overwhelmed. I don't really understand how I'm supposed to find where things are in the code. For example, if I load a certain page of the application, how can I find out where that particular view is in the code? How can I find where that view is getting its information from?
Basically I need a way to trace the information as it's moving through the application to find out what I need to edit. I know there's the call stack/sources tab in the Chrome dev tools but I don't really know how to make them show what's happening.
The application has a Java backend and a backbone/marionette frontend, if that helps. My previous experience was with React, which made much more sense to me. I'm really struggling to figure out how to find things. With React, I could use the Chrome dev tools, find the div's classname or whatever, then find the right component in the files. But this strategy doesn't appear to be working with Backbone.

A: In chrome dev tools, you can try to inspect an element > right click > break on > subtree modifications.
Do this on the element which is changing content while navigating views, you should be able to find the view component that is responsible for it.

A: In backbone we generally divide UI in two parts one is HTML template and other is view(js file).To find out which view is responsible for rendering a screen component copy id or css class name of a UI element from chrome developer tool. Now search for that id or cssClass in whole project. Probably 1 or more items will appear in search results. if it is a template then search for its view (which is rendering it).
In this way you can find which view is responsible for rendering a UI component


text:
Q: can't multiply sequence by non-int of type 'QuerySet' in Django 2.2.4 I have this logic in my views.py that will multiply the quantity and unitprice in the same models. I am using aggregate, and i encountered this error, can't multiply sequence by non-int of type 'QuerySet'
def updatecart(request):
    itemID = request.GET.get("itemID")
    cart = CustomerPurchaseOrderDetail.objects.filter(id = itemID)
    per_item_amount = CustomerPurchaseOrderDetail.objects.filter(id = itemID).aggregate(total=Sum('unitprice' * cart.values_list('quantity')))
    print(per_item_amount)
    return render(request, 'customAdmin/add2cart.html', {"cart": cart})

this is my models.py
class CustomerPurchaseOrderDetail(models.Model):
    profile = models.ForeignKey(Customer,on_delete=models.SET_NULL, null=True, blank=True,verbose_name="Client Account")
    customer_Purchase_Order = models.ForeignKey(CustomerPurchaseOrder, on_delete=models.SET_NULL, null=True, blank=True, verbose_name="Customer Purchase Order")
    products = models.ForeignKey(Product,on_delete=models.SET_NULL, null=True, blank=True, verbose_name="Product")
    quantity = models.IntegerField(null=True, blank=True, default=1)
    unitprice = models.FloatField(max_length=500, null=True, blank=True)

    def __str__(self):
        suser = '{0.id}'
        return suser.format(self)

How do i configure this out?
this is my traceback
Traceback:

File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\exception.py" in inner
  34.             response = get_response(request)

File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py" in _get_response
  115.                 response = self.process_exception_by_middleware(e, request)

File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\base.py" in _get_response
  113.                 response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "C:\Users\User\Desktop\LastProject\OnlinePalengke\customAdmin\views.py" in updatecart
  981.     per_item_amount = CustomerPurchaseOrderDetail.objects.filter(id = itemID).aggregate(total=Sum('unitprice' * cart.values_list('quantity')))

Exception Type: TypeError at /updatecart/
Exception Value: can't multiply sequence by non-int of type 'QuerySet'

A: You can do:
from django.db.models import F, FloatField

CustomerPurchaseOrderDetail.objects.filter(
    id = itemID
).aggregate(
    total=Sum(
        F('unitprice') * F('quantity'),
        output_field=FloatField(),
    )
)['total']


text:
Q: Programmatically Check/Uncheck checkboxes of SSRS Multi-value Parameter I have a report in SSRS 2005 that has a Multi-value parameter.  When you run the report, is it possible to programmatically check or uncheck the checkboxes depending on what checkbox you check?  In other words, is there a way to have event code run when you check or uncheck the checkboxes?
Mike

A: It is possible to set range of values of Parameter B depends of selected value of Parameter A. It is named a cascading parameters.

*

*Create Parameter A and set list of values for it - for example, the table Continents.

*Create Parameter B and set next stored procedure as list of avaliable values:
CREATE PROCEDURE [dbo].[countries](@continent int)
AS
SET NOCOUNT ON

SELECT * FROM countries WHERE id IN
   (SELECT country_id FROM continents WHERE continent_id = @continent)

*On the properties of Parameter B (Tab - Parameters) set the first Parameter A to link our parameters together.


text:
Q: Can separate but identical arrays EVER be equal by reference In java, if you have two arrays with identical contents, but they were separately constructed, array1 == array2 will be false because equals does a reference check and their references are different. But is it guaranteed they'll always have different references? For example
public class TestArrayReferences {
    private static final String[] SENTINEL_ARRAY_1 = new String[0];
    private static final String[] SENTINEL_ARRAY_2 = new String[0];

    public static boolean testArrays() {
        return SENTINEL_ARRAY_1 == SENTINEL_ARRAY_2;
    }
}

If I call testArrays, I'm returned false, but is it guaranteed to always be false? Namely, is the JVM permitted to detect that SENTINEL_ARRAY_1 and SENTINEL_ARRAY_2 will always be identical and therefore have them reference the same array?

A: Assuming they were both created by allocating new arrays and not by assignment, no they cannot be reference identical.
Arrays are not interned, as Strings are, so creating a new array creates a new item in memory. This is why you can create several new arrays of int, of the same length, and add items to one without adding them to the other as well.
EDIT: notice also that Strings are immutable, which is why they can be interned and not run into problems. If Strings were mutable, interning wouldn't work:
String s1 = "Hello";
String s2 = "Hello";
s1.setchar(0, 'J'); // fictional method to change one char of a String

If this method existed, and Strings were interned, then s2 would also be set to "Jello", unless some sort of dis-interning were done.

A: When you initialize an array with new keyword, a block of memory is allocated in the heap and your reference points to it. Until or unless other reference points to that same memory space in heap, the result of double equal operator will be false.
In your case two different memory blocks are allocated to two different references so , the result will be false and will always be false until the above criteria is met.

A: When you declare an array, your are 'assigning' a fixed number addresses in your memory, to be used by that array, its length is irrelevant.
String[] arr1; // Gets allocated, for example, in memory address 0x04383833
String[] arr2; // Gets allocated, for example, in memory address 0x012A3A03

0x04383833 will never be equal (==) to 0x012A3A03
so Yes, to your question, they will always return false if compared with double equal.
this is exactly the reason why we use the .equals method when comparing strings and not double equals, Strings ARE arrays of characters.


text:
Q: Windows 7 Requiring FQDN To Access Network Shares The Windows 2003 AD Domain I manage has several Windows XP clients and one Windows 7 RC1 client. Recently, the Windows 7 client has started refusing to access network shares unless the FQDN of the host is provided. Interestingly, DNS resolution using only the hostname works fine. Does anyone know what could be causing this or how to resolve it?
Works Fine
ping hostname

\\hostname.mydomain.internal\MyShare

Doesn't Work
\\hostname
Error: Error code 0x80070035 - The network path was not found.

\\hostname\MyShare
Error: Error code 0x80004005 - Unspecified error

UPDATE
This issue resolved itself about a day after I posted this question.  Perhaps it was a time synchronization issue as Moose suggested.  Thank you all for your help.  If I am ever able to reproduce this problem, I will revisit this question and explore these solutions further.

A: Did you by chance stop and/or disable the Windows Firewall service in Windows 7 (as opposed to merely disabling the firewall itself)?
Windows 7 encounters all sort of weird network troubles if that service isn't running.
I saw a whole network going completely nuts because someone used a GPO to actually disable the service, instead of only configuring the firewall to be off.

A: Just had the problem show up on ONE newly loaded Windows 7 machine.  Everything comes up fine, works fine, then after an unknown period of time (a day or two), the machine gives the exact symptoms described above.  One interesting note - even during these symptoms, I can go to a command prompt and PING the servername just fine.
One more side note:  I was able to alleviate the problem by typing in... \servername.domainname.extension  - then everything works just fine.
Odd.

A: Yeah this is a weird issue, and it has been bugging me for weeks. I would love to know the fix for it. I have also noticed that I can browse by IP address.

A: I've seen this a long time ago, in the Win 2000 days, when the time difference between the client and the server was off by more than 5 minutes.  It gives you weird errors that makes you think it's a dns issue when it's really not.
Time Synchronization is highly important to Kerberos.
It may not be the problem but it's easy to check and easy to fix if they are off.

A: Do you still use wins and netbios?  Maybe the netbios over tcp is disabled?  When we finally shut wins off we had to go to fqdn, but then again we might be doing something wrong and don't know it.

A: BTW, why are you still on RC1?
The RTM Enterprise evaluation version is freely downloadable: http://technet.microsoft.com/evalcenter/cc442495.aspx.

A: I have not been able to reproduce this issue since. Perhaps Microsoft has patched it. If it ever comes back I will update this answer with my solution.


text:
Q: Selenium C# - How to verify dropdown list I need to verify drop down values using Selenium in C#. I have a set of values I want to test against with a IWebElements IList of this:
        IList<IWebElement> yearsDropdown = { "Select...", "Before 1996", "1996", "1997", "1998", "1999", "2000" }

I need to write a function that return all the values from a drop down (that has the same exact information) and then do an assert to confirm the match. Below is the code that i have written to print the values from drop down, but i need to assert those values with expected ones:
       IList<IWebElement> yearsDropdown = { "Select...", "Before 1996", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016" };
        string[] dropdownListArray = new string[23];
        IList<IWebElement> dropdownList = wd.FindElements(By.CssSelector("#Components_0__Entity_SourceInfo_Value_Entity_ModelYear"));
        foreach(IWebElement i in dropdownList)
        {
            dropdownListArray[] = i.Text;
        }

        for(int i = 0; i < dropdownList.Count; i++)
        {
            Assert.AreEqual(yearsDropdown[i], dropdownList[i].Text);
        }

The thing is, when I tried this, it brought back the entire dropdown from the IWebElement IList dropdownList.  I need to have that IWebElement list to be broken down.

A: { "Select...", "Before 1996", "1996", "1997", "1998", "1999", "2000" } is list of string, not IWebElement.
 See code below:
List<string> yearsDropdown = new List<string>(){ "Select...", "Before 1996", "1996", "1997", "1998", "1999", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016" };
IList<IWebElement> dropdownList = wd.FindElements(By.CssSelector("#Components_0__Entity_SourceInfo_Value_Entity_ModelYear"));
foreach(IWebElement i in dropdownList)
{
    Assert.AreEqual(i.Text, yearsDropdown.Text);
}


text:
Q: Query on Ali baba Cloud Billing API BOA I was trying to get some data by using one of the api call QueryInstanceBill
The resulted JSON seems to be long and there is no date column to filter on how i got those many records.
Could someone here help me out

A: To be able to filter by date, The billing date only used when Granularity is DAILY,format: YYYY-MM-DD. Example 2020-07-29
You can also use the "BillingCycle" field in the request:
The billing cycle. Format: YYYY-MM. Example: 2020-07
Documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm

A: QueryInstanceBill API returns data for billing cycle which is usually for a month (YYYY-MM)
If you want data for a particular date then in request parameter provide the value for field "BillingDate" in format: YYYY-MM-DD
and the value for field "Granularity" should be "DAILY"
Check out the documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm
Also, you can use OpenAPI Explorer, I have provided BillingCycle as "2019-10", BillingDate as "2019-10-15" and Granularity as "DAILY":
https://api.aliyun.com/#/?product=BssOpenApi&version=2017-12-14&api=QueryInstanceBill&params={%22RegionId%22:%22cn-hangzhou%22,%22Granularity%22:%22DAILY%22,%22BillingCycle%22:%222019-10%22,%22BillingDate%22:%222019-10-15%22}&tab=DEMO&lang=JAVA


text:
Q: jQuery to clone and append but retain functionality of copied script My dilemma is that I cannot figure out how to duplicate the table while retaining my arithmetic within the cloned copy of the table. I would absolutely appreciate any insight on which would be the most efficient way?

$(document).ready(function() {
  $("#add2").click(function() {
    $("#clone").clone().appendTo("body");
  });
});

$(document).ready(function() {
  var basePrice = 6.25;
  $(".calculate").change(function() {
    newPrice = basePrice;
    $(".calculate option:selected").each(function() {
      newPrice += Number($(this).data('price'));
    });
    $("#item-price").html(newPrice.toFixed(2));
  });
});

  <fieldset id="fspace2">
    <legend>Project Details</legend>

          Title:
          <input type="text" name="title" id="title">

          Price:
          <span id="item-price"

        Options & Packages

          <select class="form-control calculate" id="try" name="try">
          <option data-price="0" value="select">Select an Option</option>
          <option data-price="208" value="logo1">cookies</option>
          <option data-price="650" value="bro">pizza</option>
          <option data-price="400" value="web1">brownies</option>
          <option data-price="N/A" value="oth">Other</option>
          </select>

          <select class="form-control calculate" id="packaging" name="packaging">
            <option data-price="0" value="standard">Choose a Package</option>
            <option data-price="322.20" value="shrink">Pink</option>
            <option data-price="659.70" value="shrink">Blue</option>
          </select>

  </fieldset>

  <button id="add2">Clone Stuff</button>

A: Use .clone(true), true indicates that event handlers should be copied along with the elements.
$("#clone").clone(true).appendTo("body")

This will create duplicate Identifiers, hence will render HTML invalid and the desired functionality will not work.
In the snippet below I have used class selector to bind event handler and DOM relationship for desired result.

$(document).ready(function() {
  $(".add2").click(function() {
    $(".clone").clone(true).appendTo("body");
  });

  var basePrice = 6.25;
  $(".calculate").change(function() {
    var $this = $(this);
    newPrice = basePrice;
    $("option:selected", $this).each(function() {
      newPrice += Number($(this).data('price'));
    });
    $this.closest('table').prev('table').find(".item-price").html(newPrice.toFixed(2));
  });
});

  <fieldset class="fspace2">
    <legend>Project Details</legend>

          Title:
          <input type="text" name="title" id="title">

          Price:

        Options & Packages

          <select class="form-control calculate" id="try" name="try">
          <option data-price="0" value="select">Select an Option</option>
          <option data-price="208" value="logo1">cookies</option>
          <option data-price="650" value="bro">pizza</option>
          <option data-price="400" value="web1">brownies</option>
          <option data-price="N/A" value="oth">Other</option>
          </select>

          <select class="form-control calculate" id="packaging" name="packaging">
            <option data-price="0" value="standard">Choose a Package</option>
            <option data-price="322.20" value="shrink">Pink</option>
            <option data-price="659.70" value="shrink">Blue</option>
          </select>

  </fieldset>

  <button class="add2">Clone Stuff</button>


text:
Q: Functional programming for Array.map() I've been reading recently about Functional Programming and Immutable Objects in Javascript. What is the functional programming way of using map method?
Say I want to double values in an array. I can do:
var arr1 = [{a: 1}, {a: 2}, {a: 3}];
arr1.map(function(el){
    el.a = el.a*2;
    return el;
});

// arr1 => [{a: 2}, {a: 4}, {a: 6}]

But this seems to break the rules of functional porgramming and immutability the callback will modify directly elements of the array. Is the following the 'correct' way to do this?
var arr1 = [{a: 1}, {a: 2}, {a: 3}];
var arr2 = angular.copy(arr1);

var arr2 = angular.copy(arr1).map(function(el){
  el.a = el.a*2;
  return el;
});

arr1 = arr2;

// arr1 => [{a: 2}, {a: 4}, {a: 6}]

Or am I simply overthinking this? Fiddle is here.

A: You will need to use a pure function that does not mutate its arguments. So if you want objects with the doubled values, you have to create new objects:

 var arr1 = [{a: 1}, {a: 2}, {a: 3}];
 console.log(arr1);
 var arr2 = arr1.map(function(el) {
    return {a: el.a*2};
 });
 console.log(arr2);

A: You may use a pure function, which does not mutate the input object, by simple return something and not assigning something to an element of data.

var arr1 = [{a: 1}, {a: 2}, {a: 3}],
    arr2 = arr1.map(function (el) {
        return  el.a * 2;
    });

console.log(arr2);
console.log(arr1);

Return an array with new objects

var arr1 = [{a: 1}, {a: 2}, {a: 3}],
    arr2 = arr1.map(function (el) {
        return  { a: el.a * 2 };
    });

console.log(arr2);
console.log(arr1);

A: Destructuring assignment would make this pretty nice. Either way tho, you have to make a new object otherwise objects in arr1 will be modified.

let arr1 = [{a: 1}, {a: 2}, {a: 3}];
let arr2 = arr1.map(({a}) => ({a: a * 2}))

console.log(arr1); // [{a: 1}, {a: 2}, {a: 3}]
console.log(arr2); // [{a: 2}, {a: 4}, {a: 6}]


text:
Q: Error: Could not find or load main class org.apache.spark.launcher.Main It would be really appreciated if anyone can help sort it out the following path issue for me? I highly doubt this is related to missing path setting but don't know how can I fix it.
rxie@ubuntu:~/Downloads/spark$ echo $PATH
/usr/bin/java:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rxie/Downloads/s                                                                                park:/home/rxie/Downloads/spark/bin:/usr/bin/java
rxie@ubuntu:~/Downloads/spark$ pyspark

Error: Could not find or load main class
  org.apache.spark.launcher.Main

rxie@ubuntu:~/Downloads/spark$ spark-shell

Error: Could not find or load main class
  org.apache.spark.launcher.Main

rxie@ubuntu:~/Downloads/spark$ pwd
/home/rxie/Downloads/spark
rxie@ubuntu:~/Downloads/spark$ ls
bin  conf  data  examples  jars  kubernetes  licenses  R  yarn

Updated with the PATH:
rxie@ubuntu:~$ echo $PATH
/home/rxie/Downloads/spark:/usr/bin/java:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin

A: Try setting SPARK_HOME environment variable to ~/Downloads/spark


text:
Q: References for interpretation of residual errors on log log regressions In a paper I'm writing, I'm interpreting the residuals on my log log regression as approximating relative error. I have a (fairly simple) proof that this is valid (for small residuals). I was just wondering if this interpretation is common knowledge? It seems to be a very useful interpretation, and fairly obvious, but I have not been able to find many (any?) references that discuss it.
My questions are first, is this valid? Second, what would be a good reference for it?


text:
Q: Splitting sentences but still keeping the delimeters? AXIS 2/4 amount transferred from AXIS current account to TERM LOAN account current account
for the above example I need an output like this:

python (some method for splitting sentence using TO keyword)

Output : [AXIS 2/4 amount transferred from AXIS current account] [to TERM LOAN account current account]

A: You can split the string with the split() function and then append the "to" string to the last element.
Here is a snippet:
my_string = "AXIS 2/4 amount transferred from AXIS current account to TERM LOAN account current account"
my_result = my_string.split("to")
my_result[-1] = "to "+my_result[-1]

A: You don't need to split, just find the index of to and take the slices.
text ="AXIS 2/4 amount transferred from AXIS current account to TERM LOAN account current account"

[text[:text.find('to')], text[text.find('to'):]]

#output
['AXIS 2/4 amount transferred from AXIS current account ', 'to TERM LOAN account current account']


text:
Q: Java regex checking for special characters always returns true No matter what I pass through this function, everything is true.
asd -> should be false
asd123 -> should be false
asd 123 -> should be false
asd_123 -> should be false
asd-123 -> should be false
asd asd -> should be false

Any other special char should return true.
public static boolean checkSpecialChars(String word) {
    Pattern pattern = Pattern.compile("[a-zA-Z0-9 -_]+", Pattern.MULTILINE);
    Matcher matcher;
    matcher = pattern.matcher(word);
    boolean checker = matcher.find();

    if (checker) { return true; }
    return false;
}

What am I missing on this?

A: You've got a few problems here:

*

*- in a character class creates a range of characters, so  -_ unintentionally includes every ASCII character between space and _, which includes most "special characters" on the keyboard (not all, though).  You need to escape it with a backslash (\\ because the backslash itself needs to be escaped in Java as well).

*Matcher.find() checks if any substring matches, not the entire string. You want Matcher.matches()

*Your conditional is reversed.  If you want it to return true if there are special chars, it should reverse your check.

It's not quite true that any string matches with the current code—{} doesn't, for instance—but it's certainly broader than intended.
Fixed code:
  public static boolean checkSpecialChars(String word) {
    Pattern pattern = Pattern.compile("[a-zA-Z0-9 \\-_]+", Pattern.MULTILINE);
    Matcher matcher;
    matcher = pattern.matcher(word);
    boolean checker = matcher.matches();

    return !checker;
  }


text:
Q: Reactjs Pagination loading all elements on page load I have done pagination in Reactjs project. But now it is loading all elements on page load. When i click on second page then it gives the expected result but i need it to paginate also on the page load.
Below is the Home.js code
import React, { useState, useEffect, useParams } from "react";
import axios from "axios";
import { Link } from "react-router-dom";
import ReactPaginate from "react-paginate";

const Home = () => {
  const [users, setUser] = useState([]);
  const [pageCount, setpageCount] = useState(0);
  const [isLoaded, setisLoaded] = useState(false);
  let limit = `4`;
  // loadUsers();

  useEffect(() => {
    const loadUsers = async () => {
      const result = await axios.get(
        "https://jsonplaceholder.typicode.com/posts?_page=1&_limit=${limit}"
      );
      const data = await result.data;
      setpageCount(Math.ceil(result.data.length / limit));
      setisLoaded(true);
      setUser(data);
    };
    loadUsers();
  }, [limit]);

  const fetchData = async (currentPage) => {
    const res = await fetch(
      `https://jsonplaceholder.typicode.com/posts?_page=${currentPage}&_limit=${limit}`
    );
    const data = await res.json();
    return data;
  };

  const deleteUser = async (id) => {
    await axios.delete(`http://localhost:3003/users/${id}`);
    this.loadUsers();
  };
  const handlePageClick = async (data) => {
    let currentPage = data.selected + 1;
    const dataform = await fetchData(currentPage);
    setUser(dataform);
  };

  return (

Home Page

              #
              Name
              User Name
              Email
              Action

            {users.map((user, index) => (

                {index + 1}
                {user.id}
                {user.title}
                {user.body}

                  <Link
                    className="btn btn-primary mr-2"
                    to={`/users/${user.id}`}
                  >
                    View
                  </Link>
                  <Link
                    className="btn btn-outline-primary mr-2"
                    to={`/users/edit/${user.id}`}
                  >
                    Edit
                  </Link>
                  <Link
                    to={""}
                    className="btn btn-danger"
                    onClick={() => deleteUser(user.id)}
                  >
                    Delete
                  </Link>

            ))}

        {isLoaded ? (
          <ReactPaginate
            previousLabel={"<<"}
            nextLabel={"next"}
            breakLabel={"..."}
            pageCount={pageCount}
            marginPagesDisplayed={3}
            pageRangeDisplayed={3}
            onPageChange={handlePageClick}
            disableInitialCallback={true}
            containerClassName={"pagination justify-content-center"}
            pageClassName={"page-item"}
            pageLinkClassName={"page-link"}
            previousClassName={"page-item"}
            previousLinkClassName={"page-link"}
            nextClassName={"page-item"}
            nextLinkClassName={"page-link"}
            breakClassName={"page-item"}
            breakLinkClassName={"page-link"}
            activeClassName={"active"}
          />
        ) : (

        )}

  );
};

export default Home;

Codesandbox: https://codesandbox.io/s/cool-easley-poezfh?file=/src/Home.js:0-3587

A: Looks like you're not setting the limit in your axios fetch correctly in loadUsers. You likely meant to use a templated string like so:
      const result = await axios.get(
        `https://jsonplaceholder.typicode.com/posts?_page=1&_limit=${limit}`
      );

but instead did
      const result = await axios.get(
        "https://jsonplaceholder.typicode.com/posts?_page=1&_limit=${limit}"
      );

Using " instead of ` means that the limit variable doesn't get inlined, so it fetched all data.


text:
Q: Match the multiple values and replace the repeated values with one value I have one string like below.Match the Alphabets within the string.The result is x,x,x,y,y,y .The x,y repeat three time.My question is how replace repeated same value with one value.i need ah answer like x,y .

function myFunction() {
    var str = "-10x+10x-10x-10y+6y-8y";
    var result = str.match(/[a-z]/g);
    document.getElementById("demo").innerHTML = result;
}
<button onclick="myFunction()">Try it</button>

A: Use negative look ahead assertion

function myFunction() {
    var str = "-10x+10x-10x-10y+6y-8y";
    var result = str.match(/([a-z])(?!.*\1)/g);
    document.getElementById("demo").innerHTML = result;
}
<button onclick="myFunction()">Try it</button>

Regex explanation here

A: To get the unique variable names, you can add this line after your regex
var map = {};
result.forEach( function(val){ map[val] = true } );
result = Object.keys(map)

DEMO

    var str = "-10x+10x-10x-10y+6y-8y";
    var result = str.match(/[a-z]/g);
    var map = {};
    result.forEach( function(val){ map[val] = true } );
    result = Object.keys(map);
    document.body.innerHTML += JSON.stringify(result, 0, 4)


text:
Q: Javers Comparing List In Order I have two java classes like so:
public class FooA {
  private List<FooB> fooB;
}

public class FooB {
  private Integer id;
  private String name;
  private double num;
}

I want to compare the FooA and it tell me what fields inside the list object changed. But when I do this:
FooA old = new FooA(Arrays.asList(new FooB(1, "old", 1.0)));
FooA new = new FooA(Arrays.asList(new FooB(1, "new", 1.0)));

Javers javers = JaversBuilder.javers()
          .withListCompareAlgorithm(LEVENSHTEIN_DISTANCE)
          .build();

javers.compare(old, new);

It gives me this diff:
Diff:
* new object: com.FooA/#fooB/1d32d18fcb3ba2f7f7cb41af6cd96b32
* object removed: com.FooA/#fooB/223ef3c3249fe2898ac3354f9bf42620
* changes on com.FooA/ :
  - 'fooB' collection changes :
    . 'com.FooA/#fooB/223ef3c3249fe2898ac3354f9bf42620' removed
    . 'com.FooA/#fooB/1d32d18fcb3ba2f7f7cb41af6cd96b32' added

I even tried adding an Id on FooB like I've read in a lot of posts. So now my foob looks like this:
public class FooB {
  @Id
  private Integer id;
  private String name;
  private double num;
}

But now when I compare I get this:
Diff:
* changes on com.FooB/1 :
  - 'name' changed from 'old' to 'new'

It's registering as a value change rather than a collection change. I want the diff to read like so:
Diff:
* changes on com.FooA/#fooB/1 :
  - 'fooB' collection changes :
    . 'name' changed from 'old' to 'new'

What am I doing wrong?

A: Using Javers version 5.2.4:
public class FooA {
    private List<FooB> fooB;

    public FooA(List<FooB> fooB) {
        this.fooB = fooB;
    }
}

public class FooB {
    private Integer id;
    private String name;
    private double num;

    public FooB(Integer id, String name, double num) {
        this.id = id;
        this.name = name;
        this.num = num;
    }
}

void test() {
    FooA old = new FooA(Arrays.asList(new FooB(1, "old", 1.0)));
    FooA new1 = new FooA(Arrays.asList(new FooB(1, "new", 1.0)));

    Javers javers = JaversBuilder.javers()
            .withListCompareAlgorithm(LEVENSHTEIN_DISTANCE)
            .build();

    System.out.println(
            javers.compare(old, new1)
    );
}

method test returns:
Diff:
* changes on pl.javers.JaversTest$FooA/ :
  - 'fooB/0.name' changed from 'old' to 'new'

It is almost the same as you wanted.
FooA/fooB/0.name -> fooA has array fooB and first (index 0) name property has changed


text:
Q: My computer motherboard support DDR2 RAM so may I choose any DDR2 RAM? Installed RAM Information as follows:
Memory Device
    Array Handle: 0x002A
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 1024 MB
    Form Factor: DIMM
    Set: None
    Locator: CHANNEL_B
    Bank Locator: DIMM0
    Type: DDR2
    Type Detail: Synchronous
    Speed: 667 MT/s
    Manufacturer: Manufacturer1
    Serial Number: SerNum1
    Asset Tag: AssetTagNum1

So my question is may I have any DDR2 RAM or is there have different types of DDR2 RAMs?

A: For the most part you can use any DDR2, though some motherboards won't work well with specific makes/models/sizes of memory sticks. I have mixed and matched many different types of DDR2 in many boards, and rarely do I run into problems. Most motherboards are quite forgiving of different make/model of DDR2.
HOWEVER! I very strongly recommend that you go to your mother board manufacturer's website and get the Qualified Memory List or the equivalent. It will tell you exactly what make and model of DDR2 is known to work in your board. See if you can find some memory off of that list. If not, your next best option is to buy name brand memory - avoid the off brands. Get the more expensive name brand memory, I have found them to be much more reliable.
I also recommend using the same brand/model/size of memory sticks. Although I have mixed and matched different sizes of memory in many boards, from time to time I run into incompatibilities. To be safe, always use the same make/model/size sticks. With experience you will find you can mix and match, but there is no guarantee that will work.


text:
Q: dapr exit immediately after running I am developing an RESTful API with FastAPI (python framework) and I have another service that will invoke a method (writing to a db e.g) from this API. So I wanted to implement the dapr service to service invocation. the problem is if i dapr run --api-id ... my FastAPI application on dapr cli, it runs immediately and then exit successfully without holding. How can i solve this please ?
enter image description here

A: I set the dapr port to 8000 where fastapi is running and added sleep at the end of the function (while loop would be better) and service is getting invoked successfully.


text:
Q: Give User Customize Applications permission I am trying to give one of my users the ability to assign values in field dependencies. I believe that the permission they need to do this is "Customize Applications" however i can't seem to find this permission set within the "Systems Permissions" area which i believe is where it sits. Is anyone able to help with this ? (See screenshot below)

A: Salesforce Platform license does not allow that system permission. That's why you are not able to see that permission in the permission set. You'd need to either select Salesforce or leave the license type empty.
From the documentation:

These users are not entitled to some user permissions and standard
apps, including standard tabs and objects such as forecasts, leads,
campaigns, and opportunities. Users with this license can also use
Connect Offline.


text:
Q: expex "everylabel=\actualexno" causes error in later references I am having problems with numbers of examples. When I refer to the example (by its label) before it actually occurs, the number is correct. But referencing it after it has been defined gives a wrong number.
It happens only when I use the everylabel=\actualexno within the \definestyle command, and the example is divided into subexamples.
    \documentclass[10pt, a4paper]{article}
    \usepackage{expex}
    \definelingstyle{IJAL}{everylabel=\actualexno}  % HERE IS THE PROBLEM
    \lingset{lingstyle=IJAL}                        % (and here)

    \begin{document}
    \gathertags
    Referencing ahead of the definition gives
      correct number of the whole example (\getref{a}),
      as well as its part (\getref{a.A}),
      although the full reference gives us too much (\getfullref{a.A}).

    \pex<a>
      \a<A> some example
    \xe

    The reference to the whole example is still correct afterwards (\getref{a}),
      but the reference to its part has a one too large prefix (\getref{a.A})
      and the full reference is just a concatenation of both, as usual (\getfullref{a.A}).

    \end{document}