Is there an efficient way to check if a lattice has a point with all non-zero components?

Question: Given a basis $\{v_1,\dots,v_k\}$ for a $q$-ary lattice $L$ in ${\mathbb Z}_q^n$, is there an efficient (deterministic/randomized) way to find a point in $L$ with all non-zero components, or decide that it does not exist?
Answer: This looks like a hard problem in general, although the lattice viewpoint may not be the right one to look at it. Basically, this is a coding theory question: you are asking about the existence of a full-weight codeword in a linear code over $\mathbb{F}_q$ (and if it does exist, how to find it efficiently). The question has been asked on MathOverflow a few months ago, with no answer so far, but some of the cited references may be useful.
Aside from the fact that this is a question about Hamming weights, I say the lattice viewpoint doesn't seem quite right for at least two reasons.

On the one hand, the problem can be seen as an instance of bounded distance decoding: it asks to find a lattice point within $\ell^\infty$-norm $<q/2$ of $(q/2,\dots,q/2)$. This type of problem is usually hard.

On the other hand, for $q$-ary lattices that normally occur in lattice-based cryptography, simply sampling a random lattice point is expected to solve the problem with good probability. This is because we typically have $q$ much larger than $n$. A random element of $\mathbb{F}_q^n$ has all non-zero coordinates with probability $(1-1/q)^n$ which is close to $1$ in that setting; thus, if the points of $L$ look "roughly random" (which is usually the case, and often an explicit assumption, in lattice-based crypto), you expect a very large fraction of them to have all non-zero coordinates. Therefore, simply sampling a random one should work. An exception is of course the case when the component at some fixed index $i$ is zero for all lattice points, but this is easy to test for by inspection of the basis or by computing the dual lattice.

EDIT: after thinking about the problem some more, I suspect that it is probably NP-hard for any fixed $q\geq 3$.


Does a pet bring bring back explorer's items that were found?

Question: I'm playing fallout shelter, I accidentally left a dweller exploring the wasteland for to long, and he died. He had a pet, and when my dweller died his pet started coming back to the vault. I was just wondering, (because it's taking ages for the pet to come back), does the pet bring back what the dweller found before he died?
Answer: Yes. The pet will bring back anything equipped to the owner, as well as any items collected in the wasteland. For this reason, I often assign a pet to each dweller going into the wasteland as a gear recovery insurance policy, even if the pet provides no benefit in the wasteland (x2 healing, -crafting cost, etc.).
Comment: +1, this is true. Getting back the equipped items is often so important in survival that I do the same thing. A good gun matters more than a dweller.


From a Roman Catholic or Orthodox perspective, what is the biblical basis for the priesthood?

Question: Roman Catholic and Orthodox Christians believe in a priesthood, i.e. office of the ministers of religion, who have been commissioned ordained with the Holy orders of the Orthodox or Catholic church; but what is the biblical basis for this type of a separate  priesthood from the priesthood of all believers?
Comment: Both as i'm looking at from a Catholic and an Orthodox perspective.
Answer: First, its important to define the ministerial priesthood (as separate from the priesthood of all believers)

The ministerial or hierarchical priesthood of bishops and priests, and the common priesthood of all the faithful participate, "each in its own proper way, in the one priesthood of Christ." While being "ordered one to another," they differ essentially. In what sense? While the common priesthood of the faithful is exercised by the unfolding of baptismal grace --a life of faith, hope, and charity, a life according to the Spirit--, the ministerial priesthood is at the service of the common priesthood. It is directed at the unfolding of the baptismal grace of all Christians. The ministerial priesthood is a means by which Christ unceasingly builds up and leads his Church. For this reason it is transmitted by its own sacrament, the sacrament of Holy Orders.
CCC 1547

There clearly are priests all over the Old Testament, Priests and Levites and Firstborn sons all set aside as holy for one reason or another.
And then you can see all the evidence in the New Testament of the sacramental being conferred from Apostles (of whom the bishops are their successors) to other ministers, who are the priests of Christ's Church.

Luke 22:19
John 20:21-23
Acts 6:5,6
Acts 13:2,3
1 Tim 4:14
1 Tim 5:22
2 Tim 1:6
Titus 1:5

All talk about the laying on of hands and the commissioning of special ministers to do priestly things.
Also, as Orthodox and Catholics recognize each other's priesthood as valid and our New Testament understand of the sacrament and succession is identical, so I don't believe this answer should matter which perspective you're coming from.


HTTP: Generating ETag Header

Question: How do I generate an ETag HTTP header for a resource file?
Answer: As long as it changes whenever the resource representation changes, how you produce it is completely up to you.
You should try to produce it in a way that additionally:

doesn't require you to re-compute it on each conditional GET, and
doesn't change if the resource content hasn't changed

Using hashes of content can cause you to fail at #1 if you don't store the computed hashes along with the files.
Using inode numbers can cause you to fail at #2 if you rearrange your filesystem or you serve content from multiple servers.
One mechanism that can work is to use something entirely content dependent such as a SHA-1 hash or a version string, computed and stored once whenever your resource content changes.
Answer: An etag is an arbitrary string that the server sends to the client that the client will send back to the server the next time the file is requested.
The etag should be computable on the server based on the file.  Sort of like a checksum, but you might not want to checksum every file sending it out.
 server                client

        <------------- request file foo

 file foo etag: "xyz"  -------->

        <------------- request file foo
                       etag: "xyz" (what the server just sent)

 (the etag is the same, so the server can send a 304)

I built up a string in the format "datestamp-file size-file inode number".  So, if a file is changed on the server after it has been served out to the client, the newly regenerated etag won't match if the client re-requests it.
char *mketag(char *s, struct stat *sb)
{
    sprintf(s, "%d-%d-%d", sb->st_mtime, sb->st_size, sb->st_ino);
    return s;
}

Comment: If mtime is the time the file was last changed, then what's the purpose of size and inode?
Comment: In my case, it's because it was a computed path from a CGI program.  You're right that in the case of a direct path that the mtime would probably be sufficient.  Since the cost is mainly going to be in stat(), there's no extra charge for including the inode and size, which might protect from the (quite unlikely, of course) case where a rogue admin might update a file and touch it back to the original mtime.
Comment: @MarkHarrison, why do you need the double quotes around the etag? Is it a mandated part of the syntax?
Answer: From http://developer.yahoo.com/performance/rules.html#etags:

By default, both Apache and IIS embed data in the ETag that dramatically reduces the odds of the validity test succeeding on web sites with multiple servers.
...
If you're not taking advantage of the flexible validation model that ETags provide, it's better to just remove the ETag altogether.
Answer: How to generate the default apache etag in bash
for file in *; do printf "%x-%x-%x\t$file\n" `stat -c%i $file` `stat -c%s $file` $((`stat -c%Y $file`*1000000)) ; done

Even when i was looking for something exactly like the etag (the browser asks for a file only if it has changed on the server), it never worked and i ended using a GET trick (adding a timestamp as a get argument to the js files).
Answer: Ive been using Adler-32 as an html link shortener. Im not sure whether this is a good idea, but so far, I havent noticed any duplicates. It may work as a etag generator. And it should be faster then trying to hash using an encryption scheme like sha, but I havent verified this. The code I use is:
 shortlink = str(hex(zlib.adler32(link)+(2**32-1)/2))[2:-1]

Answer: I would recommend not using them and going for last-modified headers instead.
Askapache has a useful article on this. (as they do pretty much everything it seems!)
http://www.askapache.com/htaccess/apache-speed-etags.html
Comment: Hmm, that's a shame, hope they come back up soon as the site was a goldmine of advice!
Comment: @RichBradshaw just a question, How we can know the last modified timestamp of a resource? Is it totally a manual operation after going through db change history? Or are there any automated ways?
Answer: The code example of Mark Harrison is similar to what used in Apache 2.2. But such algorithm causes problems for load balancing when you have two servers with the same file but the file's inode is different. That's why in Apache 2.4 developers simplified ETag schema and removed the inode part. Also to make ETag shorter usually they encoded in hex:

<inttypes.h>

char *mketag(char *s, struct stat *sb)
{
    sprintf(s, "\"%" PRIx64 "-%" PRIx64 "\"", sb->st_mtime, sb->st_size);
    return s;
}

or for Java
 etag = '"' + Long.toHexString(lastModified) + '-' +
                                Long.toHexString(contentLength) + '"';

for C#
// Generate ETag from file's size and last modification time as unix timestamp in seconds from 1970
public static string MakeEtag(long lastMod, long size)
{
    string etag = '"' + lastMod.ToString("x") + '-' + size.ToString("x") + '"';
    return etag;
}

public static void Main(string[] args)
{
    long lastMod = 1578315296;
    long size = 1047;
    string etag = MakeEtag(lastMod, size);
    Console.WriteLine("ETag: " + etag);
    //=> ETag: "5e132e20-417"
}

The function returns ETag compatible with Nginx. See comparison of ETags form different servers

HTTP: Generating ETag Header


Light Client Bootnode Max Connections Limit

