Can I enable the Dynamic Page Cache module and the Internal Page Cache module?

Question: In a Drupal 8 site, can I enable the Dynamic Page Cache module and the Internal Page Cache module? Could I have issues when both the modules are enabled, or is it fine to enable both the modules?
Answer: According to Wim Leers, who is one of the main architects of the caching system in D8.

PUBLISHED on OCTOBER 12, 2015
Drupal 8 now has a Dynamic Page Cache. The Page Cache module only
works for anonymous users, the Dynamic Page Cache module takes that a
step further: it works for any user.
Since April 8, Drupal 8 had its Page Cache enabled by default. Exactly
5 months later, on September 8, the Dynamic Page Cache module was
added to Drupal 8, and also enabled by default.
source: Drupal 8's Dynamic Page Cache

Therefore, both of those caching modules come enabled by default out of the box, you don't have to do anything to enable them.

will not cause any issue?

No issues at all, Drupal 8 was designed to use both.

The Page Cache module caches fully rendered HTML responses — it
assumes only one variant of each response exists, which is only true
for anonymous users. The innovation in 8 on top of 7's Page Cache is
the addition of cache tags, which allow one to use the Page Cache but
still have instantaneous updates: no more stale content.
The Dynamic Page Cache module caches mostly rendered HTML responses —
because it does not assume only a single variant exists: thanks to
cache contexts, it knows the different variants that exist of each
part of the page, and thus also of the final (fully assembled) page.
During the rendering process, auto-placeholdering ensures that the
parts of the page that are too dynamic to cache or are simply
uncacheable are replaced with placeholders. These placeholders are
only rendered at the very last moment. The Dynamic Page Cache module
caches the page just before those placeholders are replaced.
source: Drupal 8's Dynamic Page Cache
Answer: As far as I understand, Internal Page Cache serves the same content for all anonymous users. So if you want to serve different content per anon user (maybe a shopping cart, session or location related data etc.) you should disable Internal Page Cache.
Answer: Yes they work hand in hand together.
Internal page cache will handle anonymous users, while dynamic page cache will handle all user types.
The only difference is that internal page cache will return a full page with no further rendering needed, dynamic page cache on the other hand will return a "full" page, but some parts of it are just place holders that will still need rendering before the response is sent.
The place holdered content are mostly for varying user related content.  The place holders make it possible to cache the content in spite of the variation.
https://bryanmanalo.com/how-drupal-caches-work-under-hood


Does a technical writer need API experience for writing API documentation?

Question: I am a technical writer that currently writes for the aviation industry. I got a job offer for an API technical writer position. They said I don't need API experience, but they think my experience with HTML/CSS/JavaScript and XSL is enough for me to communicate with the developers and produce the API documentation. Thoughts? I'm a technical person but I just don't have any experience with API.
Comment: I think you'd be able to learn quickly enough. But if you're unsure, try looking at some API documentation. Or see if you can contribute to the documentation for open source projects on github.
Comment: API is not an algorithm or a program, API is just a contract. Thus, one does not need to be a developer nor a user of an API in order to write documentation. Understanding the contract is all that is necessary. This is different from writing a tutorial, because that would require you to actually write code.
Comment: @towr thank you! I did some research last night, and it seems that most that have trouble with it, at least in the technical writer field, are those that have no aptitude for coding/programming languages in general. I'm going for it!
Comment: You mean you don't have experience of that API, of documenting APIs in general, or of using any APIs? Do you know what an API is? If you've any familiarity with programming you should understand APIs even if you didn't call them APIs. But if you've absolutely no concept, then maybe you don't have enough experience.
Answer: I spent decades writing books about things I didn't have experience with when I started each book, because they didn't really exist before I wrote the book, which was released at the same time as the technology. Your job in this role is to ask the right questions, to learn quickly, to come up with good examples, to try stuff yourself (with a pre-release version in many cases) to see what happens and then document that, and to write clearly.
Done well, you produce documentation the developers never could, because they know how it works but may not really know what it's for. Done really well, you find flaws in the product that they fix before they ship it (yes, I've done that more than once.)


R.java deleted automatically: Android

Question: When I changed some design in .xml file, R.java file automatically deleted. How can I get back that file and what is the solution to resolve this problem, that in future this problem does not occure.
Answer: check all your errors in xml files structure  (layouts, string etc...) even if sometimes they are not easy to spot.
My advice is to undo the latest things you've done until you find where the errors were and fix them.
Once they are all fixed the R file will be created again (maybe you need to clean your project: project -> clean)
In the future just try not to break the xml files and this won't occur again xD
Comment: This is the best answer IMO I basically fixed all the mistakes in my layout files and did Project --> Clean
Thanks
Answer: You can also disable automatic build in your Eclipse IDE(Menu -> project- > Uncheck build automatically). This way the R file will be recreated only when you manually build the project and not when you save changes in an xml file.
Comment: This will be quite troublesome, as Eclipse will not be appending resources after R.string..., R.layout..., and else, if you don't update R.java frequently.
Comment: But this will not solve the problem, only make that you don't see it until you build the project, because if when you build it manually an xml file is malformed the build will also break and you can't even know how long its broken (harder to debug)
Answer: Fix your errors and the R.java file will return...e.g when i added an image in my resources folder its name was in uppercase....when i changed it to lowercase,immediately after doing it my R.java file returned...its all due to errors...just fix them and it will return
Answer: I agree with @maid450.
I also have faced similar situations.
If your problem isn't resolved after all this, ultimate option is to create a new project, and copy files to it.
Answer: one solution is that Go to Eclipse project tab -> uncheck Build Automatically ->  Clean the project.Make sure that there is no error in your project also don't try to edit the R.java file one it will created. Then manually build the project. you will get the r.java file.
Answer: The best solution for Mac/Eclipse user is to go to the SDK Manager and re-install the Android SDK Build-tools, and then restart Eclipse.
For some reason after performing a Clean action on a project the R.java file for all projects happens to be deleted from the system.
Answer: Clean the project.
Menu [Project] -> [Clean...] -> Select you project -> [OK]
Project will rebuild automatically, if not, chek
Menu [Project] ->[Build Automatically]
Answer: The R file deleted automatically when I changed my activity_main.xml in Android Studio.
What I did was copy the R java file from another project and paste it into the project in which it got deleted.
Hope it helps.   :).
Location for R file.
Project/app/build/generated/source/r/debug/com.android.'projectname'/R.java
Where is the R.java file in Android Studio?
Comment: R.java gets created automatically and its totally different from another application. Do not try this

R.java deleted automatically: Android


Scheduled Mail in asp.net

Question: Hai Guys,
         My application deals scheduled mail concept (i.e) every morning 6.00 am my users gets a remainder mail about their activities for the day... I dont know how to do this.... Many told use windows service but i will host my website on a shared server i may not get rights to do windows service... Is there any dll for sending mails at a schduled time through asp.net application ..please help me out guys......
Answer: You cant do much in a shared hosting. Try upgrading your hosting or else write a windows service, to run on your machine, which will call an asp.net which can send out emails. Of course your machine has to be switched on all the time or at least during 6:00 AM :). You will have to take proper steps to avoid unauthorized request for that aspx page.
you can check this article too: http://www.codeproject.com/KB/aspnet/ASPNETService.aspx
Answer: You can't really do this with ASP.Net.  ASP.Net is for web pages - which are reactive to HTTP requests.
You need a scheduled task or a service.  All a website can do is respond to requests. I guess you could program the functionality into a web page and have a remote process request the page every morning - but what happens if someone else requests the page?
Comment: You can do it, but I'd consider it cheating. One way is to trick the cache into being a scheduling service for you.
Comment: Wouldn't that be pretty risky?  The cache is the first thing to be plundered if resources get low, and you never know when it could be invalidated...
Comment: Sure, absolutely, hence 'cheating' :) A slightly more legitimate approach would be a `BackgroundWorker`.
Comment: I've tried trying to trick the Cache... didn't work. Timed expirations don't actually occur until the next request.
Answer: You can either have a program that runs constantly and has a timer or a loop that checks the time of day and then sleeps for a really long time and when the timer goes off or it's the right time of day it sends an email, or you can launch a program as a scheduled task.  The first method can also be implemented as a service if you would like.  Keep in mind you dont need ASP.Net to send emails, all you need is a console application that uses System.Net.Mail.  Check out the mailer sample on MSDN for a very simple idea.
One other thing you can consider: IIS has an smtp service that you can install and it uses a pickup directory to send mail.  You write an email to the pickup directory as an .eml file and IIS grabs it and sends it almost immediately.  If you do that, you'll still have to write the emails (System.net.Mail will write the .eml files from a MailMessage, just set SmtpClient.DeliveryMethod to SpecifiedPickupDirectory or PickupDirectoryFromIIS and call SmtpClient.Send) but it will then send them for you.  You'll still need to schedule something somehow so this might not be all that more useful but I thought I'd at least let you know that it exists.
One thing to be aware of: when the IIS SMTP service reads the send envelope of the .eml file, the order of the Sender and From headers is significant; if the From header appears before the Sender header then the MAIL FROM command will use the From header, which is incorrect (and MS won't be fixing this one). This appears to be an issue ONLY with the IIS SMTP service as it hasn't been reported anywhere else that I'm aware of.  Reversing the order of the headers is the work-around.  By default SmtpClient always writes the From header first.  I'm aware of the issue and IIS isn't fixing it but I may be able to get a fix into SmtpClient for the .NET 4.0 RC build that re-orders the headers for you but no promises.
Answer: If you happen to have it handy (and I assume you do), you can use a SQL Server Agent job to make a request to an ASP.NET page that sends the email.
Here's some example code:
http://nicholasclarke.co.uk/blog/2008/01/16/web-request-from-sql-server-via-c/
Of course, since you're using SQL Server to call CLR code anyway, you could just have that code send out the emails (via System.Net.Mail) rather than requesting a page on IIS to do so. To do this, SQL Server would need:

Access to all of the data needed to send the emails
Outbound firewall access to send an email
CLR code that encapsulates all of the logic needed to know where/what to send.
Answer: Okay this is interesting, and what I did fits silky's definite of 'cheating', but no it was pretty cool for me.
What I did was spawn a new thread from ASP.Net code (it was possible on that host), and that thread did the scheduled job.
I checked whether the thread was alive (which is pretty easy) on every visit to the website (not so reliable I know, but it worked cause that website has plenty of visitor).
If at all you do this

Treat this as a stop-gap while you arrange to get a dedicated host or VPS.
Rest assured that the hosting company will kill your thread and withdraw permissions when they discover you're doing this.
Comment: I created a similar solution at some point. I simply started the thread in Application_Start in web.config. You have to be aware though of the IIS settings. On a Windows 2003 server, the default setting is that the application will shut down after 20 minutes of inactivity, in effect killing the thread.
Comment: That's why I did a keep-alive solution on visits.

Scheduled Mail in asp.net


Where did the phrase "put a sock in it" come from?

Question: What are the origin and history of the phrase put a sock in it?
Comment: Mum came into my room and found an empty draw!
Comment: @Susan Wonder why someone out of the blue should thank me. What is the etiology of *this* symptom?
Comment: I believe it was the old gramaphone trumpet, but love the idea of the army using it.
Answer: In terms of location, it comes from Britain. From ThePhraseFinder...

The imagery behind the phrase is that putting a sock in whatever was causing the noise would quieten it down. What that thing was isn't known. There are suggestions that this may have been the horn of an early gramophone or, more straightforwardly, the raucous person's mouth. [italics mine]

The author of that page says the earliest instance he could find was in the weekly literary review The Athenaeum, 1919. He points out that the fact that it was defined in the reference suggests the term was relatively new at that time. I found a reference a couple of years earlier in Happy - though Wounded! The book of the 3rd London General Hospital, 1917,...

"Put a sock in it, Fusiliers."
   Hereupon a sudden and awful silence. The Night Sister has entered the ward.

I suppose the timing (and that earlier instance) makes it likely the expression arose in the military, as much slang does. So perhaps the thing that needed stuffing with a sock was the bugler's trumpet. (Or the piper's bagpipes - especially if he was practising, when others were trying to sleep!)
Comment: Anecdotal, but plausible: https://www.liveauctioneers.com/news/features/associated-press/collector-turning-volume-antique-phonographs/
Answer: While I admit I quite like the etymology as given in FumbleFinger's answer, it is possible, according to World Wide Words, that it is merely folk etymology. The explanation is described as a 'well-meaning but misconceived attempt to explain the origin of an existing saying', albeit widely spread such that it is 'unsurprising people accept it'.
Instead, World Wide Words suggests that the phrase's true origin is World War I and some literary extracts from that time period containing this phrase are given as examples. Two of these examples are from two newspapers - one from the UK dated 8 August 1919 and one from Australia dated 14 June 1919. This therefore suggests that the phrase did not originate from Britain exclusively. To quote World Wide Words:

