text:
Q: Program in assembly x86 I recently made a program with C++ and ASM. Can anyone help me make this code a more efficient one , in the ASM part or both.
I would really appreciate it because i dont know every asm instriction and probably i am using way too many. BTW the program sums two integer vectors with any size.
The code that i have is the one above:
C++:

extern "C" {
    int add_vtr_asm(int*, int*, int*, int);
}

void add_vtr() {

    __declspec(align(16))
        int vetor1[1024];
    __declspec(align(16))
        int vetor2[1024];
    __declspec(align(16))
        int soma[1024];
    for (i = 0; i <= 1023; i++) {
        vetor1[i] = i;
        vetor2[i] = i;
    }
    add_vtr_asm(vetor1, vetor2, soma, 1024);
    for (i = 0; i <= 1023; i++) {
        printf("% d + % d = % d \n",vetor1[i] ,vetor2[i], soma[i]);

    }
    exit(0);
}

int main()
{

    printf("Programa para somar vetores de inteiros: \n");
    printf("Soma de vetores com % d elementos \n", 1024);
    add_vtr();
}

ASM:

.MODEL FLAT, C

.CODE
add_vtr_asm PROC
    push ebp
    mov ebp,esp
    push esi
    push edi
    mov esi,[ebp+8]
    mov ebx, [ebp+12]
    mov edi, [ebp+16]
    mov ecx,[ebp+20]
    shr ecx,2
    next:movdqa XMM0,[esi]
    add esi,16
    paddd xmm0,[ebx]
    add ebx,16
    movdqa [edi],xmm0
    add edi,16
    dec ecx
    jnz next
    pop edi
    pop esi
    pop ebp
    ret
    add_vtr_asm ENDP
    END

A: I just coded it up in simple c++ and get this: https://godbolt.org/z/P1zPWv65b
struct Vec {
    alignas(16) int data[1024];
};

Vec add(const Vec &v1, const Vec &v2) {
    Vec v;
    for (int i = 0; i < 1024; ++i) {
        v.data[i] = v1.data[i] + v2.data[i];
    }
    return v;
}

Compiling with: g++ -std=c++20 -O2 -W -Wall
add(Vec const&, Vec const&):
        xor     eax, eax
.L2:
        movdqa  xmm0, XMMWORD PTR [rsi+rax]
        paddd   xmm0, XMMWORD PTR [rdx+rax]
        add     rax, 16
        movaps  XMMWORD PTR [rax-16+rdi], xmm0
        cmp     rax, 4096
        jne     .L2
        mov     rax, rdi
        ret

I don't see how I can improve that. That's not even vectorized, the plain optimization already picks SIMD just fine.
Note: without alignas(16) or std::array<int, 1024> the compiler uses movdqu which I assume might be slower. But I didn't test that. It's likely the whole code is limited by the memory bandwidth.
Adding -funroll-loops makes the loop do 128 bytes at a time using xmm0-xmm7 but you have to measure yourself if that is better.
The c/c++ code is much more readable and will work on any cpu. A simple vector addition is so simple for the compiler to optimize that writing it in asm can only make it worse.


text:
Q: MongoDB 3.2 C# driver version 2.2.3.3 Gridfs Download large files more than 2gb I am uploading files using the following code:
using (var s = File.OpenRead(@"C:\2gbDataTest.zip"))

{

 var t = Task.Run<ObjectId>(() =>

{

return fs.UploadFromStreamAsync("2gbDataTest.zip", s);

});

 return t.Result;

}

//works for the files below 2gb

  var t1 = fs.DownloadAsBytesAsync(id);

            Task.WaitAll(t1);
            var bytes = t1.Result;

I am getting error

I am new to MongoDb and C#, can any one please show me how to download files greater than 2GB in size?

A: You are hitting the limit in terms of the size a byte array (kept in memory) download can be, so your only choice is to use a Stream instead like you are doing when you upload, something like (with a valid destination):
IGridFSBucket fs;
ObjectId id;
FileStream destination;

await fs.DownloadToStreamAsync(id, destination);