Question: I am trying to understand how the light client reduces dependence on RPC nodes. The typical RPC node uses the <code>--ws-max-connections</code> flag to set a specific limit on the number of web socket connections to that node. If you are using that RPC node as a light client bootnode, light client connections also come in on web socket. So wouldn't this limit on ws connections also limit the number of light clients booting off of that node? Is there a way to make that unlimited? Or will NGINX limit that itself regardless? Is the answer to scaling light client users simply to have lots of light client boot nodes? Which means having lots of RPC nodes?
Answer: Bootnodes don't necessarily need to be rpc nodes. Bootnodes are simply there to have a node join the network.
In addition, light clients will not only establish connections with RPC nodes. That's the cool thing regarding light clients. They join the network like any other node.
Comment: Neat! I understand that bootnodes for light clients must look something like this: using WS (example from Rococo) "/ip4/188.8.131.52/tcp/30334/ws/p2p/12D3KooWF7BUbG5ErMZ47ZdarRwtpZamgcZqxwpnFzkhjc1spHnP" ... in the case of my own boot nodes, would I use whatever the WS port is in place of the 30334 seen here? or would I still use the p2p port in that position? Thanks for your help!
Comment: Last question... do those nodes need to be started in any special way such as with --listen-addr /ip4/0.0.0.0/tcp/30333/ws or something like that?
Comment: I think you can use whatever port you want and check out this [question](https://substrate.stackexchange.com/questions/4818/how-to-launch-a-bootnode-and-necessary-parameters)


Does Onaat Devarim apply to yourself?

Question: If it's an Aveirah to hurt a fellow Jew's feelings, is it likewise an Aveirah to hurt your own feelings? (e.g. via self-deprecation?)
Comment: מועדים לשמחה. Regarding discussion of a potential prohibition against embarrassing oneself, see Bava Kama 91. As far as a general duty to be kind to oneself, M'tzudas David ([Mishlei 11:17](https://he.wikisource.org/wiki/%D7%9E%22%D7%92_%D7%9E%D7%A9%D7%9C%D7%99_%D7%99%D7%90_%D7%99%D7%96)) indicates that showing kindness to oneself is a prerequisite to showing kindness to others, and Rashi based on the same verse implies that showing kindness to oneself is included in the obligation of lovingkindness (Shabbos 127b, s.v. ה"ג הני נמי בהני שייכי).
Answer: Great question!
I think we can answer this question with another question :)
Can one say lashon hara about oneself?  See here and here for opinions on this matter.
So whoever's opinion you follow regarding this issue I believe it would determine if Onaat Devarim applies to oneself, and likewise would determine if it's an aveirah. Just to add that one of the points mentioned by Rav Aryeh Lebowitz was that the Chafetz Chaim implies in two places in his sefer Chaftez Chaim (1:9, 7:6) that there is no lashon hara on oneself. (I bring this up because there is no stronger proof then bringing the answer from the Chafetz Chaim himself, and likewise it wouldn't be an aveirah).

Does Onaat Devarim apply to yourself?


classification with LSTM RNN in tensorflow, ValueError: Shape (1, 10, 5) must have rank 2

Question: I am trying to design a simple lstm in tensorflow. I want to classify a sequence of data into classes from 1 to 10.
I have 10 timestamps and data X. I am only taking one sequence for now, so my batch size = 1.
At every epoch, a new sequence is generated. For example X is a numpy array like this-
X [[ 2.52413028  2.49449348  2.46520466  2.43625973  2.40765466  2.37938545
     2.35144815  2.32383888  2.29655379  2.26958905]]

To make it suitable for lstm input, I first converted in to a tensor and then reshaped it (batch_size, sequence_lenght, input dimension) -
X= np.array([amplitude * np.exp(-t / tau)])
print 'X', X

#Sorting out the input
train_input = X
train_input = tf.convert_to_tensor(train_input)
train_input = tf.reshape(train_input,[1,10,1])
print 'ti', train_input

For output I am generating a one hot encoded label within a class range of 1 to 10.
#------------sorting out the output
train_output= [int(math.ceil(tau/resolution))]
train_output= one_hot(train_output, num_labels=10)
print 'label', train_output

train_output = tf.convert_to_tensor(train_output)

>>label [[ 0.  1.  0.  0.  0.  0.  0.  0.  0.  0.]]

Then I created the placeholders for tensorflow graph, made the lstm cell and gave weights and bias-
data = tf.placeholder(tf.float32, shape= [batch_size,len(t),1])
target = tf.placeholder(tf.float32, shape = [batch_size, num_classes])

cell = tf.nn.rnn_cell.LSTMCell(num_hidden)
output, state = rnn.dynamic_rnn(cell, data, dtype=tf.float32)

weight = tf.Variable(tf.random_normal([batch_size, num_classes, 1])),
bias = tf.Variable(tf.random_normal([num_classes]))

#training
prediction = tf.nn.softmax(tf.matmul(output,weight) + bias)
cross_entropy = -tf.reduce_sum(target * tf.log(prediction))
optimizer = tf.train.AdamOptimizer()
minimize = optimizer.minimize(cross_entropy)

I have written the code this far and got error at the training step. Is it to do with the input shapes? Here is the traceback---
Traceback (most recent call last):
  File "/home/raisa/PycharmProjects/RNN_test1/test3.py", line 66, in <module>
prediction = tf.nn.softmax(tf.matmul(output,weight) + bias)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/math_ops.py", line 1036, in matmul
name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/gen_math_ops.py", line 911, in _mat_mul
transpose_b=transpose_b, name=name)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/op_def_library.py", line 655, in apply_op
op_def=op_def)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 2156, in create_op
set_shapes_for_outputs(ret)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 1612, in set_shapes_for_outputs
shapes = shape_func(op)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/common_shapes.py", line 81, in matmul_shape
a_shape = op.inputs[0].get_shape().with_rank(2)
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_shape.py", line 625, in with_rank
raise ValueError("Shape %s must have rank %d" % (self, rank))
ValueError: Shape (1, 10, 5) must have rank 2

Answer: Looking at your code, your rnn output should have a dimension of batch_size x 1 x num_hidden while your w has dimension batch_size x num_classes x 1 however you want multiplication of those two to be batcH_size x num_classes.
Can you try output = tf.reshape(output, [batch_size, num_hidden]) and weight = tf.Variable(tf.random_normal([num_hidden, num_classes])) and let me know how that goes?
Comment: thanks for you response. I am still not quite sure what the shape of the RNN output should be. I tried reshaping it to [batch_size, num_hidden] and weights to be [num_hidden, num_classes as you suggested but I am getting an error saying-
Comment: ` ValueError: Dimensions 10 and 5 are not compatible`
Comment: right now the RNN output has a shape of

`Tensor("Reshape_1:0", shape=(5, 10), dtype=float32)`

But weight matrix has shape of

`Tensor("Shape:0", shape=(2,), dtype=int32)`
Comment: So weight matrix has that shape when you initialize it as `eight = tf.Variable(tf.random_normal([num_hidden, num_classes]))`?
Answer: If you are using TF >= 1.0, you can take advantage of the tf.contrib.rnn library and the OutputProjectionWrapper to add a fully connected layer to the output of your RNN. Something like:
# Network definition.
cell = tf.contrib.rnn.LSTMCell(num_hidden)
cell = tf.contrib.rnn.OutputProjectionWrapper(cell, num_classes)  # adds an output FC layer for you
output, state = tf.nn.dynamic_rnn(cell, data, dtype=tf.float32)

# Training.
cross_entropy = tf.nn.softmax_cross_entropy_with_logits(logits=output, labels=targets)
cross_entropy = tf.reduce_sum(cross_entropy)
optimizer = tf.train.AdamOptimizer()
minimize = optimizer.minimize(cross_entropy)

Note I'm using softmax_cross_entropy_with_logits instead of using your prediction op and calculating cross entropy manually. It is supposed to be more efficient and robust.
The OutputProjectionWrapper basically does the same thing, but it might help alleviate some headaches.


How do I animate low poly water?

Question:
So I'm trying to make a low poly well and I wanted to make the water first. I don't want to have just a blue plane, I want it to actually move like water. How do I get some waves on it? It should have small waves since it's just a well not an ocean.
Comment: Try adding the ocean modifier. I don't have a computer in front of me right now, but if you don't have an answer before I get back I'll clarify it a bit more.
Comment: The ocean doesn't move and is huge
Comment: @Rex to make ocean move, you have to keyframe the time parameter, and then bake the ocean. But it's not thought for low poly
Answer: Depending on what you wish, one basic way could be using a wave modifier with a texture, maybe?

edit: to make only top vertices assign them to a vertex group, and set that "vertex group" name in the modifier:
Comment: How do I make only the top move? the water doesn't stay in the pond, it "Jumps" out
Comment: @Rex assign all vertices intended for moving (only those of the top face I presume) to a vertex group, then select the vertex group name in the wave modifier. I'll add an example gif.

How do I animate low poly water?


Why do MoM capacitors need bulk connection?

Question: In recent am doing layout of crtmom in 180nm technology node. I found the bulk connection to MOM capacitor. I dont understand the why MOM cap need bulk connection or bulk terminal in design. usually MOM cap are mental on metal. so, why this bulk terminal is given??
Comment: can you add a schematic drawing of what you consider a metal-on-metal capacitor design? I'd assume that one of your electrodes actually **is** bulk.
Answer: The third terminal is required because a MOM capacitor is really two capacitors — the desired capacitance between the two metal terminals, and the parasitic capacitance between the bottom metal and the substrate. The latter is unavoidable, and it is shown explicitly in the schematic so that designers don't forget about it and its effects on the circuit.


about the number of recommendation letters

Question: I submitted the required documents in order to apply for a postdoc position in Germany. In the application form they had asked for at least two referee's contact details. I put the details of two referees in the application. One of my referees has still not uploaded the letter in spite of my request. It seems that he is so busy. My mistake was that I just provided two referee's details. Now I just want to know whether my application will be ignored or if they will ask me to provide another referee's details. Is there any chance that they consider other materials?
Comment: Hi user40491. Did you apply to some structured postdoc program or the like? And...do we get from your statement that *one* of your referees has not yet *uploaded* their letter of reference that you know that the referees have actually been asked for a reference? The latter is certainly not universal for postdoc positions in Germany, hence my question.
Comment: Actually, I do not know what exactly you mean by "structured", but it was an open annual call from an institute. My referee has recieved an automatic email from institute for a letter.
Answer: Clearly, the absence of reference letters will not help your application. However, in my experience the absence of reference letters is generally not reason to not have a look at the rest of your application. If the rest of your application is sufficiently strong, some additional prodding of your referee may occur.
If your application is weak without reference letters than your chances would have been slim any way.


Able to update an API documentation automatically

Question: I'm working on a web site which provides API for external developers.
Whenever the API is updated (i.e. modified parameters, new end points, etc), I have to update the documentation manually.
So I'm looking at how this process can be be done automatically. Here is what I hope to acheive: once my source code is updated and committed to my source control, some sort of an API Registry will be updated. So my documentation can be an app which refers to the registry and shows the viewers with the latest API.
My site is based on Ruby on Rails.
Answer: RDoc is automatically generated based on your source code, and it comes default with Rails. Your code needs to be well-documented, but if it is, you can just run
bundle exec rake doc:app

and your app will generate documentation accessible from doc/app/index.html. I would look at that and see if such documentation fits your needs. Links in the "Class and Module Index" sidebar contain lists of all of your methods with expandable views of the source code for them.
I use a custom rake task that places all of that documentation in the Rails public folder for access directly from my website and allows me to add more than one custom page. I imagine it wouldn't be that hard for you to do something similar that only parsed your API files.
Links:
RDoc Syntax Help
Project on Github


trying to make a wavy edge

Question: I'm a beginner in blender and was looking around for learning the basics. I found some videos on youtube (https://www.youtube.com/watch?v=f5Gb1VK98Wc) (the last 10 minutes have what I'm trying to do) and at the end of one a donut is made but the icing is supposed to be wavy on the edge. so when I select the bottom layers and put the setting on random and pull down there are no waves being made. rather the entier layer is stretched down and the top half gets wavy. then when I hide the top half and only use the bottom row of vertices they still just get stretched downwards. any and all help is greatly appreciated!
Comment: what happens is not very clear, you should put some screenshots. Perhaps the problem is the influence radius of the Proportional Editing mode, i.e. the circle that appears when you enable the Proportional Editing, either clicking on the circle button on the horizontal menu bar on the bottom of the 3D view, or pressing O or alt O. Sometimes the influence radius is too large so you can't even see it. Anyway maybe the problem is that radius. Check out a tutorial about Proportional Editing.
Comment: Hello!  When asking questions, it is best to inline your concerns as pictures and well worded questions. Referring to a long youtube video will not get you much engagement, or good answers.