These two citations strongly suggest an origin among servicemen in the First World War, and explain how the expression got into Civvy Street simultaneously in Britain and Australia in 1919 — it was carried to both by homecoming soldiers.

The wartime etymology is also referenced in a blog post on a word history blog. Mentioned in the post is a source doubting the gramophone story. To quote the post directly:

But, according to B. A. Phythian in A Concise Dictionary of Phrase and Fable (1993):

This seems improbable: in the sort of household that alone could have afforded such a novelty [= the gramophone] it is unlikely that a sock would be used in the drawing-room.

And he explains:

In a barrack-room, however, socks would certainly be lying around at night and one can imagine a heavy snorer being shouted at and told to 'put a sock in it' (in his mouth). Some such military origin is far more likely.

Based on this information, I theorise that the phrase put a sock in it came into existence during the First World War and found its way into everyday speech in both the UK and Australia (at least) through the returning soldiers.
References
http://www.worldwidewords.org/qa/qa-put3.htm
https://wordhistories.net/2016/08/21/put-a-sock-in-it/

Where did the phrase “put a sock in it” come from?


Wordpress search field won't get wider

Question: I've tried everything I know how to get this input field to 100% but I can't seem to do it. It always stays at some stuck width. .search-field is the stock class and I've targeted that class using max-width: none; or width: 100%; and or input {width: 100%;} but it never changes. Has anyone else experienced this? If so, what was your solution, if any?
Comment: Have you used the Inspector to see the generated code? Perhaps there is a hardcoded style in that field. Use the inspector to also see the CSS class assigned to that element. Then you can use the appropriate CSS class name to override the value. The Inspector is also good to try out various CSS tags on an element; you can see immediate effect.
Comment: Yeah, I tried that, actually. It's just so strange! I just wonder if wordpress embeds a style... maybe even the function that overrides what can be changed in CSS. I've tried to really drill down -> `div.search input#search-input.search-field`. I could change font-family, padding and everything else, basically, but just not the width!
Comment: Inspector can help you see if there is an embedded style. Or looking at the source code. Could be the theme that is fixing the length. Could be in header.php or sidebar.php (if a widget).
Comment: I posted this on wordpress.org and someone noticed that pixels work but percentages don't. I'm not marking this as solved just yet as I'm holding on to hope that someone can figure out how to make percentages work :)
Comment: Percentages are based on the parent container size. Pixels will override the parent container size, if the number of pixels is wider than the parent container.
Answer: Over on wordpress.org, A user commented that targeting this path:
header form.search-form, header .search input { width: 100%; } might work and it did.
I didn't realize that targeting the form would have transpired to much but it did. His answer resolved it.

Wordpress search field won't get wider


How can I fix a nail pop in vinyl flooring?

Question: I have two areas where the nail has popped causing some damage under our vinyl flooring. The planks were stuck together by offsets and self-glue. Is the only option to re-plank? I'm worried cutting and bending will just cause more damage overall. Of course, it's in the middle of a hallway.
Comment: if your repair needs pathing there are color patches that can be mixed for a custom color. I've also used markers to create "wood grain" to camouflage patches.
Answer: A not-entirely satisfactory "fix" I've used:

Use a very sharp nail-set or strong awl to punch the nails well below the surface, being careful not to further damage the surface itself.
Fill the divot and cracks with a cement such as epoxy, removing loose pieces or those that cannot be pushed in. Leave the patch slightly proud (above) the surface.
Carefully sand the patch even.
Color the patch to blend with the flooring, perhaps with a furniture stain kit.
Overcoat with varnish, polish or wax.

The nails might pop up again, perhaps in as few years.
Answer: If you have spare flooring, that would be the best fix, carefully cutting off locking portions of the tongues but not the whole tongue to act as a glue tab. then surgically apply a compatible glue to hold the new piece in since there is no locking edge to keep them in.
The fix for the issue you have now is not the best one either but it is a different take on DrMoishe Pippik's idea.
Since the floor is displaced already at the nail pops,  and what remains are several loose pieces still attached by a "flap hinge", carefully with a sharp pointed knife, completely remove just of of the pieces that are still hinged in place for access to the nail head below. Use a nail set to drive the nail down deeper, but you may need to do this at a slight angle to keep from knocking more chips off. If you tap the nail set lightly to set it into the nail head slightly, then you make use harder strikes to set the nail in deep enough. After that is done, use super glue dropped into the hole to start the final part of the repair. Make certain the glue is in the right places so it will hold the chips in place once they are flattened down. Reset the old chip that was taken out the same way you found it.  Using a FLAT piece of hardwood or metal perhaps, place that over the area and hit it once real hard with a hammer to drive the pieces back down and allow the super glue to grab them in their new location.
I don't expect it to be an invisible fix, and if it fails miserably, there is always the first option.


Writing EXIF coordinates to images based on common field?

Question: we did a photo survey with a GPS equipped camera (1800 images), then to improve accuracy we did a survey with a total station and renamed images with points labels.
Now I need to write the new coordinates into the images EXIF data (re-geocode images), using the image name as the matching field. The only method I found is based on time matching of a GPS track but this is not the case.
Comment: in what format are the new coordinates?  I'd consider looping over the image names, looking up the coordinates for the matching name, and then modifying the files with exiftool.
Answer: Thanks for your suggestion. Finally I did exactly what I was looking for using the software PhotoMapper Desktop.


Stored proceedure to set start value for autoincrement field

Question: I am new-bie to MySQL. I want a user-defined function for the below functionality. I have table that has rowid column which has UNIQUE, AUTO-INCREMENT, NOT NULL values. When the table has 100 rows,next id value is set to 101 by default.But when I delete 50 rows, then add a new row, it's again 101 but not 51.How to create & call function that updates value according to current no of rows.Plz give complete function code & how to call it when some rows are deleted in table.
Answer: You could try below:
<code>SET @count = 0;
UPDATE `tblName` SET `id` = @count:= @count + 1;
</code>
However, i do think it is NOT advisable to reuse the deleted rows auto increment id as auto increment field is not designed for this purpose. This is especially important as the id field might be used as foreign key in relation with other tables.
Comment: Ok, but I'm not using the rowid as foreign key but only want a sequential count of rows in table to have correct row count, be easy to delete rows just with the unique id.


Sending e-mail out of client application without storing password

Question: My Aim: Sending an email (e.g. support request, error report) out of a C# Windows forms application. I know how do do this technically but here is the catch:
In order to authenticate myself on the mail server (e.g. gmx, yahoo, own website) I need to store the login details inside the application (which runs on the client system). If someone extracts it or sniffs the network traffic he will have access to my email account. Maybe the second threat could be eliminated using a secure connection. However, it is still possible to get the password out of the application regardless if it is obfuscated or not.
So is there are 'secure' concept enabling me to send e-mail messages out of my program, which runs on the client pc without the need to store a password in accessible form and not requirering a special web service?
Answer: I had such a requirement in the past which we solved by using a web service to post messages.
If for example a user wanted to submit a bug report it would be turned into a web service call to our web server and it would then be forwarded accordingly.
To answer your question:
There is no way you can hide you mail server. If your program can send emails, so can the user with another program. (the same goes for a web service.) What you can do is use an open smtp server (smtp relay) but that is just asking for trouble.
Answer: If you are sending a message to a domain that the mail server is the final destination for you do not need to authenticate the sender, you only need to do this when you are relaying mail to another domain.
Answer: You could allow email to only be sent by Active directory authenticated users.  That would allow you to check that the user has a valid account and is in a valid group "domain\MyMailSendUsers" before your app is able to send the mail.
if you are using a local mail server it can also be configured to only allow connections from certain resources.  If you are using mail from an external supplier (yahoo, google etc) then you are going to have to store the usernames and passwords, theres no real way around that other than asking users to type them in each time they want to send, you could then store them in a runtime variable (and encrypt it) to keep them secure.


