Bachelier call option derivative w.r.t strike

Question: I tried to take the partial derivative of the Bachelier call function w.r.t. strike price K (eqn 2.2 here), but my result is not lining up with what is shown on page 43 here.
Answer: I figured it out. the second source had a drift component in the SDE that i didnt have.


Poission distribution.

Question: I've a problem about poisson distribution.
Let $X$ denote The number of vehicles arrive at a garage every hour. $X$ is a random variable evaluated by Poisson distribution with $λ$ as the distribution parameter.
At the garage,There are $M≥1$ available repair stations and the service duration of each station is exactly an hour.
If a vehicle arrives and all the stations are occupied,it immediately leaves the garage without being repaired.In the beginning of the day,all the stations are available.
calculate the probability functions of the following random variables :

$Y$-the number of vehicles that got service at the first hour of the day.

$Z$-the number of vehicles that left the garage without being fixed at the first hour of the day.

The two functions should be represented as a sum.
If anything about this question is vague,let me know .
Thanks a lot for your help !
Answer: Sketches:

$Y=\min (X,M)$, so $\Pr(Y=k)=\Pr(X=k)$ for $k<M$ and $\Pr(Y=M)=\Pr(X\geq M)$.
$Z=X-Y$, so $\Pr(Z=0)=\Pr(X=0)+...+\Pr(X=M)$ and $\Pr(Z=k)=\Pr(X=M+k)$ for $k\geq 1$.

Poission distribution.


What do you think parseInt("08") will return?

Question:
Possible Duplicate:
Workarounds for JavaScript parseInt octal bug

Surprisingly it returns 0. Why? and what's the (proper) solution to get correct results?
Comment: @Sorrow: Except that it's for Java, not Javascript.
Answer: Use a radix:
var x = parseInt("08", 10);

Some JavaScript implementations add a third numeral system to the two defined by the standard (decimal, the default; and hex, prefixed with 0x): Octal, prefixed with 0. This is non-standard but acknowledged as common in the latest spec.
Since 8 is not a valid octal digit, parseInt stops there, returning the value 0.
By explicitly using a radix, you tell parseInt not to try to figure out what numeral system is being used but instead to use the one you specify. Your instinct when typing parseInt should always be to specify the radix; not doing so leaves you open to oddities.
Answer: "08" mean 8 based number. You should specify second argument.
 parseInt("08", 10)

Answer: @T.J. gave a great explanation for the behaviour you see. Another way to parse a number string is to use unary +:
var num = +"08";

Answer: From http://www.bennadel.com/blog/2012-Exploring-Javascript-s-parseInt-And-parseFloat-Functions.htm:

Strings that start with "0" are assumed to be base8 (octal).
Answer: From MDC - parseInt:

If the input string begins with "0", radix is eight (octal). This feature is non-standard, and some implementations deliberately do not support it (instead using the radix 10).  For this reason always specify a radix when using parseInt.

And the example:

parseInt("08"); // 0, '8' is not an octal digit.

That is, since no radix was passed in and the string begins with 0 octal is assumed. Since 8 is not an octal digit it cannot be parsed.
Solution? Always provide a radix parameter:
parseInt("08", 10);

Answer: If you run it through jslint, it'll squawk at you for not including the radix parameter. Yes, the radix is optional, but probably should be included every time. A number starting with 0 is assumed to be octal unless otherwise specified.
var foo = parseInt("08", 10);

Answer: Number prefixed with "0" is octal number. 8 is invalid octal number. so the result is 0


Developer Jobs Data Archive Availability?