Can you please edit your question with pictures of what you are trying to do along with what is happening instead?
Answer: Two possible scenarios:
Did you select every single vertices on the bottom ring? If so, stop. Just select one vertex when using the proportional editing tool for this. Use the scroll wheel to increase the fall off of the proportional editing tool.
Do you have the subsurface modifier enabled? If not, the random function will make it jagged.

trying to make a wavy edge


Reference for explicit calculation of blowups (of ideals) and strict transforms

Question: Can one suggest some references where explicit calculations for blow up technique(along an ideal) and strict transformation is done in different examples?
Comment: I don't know what tag this should be given, but I don't think it's "differential-geometry".  And please don't SHOUT.  I can hear you perfectly well from here.
Answer: Both Hartshorne and Fulton's Intersection theory contain many examples. Look for the terms "Blow up" and "Monoidal transform". There are also some "hands on" examples in Dolgachev's classical algebraic geometry online book . The standard example is describing a cubic surface as a plane with 6 blown up points; see Hartshorne V.4
Answer: I think, you'd like to see explicit equations and if possible, a singularity completely solved by blowups. One can take a look at such thinks in Lectures on resolution of singularities by Janos Kollar (http://press.princeton.edu/titles/8449.html). The book starts with more than ten different methods of how to solve singularities on curves and then continues on resolution of singularities on surfaces. There you will see specific examples and explicit equations.
Answer: I suggest Beauville's Complex Algebraic Surfaces.
Answer: There are several explicit calculations given in Chapter IV.2 of Eisenbud and Harris' Geometry of Schemes
Answer: You can try out Hauser's seven short stories (with lots of examples and exercises!) http://homepage.univie.ac.at/herwig.hauser/Publications/seven%20short%20stories%20on%20blowups%20and%20resolution/seven%20short%20stories%20on%20blowups%20and%20resolution.pdf
some more examples are in
http://homepage.univie.ac.at/herwig.hauser/Publications/seventeen-obstacles-97.pdf


In Elemenary os, grub wont load anything but itself

Question: I am running Elementary OS Freya as the only currently installed OS on my laptop, I have tried to install various operating system via USB and UNetbootin, however my grub for some reason just will not see them, My computer sees them because when I go into boot options, there is my USB drive, anyway im just confused, It worked perfectly on Ubuntu. Any help would be appreciated inexplicably!
Answer: If you're trying to install a new operating system; elementaryOS's Grub shouldn't be showing up. You should be booting right to the GRUB/Bootloader/EFI Stub on the USB Device.
You should insert the USB and run it from your BIOS/EFI Boot Menu. If its loading elementaryOS then your computer isn't seeing the boot record on the USB. If it loads the USB but fails; then the USB was made incorrectly.
UNetBootin is known with some OS's and Distros to fail when making USB. You should try using DD to copy the ISO, or use SuseImageWrite to write to USB.


Active directory user sessions are not appearing under the "Collections/Connections" in Remote Desktop Services

Question: I am currently using Windows Server 2012 r2 and I am trying to setup RDP shadow services on my services to be able to remotely connect to current user sessions who are on the domain, I set up all the correct GPO and permissions for remote desktop however the the user session never appear on under collections when I am sure there are users connected to the domain. The only Users that show users who are locally logged in to the server. Thanks for any help.
Answer: Sorry, but it doesn't work that way.  What you seem to want, doesn't actually exist as a Windows feature.
You can only shadow sessions on RDS servers.  You can't shadow sessions on random Windows workstations simply because they are connected to the domain.
With group and pro/enterprise licenes on all your windows desktops, you can enable RDP access, but you cannot shadow an existing session.  You can setup remote assistance through group policy, which is somewhat similar to a shadow connection.


Is it possible to disable check in/out within a JSON site template

Question: So I am using a JSON template for sharepoint online, is it possible to disable check in/out on all document libraries via the pre-built template? Or would I have script this some other way?
Answer: Site Designs do not currently support enabling or disabling check in/out on lists/document libraries. List creation is fairly limited in terms of settings and is mostly intended to create lists with columns with a few other fancy items like formatting.
Similar to your previous question, I recommend doing this with PnP PowerShell. You could always call that PowerShell in an Azure Function using Site Design but there are added complications and potential costs going that route.
Here is the PnP PowerShell command to disable check in/out on a library. Doing this for all lists/libraries should be relatively straightforward by using the Get-PnPList and using a foreach on the results.
Set-PnPList -Identity "My Library" -ForceCheckout $false

Comment: Hey do you or anyone know know have a tutorial on calling the azure functions? I am running into issues with the Microsoft one.


Will P2TR make P2WSH obsolete?

Question: Assuming users have upgraded their wallets to handle P2TR outputs and trust the validation rules of P2TR, would there be any advantage of using P2WSH over P2TR?
Answer: As far as I can tell, P2TR is better than P2WSH in almost every way. I cannot think of a case in which it would be a significant advantage to use P2WSH over P2TR, except that P2WSH is already established.
Privacy
P2TR outputs will stand out at first since there will be few of them. In the long term, the anonymity set of P2TR is likely to be larger since both single-sig and multisig will look the same until spent.
Engineering effort to adopt
Sending to P2TR addresses will require wallets to implement support for Bech32m. Wallets that want to receive and spend P2TR outputs will need to implement the Schnorr signing algorithm, and reengineer any OP_CHECKMULTISIG based schemas with the op-codes available in Tapscript.
Comment: "both single-sig and multisig will look the same until spent" - don't you mean "when spent"?
Comment: @VojtěchStrnad: If you are thinking that the multiparty payment is implemented as an aggregated key, yes, either would be spent as a keypath-spend, but I was thinking here that the multisig would mean that the spenders use the scriptpath.
Comment: Yes, keypath spends are an obvious method of increasing privacy of multisig transactions. I'm not really sure what privacy benefits would come from revealing the multisig script only after the spend – I see privacy as not having to reveal something, ever.

Will P2TR make P2WSH obsolete?


Equivalent for Windows + R for Android

Question: It's often difficult to locate the app I am looking for on my Android phone. Is there a way/app which behaves like Windows + R on a PC, with autocomplete, so that I can quickly launch the app I want to use, rather than endless swiping?
Answer: Most custom and stock launchers for Android support an "app search" feature. I know that ADW.Launcher, Nova Launcher, Apex Launcher, Google Now Launcher and Google Now itself has this feature. I'll tell you how to access this feature with Google Now (Launcher) and Nova Launcher, because I have those on hand to confirm this procedure.
For Google Now (or the stock Search app):
Enter the app's name into the home screen search box/widget. It should an option for the app, tapping on which should launch it.
If your Google Now has "OK Google" voice commands active and properly configured, saying OK Google, launch <app's name as shown in the launcher> or OK Google, open <app's name as shown in the launcher> to the device should also work from the home screen.
For Nova Launcher:
On the App Drawer page, swipe down from the top, to get a magnifying glass icon on small white circle in the top-center of the page. Pull it down further to get the search bar. Entering the app's name in the search bar should show its icon below the bar, and tapping on that icon will launch the app.
This applies to Nova Launcher version 4 and up. Apex Launcher is very similar to Nova, but I'm not sure this works there too. The latest version of Nova, 4.2.0, also has the "Recently used apps" feature like Google Now Launcher below.
For Google Now Launcher:
Same as Google Now above, but it also has a separate search bar on its app drawer page. It also shows your most recently used apps at the top of the app drawer's first page.
This should get you started. Welcome to the mini-universe of Android's custom launchers!
Answer:
Long press on your home screen. (the screen that comes on when you start your phone) You should get a few options. (widgets, wallpapers etc)
Click on widgets.
Scroll until you find Google Search or Google App. When you find either of these, long press on it, and you will be able to drag and drop a search bar onto your home screen.
You can now touch the search bar on your home screen and start typing the app's name. You can then launch the app from the icons displayed below the search bar.

If this does not work, your Google app might be outdated. You can update it here and try again.

Equivalent for Windows + R for Android