HP DL585 G6 and PCIE SSD

Question: We recently acquired a HP DL 585 G6, fully populated with SAS drives etc, we want to use a PCIe SSD and have brought an Asus RIADR Pcie SSD however the bios fails to recognize this, can anyone suggest things to try?
Answer: Use a supported PCIe SSD.
Your problem is likely due to the hardware not addressing the PCIe x2 interface correctly.
To verify the situation, look in the Rom-Based Setup Utility (RBSU - press F9) bios screen and see if the card is detected. If it does show up, then your issue is at the OS level. Update your server firmware if you haven't already, just to make sure.
The HP ProLiant DL585 G6 was released in 2009. It's old enough that this particular card may not negotiate speeds properly, or simply may not be usable. I would suspect that it be visible and would just drop to x1 speeds, though.
More details about your OS, any error messages and whether the card is known-good would be helpful.
See: Force renegotiation of PCI Express link speed? x2 card reverts to x1 width
Comment: The card is known good as we pulled it from an DL380 G5, there are no error messages, OS not really an issue as its not seen in the Bios.
Comment: @KevinWincott Then the issue is probably PCIe negotiation. Remember, this is a totally different architecture than a DL380 G5. Try different slots. Try bringing the server firmware *fully* up-to-date. If not, this device probably won't work for you.

HP DL585 G6 and PCIE SSD


Why does Java edition need a server to play Multiplayer?

Question: As the title says, Why does Minecraft: Java Edition need a server to play multiplayer Minecraft? while in Minecraft: Bedrock Edition you can easily join someone's world without a server. Can you join someone's world in Minecraft: Java Edition without opting for a server?
Why Does Mojang not create server-free multiplayer?
Answer: You can join to a LAN hosted game on JE just fine - if you're on the same LAN. JE on PC doesn't have the same 'friends network' with a centralized service tracking who is on-line, who is hosting a networked game and who is that person friends with - with consoles it's not nearly as robust as you make it seem either, a Playstation player won't easily connect to a game hosted from an X-box or Switch - the connection is managed by servers provided by given console manufacturer and exclusive to that console, unless some manufacturers decided to provide a cross-play and created a connection between their services (Sony is notorious for refusing to do this.)
Instead, you use "out of band" communications (Discord, communicators, phone) to decide which server you and your friends will play on. Setting up a server is more work, but it can run 24/7, possibly on a powerful machine rented for that purpose and capable of running smoothly with a lot of players on-line, and very complex contraptions and builds - not burdened by having to perform all the client-side calculations, and possibly with better network connection - specifically uplink - sending a lot of data which is expected from a server, and which is often deeply throttled on 'home consumer' broadband typical for console users. Never mind the open nature of Java Edition, allowing for modding the server thoroughly, or even switching it out for a 3rd-party version with features absent in "vanilla".
In general, JE sacrificed the ease of setting things up for a much more robust and powerful "end effect" - quality, power and robustness of the server.
Answer: When you connect to someone else's bedrock world, your console is connecting to their console. That console is a bedrock server. It also looks like Mojang is looking into Bedrock servers on PCs.
There are two "halves" of Minecraft, the program: The first half is keeping all the data about the world and everyone in it, and the second half is displaying that and taking input. Playing singleplayer the same computer (PC or console) is doing both parts.
Because console users generally don't expect to leave their console on, running a game-like background program, unavailable for playing a game, hosting but not "playing" is not available.
PCs can be expected to run game-like background programs. It is entirely possible to host a Minecraft server and connect to it from the same PC.
A commercial Minecraft server is a PC running the world part without the ui part, that someone is paying to run all the time.


Automate transactions

Question: Trying to figure out a method to automate transactions within a private testnet. There are several methods I'm aware of, but I'm not sure what would be the most practical. This is for testing purposes only. For example: automatically send X number of ETH between wallet a and wallet b every x number of seconds.
Comment: It would help if you listed what methods are you aware of. And are you looking to do it all inside blockchain or trigger the functionality from outside?
Comment: Currently, I'm doing it via Truffle. One method I was thinking about was Ethereum Alarm Clock and another was the through the use of the Oraclize.it API to initiate smart contracts at later dates. Ideally, it could be implemented within the blockchain, but it doesn't matter, I don't think. Another idea I had was implementing a cronjob to execute a shell script which allowed me to interact with the blockchain via web3. These are all hypothetical implementations though. The only way I've been able to do it so far is using Truffle, but this isn't an ideal method.
Comment: I would do this with web3 javascript in `geth` and a crontab to run it every X number of minutes. Very easy and transparrent way. You can do this with contracts too, but it is too risky to publish a contract code, if there is some bug, you are can lose your funds.
Answer: There is Truffle Tests that allow you to create multiple transactions, for instance within a for loop and employ "await timeout(ms)" to set the interval between each two consecutive transactions.

Automate transactions


Engine Runs Cold Nevers warms up above 1/4 way. 1995 Chevrolet G20 4.3L V6

Question: 1995 Chevrolet G20 3/4 ton Van 4.3L V6. The van never runs any warmer than 1/4 on the instrument panel. I have replaced the thermostat twice. Same issues. I have replaced the temperature control sensor. Still same issue. Doesnt matter if the van runs for 20 mins or is driven for 4 hours straight. Never raises above the 1/4 mark on the gauge and no heat. Any suggestions as to why it never warms up? Heater core inlet and outlet hoses both get hot ones not colder then the other. No fluid leaks anywhere. Been over it a dozen times. Van has a clutch fan instead of electric and clutch appears to be fine.
Comment: does the thermostat open? is the lower hose hot?
Comment: the lower hose stays cool. The thermostats have all opened. I originally thought they were opening too soon but ive put three thermostats in it. Two have been 195 degree which stats as OEM. Advance tried to tell me there was a 180 OEM and i even tried that one.
Answer: A bit late to the party, but since no one answered this, the 1/4 mark (190*) or a tad bit above is the correct engine temp on these.
If your heat doesn't work you have another problem.
Comment: Any reason for the drive-by downvote without comment? A bit over 1/4 is 190*F.Thank you very much.


Is it ever a bad idea to publish a sitemap for a blog?

Question: I have a blog, and I have been considering publishing an XML sitemap for it, which would include the index page, archives page, and an entry for each individual blog post. Is this ever a bad idea? Is it a good (or useful) idea? I'm particularly interested in the <changefreq> element: I edit posts from time to time, and while that's not a common occurrence, I don't want to set a particularly infrequent change frequency that prevents search engines like Google from indexing the edits. (The XML sitemaps protocol says that search engines may still crawl the pages more frequently, but has no further details on the matter.)
Answer: It's almost always good idea to publish an XML sitemap.
You can leave out the changeFreq element and accept the default if your web hosting can handle a reasonable crawl rate from the search engines. If you're already being crawled, you should have noticed any problems by now.
Add your sitemap to Google webmaster tools and you'll be able to check for any crawl problems, unreachable pages, 404s etc. Very useful.
The only reasons I can think of for not adding an XML sitemap are if your site contains a lot of duplicate content, broken links, empty or hacked pages. Fix those issues first, then submit a sitemap.
Answer: I have web sites with sitemap and sites without sitemap. I can't see any real difference in SEO. Google seems to decide the optimal frequency independently of changeFreq so it is almost of no importance. There is a setting in google webmaster tools for crawler visits on the entire site.
When I use sitemap (Wordpress Plugin) i use default settings for changeFreq that are:
daily - for blog page and blog posts.
weekly - for categories, static pages.
always - for main page.
Answer: I use XML sitemaps on all of my blogs. If you are using Wordpress this plug-in does all the work for you: http://wordpress.org/extend/plugins/google-sitemap-generator/
It will generate new sitemaps every time you publish or update a post.


Help with unzipping a .dd.gz, possibly corrupted

Question: I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". Someone told me to mount the file to a partition within the linux machine, and then I would be able to view the information within the file. I assume the file has to be unzipped before this can happen? If that is the case, is there anyway around the "unexpected end of file" (maybe a repair, or something that ignores the errors)? This is the only copy of the file.
Comment: This error is often caused by a truncated archive. Can you ask someone to send you the file again?
Comment: What makes you think its a zip file?
Comment: No someone cannot resend the file, this is the only copy. And the ".gz" at the end of it makes me think its zipped.
Comment: What's the output of `file XX.dd.gz`
Comment: the output is "sheeva-mem.dd.gz: gzip compressed data, was "sheeva-mem.dd", from Unix, last modified: Fri Sep 14 20:58:18 2012"
Answer: You can use the gzrt (gz repair tool) to unzip whatever part of the dd file remains. You can then type
gzrecover sheeva-mem.dd.gz

and attempt to mount the dd file:
mount sheeva-mem.dd /mnt/image -o loop

Possibly, the filesystem will be corrupted. You can attempt to repair it with fsck.
Comment: Ok, when I try to run the gzrecover command it says "command not found". Is this a tool that I need to download or should it already be on the system?
Comment: Yes, you need to install this tool. I don't know what your system is, on Debian based systems you can just do `sudo apt-get install gzrt`
Comment: Im running a Fedora 64-bit, and that command does not work. I tried to get the tool the "normal" way (with Yum, how I get all my other stuff), but that didnt work. Do you know where I can get it off the internet, or the command on Fedora? (thx for all your help btw).
Answer: gzip != zip.  gzip is a stream compressor, zip is an index'd compressor. They are completely different programs. "zip" is based on "PKzip", and is represented by the tools "unzip" and "zip" and uses ".zip"; GNU zip is "gzip" and "gunzip", uses the extension ".gz".
You can gunzip file.dd.gz and get file.dd, but that'll suck up a lot of space unfortunately.
Once you have the file.dd, just do, probably as root,
mount -o loop file.dd /mnt
to access the contents on /mnt
Answer: I've got bunch of corrupted .gz files with text files inside, tried to use unzip -FF with no success. Surprisingly 7z managed to extract with no problem, gave me ERROR: Unexpected end of data but extracted:
sudo apt-get install p7zip-full
7z x text.log.gz