A: //Just writing complete code for others, This will work ;
//Thanks to "Adam Comerford"
var fs = new GridFSBucket(database);
using (var newFs = new FileStream(filePathToDownload, FileMode.Create))
{
//id is file objectId
var t1 = fs.DownloadToStreamAsync(id, newFs);
Task.WaitAll(t1);
newFs.Flush();
newFs.Close();
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: Multiple Inputs To Azure Function TLDR:
Is it possible to have multiple inputs to an Azure Function?
Longer Explanation:
I'm new to Azure Functions and still don't have a good understanding of it.
I have an application which downloads HTML data through a proxy web request and I was considering moving it to Azure Functions.
However, the function would require two inputs: a string URL and a proxy object (which contains IP address, username and password properties).
I was thinking of having two queues, one for URLs and one for proxies.
URLs would be added to the queue by a client application, which would trigger the function.
The proxy queue would have a limited pool of proxy objects which would be added back into the queue by the consuming function after they had been used for the web request.
So, if there are no proxies in the proxy queue, the function will not be able to create a web request until one is added back into the queue.
This is all assuming that Azure Functions are parallel and every trigger from the URL queue runs a function on another thread.
So, is what I'm considering possible? If not, is there an alternative way that I could go about it?

A: There can be only one trigger for a given function, i.e. the function will run when there is a new message in one specified queue.
There is an input bindings feature, which can load additional data based on the properties from triggering request. E.g. if incoming queue message contains URL and some proxy ID, and proxy settings are stored as Table Storage entities (or blobs), you could define an input binding to automatically load proxy settings based on ID from the message. See this example.
Of course, you could achieve the same without input binding, just by loading the proxy settings manually in function body based on your custom logic.
There is no way to setup a Function not to be triggered until you have messages in two queues at the same time.


text:
Q: SSRS report parameter I have a problem with rendering report with correct parameter.
We have RDL report that has date parameter with default value which is an expression "=today()".
In project i have the following code in c#
for(int i = 0; i < 15; i++)
{
    serverReport.SetParameters(new ReportParameter("dt1",date.ToString()));
    File.WriteAllBytes(path, serverReport.Render("PDF"));
}

For first iteration sql stored procedure is called with the default parameter and following iterations are called with passed date(i checked it with sql profiler).
I want to mension that in loop i have many other reports with exact same default date parameter but the problem is with this one. I have compared all parameter properties in 2 repors(one that works and the other that is not working properly), but they are identical. I cant find any difference.
If i delete default value "=today()" then report is working fine.
Maybe sameone had similar problem and recommend me something about this. Thanks in advance.

A: A few things to check:
SetParameters takes IEnumerable<ReportParameter> not a single ReportParameter object. Call it like this instead:
serverReport.SetParameters(new ReportParameter[] { ReportParameter("dt1", date.ToString()) } );

Make sure that the parameter does not have the available values filled in as well as the default value. If the date passed is not one of the valid values (if applied) it won't work. For example, if the available values are set to =Today then the only report that will run properly is the first one that coincidentally uses that value.
Are you sure that date.ToString() is passing an appropriate and valid date?
Does the server's report parameter match the development environment? Parameter settings aren't automatically updated so that any modifications made on the server aren't overwritten by deploying the report again. Check the server's report parameters and update if necessary, or simply delete and redeploy the report.

A: Try to completely remove the not working report within the server (and to test,also one of the working) and re-deploy both to the server. you could also check in reporting manager for the parameter settings, because there the difference might be visible.
I had that kind of issues before with report parameters and know that the parameter settings are not overwritten correctly all the time you deploy the report.


text:
Q: Java : How to Avoid flickering on shape-made only animation (no image file)? Hi I am reading the book "Programming Video Games for the Evil Genius" by Ian Cinnamon. In one of the projects he explains how to create some animation for a racing game. I wrote a simple code below (removing "almost" everything unnecessary). But the result is the same: the flickering.
My question is how, by using that same code (with little modifications obviously) can I make it stop flickering? My point is not to find another way around (modifying the whole code) because I am already able to create an entire game using JLabel, ImageIcon classes & spritesheets image files. My point is to solve the flickering problem without removing those shapes [Rectangle (fillRect & if possible drawImage)].
By the way if this is not possible "Why would you do that!?" or "It's impossible" are also good answers. (let's try not to use them!)
Thank You!
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.net.*;

public class Race extends JFrame {
    public static void main(String[] args){
        new Race();
    }
        private Rectangle r1 = new Rectangle(0,0,800,100);
        private Rectangle r2 = new Rectangle(0,100,100,400);
        Image img = null;

    public Race(){
        super("Some Title");
        setVisible(true);
        setSize(800,600);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        try{
             URL url= this.getClass().getResource("someImage.png");
            img =Toolkit.getDefaultToolkit().getImage(url);
        }catch(Exception e){}
        Race.GameLoop gameHeart = new Race.GameLoop();
        gameHeart.run();
    }

    public void paint(Graphics g){
        super.paint(g);
        g.setColor(Color.GREEN);
        g.fillRect(r1.x, r1.y, r1.width, r1.height);
        g.setColor(Color.RED);
        g.fillRect(r2.x, r2.y, r2.width, r2.height);
        g.drawImage(img, r2.x, r2.y, r2.width, r2.height, this);
        try {
            Thread.sleep(75);
        } catch (InterruptedException ex) {}
        repaint();
    }

    public class GameLoop extends Thread {
        public void run(){
            while(true){
                //game animations and logic
                //even if I put repaint() here it still flicker
            }
        }
    }
}

A: Don't paint onto a top level container (like JFrame), they do not support double buffering.
Instead, use something like a JPanel
Convention prefers overriding paintComponent rather then paint.  This is done mostly because paint is a actually a very complex method
NEVER do this in any paint method:
try {
    Thread.sleep(75);
} catch (InterruptedException ex) {}
repaint();

Firstly, any delays should be handled by the game thread, calling Thread#sleep within the paint method will put the Event Dispatching Thread to sleep, which will prevent it from posting events (about mouse and keyboard interactions) and will make your program look non-responsive, which will cause you issues later on.
Never call repaint (or any method that might call repaint) from inside a paint method.  This is simply asking the repaint manager to schedule another paint cycle, which will chew up your CPU until you program becomes unresponsive.  Again, this is function of your game thread.
Remember, Swing is NOT thread save.  All interactions with the UI MUST be made from within the context of the Event Dispatching Thread.  Have a read through Concurrency in Swing for some more information
You can take a look at How to make line animation smoother? and Java Bouncing Ball for an examples
You might like to have a read through Performing Custom Painting and Painting in AWT and Swing

A: Here is a quick answer (if you're too lazy or don't have time to read the documentations given in the answer from MadProgrammer and trashgod which by the way help me writing this one). But I highly advice you to read the documentation as soon as you have some spare time.
Here is the code from the question re-written so that there isn't flickering. I separated the code into two classes: the JFrame containing the game in the GameFrame class and the Racing game itself (part of it as in the question) in the Race class which extends JPanel.
GameFrame.java
import javax.swing.*;

public class GameFrame extends JFrame {

    public static void main(String args[]){
        new GameFrame();
    }

    public GameFrame(){
        super("Graphics with JFrame");
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        this.setSize(800,600);
        Race game = new Race();
        this.getContentPane().add(game);
        this.setVisible(true);
        game.run();
    }

}

Race.java
import java.awt.*;
import javax.swing.*;
import java.io.*;
import java.net.*;

public class Race extends JPanel implements Runnable {

    private Rectangle r1 = new Rectangle(0,0,800,100);
    private Rectangle r2 = new Rectangle(0,100,100,400);
    Image img = null;

    public Race(){
        try{
             URL url= this.getClass().getResource("someImage.png");
            img =Toolkit.getDefaultToolkit().getImage(url);
        }catch(Exception e){}
    }

    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        g.setColor(Color.GREEN);
        g.fillRect(r1.x, r1.y, r1.width, r1.height);
        g.setColor(Color.RED);
        g.fillRect(r2.x, r2.y, r2.width, r2.height);
        g.drawImage(img, r2.x, r2.y, r2.width, r2.height, this);
}

    public void run() {
        while(true){
            try {
                Thread.sleep(75);
            } catch (InterruptedException ex) {}
            repaint();

            //game animations and logic
        }
    }
}

Thanks again to MadProgrammer and trashgod. I am sorry I answered to my question instead of commenting others' but I had to show explicitly the difference between Before and After. Again, if you don't understand why I did those modifications to avoid the flickering. Read MadProgrammer and trashgod comments and answers.


text:
Q: libcurl unsupported protocol only when using digest authentication My issue is the following, I'm making RTSP requests using no authentication, basic authentication and digest authentication depending on the camera I'm trying to access. It's been working fine for a while now, but since recently when using digest authentication, I started getting the following error:
*   Trying 127.0.0.1:8554...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8554 (#0)
* Server auth using Digest with user 'ubnt'
> DESCRIBE rtsp://ubnt:administrator@127.0.0.1:8554/live.sdp RTSP/1.0
CSeq: 1
Accept: application/sdp

< RTSP/1.0 401 Unauthorized
< CSeq: 1
< WWW-Authenticate: Digest realm="GStreamer RTSP Server", nonce="3034e78651e4e61e"
< Server: GStreamer RTSP server
< Date: Sun, 12 Jan 2020 09:36:53 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Issue another request to this URL: 'rtsp://ubnt:administrator@127.0.0.1:8554/live.sdp'
* Protocol "rtsp" not supported or disabled in libcurl
* Closing connection -1

While when switching to basic auth on the exact same camera, I'm not getting any Protocol "rtsp" not supported or disabled in libcurl error, and DESCRIBE/SETUP requests are working as expected.
I thought the issue was coming from my code (I'm making curl requests from a go program, that uses libcurl bindings), but it turns out that even reverting to the first commit that uses digest authentication doesn't fix the issue.
I initially suspected a bug in newer libcurl versions, but I haven't been unable to confirm it at the moment.
Does anybody have any idea what could be the reason for my issue? Should I send an email to the libcurl mailing list about this?
Resources for more info:

*

*The repo in which I encounter this issue

*The golang libcurl bindings I use

*PR introducing digest auth support, which worked fine at the time

*The place where authentication options are set / where the perform fails

*This issue can be reproduced on a virtual RTSP server spawned with RTSPATT using the following command docker run --rm -e RTSP_AUTHENTICATION_METHOD="digest" -p 8554:8554 ullaakut/rtspatt
Also, just to be clear, I didn't disable the rtsp protocol from libcurl, and it is enabled when running curl --version (but also, it works fine with basic auth, as stated before):
curl 7.64.1 (x86_64-apple-darwin19.0) libcurl/7.64.1 (SecureTransport) LibreSSL/2.8.3 zlib/1.2.11 nghttp2/1.39.2
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL UnixSockets

Final additional note, I was able to reproduce this issue on Linux and MacOS, and many of the users of my project also encountered the same issue on various distributions of Linux.

A: This is most likely broken RTSP auth support in current libcurl. There's a current PR to fix this, but it has stalled ("It's more complicated than I thought").
There's a lack of people with an interest in RTSP in the curl project. We'll welcome your help to fix this.


text:
Q: How to update git metadata in a Python Packages using Setuptools and PBR Working with versions generated from git repo tags by pbr
I'm having issues getting the version info from my package, which is setup as a normal Python package using setuptools with the pbr extension. pbr will pull the version info from the tags in a git repo so there is a single source of truth.
I did get the basics working - see this Q&A for more info.
It is working overall, if I make a full distribution of the package.  For example: py setup.py sdist will create a full distribution and the version tag and other meta data from git is updated.
But I don't need full distributions of this package, my team is just working on it locally out of a git repo. I'm also using pyinstaller to create an executable of the main script for user distribution (without needing Python). So I want a simple, quick command that will just update the metadata, based on the latest updated to the git repo, without spending extra time for SetupTools to build and create the full distribution package, which will not be used anyway.
pbr will pull version (from tags), authors, and changelog info from the repo, so it's a big timesaver, allowing us to keep most of the metadata directly in git.
Questions
Is there anything we can do to get the package metadata to update with pbr, without making a full distribution?
Particularly on the version:

*

*When or with which commands will setup.py using the pbr extension actually go update the version from the git repo so that any command querying the version will get the updated version?

*Where is the version actually stored in this setup? (I can't find it...)

More info and some code
I've got a very short setup.py, for use with pbr extension:
#!/usr/bin/env python

from setuptools import setup
setup(
    setup_requires=['pbr', 'setuptools'],
    pbr=True,
)

Now, if I update the latest commit in the git repo with a tag, the command py setup.py --version will return the new updated version based on that tag, but any other direct method I can find will still return the old version string. So that command does not appear to store the new version string anywhere.
Here's a few methods I've tried from my package __init__.py:
import pkg_resources  # part of setuptools

v1 = pkg_resources.require("md2mat")[0].version
print('v1 {}'.format(v1))
v2 = pkg_resources.get_distribution('md2mat').version
print('v2 {}'.format(v2))

from pbr.version import VersionInfo

v3 = VersionInfo('md2mat').release_string()
print('v3 {}'.format(v3))

# Update per sinoroc's comment:
# As of Python 3.8, you can use this from the stdlib,
# which removes run-time dependencies on `pbr` or `setuptools`
import importlib.metadata

__version__ = importlib.metadata.version('Example')

All of the above return the old version string (last time a full distribution was made).
So, is there anything I can do short of py setup.py sdist or a similar full distribution build command (bdist, bdist_egg, etc.) to simply update my package info in place so the above methods will give me the latest version string and other git metadata when the main package script is run?
That would allow us to update the package locally as developers after checking out a new commit, and to then run pyinstaller to create our exe and release our end user version of the script.

A: It appears that the info for version is stored in the package.egg-info/PKG-INFO file.  Therefore, any setuptools command that updates the egg-info will pull in the git info.
In the PKG-INFO file, the Version is showing up for me currently in the 3rd line:
Version: 2.0.4.0b2

Updating the Version string directly in the PKG-INFO file does cause the scripts to display the updated string when accessing through pkg_resources or pbr.version.
The quickest command to have PBR automatically update the metadata in the .egg-info folder appears to be:
py setup.py egg_info

longer / more complex commands that will also update the info include build, sdist, bdist, etc. See py setup.py --help-commands for more available setup.py commands.

Authors and Changelog
While the above is true for versioning, the AUTHORS and ChangeLog files DO NOT get updated by pbr for the egg_info or build commands.
However, these files are generated during the sdist and bdist commands (including all versions of bdist, I think). So it still looks like to update all the metadata from Git one of the full distribution build commands is required.
Commands that will not generate the AUTHORS and ChangeLog files:
py setup.py egg_info
py setup.py build
py setup.py develop

(Note: I use the fairly recent py command to run python, which allows you to setup your default environment for running python, but you may need to use python or python3 instead)


text:
Q: CLANG/LLVM Escape analysis for C variables I would like to do escape analysis using clang.
What my code does is parsing a C code and extracting all variables statements and so on.
Is there a simple way to find out if my local variables escape? Or do I have to do all by hand?


text:
Q: One-liner to find all mail servers in AD domain with Powershell I would like to use powershell to find all available mail servers in a given network segment, or domain wide.  Is this possible and how could you do it?

A: Do you mean something like this?

Get-ExchangeServer -domain [DOMAIN NAME]

A: get-mailboxserver from the Exchange powershell is supposed to be able to do this.
Name                      ManagedFolderAssi ClusteredStorageT MapiEncryptionReq
                          stantSchedule     ype               uired
----                      ----------------- ----------------- -----------------
EXCHMAILBOX3                                Disabled          False
EXCHMAILBOX4                                Disabled          False
EXCHMAILBOX1                                Disabled          False
EXCHMAILBOX2                                Disabled          False
Is there some part of your environment that makes this not work for you?

A: If they're exchange, you can probably use Powershell to query AD for that, sure. If they're not exchange, it depends on how you define "mailserver", and regardless, that will be much more difficult.

*

*Good answer below for Exchange, exactly what I figured there would be.


text:
Q: How to create a simple l-system in Processing I want to create a simple l-system in Processing. I want to change every letter 'A' to 'AB' and every letter 'B' to 'A', starting with 'A'.
The result should look something like this:
A →
AB →
ABA →
ABAAB →
ABAABABA → etc...

(P.S. I don't know much about processing)

A: I suggest having a look in Processing > Examples > Topics > Franctals and L-Systems and at Daniel Shiffman's brilliant Nature of Code book, especially Chapter 8: Fractals (8.6 L-Systems)

Also, be sure to check out Daniel Jones' L-System project: in includes explanations and Processing source code.

Bellow is the PenroseTile example from Processing ported to Javascript and running on the P5.js port.

var ds;
function setup() {
  createCanvas(640, 360);
  ds = new PenroseLSystem();
  ds.simulate(4);
}

function draw() {
  background(0);
  ds.render();
}

//*
function PenroseLSystem(){

  this.steps = 0;
  this.ruleW = "YF++ZF4-XF[-YF4-WF]++";
  this.ruleX = "+YF--ZF[3-WF--XF]+";
  this.ruleY = "-WF++XF[+++YF++ZF]-";
  this.ruleZ = "--YF++++WF[+ZF++++XF]--XF";

  this.axiom = "[X]++[X]++[X]++[X]++[X]";
  this.rule = "F+F-F";
  this.production = "";

  this.startLength = 460.0;
  this.theta = radians(36);

  this.generations = 0;

  this.reset = function() {
    this.production = this.axiom;
    this.drawLength = this.startLength;
    this.generations = 0;
  }

  this.reset();

  this.getAge = function() {
    return this.generations;
  }

  this.iterate = function(prod_,rule_) {
    var newProduction = "";
    for (var i = 0; i < prod_.length; i++) {
      var step = this.production.charAt(i);
      if (step == 'W') {
        newProduction = newProduction + this.ruleW;
      }
      else if (step == 'X') {
        newProduction = newProduction + this.ruleX;
      }
      else if (step == 'Y') {
        newProduction = newProduction + this.ruleY;
      }
      else if (step == 'Z') {
        newProduction = newProduction + this.ruleZ;
      }
      else {
        if (step != 'F') {
          newProduction = newProduction + step;
        }
      }
    }

    this.drawLength = this.drawLength * 0.5;
    this.generations++;
    return newProduction;
  }

  this.simulate = function(gen) {
    while (this.getAge() < gen) {
      this.production = this.iterate(this.production, this.rule);
    }
  }

  this.render = function() {
    translate(width/2, height/2);
    var pushes = 0;
    var repeats = 1;
    this.steps += 12;
    if (this.steps > this.production.length) {
      this.steps = this.production.length;
    }

    for (var i = 0; i < this.steps; i++) {
      var step = this.production.charAt(i);
      var stepCode = this.production.charCodeAt(i);
      if (step == 'F') {
        stroke(255, 60);
        for (var j = 0; j < repeats; j++) {
          line(0, 0, 0, -this.drawLength);
          noFill();
          translate(0, -this.drawLength);
        }
        repeats = 1;
      }
      else if (step == '+') {
          rotate(this.theta * repeats);
        repeats = 1;
      }
      else if (step == '-') {
          rotate(-this.theta * repeats);
        repeats = 1;
      }
      else if (step == '[') {
        pushes++;
        //pushMatrix();
        push();
      }
      else if (step == ']') {
        //popMatrix();
        pop();
        pushes--;
      }
      else if ( (stepCode >= 48) && (stepCode <= 57) ) {
        repeats = stepCode - 48;
      }
    }

    // Unpush if we need too
    while (pushes > 0) {
      // popMatrix();
      pop();
      pushes--;
    }
  }

}
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.4.4/p5.min.js"></script>

A: I have tried to create a piece of code with my teacher. It's very basic, but I wanted to share the result:
String txt = "A";

for (int i = 0; i < 5; i ++) {
  println(txt);
  String newTxt = "";
  for (int j = 0; j < txt.length(); j++) {
    String letter = txt.substring(j, j+1);
    if (letter.equals("A")) {
      newTxt += "AB";
    } else {
      newTxt += "A";
    }
  }
  txt = newTxt;
}

Thanks again for the help!

A: Here my code using Openframework. I believe it produces the most light weight and beautiful many L-systems plants in a loop and not using any light or texture.
#include "ofMain.h"
#include "application.h"

int main( )
{
  ofSetupOpenGL(512, 512, OF_WINDOW);
  ofRunApp(new Application());
}
--------------------------
#include "renderer.h"

void Renderer::setup()
{
  ofSetFrameRate(3);
  ofSetWindowShape(kWindow_width, kWindow_height);
}

void Renderer::draw()
{
  ofFill();
  ofSetLineWidth(10);
  ofClear(0);
  ofScale(1.0f, -1.0f);
  ofTranslate(kWindow_width / 2, -kWindow_height + 75);
  ofLine(0,0,0, 300);
  angleDepart -= 1;
  splitLine(0, 300, 20, angleDepart); // faire varier le 20, en 10 et 20, c'est le plus intéressant
}

void Renderer::splitLine(int iX, int iY, int iThickness, float iAngle)
{
  if (iThickness - 1 > 0)
  {
    ofPushMatrix();
    ofTranslate(iX, iY);
    ofRotateZ(iAngle);
    ofSetLineWidth(iThickness - 1);
    ofLine(0, 0, iX * 0.75, iY * 0.75);
    splitLine(iX * 0.75, iY * 0.75, iThickness - 1, iAngle);
    ofPopMatrix();

    ofPushMatrix();
    ofLine(0, 0, iX * 0.75, iY * 0.75);
    ofSetColor(65, ofRandom(255), 0);
    splitLine(iX * 0.75, iY * 0.75, iThickness - 2, -iAngle);
    ofPopMatrix();
  }
}
----------------------------------
#pragma once
#include "ofMain.h"

class Renderer
{
public:
  void setup();
  void draw();

  int angleDepart = 0;
  const int kWindow_height = 1000;
  const int kWindow_width  = 1200;
  void splitLine(int iX, int iY, int iThickness, float angle);
};

L-System picture


text:
Q: Arreglar fechas introducidas con formato dd/MM/YYYY Con Java en lugar de grabar en la base de datos las fechas con el formato dd/MM/yyyy he usado el año en mayúsculas (dd/MM/YYYY). Me gustaría revertir lo grabado, y poder transformar las fechas introducidas erróneamente por las fechas correctas, pero no he encontrado ninguna forma ni patrón para lograrlo. ¿Alguien podría decirme la forma de hacerlo? Debajo tenéis una muestra de lo que hice.
String FORMATO_FECHA = "dd/MM/YYYY";
String fechaStr = "14/06/2014";
System.out.println("FECHA ORIGINAL: " + fechaStr);
Date fechaDate = null;
try {

    DateFormat format = new SimpleDateFormat(FORMATO_FECHA);
    fechaDate = format.parse(fechaStr);

    System.out.println("FECHA TRANSFORMADA: " + fechaDate);//Esta es la fecha que he grabado en base de datos

} catch (Exception e) {

}


text:
Q: Como inserir uma imagem/figura para uma forma do canvas O fragmento de código abaixo, desenha um retângulo no elemento canvas, e o preenche com a cor azul. Quero preencher com uma figura/imagem externa (como background). Tem como?

<!DOCTYPE html>
<html>
<body>

<canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>

<script>
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.fillStyle= "blue";
ctx.fillRect(20, 20, 150, 100);
</script>

</body>
</html>

A: Ok, depois de pesquisar mais um pouco, descobri que o método  CanvasRenderingContext2D.createPattern() resolve. Ver link do MDN
Grato pela atenção!


text:
Q: enabling Firefox 5.0 javascript dump() I'm going through firefox extension writing bootcamp and somewhere along the way the video's author is speaking about switching browser.dom.window.dump.enabled in about:config to true. This option is no longer present in firefox 5.0. From what I read during my google searches, in ff 4.0 you had to create this preference yourself, and it seems like in firefox 5.0 it doesn't work anymore - I can't seem to dump information to firefox error console any more (regardless of whether console2 is enabled or not).
Relevant code:
Here's how I'm launching the browser:
/usr/bin/iceweasel -profile /some/path -no-remote -jsconsole

And here's the code that only shows the alert, without writing anything to the error console:
onCommand: function(event) {
  toJavaScriptConsole("toJavaScriptConsole: hello world");
  dump("Hello world!\n");
  alert("Hello world!\n");
}

Any idea what I can do to have working dump() called from the ff extension I'm working on in firefox 5.0?

A: You confused the error console with plain linux console - if you run firefox from terminal you should see the dumps right there.
in-depth explanation

A: This preference was never present by default - you always had to create it and set to true. Also, the output doesn't go to Error Console, it is rather visible in the terminal you start Firefox from. If you happen to test on Windows you should specify -console command line flag to open a terminal window for the output, on Linux simply starting Firefox from a terminal window will do.


text:
Q: 'server' option is missing in new-psdrive? how to connect to 'ad lds' instance using directory services command lets? My Environment: Windows Server 2012, PowerShell 4.0
According to MSDN documentation, one should be able to mount 'active directory' or 'active directory lightweight directory services' using new-psdrive Cmdlet.
Excerpt from: http://technet.microsoft.com/en-us/library/hh852274(v=wps.620).aspx
You can use the Active Directory module provider to map Active Directory domains, AD LDS instances, and Active Directory Database Mounting Tool instances to specific provider drives. When the Active Directory module is first loaded, a default Active Directory drive (AD:) is mounted. To connect to that drive, run the cd AD: command. To connect a new provider drive to an Active Directory domain, an AD LDS server, or an Active Directory Database Mounting Tool instance, use the following cmdlet:
New-PSDrive **–Server <server or domain name (NetBIOS/FQDN)[:port number]>**  -Name <name of the drive> -PSProvider ActiveDirectory -Root "<DN of the partition/NC>" -Credential <domain name>\<username>

However the 'server' option is not available in new-psdrive Cmdlet. I am getting 'A parameter cannot be found that matches parameter name 'server'. And I don't see any mention of server property in the help as well: http://technet.microsoft.com/en-US/library/hh849829(v=wps.630).aspx
can anyone please let me know what I am missing here?
PS C:\> Import-Module activedirectory
PS C:\> cd ad:
PS AD:\> New-PSDrive -Name z -PSProvider activedreictory -root "C=MyAdLDSInstance,DC=COM" -server "myserver:50000"
New-PSDrive : A parameter cannot be found that matches parameter name 'server'.
At line:1 char:82
+ ... stance,DC=COM" -server "myserver:50000"
+                    ~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-PSDrive], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.NewPSDriveCommand

PS AD:\> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      4.0
WSManStackVersion              3.0
SerializationVersion           1.1.0.1
CLRVersion                     4.0.30319.18449
BuildVersion                   6.3.9600.16406
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion      2.2

PS AD:\>

A: New-PSDrive -Name z -PSProvider activedreictory -root "C=MyAdLDSInstance,DC=COM" -server "myserver:50000"

You've misspelled ActiveDirectory. The available parameters are dependent upon the PSProvider specified, and activedreictory isn't a valid PSProvider at all.


text:
Q: Django save method doesn't work despite successful POST request I'm using jquery to send request to a Django form. I have this function in views.py:
@csrf_exempt
def update_ops(request):
    print('something something')
    ops_id = request.POST['id']
    instance = Ops.objects.all().filter(id=ops_id)
    form_qdict = QueryDict(request.POST['form_data'])
    form = OpsForm(form_qdict or None, instance=instance)
    if form.is_valid():
        form.save()
        print('saved bro!')
        # return HttpResponseRedirect('/ops/')
    else:
        print('form is not valid')
    return render(request, 'ops_form.html', {'form': form})

urls.py:
urlpatterns = [
url('^update_ops_form/', views.update_ops, name='update_ops_form')
]

the html form in form.html:
 <form action="{% url 'update_ops_form' %}" id="post-form" method="post">
    {% csrf_token %}
 <!--some html form-->
</form>

and the script in form.html:
<script>
    var ops_id = $('#ops_id').text()
    console.log(ops_id)

    $("#post-form").submit(function (event) {
        event.preventDefault(); //prevent default action
        var post_url = $(this).attr("action");
        console.log(post_url)//get form action url
        var request_method = $(this).attr("method"); //get form GET/POST method
        var form_data = $(this).serialize(); //Encode form elements for submission
        console.log(form_data)
        $.ajax({
            url: post_url,
            type: request_method,
            data: {'id':ops_id,'form_data':form_data}
        })
    });
</script>

What I want to do is to update an instance of the Ops Model with form using jquery. The POST request is successful, but it doesn't update the instance that I changed. The only possible reason for the error that I know of is because the url in action parameter of the html form doesn't match the url that maps to the update_ops() function in views.py, but that doesn't seem to be the case here.
Also I'm able to view the Form pre-populated with data from the Model, so I don't think the problem is from declaring those 2. I'm fairly new to Django and Jquery so thank you if you can spend some time and tell me what's wrong.

A: Assuming OpsForm is a ModelForm and not a Form, I suspect the problem is how you're fetching instance. Currently it's being set to a QuerySet. You want the actual instance:
from django.shortcuts import get_object_or_404
instance = get_object_or_404(Ops, id=ops_id)

If you'd prefer to do your own error handling if the instance doesn't exist then:
instance = Ops.objects.filter(id=ops_id).first()

If it doesn't exist, instance will be set to None.
Edit:
The other thing you should strongly consider doing is to move the id of the Ops instance into the url, then the request body can just be the form and doesn't have to be wrapped in another object. The documentation covers urls pretty well.
This would change your view to:
from django.http.response import HttpResponseForbidden
def update_ops(request, ops_id):
    instance = get_object_or_404(Ops, ops_id)
    if request.method != "POST":
        raise HttpResponseForbidden
    form = OpsForm(request.POST, instance=instance)
    if form.is_valid():
        form.save()
        print('saved bro!')
        return HttpResponseRedirect('/ops/')
    else:
        print('form is not valid')
    return render(request, 'ops_form.html', {'form': form})

urls.py
from django.urls import path
urlpatterns = [
    path('update_ops_form/<int:ops_id>', views.update_ops, name='update_ops_form')
]

template
<form action="{% url 'update_ops_form' ops_id=ops.id %}" id="post-form" method="post">

script:
<script>
    $("#post-form").submit(function (event) {
        event.preventDefault(); //prevent default action
        var post_url = $(this).attr("action");
        console.log(post_url)//get form action url
        var request_method = $(this).attr("method"); //get form GET/POST
        console.log(form_data)
        $.ajax({
            url: post_url,
            type: request_method,
            data: $(this).serialize()
        })
    });
</script>

A: Still don't know what's wrong with the save() function. But my workaround is to add commit=False and manually set the id to the ops_id before commit like this:
@csrf_exempt
def update_ops(request):
    ops_id = request.POST['id']
    instance = Ops.objects.get(pk=ops_id)
    form_qdict = QueryDict(request.POST['form_data'])
    form = OpsForm(form_qdict or None, instance=instance)
    if form.is_valid():
        obj = form.save(commit = False)
        obj.id = ops_id
        obj.save()
        return HttpResponseRedirect('/ops/')
    else:
        print('form is not valid')

    return render(request, 'index.html', {'form': form})


text:
Q: How to trigger a click event once a page or view is loaded in vue.js? Ran into a case to trigger a click once a page or view is loaded, and a popup is triggered in vue.js to edit data table row. There is no such a good VUE way that I can find, although the following link mentioned a way as the follows:
https://forum.vuejs.org/t/how-to-trigger-a-click-event-through-code-in-vuejs-on-page-load/92582
mounted: function () {
    setTimeout(function(){
        const elem = document.getElementById('myBtn');
            elem.click();
    }, 100);
},

I did in a similar way as the follows. The try catch to contain error although it's ugly, since at some point the data doesn't exist.
edit: function (idx, row) {
    ... nore code here ...
    try {
        document.getElementById(row.id).click();  // row.id is dynamic or variable
    } catch (error) {
        // pass
    }
},

However my team mate, a vue.js lover, said it's not a damn VUE way. Now what it the right way to do such a thing?
The following Demo is possible for the expected work:

Vue.config.devtools = false;
Vue.config.productionTip = false;

new Vue({
el: '#app',

data: {
  li_address: [{name: 'CA'}, {name: 'NY'}, {name: 'AL'}],
  name: 'NY'
},

methods: {
},
mounted() {
  console.log(['this.name', this.name]);

  // this.$refs[this.name].click(); // failed
  document.getElementById(this.name).click();  // worked. the click is triggered upon this.name
}
})

<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/uikit.min.css" />

    {{r.name}}
    <input :id="r.name" :ref="r.name" type="radio" class="uk-radio" :value="r"
     name="address_group">

A: Add a ref to your element called myBtn like :

some content

then run the click :
 this.$refs.myBtn.click()

example :

Vue.config.devtools = false;
Vue.config.productionTip = false;

new Vue({
  el: '#app',

  methods: {
    logOk() {
      console.log("OK OK")
    }

  },
  mounted() {
    this.$refs.okBtn.click()

  }
})
<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />

  <button ref="okBtn" @click="logOk"> OK</button>

A: Just select your element and trigger Click Event on Mounted life cycle of Vue app
mounted() {
 this.$nextTick(() => {
   document.getElementById('myBtn').click()
 });
}

$nextTick according to VueJs documentation :

Defer the callback to be executed after the next DOM update cycle. Use
it immediately after you've changed some data to wait for the DOM
update.

A: In your example code, there is no need for any DOM manipulation.  The main strength of a declarative reactive framework like Vue is for changes to the model to be automatically propagated to the view.  This will select the appropriate radio button just by setting v-model appropriately.

new Vue({
  el: '#app',
  data() {
    return {
      li_address: [{name: 'CA'}, {name: 'NY'}, {name: 'AL'}],
      name: 'NY'
    }
  }
})

      {{r.name}}
      <input type="radio" v-model="name" :id="r.name" :value="r.name">

NAME: {{ name }}

<link type="text/css" rel="stylesheet" href="//unpkg.com/bootstrap/dist/css/bootstrap.min.css" />

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/2.27.5/css/uikit.min.css" />


text:
Q: Booting Ubuntu 13.04 i386 from USB, main OS is Windows 7, VAIO S Series, VPCS149FJ I'm also one of the newbies at Ubuntu and I intend on installing Ubuntu 13.04 Desktop i386 on my USB using Universal USB Installer, with some basic information provided on
http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows
which doesn't, unfortunately, provides me with information about what to do after creation. Do I just shut down, plug the USB in, start up, interrupt normal booting, choose booting device which is the USB, and done?
Even if this succeeds, when I shut down in Ubuntu, do I start up at Windows 7 the next time?
What is the difference between 'trying' Ubuntu and 'installing' Ubuntu? I've heard that it's possible to perform an installation on a USB. How?
A LOT OF INFO is appreciated!!! Thanks in advance!!!

A: Once you create the USB, you need to boot from it.  Just change the boot order in your BIOS to boot from USB.
Since you have Windows 7 installed already, when you get to the installation screen, choose alongside Windows.

Trying Ubuntu lets you run Ubuntu fully, but without making any changes to your system, while installing will do changes to your system, depending on the type of installation you choose.


text:
Q: Automating a powershell command that prompts for user input? I execute the command
Enable-PSRemoting

and sometimes it prompts
Do you want to continue?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

How do I automate the answer to 'A' when it prompts for this ?

A: Enable-PSRemoting -Confirm:$false


text:
Q: Problem with flashing project code to CC2541 chip (using CCLoader) I have followed the project
https://github.com/rampadc/cc254x-hidKbdM
https://imgur.com/a/KWmz6
which could turn the HM-10 Bluetooth module into a bluetooth mouse to control smart phone
but the LED on HM-10 was not blinking (if the flashing process is successful it will blink)
after I flashed the code
steps

*

*build project and export hex file on IAR embedded testbench

*use hex2bin tool to convert .hex file into .bin file

command: hex2bin.exe HM-10_CC2541_Experimental.hex  the output a binary file

*upload ccloader code to my Arduino UNO board
(ccloader link:https://github.com/RedBearLab/CCLoader)

*connect wire like this post
(https://imgur.com/a/KWmz6)

*the flash the code
command:CCloader.exe 5  HM-10_CC2541_Experimental.hex 0
(format: CCloader.exe [com port] [.bin file] [0:is default setting UNO board] )
Result
Result pic
and the LED on HM-10 was not blinking
my Android phone cannot discover the device
and the HM-10 cannot response to the serial port monitor in Arduino IDE.
I have not idea what can i do now


text:
Q: OpenGL ES 1.1: Culling versus near clip plane -- performance I'm writing an app in OpenGL ES 1.1. I'm rendering a textured sphere around the viewer, i.e. the eye viewpoint is in the centre of the sphere. Because I don't need any lighting effects, there's no need at present to have surface normals for each vertex. However, I'd need those to turn on backface culling. Is there any benefit in turning on backface culling though? Because my eye is at the centre of the sphere, any faces that got culled (i.e. behind the eye) would be dealt with by the near z plane clipping anyway.
So would adding surface normals and turning on backface culling get me any performance benefit, in this situation?

A: First of all, surface normals don't have anything to do with back-face culling, at least for OpenGL's part. The front or back-sidedness of a face is determined by the ordering of its vertices when projected into screen space, which by default (which can be changed using glFrontFace) is front-facing when the vertices are ordered counter-clockwise and back-facing when ordered clockwise.
So you don't need any normals. These are only used for lighting computation and nothing else. How should the normal of a single vertex influence the surrounding faces orientation? Take the average of the vertex normals? What if these are completely opposite  or something more weird (since the user can specify any normals he wants)?
That said you also don't need back-face culling for your sphere, since from the inside you always see the front-side anyway. But it also doesn't hurt to turn it on, since you also don't see any back-faces (and you can assume face-culling to be for free). But in this case pay attention to the orientation or your faces, it may be that you need to enable front-face culling (glCullFace(GL_FRONT)) instead of back-face culling when you are in the inside of the sphere, since most objects are tessellated to have their triangles facing outside. Or you could just switch to glFrontFace(GL_CW).

A: You certainly don't need normals in order to enable backface culling. The only thing that matters for culling is whether a polygon is frontfacing or backfacing. You can specify what front facing is by using the glFrontFace function, and specify exactly what needs to be culled by using the glCullFace function. No normals necessary.
That said, it would indeed not matter in this case, since your backfacing polygons would be clipped anyway.


text:
Q: Multiple match query with unique return I have no idea where to start with this query. I have two tables, table A with employeeID and jobclassID, and travel B with jobpositionID and jobclassID. In table A employee ID is unique but there are multiple employees with the same jobclassID.  In table B jobpositionID is unique, and jobclassID is not unique.
Example:
Table A
employeeID     jobclassID
Joe            Usher
Debbie         Cashier
John           Usher
Julie          Usher

Table B
jobpositionID   jobclassID
Usher1          Usher
Cashier1        Cashier
Usher2          Usher
Usher3          Usher
Manager1        Manager
Supervisor1     Supervisor
Janitor1        Janitor
Janitor2        Janitor

I would like to get a return like this:
employeeID      jobpositionID
Joe             Usher1
Debbie          Cashier1
John            Usher2
Julie           Usher3

It does not matter which jobpositionID an employee gets except that it is in their jobclassID. I am using MS Access to query an Oracle database.
Any idea how to achieve this?
Thanks in advance

A: I'm not sure if you need to do it a specific way but I will tell you a way that it should work. This is a difficult situation because there is no foreign key relating the tables. But since you said that it doesn't matter which jobpoistionID a person gets, it might work. I'm going to provide a method that will insert what you want into a new table. NOTE: I know how to do this when an online database is connected as an individual linked table. Please let me know how you have connected to Oracle if my code doesnt work. I am going out on a limb here, but if you can give me a good description of how you connected to oracle, then i can provide a more accurate answer.
For the purposes of my answer I will pretend that the name of the database is dbo_Oracle but you will need to replace what I write with the real name exactly as it appears. The same is true for "Table A" and "Table B" in your example. If those are not the actual name then you must change them in my code to reflect their actual names
Try this:
Step1: Create a new table, let's name it newTable
Now create three columns: employeeID, jobclassID, and jobpositionID
(you do not need a primary key for this table)
Step 2: Go To: File>>Options>>Trust Center>>Trust Center Settings>>Macro Settings>> And select "Enable all Macros..."
(You can disable this later for security reasons. This setting is only dangerous if you run an intentionally malicious code while its enabled. I promise my code is not dangerous.)
Step 3: Create a new module. This will open up a window in the VBA editor.
Type this:
Public Sub DoSQL()
Dim SQLa as String
Dim SQLb as String

SQLa = "INSERT INTO [newTable]([employeeID], [jobclassID]) SELECT DISTINCT dbo_Oracle.[Table A].[employeeID] FROM dbo_Oracle.[Table A] ORDER BY [jobclassID];"

DoCmd.RunSQL SQLa

SQLb = "INSERT INTO [newTable] ([jobpositionID]) SELECT DISTINCT dbo_Oracle.[Table B].[jobpositionID] FROM dbo_Oracle.[Table B] ORDER BY [jobpositionID];"

DoCmd.RunSQL SQLb
End Sub

NOTE: The SQL statements enclosed in "quotes" must be on a single line.
Step 4: Click save, and then click the little green arrow to run it.
Step 5: Once you get it to successfully populate the new table, you can delete the jobclassID column. But you should do a quick scan to make sure that the assigned jobpositionID's match the correct jobclassID
I hope this helps. If not, then reply with the information I asked about previously as well as what kind of error message(s) you get. This method worked for me in a similar situation. If this doesn't work for you, then perhaps we can see what slight modifications need to be made.
If for some reason it is taking forever to run, then press ctrl>alt>Del and quit Access from the Task manager (if you have a PC) If you have a mac then force quit by clicking and holding on the icon in the dock and click "Quit"

A: I don't know how to query Oracle from MS Access. MS Access SQL is very limited, while Oracle's is very rich and much, much closer to the SQL standard. As you are querying an Oracle database, I surmise you have all Oracle SQL features available. Either directly or by creating a view in the Oracle database.
A mere join on jobclassID would give you all combinations, i.e. all cashiers with all cashier jobs etc. And a top 1 query (give me the first job you find for a person) on the other hand would lead to several persons getting the same job position.
A solution to join each person and each job position only once is to number the potential employees and the jobs, e.g. cashier persons 1, 2, 3, ... and cahier jobs 1, 2, 3, ... and then join on jobclassID plus number.
select
  e.employeeid,
  j.jobpositionid
from
(
  select
    employeeid,
    jobclassid,
    row_number() over (partition by jobclassid order by employeeid) as rn
  from employee
) e
left outer join
(
  select
    jobpositionid,
    jobclassid,
    row_number() over (partition by jobclassid order by jobpositionid) as rn
  from job_position
) j using (jobclassid, rn)
order by e.employeeid;

A: You can use this self-join trick too:
select X1.employeeID, X2.jobPositionID
from
(
select T1.jobClassID, T1.jobPositionID, count(*) as rankNum
from B T1
inner join B T2 on T1.jobClassID = T2.jobClassID and T1.jobPositionID >= T2.jobPositionID
group by T1.jobClassID, T1.jobPositionID
) X2
inner join
(
select T1.employeeID, T1.jobClassID, count(*) as rankNum
from A T1
inner join A T2 on T1.jobClassID = T2.jobClassID and T1.employeeID >= T2.employeeID
group by T1.employeeID, T1.jobClassID
) X1 on X1.jobClassID = X2.jobClassID and X1.rankNum = X2.rankNum
order by X1.employeeID


text:
Q: Name of Noether Normalization lemma The theorem states

Let $A$ be a finitely generated $K$-algebra. Then there is a finite algebraically independent set S over $K$ and A is finite over $K[S]$.

I have seen some algebraic geometric interpretation. But can I understand just from aglebraic point of view? (Why is it called normalization?)
A normal domain $R$ is an integral domain which is integrally closed as for the ring morphism $R\hookrightarrow\text{Frac}(R)$. Can I use the theorem to normalize $R$ in its fraction field or something?


text:
Q: Could anyone explain this theme Theme: Innovative new age processes
This topic is for making a poster. I don't think I've found the right meaning for this topic.
(The topic is related to engineering)

A: I'm an engineer and new age processes are the sort of buzz words that you see on promotional material sometimes. A well-known buzzword that was popular about a decade ago was internet-of-things. That term is now rarely seen and it's interesting to reflect on why. Perhaps because in its success it became mundane? I mention it at least to suggest that new age processes is a similar term. If so, it's being used currently because technology is opening up some new possibility. Eventually, the buzzword will disappear because whatever it is will become rather mundane.
So, what have we here?
Googling "new age processes" backs up the buzzword theory. What new possibility has technology made available now?

We are in the midst of the Fourth Industrial Revolution that's blazing a digital trail across the manufacturing industry.
Source: https://www.wipro.com/

Gripping...

1. Dawn of the Intelligent Factory
Intelligent Factories of today are transforming the plant value chain and connecting everything...

That's right, they're connecting everything...

...in a bid to enhance productivity, reduce workforce challenges, and drive operational efficiencies.

I'll spare you 2 through 4, although if you want to learn about how "operations transformation drives efficiencies" then treat yourself and click on the link.
Buzzwords aside, they have a point with something here:

5. Cloud first, Cloud only
Cloud gives manufacturers easy and low cost access to new tech, improves accessibility and collaboration while augmenting security, and provides opportunities to offer new services to their customers.

Today we routinely and casually use cloud storage on our phones, TVs, PCs, etc. Yesterday a friend visited - I used my phone to play (via the TV) a piece of music that I'd composed on my PC. So everything is, as advertised, connected.
It's so normal it's mundane. And true to form some people are thinking about it. And they're trying to find opportunities. And well, that's all just a lot easier to do when you have a buzzword - so today that's "new age processes."
Can we meet in the middle and just drop the "innovative", though?


text:
Q: Set a windows task scheduler to open excel and execute an excel macro after 5 minutes I need to run an excel macro at 3.00am in the morning. I can set up the task scheduler to be open up excel at 2.55am. However, how do i get excel to execute the macro only after 5 minutes, that it has opened?

A: You could launch the excel at 3 a.m. and trigger your macro from the WORKBOOK_OPEN event by adding a
Private Sub Workbook_Open()
   RunUrMacro()
End Sub

To your workbook.
If you absolutely need to load at 2.55 and run at 3 then you could sleep the application for 5 minutes using Application.Wait

A: As Nishant pointed out, you should use the Workbook_Open procedure to trigger a macro when the workbook opens.
The best way is to open you workbook at 3:00am and Workbook_Open will trigger the macro.
Yet, if you really need to wait, you'd better use Application OnTime like this:
Sub RunOnTime()
    dTime = Now + TimeSerial(0, 0, 10)
    Application.OnTime dTime, "RunMe"
End Sub


text:
Q: is there any operation such as trim in xslt? i wrote a xslt code which converts a xml file to a html file which contains lot of tables, one of the column contains messages(very long messages), but that line starts with either of the two words "Verification Passed" or "Verification failed"
My requirement is to make the entire table row red if verification failed and make entire table row green if verification passed
 <xsl:choose>
  <xsl:when test="contains(@message,'Verification failed:')">   <xsl:value-of select="@Message"/>	</xsl:when>
  <xsl:when test="contains(@message,'Verification passed:')"><xsl:value-of select="@Message"/>	</xsl:when>
  <xsl:otherwise> <xsl:value-of select="@Message"/>	</xsl:otherwise>
</xsl:choose>

A:
is there any operation such as trim in xslt?

I. XSLT 1.0
No, and it is rather difficult to perform "trim" in XSLT 1.0.
Here is the trim function/template from FXSL:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:import href="trim.xsl"/>

  <xsl:output method="text"/>
  <xsl:template match="/">
    '<xsl:call-template name="trim">
        <xsl:with-param name="pStr" select="string(/*)"/>
    </xsl:call-template>'
  </xsl:template>
</xsl:stylesheet>

When this transformation is performed (you have to download at least a few other stylesheet modules, which comprise the complete import tree) on this XML document:
<someText>

   This is    some text

</someText>

the wanted, correct result is produced:
'This is    some text'

II In XSLT 2.0 / XPath 2.0
Still a little bit tricky, but very short:
     if (string(.))
       then replace(., '^\s*(.+?)\s*$', '$1')
       else ()

Here is the complete, corresponding transformation:
<xsl:stylesheet version="2.0"   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output omit-xml-declaration="yes" indent="yes"/>

 <xsl:template match="/*">
     "<xsl:sequence select=
         "if (string(.))
           then replace(., '^\s*(.+?)\s*$', '$1')
           else ()
           "/>"
 </xsl:template>
</xsl:stylesheet>

and when applied on the same XML document (above), the same correct result is produced:
"This is    some text"

A: Unfortunately you don't say what you expect your "trim()" function to do. But from your description of the requirement, I would guess that normalize-space() is close enough:
starts-with(normalize-space(message), 'Verification passed'))

The XPath normalize-space() function differs from the Java trim() method in that (a) it replaces internal sequences of whitespace characters by a single space, and (b) it has a slightly different definition of whitespace.

A: using XSLT1 with registerLangFunctions
Today, ~10 years after (complex) XSLT2 standard released, many projects yet use (faster) XSLT1. Perhaps the problem is not only "simple vs complex", but XSLT1 is a fact for Perl, PHP, Python, PostgreSQL, and many other communities.
So, a solution for Perl, PHP and Python: use your main language to do trim and another usual functions that not exists into XSLT1.
Here an example of PHP:
 https://en.wikibooks.org/wiki/PHP_Programming/XSL/registerPHPFunctions

A:  <xsl:variable name="Colour">
 <xsl:choose>
 <xsl:when test="contains(@Message,'Verification failed:')">background-color:red;       </xsl:when>
 <xsl:when test="contains(@Message,'Verification passed:')">background-color:green</xsl:when>
 <xsl:otherwise> </xsl:otherwise>
 </xsl:choose>
 </xsl:variable>

  <xsl:value-of select="@Time"/>
 Line <xsl:value-of select="@Line"/>
  <xsl:value-of select="@Type"/>
  <xsl:value-of select="@Message"/>


text:
Q: gcc 4.7 fails to use pointer template parameter sometimes Complete (not)working example:
struct s { int i; };

template<const s* _arr>
class struct_array
{
public:
    static constexpr auto arr = _arr[0]; // works
    template<int >
    struct inner // line 9, without this struct, it works
    {
    };
};

constexpr const s s_objs[] = {{ 42 }};

int main()
{
    struct_array<s_objs> t_obj;
    return 0;
}

Compiled like this:
g++ -std=c++11 -Wall constexpr.cpp -o constexpr

I get a running program with ideone's gcc 4.8.1, but 4.7.3 prints this to me:
constexpr.cpp: In instantiation of 'class struct_array<((const s*)(& s_objs))>':
constexpr.cpp:18:30:   required from here
constexpr.cpp:9:16: error: lvalue required as unary '&' operand
constexpr.cpp:9:16: error: could not convert template argument '(const s*)(& s_objs)' to 'const s*'

The last two lines are repeated 3 times. What's the reason, and is there any workaround to use my code on gcc 4.7.3?

A: This seems to be a compiler bug to me.
I tried you example on gcc 4.1.2 (codepad), and you have to explicitely note the variable as having external linkage (const imply internal linkage unless specified otherwise, the following code is C++03):
struct s { int i; };

template<const s* _arr>
class struct_array
{
public:
    static const s arr;
    template<int >
    struct inner
    {
    };
};

template<const s* _arr>
const s struct_array<_arr>::arr = _arr[0];

// Notice the 'extern'
extern const s s_objs[] = {{ 42 }};

int main()
{
    struct_array<s_objs> t_obj;
    return 0;
}

I also have it working on gcc 4.8.1 without C++11 enabled.
So, the workaround is:
change
constexpr const s s_objs[] = ...;

to
extern const s s_objs[] = ...;

Live example here.
If you want the variable to be a static class member, then you have to specify it to have external linkage:
struct data
{
    static const s s_objs[1];
};

extern const s data::s_objs[1] = {{ 42 }};

This gives me a warning on gcc 4.7, not on 4.8. Also it doesn't compile on Rise4Fun. So, I'm not sure whether this is pure standard or a bug in one of the compiler.


text:
Q: Scripts from Wordpress child theme not enqueing I've been unable to get my custom scripts from a child theme I made show up.
I've added my child theme and appropriate style.css and functions.php files, among others. Followed the usual set up instructions.
Then, I've added custom javascript inside
child_theme_directory/js/custom.js
which in my specific case worked out to be
TWR/js/twr-js.js
I attempted to follow various tutorials and added code to my functions.php in attempt to enqueue those js scripts, such as:
function load_twr_script() {
    wp_register_script ( 'twr-js', get_stylesheet_directory_uri() . '/js/twr-js.js');
    wp_enqueue_script( 'twr-js', get_stylesheet_directory_uri() . '/js/twr-js.js', array( 'jquery' ), '1.0', true );
}
add_action('wp_enqueue_scripts', 'load_twr_script');

and
function load_twr_script(){
    wp_register_script ( 'twr-js', get_template_directory_uri() . '/js/twr-js.js', array('divi-custom-script'), '1.1', true );
    $twr_data = array(
        'home_url' => esc_url( home_url( '/' ) )
    );
    wp_localize_script ('twr-js', "twr_data", $twr_data );
    wp_enqueue_script ('twr-js');
}
add_action('wp_enqueue_scripts', 'load_twr_script');

and a few other attempts. But my js script isn't even showing up under sources in inspector. Thank you for your help.


text:
Q: Как сделать выбор камер на PyQt5? Всем доброго времени суток. Я хочу сделать выборку камер на PyQt5. Дела в том что у меня есть несколько камер. И мне нужно сделать выборку камер. И так у меня есть не большой код который выводить все подключенные камеры.

Вот сам код:

from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
import sys
import cv2

class Mess_Window(QDialog):
    def __init__(self, camer):
        super().__init__()
        self.setWindowTitle("AS technology")
        self.setFixedSize(300, 200)
        self.camera = camer
        self.wid_vh = QWidget(self)
        self.wid_vh.resize(300, 200)
        self.wid_vh.setStyleSheet("background-color: rgb(85, 170, 175);")
        self.label_1 = QLabel("Выберети камеру", self.wid_vh)
        font = QFont()
        font.setPointSize(15)
        self.label_1.setFont(font)
        self.label_1.move(70, 10)

        self.chek_1 = QLabel("1", self.wid_vh)
        self.chek_2 = QLabel("2", self.wid_vh)
        self.chek_3 = QLabel("3", self.wid_vh)
        self.chek_4 = QLabel("4", self.wid_vh)
        self.chek_5 = QLabel("5", self.wid_vh)
        self.chek_6 = QLabel("6", self.wid_vh)
        self.chek_7 = QLabel("7", self.wid_vh)
        self.chek_8 = QLabel("8", self.wid_vh)

        self.chek_1.move(80, 50)
        self.chek_2.move(80, 90)
        self.chek_3.move(80, 130)
        self.chek_4.move(80, 170)

        self.chek_5.move(170, 50)
        self.chek_6.move(170, 90)
        self.chek_7.move(170, 130)
        self.chek_8.move(170, 170)

        self.chek_1.hide()
        self.chek_2.hide()
        self.chek_3.hide()
        self.chek_4.hide()

        self.chek_5.hide()
        self.chek_6.hide()
        self.chek_7.hide()
        self.chek_8.hide()

        index = 0
        camera_indexes = []
        max_numbers_of_cameras_to_check = 10
        while max_numbers_of_cameras_to_check > 0:
            capture = cv2.VideoCapture(index)
            if capture.read()[0]:
                camera_indexes.append(index)
                if len(camera_indexes) == 1:
                    self.chek_1.show()
                elif len(camera_indexes) == 2:
                    self.chek_1.show()
                    self.chek_2.show()
                elif len(camera_indexes) == 3:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                elif len(camera_indexes) == 4:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                    self.chek_4.show()
                elif len(camera_indexes) == 5:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                    self.chek_4.show()
                    self.chek_5.show()
                elif len(camera_indexes) == 6:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                    self.chek_4.show()
                    self.chek_5.show()
                    self.chek_6.show()
                elif len(camera_indexes) == 7:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                    self.chek_4.show()
                    self.chek_5.show()
                    self.chek_6.show()
                    self.chek_7.show()
                elif len(camera_indexes) == 8:
                    self.chek_1.show()
                    self.chek_2.show()
                    self.chek_3.show()
                    self.chek_4.show()
                    self.chek_5.show()
                    self.chek_6.show()
                    self.chek_7.show()
                    self.chek_8.show()
                capture.release()
            index += 1
            max_numbers_of_cameras_to_check -= 1

        self.wid_vh.show()

if __name__ == "__main__":
    app = QApplication(sys.argv)
    ui = Mess_Window(1)
    ui.show()
    sys.exit(app.exec_())

И так немного по коду. Тут проверяется какие камеры подключены и выводить их индекс. И так что мне конкретно нужно. Мне нужно сделать выбор. То есть если у меня подключено 4 камеры и я хочу использовать 3 камеру, то я просто указываю что 3 камера будет использоваться.

Вот не большое представление:

И так мне нужно что бы при клике правой кнопки мыши выходила окошка как на картинке!!!.
и после выбора мне нужно информация что она стало основной то есть вывести в консоль надпись что такое камера стало основной или же удалена из основной.

A: import sys
import cv2
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *

class Main(QDialog):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("AS technology")
        layout = QHBoxLayout()
        self.choice_questions = QTreeWidget(self)
        self.choice_questions.setFixedSize(300, 200)
        self.choice_questions.setHeaderLabels(["№", "Name Camer", "Статус"])
        item_1 = QTreeWidgetItem(["1", "Камера 1"])
        item_2 = QTreeWidgetItem(["2", "Камера 2"])
        item_3 = QTreeWidgetItem(["3", "Камера 3"])
        item_4 = QTreeWidgetItem(["4", "Камера 4"])
        item_5 = QTreeWidgetItem(["5", "Камера 5"])
        item_6 = QTreeWidgetItem(["6", "Камера 6"])
        item_7 = QTreeWidgetItem(["7", "Камера 7"])
        item_8 = QTreeWidgetItem(["8", "Камера 8"])

        index = 0
        camera_indexes = []
        max_numbers_of_cameras_to_check = 10
        while max_numbers_of_cameras_to_check > 0:
            capture = cv2.VideoCapture(index)
            if capture.read()[0]:
                camera_indexes.append(index)
                if len(camera_indexes) == 1:
                    self.choice_questions.addTopLevelItem(item_1)
                elif len(camera_indexes) == 2:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                elif len(camera_indexes) == 3:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                elif len(camera_indexes) == 4:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                    self.choice_questions.addTopLevelItem(item_4)
                elif len(camera_indexes) == 5:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                    self.choice_questions.addTopLevelItem(item_4)
                    self.choice_questions.addTopLevelItem(item_5)
                elif len(camera_indexes) == 6:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                    self.choice_questions.addTopLevelItem(item_4)
                    self.choice_questions.addTopLevelItem(item_5)
                    self.choice_questions.addTopLevelItem(item_6)
                elif len(camera_indexes) == 7:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                    self.choice_questions.addTopLevelItem(item_4)
                    self.choice_questions.addTopLevelItem(item_5)
                    self.choice_questions.addTopLevelItem(item_6)
                    self.choice_questions.addTopLevelItem(item_7)
                elif len(camera_indexes) == 8:
                    self.choice_questions.addTopLevelItem(item_1)
                    self.choice_questions.addTopLevelItem(item_2)
                    self.choice_questions.addTopLevelItem(item_3)
                    self.choice_questions.addTopLevelItem(item_4)
                    self.choice_questions.addTopLevelItem(item_5)
                    self.choice_questions.addTopLevelItem(item_6)
                    self.choice_questions.addTopLevelItem(item_7)
                    self.choice_questions.addTopLevelItem(item_8)
                capture.release()
            index += 1
            max_numbers_of_cameras_to_check -= 1

        self.choice_questions.setFont(QFont('Times New Roman', 13))
        self.choice_questions.setContextMenuPolicy(Qt.CustomContextMenu)
        self.choice_questions.customContextMenuRequested.connect(
                              self.context)
        layout.addWidget(self.choice_questions)
        self.setLayout(layout)

    def context(self, point):
        menu = QMenu()
        if self.choice_questions.itemAt(point):
            edit_question_1 = QAction('Выход', menu)
            edit_question_2 = QAction('Вход', menu)
            edit_question_1.triggered.connect(lambda:
                       self.choice_questions.itemAt(point).setText(2,
                                                  "Выход"))
            edit_question_2.triggered.connect(lambda:
                       self.choice_questions.itemAt(point).setText(2,
                                                  "Вход"))
            menu.addAction(edit_question_1)
            menu.addAction(edit_question_2)
        else:
            pass
        menu.exec(self.choice_questions.mapToGlobal(point))

if __name__ == "__main__":
    app = QApplication(sys.argv)
    main = Main()
    main.show()
    sys.exit(app.exec_())


text:
Q: Comparing two dates with a given format I am trying to compare two dates using javascript with ExtJS 4.
var d= Ext.Date.parse("03/21/2012", "m/d/Y");
var comp= new Date();

if (d< comp) {
    console.log("date value provided is larger" );
} else {
    console.log("date value provided is less" );
}

When running the above example, the result I get is "date value provided is less". However, when I change the value of d to a future date 12/21/2012, I still get the message "date value provided is less".
I think this is because I need to format the var comp= new Date(); value so it can do the calculation.
How can I do that?

A: Both variables d and comp are objects. They are instances of Date.
EDIT: Date objects can be compared using < operator in JavaScript. Your code looks fine, it works on jsfiddle.
var d = Ext.Date.parse("03/21/2012", "m/d/Y");
var comp = new Date();

if (d < comp) {
    console.log("date value provided is larger" );
} else {
    console.log("date value provided is less" );
}

Thanks for clarifying the date comparison in the comments.


text:
Q: Python - winsound and SND not working Hi i am having a few problems with the winsound i want to play a short sound clip and on this page here: Play a Sound with Python it is said that this should work:
import winsound

winsound.PlaySound('sound.wav', winsound.SND_FILENAME)

on mine i get the error, the program and the audio file which is a .wav are both in the same folder, and im not sure why any help?
Code:
import winsound

winsound.PlaySound('sound.wav', winsound.SND_audio)

Error:
Traceback (most recent call last):
  File "C:\Users\----\----\python\test\soundtest.py", line 3, in <module>
    winsound.PlaySound('sound.wav', winsound.SND_audio)
AttributeError: module 'winsound' has no attribute 'SND_audio'

A: Replace .SND_audio with .SND_FILENAME as it said on the page and it should work.
If it still doesn't work try .SND_ASYNC

A: I got the same error. Code required to get it running was adding
winsound.PlaySound("soundname.wav", winsound.SND_ASYNC)


text:
Q: How can I parse "I'm tired is all"?
I'm tired is all.

How can I parse this?

A: It's not a grammatically correct sentence by itself - usually it would be something like

"I'm tired" is all [that I want to say].

or

"I'm tired" is all [that's wrong with me].

It means that there are no major problems; the speaker is just tired, which explains their odd behavior.

A: I am tired. That's all, no more explaination. I guess you were asked by your girlfriend why not pick up the phone.


text:
Q: Check if cell if empty I am trying to check if the cell (A5) in sheet tstDash is empty. Currently the cell contains a formula but sometimes it the result is blank and sometimes is a number.
If it is blank, I want a message box. Otherwise perform other function.
I have this code but it is completely ignoring the line and giving me fits.
If chk25thPercentile.Checked = True And Globals.tsdDash.Range("A5").Value Is DBNull.Value

A: Try this ..
If chk25thPercentile.Checked And IsDBNull(Globals.tsdDash.Range("A5").Value)

A: What language are you writing in ? VBA or VB.Net ? VBA won't accept IsDBNull. If you are in VBA you want to be testing for the blank result of the formula, which is probably just an empty string ""
I expect you need something like
If chk25thPercentile.Checked And Globals.tsdDash.Range("A5").Value = ""

That is assuming that the result of your formula is an empty string, if the cell is actually blank, ie, without a formula you might want to look at ISBLANK


text:
Q: How to reproduce Bash HMAC encryption in Node.js I have this shell snippet that I need to reproduce in Node.js
echo "hellokev" | openssl dgst -binary -sha1 -hmac "mysecret" | openssl base64;

My current Node attempt is:
node -e "
var crypto = require('crypto');
var credential = crypto.createHmac('sha1', 'mysecret').update('hellokev').digest('base64')
console.log(credential);
";

Which does not produce the same output. What am I missing?

A: echo appends a newline as its gets fed into your openssl dgst command. To make your outputs be equal, you can use one of the following approaches:

*

*Use echo -n "hellokev", instructing echo to omit the newline.

*Use printf "hellokev" for a better, more portable way of printing in the shell. printf does not append a newline unless you tell it to.

*Append \n to your input to the update() function, like .update('hellokv\n'), if you are not allowed to modify the shell snippet.


text:
Q: Multiple UICollectionViews use same UICollectionViewCell in iOS I am developing an iOS application where I have many views that have UICollectionViews which display products from my website.
How can I display the same UICollectionViewCell in multiple UICollectionViews?
The UICollectionViewCell is in the storyboard inside one of the UICollectionViews.
Thanks!

A: Sounds like you'd like to use One Collection View Cell for All your Collection Views.
So you need to create Custom Class with subclassed Collection View Cell with xib.
So that you can Choose that cell in every collecion views.
Follow the steps :

*

*Create Collection view cell subclass as

*In all your Collection Views, Select Collection View Cell Class as following:

*Then write your own Cell behaviour in that Custom Subclassed Class.

Hope it helps.


text:
Q: Actual/Current Value of a DoubleAnimation in Silverlight I'd like to get the Actual Value of an Animated property in Silverlight 4.0
I'd like to animate a ScaleTransform ScaleX Property and need the actual Value when i stop the Storyboard.
I also tryed this: http://haishibai.blogspot.com/2010/09/siliverlight-on-windows-phone-7-get.html but it did not work!

A: I was able to get the currennt Rotation property of a RenderTransform with the following
var x = needle.RenderTransform.GetValue(CompositeTransform.RotationProperty);

so I guess you just replace RotationProperty with ScaleXProperty
where needle =
   <ed:RegularPolygon Name="needle" Height="81.5" InnerRadius="1" Canvas.Left="78" PointCount="3" Stretch="Fill" Stroke="Black" Canvas.Top="17.5" UseLayoutRounding="False" Width="15" Fill="#FFFFBB00" StrokeThickness="0" RenderTransformOrigin="0.5,0.838" >
            <ed:RegularPolygon.RenderTransform>
                <CompositeTransform Rotation="-140"/>
            </ed:RegularPolygon.RenderTransform>
        </ed:RegularPolygon>