Best way to transform large groups of web pages?

Question: What is the best way to transform large bunches of very similar web pages into a newer css-based layout programatically?
I am changing all the contents of an old website into a new css-based layout.  Many of the pages are very similar, and I want to be able to automate the process.
What I am currently thinking of doing is to read the pages in using HtmlAgilityPack, and make a method for each group of similar pages that will create the output text.
What do you think is the best way to do this?  The pages mostly differ by things like which .jpg file is used for the image, or how many groups of heading-image-text there are on that particular page
EDIT: I cannot use any other file type than .html, as that is all I am authorized to do.   Any suggestions?
EDIT2: Ideally, I would also be able to make this be generic enough that I could use it for many different groups of html files by just switching around a few moving parts.
Answer: Sounds like you should be re-using code.  If you are using strictly HTML, I would consider doing PHP or ASP based webpages instead.  That way, you can create Header/Content/Footer/Nav sections, and re-use the same code across all your webpages.
This would make it a lot more sustainable, as you would only need to edit one file in the future.
Comment: These things aren't in my control.  The site already is up, and has tons of traffic, so changing the file types is not feasible.  Plus I don't have authority to do that, even if I wanted to.  Any suggestions?
Comment: So, you are tasked with converting old HTML Table based websites into CSS based sites.  In order to do this, you are going to have to alter the HTML files.  If your planning on changing the design without touching the files, then you will need to look into HTML injection.
Answer: What about using  Server Side Includes (SSI) <#!--#INCLUDE -->
This was you can create different parts of your webpage in different files and just "include" them in any other page you want.
header.html
body.html
footer.html
<code><html>
<!--#INCLUDE file="header.html" -->
<!--#INCLUDE file="body.html" -->
<!--#INCLUDE file="footer.html" -->
</html>
</code>
More info here


RLC Bandpass Filter network

Question: Can anybody tell me what the "s" in this equation is? I am looking for the transfer function of this circuit
Comment: Have you learned the Laplace transform? 's' is the usual variable in Laplace transform space. Possibly you could think of it as a complex frequency.
Answer: The meaning: with $\omega_0=2\pi f_0$ write your equation as $(s^2+2\zeta\omega_0s +\omega_o^2)v_o=(2\zeta\omega_0 s)v_i$ and then substitute $s=\frac{d}{dt}$ that is
$$\frac{d^2 v_o}{dt^2} +2\zeta\omega_0 \frac{dv_o}{dt} +\omega_o^2v_o = 2\zeta\omega_0 \frac{dv_i}{dt}.$$ The "transfer function" is by definition the rational function $$H(s) = \frac{2\zeta\omega_0 s}{s^2+2\zeta\omega_0s +\omega_o^2}$$ as a function of the complex variable $s=\sigma+\mathfrak{j}\omega$
Comment: Thank you for the answer! What is σ in this case? Given a real frequency, can we just set it to 0 and insert the frequency as ω=2πf?
Comment: $\Re[s]=\sigma, \Im[s]=\omega$; yes, you can do that and it will give you $H(\mathfrak{j} \omega)$

RLC Bandpass Filter network


polynomial least squares derivation: normal equations

Question: Suppose we have the problem
$$
\min_{q \in \mathcal{P}_n} \|f - q\|_{L^2(w)}^2
$$
where $\mathcal{P}_n$ is the space of polynomials of degree $n$, $w$ is some weight function (measure with continuous density), and $\|g\|_{L^2(w)}^2 = \int_a^b (g(x))^2 w(dx)$. I want to clarify the connection between this case and its finite dimensional analog
$$
\min_{\beta \in \mathbb{R}^{n}} \|y - X\beta|_2^2.
$$
In finite dimensions, we set the gradient equal to zero and recover the normal equations
$$
2X^T X \beta - 2X^T \beta = 0.
$$
How can I recover the normal equations in the infinite dimensional case above? I'm at
\begin{align}
\min_{q \in \mathcal{P}_n} \|f - q\|_{L^2(w)}^2 &= \min_{q \in \mathcal{P}_n} \int_a^b [f(x)^2 - 2q(x)f(x) + q(x)^2] w(dx) \\
&= \min_{q \in \mathcal{P}_n} \int_a^b [- 2q(x)f(x) + q(x)^2] w(dx)
\end{align}
but I don't know how to differentiate wrt $q(x)$ (and am not sure that this is even the right step).
Answer: The Normal Equations actually hold in any Hilbert space as long as the subspace you are estimating in is of finite (co-)dimension and here $V=\mathcal P_n$ has $\dim n+1$.
To see this, observe by the Projection Theorem that the optimal vector $q=\sum a_j p_j, p_j \in V$ satisfies
\begin{align*}
\left\langle x -\sum a_j p_j | p_i \right\rangle=0.
\end{align*}
Use this to derive expressions for the $a_j$ and you end up with an infinite-dimensional generalization of the normal equations (i.e. your result will reduce to the matrix form if your Hilbert space itself is finite-dimensional).
Luenberger's classic optimization by vector space methods has a beautiful exposition of this topic in chapter 3, see also connections to projection operators and pseudoinverses.
Edit: in your case
\begin{align*}
\langle x| y\rangle = \int xy d\mu
\end{align*}
and $w(dx)=d\mu$.
Edit2: Your attempt to differentiate wrt $q$ is essentially the same as in the calculus of variations, you could probably get somewhere with Euler-Lagrange as well if you still want to try that route. This connects to the idea that there often are (at least) two ways to solve an (easy) optimization problem: the direct route via differential techniques, here Euler-Lagrange, or the geometric route, here the projection theorem, using orthogonality.


In a AWD Tesla Model 3, why is the front and back motor different?

Question: In a AWD Tesla Model 3, why is the front motor (OEM 1120960-00-E) different from the one in the back (OEM 1120980)? Why not just use the same one for both front and back? I'm sure that there was a reason for this and I would like to know what insight it brings forth... It's for an EV project that I am working on.
Comment: Space considerations as well
Comment: You don't need as much power up front, since weight transfer under acceleration results in much more traction at the rear wheels - allowing you to put much more power down there rather than at the front. From there, it's just easier packaging and (likely) lower cost.
Answer: As SolarMike suggested, available volume is part of the deal.
The second motor is actually idle most of the time, being called upon for dramatic acceleration or when wheel slippage is detected.  As such, it doesn't need to send as much power (or torque) as the main motor does.
BTW, Tesla is planning, for either the cybertruck or the roadster or both, to produce models with a single front motor but separate motors for each rear wheel (tons of torque!), and it's probable that heavy-duty EV trucks will be built with a motor for each wheel. This gets rid of mechanical differentials as a side benefit.


Looking to take a fixed screenshot at intervals while changing the page in safari for a book

Question: I am trying to screenshot all the pages of a textbook i have online. I am opening the book in safari, all i want is to automate in some way the ability to take a fixed location screenshot at intervals save it to downloads or desktop(wherever) and then have a my cursor click the next page button and retake a screenshot a multitude of times would this be possible in anyway?
Comment: Without a **URL** to the target web page, it's not that easy to tell you how to handle that part and without it I would not even start to devise a solution.  Have to ascertain the **Safari** side of the equation before integrating it into an overall solution.  Also, what version of **macOS** are you running?
Comment: yea i understand.from what I see changing the page within the book the URL is not changing. I am using Big sur
Comment: RE: "from what I see changing the page within the book the URL is not changing" --  That may not matter at all, however, without looking at it I cannot say whether or not it can easily be automated. What's the **URL**?
Answer: You can do this with the new screenshot key command -  Cmd ⌘   Shift ⇧   5  set to 'Capture Selected Portion'.

Once set, it will capture nominally to Desktop, each titled ScreenShot date/time [eg ScreenShot 2021-03-15 at 4.42.15 pm, so they will file alphabetically. You can capture using Return/Enter or by clicking the Capture button. The selection area is remembered between snaps.
You could potentially automate this, but it's a swift process, so I doubt you'd really need to.
If you need to change the file save location, see How do I change the location of macOS screen captures?
Comment: I believe the OP is looking for a totally automated solution, and not to do it manually.
Comment: I think so too, but fumbling through the html is going to take more faffing than just sitting & repeating this action. Click next page, keystroke, keystroke, ad nauseam:) It is the kind of task QuicKeys used to be perfect for. Automator is nowhere near as good.[imo]
Comment: I done this before, and if the **UI elements** of the target web page are JavaScript'able then it actually is quite easy and using a command line utility to do the screen shots is the way to go. This can all be done in a **Run AppleScript** _action_ in an **Automator** _workflow_ of just an **AppleScript** _script_.  Need the **URL** to get the necessary Information to implement the **JavaScript** portion.
Comment: ah thank you I would have hopped for a more automated situation since its like 2000 pages but this is better than nothing.
Comment: @Zedris, RE: "ah thank you I would have hopped for a more automated situation since its like 2000 pages but this is better than nothing."  --   You are giving up too quickly! If I can look at the target web page I most likely can provide an automated solution.
Answer: Yes it is feaseble, you can do it using automator to:
[Repeat X times]
1 - Screenshot the whole screen.
2 - Activate your favorite image editor (ie Photoshop)
3 - Paste
4 - Activate Safari back
5 - Click
[End Repeat]
Later you will crop the image to the portion of the screen you want, and export each layer as a single page. Photoshop has a built in script for doing that.
Now the there are some issues, like waiting for the page to load, and cliking the right place. You can instruct automator to wait a few seconds, if you trust your connection and the textbook server - or else you might end up with a very messi situation. The click is also tricky, you can use third party apps like "cliclick" to set an absolute point like (1200x,800y), providing the "next page" button is always on the same position. Also, you may want to restrict it to, say 50 loops, because the images will eat a lot of memory if you do 2000 pages in a row, and the system can crash.
I would choose to avoid the click and loop. You can do everything else using a short cut. I know, it is tiresome, 2000 times the shortcut + a click, but if it is not something you do on a daily basis, I belive it worth the trouble.
But since you are pirating stuff, don't you think it is easyer to look it up on piratebay or something? Like others have said before, show us the URL so we can provide better answers.