maximum number of edges to be removed to possess a property

Question: I am working on a problem. We know that on squaring a cycle, degree of every vertex is 4. For squares of cycles, we know if we delete any arbitrary edge then still eccentricity is same for all vertices. And if we delete 3 edges incident on a single vertex, it loses its property that eccentricity is same for all vertices, because eccentricity is not same for those graphs having a vertex of degree1. How to find out the maximum number of edges to be deleted so that eccentricity is still same.  Any idea or suggestion will be helpful. Thanks for your help.
Answer: The square $G$ of a cycle graph of length $n$ has vertices $0,1,\ldots, n-1$ and an edge between $a$ and $b$ iff $a-b\equiv -2, -1, 1, \text{ or }2\pmod n$. Note that this implies that the claim that $\rho(a)=4$ for all vertices holds only if $n>4$. Therefore, in what follows, we shall assume that $n>4$.
Let $F(n)$ be the minimum number of edges that can be removed such that the same-eccentricity-property of $G$ is destroyed.
The distance in $G$ from vertex $0$ to vertex $k$ is quite obviously $d(0,k)=\min\{\lceil\frac k2\rceil,\lceil\frac {n-k}2\rceil\}$ and hence the eccentricity of $0$ is $\epsilon(0)=\left\lceil\frac{\lfloor \frac {n}2\rfloor}2\right\rceil=\lfloor\frac{n+2}4\rfloor$ (and by symmetry for all vertices).
We observe the following about shortest paths from $0$ to $k$:

All steps go clockwise or all go counterclockwise. This is because two consecutive steps in opposite direction either cancel or can be replaced by a single step.
If $\lceil \frac k2\rceil=\lceil \frac {n-k}2\rceil$, shortest paths of both clockwise and anticlockwise orientation exist.

Lemma 0. If $n\not\equiv 1\pmod 4$, then $F(n)>1$.
Proof: Let $G^\star$ be any graph obtained from $G$ by removing one edge.
Since each edge in $G$ is part of a triangle, $d^\star(v,w)\le d(v,w)+1$. Therefore, eccentricity can only change if the distance to the farthest vertices grows. For $v=0$, those are as follows:

If $n=4m-2$: $w=2m$ with a path of length $m$ clockwise and counterclockwise
If $n=4m$: $w=2m$ with as path of length $m$ clockwise and counterclockwise; $w=2m\pm1$ with a path beginning and a path ending with an edge of length $1$
If $n=4m-1$: $w=2m$ with a path of length $m$ clockwise (all steps of length $2$) and several paths counterclockwise (with one step of length $1$); $w=2m+1$ similarly.

In all cases, there are two edge-disjoint paths of the required length, hence the distance does not change when removing a single edge. $_\square$
Lemma 1. If $n\equiv 1\pmod 4$, then $F(n)=1$.
Proof:
Assume $n=4m+1$ (so that $\epsilon(v)=m$) and let $G'$ be the graph $G$ with edge $(0, 2)$ removed.
Clearly, $d'(1,v)=d(1,v)$ for all $v$ and hence $\epsilon'(1)=\epsilon(1)$.
The only path $0\stackrel 2\to2\stackrel 2\to\ldots\stackrel 2\to2m$ of length $m$ from $0$ to $2m$ does not exist in $G'$, hence $$\epsilon'(0)\ge d'(0,2m)>m=\epsilon(1).$$
Removing a single edge can destroy the same-eccentricity-property.
$_\square$
Lemma 2. If $n\equiv 3\pmod 4$, then $F(n)=2$.
Proof:
Let $n=4m-1$ (so that $\epsilon(v)=m$ for all $v$) and let $G''$ be $G$ with edges $(0,1)$ and $(0,2)$ removed.
Then $$\epsilon''(0)\ge d''(0,2m-2)\ge \min\{d(n-1,2m-2),d(n-2,2m-2)\}+1=m+1$$ because any path from $0$ must have $n-1$ or $n-2$ as next node.
On the other hand, $d''(1,v)=d(1,v)$ unless all shortest $G$-paths from $1$ to $v$ contain either $(0,1)$ or $(0,2)$. The latter is never the case and the former only if $v=0$ (but that case does not matter as $d''(1,0)=2\le m$) as otherwise the shortest path continues $1\stackrel 1\to 0\stackrel 2\to n-2$ and can be replaced with $1\stackrel 2\to n-1\stackrel1\to n-2$. Hence $\epsilon''(1)=\epsilon(1)=m$. $_\square$
Lemma 3. If $n\equiv 0\pmod 4$, then $F(n)=2$.
Proof:
Let $n=4m$ (so that $\epsilon(v)=m$) and again let $G''$ be $G$ with edges $(0,1)$ and $(0,2)$ removed.
Then $$\epsilon''(0)\ge d''(0,2m-1)\ge \min\{d(n-1,2m-1),d(n-2,2m-1)\}+1=m+1$$
whereas just as above $\epsilon''(1)=\epsilon(1)$.
 $_\square$