Question: I am aware of the set of Stack Exchange archives (https://archive.org/details/stackexchange), but am searching for a similar archive of all job openings posted to the "Developer Jobs" section of Stack Overflow. Does it exist and is it freely available?
Comment: Don't think so, and doubt it ever will be. That part of the site is a moneymaking enterprise with no community input like in the Q&A section
Comment: @AurélienGasser true, but I mean *creative* input. On the Q&A side, you have a strong moral argument for making the data available because it is created and curated by the community. On the Jobs side, not so much... of course it would be super nice to have that data, but it's sort of understandable if they don't release it for all the world (and their competitors) to see. And of course there'd be major copyright issues with the content. Can't expect employers to license their adverts under CC-Wiki
Comment: @Pekka웃 Note that jobs can be flagged/reported by users (in the sidebar), which I would count as community input.
Answer: At the moment, it's not something we're making publicly available (and I'm not aware of any plans in that direction).


How does the use of oracle Turing machines not lead to contradictions?

Question: How can we ensure that we are continuing to make sound and valid statements about complexity classes when using oracle Turing Machines?  According to my understanding (based on the definitions given in introductory textbooks on the subject)  oracle Turing machines can determine the membership status of a string with respect to an oracle language in one computation step.  However the oracle languages often used are provably impossible to solve in constant time (take an EXPTIME-complete oracle, for example).  To me this seems like "opening the door" to contradictions and after all, anything follows from a contradiction.
Comment: If the oracle "really" took time $T$ then that's just a factor for the runtime of the total machine. Assuming constant cost (i.e. count how often you need the oracle) makes it easier to compare oracle-using algorithms. (The question if the obtained results have any relevance in reality is one you always face and/or ignore in TCS.)
Comment: @Raphael By "you" in the parenthetical comment do you mean complexity theorists in general or me in particular?
Comment: The former. Well, both, in a way.
Comment: an advanced topic. try starting with [Fortnow](http://cstheory.stackexchange.com/a/20545/7884) who agrees they are sometimes "misused" & surveys the area. the self-consistent way to see these results is sort of like a "conditional" assertion. similarly to the way that many results are proved conditionally in math based on the Riemann hypothesis etc.
Answer: There's a number of ways to look at this.
One is that in proofs, implication is kind of like a function, that takes as input a proof of something, and outputs a proof of something else.
We can write functions that operate on values that we don't have.
For example, let's consider the halting number $h$, which is not computable. I can write the function
$haltingPlusOne : \{h \} \rightarrow \mathbb{N}$
$haltingPlusOne(x) = x + 1$.
This function takes as input the Halting number, and returns the Halting number plus one. Clearly this is a well defined function: if we give it the right input, it gives the right output. The fact that we can't find the right input doesn't make it any less valid of a transformation.
I see proofs with oracles as similar. They're basically functions which say, give me a Turing machine that solves problem $X$, and I'll give as output a proof of some theorem.
It's also important to realize that when we say something like "There is no Turing Machine that can decide the halting problem,"  that is saying that, there's no TM matching the standard definition of a TM that decides the halting problem.
An oracle is basically saying "Assume we have a TM that matches the normal definition except also assuming we can solve some problem". So there's no contradiction, since we're not assuming there's a normal TM accepting the problem, we're assuming there's a special TM accepting the problem.
In a very informal analogy, think of it like this. If I can prove to you that no humans without superpowers can fly, there's no contradiction saying that there's a superhero that can fly.
These oracles are purely logical objects. We don't know how to build physical machines that emulate them, the way we can with Turing machines, but as far as we know, there's no inherent contradiction between their definitions and our basic axioms.
As logical objects, these oracles do exist. We know they're not standard Turing Machines or Lambda-Calculus terms or Partial-recursive functions. The Church-Turing thesis says that there's no more powerful model, but it's not a theorem, it's just a conjecture, and is too informal to ever really be proved.
Comment: The thing is, the statements are not false, we just can't construct them. The key is that oracles aren't Turing machines, it doesn't mean they don't exist.
Comment: I agree with/understand your answer, but only up to a certain point:  For example, I see that your haltingPlusOne function is well-defined, but don't see how we can draw any meaningful conclusions from oracles, since we could make any "if" statement of a false statement and reach any conclusion, i.e. "If $n + 1 = n$ for all natural numbers $n \geq 1$ then there is only one natural number."
Comment: "find the right input" $\: \mapsto \:$ "find the right output" $\;\;\;$ ? $\;\;\;\;\;\;\;$
Answer: Well, I would say that it is an essential feature of oracle TM that they have access to an oracle that is hard to solve. If you can decide the oracle $A$ in constant time, then for every class $B$ you would have $B=B^A$. So why to have the oracle at all in this case?
So what is the point in using a oracle TM then? I would say it allows us mainly theoretical considerations about the (degree of) hardness of problems. The oracle can even be undecidable. In this case you can define a whole hierarchy of undecidable problems (Turing degree). Of course, if your oracle is the halting problem you cannot convert your oracle TM into a traditional TM.
The oracle TM concept also is important to define a strong form of reductions (Turing reductions).
Note that the more theoretical motivation of oracle TM can have implications outside of the oracle world. You maybe know the famous $\sf P$ vs $\sf NP$ relativizing result.
As a last remark note that in order to query the oracle you have to write the query string $w$ first on the oracle tape. Thus, you cannot decide the membership in constant time, but in time $|w|$.


Custom FileDialog in WinCE 6.0

Question: I am newbie in WinCE Programming, i want to Create Custom File Dialog for our application, which has totally diffrent look and feel than the default windows file dialog....
I looked into many Flag value bt they won't worth it ...
Any pointers will be helpful
Thnks...
Mukesh
Answer: It depends on what level you're looking at replacing it.  Do you want to replace it device-wide, or just for your app?  If it's just for your app, create a new Dialog with the features you want and call it.
To replace it system-wide you have to have the ability (i.ee tools and BSP) to create a new OS image.  You would clone the following folder in your project tree:
<code>%WINCEROOT%\PUBLIC\SHELL\OAK\HPC\CESHELL\UI</code>
Then modify the resource (and potentially code) files you want changes and rebuild your OS.

Custom FileDialog in WinCE 6.0


Selenium to test Dygraphs

Question: Is it possible to use selenium(C# bindings) to write automated tests for testing Dygraph charts?
If selenium does not support this? Are there any other tools which can be used?
http://dygraphs.com/
Greatly appreciate any advice in this regard.
Answer: Indeed, JS graphics libraries create a very complex DOM which makes difficult to verify behavior of the result - and Selenium is not properly focused on visual testing as well, which is a very important part of graphics.
For the functional problem, you can focus on unit testing, using something like Jest.
const chart = require('./chart');

test('chart has no labels', () => {
  expect(chart.createChart().getLabels()).toBe(null);
});

And for the visual testing, you can use something like Percy, which will create baselines images of the rendered page on the first execution of a test and compare it to the results from subsequent executions.

Below you can find an Ember test with Percy integrated, where multiple snapshots are captured to be used in the future for comparison.
test('add todos', async function(assert) {
    await visit('/');

    await percySnapshot('Empty todo list');

    await fillIn('#new-todo', 'Bake a cake');
    await triggerKeyEvent('#new-todo', 'keydown', 13);

    await fillIn('#new-todo', 'Rake the lawn');
    await triggerKeyEvent('#new-todo', 'keydown', 13);

    await assert.equal(currentURL(), '/');
    await assert.equal(find('ul.todo-list li:first-child').innerText.trim(), 'Bake a cake');
    await assert.equal(find('ul.todo-list li:last-child').innerText.trim(), 'Rake the lawn');

    await percySnapshot('Todo list with 2 todos');
  });
});

Selenium to test Dygraphs


Send a push notification from a windows phone device to webservice

Question: I have a question about the push notification service of the Windows Phone 7 device:
I can now send a push notification, using a web application to a phone, changing the data of the tile. But the problem is: when I start the app, I need to display the URI in the debugger output, and then copy-paste it inside the web application, which in turn will contact the MPNS, which is fine for an update, once to a single phone. But I want to create a webservice that can make multiple calls automatically, retrieve the URI of the application ( which changes after closing-and-opening the app, I think ) and send a push notification to it. But I haven't found an MSDN - topic that deals with this. They just use commends, saying : "to be replaced later with the URI needed." So my question is: how do I use the phone to send such a message to the webservice, respond to it, and connect to the phone again, handling such request?
and also: do I need an authenticated webservice, or is there a debug version?
This is what I have thus far :
<code>  /// <summary>
    /// Setup a connection with a webservice, in order to update a shell, either a toast- or a tile shell.
    /// </summary>
    /// <param name="shellType">The type of shell you wish to update</param>
    public void SetupShellChannel ( ShellBindType shellType )
    {
        //holds the push notification that is created. Since we can only have one notification channel open at any one time,
        //we will need to check for existance. That is why, the channelName shouldn't be changed
        HttpNotificationChannel _httpChannel = HttpNotificationChannel.Find( _channelName );

        //if the _httpChannel was not found ( read: does not exist )
        if ( _httpChannel == null )
        {
            _httpChannel = new HttpNotificationChannel( _channelName  );
            _httpChannel.Open( );

            //because there is more than one shelltype we can open, we will use a switch to call the method we seek
            BindToShell( _httpChannel, shellType );
        }
            //Only one push notification service is allowed per application, so we cannot send a tile notification, as well as
            //a toast message notification. When we attempt this, we get a InvalidOperationException
        else
        {
            //in this case, the _httpChannel did already exist, but the problem is, we cannot just add the eventHandlers,
            //because there is the danger that it didn't exist, and we would get a null pointer exception.
            //_httpChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>( httpChannel_ChannelUriUpdated );
            //_httpChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>( httpChannel_ErrorOccurred );

            //For testing purposes, we now display the URI to the user, and as output. Normally, we would pass this URI back to the webserver
            System.Diagnostics.Debug.WriteLine( _httpChannel.ChannelUri.ToString( ) );
        }

        //if ( _httpChannel.ChannelUri )

        //When the URI is updated, we want this to be sent to the server as well, so we know that the adress has changed,
        //and don't just send data somewhere into the void. Also, when encountering an error, we want to show the user when
        //an error has occured.
        _httpChannel.ChannelUriUpdated += new EventHandler<NotificationChannelUriEventArgs>( HttpChannel_ChannelUriUpdated );
        _httpChannel.ErrorOccurred += new EventHandler<NotificationChannelErrorEventArgs>( HttpChannel_ErrorOccurred );
    }

    //here, also we would return the URI to the server, but for debugging purposes, we display them to the user.
    void HttpChannel_ChannelUriUpdated( object sender, NotificationChannelUriEventArgs e )
    {
        Deployment.Current.Dispatcher.BeginInvoke( ( ) =>
        {
            System.Diagnostics.Debug.WriteLine( e.ChannelUri.ToString( ) );
            MessageBox.Show( String.Format( "the URI is {0}", e.ChannelUri.ToString( ) ) );
        } );
    }

    private void BindToShell( HttpNotificationChannel channel, ShellBindType shellType )
    {
        switch ( shellType )
        {
            case ShellBindType.BindToShellTile:
                channel.BindToShellTile( );
                break;
            case ShellBindType.BindToShellToast:
                channel.BindToShellToast( );
                break;
        }
    }

    void HttpChannel_ErrorOccurred( object sender, NotificationChannelErrorEventArgs e )
    {
        //getting an error would be caugth here, and then displayed to the user.
        Deployment.Current.Dispatcher.BeginInvoke( ( ) =>
            {
                MessageBox.Show( String.Format( "A push notification {0} error occured. {1}{(2)}{3}",
                    e.ErrorType, e.Message, e.ErrorCode, e.ErrorAdditionalData ) );
            } );
    }
</code>
Comment: Can you explain  the first part of qn - how do I use the phone to send such a message to the webservice, respond to it, and connect to the phone again, handling such request.
Answer: Ok I understand your question. What I have done is once I get teh URI from MPNS, I call a web method on a service with this as a parameter -
Subscribe(int subscriberId, Uri channelUri);
So you need to make sure you generate a subscriberId in your app to identify a user and store it in Isolated Storage. This can be a GUID.
The onus is now upon hte server to save the Subscriber to Uri mapping in persistant storage.
Also you need to provide UnSubscribe method for user to opt out of the push notification. This is one of the certification requirement for Push notifications.
Now about your second question - Yes, you would need to secure your services - you dont want to be handling with unknown requests.
What i do personally, divide it into 2 services - Publishing service and subscription service. The Publishing service will send out hte notifications while subscription will have the subscribe/unsubscribe methods.
Comment: Thank you for yout answer =D
I had already found the answer though, and did something similar idd. I did not yet implement the two seperate webservices, which seems like a very plausable thing to do, since I can than manage the devices receiving the notification.
Answer: I guess you are trying to ask that you can send push notification from Windows Phone itself or not instead using any other server side ASP/PHP like explained in Sample Applications in MSDN. Yes. You can send notifications from phone/device itself. You have to just change Send function of Sample app as given in MSDN. Reply if you have any queries.
<code>static async Task<string> SendPushNotification(string textToSend)
{
    //You can maintain a DB to query different channel URIs of devices
    string subscriptionUri = "<Uri To Which You Want Send Notification>";
    HttpWebRequest sendNotificationRequest = (HttpWebRequest)WebRequest.Create(subscriptionUri);
    sendNotificationRequest.Method = "POST";

    string toastMessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
        "<wp:Notification xmlns:wp=\"WPNotification\">" +
           "<wp:Toast>" +
                "<wp:Text1>" + textToSend + "</wp:Text1>" +
                "<wp:Param>/NotificationDetails.xaml?Message=" + textToSend + "</wp:Param>" +
           "</wp:Toast> " +
        "</wp:Notification>";
    byte[] notificationMessage = Encoding.UTF8.GetBytes(toastMessage);

    sendNotificationRequest.ContentLength = notificationMessage.Length;
    sendNotificationRequest.ContentType = "text/xml";
    sendNotificationRequest.Headers["X-WindowsPhone-Target"] = "toast";
    sendNotificationRequest.Headers["X-NotificationClass"] = "2";

    using (var requestStream = await Task.Factory.FromAsync<Stream>(sendNotificationRequest.BeginGetRequestStream, sendNotificationRequest.EndGetRequestStream, null))
    {
        requestStream.Write(notificationMessage, 0, notificationMessage.Length);
    }

    string notificationStatus;
    using (var response = (HttpWebResponse)(await Task<WebResponse>.Factory.FromAsync(sendNotificationRequest.BeginGetResponse, sendNotificationRequest.EndGetResponse, null)))
    {
        //StreamReader reader = new StreamReader(response.GetResponseStream());
        //result = reader.ReadToEnd();
        notificationStatus = response.Headers["X-NotificationStatus"];
        MessageBox.Show(notificationStatus);
    }
    return notificationStatus;
}
</code>


Why does my camera randomly shut off and show green all over the screen?

Question: My camera is an Olympus FE-360 digital camera from 2008. I have never had any problems with it but recently my camera will turn on and work completely fine for about a minute, but then will either turn off or go completely green and weird on the screen. When trying to upload pictures from it to my computer, the source cuts out very quickly because again, the camera will shut off. I am not very educated on cameras, but after doing a little bit of research online, many sources tell me it is an issue with my battery, which definitely would make sense. My current battery is an Olympus Model: LI-42B. I have looked up possible alternatives and many new batteries with chargers show up. Is it worth purchasing a new battery and charger? Could this really be the issue? If I was to order a new battery what brand or website would you recommend buying from? Please help!! I love this camera!!!!!!
Comment: If a battery dies, I would expect the camera to power off - not for the screen to display this noisy signal. All consumer electronics die eventually (unfortunately) and 15 years is old for a digital camera. I personally wouldn't be too hopeful for this camera in this situation
Answer: 2008 is old for a battery. If it's still the original battery it would be surprising if it was maintaining charge well (not impossible, but surprising).
I'm not seeing a negative outcome - beyond the cost of a new battery - to trying a different one. If that was the problem, it's resolved. If it wasn't the problem, you're no worse off than you were. Beyond the cost of a new battery.
Batteries branded with the camera manufacturer's name are likely to be the most expensive, but also the least likely to have compatibility issues. Next will be the big battery brands (Duracell do a lot of camera batteries). Cheapest will be lesser known brands and often unknown brands. The risks are the usual ones - camera branded batteries from a camera shop will cost more but have better support if there are problems, while cheaper alternatives will depend as much on the customer support of where you bought them as on the name that's on them.
[Edit : Good comment from Michael C - a genuine Olympus Li-42B is likely to have been around for a few years too.]
Comment: And they can even return the new battery, if that doesn't fix the problem.
Comment: It's rare to be able to find *new* batteries from the manufacturer for cameras 15 years old. If you do find a real Olympus battery, it's probably been sitting in a warehouse for almost 15 years and wouldn't be much better than the one that came with the camera. Third party batteries from reputable brands are usually a better choice for very old cameras, as they're more likely to be recently manufactured. The exception would be something like Canon's LP-E6 series of batteries that have been around for 15 years and there are still current models that use the most recent version, the LP-E6NH.
Comment: @GrantRobertson Depends on the location and the policy of the retailer. If you buy something and there's nothing wrong with the item, I don't think you always have an automatic right to a refund.
Answer: Another possible cause for a seemingly random glitch like what you've described could be the camera's RAM going bad.  A digital camera has a computer inside that (in many ways) is similar to a regular desktop computer.  And like a regular desktop computer, components can fail.
I helped out with my high school's IT department during the school year and during the summers.  Occasionally we'd see a computer that would have random crashes and BSODs, and we'd run Memtest86 on it and find that its RAM was going bad.  It wasn't a frequent problem, but I saw it a handful of times across the 150-200 computers in the school during the 4 years I was there.
Unfortunately if that starts happening to your camera, there's likely not a feasible solution to replace the RAM, unless you want to take a deep dive into hardware engineering.  One possibility would be to replace the camera's motherboard entirely -- perhaps from a donor camera on EBay with a separate problem like a broken lens -- but that would still require a bit of disassembly work.


I just bought a one-earbud headset with a microphone, but the jack is too small! I cut it open, what do the wires do?

Question: So, yeah, this is my first question, yay, but I still have a problem, boo. I was on a rummage sale spree, so-to-speak, looking for a new pair of earbuds as yet another cheapie pair has broken. I finally found the (almost) perfect earbud-a headset with a microphone and only one speaker-type part! Hallelujah, I thought, unbalanced sound is a thing of the past! So I got it and when I got home, I realized why the person was selling it for a quarter-the jack was 2.5 mm when most things I have (and apparently the seller too) are 3.5 mm! I cut off the jack from it to cut-n-splice a 3.5 mm jack on, but I was met with a mess of wires! Specifically, a red, a green, a blue, and a whole lot of uncolored copper wires. I tried looking for answers online that I could actually use, but all of them required some sort of microchip, or soldering, or something else not readily about the house! All I want to know is what the different wires do!
Comment: It's infinitely hard to say. Depending on the set you have, maybe you can take a peek and see which wires go to the microphone and which to the speakers as to narrow it down a bit.
Answer: There is no standard color coding for the wires.  So you have to find the other end (inside the microphone and speaker casings) and figure out which wire does what with a multimeter.
There should be at least one wire for ground, one for left audio, one for right audio, and one for the microphone.
There are adapters that go from a 3.5mm jack to a 2.5mm jack - and they are cheap.  Usually you can find them at a dollar store.  But it might be too late for that if you have already cut the jack off and can't reattach it.
Answer: There is no standard, as Grant says, but there's the R rule: R as RED as RIGHT, so your red wire is the how wire for the right earbud. The uncolored are probably ground, thus leaving you with only a guess: is left green or blue? If you have a multimeter you can measure the answer out: put it on "resistance" mode, hook the negative terminal to the "bare" wires and probe the others: two of them (the red and another one) should read the same value, something like 16 or 32\$\Omega\$, and these are the earbuds. Or you can just guess, that's not like you are going to damage anything. I'd go green for left and blue for microphone, but that's just because color order is RGB and logic order is RLM... But that's just in my mind.
Comment: Sadly, a lot of headsets don't even keep the Red=Right rule.  It's worth using it as a first guess, but don't count on it.  Most headsets I've cracked open seem to just ignore color and use whatever wire they had laying around the factory.
Comment: Um, that's great and all, but there is no left/right problem, except that there is one bud, one microphone, ...well, there is a button on it, I forgot to say... so, yeah...
Comment: well that's quite different then. have you got a multimeter or something like that? the kind of thing you buy for 10 bucks


How to Tranfer Remaining NFTs And/Or Tokens Out of A Hacked Ethereum Wallet

Question: I have a friend who got hacked recently. The hacker drained all of the valuable NFTs and ERC-20s out of the wallet. The hacker did leave some NFTs of lower value in the wallet. The victim of the hack is trying to transfer the NFTs out of the wallet but every time he sends Eth to use as gas the hacker has a bot set up that immediately drains the wallet. Is there any way to get a transaction through to rescue some of the NFTs before the bot can drain the wallet? I believe in Bitcoin there's a child pays for parent feature where one transaction can pay another transaction's gas fees. Is there a way to do this in Ethereum? Maybe some type of flash transaction or MEV functionality?
Comment: Build a faster bot. There are many companies proposing such services, and also you can search someone in Fiver or freelancer. Considering that you dont have much experience with solidity.
Comment: Pay more fee for trnsaction and get your two transactions be executed faster than bot manages to leak your funds. But that's risky as hacker's bot can pay 99% of the available balance as a fee.
Answer: You are in the correct path. MEV can do this for you.
You can use MEV to submit two transactions with the following properties:

Either both or none of them go through
They should be executed in the same block, next to each other
The first one adds Ethers to the wallet
The second one transfers the assets out
You pay the miners directly in Eth, disregarding any gas fees
The transactions are not broadcast publicly, but are sent privately to miner(s)

You can use Flashbots to accomplish this. If the total value of the assets is big enough, you can ask their whitehat hackers for assistance. Or you can do it yourself with their tooling, which requires some developer know-how.
Comment: I actually wrote a blog post about this kind of rescue: https://medium.com/coinmonks/rescuing-an-nft-fd0acccfa25a
Comment: This sounds like a great idea! I will tell my friend to try it. Is there any way I can get in contact with a mining pool to try to ensure that the transaction remains private until it is mined ensuring that the bot doesn't front run it?
Comment: There is a service for that, check out Flashbots
Comment: Oh this is awesome, just confirming that I'm on the correct site... https://docs.flashbots.net/ Is this it? This looks really fascinating I'm surprised I haven't heard of it before. This website claims that "The mining pools running MEV-geth collectively account for over 85.5% of total Ethereum hashrate." is that really true? And this protocol allows you to have your transaction mined in secret?
Comment: That's the right place. Don't know about the percentages nowadays. But, yes, otherwise correct
Comment: Awesome thanks for all this info!
Comment: This is great thanks for the resource!
Answer: I was in the same situation - my credentials were stolen when i connected metamask to scam website that looked like legit one. ETH scavenger was eating all my ETH in wallet and my NFTs were stuck in there.
Fortunately i was able to rescue them using Flashbot relay to frontrun bot writing my own script. Basically using flashbots you can create multiple transactions and send them in one bundle with following useful features:

bundle is atomic - all transactions will pass or none
bundle will be not visible in mempool (aka dark forest) so hacker/bot will see it only if it is included in block and thats too late for him to do anything about it

In my setup i had 3 wallets:

Compromised wallet - owner of NFTs
Safe wallet - i want to transfer my NFTs here
Funding wallet - this one keeps small amount of ETH for gas fees

My bundles looked like this:

Send ETH for gas from Funding to Compromised
Send NFT1 from Compromised to Safe
Send NFT2 from Compromised to Safe
possibly more transactions ...

ETH scavenger was eating all above 0.00525 ETH so i had to make sure there was less than this amount left in my wallet.
EDIT: In fact if bot sweeps ETH only if balance exceeds some treshold you might use this to your advantage. Send only small amount of ETH that wont be more than bot treshold. If gas price is favorable you might have enough to pay gas fees for NFT transfer. This way you will be able to rescue your NFTs one by one.
In order to run transactions programatically you will need transaction data. You can see this data when you find NFT contract on etherscan, connect your wallet, see contract tab (write contract), fill in transaction data and just before executing transaction you can see hex transaction data. This hex string you will need in script.
By this approach i was able to save also SOS - ERC20 tokens recently distributed by OpenDAO. Bundle will have to contain also claim transaction before transfer
This will also work if your tokens are staked. You have to call unstake before transfer
If you adjust the script this will also work for claiming strong token from nodes linked to hacked wallet.
This video is great starting point https://www.youtube.com/watch?v=1ve1YIpDs_I
EDIT: adding a repo with script i have used


One word for "circuitous discussion"

Question: Is there a word that describes a discussion that never gets to the core of the issue, but continuously lingers on the periphery?
I was hoping to fit it into a sentence such as :

"He derided his retainers for their _____."
Comment: "Runaround" might fit in some circumstances.
Answer: Circumlocution might fit the bill, but it's more often applied to a single person speaking than a group having a discussion.
http://www.merriam-webster.com/dictionary/circumlocution
Definition: the use of many words to say something that could be said more clearly and directly by using fewer words
Another adjective that's commonly used is roundabout, as in "This is a roundabout discussion, when are we ever going to get to the meat of the matter?"
Pussyfooting or tiptoeing around issues are related words that you might want to consider if the context is appropriate. They are mostly used when someone (or a group) is cautiously approaching a very sensitive or contentious issue in an indirect and tangential fashion so as not to cause overt offence. These words are generally not used unless we're talking about a highly sensitive subject.
Comment: I guess I was looking more for a noun than an adjective describing such a discussion/conversation. I was hoping to fit it into a sentence such as; "He derided his retainers for their ..."
Answer: Periphrastic. A synonym of circumlocutory & roundabout.
Answer: Are they supposed to be getting to the point, but enjoying the conversation too much and never get round to it, or are they actively avoiding getting to the point?
If they are dodging the issue completely, evasiveness, maybe prevarication. If they are unwilling to come out and say something uncomfortable, for beating around the bush (not one word, but it is a common phrase).
If they are trying to decide something and different groups can't agree, maybe they are vacillating, or if they are planning on getting to the point but cannot agree even on small details, maybe they are nitpicking or more recently bike-shedding.
If they are taking too long to get to the point, the discussion might be meandering.
If it's clear from the context that they are discussing something, any general word for slowness might fit: dawdling, dilly-dallying, timewasting.
Comment: Good suggestions to work with, thank you. Guess it will require a longer construction than I hoped for.
Answer: Superficial: one that lacks depth or remains in surface.
Orbiting: Revolving around something over and over again.

One word for "circuitous discussion"


How can I convert an mp4 file to a m2v file using FFMPEG that is compatible with Windows Media Player?

Question: I tried doing this but Windows says the file isn't playable. Playing it in VLC does work.

ffmpeg -i in.mp4 -f mpeg -vcodec mpeg2video out.m2v
Comment: Try `-f vob out.mpg` although your WMP may need external codecs.
Answer: Windows Media Player uses DirectShow, which is a system of filters connected together depending on what is fed into them.  If you want to play any format using Windows Media Player, it would be best to install a set of free open-source DirectShow filters known collectively as "LAV Filters", written and maintained by Nevcairiel.  Its latest installer release can be found on its Github releases page, here: https://github.com/Nevcairiel/LAVFilters/releases
However, if you're targeting default Windows installations, one of the highest-quality lossy codecs that Windows supports with its default DirectShow filters is Windows Media Video.  Here's how to transcode a Windows Media Video file conveniently with ffmpeg using Windows Media Video 8.
<code>ffmpeg -i input.mp4 -q:a 2 -q:v 2 -vcodec wmv2 -acodec wmav2 output.wmv
</code>
There is a later version of Windows Media Video, called Windows Media Video 9, but FFmpeg doesn't support encoding Windows Media Video 9; only decoding.  For encoding that, you would be more likely to find success using a Microsoft tool.
I have one final note I'd like to include.  Ideally, unless your source video is lossless, you shouldn't be transcoding video to a lossy format such as Windows Media Video 8 if you can help it.  That introduces generational loss, which is a serious problem for archived video.  Instead, try to ensure your target playback system can play the original lossy-codec-encoded video or make sure you're encoding your lossy video from a lossless source.


Are there subgenres for science fiction with accurate science vs. made up science?

Question: Are there terms that describe a science fiction story that strictly adheres to, I guess, plausible science concepts and technology versus science fiction were the science is really just made up and is theoretically impossible? I know a lot of sci-fi TV shows, like Battlestar Galactica, employed physicists and other scientists as consultants to make sure things were accurate, whereas other shows that I won't name employed people solely to fill in technical- and sciency-sounding words in the script.
Comment: For reference, related question: http://scifi.stackexchange.com/questions/675/what-are-the-criteria-for-defining-hard-science-fiction
Comment: You may have heard of the Mohs scale of hardness for minerals.  The TV Tropes site (WARNING! Can be addictive and time wasting!) has a page called The Mohs Scale of Science Fiction Hardness, giving numbers from 1 to 6 going from the least scientific SF up to real life.  http://tvtropes.org/pmwiki/pmwiki.php/Main/MohsScaleOfScienceFictionHardness
Comment: Duplicate comment.   The Mohs scale of hardness for minerals has inspired the addictive TV Tropes website to have a page called the Mohs Scale of Science Fiction Hardness number various works from 1 to 6 according to the hardness of their science.  http://tvtropes.org/pmwiki/pmwiki.php/Main/MohsScaleOfScienceFictionHardness
Comment: Interesting choice of Battlestar Galactica. While it has some interesting aspects to it (e.g. projectile weapons, no energy shields, shaky cam for battle scenes) there's plenty of fantasy as well (angels, religion, apparitions, and of course -- "jumping" spaceships, plus the shape of the ships and fighters makes no real-life sense).
Answer: The usual term is "hard science."
If that's not what you're looking for, can you narrow down what you mean by "plausible science concepts and technology"? For instance, FTL drives aren't based on any known scientific concepts, so are you ruling out all SF with FTL travel?
Comment: I think you mean **hard science *fiction***. :)
Comment: It's my understanding that current theory puts faster than light travel as an impossibility, so ... I guess, yeah. Or, again with Battlestar -- they incorporated FTL travel and the theory of relativity (Time slowed for the Final 5 as they traveled to warn the 12 colonies). So, that would be an example that's ok.
Comment: FTL is not often 'hard sci-fi' in my opinion, unless the author does a really good job of explaining it.
Answer: "Hard SF" is a sub-genre that basically try to keep within the accepted parameters of known science.
But it can still be pretty out there. Consider Alisdair Reynold's Revelation Space universe. FTL travel is impossible, but far-out stuff like nanotech, life extension and AI is not.
Comment: FTL hasn't been definitely ruled out.  Hard SF authors typically get around the limitation by proposing that the space dimensions of our spacetime are rolled up in some higher dimensional macroverse and we can use the higher dimensions to take short cuts.  SF readers know this scenario well, we call it hyperspace.  Or the author might suppose that exotic matter has been found with negative energy density, which would permit wormholes to be held open.  See Robert Forward's _Timemaster_ for an exploration of that.  The good authors don't ignore special relativity, they look for loopholes.
Comment: 12 years later, AI is commonly available science that creates pure fiction... :(
Comment: I suppose the difference is that FTL is definitely contrary to the laws of physics as we know them, while nanotech, life extension, and AI are compatible with such laws.
Comment: Hal Clement is considered the quintessential hard SF writer. Yet there is FTL travel in many of his novels. Hard SF usually has scientific sensibility, but that doesn't preclude a few way-out concepts like time travel, teleportation, & other exotic phenomena. There isn't a simple cut-off.
Answer: Just adding to the other answers, TV Tropes has the Mohs Scale of Science Fiction Hardness, acknowledging that there's a continuum with a few notable points.

Science in Genre Only: The work is unambiguously set in the literary genre of Science Fiction, but scientific it is not....
Physics Plus: Still multiple forms of Applied Phlebotinum, but here the author aims to justify these creations with natural laws both real and invented—and these creations and others from the same laws will turn up again and again in new contexts....
World of Phlebotinum: The universe is full of Applied Phlebotinum with more to be found behind every star, but the Phlebotinum is dealt with in a fairly consistent fashion despite its lack of correspondence with reality, and in-universe, it's considered to lie within the realm of scientific inquiry....
One Big Lie: The author invents one (or, at most, a very few) counterfactual physical laws and writes a story that explores the implications of these principles.....
Speculative Science: Stories in which there is no "big lie"—the science of the tale is (or was) genuine speculative science or engineering, and the goal of the author to make as few errors with respect to known fact as possible. ....
Real Life (a.k.a. Fiction in Genre Only): A Shared Universe which spawned its own genre, known as "Non-Fiction". Despite the various problems noted at Reality Is Unrealistic, it is almost universally agreed that there is no other universe known so thoroughly worked out from established scientific principles....
Answer: Another sub-genre is called Techno-thriller. Stories in this genre include many (relative to other genres) technical details. The specific abilities of technology often drive the plot. There is a big emphasis on real-world or plausible near-future technology. This genre often overlaps hard sci-fi, military fiction, and spy fiction.
Notable authors include Michael Crighton, Tom Clancy, Douglas Preston, and Neal Stephenson.


Identifying a Saint on a Greek Orthodox icon?

Question: I got this icon from Greece, however I was not able to identify the Saint. Could anyone help?
Answer: The Greek lettering is (in modern script) Ό Άγιος Παΐσιος ὁ Ἁγιορείτης — Saint Paisios of Mount Athos.
Wikipedia has an article on him.

He was  born Arsenios Eznepidis (1924–1994), was a well-known Greek Eastern Orthodox ascetic from Mount Athos, who originated from Pharasa, Cappadocia. He was respected for his spiritual guidance and ascetic life and many people worldwide highly venerate Elder Paisios, especially in Greece and in Russia.
Venerable Elder Paisios was canonized on 13 January 2015 by the Holy Synod of the Ecumenical Patriarchate, and the church commemorates his feast day on July 12.
The Holy Synod of the Russian Orthodox Church decided at its meeting of May 5, 2015 also to add the name of the Venerable Paisios of Mount Athos to the Menology of the Russian Orthodox Church, establishing his feast day on June 29/July 12, following the Menology of the Orthodox Church of Constantinople.
Answer: This icon is of Saint Paisios of mount Athos (Ο Αγιος Παισιος). This particular icon has him in the traditional orthodox garb while others I've seen also have him in very simply clothing with a beanie.
You can read more about him on the Orthodox Wiki. There's also a good book regarding his life from Hieromonk Isaac as well as a TV show on MegaTV.

Our venerable and God-bearing Father Paisios of Mount Athos or Paisios
the New, of the Holy Mountain (July 25, 1924 – July 12, 1994), also
known as Elder Paisios (Greek: Γέροντας Παΐσιος ο Αγιορείτης), was a
monastic of Mount Athos. An ascetic, he was known by his visitors for
his gentle manner and acceptance of those who came to receive his
advice, counsel, and blessing. His words of counsel continue to be
published. Elder Paisios was canonized on January 13, 2015, by the
Holy and Sacred Synod of the Ecumenical Patriarchate of
Constantinople. The Church commemorates St. Paisios on July 12.


Use of "she" in memes

Question: There is a certain type of memes that contain the phrase "The guy she told you not to worry about". I am confused about the use of "she" on it, since the only person who tells you something is a guy. Is this proper English?
Comment: "She" is some unspecified third party.  In some contexts it works well to make this person female.  In other cases someone might say "This is what your grandmother warned you about" or some such.  There is no strong implication that any "she" ever warned *you* about the "guy" or that *your* actual grandmother ever warned *you* about whatever "this" is.  Rather it's just a way of conveying a bit of (supposed) "folk" wisdom or "common knowledge".
Comment: FWIW, there is another way you frequently hear a "she" in memes... usually in a rather vulgar type of  jokes with sexual innuendo.  Someone might say something like "It's really hard" and the vulgar joke would be:  "that's what she said".  That is not the case in your example, but your title "she in memes" is broader and you may be asking for this second definition as well.
Comment: @HotLicks you answered the title, but 1006a's answer explained the meaning of the meme. I would suggest that the OP modify the title, because the confusion lied with a single expression, not with the feminine subject pronoun used in memes.
Comment: What is this meme you're referring to? I've never seen a meme that contains "the guy she told you not to worry about"…
Comment: I've found this link: [http://knowyourmeme.com/memes/you-vs-the-guy-she-told-you-not-to-worry-about], @JanusBahsJacquet
Answer: The answer that "that" is omitted,(the guy that she told you not...) is true however I might clarify why the "she"
I believe this is an example of a "woman to woman" conversation.
The context would be important. I can imagine this if a woman was going out on a date with a man who passed some limits on making unwanted sexual advances; that the woman that this happened to had felt comfortable accepting his invite because another women who knew him told her "he's a good guy" or vouched for him etc. A guy friend (assuming we're talking about a heterosexual date) would have no real experience about how he would act in private with a woman.
I believe it's pretty normal for a woman to ask another woman about whether it would a good idea to go out with someone. –
edit/addition @Hot Licks made a good comment that if used as a general expression, it doesn't need to refer to a particular incident, the "she" could be an unspecified third party ... he used the example "the guy your grandma warned you about".
Answer: Other posters are right that "she" is doing the telling, about "the guy". Essentially, the phrase means "she told you not to worry about some guy, and this is him." However, there is a specific "she" and a specific (kind of) "guy" implied in the meme.
The full meme is

You vs the guy she told/tells you not to worry about.

This is setting up a competition or comparison between "you" and "the guy (who she said not to worry about)". Key to this meme is in the pictures (Google image search here). They generally juxtapose a regular-looking guy with a much more attractive/younger/more muscular man.
One example compares "you": Curious George cartoon vs "the guy she tells you not to worry about": Harambe, an actual gorilla. Another compares a "pet rock" (a stone with googly eyes pasted on) with Dwayne "The Rock" Johnson, former professional wrestler and action movie star.
Here, "you" is used to address a hypothetical (male) person. The implication is that "she" is "your" girlfriend or wife. "He" is some guy she knows. "You" have felt threatened by him, but she says not to worry (he's just a friend).
The punchline of the meme is that really, you should worry, because he's much more attractive as a potential mate than you are, as illustrated by the images representing each of you.
Comment: Without context, i would have said Tom 22's analysis was also correct, but you actually provided links to the meme, and it is the last line which really explains the (double) meaning behind the words. As for the OP's initial confusion the phrase could be reworded as : "She told you not to worry about the guy, (because) he was only a friend"
Answer: This seems to be a zero-realisation of "that".
"The guy (that) she told you not to worry about"
Comment: In the past, some female told you not to worry about some guy.  So when I talk to you about that guy, I may call him "the guy she told you not to worry about."
Comment: The problem is that the pronoun is "she" even the person who tells you not to worry is a guy. Who is this "she"?
Comment: So from the information you give it sounds like there is guy A, guy B and she. So guy A says: "the guy (B) that she told you not to worry about". So A and She both tell you something about B. That's how I understand it right now.
Comment: I don't know why, I thought that "she" was referring to the guy
Answer: The phrase "the guy she told you not to worry about" is an answer to the implied question, Who is that guy?
Let's call him Mark--"the guy"
Let's call the woman Lola.
Let's call the questioner, who asks "Who is that guy?", Steve.
Steve used to be going out with Lola.  But now Lola is with Mark.  And Steve asks his friend, or acquaintance, "Who is that guy?"
And his friend says: "The guy (Mark) she (Lola) told you (Steve) not to worry about.  (Lola said to Steve, "Don't worry about Mark.  He's just a friend."
The meme seems to be two photos, Steve (the guy who lost Lola) and Mark (the guy who took Lola away from Steve).
The friend could be female, but it's likely a conversation between two men--the friend and Steve--in a bar or similar place where they see Lola and Mark together.

Use of "she" in memes


Why did the woman in End of Time ask Wilf to arm the Doctor?

Question: The only use the gun came of was to destroy the machine and send the Time Lords back in the time war. But couldn't the sonic screwdriver have done the same?
Comment: Bullets are instantaneous, but sonic screwdrivers take a moment.  The woman, FYI, was the Doctor's mum.  She possibly had future knowledge that allowed her to instruct Wilf, knowing the Doctor would need a tool that was fast and decisive.
Answer: Maybe she thought he'd need it as a weapon.
Perhaps she foresaw the situation he'd be in - caught between Rassilon and the Master, each one urging him to shoot the other - but didn't realise until the moment itself that he could shoot the machine instead. (I'm using "foresee" here in the mundane sense that we can always foresee certain events if we're smart enough, not in the time-travel sense.) She wanted him to have the gun in case things got hairy and he really did need to use it to shoot someone. It could easily have all happened differently, say if Rassilon or the Master had been faster to attack him before he could destroy the machine.
Maybe it's another bootstrap paradox.
If there was some timey-wimey stuff involved and she'd actually seen the future - or indeed if her appearance on the television to Wilf was after (in her timeline) the big showdown - then she would know for certain that the Doctor would show up armed with a gun. She told Wilf to arm him just to make sure that what was already going to happen was really going to happen. It doesn't seem to make much sense this way, but hey, bootstrap paradoxes don't. Wibbly wobbly, timey wimey.


How do I create an empty file (0 byte size) in all the directories?

Question: Recently I was asked, in a job interview, "how to create a zero size file [I think that means an empty file] in all the folders of the file system?"
I found the question a bit strange, I thought of a loop to list all the directory and use touch or maybe go to the root directory and use touch with a recursive option. Do you have any ideas?
Comment: That question is strange in that it's asking for something completely useless. That said, it's not at all strange for an interview question in that it's asking for something completely useless.
Comment: There are certainly more useful cases for this than @ikkachu thinks.
For instance, a git template directory structure.
Git just handles files, not directories, which just come as kind of a "side-effect" of file paths. Therefore, having at least one file in each directory is a must to have otherwise empty directories make it into a git repo.
There are certainly more real-life use cases for such a requirement.
Comment: Your ideas look good and are a good starting point!
Answer: That could be ...
find . -type d -exec touch {}/emptyfile \;

-type d means "directories"
execute the command touch  and create a file named "emptyfile"
the {} substitutes what is found  as a result from find. The / is to make it a valid path+filenane and the escaped ; is to close the command (otherwise it becomes "emptyfile;")

result ...
rinzwind@schijfwereld:~/t$ mkdir 1 2 3 4 5 6 7 8 9 10
rinzwind@schijfwereld:~/t$ ls -ltr */*
ls: cannot access '*/*': No such file or directory
rinzwind@schijfwereld:~/t$ find . -type d -exec touch {}/emptyfile \;
rinzwind@schijfwereld:~/t$ ls -ltr */*
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 5/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 9/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 1/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 8/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 3/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 2/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 10/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 7/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 6/emptyfile
-rw-rw-r-- 1 rinzwind rinzwind 0 apr 16 19:57 4/emptyfile

Mine works but the answer from Peter Cordes is better :)
Comment: I was curious if we can speed this up with `-exec ... +` in GNU find.  No, `{}/emptyfile` isn't supported with `+`, only `;`.  So you'd want `find -print0 | xargs -0` to avoid starting a `touch` process for every directory in the FS (which is presumably a lot, and if you're lucky some of the IO will be contiguous and might not be a bottleneck.)
Comment: @PeterCordes thanks :D Oh and good one on your answer. I will -not- alter mine as that would be me changing my answer to yours ;-) I assume TS will remove the accepted answer and accpets yours,
Comment: (I posted an answer with `find -printf | xargs -0` that only has to run touch once per ARG_MAX files created.)
Comment: Awesome answer! Would you mind explaining what you mean by "the escaped ; is to close the command"? What if you leave the semicolon out?
Comment: @TheUnknownDev: Then `find` would complain that there was no end to the `;`-terminated or `+`-terminated series of args that follow the `-exec`.  Try `find -exec echo '{}'` in a test directory.  You need to tell it whether to batch args onto one command, or run the command separately for each file, by using `+` or `\;`.
Answer: To do this efficiently, you want to avoid spawning a new touch process for every file you want to create.
This is part of what xargs is good for, batching args into chunks as large as possible, while small enough to fit on the command line of a single process. (Modern Linux has pretty huge limits so it's rarely a problem anymore, xargs rarely has to actually run your command multiple times to handle all the args, but it also lets you avoid having filename subjected to shell word-splitting like in foo $(bar).)
We can use find's own -printf to format additional stuff onto each directory path, specifically the filename we want.  The xargs -0 uses a '\0' byte as a separator so this is safe with arbitrary filenames, even including newline.  If you weren't using a custom printf format, you could just use -print0 to print 0-separated paths.
  find . -xdev -type d -printf '%p/empty\0'  | xargs -0 echo touch

(in a test directory, that prints touch ./empty ./2/empty ./1/empty, not touch ./empty,  touch ./1/empty, etc. so it's running one touch for multiple files.)
mktemp only accepts a single template, but if we want some randomness in the naming to reduce the chance of just touching an existing file by accident, you could do this.
  find . -xdev -type d -printf "%p/empty.$RANDOM\0"  | xargs -0 echo touch

Note that it's the same 15-bit random number in every directory, because "$RANDOM" is expanded once by bash before find starts.  You could use $(date +%s).$RANDOM or whatever you want as part of the filename.

With an SSD or tmpfs, CPU might be the bottleneck here.  Or if you're lucky and metadata I/O on a magnetic disk happens to be mostly contiguous because you're touching every directory (and allocating a bunch of new inodes), even a rotational disk could maybe keep up somewhat decently.  Although you're probably not touching directories in the order they're laid out on disk.
And regardless, there's no need to waste lots of CPU time starting processes for something that should be I/O limited.

Ways that don't work:

find -exec touch {} + batches args, but -exec touch {}/empty + refuses to work when {} isn't by itself.

xargs -I {} echo touch {}/emptyfile implies -L 1 (only process one "line" of input for each invocation of the command, whether that's an actual line or a 0-separated string with xargs -0).  So we can't use xargs to modify each arg if we want to take advantage of it for batching args.
Answer: find /mountpoint -xdev -type d -exec mktemp -p {} \;

A quite obvious aspect is you may or may not need root access to actually create files under /mountpoint.
There are two non-obvious aspects:

You said "in all the folders of the file system", so we start from specific /mountpoint and do not enter other filesystems (-xdev).
If there are other filesystems mounted deeper in the tree, e.g. in /mountpoint/foo/another/mntpoint, then -xdev will prevent us from entering them. Still these filesystems may mask entire subtrees that belong to the filesystem in question. In the best case a filesystem mounted in /mountpoint/foo/another/mntpoint masks an empty mntpoint directory of the filesystem in question. So we cannot easily reach "all the folders of the file system".
With root access we can mount --bind /mountpoint /somewhere/else beforehand. With --bind (as opposed to --rbind, see man 8 mount) mntpoint deep in /somewhere/else will not replicate the submount from /mountpoint/foo/another/mntpoint. This way we can access mntpoint that belongs to the filesystem in question.
This is still not enough. If the filesystem in question is Btrfs then possibly /mountpoint gives access to some subvolume but not to the entire filesystem (compare this question).
In general a subtree of any(?) mounted filesystem can be bind-mounted to another directory. After you unmount the original mountpoint, the other directory gives access to a fragment of the filesystem. Our /mountpoint may be "the other directory" in the first place and therefore it may not give access to the entire filesystem. You don't know this in advance.
The conclusion is: if the phrase is strictly "all the folders of the file system" (as opposed to "all subdirectories" which is quite straightforward) then you need to make sure you don't miss any part of the filesystem. Only then use the find … command given at the beginning of this answer.

Solutions with touch emptyfile or so do not necessarily "create a zero size file". What if the interviewer has already created a non-empty emptyfile in one of the directories? A trap! If non-empty emptyfile exists then touch will neither create it, nor the file will be empty. Effectively you will strictly fail to "create a zero size file" in the directory with the trap. This is the reason I used mktemp. The tool will try hard to really create a new empty regular file.
Answer: This will create a unique name empty file in each directory starting with and descending from the current directory including hidden directories if you want to.
First, get the directories list with tree.
Then, pass them to xargs like so:
tree --noreport -dfi | xargs -L 1 -I {} echo touch {}/emptyfile_"$(date +%s)"

Or, to a while loop like so:
tree --noreport -dfi | \
while read -r d; do echo touch "$d"/emptyfile_"$(date +%s)"; done

Or, even to a for loop (if the directory names contain no spaces) like so:
for d in $(tree --noreport -dfi); do echo touch "$d"/emptyfile_"$(date +%s)"; done

echo is there to prevent unintentional creation of files while testing. When satisfied with the output, remove echo to create files.

--noreport omits printing of the file and directory report at the end of the tree listing.

-dfi  lists directories only, prints the full path prefix for each directory and makes tree not print the indentation lines.

Use -dfia instead of -dfi to include hidden directories as well.

"$(date +%s)" appends current timestamp to filename like this emptyfile_1618679443 making it unique from existing files in each directory. Notice you can change this to a random number like 67639871206723 if you need a fixed file name.

xargs -L 1 -I {} reads the input one line at a time and assigns it to {}.
Comment: Can't you use `find -type d -print0 | xargs -0 ...` to let it pass multiple args to each invocation of `touch`?   Seems to me if you're going to use xargs instead of `find -exec`, avoiding one process startup per directory would be good.
Comment: @PeterCordes That is possible like so `find -type d -print0 | xargs -0 -I {} echo touch {}/emptyfil` and there may be other possible ways as well... but `find` is already discussed in the other answers. I wanted to shed some light on `tree` which is a remarkable tool with great potential... Just for diversity sake. Thank you for your comment.
Comment: xargs `-I` options apparently implies `-L 1`, unfortunately, running touch once per arg.  (Apparently a 0-separated string counts as a "line").  And `-I {} -L 1000  echo touch {}/emptyfile` doesn't work either, it prints `touch {}/emptyfile . ./2 ./1` if run in a test directory.
Comment: @PeterCordes I got what you mean the first time :) ... It would be nice if it works that way... but, ARG MAX might be reached easily for the OPs purpose and touch needs some format like `touch {1/,2/,3/}emptyfile` to address multiple directories and then ARG MAX  awaits
Comment: Part of xargs's job is to break up input into arg-max chunks.  But apparently only if we don't need xargs to modify each arg.  Finally came up with a solution using `find -printf` to add stuff to each pathname: `find . -type d -printf '%p/emptyfile\0'  | xargs -0 echo touch`
Comment: Wrote that up as an answer.
Comment: @PeterCordes It is worth an answer and you earned my **upvote** :)


When are accessibility features required?

Question: I've mostly done intranet development and never worried about accessibility features.  For a public website, is there certain types of sites or data where specific accessibility features are legally required?  Or is it always just my decision based upon my targeted demographic?
Answer: If you are developing a site for the government then (depending on your country) there will probably be mandatory requirements that you implement such features. But there is also legislation that covers all websites, for example in the UK there's the Disability Discrimination Act (DDA):

Section III of the DDA, which refers to accessible websites, came into force on 1st October 1999 and the Code of Practice for this section of the DDA was published on 27th May 2002.
Comment: This is a good point, federally funded institutions are required by law to provide accessible content.  I deal with this at OSU all the time.  Long story short, dont forget your alt tags and label's for inputs on forms! :-)
Answer: According to this page in the US there are no laws concerning website accessibility for non-government websites.

In the United States, there are no laws binding business to conform to any level of website accessibility. Many government and government-supported organizations are bound by Section 508 of the Rehabilitation Act Amendments of 1998, but these rules do not extend to private business concerns.

I don't think "required" should be something you see as being optional. Every site should be as accessible as possible. The very next sentence in the above quote is:

However, even if you conduct business only in the United States, this is little reason to fail to conform to common website accessibility standards found in the WCAG 2.0.

Wikipedia had a great way of saying it (emphasis mine):

When sites are correctly designed, developed and edited, all users can have equal access to information and functionality.
Answer: As others have mentioned, legislation on the matter depends on your local laws, though generally speaking there will be a legal requirement for government sites if you are in the US or Europe.
If your site is a web application might ever be of interest to large organisations like a bank, then they will probably insist on conformance with the WCAG standards - our clients certainly insist on this for all internal and external bespoke work (and it is a deciding factor if choosing between external off-the-shelf solutions).
Legal and contractual issues aside: if you do, or plan to do, web design or web programming for hire I recommend making all your work accessible where possible and downgrade gracefully when not - that way your future portfolio has greater chance of looking impressive to clients who know about such things. And remember that there is more to accessibility than just making it browsable by the blind using screen readers, and even then try not to assume what people will want to browse - a user that has been blind since birth might still find something of interest in a good art gallery site as it will no doubt contain interesting facts about the pieces, artists and places & people depicted.
Of course "just my decision based upon my targeted demographic" is how most sites seem to be run in this area, including some of my output if I'm completely honest!
Answer: This is essentially a legal question and you should ask a lawyer if you want an authoritative answer on what your local laws say on the matter.
Accessibility laws are however rarely enforced (especially against non-governmental sites) and you are more likely to catch flak from special interest groups over a lack of accessibility than any legal trouble. If you are designing a site where the user are somewhat captive (i.e. have no viable online alternative or it is difficult/expensive to move to an alternative) then you should most definitely view accessibility as a major concern. If your users can easily choose alternatives, then you need only worry about lost traffic.


TLS and DNSCrypt

Question: DNS traffic (requests and responses) has been encrypted by DNSCrypt.  In this case, is hostname (https://www.example.com /destination IP adress) readable in transit by a third party during my TLS session? Actually i would like to clarify what does make hostname visible to others - unencrypted DNS traffic only or both unencrypted DNS and initial request to the destination server in the TLS session context?
Answer: From the DNSCrypt website:

DNSCrypt is a protocol that authenticates communications between a DNS client and a DNS resolver. It prevents DNS spoofing. It uses cryptographic signatures to verify that responses originate from the chosen DNS resolver and haven't been tampered with.
[...]
Please note that DNSCrypt is not a replacement for a VPN, as it only authenticates DNS traffic, and doesn't prevent "DNS leaks", or third-party DNS resolvers from logging your activity.

So yes, your DNS requests will still be readable since they are just authenticated and not encrypted.
What makes DNS request readable is that's it is not an encrypted protocol to start with. In the case of the TLS session, the IP of the server (you got from the DNS answer) is used to establish the connection. Thus a reverse DNS lookup can reveal the address of the server your are connecting to anyway. Though the content of the communication will remain confidential in normal conditions of operation.
Comment: This isn't correct. DNSCrypt exchanges between the client and server are encrypted. What they mean is upstream communication from the server is not encrypted. Neither is communication between a standard DNS client and the DNSCrypt proxy on the local network (this is the usual configuration since the system resolver is rarely DNSCrypt capable).
Comment: The dnscrypt protocol seems to be in some limbo state right now anyway. Though, according to my extract here, my answer does make perfect sense. Maybe it has been rendered obsolete by a new version of the protocol, this is 2 years old already after all.

TLS and DNSCrypt


Cost for Setup and implementation

Question: Hi can anyone give me a rough figure please? If I were to pay a developer to set up Civi CRM into Wordpress and just get it up and running, we host it ourselves and maintain it ourselves, but they do the initial setup and train us how to use it? And is there anyone here that can offer that service?
Many thanks
Comment: Where are you based?
Comment: Even a rough figure would need some well documented requirements as otherwise there would be far too much hand-waving involved leaving a lot of uncertainty for both parties.
Comment: Unfortunately, it is not possible - for any implementation - to estimate costs in advance. Indeed, this depends on many different facets. Among others, the number of processes you want to implement (contacts, members, participants, payments, etc). Can all processes be supported with standard CiviCRM or is customisation required? Do you already have your data in order or will cleansing it be part of the implementation? Should there be an integration with one or more websites? Does your organisation have enough time available to support during configuration and testing, etc. etc.
Comment: The implementations we (CiviCooP - Netherlands) do have a range between 2,500 and 100,000+ euros. The implementation period can be between 3 months to several years. With the latter, we continuously put parts of a process live during that period. If you want to know a bit more, feel free to get in touch.
Answer: You may want to consider checking out CiviCRM Spark, see https://civicrm.com/ .
It is a hosted version with flat rate pricing. Very reasonable to start with.
One limitation is that there's not a default connection to WordPress. But, if you sign up and like it, there are partners who are Spark migration experts that can help you move to a full featured CiviCRM website using WordPress.

Cost for Setup and implementation


Why we need IP address on LAN if switches can't read IP addresses

Question: A beginner question: Why we need to assign IP addresses on LAN if switches are not able to read them? Because of ARP (Address Resolution Protocol)? But Switches can't send ARP requests (switches can't read ipv ), right? Who sends the ARP request then?
Comment: Fortunately the internet isn't a massive switched LAN.  Routers break up the internet into managable layer2 chunks; routers need IP and ARP, which is why your computers need IP addresses as well.
Comment: DO you mean why you have to assign an IP address to an ethernet switch ? (since "assign IP addresses on LAN" isn't a sentence that makes sense)
Answer: An IP address on a true layer 2 only switch is used for management (accessing the CLI remotely, sending SNMP traps, logging, TACACS/RADIUS, etc.).  The IP address on the switch is in no way required for the switch to actually do its job, which is to switch frames.
Answer: If i read your question as "why do I have to assign IP addresses to my clients" the answer is: You don't have to. There are other protocols then IP (I guess you mean IPv4 because you are mentioning ARP). You can use IPv6, IPX, Appletalk, ...
You need some protocol on Layer-3 (like IPv4, IPv6, IPX, ...) so that your hosts can talk to each other and to other parts of the network.
As mentioned by others: On a Layer-2 switch IPv4 is only used for management. A pure Layer-2 switch should not care about protocols above layer-2 for switching packets.
As a side note: There where / are some older chips used in switches which can't do Ethernet multicast and can't be used in (most) IPv6 environments.
Comment: The question may include ARP but that is question inside the question. Better read the original question again.
Comment: It's pretty crazy to lead with the notion that he doesn't need IP, since the question includes ARP.  IPv6 uses Neighbor Solicitation instead of ARP


Looking for a taxonomy of web attacks

Question: I am working on semantic representation of firewall rules but could not find a good taxonomy of Web attacks in terms of HTTP protocol. I do find web attack classification i.e XSS attack, SQL attack.
Answer: Your question is a bit vague, so I don't know exactly what you are looking for. However, in this paper a taxonomy based on HTTP methods is described:
http://184.108.40.206/psnl/publications/2008ICHIT_taxonomy.pdf
Answer: The attacks I know about are:

SQL injection
Cross site scripting (XSS)
Cross site request forgery
Session hijacking
Bruteforce attacks
Executable code in uploads
Command line injection
Session fixation

I think if anyone has something close to a taxonomy for web based attacks it will be OWASP.
Answer: The MISP project has assembled a large number of descriptors to annotate IOCs in the form of a taxonomy, where each tag is a (namespace, predicate, value) triple.
Those are defined in JSON format here:

https://github.com/MISP/misp-taxonomies, https://www.circl.lu/doc/misp-taxonomies/
https://github.com/MISP/misp-galaxy, https://www.misp.software/galaxy.html

Both of those are designed to be used by non-MISP tools.
From those lists, these may be esp. interesting.  (Found by searching for sets including XSS on the taxonomy listing page).

https://www.circl.lu/doc/misp-taxonomies/#_circl
https://www.circl.lu/doc/misp-taxonomies/#_enisa
https://www.circl.lu/doc/misp-taxonomies/#_europol_event
https://www.circl.lu/doc/misp-taxonomies/#_veris

The "Mapping of Taxonomies" at the bottom of that page provides a nice summary of similar concepts referenced in multiple taxonomies (e.g. all categories with a concept for ddos):
https://www.circl.lu/doc/misp-taxonomies/#_mapping_of_taxonomies

Looking for a taxonomy of web attacks


Creating text file from as2

Question: I'm trying to find a way to write to a text file from as2. I don't want to use any php or asp because my app needs to run without an internet connection. As3 has FileReference.save() and judging by the amount of searching I've done, as2 doesn't have that simple of a solution. Does anyone have a way even if its hacky to write to a txt file from as2?
Answer: Unfortunately, there are only limited options for writing to a local disk from AS2:

You can store data locally using the SharedObject class, but this has
a limited size (basically it's a cookie), and could be disabled by user preferences.
If you are running a local web service, you could conceivably use
LoadVars() with PHP, but that's very hack-y and you'd be limited as to where
your PHP script could write files to. Ditto for running other local server services
such as ColdFusion...
You could make a flash-based desktop app using something like Zinc or
mProjector - I've not used either of these, but I'm guessing they have some
support for local file I/O. They're not free though (c.
$400?). (EDIT: other alternatives are discussed here, especially HippoHX)
(EDIT) If you're using OSX and are happy for a 'manual' (rather than automated) option, you could use PrintJob() and "Save as PDF..." to output a PDF file, but obviously that's 'human-readable text', not really a 'text file' as such (OK, so it's a bit of a stretch, but I thought I should include this for completeness :).

That's all I can think of - perhaps there are other solutions? I'd be interested to know.
Hope this helps.
Comment: You can also write javascript to use HTML5 local storage or Google Gears, though that it still not a text file, it should give you enough storage if you are not happy with Cookies, which are the only persistent options if you are 100% Flash player in browser.
Comment: @jarret, the SharedObject that Richard mentions is a kind of local storage for serialized object data, by default 100 K, but can be larger if the user allows it. It has been around since Flash Player 6, in 2002, and was used for local storage by some JavaScript libraries, before Google Gears and HTML5 local storage was around.

Creating text file from as2


Would the Secure Enclaves such as Keystone or Intel SGX obviate the need for cryptography

Question: Would the use of Secure Enclaves such as Keystone or Intel SGX obviate the need for cryptography? Rendering cryptography irrelevant in the decades ahead?
Comment: Tell me how a secure enclave would encrypt my emails or IRC messages...
Comment: Regardless of the answer, I think this is a valid question in a suitable place. Instead of down voting, we should give convinable answers.
Comment: precisely and exactly. The answers are voted so many times.
Answer: No, Secure Enclaves do not obviate the need for cryptography.
For a start, Secure Enclaves typically receive their input data integrity-protected or/and encrypted, which requires cryptography both within the enclave, and outside (perhaps in another enclave).
Even if we turn the question to "Would the use of Secure Enclaves obviate the need for unrelated cryptography", the answer is still no. Secure Enclaves aim at creating a virtual secure computer not under control of the person holding the enclave, and that does not match all use cases. Even in an Orwellian world where Secure Enclaves are the only form of secure data processing permitted, I bet both a master of that society, and any rebel, will want to use raw cryptography. And I see no practical way to prevent that, as long as programming remains a thing. We can do AES-256 or RSA-4096 in any computer language, including a spreadsheet.


Can a simulated Universe simulate Special Relativity

Question: I know there are theories (or postulates) that hold that our Universe could be a simulation.  I was wondering, if Special Relativity states that two events which are not causally linked can be judged to have happened simultaneously or not, depending on the reference frame of the observer, can someone (or something) simulating the Universe reproduce this effect (if one observer says that two events were simultaneous, and the other disagrees, and they are both equally justified in their claims, what would the simulator conclude regarding their simultaneity)?
Comment: If our Universe were a simulation, then all bets are off regarding what happens in 'the real Universe'. This is purely metaphysics.
Comment: I think there is a problem that you won't want to speak of computational complexity.  Computational science doesn't often give answers in terms of you "can" simulate it or you can't.  Instead, they formalize the amount of computations needed to solve a problem that is so-large.  For instance, that the problem is n^2, or n!, but even this would be very difficult to answer.
Comment: Also, the whole framework of scientific knowledge doesn't make sense if we're postulating that our Universe isn't 'the real one'; you might as well give up on all knowledge we have of our 'fake Universe'.
Comment: This may be better suited for Philosophy.SE.
Answer: The actual question in this question, is a good physics question. Freely interpreted, it basically asks if SR effects, in particular time-ordering of spacelike separated events, make it difficult or impossible to simulate physics.
The answer to that is no. An "external" Simulator (be it a particle physicist or the hypothetical people simulating our universe) can set up a simulated spacetime so it reproduces the SR effects which are internal to the simulation.
In particular, the spacelike timeordering of events is ambiguous because of the Lorentz transformations applicable on the Minkowski space (that is, the normal 4-D space we live in) that "custom transform" all coordinates in the spacetime for a certain observer at a certain point and speed, which can mix up time-ordering for spacelike separated coordinates.
This is true for the Simulator as well - she will not necessarily agree about the time-ordering with the observers inside the simulation - but this contributes no paradox or problem, because it's the definition of time and time-ordering inside the simulation which is the real ambiguity in that case. The simulator can just pick one particular transformation frame to program the simulation with (or similar).


Was Khalid ibn Walid a bad Muslim?

Question: Khalid ibn Walid slaughtered the Banu Judhaimah, when this news reached the Prophet (ﷺ) he said: "O Allah! I am free from what Khalid has done." (Sahih al-Bukhari 4339). Also he killed Malik ibn Nuwayrah and slept with his wife, 'Umar wanted to stone him for adultery and punish him for killing a Muslim and called him an enemy of Allah. (Tarikh Al-Islam 3/36, Jami Al ahadith 13/94, Tarikh at Tabari 2/274)
Comment: Salam and welcome to IslamSE the Q&A site about Islam. To learn more about our site and model consider taking the [tour] and checking our [help]. This question is kind of opinion-based it would make sense if you could give it a focus: Which perspective you are looking for or a focus on why he should be a bad or good Muslim.
Answer: According to the Ahl al-Sunnah, Khalid bin Waleed was a good Muslim, further he was a Sahabi and the sword of Allah - which is the title that the Prophet ﷺ gave to him.

نعم عبد الله وأخو العشيرة خالد بن الوليد وسيف من سيوف الله سله الله عز وجل على الكفار والمنافقين
What a good slave of Allah and a brother of the tribe Khalid bin al-Waleed is, he is a sword from the swords of Allah that He has unsheathed against disbelievers and hypocrites.
— Musnad Ahmad ,  Jami at-Tirmidhi - corroborated in Saheeh Bukhari

لا تؤذوا خالدا، فإنه سيف من سيوف الله صبه الله على الكفار
Do not offend Khalid, for he is a sword from the swords of Allah which Allah has drawn on the disbelievers
— Saheeh Ibn Hibban

As for Bani Jadhima, the Prophet ﷺ sent Khalid with an army to fight them. However they accepted Islam, but they did not express their acceptance in a clear way rather they said Saba'na whose meaning is ambiguous. So Khalid did not spare them. This was a mistake of ijtihad and Khalid did not willfully transgress the law. A person is not accountable for making such a mistake in his judgement. We know that the Prophet ﷺ did not enforce any legal punishment (execution for murder) on Khalid because it was a mistake.
As for Maalik ibn Nuwayrah, he was an apostate: He refused Zakat and he referred to the Prophet ﷺ by calling him صاحبكم ('your' companion) which displayed his own disbelief. Khalid was either correct in killing him. Or he should have established more clear evidence or waited for a command from the caliph - in which case it is again a mistake of ijtihad. And as for sleeping with his wife, Khalid either married her or made her a concubine, there was nothing wrong with that. Any reports on this marriage are weak, such as what you have cited about Umar's statement. Again Abu Bakr did not impose the legal punishment (execution) on Khalid because it was not willful transgression.
Comment: How is the narration about 'Umar wanting to stone him and calling him an enemy of Allah weak?
Comment: Show us the chain. A narration is considered weak when its transmitters are not trustworthy or when the chain has interruptions.
Answer: According to Shiite view, Khalid Ibn Walid was not a good Muslim.
Prophet sent Malik ibn Nuwayra to collect alms taxes. However, before he could returned, the prophet (p.b.u.h.) had already passed away. Upon learning that Abu-Bakr hold the the title of caliph instead of Ali illegitimately, he denied to give the taxes to Abu Bakr. Khalid ibn Walid was sent and he killed him and within the same day, he slept with his wife, which is a grave sin according to  Qur'an and common Islamic jurisprudence.

The wives of men who have died must observe a waiting period of four months and ten days; [Al Baqara:234]

Personality of a person should be checked completely from Islamic perspective rather than for a specific time and military commander abilities. This can be inferred from this verse regarding hypocrites :

And whoever of you reverts from his religion [to disbelief] and dies while he is a disbeliever – for those, their deeds have become worthless in this world and the Hereafter, and those are the companions of the Fire.

Malik ibn Nuwaiyra was a Muslim and not an apostate , which he confirmed by saying shahada during his death moments.
Comment: Source for Maalik ibn Nuwayrah saying the Shahadah upon his death?
Comment: @Hisham Sorry, the last line which I said is not only according to Shiite view. It's well known both among Sunni and shiites. So I suppose there's no need of any source , right ? And if you have never seen that how history can be distorted for political or other reasons and to mislead people, just read the Wikipedia page of Malik ibn nuwayra and you'll be awaked.

Was Khalid ibn Walid a bad Muslim?


How to explain imaginary kinematic viscosity of a vacuum?

Question: According to the connection between the Schrödinger equation and the Navier-Stokes vacuum has the imaginary kinematic viscosity $\frac{ih}{2m}$. How to explain it? For the formation of the viscosity of the vacuum environment is needed, how to describe its properties?
Comment: Evgeniy, why are you posting short questions on this site then immediately answering them yourself?
Comment: This is a very important question about the properties of a vacuum and everything bypasses it.
Comment: This has been considered many times before, eg. https://physics.stackexchange.com/q/281145/
Comment: The properties of imaginary kinematic viscosity or thermal diffusivity were not considered in this article.
Comment: In this topic, I presented an almost experimental fact obtained from the connection between the solution of the Schrödinger and Navier-Stokes equations. This fact requires an explanation. It doesn't matter if the result is ether, but perhaps dark energy and dark matter. I have only a rough theory on this score. Theorists will respond, this may shed light on the properties of vacuum. The relationship between the solutions of the two equations is described in the topic "How to think about speed or velocity of an electron (in an atom)?"
Answer: Honestly, I know the answer to this question, but I can not publish it, it is in Russian. In addition, I wonder what others think about it.
Use the formula for kinematic viscosity for gas. The average particle velocity is set equal to the speed of light in a vacuum. The length of the free path is estimated from the size of the particles describing the medium and their concentration. A particle is considered a multipole consisting of a particle and an antiparticle. The mass of a particle is considered as electromagnetic. The density of a rarefied gas is assumed to be equal to the density of a vacuum of $10^{-29}g/cm^3$. From these relations one can determine the mass of particles and the multipole arm. These are the main ideas. As a result, the relations of quantum mechanics should be obtained, but this cannot be explained on the fingers. This follows from the ratios of the dimension, all values have the dimensions of quantum mechanics, so the dimension of the energy is correct. The coefficient also turns out to be correct.But there are new ratios.
Thank you very much for the information on the relationship between the temperature equation and the Schrödinger equation, and between the Schrödinger equation and bending waves. I did not know about these analogies. But my connection between the Schrödinger and Navier-Stokes equations with the imaginary kinematic viscosity of a vacuum is also valid. But the connection between the definition of temperature and the Schrödinger equation requires an assumption of imaginary time, just as imaginary kinematic viscosity is required. These analogies require new values of the coefficients of vacuum thermal conductivity. I will think about it, and I think the result will be similar to my result.
In fact, the thermal equation looks like this
$$\frac{\partial T}{\partial t}+\vec V \nabla T=\chi \Delta T+\frac{\nu}{c_p}(\frac{\partial V_i}{\partial x_k}+\frac{\partial V_k}{\partial x_i})^2$$
Only in the case of a stationary medium is it similar to the Schrödinger equation. In addition, the time remains valid and not imaginary as described in the proposed article. The coefficient of thermal diffusivity becomes imaginary, and this changes the content of the article. We are looking for a medium with imaginary kinematic viscosity or with imaginary thermal diffusivity. And this is a completely different formulation of the problem.
Comment: I add that the properties of the environment describe dark matter and dark energy. The ratio of the imaginary part of the mass to the real part corresponds to the ratio of the mass of dark energy to dark matter.
Comment: Vacuum is not empty space, it is a rarefied gas with a density $10^{-29}g/cm^3$. Dark matter and dark energy form this density. Dark matter and dark energy consist of vacuum particles discovered and described by me.


Building KDE from source?

Question: I am trying build the kde from the source available on https://www.kde.org/info/4.14.3.php, but I am a bit lost about the order of installation of the packages listed on the page, which would give me a hint about the minimum required packages to make the system work. Anyone can indicate to me some link with this order?
Answer: The last time I had to build KDE from scratch I used this as a guide. It is from Linux From Scratch (in particular Beyond Linux From Scratch) and should help you through everything.
A quick copy and paste shows this order:

Automoc4-0.9.88
Phonon-4.8.2
Phonon-backend-gstreamer-4.8.0
Phonon-backend-vlc-0.8.1
Akonadi-1.13.0
Attica-0.4.2
QImageblitz-0.0.6
Polkit-Qt-0.112.0
Oxygen-icons-4.14.3
Kdelibs-4.14.3
Kfilemetadata-4.14.3
Kdepimlibs-4.14.3
Baloo-4.14.3
Baloo-widgets-4.14.3
Polkit-kde-agent-0.99.0
Kactivities-4.13.3
Kde-runtime-4.14.3
Kde-baseapps-4.14.3
Kde-base-artwork-4.14.3
Kde-workspace-4.11.14

Good luck!
Comment: quick question: I really need install both Phonon-backend-gstreamer and Phonon-backend-vlc? If I prefer vlc, I could install only this last one?
Comment: @KleberMota honestly, I don't know. I prefer vlc as well, but last time I built KDE I did both.
Answer: You want to follow these instructions: Building KDE Frameworks 5 or Building KDE SC 4.x.  These guides use a very handy script called kdesrc-build.  It is a tool provided by the KDE community to automate and simplify building and updating KDE from source.  It uses simple text file to configure exactly what you want to install and how you want to install it.  It also helps handle behind-the-scenes stuff like renames, splits, or merges in the KDE git repos.

Building KDE from source?


In terms of scale, where does the concept of Reynold's number cease to have meaning?

Question: The Reynolds number is classically described in terms of pipe geometries but its use has also been usefully extended to other more complex surface geometries to predict transitional flow behavior. But is there a surface geometry of scale so small that Reynold's number ceases to have meaning?
Comment: Yep... http://en.wikipedia.org/wiki/Knudsen_number.  Among other things.
Answer: The answer of user3823992 is correct: Reynolds number will cease to have meaning when the hypothesis of continuum mechanics will cease to be verified. To complete his answer, if the characteristic length scale of the studied geometry is close to the free mean path (i.e. Knudsen number close to 1), you can no longer consider the Navier-Stokes equations to solve your problem. And so Reynolds number is not definable.
To go further, even if you are unable to determine a characteristic length scale to your geometry, I would say the Reynolds number never cease to have meaning.
The sense of the Reynolds number is to quantify the ratio between inertial forces and viscous forces. The common definition is $Re=\frac{UL}{\nu}$ but it can be seen as $Re = \frac{(u.\nabla)u}{\nu \nabla^2 u} = \frac{\textrm{inertial forces}}{\textrm{viscous forces}}$. It will obviously give back the first formula by taking some characteristic length scale of your flow and replace it in the formula.
Also even if there is no characteristic length scale in your specific geometry, you should be able to quantify each force and find the Reynolds number of the flow. Depending on its value, the flow will be seen as laminar, transitional or turbulent.
Answer: To add to Lalylulelo's excellent answer, the Reynolds number only has meaning with respect to a particular flow geometry.  That is, it's only useful in comparing two flows of the same configuration.  A Reynolds number corresponding to laminar flow in a pipe geometry might correspond to unstable or turbulent flow in some other geometry (never mind the fact that the other geometry may not have an obvious scale length that corresponds to the pipe diameter).
Answer:
But is there a surface geometry of scale so small that Reynold's number ceases to have meaning?

I want to give an example where the "scale" doesn't necessarily mean physical scale. To do this, I will consider increasing altitude in Earth's atmosphere, therefore decreasing density.
Consider increasing altitude at which a plane (or a rocket) is moving. We'll keep both velocity and temperature constant. These assumptions are poor, but they go in opposite directions so an accurate revised picture has mixed implications. I will use D as the characteristic linear dimension of the craft, $\rho$ is the atmosphere density at that altitude, and $d$ is the air molecular diameter.
$$ Re = \frac{ \rho V D }{ \mu }  \\
 Kn = \frac{ k_B T }{ \sqrt{2} \pi d^2 P D } $$
As we increase altitude, using an isothermal model, pressure and density will decrease. This will be dictated by the ideal gas law (again, a gross assumption, but let me continue), which I will write in the form below. Let $h$ be the altitude, which we will write pressure and density as functions of. Let $H\approx 8 km$ be the characteristic height of Earth's atmosphere. To a first approximation, the viscosity doesn't change. In ideal gas models, it is generally dependant on temperature, and we're taking that to be constant.
$$ P = R_{specific} \rho T \\
T = \text{ constant} \\
P(h) = P_0 e^{-h/H} \\
\rho(h) = \rho_0 e^{-h/H} $$
With this, we can easily revise the forms of the Reynolds and Knudsen numbers. Here, $Kn_0$ and $Re_0$ are the atmospheric values at sea-level.
$$ Kn = Kn_0 e^{h/H} \\
Re = Re_0 e^{-h/H} $$
Interestingly, the flow around a high-altitude plane or a rocket transitions to be more laminar, while at the same time, the molecular path length between collisions grows to larger than the scale of the craft itself.
These physics are relevant if you look at concepts for an orbital atmospheric scoop to collect gas for propellant. While the regime would be transitional (Re close to 100 or so) for a small sattelite, it doesn't matter because the molecules move in straight-line paths. The high orbital velocity then causes some substantial collimation, and you wind up with the best candidate geometries to be more like long straws than funnels because the traditional fluid mechanics rules just don't apply until the density can be increased.
This low-density situation is sure to come up in many other important scientific fields as well, like low density plasmas. So a high Knudsen number could be a matter of small physical scale, but low density can put it at unity at fully macroscopic scales.


PHP Mail() Linux Setup

Question: I have an Apache server with php installed on it.  It is a Linux machine running openSUSE v. 11.3.  I have a php script that uses the mail function and I have edited the php.ini file to set the sendmail path to /usr/sbin/sendmail which I believe is correct.  I have also restarted the server so the changes take effect.  I'm now lost on what to do.  Any further direction would be helpful.  Thanks.
Comment: Was your MTA already configured?  What MTA do you have installed?  Many different MTAs provide a sendmail binary for compatibility.
Answer: I don't see the question in here. Just send mail with the mail() command. That's it.

PHP Mail() Linux Setup