Ola Hallengren for Managed instance

Question:
How can we configure Ola Hallengren's solution on a managed instance? (We want output file for each run, storing it is an issue)
If we want backup retention longer than 35 days for the database in managed instance, what are the possibilities? (copy_only backups to blob storage?)
Answer: Ola Hallengren's maintenance solution has several parts:
Database backups - you don't usually want to use these in Managed Instances because you can't restore the backups to another location, like on-premises. The only use for database backups is to restore them into another managed instance - like if you're doing it for disaster recovery, backing them up to blob storage, and then syncing that blob to a different Azure account (in case you're worried about a malicious actor closing your Azure account, and leaving you with no backups.) If you do want to use backups for that purpose, you can use the @Url parameter for the DatabaseBackup proc, and back up to a URL.
Integrity checks - these work the same way they work for normal SQL Server - no change for Ola's scripts here.
Index and statistics maintenance - these also work the same way they'd work on-premises, but be aware that with the limited transaction log throughput of Azure SQL DB and its relatives, you probably want to use the @Delay parameter when you rebuild/reorg indexes so that you slow down the amount of transaction log throughput you're generating, and leave some DTUs for user transactions.
Parameters common to all procs - don't try to log them to the file system, because you simply don't have access to the file system.
Comment: Right, the Index and integrity jobs are same as in On premises. Was more looking for a solution to have longer backup retention (6 months as current policy) and keep the output file to some file location which seems not to be happening. Thanks for your inputs..
Comment: MS just released the capabilities of doing custom backup retention pr. database. You can go all the way up to 35 days now. Longer retention, you have to build something yourself i guess.

Ola Hallengren for Managed instance


Checking the registration accuracy of already-orthorectified images