Lemma 4. If $n\equiv 2\pmod 4$, then $F(n)=3$.
Proof:
Let $n=4m-2$ (so $\epsilon(v)=m$) with $m\ge 2$ and let $G^\star$ be any graph obtained by removing two edges from $G$. We will show that $d^\star(0,v)\le m$ for $1\le v\le 2m-1$. Then by symmetry we will have $\epsilon^\star(v)=m$ for all $v$.
For $v=2m-1$, note that there are four edge-disjoint paths of length $m$: $0\stackrel 1\to 1\stackrel2\to\ldots\stackrel2\to 2m-1$, $0\stackrel 2\to 2\stackrel2\to\ldots\stackrel2\to 2m-2\stackrel1\to 2m-1$, ans similarly in negative direction. At most two of these can be destroyed by the edge removal, hence $d^\star(0,v)=m$.
For $v=2m-2$, we have edge-disjoint paths $0\stackrel2\to n-2\stackrel2\to\ldots\stackrel2 2m-2$, $0\stackrel2\to2\stackrel2\to\ldots\stackrel2\to 2m-2$ and $0\stackrel 1\to1\stackrel2\to\ldots\stackrel1\to 2m-2$ of lengths $\le m$. Again, one must survive the edge removal, $d^\star(0,v)\le m$.
For $2<v<2m-2$ odd, we have two edge-disjoint paths $0\stackrel 1\to 1\stackrel 2\to\ldots\stackrel2\to v$ and $0\stackrel 2\to 2\stackrel 2\to\ldots\stackrel1\to v$ of length $<m$. Unless each of these paths contains exactly one of the removed edges, we are done. If $(0,1)$ is a removed edge, then $0\stackrel 1n-1\to 2\stackrel 1\to 1\stackrel 2\to\ldots\stackrel2\to v$ has length $m$ (note that $(1,2)\ne(v-1,v)$ and we are done. Similarly, we are done if $(v-1,v)$ is a removed edge. Therefore, we may assume that in each of the two paths, an edge $(k,k+2)$ is removed and that edges $(k,k+1)$ and $(k+1,k+2)$ are both present in $G^\star$ so that we obtain a path of length $\le m$.
For $2\le v<2m-2$ even, we have two edge-disjoint paths $0\stackrel 1\to1\stackrel 2\to\ldots\stackrel1\to v$ and $0\stackrel 22\stackrel 2\to\ldots\stackrel2\to v$ of length $<m$. Again we may assume that exactly one edge of each path is missing. Again, if $(0,1)$ is removed, we can replace it with $0\stackrel 1n-1\stackrel 21$ andsimilarly if $(v-1,v)$ is missing. Again we conclude that in each of the two paths, an edge $(k,k+2)$ is removed and that edges $(k,k+1)$ and $(k+1,k+2)$ are both present in $G^\star$ so that we obtain a path of length $\le m$.
For the remaining case $v=1$, note that we have three edge-disjoint paths $0\stackrel 1\to 1$, $0\stackrel 2\to 2\stackrel 1\to 1$ and $0\stackrel 1\to n -1\stackrel 2\to 1$ of length $\le 2\le m$, at least one of which is present in $G^\star$. Together with your own result about three edges, the claim of the lemma follows.
$_\square$
In summary, we have therefore
Theorem. Let $n>4$. Then $$F(n)=\begin{cases}2 & \text{if }n\equiv 0\pmod 4\\1 & \text{if }n\equiv 1\pmod 4\\3 & \text{if }n\equiv 2\pmod 4\\2 & \text{if }n\equiv 3\pmod 4\\\end{cases}$$
Remark: Note the degenerate cases $F(4)=1$ and $F(3)=1$.
Comment: Didn't the problem ask for the maximum number of edges to be removed so that the same-eccentricity-property of $G$ is still preserved?
Answer: Here is what I can say with certainty

Let $n\ge 5$.  The maximum number of edges that can be removed from a squared cycle so that the eccentricity of each vertex remains unchanged is at least $n-2-(n+2)\operatorname{mod}4$.

To show this is true, I will give an explicit set of removed edges in each case.  Label consecutive vertices of the cycle $1,2,3,\ldots, n$ and call an edge 'outer' if it connects adjacent vertices in the cycle, and 'inner' if it connects vertices a distance of two from each other.  Splitting into four cases, depending on the residue class of $n$ modulo $4$, we can remove the following edges:

$n\equiv 0\operatorname{mod}4$: $n-6$ outer edges and $2$ inner edges.  Remove all outer edges except those connecting $(1,2),(2,3),(3,4),(\frac{n}{2}+1,\frac{n}{2}+2),(\frac{n}{2}+2,\frac{n}{2}+3),$ and $(\frac{n}{2}+3,\frac{n}{2}+4)$.  Remove inner edges connecting $(1,3)$ and $(\frac{n}{2}+2,\frac{n}{2}+4).$
$n\equiv 1\operatorname{mod}4$: $n-5$ outer edges and $0$ inner edges.  Remove all outer edges except those connecting $(1,2),(2,3),(3,4),(\frac{n+3}{2},\frac{n+3}{2}+1),$ and $(\frac{n+3}{2}+1,\frac{n+3}{2}+2)$.  Remove no inner edges.
$n\equiv 2\operatorname{mod}4$: $n-4$ outer edges and $2$ inner edges.  Remove all outer edges except those connecting $(1,2),(2,3),(\frac{n}{2}+1,\frac{n}{2}+2),$ and $(\frac{n}{2}+2,\frac{n}{2}+3)$.  Remove inner edges connecting $(1,3)$ and $(\frac{n}{2}+1,\frac{n}{2}+3)$.
$n\equiv 3\operatorname{mod}4$: $n-5$ outer edges and $2$ inner edges.  Remove all outer edges except those connecting $(1,2),(2,3),(3,4),(\frac{n+3}{2},\frac{n+3}{2}+1),$ and $(\frac{n+3}{2}+1,\frac{n+3}{2}+2)$.  Remove inner edges connecting $(1,3)$ and $(\frac{n+3}{2},\frac{n+3}{2}+2)$.

This should all match up with the conjecture.  The above is proved case-by-case by induction.  Notice that the remaining graphs in all cases have two gaps of outer edges.  In each gap, we can add $2$ vertices and $2$ edges so that the eccentricity of each vertex is raised by $1$ (note that the eccentricity of a squared cycle with $n+4$ edges is $1$ greater than the eccentricity of a squared cycle with $n$ edges).
The hard part is getting rid of the words 'at least' in the above claim.  It can be shown that when $n\equiv 1\operatorname{mod}4$, we cannot remove any inner edges, and we need at least $5$ outer edges to preserve eccentricity.  This establishes the result for $n\equiv 1\operatorname{mod}4$.
When $n\equiv 0\operatorname{mod}4$, we can remove at most $2$ inner edges, but I can't seem to show that $6$ outer edges are necessary.
The other cases are even trickier.  I have reason to believe my result is true for all cases, but a formal proof eludes me.


How to specify subject ID when using flexsurvreg to fit data with time-varying covariates

Question: We are trying to use the R function flexsurv::flexsurvreg to fit data with time-varying covariates. The survival::coxph function has an 'id' argument that provides a means for specifying what the subject IDs are that link together multiple rows for the same subject. It does not appear that flexsurvreg has a comparable 'id' argument, so how do you specify the IDs with flexsurvreg?
Answer: I don't think that you can, but maybe you don't have to. From the vignette, page 3:

flexsurv does not currently support shared frailty, clustered or random effects models.

That might not, however, be necessary: if you only have at most one event per individual and a parametric proportional hazards (PH) model. See the discussion about handling time-dependent covariates on page 4 of the R survival package vignette on time dependence in Cox PH models. You don't need to keep track of individuals across rows because "The likelihood equations at any time point use only one copy of any subject, the program picks out the correct row of data at each time." An exception, however, is "When subjects have multiple events, then the rows for the events are correlated within subject and a cluster variance is needed."
For parametric modeling, the flexsurv vignette specifies in Section 3.1 that the package handles time-dependent covariates via left truncation in a counting-process format, as done with coxph() models:

Time-dependent covariates can be represented in "counting process" form — as a series of left-truncated survival times, which may also be right-censored. For each individual there would be multiple records, each corresponding to an interval where the covariate is assumed to be constant.

That works simply for a parametric proportional-hazard model, as Hougaard says in Section 4.2 of a brief Fundamentals of Survival Data review:

Time-dependent covariates are easily introduced in parametric proportional hazards models. For the likelihood, we need the hazard at the time of event and the integrated hazard over the observation period, which is easily found. (Emphasis added.)

So, provided that there is no more than 1 event per individual in a parametric PH model, you don't need to keep track of the IDs across rows to handle time-dependent covariates.
The problem is more difficult with parametric models other than PH models. For an accelerated failure time (AFT) model, Hougaard explains in the above-cited review that you need the entire history of a time-dependent covariate, which isn't available for a left-truncated observation. The eha package deals with this "by assuming that $z(s)=z(t_0),0 \le s < t_0$," where $z(s)$ is the set of covariate values over time $s$ with a left truncation at $t_0$, as explained in its vignette on parametric models. It might be that flexsurv makes a similar assumption silently; you could explore the code. Yet even the eha package, which does allow parametric modeling with specification of ID values for individuals, thus has some difficulties with time-dependent covariates in AFT models.
If the issue is multiple events per individual, you might consider the multi-state modeling that is now handled by flexsurv, allowing for multiple transitions involving an individual. I don't have experience with that, but it seems to turn the multi-state model into a set of single-transition models, which then can be combined.
Another approach might be to deal with the intra-subject correlation via bootstrapping. When lack of independence is dealt with via cluster variances (instead of by frailty/random-effect modeling), point estimates are the same but coefficient (co)variance estimates are appropriately adjusted for the lack of independence. Bootstrapping by individual might give you something workable in terms of bias and more reliable error estimates of the coefficients for your parametric model, although again I don't have experience with that in this type of parametric modeling with time-dependent coefficients.
Finally, if your client wishes to use this type of model for predictions on future cases, consider the epistemological objection that led the author of the Python lifelines package to make such predictions unavailable even for Cox PH models.
Comment: Thanks much EdM. The same vignette also says that flexsurvreg can handle time-varying covariates on page 6. Our client is therefore convinced the package is capable of this, but we haven't been able to get it to work - it doesn't seem to be properly linking together the multiple rows for each subject. We have used eha but the client is interested in distributions that are supported by flexsurvreg but not supported by eha.
Comment: @Kari I expanded the answer to discuss further when such ID values might not be necessary, and to suggest alternate approaches for dealing with intra-individual correlations when they are.


Connect an I2C camera to computer via USB as a webcam

Question: I took out of an old security camera its circuitry and I am trying to figure out a way to connect it via USB to my computer and use it as a standard webcam. Is it possible? Here are the front and the back of the camera circuit. There are the 12V, GND and Video pins. But also there are the 3.3v, SDA, SCL and GND pins which are unused. Maybe those pins can be used to extract image data from the CMOS, but I'm not entirely sure about that. But maybe, is it possible to just take the analog VIDEO pin and convert it to digital data and use the stream as a webcam? Thanks.
Front
Back
Answer: If there is an analogue output, your best bet is to buy an adapter to connect the camera to the computer. I guess that the signal on the 3x1 connector is standard.
The I2C bus, most probably, is there to program the board microcontroller. Depending on the frame rate and resolution of your video feed, I2C data rate would range from barely adequate to completely inadequate. Even if there was some kind of digital feed there, that won't be standard, therefore you would have to reverse engineer that.
On top of everything, a cheap webcam probably costs less than the converter, has built in power supply, and has lenses. In case you did not know, lenses are necessary for the sensor to work properly, so if you have the original enclosure make sure to test inside it, otherwise you won't be getting anything useful from that.
All in all, if it's not for fun and to learn, just buy a webcam.
Comment: Hi, thanks for the fast response! Yeah, I know that, I removed the lenses because I want to use it as a astronomical camera. And yes, it's for learning. :) So from what I understand, the best solution is using the VIDEO analog signal and not the I2C. Thanks, I'm gonna check that!
Comment: The I2C bus was historically used by Philips as a control bus for TV/Video. It's likely that the I2C  interface on the camera is for something like that - in which case the video format is going to be one of the old standards -  NTSC or CCIR.


Convert files from .iso using Linux

Question: I have a number of .iso video files 4.7GB is size.  I'd like to convert them to perhaps .avi or .mpg4 format to reduce the size and for playing on equipment that likes files not DVDs.  Running Linux Mint 17.1 with Mate Desktop.  Is there software to do this directly?  Do I need to firstly make DVDs then use a ripper?  Any suggestions on which software to use?
Answer: An iso file of 4.7GB is no video file, but a DVD Image file.
You should be able to mount the iso
<code>mount -o loop ISOFILE MOUNTPOINT
</code>
You will still have to extract the AV Information, that is organized in chapters on a DVD and create a video stream from that.
It will be some research and work, but the best results can be achieved with avconv.

Convert files from .iso using Linux


How do I prevent the facebook login page from taking over my home page app?

Question: I have a iPad home page app that I'm trying to integrate a facebook like button. Everything works fine if the user is already logged in, but if the user is not logged in the facebook login page takes over my app page and after login does not return to my app. Is there a way to make facebook login using an iframe?
My app is a web app not a native IOS app. It is setup with a manifest file and the user adds it to their home page. Because the app can have different URLs and all we want to do is provide like functionality, registering the app is not available to me.
What I want to know is there a way for facebook to open the login page in an iframe like the like dialog when the user clicks the like button? Right now I'm using the social plugin for the like button, but if the user isn't logged in to facebook the login page replaces my web app. Is there a way to make the login page use an iframe?
Answer: Wrapping it in a
 worked for me


Why does OAuth 2.0 specification recommends the use of "application/x-www-form-urlencoded" Media Type?

Question: I have a situation where the requests can't be of application/x-www-form-urlencoded Media Type and so the question.
Answer: Interoperability. The OAuth standardizes format and names to ensure different implementations can work together out of the box as much as possible.
Why do you have a situation where you can't use this format? All major programming languages have libraries that implements this format, many as part of standard libraries.


linux hosting permissions shared server

Question: What is the actual difference between executable and read permissions on a shared linux server, meaning, how exactly does that relate to what a web visitor can do with, for example a php file? Using godaddy shared hosting, for example, under basic permissions, if web user is not readable, but is executable, the same thing happens as when it is readable but not executable - the php file executes. Also, on a shared linux server, what exactly does making a file writable for web user- someone who doesn't have access to server login but visits the page through a browser do?
Answer: The basic answer is: nothing. Visitors to a website aren't directly accessing any of the files, PHP or otherwise. They send an HTTP request to the server service (wow, that's terrible wording) on the computer (e.g.: Apache), which then loads the page, executes the PHP, etc. So when you're changing permissions, the pertinent permissions to change are what permissions the Apache account (which, depending on the distro, can be either nobody or www-data) has on those files. As for what the permissions actually do, this Wikipedia page describes it quite well.
You can test this yourself if you have a Linux box. Take a directory with files in it and sudo chmod -R 744 it. Then, try to ls -l into it. You'll be able to see file names, but not any other information about the file (including the contents - nanoing any file in that directory will result in creating a new file).
Answer: You have to remember that all this relies on what the web server wants to do, since everything has to go through the web server. It's not like reading a file from a disk. So when you request "index.php" or "index.cgi", you are not reading the contents of the file. The web server will see that the file you're requesting is a program, and it will run the program. Instead of outputting the contents of the file, it will output whatever the program outputs. This is simply a setting, and has nothing to do with permissions. Also, you do not have the ability to change this setting if you're using a shared hosting account.

