What kind of visa does a citizen of the Philippines need for Guadeloupe?

Question: I am a citizen of the Philippines and would like to enter Guadeloupe for tourism. What kind of a visa do I need?
Comment: What is your citizenship? What is the purpose of your visit? Without that information, we can't possibly answer. And did you try Googling for "Guadeloupe visa"? It's always better to rely on official sources of information.
Comment: What is your citizenship?
Comment: I am a filipina and I will go to Guadeloupe for tourist. BTW thank you for your suggestions.
Answer: Guadeloupe is an Overseas Department of France. You can check the current entry requirements on the website of the French Ministry of Foreign Affairs https://france-visas.gouv.fr/web/france-visas
Note that you need a visa that's valid for Guadeloupe. A visa for mainland France (Schengen visa) is not valid to enter Guadeloupe and other French overseas departments and territories.


Google - DFP SB login error

Question: I'm trying to sign up for DFP small business service with an enabled AdSense account.
After submitting with the apply form, I am still unable to log into DFP account and keep seeing this error:

Unauthorized Access
We apologize for the inconvenience, but you are not authorized to
  visit this page. If you believe this is an error, please contact your
  account manager.

I received nothing in my email (activation link or any message about it) and I cannot log in to check any information or settings about my account.
I also followed this answer to solve the issue but nothing really worked.
Is there anything I can do other than contact google and wait a long time to get useful response?
Answer: In order to use DFP, you need to sign an agreement with Google. DFP is not for free. You should contact Google.

Google - DFP SB login error


Web mapping within ASP MVC 3 framework

Question: Just curious if anyone has used the ASP MVC 3 framework for creating web mapping applications.  I have one coming up and am planning on using the ArcGIS javascript API.  Would be interested in hearing if anyone has had success or their pitfalls using this framework.  Anyone try connecting to SDE with MVC3?
Answer: As good as ArcGIS is, you don't need to use it.  A lot of the MVC3 crowd (Myself included) are using the following 3 Open source projects off Codeplex these days:
Dot Spatial : http://dotspatial.codeplex.com/
Sharp Map : http://sharpmap.codeplex.com/
and
Bru Tile : http://brutile.codeplex.com/
all three of them are capable of interfacing to everything from humble shape files right through to massive PostGIS databases as well as all the latest MS-SQL 2008 versions with spatial support.
The code behind most of these projects is our good old friends Gdal, Proj4 and the many other things that sit behind 90% of the GIS software on the planet.
Add to that the likes of Quantum GIS ( My Desktop GIS of choice) : http://www.qgis.org/
and you also have a fantastic tool to preview and manipulate your data.
Getting the data in/out of your projects database and performing general ETL and transforming queries on it ready for your projects to use is where the final bit of the puzzle comes in - Geo Kettle : http://www.spatialytics.org/projects/geokettle/
and you have a full suite for any GIS developer on the .NET platform...
Comment: Thanks for the info and links.  Like it or not, the shop I work in is pretty tightly tied to ESRI.  It's what the other developers and DB folks know. There's no way I am going to get approval to use overhead to train the whole team on a new set of open source technologies.  Maybe in my non-existent down time though...
Comment: I feel your pain, I've worked in places like that before where no alternatives are ever considered, oh and the non-existent downtime... yea I know that too... that's why I went back to contracting.  If you get chance though, you should take a look it's good stuff, can't help with ESRI though sorry, it's been a long time since I used that, I do believe they have an SDK download available on their developer site.

Web mapping within ASP MVC 3 framework


power consumption of a FPGA

Question: How to get the dynamic power waves of a FPGA when a program is running in VERTEX-5. Where to connect the DSO to FPGA
Comment: Either get a current probe for the scope, or measure voltage across a known small resistor in series with the supply.
Comment: Many FPGA evaluation boards have zero-ohm resistors in series with the various power supplies to the chip that can be removed so that a current shunt can be installed.
Answer: Generally speaking most CPLDs and FPGAs will have multiple power rails that are used for different things, for example, there is usually a core voltage (Vcc), reference voltages (Vref) and bank voltages (Vccio).  To analyse these voltages, a tool is usually provided with the manufacturers design software, for Altera and Quartus II this is called power play, for Xilinx and ISE, the tool is called XPE (Xilinx Power Estimator).  These tools work by looking at your design, taking in a few details from you and calculating things like power consumption, switching noise and even decoupling requirements.
If you just want to look at the waveforms on each power rail, all of them will have decoupling of some description so your best bet is to identify a capacitor used to decouple the power rail you want and attach your probe across it.
Are you looking at a specific VERTEX-5 dev kit?
Hope this helps,
Gipsy

power consumption of a FPGA


Voltage and Current in Domestic Wiring

Question: According to European std. The domestic supply voltage is 220 V. When an equipment of high load current rating (Such as Kettle) is turned ON, the other elements such as 40W filament lamp is dim and also when checked any socket voltage with a DMM, it shows nearly 210 volts. How this happens..? In parallel domestic wiring, the voltages across any socket will be same(220). But how the heavy load affects the main supply of 220V..?
Comment: Every time I measure the voltage in France, Germany, Switzerland, United Kingdom, I get 230V... Historically UK was 240 and France 220 - but when they wanted to link under the channel the voltages were moved...
Answer: This indicates that you have a higher resistance in the service connection than there should be. I think you should get a service call from a competent electrician.
Answer: Probably your wires are thin and/or the line serving your appliance is long. Anyway the standard voltage is 230 +/-10% so anything between 207 and 253 is regular. Remember that voltage drop on a wire increase with the current so having a lower resistance (thicker) cable will reduce the voltage drop.
Usually for 16A circuits is used 2,5mm^2 (or 4mm^2) cable , for 10A circuit 1,5mm^2 (or 2,5mm^2). For house feeder (10kW) thickness should go from 10mm^2 (short run) to 25mm^2 (long run). Here is a calculator of voltage drop (should be <1,5%) for cables link If you don't understand Italian you can google-translate it.  Between ( ) thicknesses if cable run is long

Voltage and Current in Domestic Wiring


Does aging as a dragon PC give ability score increases?

Question: When a dragon PC ages does it work like getting a paragon class that stacks with sorcerer levels? For example when a brown dragon advances from wyrmling to very young, its strength increases by 4 and its constitution increases by 2. Would a player character get +4 strength and +2 constitution upon aging?
Comment: Are you using a specific source for dragon PCs, or just the basic Monster Manual rules?
Answer: Draconomicon includes information for dragon player-characters—like aging effects—on pages 141–4. Such rules are too extensive to reproduce here, but, in short, "When a dragon reaches a new age category, its ability scores improve across the board," but, as "it ages… the dragon is required to devote a level every few years to its dragon 'class,' reflecting the extra Hit Die or level adjustment it gains from aging." Draconomicon mentions on page 144 how to determine what the game thinks is an appropriate level adjustment for an aging brown dragon (Monstrous Compendium: Monsters of Faerûn 38–40).
So, yes, as dragons age, their ability scores increase, but the game believes such ability score increases shouldn't come free.


EDI 832 Input table(s)

Question: I am looking for suggestions/examples on how to create input SQL table(s) to use for loading data into and an EDI 832 format.   I have tried using a single table to load my EDI mapping software however I have ran into snags in elements such as the DTM or N1 elements where you can have more that one entry. You can have a DTM element for Effective Date and Expiration date and each of those are a separate line in the 832 file.   Any help would be appreciated
Answer: EdiFabric's templates are compliant with Entity Framework, so if you are using .NET the library can create the database structure automatically for 832 or any other X12\EDIFACT transaction. You can use the trial to create the database.
EdiFabric is a commercial .NET product and I work there.

EDI 832 Input table(s)


Integro-Differential Equations

Question: I was attempting to solve the following integro-differential equation using convolutions. My answer also had a convolution which did not seem right and was wondering if someone would check my process.
Problem with initial work
My final solution
Answer: $$y'(t)=1-\int_0^t y(t-\tau ) \exp (-2 \tau ) \, d\tau$$
Laplace Transform:
$$s \left(\mathcal{L}_t[y(t)](s)\right)-y(0)=\frac{1}{s}-\frac{\mathcal{L}_t[y(t)](s)}{2+s}$$
We have $y(0)=1$ and solve for $\mathcal{L}_t[y(t)](s)$:
$$\mathcal{L}_t[y(t)](s)=\frac{2+s}{s (1+s)}$$
$$\mathcal{L}_t[y(t)](s)=\frac{2}{s}-\frac{1}{1+s}$$
Inverse Laplace Transform:
$$y(t)=2-e^{-t}$$
Comment: Thank you so much. I messed up on the "tails" for the initial data because I forgot it was only the first derivative.

Integro-Differential Equations


How to customize s:formattedText

Question: I am using <s:formattedText> for formatting my page.It works fine as expected, but the padding around the text seams to be large. So I applied my own styleClass to this element but it didn't take effect. Firebug shows that the paragraph has styleClass 'seamTextPara'.
Where will I be able to find details on the above styleClass and how to customize it?
Answer: p.seamTextPara
{
  display: inline;
}

How to customize s:formattedText


How to plot figure of merit vs blade loading coefficient for helicopter rotor?