Question: I acquired several Landsat 5-8 images corrected at Level 1T. I also have aerial ortophotos of the same area. From a visual assessment the co-registration between the images seems good, but I need to quantify the registration accuracy. My approach is to simply find some Check Points and calculate the average RMSE, but which transformation type should I choose to compute the residuals? In the Landsat product specifications and user handbooks I can't seem to find specific info about what they use.
(I am using QGis 2.10)
Answer: The standard for computing the registration accuracy is to consider the euclidian distance between homologous check points to estimate your RMSE (they are the residuals of the underlying model used to geometrically correct your image).
Those check points should be selected on location that are stable in time (e.g. avoid the boundaries of temporary water bodies) and (except for true ortho from high precision DSM) where there is no abrupt elevation difference with the neighbours.
As mentionned in the comments, the final RMSE is independent from the underlying model used to create the orthorectified image.
Comment: Thank you, but the point is that I don't know which is the underlying model used to correct the image because it was already corrected. I want to do my own independent check of the registration accuracy to see how good the registration is with images acquired from other sources, but as far as I know the Landsat metadata file only indicates the number of GCP used and the combined RMSE, not the transformation model used. So obviously when I create new check points between my two images, the residuals and consequently the mean RMSE have different values depending on the transformation I choose.
Comment: If you want the relative co-registration, you should not use a transformation. If you want to know more about Landsat processing, Landsat L1T is terrain corrected (using DEM, sensor model and GCP's from the GLS). see http://gis.stackexchange.com/questions/62961/is-terrain-and-topographic-correction-the-same-for-landsat8 for more details.


Why Zend Framework 2.0 is less than 1.2?

Question: I downloaded the new version of Zend Framework 2.0 and noticed that it has less features than the version 1.2, both in framework folder and externals.
What is the reason? Does Zend have a new policy to you include some features as extensions or this is related to become more lightweight?
Answer: Zend_Service(S) now have each one his own repository with his own live cycle, by this way that services can be adapted soon to the vendor API changes.
Zend_Date, Zend_Currency, ... and other locale components have been replaced by PHP 5.3 API (DateTime, NumberFormat, etc) there is a new i18N component for translates.
Other components was not in use, and others are not enough stable for to go with the main distro.
Here you have the full list of repositories for the main distro and other components https://github.com/zendframework/
Answer: In zf2.0 only standard components are included, the components that are essential for the application development. The remaining components can be included on-demand.
You can read more about this in http://framework.zend.com/downloads/
The reasons for making this such lightweight is explained by  Matthew Weier O'Phinney http://framework.zend.com/wiki/display/ZFDEV2/Zend+Framework+2.0+Requirements


Resistor in RC snubber

Question: What is the purpose of resistor to suppress EMI? Couldn't I just use a suppression capacitor alone between the coil of the relay or contactor? I have tried to use capacitor alone and it did reduce EMI in my project, but I'm just curious of the effect of adding resistor in series with it.
Comment: The high peak currents are not limited without the resistor present. This puts stress on the capacitor. The resistor limits the peak of the current.
Comment: In most snubber circuits the capacitor value is less critical than the resistor value.  The resistor is chosen to damp the energy from the inductance of your coil ringing with whatever parasitic capacitance it can find.  The choice of capacitor is then large enough that it forms a low impedance in comparison to the snubber resistor at the ringing frequency but you also want to keep it small to minimise the power dissipation. A reasonable rule of thumb is to make the RC corner frequency about 1 fifth of the ring you are trying to damp.
Answer: Snubbers are energy-absorbing circuits used to suppress the voltage spikes caused by the circuit's inductance when a switch,electrical or mechanical, opens. and may also cause false triggering of the device (relay or thyristor)
The snubber capacitance has to meet two requirements.
 First, the energy stored in the snubber capacitor
must be greater than the energy in the circuit's inductance.
Secondly, the time constant of the snubber circuit should be small compared to the shortest on time
expected, usually 10% of the on time.
consider the case When  the  transistor  switch  opens,  the  snubber
capacitor looks like a short to the voltage change,
and only the snubber resistor is in the circuit. Choose a  resistor  value  no  larger  than  the  characteristic impedance of the circuit so that the inductive current to be snubbed can continue unchanged without a voltage transient when the switch opens.
and R is also helps in power dissipation when the switch is open as C alone cannot do it.
hope this helps
Comment: wouldn't the coil helps dissipate the capacitor too?
Answer: Snubber circuit prevents arcing in relays or false triggering in SCRs, it can reduce EMI as well but this isn't the primary function of snubber. R is for damping the transients, a capacitor only can lead to ringing (oscilation bursts) thus increasing the EMI.
In AC circuit a capacitor also acts as a short, so adding R is the only way to minimize leaking current.
Comment: what causes oscillation bursts? is it when the capacitor is overcharged? so does it mean that instead of reducing EMI, it will actually make it worse?
Comment: You didn't mention what kind of switching you have. But speaking for common circuits, the load you want to turn off always has some inductance, even a wire has, ok,..then when you try to open the conntact the inductance in the circuit will induce a voltage spike, this spike will be absorbed by capacitor, then the capacitor will return back the charge into a load (inductance) and so on...until the energy is dissipated in the resitance of the circuit - LCR damped oscilator. If the resitance is enough big, then the sytem is damped enough to prevent oscillations - overdamped system.
Comment: oh i see now, so resistor helps to reduce the oscillation in the circuit. do I need high resistance or low resistance?. btw, im controling 2-module relay with arduino and the relay controls contactor which is controlling the air conditioning unit. I also wonder if I need to add snubber in parallel with the Air con.
Comment: It's not that critical when there is such small load. If I understand you have arduino that conrols a small DC relay, this circuit already has the freewheeling diode in parallel with relay or something...then this small DC relay switches on/off a larger AC relay (contactor) that turns on/ff AC mains voltage to conditioner. Well you don't have to worry about. If you rally like to add some snubber circuit, then the easisest is to add a varistor MOV in parallel to the coil of contactor.

Resistor in RC snubber


jqGrid - displaying grid in a dialog, popup or new page

Question: Using jqGrid 4.5.2 & jQuery 1.9.1.  Querying a SQL table to return data to display results in a jqGrid.  I am not doing any editing of the data.
The jqGrid uses a custom formatter to display the results from the query.  Within the custom formatter, based on data returned (columns are hidden in the jqGrid), in a column called Action one of 3 things are shown: (1) a dropdown box, (2) a submit button, or (3) an informational message.  Additionally, rowattr is used to format (font, color, size, style) information in that row (also based on the data returned).  When a dropdown selection is made, that row then gets updated with the dropdown value & date/time.  Likewise, when the submit button is clicked, it also updates the table with a date/time.
The above runs on a setInterval every 60 seconds.  This grid functions as it is supposed to.
In addition to how the grid above works, I also need to conditionally build & launch another grid.  I would take the very same grid settings as used above, and the jqGrid would display in a dialog, popup or a new page.  I would query another table but return the same fields as I currently do.  This grid would also utilize the custom formatter, rowattr and other code (stopping & re-starting the interval, catching dropdown box changes & submit button clicks) as is done in the working jqGrid.  The main difference is that I would make an AJAX call to get a rowcount first, but only create the grid in the dialog/popup/new page if there was any data. The dropdown & submit button functionality for this grid would be the same as it is for the other grid (updates with a date/time and/or a dropdown selection).
I have been looking at building the dialog/popup grid inside a DIV on the page that currently has the functioning grid above on it.

The existing, functioning grid is in the body of the HTML immediately above the DIV shown above:

My questions:
Can a jqGrid be built in a modal dialog box?  If not, how do you make it open in a popup or in a new page?  Most questions & answers I see deal with editing the data, but I am not doing that.
Can a jqGrid be conditionally built (are there options that control it)?  I want to avoid having to make two trips if possible.
I would appreciate any guidance or input as to if & how best to do this.
Thanks!
Answer: Jquery code is not running in the modal dialog, so the caller can be run on, with open:
function initGrid() {
    jQuery("#popGrid").jqGrid({
    url:'...',
    colNames:[...],
    colModel:[...],
    rowNum:20,
    pager: '#popPager',
    ...
}

var dialog = $('#popDailog');
dialog.dialog({
    bgiframe: true,
    modal: true,
    width: 700,
    buttons: {...},
    (...)
    open: function(event, ui) { initGrid(); }
});


Draw Sine Wave in WPF

Question: This one seems quite stupid, but I'm struglling from an hour to do this,
How to Draw the Sine Wave in WPF??
Thanks
Answer: Draw lines between points which you calculate with Math.Sin function. You'll have to decide how many points per cycle to use, a compromise between drawing speed and accuracy. Presumably you'll also need to scale the amplitude to suit the area on the screen, since Sin function will return a value between +1 and -1.
Answer: How are you doing your "Drawing". WPF doesn't have OnPaint events like Winforms so that might prove a little tricky. The way to do this in WinForms would have been to use the Graphics.DrawBezier method
e.Graphics.DrawBezier(new Pen(new SolidBrush(Color.Red)),
                          new Point(0, 100),
                          new Point(50, 0),
                          new Point(50, 200),
                          new Point(100, 100));

Maybe that's helpful, but I'm not even sure how to draw directly to the WPF Canvas.
A quick glance as MSDN shows that it has a BezierSegment control that maybe of use to you.
Answer: If  want curves between your points you can use a PolyBezier to draw your Sine Wave with a PointCollection calculated from the Math.Sin method. Alternitavely you could create a lot of BezierSegments which flow on from each other. Finally just add your PolyBezier or BezierSegments to your form with drawingarea.Children.Add(curve) where drawing area is the grid or canvas you're drawing to.

Draw Sine Wave in WPF


Is it appropriate to contact potential employer requesting a visit because you are in the area?

Question: I had a request for an in person interview but was unable to fly out there because of time restrictions and ended up having a skype interview. After ten days from the phone interview, I am visiting the place where the company is. Could I still write to them and ask them if I can visit? What would be the best way to frame it in an email?
Answer: It really depends on what you're trying to accomplish. If you knew that a second, in-person interview was coming up at some other time, and was thinking of asking them to reschedule to this date that might have been a good idea.
However you've already been through the interview and have nothing left to discuss with them until they get back to you.
At most, what you might do is phrase an e-mail along these lines to the HR manager:

Dear X,  It was a great pleasure talking to you on Skype during our previous interview. I wanted to let you know that I am going to be in town on April Y, and that if you required any further clarification regarding my experience it would be my pleasure to meet with you at that time and discuss my qualifications.

This way you're not trying to force your way in, you're simply informing them that you're available.
Answer: If you had separate plans to be in the area while scheduling the interview, it would have been ideal to bring it up at that time.  However, I don't see any reason that you can't bring it up now.  I'd simply phrase it as, it turns out you'll be in the area for separate reasons, and you'd like to take the opportunity to have a tour of their office, if they might possibly have time to accommodate you.


Uneducated and simple-minded character creates device to draw gold from sea water and a force field that wards off enemy missiles

Question: The character in this book is a simple-minded savant who has a knack for making things as he needs them. In the course of the book, he invents a device that draws gold from sea water (or any substance the device samples). By the end of the book, a nuclear war begins, and he invents a device that creates a force field that repels the enemy's missiles and sends them back to their starting point.
Comment: I have found mentions of this being a book republished by Avalon Press around 1960-1970 (or maybe the 1950s) involving an FBI agent assigned to a hillbilly who keeps inventing these things to solve mundane problems like his boat leaking.
Comment: Hi, welcome to SF&F.  When did you read this?  Do you recall the cover art or any description of the characters or setting?
Comment: That sounds vaguely familiar. *Quayle's Invention* and *The Chariot of the Sun* both involve the side effects of a process to pull gold from sea water, but no nuclear missiles that I can find.
Comment: https://forums.spacebattles.com/threads/an-entry-with-a-bang-a-bt-roundrobin-iii.162144/post-4941605 and https://bbs.stardestroyer.net/viewtopic.php?p=3101327#p3101327 for some mentions (looks like by the same guy).
Comment: If someone posts the correct answer, you can accept by clicking on the checkmark by the voting buttons, as per the [tour].
Answer: I suspect that this will be the Bud Gregory stories by William Fitzgerald (actual name William Fitzgerald Jenkins), with his usual pen name of Murray Leinster used when it was published as fix-up novel Out of This World.

The more widely known Bud Gregory series comprises three 1947 Thrilling Wonder Stories stories, as assembled in Out of this World (fixup 1958), plus "The Seven Temporary Moons" (February 1948 Thrilling Wonder); all originally appeared as by William Fitzgerald. Bud is a hillbilly whose intuitive knack with high technology allows him to solve various superscience problems.

From "The Seven Temporary Moons":

.... Once he'd made a gadget which stopped bullets — and guided missiles — and then threw them unerringly back from where they started from. And he'd made a device which was a sort of tractor-beam which drew to itself selected substances only.
A bit of iron at one end of a curiously-shaped coil made the device draw to itself all iron in the direction in which it pointed. But a bit of gold in the same place made it draw gold .... Murfree was using that device, now in Ocean Products, Inc.'s Maryland-coast establishment, and Dr. Murfree was getting much more than ten dollars a day from it.

My initial search of "idiot savant" gold "seawater" led me to the mention at the SpaceBattles forum, and when I realized they were referring to "Avalon Books", not "Avalon Press", a further search of "avalon books" hillbilly led me to the Wikipedia entry for Out of This World and then it was subsequent searches for Leinster and the book names that led me to the Leinster entry that described the series, and a possibly illicit (and thus not linked) PDF copy of "The Seven Temporary Moons" from which I got the quote.
Comment: No, you should say something like "a pen name of William Jenkins, better known to sf readers under another pen name as Murray Leinster". The way it's written does make it sound like his real name was Leinster.
Comment: ISFDb notes that the Spanish version of [*Out of This World*](http://www.isfdb.org/cgi-bin/title.cgi?38359) includes "The Seven Temporary Moons."
Comment: @user14111: No idea. I already fixed that a few minutes ago when I saw that I'd written that. :)
Comment: ^_^ Fixed, I think.


Is there any law saying the all in-kind benefits must be reported as income for child support calculation?

Question: I'm a fully employed divorced person living in Arkansas. My ex-spouse is unemployed, however, he's getting his rent paid by some organization, and all other fees paid by someone else. My ex-spouse failed to report in-kind benefits, such as his rent being paid by someone else, cash grants, etc. He is getting all that support and failed to disclose it. This impacted the child support, and the money I'm paying is way higher than it should be, had he reported the in-kind benefits properly. Question: Is there any law saying that failure to report in-kind benefits is a violation? Also his attorney was fully aware of all those in-kind benefits. Did his attorney commit a misconduct?
Answer: Child support in Arkansas is governed by Order 10 at the link and the relevant definition is the definition of "Gross Income".

My ex-spouse is unemployed, however, he's getting his rent paid by
some organization, and all other fees paid by someone else. My
ex-spouse failed to report in-kind benefits, such as his rent being
paid by someone else, cash grants, etc. Question: Is there any law
saying that failure to report in-kind benefits is a violation?

Generally, income does not include gifts, charity, or welfare benefits, only what one "earns" from employment, self-employment, or investment of assets. It does include in kind earnings from employment, self-employment, or property investments.
But, if someone is unemployed and receives family or charitable or government assistance, this generally does not count as income for child support purposes.
Order 10 states in the pertinent parts:

Section III.  Gross Income
<code>        Definitions:
</code>
"Income" means the actual gross income of the parent, if employed to
full capacity, or potential income if unemployed or underemployed as
allowed under Section III.7.  Gross income is used to avoid disputes
over issues of deductibility that would arise if a net income was
used.
These Guidelines presume that the parent with the legal obligation to
pay support will file federal taxes as a single individual and have
only one state exemption.  Adjustments have been made in the Chart for
federal and state income taxes, FICA, and average child-rearing
expenditures (for example, out-of-pocket medical expenses of $250.00
per child per year).
The monthly child-support amount shall be converted to coincide with
the payor's receipt of salary, wages, or other income.  For purposes
of computing gross monthly income, a month is 4.334 weeks.  Bi-weekly
means a party is paid once every two weeks, or 26 times during a
calendar year.  Semi-monthly means a person is paid twice a month, or
24 times per calendar year.
"Child Support Gross Income" means gross income—minus amounts for
preexisting child-support obligations paid to another who is not a
party to the proceedings and on behalf of a child who is not the
subject of the action of the court.  Child support arrearage payments
shall not be considered in determining a payor's gross income.
"Combined Gross Income" means the combined gross income of both
parties.

<code> Gross Income Inclusions:
</code>

"Income" is "intentionally broad and designed to encompass the widest
range of sources consistent with the State's policy to interpret
'income' broadly for the benefit of the child."  Evans v. Tillery, 361
Ark. 63, 204 S.W.3d 547 (2005); Ford v. Ford, 347 Ark. 485, 65 S.W.3d
432 (2002); McWhorter v. McWhorter, 346 Ark. 475, 58 S.W.3d 840
(2001); Davis v. Office of Child Support Enforcement, 341 Ark. 349, 20
S.W. 3d 273 (2000).
Gross income includes, but is not limited to, the following:
i.        Wages, overtime pay, commissions, regularly-received
bonuses, or other monies from all employers or as a result of any
employment (as usually reported in the Medicare, wages, and tips
section of the parent's W-2).
ii.      Earnings generated from a business, partnership, contract,
self-employment, or other similar arrangement, or from rentals.
(a)          Income (or losses) from a corporation should be carefully
examined to determine the extent to which they were historically
passed on to the parent or used merely as a tax strategy.
iii.    Distributed profits or payments from profit-sharing, a pension
or retirement, an insurance contract, an annuity, trust fund, deferred
compensation, retirement account, social security disability payments,
social security retirement payments, unemployment compensation,
supplemental unemployment benefits, disability insurance or benefits,
or worker's compensation.
(a)          Consider insurance or other similar payments received as
compensation for lost earnings, but do not include payments that
compensate for actual medical bills or for property loss or damage.
(b)         If a parent receives payments from an IRA, defined
contribution, or deferred compensation plan, income does not include
contributions to that account that were previously considered as the
parent's income used to calculate an earlier child-support obligation
for a child in this case.  To the extent that the funds received are
equivalent to the amount of the funds contributed by the parent while
paying child support, that amount should be excluded from the
computation of gross income.
(c)          Social Security auxiliary benefits paid to children
because of a parent's disability shall be income to the disabled
parent.  If either parent receives auxiliary benefits because of a
spouse or children unrelated to the case before the court, that
payment shall not be included as income.
iv.     Military specialty pay, allowance for quarters and rations,
housing, veterans' administration benefits, G.I. benefits (other than
education allotment), or drill pay.
(a)          If the servicemember receives housing pay and supports
another home (i.e. second residence), housing pay is not considered
income to the individual.
v.       Tips, gratuities, royalties, interest, dividends, fees, or
gambling or lottery winnings.
vi.     Capital gains to the extent that they result from recurring
transactions.
vii.   The standard (basic needs) portion of adoption subsidies for
children in the case under consideration (do not consider the medical
needs and intensive rate portion of the subsidy, nor the family
support subsidy as income).
viii. Any money or income due or owed by another individual, source of
income, government, or other legal entity.
ix.     Income also includes the market value of perquisites (perks)
received as goods, services, or other noncash benefit for which the
parent did not pay, if they reduce personal expenses, and have
significant value or are received regularly.
(a)          Common forms of perquisites (perks) or goods and services
received in-kind include, but are not limited to, the following:
housing, meals, or room and board, personal use of a company business
vehicle or mileage reimbursement, including use between home and
primary worksite, and other goods or services.
(b)         Perquisites (perks) do not include money paid by an
employer for benefits like tuition reimbursement, educational cost
reimbursement, uniforms, and health savings account (HSA)
contributions.
x.       The court may consider assets available to generate income
for child support.  For example, the court may determine the
reasonable earning potential of any asset at its market value and
assess against it the current Treasury bill interest rate or some
other similar appropriate method of computing income.
To further this State's policy of interpreting "income" broadly for
the benefit of children, a support order may include as its basis a
percentage of a bonus to be paid in the future.  The child support
attributable to a bonus amount (or another one-time source of money)
shall be in addition to the periodic child-support obligation.  This
child-support obligation shall terminate when the underlying
child-support obligation terminates. Variable income such as
commissions, bonuses, overtime pay, military bonuses, and dividends
shall be averaged by the court over a reasonable period of time
consistent with the circumstances of the case and added to a parent's
fixed salary or wages to determine gross income.  When income is
received on an irregular, nonrecurring, or one-time basis, the court
may, but is not required to, average or prorate the income over a
reasonable specified period of time or require the parent to pay as a
one-time support amount a percentage of his or her nonrecurring
income.
One-time sources of money like an inheritance, gambling or lottery
winning, or liquidating a Certificate of Deposit, for example, is
income for these Guidelines purposes (as detailed in the previous
paragraph).  If the receipt of an asset is not sold or otherwise
disposed of, however, then it has not "realized a gain" and therefore
is not income under these Guidelines.

<code> Income from Self-employment, Business Owners, Executives, and Others
</code>

a.           Difficulty in determining income for self-employed
individuals, business owners, and others occurs for several reasons
including:
i.            These individuals often have types of income and
expenses not frequently encountered when determining income for most
people.
ii.           Taxation rules, business records, and forms associated
with business ownership and self-employment differ from those that
apply to individuals employed by others.  Common business documents
reflect policies unrelated to an obligation to support one's child.
iii.          Due to the control that business owners or executives
exercise over the form and manner of their compensation, a parent, or
a parent with the cooperation of a business owner or executive, may
arrange compensation to reduce the amount visible to others looking
for common forms of income.
b.           To determine monies that a parent has available for
support, it may be necessary to examine business tax returns, balance
sheets, accounting or banking records, and other business documents to
identify additional monies a parent has available for support that
were not included as personal income.  At a minimum, a self-employed
parent shall provide their two most recent years of state and federal
tax returns.  The parent should provide three years of tax returns
when there is a reduced, deferred, or elective income situation.
Unless otherwise prohibited by law, the court may award expert witness
fees when necessary to determine self-employed parent's income.
c.           For income from self-employment, proprietorship of a
business, or ownership or a partnership or closely held corporation,
gross income is defined as gross receipts minus ordinary and necessary
expenses required for self-employment or business operation, including
an employer's share of FICA.  However, the court should exclude from
those expenses amounts allowed by the Internal Revenue Service for
accelerated depreciation of investment tax credits for purposes of
these Guidelines and add those amounts back in to determine gross
income.  In general, the court should carefully review income and
expenses from a parent's self-employment or operation of a business to
determine actual levels of gross income available to the parent.  The
court's duty is to accurately determine a child-support obligation in
every case. This amount may differ from the determination of business
income for tax purposes.
d.          Whether organized informally, or as a corporation, a
partnership, a sole proprietorship, or other arrangement or entity,
these considerations apply to all forms of self-employment and
business ownership, as well as to business executives and others who
may receive similar forms of compensation.
e.           For purposes of this subsection, income includes amounts
that were not otherwise included as income elsewhere in this chapter.
Special attention shall be given to the following forms of
compensation:
i.            Distributed profits, profit sharing, officers' fees and
other compensation, management or consulting fees, commissions, and
bonuses.
ii.           In-kind income or perquisites (perks), gifts, free
admission to entertainment, or personal use of business property. The
value of these items must be based on a fair-market price, that is,
the price a person not affiliated with the business would pay.
In-kind payments received by a parent from self-employment, or the
operation of a business is income if the payments are significant and
reduce personal living expenses.
f.           Redirected income, or amounts treated by the business or
company as if the redirected amounts were something other than the
parent's income.  Amounts include, but are not limited to, the
following:
i.            Personal loans.  Presume personal loans from a business
are in fact redirected income, unless all the following are true: (1)
the parent signed a contract or promissory note outlining the terms of
the loan, (2) the business maintains records showing the loan owed as
a receivable, (3) the parent makes installment payments and the
present loan is paid current, and (4) the interest earned and
repayment rate appear to be a reasonable business practice. Unless the
presumption is overcome by a preponderance of the evidence, then a
parent's income includes the difference between the amount the parent
repays and a repayment amount for a similar commercially available
unsecured personal loan.
ii.           Payments made to friends or relatives of the parent.  If
the business cannot demonstrate that the payments are equivalent to a
fair market value payment for the work or services the friend or
relative performs, then include any amount that exceeds the
fair-market value as the parent's income.
g.         Reduced or deferred income.  Because a parent's
compensation can be rearranged to hide income, determine whether
unnecessary reductions in salaries, fees, or distributed profits have
occurred by comparing amounts and rates to historical patterns.
i.          Unless the business can demonstrate legitimate reasons for
a substantial reduction in the percentage of distributed profits, use
a three-year average to determine the amount to include as a parent's
income.
ii.         Unless a business can demonstrate legitimate reasons for
reductions (as a percentage of gross business income) in salaries,
bonuses, management fees, or other amounts paid to a parent, use a
three-year average to determine the amount to include as a parent's
income.
h.         Business income subject to elective treatment.  Income that
is subject to elective status (for example, retained income) may be
considered as income after the court considers the circumstances and
history of the elective treatment, which includes but is not limited
to the status prior to the implementation of the support order.  If a
change in the status was made after the original election, then a
court can either choose to include the income in child-support
calculations or not include it in the calculations.
i.          Deductions for Tax Purposes.  For a variety of historical
and policy reasons, the government allows considerable deductions for
business-related expenses before taxes are calculated. Those same
considerations are not always relevant to monies a parent should have
available for child support.  Therefore, some deductions should be
added back into a parent's income for purposes of determining child
support.  The deductions include, but are not limited to, the
following:
i.          Rent paid by the business to the parent, if it is not
counted as income on that parent's personal tax return.
<code>                   ii.          Real estate depreciation shall always be added back into a parent's income when calculating support.

                   iii.         Depreciation figured at a straight-line (not accelerated) rate on a parent's (not a
</code>
corporation's or partnership's) tangible personal property, other than
for personal vehicles or home offices, shall be deducted from income.
Any parent who uses accelerated depreciation for tangible personal
property may deduct the value of the straight-line depreciation amount
for property other than personal vehicles or home offices, if the
parent proves what the straight-line amounts would have been.
<code>                   iv.         Home office expenses, including rent, hazard insurance, utilities, repairs, and maintenance.

                   v.          Entertainment expenses spent by the parent.  Legitimate expenses for customers' entertainment may be
</code>
treated as deductions.
<code>                   vi.         Travel expense reimbursements, except where such expenses are inherent in the nature of the business
</code>
or occupation (for example, a traveling salesperson), and do not
exceed the standard rates allowed by the State of Arkansas for
employee travel.
<code>                   vii.        Personal automobile repair and maintenance expenses.
</code>

<code> Gross Income Exclusions:
</code>

Gross income does not include benefits received from means-tested
public assistance programs, such as Temporary Assistance to Needy
Families (TANF), Supplemental Security Income (SSI) received for self
or any child; Food Stamps and General Assistance; income derived by
other household members; child support, adoption subsidy payments, and
foster care board payments received for other children not involved in
the case. . . .

Income Verification:

The Affidavit of Financial Means and Worksheet shall be used in all
family-support matters. Each party shall exchange the Affidavit of
Financial Means and Worksheet at least three days before a hearing to
establish or modify a support order.  The Worksheet shall be filed in
the court file and attached to the order that includes the
child-support award.  The Affidavit of Financial Means shall not be
filed in the court file.
A court may rely on suitable documentation of current earnings,
preferably for at least one month.  Suitable documentation includes,
but is not limited to, pay stubs, employer statements or
verifications, and receipts and expenses if the parent is
self-employed.
Verification of current earnings, whether they are reflected on the
Affidavit of Financial Means or not, can be supported with copies of
the most recent federal and state tax returns that a parent has filed.
Income can also be verified through the Department of Workforce
Services or through the Department of Finance and Administration.

Income Imputation Considerations:

If imputation of income is ordered, the court must take into
consideration the specific circumstances of both parents, to the
extent known, including such factors as the parents' assets,
residence, employment and earnings history, job skills, educational
attainment, literacy, age, health, criminal record and other
employment barriers, and record of seeking work, as well as the local
job market, the availability of employers willing to hire the parent,
prevailing earnings level in the local community, and other relevant
background factors in the case.
There is a rebuttable presumption that the payor and the payee can
work full-time or earn full-time income, and the court may calculate
child support based on a determination of potential income that would
otherwise ordinarily be available to the parties.
The court may consider a disability or the presence of young children
or disabled children who must be cared for by the parent as being a
reason why a parent is unable to work.
Although Temporary Assistance to Needy Families (TANF) and other
means-tested public assistance benefits are not included in gross
income, income may be imputed to these recipients.
In addition to determining potential earnings, the court may impute
income to any non-income producing assets of either parent, if
significant, other than a primary residence or personal property.
Examples of such assets are vacation homes (if not maintained as
rental property) and idle land.  The current rate determined by the
court is the rate at which income may be imputed to such nonperforming
assets.

With regard to the second question:

Also his attorney was fully aware of all those in-kind benefits. Did
his attorney commit a misconduct?

It doesn't appear that any the things described in the question had to be reported.


Maintain order of requests when making several ajax callbacks

Question: I'm looping through several items and making an ajax request for each of them (using jQuery).  I want them to execute independently, but populate into the DOM in the order they were called, not the order they are returned (for some reason some requests are taking longer than others).  Any tips on the best practice for this type of thing?
Comment: attach a request-order field to each and have the data stored in a global bit of memory (maybe attach to a "holding div") and in each success call a common module that will try to load them all if all have succeeded. Sounds like you're going to have quite a few mutexes in holding patterns for this design. ~~ As for best practice, just keep the code clean and readable.
Answer: Well the results can come back in any undefined order, they are asynchronous and subject to the vagaries of the internet and servers.
What you can do is deal with the problem in the same way TCP does over UDP.  You use sequence identifiers.
Keep a sequence identifier going, and increment it every time you send out a request.  As requests come back, check them off in order and only process them as they come in.  Keep a list of what has returned with the data in order, and have a routine fire to check that list after each update to it.  When the first expected is in, it should process the whole list down to the first gap.
Bare in mind that you could lose a request, so a suitable timeout before you ignore a given sequence identifier would be in order.
Answer: The answer to this ended up being a jQuery plugin called ajaxManager.  This did exactly what I needed:
https://github.com/aFarkas/Ajaxmanager
Answer: You could send all the success result objects to a queue. Have an index that was sent with the original request, and continually check that queue for the next index.
But generally browsers only allow two simultaneous ajax requests, so it might be worth it to just send the next ajax request on success of the previous request.
Here's a start at the code:
<code>var results = {}, lastProcessedIndex = 0;
var totalLength = $('a.myselector').each(function(el, index){
    $.ajax({
        url: $(this).attr('href'),
        success: function(result){
            results[index] = result; // add to results object
        }
    });
}).length;

var intervalId = setInterval(function(){
    if(results[lastProcessedIndex]){
        // use object
        lastProcessedIndex++;
    }
    else if(totalLength == lastProcessedIndex){
        clearInterval(intervalId);
    }
}, 1000); // every 1 second
</code>
Comment: Yeah I also found this jQuery ajax queue manager which I think does basically what you're describing here: http://www.protofunc.com/scripts/jquery/ajaxManager/
Answer: I'll be taking a stab in the dark with this one but it might help. Maybe you could create a global buffer array and then whenever the AJAX returns you can add the result to the buffer. You could then set up a timer that, when triggered, will check the contents of the buffer. If they are in order it will output it accordingly.


How to enable Salesforce Wave functionality in dev org?

Question: There is no proper documentation around it , no resources and no links in Dev org to see what is Wave. I would like to get started and see how it is better than any other cloud analytic tools. Any pointers please?
Answer: All explained well in this blog -
https://nextgensalesforce.wordpress.com/2015/09/28/creating-your-very-own-salesforce-wave-application/
From link-
Step 1: As first steps you need to sign up for a WAVE development org. (P.S If you're existing developer org has Analytics licenses you can jump to Step 3)
Step 2: You can register for your very own WAVE developer Org here – https://developer.salesforce.com/promotions/orgs/Wave-DF15-DE
@@@ Great Job on creating the WAVE developer Org. @@@
Step 3: Now click on the link – https://startsurfingthewave.herokuapp.com/actions/enablement
Step 4: You'll have to sign in into the developer org created in Step 1 and click Allow.

Step 5: Click on Go to My Org

Hurray.. Now you get the Salesforce Analytics Page on your own developer org – how cool is that :)

Step 6: Click on Enable Analytics
Step 7: On the Previous Page click on Verify Setup and Assign Permissions

Step 8: Once this setup is complete, you'll see Analytics in the App picker. If you don't refresh your page.

Step 9: Select Analytics.
Answer: You can't add analytics cloud to your dev org at the moment.
The help contains some basics - just search for "analytics cloud", and if you have access to a premier training org there are the white (20 mins) and green (6 hours) belt training videos.
If you are a US based partner there are demo orgs available after you have completed white/green belt training, but these aren't available outside of the US.
Looks like a waiting game based on this thread in the official group : https://success.salesforce.com/_ui/core/chatter/groups/GroupProfilePage?g=0F9300000009MBPCA2&fId=0D53000001eyEcgCAE
Answer: Now you can just go to this link
developer.salesforce.com/promotions/orgs/Wave-DF15-DE
Thanks to trailhead now I can learn and explore WAVE
Comment: also you can  go through [link](https://developer.salesforce.com/trailhead/wave_analytics_explorer/wave_analytics_basics/wave_start_surfing_the_wave)
Comment: This link does not work.
Comment: sorry Chris I have  edited try now
Comment: This link WORKS for me.
Answer: I would suggest you to join the Success Community Official Wave Group
to get all the details and directly ask your questions to the product team.
there are few webinars scheduled and also it seems enabling wave for dev org is also in their roadmap..
Comment: Just curious to know, on your comment about Wave in Developer Edition - any official announcement from Salesforce.com on this?


Emacs strange key conflict

Question: In Emacs I often get a box popping activated, but I don't know how it does activate nor how to deactivate it, because it is cryptic, I don't know what it is.
The box is conflicting with a very recurrent and ordinary Emacs command I use A LOT (it marks from the point to the end of the line), every time I press ctrl + shift + e, I get the box (in the point) overriding the Emacs command, making it unusable.
I run Emacs 25 over GNU/Linux Fedora 25 with GNOME 3 desktop environment. I checked the key combinations descriptions of GNOME, none of them has anything to do with the problem. Emacs is the only program I get the box once it gets "activated".
Restarting session nor the computer doesn't fix it. Reinstalling everything clean doesn't fix the problem either. To temporarily solve, I restart session to GNOME classic and the problem goes away, once the problem reappears in classic, then I start session back to standard, and so on.

Here is an image sample of the problem, see the dark grey box with the '@' character:

Another sample, when the box is showing, if I type anything:

Alternatively, when the box is showing, if I do ctrl+x I get:

I am not sure this problem origins from updating the software, neither sure if it is just an Emacs problem, or in combination with another program (Fedora/GNOME). I have spent quite a lot of time searching, but I don't even know how to describe this thing to "google it" successfully, have not found any documentation from Emacs nor GNOME about this strange functionality.
What is and how to deactivate the dialogue?
Answer: My crystal ball tells me that there's probably a "ctrl + shift + e" binding in your environment (i.e. probably in some Gnome stuff).
At least I'm pretty sure this box doesn't come from Emacs.
I'd recommend you go take a look at your system preferences.

Emacs strange key conflict


Use new domain name on previously installed files of wordpress

Question: I have a question on wordpress. I had a wordpress site installed using other domain name previously, now that domain name no longer using and i am not going to renew, and the domain name i have already removed from my cpanel. I want host that site with a new domain name. What should i do for that? And how can i do to make it work?
Comment: Is your site still complete in a Wordpress install or do you want to move it to another installation?
Comment: I want to maintain all the content inside. Just want to change a new domain name for that installed files. Do you have any clue to do that?
Comment: Yes, you just have to point the domain name to the relevant directory in cpanel. In WordPress you have to change the domain in the general options section. You then probably will be kicked out of the installation. Login again and it should work.
Comment: Just one thing: if there are any hard coded internal links (in menus, posts and so on) you will have to adapt them manually. Or you would have to do a search and replace in the database. So, always use relative links.
Answer: There are few ways to do this. I suppose you have shared hosting package on that installation and that you "only" need to change your domain name.
So one solution would be to rename your hosting package to another domain. If your domain is now somedomain.com, and you want to transfer it to someotherdomain.com, you will rename your hosting package to it and point DNS for someotherdomain.com to this server where the files are located. Also you will need to change in wp settings Wordpress adress(URL) and Site Adress(URL). You change that also to link of your new someotherdomain.com. And that should be it in up to 48h when DNS do what it needs to do(usually faster).
The one minor problem with this kind of just "renaming" is that if you have a lot of media links (images, videos, etc) you will need to (in most cases) manually change it to new links.
To avoid that you can use (what I use, even if I just changing domain name) plugin called DUPLICATOR. So if you have shared hosting you can open new package for this domain and just tranfer files with duplicator and in this case the links will be automatically changed(I would recommend this for larger sites with much of media links etc), and also all the database links.
I hope this helps.
Regards