on a shared linux server, what exactly does making a file writable [...] do?

You can't make a file "writable" with HTTP. Again, this is not like accessing a file system on a local drive. You can make a server-side program that can handle file uploads, but again, this is has nothing to do with permissions.
I hope this is what you meant. Let me know if you meant something else.

linux hosting permissions shared server


How to redirect to a page outside of the sitecollection after submitting a sharepoint form

Question: Hi I have a SharePoint list.
My client wanted me to redirect the form to site intranet after submitting the form.
Comment: Please provide use with some more details. What form - InfoPath, WebForm? Is it foundation or enterprise? What version of SharePoint - 2007, 2010, 2013? etc.
Answer: In case of using Infopath form you can host your browser-enabled InfoPath form on your own XmlFormView webpart and then notify host to redirect.
Add the following code to the Button control's Clicked event handler:
NotifyHost("Redirect")

Create VisualWebPart project and add XmlFormView control to VisualWebPart, you must add
OnNotifyHost="XmlFormView1_NotifyHost"

The following code shows how to do this:
<cc1:XmlFormView ID="XmlFormView1" runat="server" XsnLocation="http://ServerName/FormServerTemplates/MyFormTemplate.xsn" OnNotifyHost="XmlFormView1_NotifyHost" />

After you hook up the event, you must implement the XmlFormView1_NotifyHost event handler in the code-behind of the VisualWebPart as follows:
protected void XmlFormView1_NotifyHost(object sender, NotifyHostEventArgs e)
{
if (e.Notification == "Redirect")
{
    string jsCode = "window.location='http://www.google.com';";
    Page.ClientScript.RegisterStartupScript(typeof(string), "RedirectScript", jsCode, true);
}
}

Answer: You need use a function window.location of the JavaScript in the function PreSaveAction.
Answer: You can use the "source" attribute in query string and provide external url there. Just remember that whether you click on submit or cancel, the form will be redirected. Check this for more details:
http://sympmarc.com/2009/10/20/passing-a-source-parameter-on-the-query-string-with-multiple-other-parameters/comment-page-2/


How do I add a new directory via DNN skin installation?

Question: How do you add a new directory to DNN upon skin install? Is through the  reference in the manifest?
Comment: Are you adding a directory to hold images and such?
Answer: Yes, you can create a new directory through a manifest file.  This applies to modules, skins - anything that uses a manifest file.
You will need to use the fileComponent in the manifest file, and specifically, the basePath element in order to specify where in the website your files will be installed.  You can also install in relative paths.
See more here : http://www.dotnetnuke.com/Resources/Wiki/Page/Manifest-File-Component.aspx


For cadlag functions $x,y$, if for each $t$ $x(t)=y(t)$ or $x(t)=y(t-)$ then $x=y$.

Question: Let $x,y$ be cadlag functions on $[0,\infty)$. Suppose for each $t$, either $x(t)=y(t)$ or $x(t)=y(t-)$, then how does this imply that $x=y$? I am not sure how to show that for the case $x(t)=y(t-)$, we have in fact $x(t)=y(t)$.
Answer: Càdlàg functions are everywhere right-continuous, and have  left limits everywhere.
Let
$$
 A = \{ t \mid \text{$y$ is continuous at $t$}\}
$$
For all $t \in A$ we have $y(t-) = y(t)$, and consequently $x(t) = y(t)$.
In Cardinality of set of discontinuities of cadlag functions it is shown that càdlàg functions have at most countably many discontinuities, so that the complement of $A$ is at most countable.
Therefore, for $t_0 \notin A$ we can find a sequence $(t_n)$ in $A$ with $t_n > t_0$ and $t_n \to t_0$. Then $x(t_n) = y(t_n)$ for all $n$, and the right continuity implies that $x(t_0) = y(t_0)$.


How to search for granted German patents, and not published German patent applications?

Question: I would like to find all granted German patents owned by a certain company. When I ran a Basic Search on depatisnet, the returned results were all published patent applications in Germany, but not granted German patents. Any suggestions on how to refine the search to get only granted patents? It's fine to include expired patents as well as active patents.
Comment: I recommend the lens but it would be very unusual for any patent search engine to not allow this distinction. Google patent search advanced has it.
Comment: Based on past answers, I just found [Lens](https://www.lens.org) and you can search by patent type, such as granted patents, and jurisdictions, such as Germany. In the Analysis tab, there are some useful charts that you can generate. Highly recommend this as a tool; as a bonus, it's free
Answer: I have not seen a search engine without the ability to filter on granted vs application. However the way to do that did not jump out at me at DEPATIS. Looks like you might to use Kind Codes. (also your link to it has a typo).
At google patents advanced https://patents.google.com/advanced  you enter info and check boxes on the left side. It produces a search string like -

assignee:IBM country:DE status:GRANT
Comment: Fixed the typo, thanks!
Comment: It up to you but you can accept an answer if you chose and it will prevent it from automatically coming up to the top over and over periodically. You might get a better answer that addresses the German site. I do not need the points.
Comment: do you happen to know if Google Patents is reasonably up to date on German patents, e.g. would have granted patent info within a couple months of the German patent office granting it?
Comment: I would guess so but don't have any experience to back it up.


Magento2 - In eav_attribute_option_swatch table New option value not inserting

Question: I have 400+ visualswatch options, whenever I add new one, It will insert in eav_attribute_option_value but the Admin value which is supposed to be inserted in eav_attribute_option_swatch is not being inserted, instead.
It will just update the last option before the new one.
Answer: I have resolved issue, set value '0' in sort_order column in eav_attribute_option table.
There was duplicate sort order value in table.
run sql query:
UPDATE `eav_attribute_option` SET `sort_order`=0 WHERE `attribute_id` = 93;


Deleting items autometically after 15 days of creation from database in django

Question: To achieve this functionality i have used Django Signals, but that is not working in my case, Please let me know if i have done this right, You can also suggest me any other way to achieve this functionality
signals.py
from django.db.models.signals import pre_delete
from django.dispatch import receiver
from django.utils import timezone
from smart_search.models import UserHitCount

@receiver(pre_delete, sender=UserHitCount)
def delete_user_hit_count(sender, instance, **kwargs):
    print("signal handler triggered!")
    if timezone.now() - instance.created_at > timezone.timedelta(minutes=1):
        instance.user.delete()

app.py
from django.apps import AppConfig

class SmartSearchConfig(AppConfig):
    default_auto_field = 'django.db.models.BigAutoField'
    name = 'smart_search'

    def ready(self):
        from . import signals

init.py
default_app_config = 'smart_app.apps.SmartAppConfig'

model.py
from django.db import models
from user_application.models import Registered_user

class UserHitCount(models.Model):
    user = models.OneToOneField(Registered_user, on_delete=models.CASCADE)
    search_count = models.IntegerField(default=0)
    question_count = models.IntegerField(default=0)
    created_at = models.DateTimeField(auto_now_add=True, null=True)

My main objective is to delete the things once created date is less then today and this should be done automatically
Answer: You need to look into cronjobs or background tasks queue. For example Celery:
https://docs.celeryq.dev/en/stable/userguide/periodic-tasks.html
Create a periodic task that will run every day or every hour and check if there are records that should be deleted;
Example:
@shared_task
def example_task():
    UserModel.objects.filter(created_at__lte = now() - timedelta(days=15)).delete()


Cannot mount XFS partition

Question: I have a XFS partition in one of my HDD partitions.
Here's my disks:
aksesfarma@elementary-PC:~$ sudo blkid -o list

device fs_type  label  mount point  UUID
-------------------------------------------

/dev/sda1  ext4  /                               xxxx
/dev/sda3  ntfs  System Reserved (not mounted)   xxxx
/dev/sda4  ntfs  (not mounted)                   xxxx
/dev/sda5  ext4  /home                           xxxx
/dev/sda6  swap  <swap>                          xxxx

/dev/sdb1  xfs   (not mounted)                   xxxx
/dev/sdb5  xfs   (not mounted)                   xxxx
/dev/sdb6  xfs   (not mounted)                   xxxx

Note here that /dev/sda is my main HDD (Linux/Windows dual boot) and works fine. The problem is in /dev/sdb or my second drive.
Here's after I mount /dev/sdb1 to /dev/sdb6 using command:
aksesfarma@elementary-PC:~$ sudo mount -t xfs /dev/sdb1 /home/aksesfarma/drive1
aksesfarma@elementary-PC:~$ sudo mount -t xfs /dev/sdb5 /home/aksesfarma/drive2
aksesfarma@elementary-PC:~$ sudo mount -t xfs /dev/sdb6 /home/aksesfarma/drive3

aksesfarma@elementary-PC:~$ sudo blkid -o list
/dev/sdb1  xfs   /home/aksesfarma/drive1        xxxx
/dev/sdb5  xfs   /home/aksesfarma/drive2        xxxx
/dev/sdb6  xfs   (in use)                       xxxx

When I try the last command to mount /dev/sdb6, the cursor cannot receive input anymore. It just blinked. Note: the repeated ^C is me, trying to cancel the command using Ctrl-C. No response and no output whatsoever.

Then I read an article about XFS-partition: Here's the article
Tried to enter this command xfs_repair -n /dev/sdb6 or xfs_check /dev/sdb6
Still, Nothing happen, the partition still unmounted and my cursor still blinking
Answer: This is the normal result if there is no error detected. (I run a check of a xfs-partition, in perfect condition, with the same result.)
Please provide more information about the mounting error or why your system cannot mount the partition, maybe this will shed some light on your problem.
Comment: right, before I get down-voted even more, here's the detail of my situation. Thank You

Cannot mount XFS partition


Rain in Iyar - Miracle Cure?

Question: I remember that a few years ago, it was raining in Iyar and someone (who I believe to be a talmid chacham) told me that drinking the rain in Iyar is a powerful segulah for refuahs. Today, Rosh Chodesh Iyar, it rained quite a bit. I remembered this, and now I have 2 questions.
A) Does anyone know a source for this?
B) The mishna in Mesechta Taanis refers to rain in Iyar as a siman klala. How do we reconcile the two facts(assuming the segula does exist)?
Answer: Possible answer: The Sefer Ta'amei HaMinhagim asks why is Iyar a time of healing? He sources the Bnei Yissaschar who teaches that most weakness and illness come from foods which do not comport with a person's nature or composition. Since the Manna began to fall during this month (on the 15th day of Iyar 2448) - and it was a perfect food from which resulted no sickness, pain or even waste matter and even cured those who were ill - Hashem left the curative nature of the month in effect even through today. Accordingly, Iyar is a time of healing.
Reb Pinchas of Koritz says that the rain that falls between Pesach and Shavuot is a refuah for diseases that have no cure. One should let the rain fall on their head and open their mouth to let the rain go straight in (some places say to the right side of the mouth).
Comment: Where does Reb Pinchas of Koritz get it from??
Answer: Reb Pinchos of Koritz one of the talmidim of the Baal Shem Tov is said to bring it down that the rain that falls between Pesach and Shavuos is a refuah for diseases that have no cure r"l. One should let the rain fall on their head and open their mouth to let the rain go straight in - I don't know the exact source though.
Answer: the segula is attributed to Rebbi Pinchas of Koritz, as has been mentioned.
There's an additional point about Iyyar. איר is roshei teivos אני י רופאך the pasuk "I am Hashem your Healer." This is also mentioned as an additional maaleh of refuah in Iyar in general.
(I saw it years ago in a collection of dvrei torah from the Chasam Sofer, but I don't know where. Someone today told me the Lubavitcher rebbe discusses it in a sicha, but he didn't know either.)
I don't think this has to contradict the Mishna in Taanis. Rain during this time is a siman klala; it's not beneficial for the crops, which need to be drying at this point. The fact that the rain is not wanted now doesn't mean it can't have healing properties (especially based on the segula of the month in general.)
Comment: https://judaism.stackexchange.com/a/28460/759
Comment: @DoubleAA thanks for sharing your answer over there. I guess this "pshat" would have to hold of the minority opinion (which you bring there as the reason the rama says not to give a get in Iyyar.) I was bothered by this pshat anyway since the common spelling is with 2 yuds.