Question: I know the formula of figure of merit and blade loading coefficient individually but how the plot can be obtained I am not getting that. What would be the formula for figure of merit in terms of blade loading coefficient. Formulas I know are:
Comment: Please edit your question to include which equations you have to start with.  There is nothing we can do to help this question without simply doing your homework for you -- and that is not the purpose of this forum.
Comment: @RobMcDonald when the FOM, coefficient of thrust, solidity of the rotor all are fixed which will be the variable in the plot?
Comment: My definition of blade loading coefficient is ($C_T/\sigma$).  Plotting FOM vs. $C_T/\sigma$ is a common thing to do.  Typically, the $C_T/\sigma$ variation represents a change in collective for a fixed rotor -- which means that $C_T$ is varying.  Again -- please share the formulas you have and we can help show how to use them - or suggest the missing formula.
Answer: What you are missing is the rotor 'polar' equation.  While not exactly the same as an aircraft's drag polar, it plays that role in performance equations.
$C_P=\frac{\kappa {C_T}^{3/2}}{\sqrt{2}}+\frac{\sigma C_{d,0}}{8}$
An ideal rotor has $\kappa$=1 and $C_{d,0}$=0.  Such a rotor has $FM$=1.0.
The $\kappa$ is a non-ideal induced flow factor.  It plays the same role as an Oswald efficiency factor, but is inverted in definition.  A typical value might be $\kappa$=1.15.
The $C_{d,0}$ is the airfoil profile drag coefficient.  It contributes to form the profile drag power.  A typical value is $C_{d,0}$=0.01.
The figure of merit $FM$ is the ratio of the ideal power to actual power.
$FM=\frac{\mathrm{ideal}}{\mathrm{actual}}$
I.e. applying it to our definition above, we get...
$FM=\frac{ \frac{{C_T}^{3/2}}{\sqrt{2}}}{\frac{\kappa {C_T}^{3/2}}{\sqrt{2}}+\frac{\sigma C_{d,0}}{8} }$
Which you should be able to plot.
Comment: You perform complex analysis on your rotor design -- including planform, airfoils, twist, etc.  Ideally under loaded conditions as rotors deflect substantially when operating.  Or you measure performance of your rotor and choose k to match the data.  Or you use historical data for similar rotors.  Typical is 1.15 -- 1.0 is ideal, you can't go lower than that.
Comment: How to get the value of k?


Where do I find boating rules for 4e?

Question: Where do I find boat/ship rules for D&D 4e? Guidance for skill challenges using boats as well as combat on boats greatly appreciated.
Answer: There's a watery skill challenge — "The Rushing River" — in the DMG2 (page 94) that could provide some assistance.
Answer: There are a fair number of boat/ship oriented encounters in Living Forgotten Realms adventures. Sometimes the ships are airships, but I think that's still useful. Specific adventures:

MOON 1-1 (Nature's Wrath) has a combat that takes place on a ship
MOON 1-7 (Treasure Hunt) is set on a ship, and has a number of aquatic encounters
MOON 2-1 (Darkness Falls Over Moray) has a skill challenge for surviving a shipwreck
CORE 2-3 (High Infidelity) has several airship combats; this is a paragon tier adventure
CORE 2-10 (Upon the Sea of Stars) likewise has airship combats; it's a sequel to High Infidelity
MINI 2-1 (A Mourning of Ravens) is largely land-locked, but the initial encounter and combat takes place on a ship
WATE 1-4 (The Mystery of Deepwater Harbor) involves a shipwreck, including an underwater encounter on the ship
WATE 1-5 (Lost in the Fog) has a skill challenge to recover items from a shipwreck

This implies the question "how do I get LFR adventures?" which is a really painful question because the answer is not simple. This thread may prove handy. Hopefully this fall the process will become easier.
My favorite papercrafting board had this question recently, and came up with a lot more good stuff. Summarized (but check out the thread as well):

The 4e Freeport Companion
A free Nautical Compendium
WotC forum thread on seafaring
Comment: Wow, I should get me an RPGA number someday
Comment: Your somewhat friendly local gaming store has cards. LFR has been largely decoupled from WotC supervision, so sometime in the next three months the process for downloading adventures will become much much easier, thankfully; you may or may not need a membership at that point. But it's a great source of self-contained one-shot 4e adventures either way.

Where do I find boating rules for 4e?


Dwarf Fortress for Windows Mobile

Question: Is there any possibility of playing Dwarf Fortress on a Windows Mobile phone?  I keep hearing great things about this game, but it seems that the only chances I have of getting any gaming in these days is via my phone.
Comment: @C. Ross is right on the money.  I would add, though, that even on pretty hefty desktop hardware DF tends to max out processor time.  I imagine if you tried to run it on a phone you would get a bad framerate for five minutes before your phone either ran out of battery or overheated.  DF is not NetHack!
Answer: Your only hope currently is to run DF on a Linux machine and create a terminal to it.  You will also need to set the output type to curses with the following changes in the config file.
<code>[SOUND:NO]
...
[PRINT_MODE:TEXT]
</code>
I would also suggest making the following change in the init file for ease of play (the intro doesn't work well in curses mode).
<code>[INTRO:NO]
</code>
However with the small screen and small keyboard DF will probably still not be at its best.
Comment: darn, i was hoping for something other than terminal'ing into a server...ty for the info!

Dwarf Fortress for Windows Mobile


Bone won't bend in quadruped leg

Question: So I am rigging a fox mesh, and the method I used of inverse kinematics isn't working like it has on numerous quadrupeds I have rigged. So the leg has four bones in it. Now I put the IK on the second bone to the bottom, and set the chain length to three. Problem is the top two bones won't bend when manipulated but stay in the bend then started in even when I move target. But I did the same thing with the front leg and it works fine I can't find any differences. I have seen many complaints about this happening after setting a pole target but I haven't yet and its still happening, any ideas?
Comment: could you please share your file? https://blend-exchange.giantcowfilms.com/
Comment: Here you go [](https://blend-exchange.giantcowfilms.com/b/5267/) It's the back leg, the joint on the top two bones won't bend, with the IK
Comment: I'm not exactly sure about what you're expecting from your rear leg, perhaps bend a bit the two top bones in Edit mode to get what you want? Could you please make a drawing that explains what your leg is supposed to do?
Answer: Okay so I figured it out, moonboots you were right I did need to bend the top bones more in edit mode. At first I couldn't figure out how to position them so it worked but still fit the mesh. Then I found a drawing of a fox with an internal skeleton shown along with the body. This showed me I had the two top bones in the back leg positioned wrong, so I changed it to mimic the drawing and it worked. The bones finally bend when using IK. I guess this is just further evidence that nature knows exactly what it is doing with designing of living creatures. lol

Bone won't bend in quadruped leg


I feel my shock absorbers are no more working. Need to know if I need to replace them or are there any recommendations to ge them properly repaired?

Question: Pulsar 150CC.. Rear shockers. Bajaj showroom Mechanic suggests to replace them but other mechanic suggests that they can be repaired. it ran around 54K. I am confused now. Please suggest.
Answer: You can repair them, but I doubt it will cost much less than replacing them on your bike. If it were a BMW with big, expensive shocks then maybe it is a good option, but for such a small bike you'll probably pay less for a new shock absorber than for the labour to fix it.
Comment: Thank you for your suggestion. I am not aware of the pricing at all neither repair nor replacement. I will look into that but I am not sure which kind of shock absorbers I need to go with.. What options do I have for my Pulsar 150CC 2010 model.
Comment: I don't really know. I'm in South Africa and the Bajaj brand isn't big here, so I can't find any options or prices for you.


Is there ever a reason to create a non-clustered index on a column that is already the clustered primary key?

Question: Suppose that I have a table. Its primary key is clustered and consists of exactly one column. Is there ever a reason to also make a non-clustered index on that same column with no other columns in any part of the non-clustered index?
Answer: Not under most circumstances, no. Now,if I sit here and speculate, I could see a situation where because you only have a nonclustered index, the optimizer might choose to do scans against that instead of the clustered index because it's smaller. But the query would have to be only against that one column.
Unless, we change things. Let's say it's a filtered nonclustered index. That might be useful to add to a column depending on the queries in question.
Comment: "_because you only have a nonclustered index_" - But you don't. The premise of the question is to have **both** the clustered and non-clustered indexes. I'll edit to make that more clear.


E-ink display as a monitor

Question: I have written a web app using Django. I want to build a device with my raspberry which is always connected to this web app, and shows the result on an e-ink display. I have seen different videos, but I don't understand if this is possible. Can an e-ink display show the gui of raspberry, like a monitor?
Answer: Current e-ink displays need several seconds for a screen update. While larger e-ink displays can be selectively updated, several e-ink displays sold for Raspberry Pis can update only the whole display. And this takes around 10 to 15 seconds for some displays, but at least around half a second for some minuscule region.
So, no, you can't use e-ink displays as monitor substitutes (yet). The two main markets for these displays seem to be dedicated ebook readers (read: Amazon Kindle, Rakuten Kobo, ...) and shop price tags. Both trade slow performance for minimal power consumption while the display is static, so we talk about update rates in frames per minute.
Answer: Not a GUI, perse; but a pervasive display, yes. Adafruit started distribution of this product late last year; and I have added integration to my project wish list, but I haven't got to doing it yet. Your post reminded me to go over my project build list. However at the moment I'm occupied with 3D Printer Build and other camera projects.
Answer: Short answer: YES
The answer provided by @TheDiveO is a little outdated.
I've used an ePaper Display from Pervasive Displays which has a sub-1-second refresh. This should be more than sufficient for a status display.
I'm using my display to show the time and whereas it does only update once per minute, that's a choice I made as I don't need to see the seconds on my clock.
You would need to convert your web app to an image though as that's what you send to the display.
You can see an (older) example of it working here.

E-ink display as a monitor


How to determine if a string was compressed?

Question: How can I determine whether a string was compressed with gzcompress (aparts from comparing sizes of string before/after calling gzuncompress, or would that be the proper way of doing it) ?
Answer: PRE: I guess, if you send a request, you can immediately look into $http_response_header to see if the one of the items in the array is a variation of Content-Encoding: gzip. But this is not ideal!
there is a far better method.
Here is HOW TO...
Check if its GZIP. Like a BOSS!

according to GZIP RFC:

The header of gzip content looks like this
+---+---+---+---+---+---+---+---+---+---+
|ID1|ID2|CM |FLG|     MTIME     |XFL|OS | (more-->)
+---+---+---+---+---+---+---+---+---+---+

the ID1 and ID2 identify the content as GZIP. And CM states that the ZLIB_ENCODING (the compression method) is ZLIB_ENCODING_DEFLATE - which is customarily used by GZIP with all web-servers.
oh! and they have fixed values:

The value of ID1 is "\x1f"
The value of ID2 is "\x8b"
The value of CM is "\x08" (or just 8...)

almost there:
`$is_gzip = 0 === mb_strpos($mystery_string , "\x1f" . "\x8b" . "\x08");`
Working example
<?php
/** @link https://gist.github.com/eladkarako/d8f3addf4e3be92bae96#file-checking_gzip_like_a_boss-php */

date_default_timezone_set("Asia/Jerusalem");

while (ob_get_level() > 0) ob_end_flush();
mb_language("uni");
@mb_internal_encoding('UTF-8');
setlocale(LC_ALL, 'en_US.UTF-8');

header('Time-Zone: Asia/Jerusalem');
header('Charset: UTF-8');
header('Content-Encoding: UTF-8');
header('Content-Type: text/plain; charset=UTF-8');
header('Access-Control-Allow-Origin: *');

function get($url, $cookie = '') {
  $html = @file_get_contents($url, false, stream_context_create([
    'http' => [
      'method' => "GET",
      'header' => implode("\r\n", [''
        , 'Pragma: no-cache'
        , 'Cache-Control: no-cache'
        , 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2310.0 Safari/537.36'
        , 'DNT: 1'
        , 'Accept-Language: en-US,en;q=0.8'
        , 'Accept: text/plain'
        , 'X-Forwarded-For: ' . implode(', ', array_unique(array_filter(array_map(function ($item) { return filter_input(INPUT_SERVER, $item, FILTER_SANITIZE_SPECIAL_CHARS); }, ['HTTP_X_FORWARDED_FOR', 'REMOTE_ADDR', 'HTTP_CLIENT_IP', 'SERVER_ADDR', 'REMOTE_ADDR']), function ($item) { return null !== $item; })))
        , 'Referer: http://eladkarako.com'
        , 'Connection: close'
        , 'Cookie: ' . $cookie
        , 'Accept-Encoding: gzip'
      ])
    ]]));

  $is_gzip = 0 === mb_strpos($html, "\x1f" . "\x8b" . "\x08", 0, "US-ASCII");

  return $is_gzip ? zlib_decode($html, ZLIB_ENCODING_DEFLATE) : $html;
}

$html = get('http://www.pogdesign.co.uk/cat/');

echo $html;

What do we see here that is worth mentioning?

start with initializing the PHP engine to use UTF-8 (since we don't really know if the web-server will return a GZIP content.
Providing the header Accept-Encoding: gzip, tells the web-sever, it may output a GZIP content.
Discovering GZIP content (you should use the multi-byte functions with ASCII encoding).
Finally returning the plain output, is easy using the ZLIB methods.
Comment: Works great for a [gzencode](http://php.net/gzencode)d string, but not for [gzcompress](http://php.net/manual/en/function.gzcompress.php)ed strings, which do not have the gzip-header, so I do:

`function isGzipped($in) {
        if (mb_strpos($in , "\x1f" . "\x8b" . "\x08")===0) {
                return true;
        } else if (@gzuncompress($in)!==false) {
                return true;
        } else {
                return false;
        }
}`
Comment: @futtta - nice addition, b.t.w. you should still keep `"US-ASCII"` (in `mb_strpos`)..
Answer: A string and a compressed string are both simply sequences of bytes. You cannot really distinguish one sequence of bytes from another sequence of bytes. You should know whether a blob of bytes represents a compressed format or not from accompanying metadata.
If you really need to guess programmatically, you have several things you can try:

Try to uncompress the string and see if the uncompress operation succeeds. If it fails, the bytes probably did not represent a compressed string.
Try to check for obvious "weird" bytes like anything before 0x20. Those bytes aren't typically used in regular text. There's no real guarantee that they occur in a compressed string though.
Use mb_check_encoding to see whether a string is valid in the encoding you suspect it to be in. If it isn't, it's probably compressed (or you checked for the wrong encoding). With the caveat that virtually any byte sequence is valid in virtually every single-byte encoding, so this'll only work for multi-byte encodings.
Comment: Note that "\t" (tab), "\n" (newline), and "\r" (carriage return) are all likely to be in any string, and are all below 0x20.
Comment: Sorry for being so clueless, but how can I perform the first bullet point? When I call `gzuncompress` on an uncompressed string it doesn't return me an error, just the same string.
Comment: Hmm, it returns `false` for me... `var_dump(gzuncompress('foobar'));`
Answer: This work fine for me:
if (@gzuncompress($_xml)!==false) {
   // gzipped sring

Answer: You can simply try gzuncompress() on the data as noted by @DiDiegodaFonseca. If it fails, it was not made by gzcompress(), or it was not faithfully transmitted.
If you really want to, you can check the first two bytes for a zlib header (not a gzip header, as incorrectly suggested in the accepted answer). gzcompress() produces a zlib stream, not a gzip stream. gzencode() is what produces a gzip stream. gzdeflate() produces a raw deflate stream.
RFC 1950 describes the zlib header. It is two bytes, where the two bytes taken as a big-endian 16-bit unsigned integer must be a multiple of 31. In addition to checking that, you can check that the low four bits of the first byte is 8 (1000), and that the high bit is zero.


In the trisvabhava theory, is the consummate nature inflected by past present and future conditions?

Question: In the trisvabhava theory, is the consummate nature inflected by past present and future conditions? Or is it always the same and independent of causal conditions?
Answer: Yes consummate nature is inflected by past present and future conditions but it is not inflected by time. Do any other mahayana object?
If something is composed of multiple parts and one of those parts is timeless and not inflected by time. Then the whole cannot be inflected by time even if it is composed of another part that is inflected by karma (including past present and future conditions).
My advice: become enlightened and try to prove whether or not you are existing in reality as we know it, or not.
Comment: It's good (though not required) if an answer is "based on" something -- perhaps a "reference" (to scripture), and/or personal "experience". A simple yes/no answer isn't very informative -- e.g. it doesn't tell the OP how to "know for themselves" whether something is true.
Answer: All conditions are impermanent. Consummate nature arises due to conditions created by conditioners. Because conditions change in future therefore consummate nature is inflected by a sense of future time when new conditions will arise and old conditions will decay.
Therefore not getting involved with sanskharas of consummateness , one should seek cessation of craving by breaking the chain of dependent origination.


Relation between Inlet and Outlet mass flow rate for a turbocharger?

Question: For the compressor maps for automotive turbochargers, the Corrected mass flow rate (at inlet) is given as abscissa. However, I wish to know the mass flow rate at the outlet. What is the relation in between them, given the Pressure ratio (2.5)
Comment: @SolarMike So, is the work done by the compressor not raising the density of the fluid? I mean, the work done is going to be raising the static pressure of the fluid, as well as the dynamic pressure. Wont the rise in static pressure result in an increased density and thus reduced mass flow rate?
Answer: The mass flow across a turbocharger is constant:
If X kilogrammes of air go in then X kilogrammes of air come out.
However if the pressure is twice the inlet pressure then the output volume is smaller and the density is higher as well as the temperature is increased. This is one reason there are intercoolers as having too high an inlet temperature reduces the volumetric efficiency.
A good reference for the concepts and formulae you need is Engineering Thermodynamics, Work and Heat Transfer by Rogers & Mayhew (still have my original copy bought some 30 years ago).
Comment: Thanks for the clarification. I reckon by that, I can imply that the output Volumetric Flow rate would increase by a factor of (P1/P2)x(T2/T1). (Through ideal gas law). Would that implication be correct?
Comment: There is also the fuel. For gasoline, the mass ratio is about 14.7 air to fuel. For diesels, the mass ratio varies. Turbos often have dump gates that remove mass when activated, and some of them are a bit leaky. There are also small (and variable) corrections for crankcase venting.
Comment: No, ideal gas law does not apply because the species are changing.


XIB Links and Phone Numbers detection color

Question: I find that auto detection of links and phone numbers in xib textfields is very useful,
is it possible to change the color of the autodetected link or number?
Answer: In a UIWebView the detected data is just rendered as a link, so CSS will let you change that. In the UITextView, there isn't a method to make the change, so I would guess that you cannot. Additionally, you run afoul of the iOS GUI guidelines by making a link a color other than blue.
If you're dead set on changing the link colors then I would render your text in a UIWebView instead of a UITextView and use CSS. I wouldn't try to use UITextViews and private API's.


handling sticky bread dough

Question: What is the best way to handle sticky "batard dough" to shape it before putting it in the oven? I have tried flouring my hands and the crust comes out too white. I have tried using cooking utensils and find that I cannot shape it properly.
Comment: What hydration are we talking about? So how have you been shaping so far and are you using a "couche" (linnen cloth) for the final raise?
Answer: For really wet dough, wetting your hands works (that is, quickly dip them in a bowl of water, let the water drip off a little, and keep doing that as you work the dough). Depending on the dough, you could also oil your hands (see the "Is there a reason to NOT use no-stick spray (Pam) for handling dough?" over to the right in related questions). Also helps to be quick; keep your hands moving and the dough sticks less.
And to some extent, you just have to live with it being a sticky mess.
Comment: Wetting hands is what I do. Using spray oil is just a mess.

handling sticky bread dough


Final Permutation in Feistel function

Question: As the final permutation of the Feistel function is the inverse of the initial permutation, it undoes the initial permutation.So how is this helpful?
Comment: You need to mention the cipher and i guess you mean DES
Comment: @Lucifer: unfortunately, the question being part of an assignment is not an assurance that it is consistent and self-contained enough. Somme assignments are poorly worded, or make the assumption that the audience knows conventions set in the course, or some particular text, when in fact that convention is far from universal. That even happens for national exams. Here: according to many texts, there is no IP or FP in a generic Feistel cipher. Texts that present IP and FP typically are DES-centric.
Comment: Wikipedia `IP and FP have no cryptographic significance, but were included in order to facilitate loading blocks in and out of mid-1970s 8-bit based hardware.`
Answer: In DES we must distinguish the Initial Permutation; the Final Permutation, which by definition is IP-1; and the final swap (or lack thereof), which makes the last round different from the others. The final swap is formally in the specification of DES as a definition of the preoutput block as R16L16, when input and intermediary blocks are LiRi.
The rationale of making a Final Permutation parallels that of the Initial Permutation: in the original 8-bit-hardware implementation of DES, IP allows loading the plaintext as eight byte-wide accesses, with each of 8 bit of the IC's data bus line leading to the input of 8 shift registers in the IC, holding L and R. FP allows unloading the ciphertext by the same mechanism (the output of the 8 shift registers leads to the data bus). IP of decryption undoes FP of encryption, while FP of decryption undoes IP of encryption, because FP is IP-1.
The final swap consists in making an additional exchange of Left and Right registers after the last round (or, to the same effect, not doing in the last round the exchange of Left and Right registers performed in the other rounds). The rationale is that, combined with FP being IP-1, it makes encryption and decryption identical except for preparing subkeys in reverse order. That identity simplifies hardware and software that must adapt to both roles (when subkeys are precomputed as is standard practice for speed-optimized software implementations, the exact same code does encryption and decryption). Without final swap, in order for decryption to undo encryption, we'd have to move the exchange of Left and Right registers at the beginning of a decryption round, rather than at end in an encryption round.
IP and FP do not exist in all Feistel ciphers; they are rather specific to DES. On the other hand, the final swap technique works for any symmetric Feistel cipher, and is often considered an integral part of that design pattern.
Note: in some implementations or descriptions of DES (but not the standard), FP is taken to include final swap then IP-1.

Final Permutation in Feistel function


Connecting to Mac mini through xSession

Question: I have encountered this problem when I was trying to help my friend who want to learn iOS programming but at the moment cant afford to buy a Mac.
I have Macbook and Mac mini.
I was avid use of linux in my past and I have used XSessions on linux where I was exploiting multiuser service from a linux machine and had my personal GUI or XSession.
As Mac is basically unix based system.
I am wondering if it is possible that I can setup my Mac mini such a way that my friend can connect to his personal xSession over the internet to my mac mini and start coding on my Mac mini.
Answer: This is not possible, since the OSX GUI doesn't run on X Server. Furthermore, there is no support for simultaneous desktop logins. You could theoretically run an X server on OSX, but you'd be able to run only apps that use XQuartz, not native OSX apps.
You could allow him to access your Mac via Screen sharing or VNC, but it wouldn't support multiple users.
Comment: I am runner X Server app. is it possible to run xcode ? thats all pretty much is needed.
Comment: I don't think Xcode will run under X Server, since it uses Cocoa framework.

Connecting to Mac mini through xSession


Is there anyway to give a variable a value FOR A CERTAIN AMOUNT OF TIME (java)

Question: So im writing a simple 2d javafx game and a thought just came into my head.
Can i give a boolean (or any variable type for that matter) a value for a select amount of time.
If its possible ,how would it look like
Comment: This is C# but ought to give you some ideas. [How to reset an application variable daily](https://stackoverflow.com/questions/15246998/how-to-reset-an-application-variable-daily)
Answer: Why not a TimeLine ?
Suppose you want to change during about 2 seconds a String foo field for an object referenced by a myObject variable declared as MyObject.
myObject.setTemporaryValueForFooField("special value");
Timeline timeline = new Timeline(new KeyFrame(
        Duration.millis(2000),
        ae -> myObject.reuseOriginalValueForFooField()));
timeline.play();

setTemporaryValueForFooField(String) makes a copy of the current value of the foo field in the current instance and assign to it the temporary value.
reuseOriginalValueForFooField() reassigns the foo field with the original value as the duration is reached.
Answer: There are several ways to do this. You could use an AtomicBoolean, a Timer (a TimerTask) and a simple loop. Like,
AtomicBoolean ab = new AtomicBoolean(true);
Timer t = new Timer(); // <-- The Timer
t.schedule(new TimerTask() {
    @Override
    public void run() {
        ab.set(false);
    }
}, TimeUnit.SECONDS.toMillis(5)); // <-- once in five seconds.
while (ab.get()) { // <-- while the boolean is true
    System.out.println("It's true");
    try {
        Thread.sleep(1000);
    } catch (InterruptedException e) {
    }
}
t.cancel(); // <-- don't forget to end the Timer.

Which prints "It's true" ~ five times.


Skyshard/Sky Crystal Farming

Question: Are there any good or known farming spots for Skyshard to drop? I have spent several hours farming the Mogu in the Vale of Eternal Blossoms in an attempt to get the ten Skyshards needed to craft the Sky Crystal. I currently only have one of them and came from the mogu during my farming. I do now for a fact that some mobs change/disappear depending on the dailies that are available that day. So my question is: Where is a good farming spot in Vale of Eternal Blossoms with minimal downtime between mobs.
Comment: I received one in a Treasures of the Vale, and two from drops, on my way to Exalted. This will be a _very long grind_.
Comment: So far, every "good" method get nerfed as it's discovered.
Comment: Every mob in Vale of Eternal blossom has an equal chance of dropping it. So I guess whereever there are more mobs available to kill would be a good place to 'farm' for it? Again this is different depending on the time of the day and the server you are on with everyone and their dog doing dailies there.
Answer: The Shao-tien Marauders, Soul-Renders, and Stonebark Tricksters have the best chance of dropping it - about 1 in 300 chance (0.3%). There is a large cluster of these in the north of the Vale around 36, 24. If you can AoE them down... that might be your best shot.
Good luck, it'll be a hell of a grind. I'm exalted with Golden Lotus on two toons and only get one drop!
Answer: As the other answers said - no real 'good' spot.  Where and what you are doing is probably the best you can hope for.  I did the GL dailies everyday until I reached exalted and never got a single drop, and as far as I know only a couple other members of my guild have even gotten a single drop.
The mogu in the daily area are probably the your best bet.
I have a feeling that with the next chapters of the expansion they will drop more or be a drop from a dungeon/raid boss. Which may also be a possibility, but again have never seen one drop in a heroic or LFR.

Skyshard/Sky Crystal Farming


Good reading on the Keldysh formalism

Question: I'd like some suggestions for good reading materials on the Keldysh formalism in the condensed matter physics community. I'm familiar with the imaginary time, coherent state, and path integral formalisms, but lately, I've been seeing Keldysh more and more in papers. My understanding is that it is superior to the imaginary time formalism at least in that one can evaluate non-equilibrium expectations.
Answer: I am somewhat biased towards condensed matter physics, even though the subject extends also to fields such as cosmology and QCD.
In the context of condensed matter physics I recommend the following books (even though various techniques also apply outside this regime):

Rammer's Quantum Field Theory of Non-Equilibrium States. This was my first read on it, and I was quite content with it. If you are familiar with the idea of using periodic imaginary time to simulate a temperature then this book will explain the small additional step you need to take to grasp the basics of the Keldysh formalism. Unfortunately it's just formalism for the first 7 (!) chapters and sometimes the pace is a bit slow.
Kadanoff and Baym's Quantum Statistical Mechanics: Green's Function Methods in Equilibrium and Nonequilibrium Problems. A classic.
Kubo, Toda and Hashitsume's Statistical Physics II: Nonequilibrium Statistical Mechanics. Has some elements of classical statistical physics as well. The authors are very insightful.

There's also chapter 18 in Kleinert which I find a nice read. This book is huge though and treats a lot of other topics. Still, if you go through Rammer then this chapter by Kleinert nicely summarizes everything without dropping too many details. The newest edition of Altland and Simons has two chapters on classical and quantum systems out of equilibrium, but I was fairly disappointed with their treatment considering the rest of the book is fantastic.
As for quantum transport, where this formalism is frequently employed, I can recommend Di Ventra as an undergrad-level introductory book and this book by Datta for some other interesting topics. Weiss is excellent for dissipative (open) systems, although this field opens up a whole new can of worms so you might want to avoid at first.
Other sources not in book form:

Rammer and Smith's review article "Quantum field-theoretical methods in transport theory of metals" (Rev. Mod. Phys. 58 no. 2, 323–359 (1986), also available here). Solid.
Kamenev and Levchenko's article "Keldysh technique and non-linear σ-model: basic principles and applications" (Adv. Phys. 58 no. 3 (2009), pp. 197-319, arXiv:0901.3586) is very advanced, but it treats some important details.
Comment: Can you tell which chapters of Kadanoff and Baym are devoted to this (Keldysh-Schwinger contour formalism)? I searched "contour" in the book and only found results in chapter 7.
Answer: For researchers who study condensed matter physics (i.e. low-energy physics), it might be helpful to read following books and articles.
H. Haug and A. P. Jauho: Quantum Kinetics in Transport and Optics of Semiconductors (Springer, New York, 2007).

We can learn the (minimal) essence of Keldysh formalism by reading pp. 35-69 (sections 3 and 4). This article carefully explains Langreth method (theorem) in p. 66, which will be one of the most important properties of Keldysh formalism.

G. Tatara, H. Kohno, and J. Shibata: Microscopic approach to current-driven domain wall dynamics (Phys. Rep. 468 no. 6 (2008) 213, arXiv:0807.2894).

They cover the essence of the Keldysh formalism on pp. 289-295 (Appendix B. Brief introduction to non-equilibrium Green function); they also explain the Langreth method in pp. 292-295 (Appendix B.2. Langreth method). This article will be instructive on the point that it contains many concrete examples of calculations in detail.

T. Kita: Introduction to Non-equilibrium Statistical Mechanics with Quantum Field Theory (Prog. Theor. Phys. 123 (2010) 581, arXiv:1005.03932).

One can learn the (minimal) essence of Keldysh formalism by reading pp. 5-20 (section 2-3). In particular, this article closely explains the Feynman rules (Feynman diagram) from the viewpoint of practical use. On top of this, one can review the point of the second quantization method and the Matsubara formalism (i.e. non-relativistic quantum field theory) on pp. 56-76 (Appendix A-D).

J. Rammer, Quantum Field Theory of Non-equilibrium States,
(Cambridge University Press, 2011).

Of course I have noted that there is a similar article written by the same author (J. Rammer and H. Smith, Rev. Mod. Phys. 58 (1986) 323.), but I would like to recommend this textbook because it is self-contained; it covers the Matsubara formalism (i.e. imaginary-time formalism) as well as the Keldysh formalism (i.e. real-time formalism) and hence, we can learn with comparing each other. In particular, it will be helpful to read sections 4-5 (pp. 79-149).

D. A. Ryndyk, R. Gutierrez, B. Song, and G. Cuniberti: Energy Transfer Dynamics in Biomaterial Systems, (Springer, Heidelberg, 2009; authors' eprint; arXiv:0805.0628).

I happened to find this article, which is also self-contained; one can learn the essence of Keldysh formalism by reading pp. 47-77 (section 3; Non-equilibrium Green function theory of transport).

The above articles will be reliable and readable. On top of them, one can learn important details from the sophisticated manuscripts by Alex Kamenev:
A. Kamenev: Field Theory of Non-Equilibrium Systems, (Cambridge University Press, 2011, arXiv:0412296).

I should polish my understanding to comment on it. This article always helps me.

Although (as far as I know) I have listed the relevant articles, I guess I have missed a lot of other important papers. Please forgive me if I have. I hope my contribution helps someone to learn Keldysh formalism.

Last, let me remark the points of Keldysh formalism which I have learned by the above articles; thanks to the Schwinger-Keldysh closed time path, the Schwinger-Keldysh formalism (i.e. closed time path formalism or the real-time formalism) is not based on the assumption usually called the Gell-Mann and Low theorem (i.e. the adiabatic theorem).
Therefore, within the perturbative theory via Schwinger-Keldysh (or contour-ordered) Green's functions, the formalism can deal with an arbitrary time-dependent Hamiltonian and treat the system out of the equilibrium. On top of this, this formalism is applicable to systems at finite temperature; the well-known Matsubara formalism (i.e. the imaginary-time formalism), which can also deal with thermodynamic average values, can be regarded as a simple corollary of the Schwinger-Keldysh formalism.
That is, the Schwinger-Keldysh formalism includes the Matsubara formalism and information about finite temperature is contained in the greater and lesser Green's functions. Consequently we can treat non-equilibrium phenomena at finite temperature thanks to the Schwinger-Keldysh formalism. This will be the strong point of the formalism.
Answer: This answer contains some additional resources that may be useful. Please note that answers which simply list resources but provide no details are strongly discouraged by the site's policy on resource recommendation questions. This answer is left here to contain additional links that do not yet have commentary.

J. Berges,
Introduction to Nonequilibrium Quantum Field Theory,
AIP Conf. Proc. 739 (2004), 3--62.
hep-ph/0409233
W. Botermans and R. Malfliet,
Quantum transport theory of nuclear matter,
Physics Reports 198 (1990), 115--194.
E. Calzetta and B.L. Hu,
Nonequilibrium quantum fields: Closed-time-path effective action,
Wigner function, and Boltzmann equation,
Phys. Dev. D 37 (1988), 2878--2900.
K. Chou, Z. Su, B. Hao, and L. Yu,
Equilibrium and nonequilibrium formalisms made unified,
Physics Reports 118 (1985), 1--131.
Yu. B. Ivanov, J. Knoll, and D. N. Voskresensky,
Self-Consistent Approximations to Non-Equilibrium Many-Body Theory,
Nucl. Phys. A 657 (1999), 413--445.
hep-ph/9807351
Yu. B. Ivanov, J. Knoll, and D. N. Voskresensky,
Resonance Transport and Kinetic Entropy,
Nucl. Phys. A 672 (2000), 313--356.
nucl-th/9905028
Answer: If it is still of interest, next to all the excellent suggestions above there is a book from 2013 which I found rather helpful as it makes some neat observations I could not find in other texts:
Nonequilibrium Many-Body Theory of Quantum Systems - Stefanucci and Leeuwen
Answer: Below is my own list, in the context of studying transport in semiconductor nanostructures. Most of these have been already mentioned, but my ordering of the items and comments might be helpful.

In principle, AGD combined with the Keldysh's original paper are quite sufficient for serious work (surprizingly not mentioned before).
The introduction of the review article by Rammer & Smith is quite good as a short reference.
Haug and Jauho's book is quite popular, however it mainly reproduces the results of the series of (very readable) papers by Meir, Wingreen and Lee, Meir and Wingreen, and Meir, Wingreen and Jauho.
This review by Kamenev is a good entry point into Keldysh formalism in terms of the path integral formulation.
Finally, the book by Kadanoff & Baym is a classic, that is worth mentioning, because they developed formalism simultaneously with Keldysh.

Good reading on the Keldysh formalism


Can I get notified when friends check-in nearby on Foursquare?

Question: Is there a way for me to set up notifications (e.g. iPhone push notifications, or email) when a Foursquare friend checks in nearby? Currently it looks like I can turn on notifications for all check-ins, but I can't restrict them to check-ins near my last one:
Answer: Now that the check-ins are in Swarm and not in Foursquare there is a way to set notifications only for the nearby check-ins. At least according to the official documentation.


Why is the load in an NPN transistor switch located in the collector circuit?

Question: I made a simple transistor switch. I read the theory and in many sources I saw that the load (with an NPN transistor as a switch) is connected to the collector circuit, not the emitter circuit (picture .1, for example.)
Why isn't the load connected to the emitter circuit?

This is my circuit:
Comment: Calculate the voltages involved for both possible configurations and compare
Comment: Because if you look closely at the math, you will notice that it is giving you \$I_c\$ as a function of \$V_{be}\$. Meaning that in order to have a control of the current you better keep the base-emitter voltage known.
Comment: In your circuit, what device is meant to be the load? Because really that looks like a circuit designed to test whether MOSFETs or BJTs make a prettier explosion when they fail.
Answer: To make current flow through the base of the transistor, you have to make the voltage on the base about 0.7 volts higher than the emitter.
Connected as you have in the schematic marked "Figure 2," that means you only need 0.7 volts to turn the load on completely.
If you were to put the load between the emitter and ground, though, you would have to drive the base to a much higher voltage in order for the transistor to conduct and power the load.
Since the voltage across the load can vary, you can never be sure just how much voltage to put on the base to make the transistor conduct.  You can also never be sure just how far you've "turned the transistor on." If you were trying to make an amplifier or motor speed control, it would be difficult to control the output since would depend in part on the load.
Another thing to consider is that if you are using a 5 volt signal from a microprocessor to control the transistor, then you might not be able to drive the base of the transistor high enough if you are using the transistor to switch a 12 volt load in the emitter circuit.
Comment: Thank you, but I want to realize soft-start circuit for laser diode, so any voltage variations are not important for me. I updated my question and my circuit are presented there.
Answer: Putting a load in the emitter circuit is not infrequently used, and there are actually some advantages, but one big disadvantage is that there is no voltage gain.
You get current gain from the transistor beta, and the base draws just as much current as it needs, and no more, but the voltage gain must be less than 1- output voltage is the input voltage minus Vbe (which increases with increasing load current).
The 'on' voltage of a saturated transistor (load in collector and plenty enough base current) is much less than voltage drop of an emitter follower (load in emitter) so the transistor runs cooler.
For example, 100mA at 5V with an emitter follower you'll get 4.3V at the load and the transistor will dissipate 70mW. If you give it enough base current (maybe 5mA depending on type) the common emitter (load in collector) will have maybe 0.1-0.2V drop and will dissipate more like 15mW.
You can connect the load to (say) +24 and use the same circuit to control much more power.
If you needed to switch a relay, it would be the difference between a 200mA load on the 5V supply vs. 37mA on a 24V supply (about the same power but much less current, which is often a good thing).
Comment: Thank you for info about heat dissipation, I didn't think about it before.
Then I want to ask. I must to take into account changes the parameters of transistor when heat dissipation is significant?
Comment: Sure- the capabilities vary greatly from part to part (though usually the power dissipation capability is similar in parts with similar packages, mounted similar).


Android socket inputstream read (followed by an EPIPE)

Question: I am creating some client-side socket software to read events from a server. (For example, streaming stock quotes).
PROBLEM: .read(b); is returning immediately with a value of -1. This causes an infinte loop and the phone becomes very hot. Additionally, all checks to s.isConnected(), isOpen(), isBound() return true. Essentially the socket looks connected. (This is an error scenario, so any value of .setSoTimeout(x) has no effect. 12 minutes, or leave empty. The .read(b) always returns -1 immediately).
When I write to it later, via the getOutputStream(), I receive an exception EPIPE (broken pipe).
Here's the core code (log statements/value checks omitted for brevity).
s.connect(new InetSocketAddress(host, port), CONNECT_TIMEOUT_MILLIS);

byte[] b = new byte[1024];
while (s.isConnected()) {
    int bytesToRead = s.getInputStream().read(b);
    if (bytesToRead <= 0) {
        LOGGER.debug("no bytes read? trying again.");
        continue;
    }
    processFrame(b);
}

If I cycle the 3g on the phone, it works fine. Sometimes it gets into this weird state.
Question
Am I doing something wrong? Is this the expected behavior? Is there existing code I could look at to show the right way to do socket programming on Android?
Answer: I use the following code without problem:
        BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
        String line = null;
        while ((line = in.readLine()) != null) {
            myLineProcess(line); //here you process you line result
        }

good luck.
Comment: This was the solution I ended up using. The answer to my question was the one that I accepted.
Answer: If read(byte[], ...) returns < 0, the peer has closed the connection, so you must close the socket and exit the loop. There will never be any more data.
Input streams are blocking, so the only way read(byte[], ...) can return zero is if you specify a zero length buffer or a zero length, depending on which overload you call. As you aren't doing that, it will never return zero.
Instead it will do exactly what it says in the Javadoc: either return -1 meaning EOS, or block until at least one byte of data is available.

Am I doing something wrong?

Almost everything. Your loop testing for <= 0 is completely pointless and completely incorrect. And so is testing isConnected(). That only tells you whether you ever connected this Socket. It doesn't change with the state of the connection. The return code of -1 tells you that. Your loop should read:
while ((bytesToRead = s.getInputStream().read(b)) > 0)
{
    // do something with b[0..bytesToRead -1].
}
s.close();

Comment: @MichaelSmyers Wrong. Why don't you read the Javadoc, instead of all this continual guessing? read() only returns zero under the conditions I stated above, which you will find in the Javadoc. If you get a read timeout, you get a SocketTimeoutException.
Comment: Thanks. It seems that I was missing that -1 means the stream is closed. I'll tear down when I receive -1. If i do socket.setSoTimeout(xx) then I should receive 0 bytes if the timeout is hit, right?
Answer: Well i don't know whether this would be the appropriate answer for this, but still i will like to give you the code, which does works well every time.
Please keep it simple,
Try using InputStream, InputStreamReader, BufferedReader, OutputStream, PrintWriter.
Client Side:
Socket s = new Socket();
s.connect(new InetSocketAddress("Server_IP",Port_no),TimeOut);
// Let Timeout be 5000

Server Side:
ServerSocket ss = new ServerSocket(Port_no);
Socket incoming = ss.accept();

For Reading from the Socket:
InputStream is = s.getInputStream();
InputStreamReader isr = new InputStreamReader(is);

BufferedReader br = new BufferedReader(isr);
boolean isDone = false;

String s = new String();

while(!isDone && ((s=br.readLine())!=null)){

     System.out.println(s);   // Printing on Console

 }

For Writing to the Socket:
OutputStream os = s.getOuptStream();
PrintWriter pw = new PrintWriter(os)

pw.println("Hello");

Comment: Why are you initializing the `String s`? It's pointless: it gets reassigned in the very next line.
Comment: @user207421 it's because s/he reused the variable "s". If the code is ran as is, there will be an error message saying that "s" is a socket type and not a string. Should probably get read of the String s declaration and rename the "s" variable in the While loop to something else.


how to reach from terminal 2 to terminal 1 in Mumbai airport

Question:
Are Santa cruz domestic airport T1 and Sahar T1 airport same ?
I am travelling from Goa to Mumbai with Jet Airways, it will be arrived on 5:40 am at Mumbai Airport Terminal 2 and then from Mumbai Airport Terminal 1 I have to take another flight (Indigo) to Nagpur on 8:20 am (departure time). Could anyone let me know it is enough time to reach from terminal 2 to terminal 1 with all baggage.
What is best way to reach from terminal 2 to terminal 1.
Answer: You can transfer in 2 ways:

Look for transfer to T1 (bus) after you clear the customs, takes atleast 1h
Exit T2 and take a taxi to T1 (indigo serves in T1), bit faster.

http://www.csia.in/tofrom/In-terminal-transfer.aspx
http://www.mumbaiairport.com/terminals.php


Why are the two versions of Chromium and VLC available in Ubuntu software of different sizes?

Question: If there is no difference between two Chromium options I see while installing, other than their developers, then why do their sizes differ? One is 212Mb and the other 224Kb. There's a similar case with VLC.
Comment: Related: [Why are there 2 packages for some applications (e.g. Chromium) in Ubuntu Software?](https://askubuntu.com/q/972411/480481)
Answer: One is traditionally distributed in deb package form and the other is distributed as a snap package
See What is the difference between snaps and Ubuntu Software Center-based apps? for details.
The differences in size
This is because of how the two distribution systems handle dependencies. Linux apps (software) depend on a lot of common files.
deb packages
With a traditional distribution system like deb, you download and install files used by multiple apps only once.  Sometimes two different apps may need different versions of one common file. This can cause conflicts. This is one of the reasons the apps in the Canonical-managed repositories for a particular version of Ubuntu, say 18.04, are not always the latest version. The advantage is small download and installed size and maximum compatibility with all the common files.
snap packages
The snap system puts all the files (common or not) in a sandbox. This makes the download and install size very big, but one app does not depend on any other files used by another app. This makes snap based apps very stable and secure. This also allows the maintainers of snap packages to update the app to the latest version without worrying about the new version of some common file breaking some other app. The advantage is always having the latest version.
Hope this helps


What's behind \over?

Question: Typically a TeX command have arguments coming after it.  But the command \over, which is used to produce fractions, can access the token before it.  How exactly is it implemented and can I define a custom command like that?
Comment: @LSpice Actually TeX always maintains the "current math list" (in math mode) and when it finds `\over` it puts this list aside, starts another math list and when this one is over it builds the fraction from the two lists.
Comment: This is exactly the question that got me reading the TeXbook!  My understanding is that this behaviour is compiled into TeX; it's always maintaining a tokslist, just in case it happens to hit an `\over`.  Perhaps one could hook into this tokslist?
Comment: I remember once I found a command that takes a command and prints its definition, with which I tested `\over` but got nothing.  I too guessed it was built-in but still hoped there was a way to access the token list (although David's answer seems to imply there's no way to do that…).
Answer: It's a TeX primitive so no you can't define commands like it. It's also a pain in the neck and the cause of many of the problems in math mode, as it means that you can not be sure when you first encounter any math mode token what style things will end up in, hence the need for \mathchoice and various other horrors. If the primitive had had normal prefix syntax like LaTeX's \frac it wouldn't have been necessary.
Comment: I ought to have put this example in my polemic yesterday...
Answer: It occurs to me that there is one other TeX primitive that can do this: \lastbox.  It doesn't work quite the same; it just grabs the last box produced, if the last thing produced was indeed a box (and if you are not in the "main vertical mode" or math mode).  It is somewhat limited, though, since the box is immutable once written, whereas \over switches its parts to "cramped" style, squeezing superscripts and subscripts.  It is important to realize, however, that neither \over nor \lastbox can access previous tokens; once a token is expanded/executed, it is gone.  They operate only on lists: math lists or vertical/horizontal lists.
As David Carlisle said, though, its syntax is a poor design decision.  For user-visible commands you have the luxury of requiring the author to write the operation before its operands.  For internal commands, \lastbox is useful for picking apart things that were already produced in order to process them using knowledge that's only available after the fact.

What’s behind \over?


The SQL Server Network Interface library could not deregister the Service Principal Name

Question: After windows patching (windows 2008 R2 , SQL Server 2012 Sp2). I could not start SQL Server Service . I get error 1067 and this from the error log* The SQL Server Network Interface library could not deregister the Service Principal Name (SPN) for the SQL Server service. Error: 0x13, state: 2. Administrator should deregister this SPN manually to avoid client authentication errors."
Yes it is a production system and any help is welcome. I tried using domain account that has sysadmin and local admin privilege.
Thanks
Comment: One does not have anything to do with the other. The error regarding SPN has nothing to do with the service not starting. Error 1067 just means the service did not start, it is not sufficient information to determine why.
Answer: I ran in to same issue and I wander for about hours to fix it, finally I ended up repairing the existing database server 2016.
download SQL Server Installation setup package from this link:
SQL Server 2016_x64_ENU
Go to setup.exe >> Maintenance >> Repair
While repairing, error prompted saying it could not restart the servers, yu can cancel that and let the repair finish. Once finished, start the SQL Servers
Right click on start and go to Computer Management >> Services and Applications >> SQL Server Configuration Manager >> SQL Server Services >> right click on all the servers and hit on start.
This fixed my issue and was back on track. I am still looking for a better answer on why or what can cause that but for now, here's the fix!
Good luck guys!
Answer: Folks,
I was able to resolve the issue by repairing SQL Server installation in Add/Remove Program. I restarted the service in SQL Server Configuration management and SQL Server Service,SQL Agent started and the application is also up and running.
Hope this will help out someone.
Thanks


Lamborghini Centenario completes Barcelona in 8 secs

Question: Well, no explanation is needed frankly, but in Solo Race mode on the Barcelona track, the car Lamborghini Centenario (played by computer) at times comes first and completes the mission in under 8 secs. Is this a bug?
Answer: I would guess it's the result of a hack/exploit.
In a lot of online games with leaderboards, at some point in the games life some hackers figure out how to submit times without it being checked by the game.
So you start seeing times that are 0.001s for a race that is at least a minute. Or for high score things, a score of 999999999 (they basically can throw in any score they want).
They can post impossible scores because, and at that point I do not know exactly how, they can just tell the server 'Yes, I did x race in 0.001s' and the server just takes it like it's any other score.
Back to the original point: Probably the game takes the general leaderboards of the race and gives you a time that would be the average for the top 10% of racers, then the top 20, 30, 40, 50 for the times of your opponents. Thing is, a bunch of people clock in those hacked times of 0.001s, pulling down the average of the 'top 10% of players' to something like 8s.
I don't know the game in general, but if you look at the leaderboards of all players on that race, I would guess you would see a bunch of 0.01s at the top of the leaderboards.
Comment: Umm... this is a local game mode which does not even require network! And I haven't hacked the game
Comment: Tought Asphalt 8 was a mobile, always online game. Even if it doesn't need network, I would guess that they pack in those 'par' times in updates, so it defaults to it if there is no internet connexion. But I'm very much guessing.


Energy transformations in chemiosmosis and ATP synthase

Question: In terms of energy, how does chemiosmosis drive ATP synthase? How does electrical energy turn into mechanical energy and then into chemical energy? Would the movement of $H^+$ be considered passive diffusion or secondary active transport?
Comment: Why close this question? It is a complex topic and the question is clearly formulated. Vote for leave open here.
Comment: @AliceD because it is a problem statement question, aka, here is problem community do my work to produce answer.
Comment: Do you want to know the exact mechanism of the binding change mechanism, i.e. which subparts of the synthase are altered and how their binding with other units ultimately bring about ATP synthesis, or just how, intuitively speaking, would a concentration gradient drive something apparently unrelated, ATP synthesis?
Answer: ATP synthase is basically a pump operating in reverse: while transporters such as the Na/K ATPase uses ATP to push ions against a chemical gradient (resulting in potential energy), ATP synthase uses the H+ gradient across the mitochondrial membrane to make new ATP.
A pump uses ATP (chemical energy) to achieve one-way transport by inducing conformation changes in the protein (mechanical energy), which either opens the channel only when ions come in contact with the low-concentration side, or closes the channel when ions come in contact with the high-concentraton side. In either case, the result is that ions can pass only in one direction, and a concentration gradient will build up (potenial energy).
In the case of ATP synthase, the process is simply reversed: an H+ ion entering the channel from the high-concentration side (the intermembrane space) causes a conformation change that opens the channel, and is coupled to the synthesis of ATP. Precisely how the ATP synthase accomplishes this on the molecular level is a complicated topic, and still an active area of research. See this article for an overview.
Note that ATP synthase is clearly reversible: if the mitochondrial H+ gradient collapses, for example if respiration is blocked, then ATP synthase can run in reverse, consuming ATP to pump H+ out of the matrix. There is even an ATPase inhibiting protein dedicated to blocking the ATP synthase in this situation, to prevent the depletion of ATP. Also, the lysosomal ATPase is structurally similar, but operates in the reverse direction to create low pH in lysosomes.
Answer: ATP synthase is a wonderful protein. I'll try to answer to your question without going into too much detail.
The protein complexes of the respiratory chain actively pump H+ to form a proton gradient between the two side of the membrane. ATP synthase uses the movement of the protons down their electrochemical gradient to synthesizes ATP molecules.
The transmembrane domain of the ATP synthase (FO) is a passive proton channel. Flow of protons causes the rotation of FO. Rotation of FO causes the rotation of the gamma subunit that connects FO with the catalytic domain of the ATP synthase (F1). Rotation of the gamma subunit causes the rotation of F1 that causes the synthesize of ATP. So the mechanical energy is transferred from FO to F1 via the gamma subunit. In F1 the mechanical energy is transformed into chemical energy via the synthesize of ATP.


Downloadable list of all accredited U.S. colleges?

Question: I am looking for a downloadable list of all accredited U.S. colleges. I have found many options to search databases, but I am looking for a downloadable list, preferably in spreadsheet format such as xls or csv.
Comment: Superficially this might appear to be a shopping question, but I don't think this is a shopping question at all, and I vote to reopen. The distinction here is that the OP is looking for a database that contains a list of accredited colleges. They are not looking for recommendations of  colleges. The question can be answered objectively, and in a single answer. They are not looking for a list of answers, they are looking for an answer that links to a list.
Comment: This question seems to an exact definition of a shopping question: _"Shopping" questions, which seek recommendations or lists of individual universities, academic programs, publishers, journals, research topics, or similar as an answer or seek an assessment or comparison of such, are off-topic here_
Answer: Here's what you're looking for on the U.S. Dept. of Education page in CSV/Excel.
Here's the header of the file:
<code>  Institution_ID    Institution_Name    Institution_Address Institution_City    Institution_State   Institution_Zip Institution_Phone   Institution_OPEID   Institution_IPEDS_UnitID    Institution_Web_Address Campus_ID   Campus_Name Campus_Address  Campus_City Campus_State    Campus_Zip  Campus_IPEDS_UnitID Accreditation_Type  Agency_Name Agency_Status   Program_Name    Accreditation_Status    Accreditation_Date_Type Periods Last Action
</code>
Comment: Geez, I was all over their site and couldn't find that. Thanks!
Comment: No "Date founded" though...


What is the implication of having features with less variation in a tree based model?

Question: I'm training a tree-based model (e.g. xgb). I have some features with more than 90% values constant. Does it add value to the model since the variation in the data is minimal?.
What would be the impact of the same if I were to use a linear regression model?
Answer: Variation is not the key. Notice that 0/1 indicator variables are used frequently and might have mostly 0's (like many missing indicators). The key is where is the variation in relation to what you are predicting and in relation to interactions.
For example, if your column is 0 where target = 0 and not 0 where target = 1, then the variation does not matter. Add a new indicator feature where the original column is 0 or not  0 may be a good way.  You might want to do this anyway.
Also with trees, columns are interacting, so if the lack of variation in the column highlights better predictive power in another column, then this is a win. Again, a transformation to an indicator variable may be useful.
Similar to a linear model. You add the interactions yourself with linear models.
Of course, the column may not be useful at all to the model, lack of variation or not.
No way to know unless you try with your data.
Comment: Thanks, @Craig. "transformation to an indicator variable may be useful". Can you elaborate on this?
Comment: "You add the interactions yourself with linear models". In Linear models, also features interact, right? The presence of one feature can affect other features. Why do we have to add interactions ourselves
Comment: Let's say your current column with 90% the same values = 0 for 90% and != 0 for 10%. Make a new column that has 0 for the 0 rows and a 1 for the non-0 rows. Or a 0, -1, +1 for original 0,<0,>0. Perhaps the strongest signal that the model can find is the constant value or not the constant value - feature engineering!! To learn the basics about interactions in linear models here are 2 articles  - https://www.cantab.net/users/filimon/cursoFCDEF/will/logistic_interact.pdf and https://yury-zablotski.netlify.app/post/multiple-logistic-regression-with-interactions/. Hope this helps.
Answer: Variation does not matter what matters is how good is your variable in predicting the target variable.
in order to know whether linear model is applicable, you have to fit data on linear classification . If the accuracy is good then you can proceed with the linear classification else  consider more complicated models like SVM decision tree


Catapult vs. Trebuchet

Question: I have been looking at trebuchet designs lately, and I have noticed that most, if not all, have a sling attached to them. Without such a sling, the machine would be a catapult. In terms of the speed and energy of a launched projectile, what is the general difference between a catapult and trebuchet? Would trebuchet projectiles have extra centripetal acceleration due to the sling?
Answer: The sling is not what makes it a trebuchet instead of a catapult. Catapults get energy from tension (usually torsion) and the arm hits a stop near the top of its arc to release the projectile. Trebuchets get their energy from gravity. The arm is off-center on an axle with the longer "launch" end (with or without a sling) holding the projectile and the shorter "load" end (locked in the "up" position before launch) loaded with something much heavier. When the load is dropped, the launch arm comes around at a much faster velocity due to its increased length. Think of it sort of like the tip of a bull whip can reach 900 mph, but your hand can not. It's just taking advantage of fulcrum points and counter weights to do so. The sling adds to that by extending the launch arm without increasing its weight by much while also improving accuracy. Throw a baseball with your hand cupped like a spoon and then throw it with your fingers spread to get max grip and it's easy to see which is more accurate.
Answer: Let's say you have a catapult that can be turned into a trebuchet by attaching a sling to the end of the projecting rod. And let's say that it always launches the object with its projecting rod moving at some particular angular velocity instantaneously before it is stopped.
Adding the sling has some benefits in terms of launching something at an enemy. The sling tends to launch the object at a more horizontal angle which means it will plow a line through the target rather than dropping on it from above, this increases the damage output of the object, but also makes it much easier to aim. Additionally, the sling doesn't lose a lot of energy to friction, so this is an efficient way to redirect your projectile's momentum towards what you're trying to hit.
Answer: Both operate on the same principle: the velocity of a point on a rigid body undergoing rotation is proportional to its distance from the pivot.
The sling is simply an ingenious way to extend the distance of the the projectile from the pivot without extending the rigid arm. As the trebuchet arm moves in an arc, the sling exerts a centripetal force on the projectile and is therefore pulled taut. The radius of the projectile's trajectory is now the length of the rigid arm plus a component of the length of the sling. For a given angular velocity, this increases the speed the projectile is travelling at.
Note: From further reading, it turns out this is a gross oversimplification of the kinematics of trebuchet launches. Here is a much more in depth analysis: http://www.real-world-physics-problems.com/trebuchet-physics.html
Answer: Well ultimately the range depends on launch velocity.  This is a combination of acceleration (applied force) and time or distance (during acceleration.)
The trebuchet seems to give a much longer "casting stroke" , so reaches a greater launch velocity.  Very clever gadgets.

Catapult vs. Trebuchet


How to have skeleton/armature change with shape keys?

Question: I want to have it so when I change the value of a shapekey, it also moves a bone according to the value. So for example, when I change my character meshes eye width or height, the eye bones move with it so it can still animate properly. Another example would be change the characters leg length so when it is increased the bone moves as well to maintain the correct ratios and not distort the animations for it. I should probably also mention that I plan on using this in Unreal Engine 4 and will need it to work in engine. Any info on how to accomplish this is appreciated.
Comment: Suggestion. Show your work as images or gifs to clarify you question.  I believe I understand part of you question.  Not all of it.
Comment: Please show armature modifier settings. It also seems in most cases the armature should influence the shape key, not the reverse.  Armature modifiers can [Bind To: Vertex Groups or Bone Envelopes].  Which did you use and why?  My feeling is you should use Vertex Groups.  Full Disclosure ... I rarely use Bone Envelopes.
Comment: Use a Driver to control the situation.  Whether that driver is an existing bone or shapekey value or empty controller or bone controller can be determined by your needs.  Here is an example attempting to steer you to more research about Drivers https://blender.stackexchange.com/questions/36811/keyframe-toggle-visibilty-for-child-object-using-parent-object-in-outliner/36813#36813
Comment: You might also ask the Question separately ... Will a driver or other mechanism work from Blender to Unreal E4?
Answer: For the eyes consider adding a vertex group for a eye [bone].  This should dominate any envelope influence if the [multiply] option is disabled.
Link to Blender documentation
https://docs.blender.org/manual/en/dev/rigging/armatures/bones/properties/deform.html#armature-bones-envelope
Multiply
This option controls how the two deforming methods interact, when they are both enabled. By default, when they are both active, all vertices belonging to at least one vertex group are only deformed through the vertex groups method
Answer: What you want isn't impossible.  It is impractical though.
In general, for any given local area of a mesh, you either deform it via bones, or you deform it via shapekeys, not both.  That means you can have eye shapekeys with a head bone, but not eye shapekeys with eye.01 etc bones.  That's the practical way to do it: if you want better control, just use bones.  If you want to shape a character, do the gross shaping with poses (incl. scaling and whatever) and then do some minor corrections with shapekeys on top of that, after that.  Want to change the length of the leg?  Don't use a shapekey; instead, scale the leg bone.  The shapekeys are something you make out of bones, afterwards, to simplify the animations, not something you do on top of bones.
But the issue with shapekeys and bones used in conjunction in the same local area is that the shapekeys change the appropriate centers of rotation.  And yes, you can work around that, even though you shouldn't.
Let's say you have an arm bone, but you have a shapekey that widens the torso, making that arm bone no longer in the proper position.  Sandwich in a new arm bone as parent (duplicate, make duplicate parent of original), then give your original bone a copy location constraint targeting the duplicate, with inverted axes.  Now, whenever you move the new (duplicate) arm-parent, the original arm completely counteracts that movement, so that moving it does nothing-- all it does is change the center of rotation of the child, the original arm bone.  How you want to move that center of rotation is up to you, but drivers are one potential way to do it.
The "pivot" constraint can work in similar ways, but in my experience, it's buggy, and I'd rather do it the way I just described.
Note that this is designed for rotation bones, which is what most bones are, but it doesn't work with movement or scale bones.  Doing that is possible, but requires an additional control.  When working with rotation bones, you only need the parent bone, which you move to change the center of rotation, and rotate to rotate the bone.


What's the point of controlling the physical posession of classified documents?

Question: Once a person is trusted with a classified document, there is really no way of stopping them from using the information however they want, unless you catch it being passed on somehow. They could copy it or just memorize it. What is the value of the document to bad players, since they probably couldn't verify its authenticity? We have stories of the National Archives having no idea about these documents' existence; how would China know if it is truly real or a fake? Other than it being part of National Security law, is there any real purpose to having documents that are valuable to bad players?
Comment: I'm not sure what you mean by your last Q in the body of the post. TBH. Are you questioning why governments keep anything secret/classified?
Comment: Not sure you understand how security works. Access to documents is tightly controlled, and most people are vetted to try and ensure they won't misuse them (there are apparently a few exceptions but for the most part there are strict procedures). And other methods of document transition, such as electronic copies or verbal transmission, also have risks and disadvantages. Unless you're arguing that governments shouldn't have secrets?
Comment: Regarding *They could copy it*: How? The secured facilities in which classified documents can be viewed tend not to have copiers. Sneaking stuff out of such facilities is nontrivial. It has been done, but it is not easy. While "security through obscurity" may not be the best tactic, it does work for at least a while.
Comment: Intentionally feeding different versions of false information to people suspected of being spies, moles, or informants has been SOP for centuries (perhaps millennia) in the spy versus spy game. If some version of that false information is reported back via another source, then bingo, one can pinpoint which of the suspected spies/moles/informants is the true culprit. So yes, the information from spies/moles/informants must always be treated as a bit suspect.
Comment: Related: https://politics.stackexchange.com/questions/74773/why-are-paper-copies-of-presidential-records-supposed-to-be-important-given-that
Comment: The question is physical possesion not access to said documents.
Answer: The title Q is kind of nonsensical. The whole point (i.e. definition) of classified/secret info is that access to it is restricted to a limited set of people who (in theory) are trusted to not misuse it and "need to know" it. Yeah, occasionally such people defect and "spill the beans" to some other/opposing side or just make it public, but both vetting those people beforehand and punishing defectors [in the aftermath] when possible reduces the likelihood of that happening. A single person being in possession of mountains of such info (cough, Snowden, for instance) makes the damage much more extensive than what someone could merely remember etc.
Answer:
there is really no way of stopping them using the information however they want unless you catch it being passed on somehow.

Well yeah, that's why it's all closely monitored, so you can catch people when they try to pass it on.

They could copy it

They could, but that would almost certainly be treason and they'll go to jail.

or just memorize it

All jokes of old people in positions of power aside, these documents are often dozens of pages or longer, you're not going to be able to memorize much of them.

What is the value of the document to bad players since they probably couldn't verify its autheticity?

Bad players have entire departments dedicated to verifying the authenticity of documents, they will figure it out. This is basically just police/detective work, and people are pretty good at it these days.

Other than it is part of National Security law, is there real purpose to having documents that are valuable to bad players?

Unless your alternative is "purge all this information from existence", yes it's useful to have these documents. They just contain all sorts of details of secret government operations and plans, sensitive things they learned about other countries, information on their own internal workings & structure, and all kinds of other things that you need to keep a country going and that can be abused by other countries.
A simple example of a document could be a list of spies operating in another country; you need that information because you need to know who your spies are, if the document falls into that countries' hands they'll be able to know who your spies are, but it's likely dozens of pages of details on their operations so someone allowed to read it is unlikely to memorize more than maybe a few names and then it's hard to know if it's authentic. But if you have the entire document, all those spies are going to be in danger.
Comment: There is no 100% foolproof way of keeping secrets, and the OP doesn't seem to have an alternative. But history shows that governments can keep many secrets, although there are certainly lapses. (And complete lists of spies will be very closely controlled if they exist at all - it is more likely that each agent running spies will only know the identity of those few that they are directly concerned with; a security breach may damage operations in one country or area but not worldwide.)
Comment: "They could, but that would almost certainly be treason and they'll go to jail."   It's not treason, it's espionage (which is much easier to prove in court than Treason.).  But yeah, you'll got to jail.   It's actually a capital offense, so you'll go to Death Row (however, most people charged with espionage will take a plea deal and cooperate with the investigators in exchange for not getting the death penalty).
Comment: A few details is all that is really needed to memorized like who is the asset or source and what are the highlights of the document.
Comment: Also, sometimes you could have two documents neither of which have classified information on them... however, the information in document 1 AND the information in document 2 could provide an insight into something that is classified in nature.
Answer: Information is real currency in high-level diplomacy.
While it is true that bad actors cannot fully verify the authenticity of a paper document due to potential forgery, the off-chance that they might be real is still valuable information.
For example, if China obtains documents about US-EU negotiations on EV trade, they might know that US is planning to make their own EV and EU is looking for new buyer. With this knowledge, they know they have an upper hand when it comes to opening their own EV market to EU, all because US could not keep their own documents safe.
The reverbrating impact of document leak is unrpedictable depending on who obtains them. So there is good reason to try to contain their spread.
Answer: Keeping a secret is difficult and it can fail on a whole range of factors. For example any bit of information can:

be intercepted
destroyed
forged
fall into the wrong hands
be compromised
manipulated
reveal relations
compromise the exchange channel

and many more. And on top of the content of the message you've got metadata, that is data about data. So idk if two countries are at war and you get awareness of an unauthorized phone call going out from a government agency in your country to one in the other country, then regardless of the content of that call you might already expect treason. So the call itself is the information, the content is just bonus.
Similarly if you know how official documents look like, that makes it easier to forge them or might help break ciphers. Like for example if you know that each morning a routine message is broadcasted to all troops (easy to intercept), that always starts with the same formula for greeting and farewell, then you know what the original must have looked liked and what the cipher looks like and so you can possibly deduce the nature of the cipher and maybe even the code itself.
The thing is while there are theoretically unbreakable ciphers, you'd still need to transfer the code to decipher the message (which can be intercepted), so either both sides need a code book or cipher machine (from the start, i.e. difficult to update), which would be physical objects that would be VEEEEEEEEERY dangerous in the wrong hands, or you'd need to use a weaker cipher, that is more versatile, but could be vulnerable to such known plaintext attacks. There are also asymmetric encryptions that allow sender and receiver to use different codes, however they might be vulnerable to other methods such as guessing and quantum computers that are fast guessers.
So it's not just the information that is of interest but also whom your communicating with (affairs, treason, business relations or relations in general, aso...), when you communicate with them (might map your schedule out of that), what the structure and style of that message looks like (in case of emulation, forgery, manipulation or verification) and many more.
Also verification is another difficult topic, because as information are subject to forgery and manipulation you're kind of in a predicament, because on the one hand you want the receiver to verify it is you who sent the message and not someone else (in case of for example orders), while depending on the content and context of the message you might also want to have plausible deniability (don't know what shady business you're plotting or what is not yet meant to be publicly known). So anything from the strength/durability of the paper, to the ink of the printer and slight imperfections in the font type or whatnot anything can serve as an identifier for better or worse. Not to mention specific dirt or even trace amounts of DNA and fingerprints. And even if the current document is worthless, the next one with the same markings might now be identified because of that. Kind of like an adverse 2-factor identification.
So essentially the more someone tries to make something a secret the more valuable next to ANY information that you can get from them and about them, can be to you, in the quest to compromise that secrecy.
Usually that's too  much of an effort in most cases but when it comes to head of states, megacorp leaders and whatnot, it suddenly becomes viable in terms of the cost/risk/reward ratio.
PS: Also if you restrict information, then the leak of information might also be an information. Like if the list of people who got access to that kind of information is rather short you already know that among those there's either a mole or another breach/imperfection of security protocol.
Answer: OK, besides the other answers, let's take 2 assumptions from your Q which are flawed:

They can memorize/copy.

They can, sure.  But what if it is not so much them, as their maid, which has been planted as a spy (wouldn't work with POTUS or anyone high enough to warrant secret service protection, but might lower down) and now snaps pics of carelessly kept documents in their home office?  People have been planted in embassies in the past to do that.

they probably couldn't verify its authenticity

Maybe they don't have to.  If you are the North Korean secret service and you see a list of informants passing on NK state secrets to the US, you can just put those people under extra surveillance and you will catch them offguard eventually.  Although NK may take more coercive shortcuts to figuring things out.
Bottom line is documents with actual secrets in them (not overzealous classification) have good reasons to be carefully secured.
Answer: In reverse order,

Is there any real purpose to having documents that are valuable to bad players?

The answer to this question is simple: The documents are valuable to the holder. It would be impossible to make a nuclear weapon, a stealthy aircraft, a spy satellite, an encryption algorithm, whatever, without very detailed descriptions of those devices or concepts. That they are valuable to the holder of course also makes them valuable to the bad players. That the information is potentially valuable to the bad players is why the information is protected.

What is the value of the document to bad players, since they probably couldn't verify its authenticity?

That has been a problem and has been a part of the spy versus spy game for millennia. Countries (and companies) sometimes intentionally leak false information. They sometimes intentionally feed false information to people suspected of being a spy or a mole or an informant. The solution is to vet the received information.

What's the point of controlling the physical possession of classified documents?

Nowadays, it's not just physical possession. It's also electronic possession. The point is that the information is valuable.
For a complex system, it's fairly easy to get to the point of having invested a person-millennium in the development of that system. That's the equivalent of one person working on something for a thousand years, which is not possible. However, it is possible for one hundred people to work on something for a decade, or five hundred people to work on something for a couple of years. A "bad player" can shortcut that person-millennium of research and development time by stealing the information. So organizations protect it, screen individuals who have access to it, and limit how the information is accessed.


How logical to select features with respect to the correlation matrix and weigthing?

Question: Is it logical to name low correlated features as valuable and choosing the low corelated ones for classification? Or it depends on the algorithm used for the purpose? How do I need to interpret a correlation matrix,then?
Answer: ...It is still unclear to me what exactly your goal is, but I will give this a stab and edit (or delete in the worst case) the answer later on.
You have a number (probably rather high) of features and want to classify. And you wonder about whether you should choose features which are highly correlated with other features or not?
First, consider the following: If the feature is highly correlated with the class labels, it will also be correlated with other features with highly correlate with the class label.
You could also look at the correlation within either the positive or negative class, but then you will miss the correlation with the class labels. It is entirely possible that Feature A correlated with Feature B within the positive class due to common noise and within the negative class but that Feature A correlates with the class labels and Feature B does not.
Long story short, I would not exclude any feature because of correlation (less than 1). Regularized methods like elastic net and lasso will only select correlated features if it helps. Others like Random Forest might use both, which can also increase robustness if they can be independently missing.
Which more details about what you trying to do, this information could also be more specific.