Rain in Iyar - Miracle Cure?


circuit breaker

Question: I have a 1959 ranch with a kitchen oven running off a 40 amp circuit breaker. I want to put in a newer slide in oven that says to have a 50 amp circuit breaker. How do I know if the wire is the right size (20 feet to the panel)? And do I really need to go to 50 amps?
Answer: It depends on what you have access to see. Typically wires are colored accordingly to their ampacity for easy identification.
For a 50A breaker, and 40A, you'd need #8 AWG wire so it should be sized correctly now. However this is assuming it's up to code, so it's best to check. Should be black coated wire. Again though, it all depends on what's ran. The wire should have the size printed somewhere along it.
If the device says to use a 50A breaker, then you need to use a 50A breaker. Otherwise it will probably trip constantly.
Answer: If the manufacturer's installation instructions say a 50 ampere breaker is required, then a 50 ampere breaker is required.
Depending on the wire/cable, and the devices used. You'll need either 8 AWG copper, 6 AWG copper, or 6 AWG aluminum conductors.

circuit breaker


Is it true that a polysyllabic verb ending in iru or eru whose e/i syllab is written in hiragana ichidan?

Question: I read long ago that verbs containing more than two syllabs and whose syllab before る containing the sound e or i is written in hiragana are all ichidan. Is it an actual rule or just a useful trick with possible exceptions ?
Answer:
Is it true that a polysyllabic verb ending in iru or eru whose e/i syllab is written in hiragana ichidan?

In general, yes.
The rule
The underlying rule for kana conventions is that conjugable endings are written in kana.  For example, for the verb kokorozasu ("to intend to do something"), only the -su on the end conjugates, so the kanji-fied spelling is 志す with that conjugable す hanging out as hiragana.  For the verb hairu ("to enter"), only the -ru on the end conjugates, so the kanji-fied spelling is 入る  with that conjugable る hanging out as hiragana.
However, for modern ichidan verbs, the -i- or -e- before the る doesn't change either.  So why is that showing up in the kana after the kanji?
The background
Historically, nearly all of the 一段活用動詞【いちだんかつようどうし】 (monograde-conjugation verbs) evolved from earlier 二段【にだん】 (bigrade) forms.  So modern ichidan verb 変える "to change" evolved regularly from earlier classical 変う (well, strictly speaking, 変ふ -- the ending fu changed regularly to u, but the ふ still appears in old kana spellings, and monolingual Japanese dictionaries may still show it this way).  The 変う form for the classical verb is the dictionary form (終止形【しゅうしけい】 or "terminal form").  The attributive form (連体形【れんたいけい】) ended in える, and the attributive of the bigrade verbs basically merged with the terminal to become the modern dictionary form.
Since that える ending is, historically, the conjugated ending, this is still spelled in kana.  This also helps differentiate the modern ichidan verbs from regular godan verbs, more clearly distinguishing 変える ("to change", ichidan) from 帰る ("to return", godan).
So too with the other modern ichidan verbs.  For instance, させる derives from classical さす, される from classical さる, られる from classical らる, 広【ひろ】める from classical 広【ひろ】む, and so on and so forth.
Additional factor
Another element that incentivizes fuller kana spellings is that some verbs have ichidan variants that only differ visibly by that -i- or -e- verb ending.  One clear example is 見【み】る versus 見【み】える.  If the spelling of the -e- portion were subsumed into the kanji (such as the kokoroza- portion at the start of this post, subsumed into the 志 kanji), then we would not be able to tell the difference between these two verbs, and reading would be (even more) complicated.
The result
Put it all together, and the end result is that modern ichidan verbs have the -i- or -e- verb endings spelled out in kana, even though these parts no longer change in the modern language.
Caveat: As with many things in language, there may be exceptions to this.  I can't think of any at the moment, but I'm also not a native speaker.  Plus, manga are famous / notorious for creative spellings that may stray quite far from accepted norms, so when reading manga, take any odd spellings with a grain of salt.  :)
Comment: Not just manga; the rules for trailing kana aren't always followed. For example, Google Books registers ~80k results for 蘇る, but also 9k for 蘇える. In prewar texts they varied even more.
Comment: @boiko: It appears that there's some uncertainty about the status of this particular verb.  蘇【よみがえ】る derives from 黄泉【よみ】 (noun, "land of the dead") + 帰る (_godan_ verb, "to return [from]"), and dictionaries list this compound also as 五段活用.  As such, the え would not be spelled out, and the conjunctive て form would be 蘇【よみがえ】って -- however, Google Books also reports 163 hits for 蘇えて, suggesting that at least some writers have re-analyzed this verb as 下一段.  I'm mildly curious to see if those cases you found of 蘇える were similarly cases of writers viewing this as 下一段.
Comment: Also, for strict pedants, the 連体形 of classical 変ふ was originally 変ふる, but I deliberately gloss over that above -- the sound changes are interesting, but not immediately germane.


What is the fastest strategy to obtain the Perch of Kairos (without gems)?

Question: DragonVale recently added the Perch of Kairos habitat, which has to be built in 3 phases or "artifacts" using pieces called "time fragments".  The time fragments can be purchased with gems for a eye-poppingly large sum, or they can be won via the Dragon Track.  I definitely want to unlock Kairos, but I'd rather not spend gems to do so.  What is the fastest strategy to unlock the Perch, without spending gems?
Answer: Win lose or draw, you are going to be doing a lot of dragon races.  In order to ease the pain, I used the following process (and I now have Kairos):

Gather your stable of racers.  You can check out this answer for a list of all of the races, and the elements needed for each.  I suggest choosing one best dragon for each race, and leveling them to the cap (or at least above your other dragons), and adding an "A" to the start of their name.  This will make them easy to find when choosing a dragon for a race.
Be impatient.  As soon as your dragon crosses the finish, the "Red X" icon in the top right changes to a "Green Play" icon.  Pressing that will advance to the winners podiums without waiting for other dragons to finish.  At the podiums, you can also press "spin wheel" almost immediately once the screen loads.  This will save you several seconds per heat, which will add up over the hundreds of races necessary.
Just spin the stupid wheel.  There is a lot of misinformation about methods to control the result of the wheel.  While I'm not sure if the result is predetermined, or simply uncontrollable - I gave up trying to fix the odds and just spun as fast as I could.  If it is possible to control, it is damn hard - and I'd say the time you save by just spinning it and moving on is worth it in the long run.

I ended up pulling it off with no gems spent, so I can confirm it is possible.  While it's nice to have him, keep in perspective that his ability is on a 4 day cool down and it's not that amazing in my humble opinion.  In other words, don't feel like you are missing out on that much if you don't have him yet - just keep racing.
Answer: Races are rigged. Whatever prize is on the wheel before you spin count up or down 6 prize items and I guarantee its the prize you get no matter how hard r soft you spin the wheel.
Comment: Hi Jim! Welcome to Arqade!  Your answer applies more to [this question](http://gaming.stackexchange.com/questions/79812/can-the-result-of-the-dragonvale-race-spin-be-controlled?lq=1), and someone has actually already given that answer.  Take a look and upvote answers you agree with!
Answer: race and quest and much as you can, in the past 30 minutes alone, I got the last 2 pieces of the chronolith and 2 pieces of the time claw
Comment: @Hi 173106, welcome to Arqade!  Our format is a little different than a forum.  If you agree with one of the answers already given, you can upvote - and when you have more rep leave comments.  I see you mention quests, which my answer does not (since I already have Kairos, I don't know much about them).  If you could add details about the best way to quest - that would be a great answer.
Answer: I got it in 3 hours just keep racing. Just remember all your dragon that you race that makes you win. And play it fast.


Used (probably) inappropriate charger, touchscreen went crazy, permanent damage?

Question: I used a plug with USB output than may have been inappropriate (output DC5V +/- 0.20V DC500mA +/-30mA). While it was plugged in, the touchscreen stopped working properly (touching one part of the screen would trigger another), I guess because the voltage was wrong? Is there any danger that I did some permanent damage to the phone or the battery? It wasn't plugged in for long.
Comment: I'm not really sure what you want us to tell you. If the problem went away after you unplugged and rebooted, then it's all good. If it didn't, then your phone is broken. We can't tell which of these is true because you're the only one with the phone.
Comment: No permanently damage I'd say. Sounds exactly the same like a case I had using a HTC charger on a Motorola device. It's not the voltage causing that, but most likely a slightly different use of the additional "X PIN", see: [Why does my phone have erroneous input when connected to a non-OEM power source?](http://android.stackexchange.com/q/39424/16575#39454)
Answer: You can be 99.9% sure the touchscreen is fine. Battery wasn't damaged too. If the touchscreen still behaves erroneously after unplugging, then rubbing it with a soft cloth should help.
This is a common issue with cheap chargers. It indicates that charger may not be safe to use with any device - it may catch fire or explode. Prolonged use of such chargers can degrade battery performance faster than charging with a high-quality charger.
It wasn't a voltage problem - all USB chargers have the same voltage and you can use any charger with a plug that fits. Charging speed may differ, though - high-end smartphone and tablet chargers are faster than regular mobile phone ones.
Comment: Charging speed doesn't affect the phone, since the phone regulates the amount of amps it can take, not the charger. So if the charger can supply 2A and the phone needs 0.5A, it only takes the 0.5A. Also, if the charger can supply only 0.5A and the device (tablets usually) requires >1A, it simply refuses to charge. The power quality and consistency, however, is very important, and is the problem with cheap chargers as you mentioned.
Comment: @onik From my experience phones will charge from low amperage chargers at the rate charger provides, so maybe it depends on chargers and/or phone models. Also, if USB data pins aren't shorted phone will never draw more than 0.5A because it could be a USB host, not a charger.


Every non-label node in TikZ

Question: In TikZ we can use every node/.style=... and every label/.style=... but is there a way to say something like every non label/.style=... so that I can define styles for non-label and label nodes without interference?
Comment: @Mário: I guess you only want to apply `circular drop shadow` to `circle` nodes, right? In that case, you could pass that option to `every circle node` instead of `every node` to keep it from applying to labels. Unless they're circular, of course. Hm, I'd really like to see a clever approach for the `every non label` style problem. Maybe Ryan Reich can come up with something.
Comment: I used the following and it seems to work, although there can be other interferences. `\tikzset{every node/.style ={draw,red},every label/.style={draw=none,blue}}
\begin{tikzpicture}
\node[label={0:A}] {B};
\end{tikzpicture}`
Comment: @percusse Well I have `every node/.style={circular drop shadow}` and this is afecting my labels too, and I don't know how to disable the shadow for labels ...
Comment: @Jake: That would perhaps work if my nodes where defined has `node[circle ...` but I am defining `every node/.style={ellipse, circular drop shadow, ...}, every label/.style={...}`. Then I have `\node[label=thelabel]{...}` and the node is draw as an ellipse with a shadow, but its label is also an ellipse with a shadow ...
Answer: No tricky no hackish solution because I think it's bad problem. It's a bad use of every node.
This situation appears in  some tutorials of the pgfmanual. First Andrew makes this remark :
 The key every label is called after the every node and It's necessary to complete with a text from the pgfmanual :

/tikz/label=[⟨options⟩]⟨angle⟩:⟨text⟩ (no default) When this option
  is given to a node operation, it causes another node to be added to
  the path after the current node has been finished. This extra node
  will have the text ⟨text⟩.

In other terms, the label is another node, so it's normal that you get some interferences.
What you need to do ? You can work with a ticky or hackish method or you can avoid the problem with a more natural code.
I tink the better way is to define a style not for every node but for a  specific node
\documentclass[11pt]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{shadows}
\begin{document}

 \begin{tikzpicture} [every node/.style = {circle},
                      every special node/.style = {},
                      special node/.style={draw = blue!50,
                                           fill = blue!20,
                                           thick,
                                           every special node}]

\tikzset{every special node/.style={circular drop shadow=red!20}}
\tikzset{every label/.style={red}}  % by default draw=none  except if every node uses "draw"

 \node[special node,label={0:A}] {B};
 \end{tikzpicture}
\end{document}

Comment: It might be the case that you don't want to type a key for each node. So I agree it's a misuse however there can be cases where you need to find a convenient solution.
Comment: @percusse  Don't want to type a key for each node is not a valid argument if you get a code easier to read and process but it is a matter of taste.
Comment: Oh come on, I only wrote 3 lines of code. :)  Joking aside, I agree with you about the natural way of coding. Lastly, I'm jealous about your nice color choice but I don't want to edit once again.
Answer: Tricky.  The key every node is tried on every node.  The key every label is called after the every node so it is possible to undo anything that every node does in the every label, but then you'd have to remember exactly what was set and know how to undo it.
Here's one way to achieve this.  It works by using the fact that labels are always subordinate to nodes, and that (so far as I'm aware), no other nodes are subordinate to them (this might be a bit funny with matrices or chains - not tested).  So we want a key, say every non label, which is executed on the parent node but not on any children (labels).  One way to do that is for the key every non label to clear itself upon being executed.  That ensures that it doesn't propagate downwards.  As we do this in a group (the node group), this clearing only affects children and not siblings (ie other proper nodes), even on the same path.
Depending on exactly what you were doing, it might be necessary to be a bit careful with how this interacts with other keys.  For example, if you put a label key in an every node one then you have to ensure that the blanking key occurs first.
\documentclass{article}
%\url{http://tex.stackexchange.com/q/49096/86}
\usepackage{tikz}
\usetikzlibrary{shadows}

\tikzset{
  clear label/.style={
    append after command={
      [every non label/.style={}]
    }
  },
  every node/.style={
    every non label,
    clear label
  },
  every non label/.style={
    circular drop shadow,
  }
}

\begin{document}
\begin{tikzpicture}
\node[label=hello] {world};
\node[label=hello] at (0,-2) {world};
\path (0,-4)  node[label=hello] {world} (1,-4) node[label=hello] {world};
\end{tikzpicture}
\end{document}

Result:
Answer: Another hackish solution for this particular example is to remove the shadow by emptying the preaction key. This is something I learned from this question.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows,shapes.geometric}
\makeatletter
\tikzset{every node/.style ={draw,shape=ellipse,circular drop shadow,blue},
every label/.style={yellow,draw=none,fill=red,shape=trapezium,fill opacity=0.5},
every label/.add code={}{\let\tikz@preactions\pgfutil@empty}
}
\makeatother
\begin{document}
\begin{tikzpicture}
\node[label={0:Trapezium}] {Ellipse};
\end{tikzpicture}
\end{document}

Since the regular options can be overridden, I guess that, only pre- and post- actions remain persistent and as seen from this simple example we simply squeeze in an innocent "You know what, forget about what I said earlier about the preactions" line. Seemingly it does the job. You can add also a line for the postactions too. Still, I can imagine that there might be some persistent options left out.
Answer: Tackling the problem a little bit different (and comming from Reduce white space above TikZ label), I'd re-define labels and pins so that they don't actually have a every node style to use by setting this style empty:
\patchcmd\tikz@@parse@label@nonactive{\bgroup[}{\bgroup[every node/.style=,}{}{}
\patchcmd\tikz@@parse@pin@nonactive{\bgroup[}{\bgroup[every node/.style=,}{}{}

The same happens for …@active with active : (can be tested by using french with the babel package).
The real every node style is now every Node which is included in every node, every label and every pin manually.
Furthermore, with .style I also removed the initial draw=none, fill=none of every label and every pin which now need to be given explicitly.
If this should still be present in those styles, instead of .style use .prefix style or .append style (whatever is needed).
The style every node and pin is the same as every non label.
Code
\documentclass[tikz]{standalone}
%\usepackage[french]{babel}
\usepackage{etoolbox}
\makeatletter
  \c@pgf@counta=\catcode`\:
  \catcode`\:=\active\relax
  \patchcmd\tikz@@parse@label@active{\bgroup[}{\bgroup[every node/.style=,}{}{}
  \patchcmd\tikz@@parse@pin@active{\bgroup[}{\bgroup[every node/.style=,}{}{}
  \catcode`\:=\c@pgf@counta
\patchcmd\tikz@@parse@label@nonactive{\bgroup[}{\bgroup[every node/.style=,}{}{}
\patchcmd\tikz@@parse@pin@nonactive{\bgroup[}{\bgroup[every node/.style=,}{}{}
\makeatother
\tikzset{
  every node/.style ={every Node/.try, every node and label/.try, every node and pin/.try},
  every label/.style={every Node/.try, every node and label/.try, every label and pin/.try},
  every pin/.style  ={every Node/.try, every node and pin/.try,   every label and pin/.try},
  Nodes/.style      ={every Node/.append style={#1}}}
\begin{document}
\tikzset{Nodes=draw}
\tikz\node[label=bar, pin=below:pin] {foo};
\tikz[nodes=circle]\node[label=bar, pin=below:pin] {foo};
\tikz[Nodes=circle]\node[label=bar, pin=below:pin] {foo};
\end{document}

Output

Every non-label node in TikZ


Firefox Extension to Summarize CSS Selectors on a Page

Question: I have Google'd this nine-ways-to-Sunday, but can't seem to come up with anything that fits my needs... I'm looking for a Firefox extension (and or Eclipse plug-in) that does the "opposite" of what SitePoint's handy Dust-Me Selectors does.  Briefly, I want to be able to go to a page and get a summary of all the class and id attribute values that are specified in the HTML markup.  Dust-Me is more stylesheet-centric, in that it compares the used and unused STYLESHEET selectors to what appears on the page.  I need to find classes and ids that are specified in the page, but have no corresponding stylesheet selector, or no stylesheet at all for that matter.
The venerable Web Developer extension for Firefox does exactly this, EXCEPT, it's overlayed on the rendered page, which is not quite what I need.  I'd like output more akin to Dust-Me; i.e., a summarized list.
Sure, I can do this with command-line grep... except that I can't, because I'm dealing with JSF, and I wanted to see what the rendered output in the browser is.
Another reference is PrimerCSS.  It does "sort of" what I want, but I'm looking for a more on-the-fly, Firefox solution; and again, a list-- not a template.  PrimerCSS makes you copy/paste the markup into a form on the site, and then comes up with a naked CSS stylesheet.  Useful, but not.
Any leads?
Answer: It sounds to me like Firebug combined with the CSS Usage plugin would get you what you want.