3D printer firmware version

Question: Is there a way to determine which version of a Marlin firmware I would have installed onto my printer? I am trying to modify the existing arduino sketch rather than starting all over with a wrong, earlier version. Thanks.
Answer: First, check to see if the printer itself yields this information, either on LCD display if present, or by reporting it to a host computer upon connection (ie, try enabling verbose output in your printing software).
While it's not guaranteed to be supported, in practice many Arduino Mega based 3d printers have bootloaders capable of readback of the flashed contents, and the chips themselves are unlocked.  Even if the bootloader does not support this, an ISP connection might.
If you are able to read out the contents, you can have avrdude write them to a flat binary file, and examine it with the strings program or a hex editor.  If you end up with a hex file instead, there are tools for converting this to a flat binary.
Your goal would be to look through the file for version strings, and other messages which might indicate specifics, especially on which side of various points of change or configuration options it falls.
Making such a backup is a good idea before loading a new firmware anyway.  Ideally after verifying that you obtained meaningful contents, you would also readback a few distinct copies of the file and use something like diff to verify that they are all the same.  You can grab the EEPROM contents too, if your firmware may be storing things there.
Comment: Thanks. I can see the Marlin fw version in the lcd but not my arduino sketch version/name.
Comment: That may well not be saved.  Still, if you have a finite number of candidates you can try to look at details that would differentiate them.  Rebuilding and doing some kind of percentage fuzzy match comparison could work, but could also easily get confused by different compiler versions or build options.
Comment: Yeah, that's what I assumed my option was. Thanks.

3D printer firmware version


Steelcase desk drawer stuck in unlocked position

Question: I have a steelcase desk at work with a two drawer locking file attached to the underside of the desk. The lock is UNlocked. I can put the key in and turn it no problem...but the drawers won't open! If it was just "stuff" I would expect the lower drawer to open no problem, as it is a neatly organized file drawer. The smaller, upper drawer is full of random junk. I've tried locking/unlocking the drawer, wiggling the drawers, pulling hard, etc. Any thoughts on how to get the dang thing open? I've stuck a hanger in and wiggled it about to shift items. No luck. It opened this morning :(
Comment: Not really a home improvement question, and not something I can answer without seeing/feeling the mechanism.
Comment: Most of those, the lock is on a shaft.  You turn he key and then the whole lock assembly pops out an inch like a plunger.  Does yours pop out?
Answer: There are anti tip mechanisms in steelcase desk drawers. 1.)Open center drawer all the way open. Looking under center drawer, far back on right & left edge are metal square shapes sticking up -try lifting its insert up (like a guillotine blade). How it works is when drawer closed a pin goes through this and slides freely, if tipped the guillotine drops down and prevents pin from pulling out) So by manually disengaging (lifting square up) should unlock it. The key thing is getting center drawer pulled open enough to access area. I will try and get some photos added.
I figured it out after the steelcase desk drawers were opening fine, then we moved desk on its side, upside down so could slide it on a blanket etc and afterwards had locked drawers :-( But figured it out.


Why does the gemarah use Amalek as a mnemonic siman?

Question: I don't know if there is any meaning that can/should be attached to the mnemonic signs in the gemarah. I usually assumed they are chosen based on being easy to remember. In Bava Batra 46b the gemarah uses the work Amalek as a mnemonic sign. Even though from a memory tool this is a perfectly fine word to use as it is easy to remember, this choice seems unusual to me, I'm sure another easy to remember word could have been substituted. I would like to know if any commentaries explain why this word was chosen as a siman.
Answer: Yaavetz address this. He suggests that the tipcha on the word לא in לא תשכח hints to an allowance to mention the name in order to remember Torah. In accordance to the Gemara 'to bring the disgusting one into the study hall', in order to release the holy sparks that are contained within.
He also points to the Gemara stating Haman's children taught Torah in public.
Comment: darn, you beat me by 30 seconds.  here was my link to the explanation of the yaavetz: https://daf-yomi.com/DYItemDetails.aspx?itemId=35811
Comment: :) He seems to continue with an explanation of the Yaavetz. It may be worth translating and posting an alternative (better) answer.
Comment: maybe later, don't have that much time now to elaborate.
Comment: That's an interesting reason. "Don't murder, don't commit adultery, don't steal" are also all separated by a tipcha (in ta'am elyon)
Comment: @b a curious, what do you see from that?
Comment: @user6591 Obviously the tipcha isn't because "לרמוז שיש בו מקום גם לרציחה" as he claims it is on the verse "don't forget"
Comment: @b a gotcha. I thought you were pointing it out as a question. Just making sure.


FreeBSD: Stable branch back to release

Question: I'm currently using FreeBSD 8-STABLE, and I'm just a little confused about what I will do when FreeBSD 9 is released.  Will I need to change anything in my stable-supfile?  How do I go about getting either 9-STABLE  or 9-RELEASE?  If I'm not mistaken, 8-STABLE will essentially become 9-RELEASE when it is indeed released, no?
Answer: If you intend to continue to track -STABLE, you can just update your stable-supfile from
*default release=cvs tag=RELENG_8

to
*default release=cvs tag=RELENG_9

and then perform your csup/build/installworld as normal.  If you've customized your kernel, you'll need to review the new kernel configuration and merge your changes with it.
Technically, 8-RELEASE and 9-RELEASE each branched off of HEAD at different points in time, so it's not the case that 8-STABLE blends straight into 9-RELEASE.  Changes from HEAD or newer branches are often backported to older ones if they would benefit that older branch, but that is handled on a case-by-case basis.
Some further guidance, if you need it:
The build/install would be followed by running mergemaster to update and merge configuration files.  You'll also need to rebuild all installed ports to be compatible with the 9 ABI (or else install the misc/compat8x port).
Be sure to read both /usr/src/UPDATING and the release notes for FreeBSD 9, to make sure that you understand the consequences of moving from 8 to 9, as there can be significant changes.
nixCraft has a nice howto here.  It's for moving from 7 to 8, and assumes you're using portmaster, but the procedure is generally the same.  It notes using cd /usr/src && make delete-old to delete old libraries afterwards; I'd forgotten about that.
Side note: If you don't need to tweak your kernel config much, I much prefer installing -RELEASE, and using freebsd-update for binary patching.  It's much more maintainable over time.  In your case, since you're tracking -STABLE, this would mean a reinstall/upgrade from install media, because freebsd-update only supports upgrading between released/beta/RC versions of FreeBSD - but in my opinion, unless you need a custom kernel, it's worth it.
EDIT: Note that once you're tracking -RELEASE, you can use freebsd-update to upgrade from release to release, or from -RC and -BETA versions -- another reason why I prefer it.

FreeBSD: Stable branch back to release


Using Python to create a sphere and map a texture onto it

Question: Is it possible to map a texture onto a sphere using python script? I am sure it is, but so far I was not able to figure out how to do it.
Comment: Related, [How to get perfect UV sphere Mercator projection?](http://blender.stackexchange.com/questions/3315/how-to-get-perfect-uv-sphere-mercator-projection).
Answer: You should follow some beginner tutorials first, like Blender manual, to have an idea how to find yourself around Blender's API.
To get some feedback on comman tasks just pull down Info Panel or change the layout to Scripting like:

Now you will have feedback for all actions you perform like you usually would:
Answer: Perhaps this post on Blender Artists could help you. It is covering version 2.5, but at least it can give you a direction to go in and help you know what steps are needed.
Here are some quotes from the thread:
OP's question:

Just a very simple problem I think, but how can I make a little piece of
Python 2.5 script for this :

Tell me which is the active object ?
Create a new material
Create a new texture : type Image or Movie
Load an image in the texture

Successful answer:

import bpy

def loadImage(imgName):
    img = bpy.data.add_image(imgName)
    tex = bpy.data.textures.new('TexName')
    tex.type = 'IMAGE'
    print("Recast", tex, tex.type)
    tex = tex.recast_type()
    print("Done", tex, tex.type)
    tex.image = img
    mat = bpy.data.materials.new('MatName')
    mat.add_texture(texture = tex, texture_coordinates = 'ORCO', map_to = 'COLOR')
    ob = bpy.context.object
    bpy.ops.object.material_slot_remove()
    me = ob.data
    me.add_material(mat)
    return

loadImage('/home/thomas/picture.jpg')

Give or take the snippets that you need.


Why is it that I get texts when both wifi and cellular data are turned off?

Question: Just wondering if everything is normal on my cell phone... It's an LG and they stopped updating, but I don't remember this behavior before...
Comment: The old cellular voice and SMS services have nothing to do with data (internet) services. SMS has been available since the early days of GSM when phones didn't have internet. GSM / 3G networks still support these old services.
Answer: You do not need cellular data to send text messages (SMS). Networks use a different method to send and receive text messages. SMS uses GSM and ISDN networks to send text messages. You are limited to 160 characters of text. The limitation reflects the speed of the network.
Answer: There is SMS (Short Messaging Service) and MMS (Multimedia Messaging Service). SMS messages are 160 characters or less, meaning 1120 bits or less (each character is 7 bits). MMS messages (pictures or messages longer than 160 characters), however, require data. So even if you have data turned off, that will not effect SMS messaging. To turn that off you'll have to use airplane mode.


How to prepare old work for an electrical inspection?

Question: I am performing all electrical work for a new room addition and I uncovered this old work in my house.  All of these mechanicals serve a second floor laundry room.  Will this pass inspection?  I assume that I need to cover the sill and top plates will metal covers.  Since the water lines are secured to the middle of the studs, I can't move the electrical wires back.
Comment: Is your dryer a 4-wire plug?  Is that orange cable 10/3 and not 10/2? It looks lumpy like 10/3.  I ask because 10/2 w/ground *was never legal* for dryers, not even pre-1966, and if that is wrong, change it while you have access. The writing you show does not say what it is.
Comment: It a 4 prong outlet.  I can see where the outlet in the basement was a three.  The former owner must have known that much.
Answer: What I'm seeing here is two cables stapled full length within 1.25" of the stud edge.  You can try to argue it's old work, but now that you've removed the boards and pulled a permit for an addition, there's no good way to argue the lack of nail protection.  A building inspector would be well within their jurisdiction to force you to cover that entire stud bay with sheet metal.
Sheet metal happens to be a cheap fix compared to dealing with a nail in a cable.
Answer: I would protect each cable for the full  length (including where the top & bottom plates are drilled).
For the #12 (yellow) cables, I would use 1" x 1/8" angle iron attached to the stud (you have to pull the old staples).
For the #10 (orange) cable, low profile 14 gauge strut (it's a U-shape channel, about 1.75 x 7/8 inch, available at places like HD.  "superstrut" is one brand of it.  Just make sure you get the low profile version).  Turn the strut so it's open side is inward to face into the cavity (so the "U" shape of the strut wraps the cable on 3 sides).
Using an angle grinder notch the sides of the strut/angle iron where it meets the wood at the wall plates, and then drill thru the back and screw thru it  to attach the thru the flat area that you are left with after the sides are notched.
Obviously be darn sure you avoid screwing thru the wires! Also, you could chisel out a 1/8" deep area where the metal meets the wood so you don't cause a rise in your sheetrock.
You would want to tie the cable to the inside of the channel (and/or the inside of the angle iron) in a couple of laces with mountable ties or something similar.
That place where the cable goes across the pipe cross country is a problem.  I would use a piece of flat steel for that 16 inches or so diagonally in that whole area across the studs following the wire diagonally.   It looks like there would be enough clearance between the pipe and the sheetrock for a flat piece of 14 gauge steel.
Hope this helps.
Answer: From "Colorado Residential Code 2021 > 6 Wall Construction > R602 Wood Wall Framing > R602.6 Drilling and Notching of Studs > R602.6.1 Drilling and Notching of Top Plate"
Answer: There's nothing that says you have to staple cables to the studs. You can use plastic wire ties to secure the cables to the pipes, away from the stud edges. You will of course need protection plates at top and bottom for both the cables and the piping.


What can I do with a LiPo whose balance lead has been destroyed?

Question: I'm starting a bit of a collection of batteries which have been ejected during a crash and ended up with a destroyed balance lead. Is there anything other than disposing of them that I can do, assuming the cells are still in good condition?
Answer: If you're up for it, the fix you're looking for is to repair the connector with a new housing and new crimps (if the current ones are broken). Joshua Bardwell has an excellent YouTube video documenting how to do this, but I'll summarize here.
Most LiPo balance leads are terminated with the JST-XH connector:
 (cit.)
In the above picture, the balance lead is configured such that the left-most pin is ground/GND and then are in ascending order of voltage from left to right when the flat surface of the connector housing is facing upwards. For example, a correctly made 4s LiPo balance plug would be wired up like so from left to right:

GND
Cell 1 (4.2 V when fully charged)
Cell 2 (8.4 V when fully charged)
Cell 3 (12.6 V when fully charged)
Cell 4 (16.8 V when fully charged)

Repair instructions:

Purchase a JST-XH connector kit like this one on Amazon and a JST-XH crimper tool like the Engineers PA-09 on Amazon if you know or anticipate you'll need to replace the crimped pins (there are cheaper crimpers available, but I've had little trouble crimping JST-XH with this one and it's a nice-feeling tool)
Pick out a new connector housing that's the same size as the broken one
Remove the lowest voltage pin (left-most pin in the above picture) from the broken housing using a pointy tool to lightly press down on the edge of the silver retention tab
If the pin is broken/bent/deformed, cut/pull off the JST-XH crimp and re-crimp a new one on
Insert the pin into the new housing with the little retention tab facing upward until the retention tab on the pin clicks into place
Repeat steps 3-5 for each other pin in order of ascending voltage

I'd recommend only having one pin free of either connector housing for as much of the process as possible to avoid inserting them in the wrong order or accidentally letting two of the pins tough each other, which would short the cells together (be bad).
Afterward, you should check your work by using a multimeter to confirm that the voltages between GND and each pin are in ascending order from left to right.
Comment: Well, that's a bit of a separate question... a good one to ask! Repairing that is riskier because you'll need to open up the insulation around the battery pack and solder to the cell. It's definitely feasible, just more dangerous.
Comment: How difficult is this to do if instead of the just connector being damaged, the wire has been pulled from the cell itself? I have at least one battery where the connector there is no remaining wire coming out of the plastic wrapping the cells.


How can I assign a group every single permission?

Question: Is there any way to assign all permissions to a certain group without doing it individually? I want to make it so that on my Bukkit server, Head Admin and over have all commands automatically and no need for OP.
Answer: After the permissions rework, this is not possible without the use of an external permissions mod.
However, I'd like to note that this is NOT a good idea. In fact, this is why the ability to give the * permission was removed in the rework.
Some plugins will use permissions not as a way to enable commands but as a way to enable certain features, which you may not want. I could for instance make a permission like antiCheat.user.preventFlying that would stop anyone with the permission from flying. This would be desirable for ordinary users but potentially undesirable for admins.
Comment: Fun fact, the * node only gives permissions to players IF that permission is located in the plugin.yml file of each plugin. So for example the anticheat node you gave, the * node will not be affected since anticheat does not list `antiCheat.user.preventFlying` in the plugin.yml inside the antiCheat.jar
Comment: @aman207 My information is a little bit outdated and was never that in-depth to begin with. Thanks for the addendum :)


Quartz Scheduler Cluster Time Sync

Question: I've looked through Quartz documentation and I can't seem to find a definite answer to the question: What happens if I am using Quartz Scheduler in a clustered environment but the machines get out of synch (we would be using JobStoreTX)? Will Quartz fire off multiple jobs? Will it only fire one by locking the database row entry?
Comment: The [tutorial](http://www.quartz-scheduler.org/documentation/quartz-2.2.x/tutorials/tutorial-lesson-11.html) just says: "_Never run clustering on separate machines, unless their clocks are synchronized using some form of time-sync service (daemon) that runs very regularly (the clocks must be within a second of each other)._"
Answer: Unfortunately I don't think it's documented, however I believe the results aren't so destructive and erroneous.
Each Quartz scheduler instance in the cluster polls the database every few seconds trying to find new jobs to fire (I think by default it searches for all jobs with next scheduled time between now - 30 and now + 60 seconds - but this is irrelevant and depends on configuration). This operation is obviously safe across cluster because it is very likely that multiple instances are polling for new jobs at the same time.
If server times aren't synchronized across cluster, assume one of the servers has the clock in the future. This server thinks it is later than it actually is so it fetches and starts jobs too early - or at least earlier than all the others. This means that a single server will run more if not all jobs, stealing work from the rest of the cluster. This is not unsafe per se, but will cause asymmetric cluster load.
I was considering raising an issue suggesting using of database time in all servers to avoid these problems. However the popularity of ntp and added complexity of using external time source makes it a bad idea.

Quartz Scheduler Cluster Time Sync


Can i replace Windows XP with Lubuntu?

Question: I have an ancient computer about 10 years old and i'm getting obsessed with linux and ubuntu.I searched about this and i found out that Lubuntu would work better.
Should i take the risk ?
Comment: Try with a live USB or DVD and see if you like it. In principle it will work well, but remember: taking the road of a user-supported, volunteer-based operating system require a predisposition to learn new things and solve problems. "Better" is a big word. Remember that Windows programs, in general, will not run on Linux; you have to learn alternatives. My vote is yes, try it. But it depends.
Answer: Of course you should! Get a Lubuntu ISO now at:
https://help.ubuntu.com/community/Lubuntu/GetLubuntu
You can either burn it to a CD/DVD or put the Live system in a USB drive with a program such as UNetBootin, available here:
https://unetbootin.github.io/
Download your ISO, install UNetBootin and run it, select to install with an existing ISO and select your USB thumb drive as the output drive. We're good to go, boot from your fresh CD/DVD/USB!
You will see a menu with several options. The first of them is "Try Lubuntu without installing". Select it and do everything you would do in an everyday OS, like creating documents and browsing the web. If everything is fine, you can proceed with the installation. You can choose to install Lubuntu alongside Windows or, why not, erase Windows and install Lubuntu over it. The second option usually leaves you with a faster OS, because it will be installed in the beginning of your disk.
After installing (the whole process should take about 20 minutes), reboot your PC and you should go directly into Lubuntu. Let me recommend you some packages considered essential by me (you can get them at Lubuntu's Software Center):
LibreOffice: this amazing office suite comes with Ubuntu but is not included in Lubuntu so it's more compact. In Lubuntu it's replaced by gnumeric and abiword, but LibreOffice is always better.
Wine: wine is a program that creates a compatibility layer to run Windows software in Linux (there is also a Mac version). With wine you will be able to run everything you need from Windows, including games. Note: Wine is NOT an emulator, it is a compatibility layer. This means that you will NOT have much performance loss. But you can always find free, open-source alternatives to Windows programs for Linux.
GIMP: this incredible program is used to edit images in a professional level, a great replacement for Adobe's Photoshop.
OpenShot: a very simple yet powerful video editor for Linux. It's very user-friendly and easy to use and has tons of features.
There is a program called "additional drivers", it comes with Lubuntu and you can find it in the applications menu. Use it to enable proprietary hardware drivers and increase even more the performance!
These are my hints for now! Don't be afraid to test, configure and use Linux. It's wonderful!
Answer: My desktop computer is also 10 years and came with Windows XP installed. I dual booted Lubuntu 14.04 LTS on my hard drive. Before installing Lubuntu I used GParted to partition the hard drive between XP, an XP Recovery, and an extended partition for Lubuntu and a swap partition.
I can access my Windows XP partition and copy Word documents, Excel spreadsheets, and photographs I've saved to my Lubuntu partition. I can use LibreOffice products to do every thing I had used MS Office to do. Other than copying a occasional file, I don't use Windows XP any more. I use Chome as my browser. You can use Firefox if you prefer.
In April, 2016, a new Long Term Support (LTS) version of Ubuntu (and Lubuntu) will be issued. At that time I'll switch completely to Lubuntu and use the disk space occupied by Windows XP and the Recovery partitions.
Follow the instruction given to generate a DVD or USB stick. Try Lubuntu. I think you will find that you can do all of your usual computer tasks just as well as you did with Windows XP. You can enjoy the updates and upgrades provided by Lubuntu, and if you have issues or problems, Askubuntu is there to find solutions.
Answer: Make sure that you backup any pictures, files, documents or music that you want to keep on external media before installing even if you are going to install along side windows. I have found out the hard way that installations may not go the way you expect.

Can i replace Windows XP with Lubuntu?


What is a reasonable rate for proofreading a manuscript in terms of sales percentage?

Question: If offered a percentage of profit for an ebook (e.g. after Amazon's cut), what is reasonable charge for proofreading a somewhat specialized non-fiction manuscript, written by someone whose first language is not English (to be fair neither is mine)?
I realize the answer will be 'it depends', but just wondering if asking for 10%-15% is too much?
Comment: Percentage is not really appropriate for proofreading since the success or failure of the book will not be proportional to the quality of the proofreading. A few per word is more appropriate.
Comment: http://www.the-efa.org/res/rates.php
Comment: now https://www.the-efa.org/rates/
Answer: If someone asked me to proofread in return for a percentage, I'd turn them down, because I'd want to be paid as soon as the work is done, and I wouldn't want how much I get paid to be dependent on sales of copies.
However, if you want to take them up on it, I guess you should first work out the flat fee you'd be willing to work for, then work backwards from there.
Where n is a reasonable estimate for number of copies the book is likely to seel, p is the net profit on each copy of the book, and s is the minimum sum you want to be paid, then the percentage you should ask for is s / p * n * 100.
The tricky bit is n, as you can't know for sure, but you could look at sales figures for similar titles in that subject area and correlate it with sales of the author's previous titles, maybe?
Answer: I mostly wrote plays, and never, ever, have I given the proofreader a cut of the profits.
They got .50 cents a page (a play is about 90-120 pages) and that back in the 80's was industry standard. I have heard novelists from some of my wrtiter's agents say they pay about $1 per page today (well, 5 years ago).
Plays are a lot more difficult to get published, let alone produced. You have to workshop it first, which is doing first readings where the play is read in a monotone, make changes, then at subsequent readings, you need to find real actors to study the character and read the parts. Then you can see if the dialogue works. If your plot holds.
Usually, for me to get a group to do readings like that, I give the play to a community or regional playhouse, and let them put it on without royalties. This way, I get a director, and it goes from being just a set of readings to a dress rehearsal to an actual production. And that is when you stand in the back hoping the audience liked your play.
After its first production, then you can get it published in one of the catalogs. I was a member of the Dramatist Guild for years, and by membership found it easier to get first and second readings.
I would think that a proofreader does the same job as first reader, actor for each of your characters, and critiques more than just your grammar and spelling. They get into the roll of each character, and will identify any flaws and inconsistencies with your characters as it pertains to the storyline and plot.
They also will go over the plot. I use the hero method of plotting for plays, as I only have 90 minutes to get my story across. But a novel can have so many subplots, a good proof reader will let you know what is working and what isn't.
And sometimes, especially if you have an agent, they will insist on a second proof reading after you made the changes to your story.
One thing I did in the theater when I had a play that was good, and this is done in independent movies with low budgets. You give your director, actors, even the sound and camera people equity into the project.
This gives them incentive to do the best job possible, because if they don't, they get smaller checks.
I can see possibly paying a proofreader a piece of the action, but not at 15 percent. An agent will take at least that much, then your publisher (if you don't self publish) takes a huge cut. The deduct the cost of printing the book, and the distributors and retail sellers take cuts as well. Depending on your contract, your publisher and agent get their cut, and it can either be a percentage based on the retail price, or the net proceeds.
These are things you need to know before you you decide whether to just pay the $380 to the proofreader, or cut them in for a small percentage.
And if you do not type your manuscript yourself, services charge between .50 cents to $1.50 a page. But you should only use them when you are ready to send copies to publishers. They don't require a percentage.
Most authors I know whose books sell for $19.99 usually wind up with getting between $1.50 to $3.00 per sale.
This is why many self-publish. Even if you get a contract with a large publishing house, you will still have to hit the road to promote your book. Why not save a ton of money and publish the book under a publishing house you own? Then you can expand and publish the works of other writers and take a percentage from their sales.
Your proofreader, like those who do workshop my play, will make or break your story before you even get your book published. It will mean the difference between getting $1.50 per book or $3.00.
BTW: Even if you hire a proofreader, which is recommended, a publisher will hire their own proofreader. This is how important you proofreader is, because up until then, no one has seen your book. First impressions are everything.


Wind powered DC motor to LED

Question: I am quite new, lets say green at this whole electrical game. Now that you know that, I have built a mini wind turbine that is powering a salvaged dc motor from a Kodak printer, and a green LED attached to the wires of the motor. The motor will turn on the led with a certain thrust of my fingers or if I roll the motors gear on the floor it will power the led, but wont turn the led on with a normal rotation of wind. I have a positive feeling that one of you could help me and I was wondering if there was anything I could run in between the dc motor and LED to keep a more constant flow of electricity rather than needing a high initial thrust. the led is powered by the other smaller motors I salvaged as well and this dc motor is about twice their size so I know there is more than enough potential to figure this out. Thanks to anyone of assistance. :)
Comment: When your motor has a high mechanical cogging torque, there is nothing you can do about this electrically. You have to use a gear which overturns this torque with the wind you want to harness.
Comment: thank you for the reply I really appreciate it. so in that sense, do you think I should go with  a gear mechanism or maybe one of the smaller dc motors, the smallest one I have will power it and it spins easier as well. and if I do go with the gears, how could I set it up? Large gear to the small gear that is attached to the dc motor?
Comment: Think about the wind wheel first. The more blades it has, the easier it will move in a faint wind. For your hobbyist purposes, a simple westernmill wheel will give best results.
Comment: You need a small gear on the turbine to a large gear on the motor. So many turns of the windmill will turn fewer turns of the motor. Whether the turn rate is enough for your load will depend on the size of the windmill, it's wind catching efficiency, and the speed of the wind of course.
Answer: If you want to know how it should be done.
I have done something similar but with 4 100 Watt solar panels.
I use lead acid batteries.  You could use NiCd batteries.  I say NiCd because they can handle more abuse than any other battery beside lead acid.  And lead acid is too high a voltage for this project.
You need to harvest the energy from the wind turbine. Then use that energy to charge the battery. You would use a boost-buck regulator to charge the battery.
You then connect the LED to the battery through a current regulator.
The image below shows how I did it, bigger scale but the same approach.
Mine has a little extra.  I also have a power supply that will power my LEDs when the solar panels and batteries cannot.  The OR Diode controller switches automatically depending on if the solar power voltage is higher than the power supply.
The MPPT, Maximum Power Point Tracking Charge Controller charges the batteries from the solar panel as long as the panel has some energy to contribute. The panel voltage ranges for zero to about 80 volts at typically 5 Amp.
Perhaps if you attach a more efficient propeller blade to the motor you will get more out of your wind turbine.
So you just need a boost-buck battery chargfers, a battry, and a current regulator for the battery to power the LED.

Wind powered DC motor to LED


Why doesn't Bitcoin Core use Google's OSS-Fuzz?

Question: Google offers free access to their ClusterFuzz fuzzing infrastructure (through OSS-Fuzz) to open source projects. Why does Bitcoin Core not take advantage of this?
Answer: The primary reason that Bitcoin Core doesn't use OSS-Fuzz is that as Greg Maxwell states in this secp256k1 issue, there is an:

extremely short timeframe mandatory disclosure (edit: 90 days) which basically made
anything except blindly installed automatic updates a viable way to
deploy fixes

Pieter Wuille adds some additional context here:

This extraordinary requirement for exact consistency between implementations means that these classes of issues cannot be fixed in the time scale of software releases, but requires network-wide coordination. The most relevant example is how a platform dependent deviation from the DER standard in OpenSSL threatened a network split a few years ago; you can read about the issue and its timeline here. In that case, it took 9 months between discovery and eventual resolution, but I believe that similar issues these days would take significantly longer still.

Without a future exception granted by Google, Bitcoin Core using OSS-Fuzz is a non-starter.
I am less clear on exactly how much additional value Bitcoin Core would get from using OSS-Fuzz in a theoretical world where Google granted that exception. It is partly discussed in the issue in addition to the current state of fuzzing in Core and the secp256k1 library.
There is also the consideration of dependence on a specific corporation's infrastructure. Open source projects aren't locked in to OSS-Fuzz but it is generally time consuming and disruptive to make the transition off of them.
Update on May 5th 2021: Bitcoin Core has signed up to use Google's OSS-Fuzz.
Comment: Are the things mentioned by Greg Maxwell and Pieter Wuille not valid anymore?
Comment: I enquired about this here https://github.com/bitcoin/bitcoin/pull/21856. I think the most important issue here is/was the disclosure requirements. There were some other minor concerns (some people don't like Google, years ago Core fuzzing was more primitive than it is now etc) but it appears that there can be exceptions on the disclosure requirements and presumably that is why people with previous concerns on disclosure requirements are happy for it to go ahead now. I cc'd Jonas, Pieter. I'm sure they would have spoken up if they still had concerns.


Real orbits of Complex Flag Varieties

Question: Let $G$ be a semi-simple algebraic group over $\mathbb{C}$ with Borel subgroup $B$ and consider the flag variety $G/B$. If $G_0 \subset G$ is some real form, then $G_0$ acts on  $G/B$ and decomposes the space into a disjoint union of orbits. In the case of $SL_2$ one gets 2 open orbits while in $SL_3$ my calculations seem to show a single open orbit. Can one characterize the number of open orbits in general? For what groups is this number larger than 1?
Answer: Even though there is already a good answer to the question I would like to add that Aomoto's paper just marks the beginning of an extensive body of research on open $G_0$-orbits on $G/B$ or, more generally, on $G/P$ for any parabolic $P\subseteq G$. These open orbits are often called flag domains.
After Aomoto's paper one should mention a paper by Wolf (BAMS, 1969) in which general parabolics where considered. In particular, he derives a parameterization of flag domains in terms of double cosets inside the Weyl group of $G$. There is also a monograph by Fels-Huckleberry-Wolf on this topic and a survey by Akhiezer (Real group orbits on flag manifolds).
Finally, there is the Matsuki correspondence, setting up a bijection between the set of $G_0$- and the set of $K$-orbits in $G/P$. Here $K$ is the complexification of a maximal compact subgroup $K_0\subseteq G_0$. Hereby, open $G_0$-orbits correspond to compact (i.e. closed) $K$-orbits. In general, $K$-orbits on $G/B$ have been studied by Springer (some of them with Richardson) in a series of papers.
Comment: Dear Friedrich, many thanks for your response!
Answer: Aomoto (1966) gives a formula for the number of open orbits (page 15, between (46) and (47)), and specializes it to various special cases (just search the paper for "open").
Comment: Many thanks for the answer. I apologize if this question is too basic for the site.

Real orbits of Complex Flag Varieties


VFP to .Net Compiler

Question: Has anyone had experience of or got any knowledge about the VFP to .Net Compiler?
I'm working for a company with an extensive range of VFP9 applications and they are looking for a quick way to get apps running in .Net. I've been asked to check out this compiler to see if it is a viable option but so far I haven't been able to get it to successfully compile anything - even my "Hello World" world application doesn't run.
Just to qualify that last remark: I can get really simple Fox apps to "compile" but the .Net executable that is produced does not execute successfully. I've dissassembled the source and turned it into C# but generally it contains many errors (100+).
I'm tempted to dismiss the whole technology out of hand however there seems to be lots of support for this and excitement about it the Fox user community. Does anyone have any insight into this?
Here is a link to the VFP to .Net Compiler
Comment: Another option is Guineu - http://guineu.foxpert.com/ - 'Guineu is an alternative runtime library for Microsoft Visual FoxPro 9.0 that runs on any Microsoft .NET compatible platform' ...
Answer: I now have some experience with the VFP to .Net Compiler which you can find here.
This is actually a compiler for .Net and has nothing to do with COM Interop or Web Services. The whole thing is built around SharpDevelop which ships with the compiler. Effectively you can fire up SharpDevelop and type in a FoxPro PRG. There is full in intellisense and most if not all Fox commands and functions are supported. When you hit compile, what comes out the other side is a full .Net assembly.
If you run the assembly there is no instance of VFP and no COM interop in sight. How does it work? The guys behind it have created .Net functions which map onto the Fox functions, so for example if you call the StrToFile() this is the code that actually runs (brought to you by the wonders of Reflector):
public static void StrToFile(string cExpression, string cFileName)
{
    if (File.Exists(cFileName))
    {
        File.Delete(cFileName);
    }
    FileStream stream = new FileStream(cFileName, FileMode.CreateNew, FileAccess.ReadWrite);
    StreamWriter writer = new StreamWriter(stream);
    writer.Write(cExpression);
    writer.Flush();
    writer.Close();
    stream.Close();
}

What this means is that if you are very productive in Fox but you a need .Net solution you can code in Fox and produce a .Net assembly.
I would however advise some caution as not everything is implemented as nicely as the StrToFile example above. The way it models things like Fox forms is pretty awful, although it does work (you can take an existing Fox form and add it to SharpDevelop and it will turn it in to a .Net form). If anyone wants any more detail I'll be happy to expand on this.
Answer: VFP doesn't directly "compile" to a .Net product.  However, you can get to it via COM and creating a project as a single or multi-threaded DLL.
define class MyVFPForDotNet as custom OLEPUBLIC
  cSomeProperty = ""
  nOtherProperty = ""

  Function Init()
     cSomeProperty = curdir()

  endfunc

  Function SendBackAMessage()
     return "Hello World"
  endfunc

  function CallWithParms( cParm1 as String, nParm2 as Integer, dSomeDate as DateTime )
     .. do whatever

     return "whatever"
  endfunc

enddefine

Then you can add it as a COM Interop and the methods and properties would be available in .Net.  Your functions can do almost anything in VFP, query, automation, etc.  And you can simply do XMLAdapter to generate XML Strings to return back single or multiple cursor sets as one big chunk, or individually via multiple calls to different methods.
Good luck.
BTW... there are two upcoming seminars being offered for VFP developers who are looking into converting / accessing via .net.  One at http://www.oakleafsd.com/, another at http://www.eps-software.com/
Comment: The product in the link above claims to do just that: it takes a VFP application and "compiles" it into a .Net application. What comes out the other side is .Net exe which does the same as your VFP application. That's the claim anyway! Check the link: http://etecnologia.net/products/vfpcompiler/VFPCompiler-index.htm
Comment: There are actually two VFP to .NET compilers out there. They are not officially endorsed by Microsoft from what I'm aware of but there is the eTechnologia one and also one over at Foxite.
Answer: Some additional information on forms in the VFP Developer Studio for .Net: eTecnologia has announced that forms designed as VFP forms in SharpDevelop will optionally compile to SVG, which can run on every browser except IE, although there is a Google plug-in for IE that converts the SVG to SWF.  They have also previously committed to outputting XAML for VFP forms designed in SharpDevelop. In addition, .Net controls, COM controls, and we are told Java controls, will all be able to be used on VFP forms designed in the customized #D that ships with the Developer Studio.

VFP to .Net Compiler


How to get started with PHP themes?

Question: I have a web application developed using PHP. I want my users to select themes for their pages throughout the application.

Where should I start before using PHP themes?

What should I know about Themes in a PHP application?
Edit:
My question about themes is only about changing the color of the layout, not the images.
Suppose My ADMIN user will have white and Orange, but my staff user will have white and green...
How it can be done in PHP with CodeIgniter?
Answer: There are lots of directions you can go with this.
1) "CSS ZEN"
This is where the markup remains unchanged, but you totally change the design just by using CSS and images. Demonstrated very well on http://www.csszengarden.com/
2) MVC Stylee
This is where you create a model that represents the page data and then pass it to a view, which contains some inline echo statements. The idea is that you could send the same model to a totally different view so it could look entirely different, HTML and all. Cake PHP is a good start for this: http://cakephp.org/
Example:

    <? echo $Page->Content ?>

3) Micro-Markup
With this method, you add your own "special tags" to an HTML page. You then read in your plain HTML page and replace the special tags with the information you want to display. This is good if you want your templates to be recognisable to HTML guys that don't know PHP and might break the PHP code in the MVC app.
Example:

    <#Content#>

Out of all of these, MVC is a very structured way of achieving what you want - however, I listed the other options as they cater for specific scenarios that might be relevant to you.
I have implemented the concept in all three of these, in situations that were appropriate for each.
Regarding The Edit In The Question
I imagine you'll have "something" that represents your user - so it is as easy as:
(In the event of just wanting to override a few settings...)
<link href="style.css" type="text/css" rel="stylesheet">
<?php if ($User->Type === USER_ADMIN) {  ?>
<link href="admin.css" type="text/css" rel="stylesheet">
<?php } ?>

You can adjust this example in the following ways:

Use a switch statement if there will be many user types
If the replacement is total, rather than just a few overrides, you may want to completely swap the stylesheet.
Answer: You would usually set up template files that contain the HTML and CSS, and build in the PHP generated values at runtime.
The best approach to this is to have the theme reside in a separate directory, containing no code, just template variables like {mainmenu}, {backbutton},  {content} ... you get my drift. Those are then filled by your PHP script, possibly with the help of a template engine like Smarty (No need to re-invent the wheel here).
There is also the approach of having PHP markup directly in the template file(s) like echo $xyz; while this is a perfectly valid practice I use myself often, I recommend using a template engine over using PHP markup in the code if you want a solid, future-proof templating system because:

First, there is less that a designer can break when working on the HTML.
Second, having PHP markup in the code is a temptation to program PHP logic inside the template (loops, conditions) instead of properly preparing them in the PHP code at the point where the template variables are created. That is terrible for maintenance and the further use of your templates, because you have to replicate that PHP soup into every new template again. After all, you want to have a template engine so others can create new looks for your product, without having to know how to program it.
Third, with the templating engine based approach you have the possibility to add caching where necessary without any additional work. Not possible with the scripting approach. Yes, in a web application you won't be able to cache that much, but with a lot of data, there will be instances where it will help the user experience.
Fourth and least important, it makes your template less easy to export to other applications, and import templates from other applications.

The CSS Zen approach mentioned by Sohnee is great for websites, but is going to be too limited for a web application that uses complex input elements, JS based menus, and the like. It is too often that those elements need to be changed and customized in the markup.
Answer: If you have a look at my CodeIgniter Template library it briefly explains how you can set up themes and layouts (the equivalent of header & footer).
If you set up global code such as a Hook or a MY_Controller then you can dynamically set your theme based on the logged in user, the user type, etc.
Eg:
if($user->role == 'admin')
{
    $this->template->set_theme('admin_skin');
}

else
{
    $this->template->set_theme($user->theme);
}

That is just a VERY basic example of the sort of thing you could use this Template library for.
Answer: CMS Solutions
Magento and Wordpress package all theme related files into their own seperate directories. These contain the serverside code, stylesheets, images and javaScript for the theme. The user in effect chooses a directory to use which affects how the page is layed out and styled.
An easier approach
A much easier way to get started would be to accept that the actual content, e.g. HTML of a page would stay the same, but let the user choose from various CSS style sheets.
When choosing a style sheet the system could use JavaScript to load it in dynamically so that the user can preview the look they are choosing.
Answer: If you have really good semantic HTML it will be enough to change the CSS files. Unless the design changes are really heavy. Then it would make sense to provide PHP templates that are build with some sort of modules: variables which contain certain HTML structure like navigation or sidebar, etc.
Comment: You can also aid CSS theming by including a few 'useless' empty divs that the stylesheet can position and put background images in.
Answer: For themes you do not need PHP. Just define your themes in CSS (the best way is one file for each theme) and use a simple JavaScript chooser like at this site: http://www.fotokluburan.cz/switchcss.js.

How to get started with PHP themes?


Electron-positron scattering: why is this the only diagram?

Question: This is probably a very basic question, but I've been going through all my course materials and looking through various books to find a simple way of figuring this out. But consider the following process: $e^- e^+ \rightarrow \mu^- \mu^+$. Why is the s-channel diagram the only one that contributes to the Matrix element (only considering 2 vertices)? I could imagine writing a u channel diagram with propagator momentum p_a (initial electron) - k_2 (final antimuon). Any help is much appreciated.
Answer: If there were a $t$-channel or $u$-channel diagram for this process, it would have to involve a vertex where an electron changes into a muon and some other particle. There is no such vertex in the standard model.
Answer: In QED there are vertex only with the same two lepton line and one photon line.
I mean that there is not vertex when $\mu\to e\gamma$ in QED.


Is telling user that he is already signed in while signing up vulnerable?

Question: I am making a site's authentication system in which the sign up form isn't located at index and it isn't going to be at index. If a user is already signed in and wants to fill sign up form, the script tells him that you're already signed in with the following account. It is ok to do that or not? I've seen Google telling that re-enter your password and email is already filled and also picture and name are also displayed.
Answer: Why don't you have the site so that if a user is signed in, they don't see the sign-in section of the site?
Or if it's a menu, logged in users see a menu option called logout, all other users see a menu option called login/sign-up.
Comment: +1 you don't need to block access to the page, merely block access to the link to the page.
Comment: I don't have a link to sign up form on the protected page. If user accesses signup.php manually. What should I do?
Comment: Presumably you are tracking if the user is logged in using cookies or something similar?

If so, the first line of the signup.php should be something like (and this is off the top of my head so may not be valid):

    if isset($_SESSION['loggedin']){
      redirect to main page
    else
      "You need to login..."
Comment: I am tracking user through session. If session is set, then tell user he is already logged in with the account of following credentials. I have added a option to proceed to sign up form anyways.
Comment: @TimC I have figured it out. Thanks for participating


Light and parabola

Question: I know that parallel light beams hitting a parabola will be focused at the focus of the parabola (f = 1/4a) and a light source at the focus of the parabola will produce parallel light. What will happen if the light was not parallel but came from a light source shorter then the focus of the parabola and at an angle to the axis of symmetry? More general how will dispersement of the light from the parabola be affected with the light source at different angles and lengths from the parabola.
Answer: The behavior of the non-axial rays is illustrated on the picture below. Rays (red) falling in direction determined by the vector CD (in circle) reflect from the surface of a parabola (blue), forming an intersection at point J (red dot). The intersection point is obviously out-of original focus (yellow dot A). Tracking the direction vector shows the tracks of an intersection point (red and gray dots), which form a mustache-like pattern originating from A.

More interesting is the following picture - it shows that parallel rays do not even focus in a single point at all! One pair of rays intersect at J (red), while other pair intersect at N (green). Green and red tracks are different, so rays do not focus. They are smeared along a (probably linear) path consisting J-N.
Comment: Will more than two rays intersect pairwise at the same point?
Comment: @Niel de Beaudrap: Added the picture describing that they won't.
Comment: The parallel rays only concentrate on the focus if they are parallel with the symmetry axis, sorry that is what I meant should have phrased that better.
Answer: Not sure if this answers your question, but a parabola can be seen as a limit case of the ellipse. An ellipse has two focuses, and the light coming from one source focuses on another one. Take one of the focuses to infinity - and you've got a parabola.
As a zero-order approximation parabola focuses the light from a point light source, which is far enough. A first-order correction should be linear in the angle IMHO. The exact dispersion is probably complex.
Comment: @mbaitoff: I think Georg understood this as well (this is pretty clear from the context). It's just IMHO Georg is too much perfectionist, it's his duty to comment & downvote every questionable word :)
Comment: ""he exact dispersion "" Dispersion is something which does not occur in reflection!
Comment: @ Georg: I think valdo meant the dispersion of a rays (displacement), not the dispersion of a light (wavelength-dependancy).

Light and parabola


VPN server on Arch Linux

Question: Trying to set up a VPN server on an Arch Linux box. All I want is for it to be usable by OS X and iPhone OS. I'm a noob at VPN and can't seem to have much luck Googling. What software do I need to install and what else do I need to configure?
Answer: Recommended reading: OpenVPN Howtos
Comment: OpenVPN isn't going to do iPhone.  IPSEC, L2TP, PPTP.
Comment: Definitely.  The OpenVPN Howtos should get you started.  If you still have questions, then post back on serverfault.
Comment: Indeed, iPhone only supports IPSEC, L2TP and PPTP. So OpenVPN doesn't support any of those?
Comment: No, OpenVPN is an SSL-based VPN.  It's fantastic, but no clients for the iPhone (jailbroken or not).
Answer: OpenVPN works fine on OSX.  To work with iPhoneOS, though, you're going to need a L2TP, PPTP, or IPsec server.  Free/OpenSWAN is pretty easy to set up these days if you.
Honestly, the OpenSWAN documentation is pretty good, but you can find Gentoo instructions that are reasonably applicable to Arch (the default kernel config should have the options you need, so you can skip that part) here.  Relevant OpenSWAN docs are here if you want to do L2TP (which makes interop with Windows clients a lot easier).
Comment: Yes, the benefit of L2TP is easy interop with Windows (and PPTP is pretty much a given with it).  Vista and Win7 support easy-ish IPSEC, XP... not so much.  Really, though, all three of them have their own issues with NAT.  I'd probably just set up OpenSWAN for authentication with all three, if it were me.
Comment: So the benefit of L2TP over others would be easy interop with Windows too? Other than that, are there other significant reasons why I would choose one over another?
Answer: As nice as certificates are, the easiest solution is getting a PPTP server setup: https://wiki.archlinux.org/index.php/PPTP_Server
Answer: If you want to use OpenVPN which is one of the best in terms of encryption and speed, you can't really use the native methods of iOs (L2TP, PPTP or IPSec).

There are three major families of VPN implementations in wide usage today: SSL, IPSec, and PPTP. OpenVPN is an SSL VPN and as such is not compatible with IPSec, L2TP, or PPTP.

But there is now an iOs app that allow you to link a profile and easily connect to an OpenVPN server.
You can read the ArchWiki to install OpenVPN on your server here.
Answer: Take a look at Wireguard, they now have an iPhone app also

VPN server on Arch Linux


Does Queueable Apex job run if parent process crashes?

Question: We are using a custom Email To Case Handler apex class.  So that we can keep track of incoming emails if the custom handler crashes for any reason, we have just implemented code at the start of the handler to call a Queueable Apex class, and pass it the incoming email and envelope.  What we are finding is that if the custom email handler crashes, then Queueable job does not seem to run.  If the custom email handler finishes without crashing, then and only then does the Queuable job run.  Is this expected behavior?
Answer: Yes, this is the expected behavior. A transaction must run to completion (complete without hitting a governor limit, failed assertion, or uncaught exception), or the entire transaction will be rolled back, including any emails sent with Messaging.sendEmail, jobs queued with System.enqueueJob, System.schedule, or Database.executeBatch, and so on. While you're here reading this answer, be sure to vote on this idea.
Comment: @javanoob Yes, mentioned as [The event insertion occurs non-transactionally. As a result, you can't roll back published events.](https://developer.salesforce.com/docs/atlas.en-us.platform_events.meta/platform_events/platform_events_publish_apex.htm).
Comment: Thanks Fox.  Do you have a link to where this is "officially" documented?
Comment: I think platform events are exception for this right? Platform events are fired even if the parent transaction fails.
Comment: @hamayoun It's kind of described in a round-about way in a few places, like ["Any DML operations that were processed before the exception are rolled back and aren't committed to the database."](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_exception_definition.htm) and ["If the request does not complete successfully, all database changes are rolled back."](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/langCon_apex_transaction_control.htm). Nowhere does say that emails and jobs are also rolled back, but implied.


Hiding email address associated with Apple ID when using iMessage

Question: When sending an iMessage to a recipient, they see the email address associated with the sender's Apple ID. As a sender, is it possible to hide the email from the receiver, instead having the parties refer to each other using only a phone number?
Answer: You can choose which ID (phone number or Apple ID email) to use when starting a new iMessage conversation.
To configure, on your iPhone, go to Settings app → Messages → Send & Receive and under Start New Conversations From, select the phone number instead of email addresses associated with your Apple ID.


How to fold edges?

Question: Iam learning blender and trying to recreate this model. As you can see, my model has sharp edges and because of it, the outfit look paper thin. The other guy's model on other hand, his edges look thick and his outfit look really good. I took a close look and the guy was folding his edge, to make it look thick. How did he do that, guys?
Comment: You could use a Solidify modifier but if you ever apply it it will make twice the number of faces. Or just keep the thickness where it is visible. Also, before working with high-poly mesh, work on a low-poly, it will make the things much easier, at the end you can apply a Subdivision Surface modifier if it's really necessary (but always keep a copy of the original somewhere)
Comment: Much obliged it moonboots!
Answer: Try a Solidify modifier.
In the Properties panel, Modifiers tab (wrench icon) click the Add Modifier button.
Choose Solidify.
You can adjust the Thickness value to change the thickness.

How to fold edges?


Remove beta profile without wiping phone?

Question: I participated in the iOS 10 beta, and now that it's release is imminent, I'd like to remove the profile and continue on with regular public releases, but I'd like to not have to wipe my phone. Is this possible at all? Looking at Apple's site, it states to put the phone into recovery mode, but I've always sort of associated that with wiping the phone.
Comment: You can just remove the beta profile.
Comment: I think, correct me if I'm wrong, when the update is released, you can just do an in-place update and not have to wipe your data.  I don't recall ever wiping my iPhone when moving from the beta to the release.
Answer: You can also connect your iPhone to a Mac and use Apple Configurator 2 to remove the profile:
Answer: Wait for the final iOS 10 update comes out. Update to that version of iOS 10, then you can safely remove the beta profile from your phone without restoring. If you don't wants to wait, you have two options:

Go to ipsw.me and find the iOS 9.3.5 IPSW for your iPhone. Then connect iPhone to iTunes, option-click (shift-click on Windows) Check for Update, select the IPSW and downgrade to 9.3.5. Then remove the profile.
If you don't care about some bugs, you can just remove it and stay on that beta. When iOS 10 comes out, you will receive that update.

Still if you really wants to make sure that you fully removed it, you should restore the phone.


Use 2G instead of 3G on Samsung Galaxy SL I9003

Question: I have a Samsung Galaxy SL I9003 mobile phone. I prefer to use 2G data connection instead of 3G but I am unable to turn off the 3G service in my phone. How can I turn off the 3G service and use 2G instead?
Answer: Head over to the settings> Under Wireless and Networks>Tap More Settings>Mobile Networks>Network Mode>Change it to GSM only. This will keep you over the 2G network, when ever there's a need of 3G network again in future then you can again change it to auto mode.


What is the simplest way to view results at WebStorm?

Question: Suppose I have changed html file. What is the best way to view results? Am I able to view results right in IDE (WebStorm)? Or I have to open browser by using Alt-F2?
Answer: WebStorm doesn't have internal preview, so you need to verify the results in the browser. You can keep it running and just switch to the window and refresh the page, in WebStorm you can enable an option to save files automatically on frame deactivation.
Update: see also the new instant preview feature.
Answer: Still doesn't as, of 5.0.2, allow for in IDE browser windows, you you have to keep flipping back to browser to see changes, which is a tad sucky. No idea why they don't have this, its not exactly an unknown technique.


A possible characterization of sphere or projective space

Question: Is there a compact Riemanian manifold $M$ not diffeomorphic to sphere or real or complex or  quaternion projective space which admit a diffeomorphism $f$ with the property that $$\forall  x \in M, \quad d(f(x), x)=diam(M)$$ where $d$ is the metric arising from the Riemannian metric  and  diameter of $M$ with repect to this metric is  denoted  by  $diam(M)$
Comment: It's probably not what you were looking for, but the flat torus (which is $S^1 \times S^1$) will also have this property as well. In general, products of spheres and projective spaces will have diffeomorphisms satisfying this equation.
Comment: @GabeK  Yes that is  right thank  you.  But what is  an example of a  compact  manifold  which  does not satisfy the fixed point property does not admit such diffeomorphism?
Answer: The article by X. Liu and Sh. Deng "The antipodal sets of compact symmetric spaces" gives many examples, e.g. $\mathrm{SU}(2n)$, $\mathrm{Spin}(5)$, $\mathrm{Spin}(7)$,.... All those spaces have unique antipodal points which implies that the antipodal map is a diffeomorphism, see below. Here the antipodal points at $p$ are defined as $A(p)=\{ x\in M ~|~d(x,p)=\mathrm{diam}M\}$.
If a homogeneous space, equipped with a left-invariant metric has unique antipodal points then by compactness one gets a homeomorphism $f$ with the desired properties. By left-invariant of the metric the map $t\mapsto d(\exp(tX)x_0,\exp(tX)y_0)$ is constant so that $f(\exp(tX)x) = \exp(tX)f(x)$ which shows $f$ is differentiable. Here $\exp(X)$ denotes the isometry generated by the Killing field $X$.
Comment: Thank you very much for your very interesting and perfect answer.


Nikon D3500 vs Canon EOS T7

Question: I'm going to buy my first DSLR camera mainly for astrophotography and some panoramic photography. I will probably buy the Nikon D3500 but I don't understand why the Canon T7 is more expensive than the Nikon even if the Nikon has the best specs, I compared the 2 camera on CameraDecision and the Canon only had a few features the Nikon don't have. Which is the best for long exposure and low light?
Comment: You're complaining that the camera you like better also costs less?  Feel free to send the difference to your favorite charity.
Comment: Possible duplicate of [Is there any significant difference between Nikon and Canon?](https://photo.stackexchange.com/questions/12746/is-there-any-significant-difference-between-nikon-and-canon)
Comment: Where are you seeing "more expensive"? When I look on Amazon right now, both cameras with a kit lens are a few dollars under $400.
Comment: @mattdm It appears he was comparing a "body only" D3500 to a T7 bundled with a kit lens.
Comment: @MichaelC Ah, that could be it. I'll expand my answer a bit.
Answer: For astrophotography, you'll be looking at low light performance. That requires a good fast lens (usually a prime), and the ability to have actually useful high ISO. The specs mention neither. The high ISO on Nikon might suggest the Nikon is better, but the high ISO could be just so noisy that it's useless.
So, back to the researching stage: what is your budget for an astrophotography lens and does the Canon APS-C or Nikon APS-C system have that lens?
You should also find some review where the low-light performance of the cameras are compared. Look at the level of noise in high ISO images.
Comment: My lens will be a 12 inch telescope so the lens is not really a problem
Comment: Image stacking deals very well with Poisson distribution (shot) noise, which is the dominant kind of noise when using high ISOs. Most experienced astro shooters prefer a camera that does *less* on-die NR (like Canon sensors) rather than one that does *more* (like most Sony sensors). Most of those same experienced astro shooters tend to use the range of ISO 1600 to ISO 6400 far more than they use ISOs higher than 6400. It's be nice to have a on stop safety margin to ISO 12800, but anything past that isn't really that useful for astro because the shot noise starts to be just as bright as stars.
Comment: Shot noise is caused by the random distribution of photons in light and has nothing to do with sensor design. Sensor design *does* have to do with how shot noise is handled. Sensors with heavy handed on-die NR eliminate image details before ADC. Those details (dim stars) can not be recovered in digital processing. Sensors that look more noisy because they do not do much on-die NR can still have the same amount of NR applied in post to the digital data *if the user desires it*. One method gives the end user no choice. The other does.
Answer: First, your price comparison is not right — as I look on Amazon and B&H Photo right now, both are right below $400, with a three dollar price advantage for the Nikon camera. That's not a difference to make a big deal of.
Second, these automatic comparison sites are terrible. They don't use any human judgement and focus on emphasizing nitpicky differences as if they're a big deal. It's better to read a human-written comparison, like this one on DPreview. Like you, they favor the Nikon option slightly, but:

If you tally up the 'points' for the D3500 and you'll see how we drew our conclusion that it's the better pick between the two. However, the two cameras are incredibly similar in most ways, so it's really only details like a nicer 18-55mm kit lens and incredibly robust battery life that tip the scale.

For astrophotography with a telescope as the lens, I'm not sure either of those really matters. You won't be using the lens, and tossing in a few extra batteries is trivial. So, go for the one you're most attracted to — or better yet, the system you're most interested in. (See Is there any significant difference between Nikon and Canon?.) Both cameras are amazing for the price, so you really can't go wrong.
One suggestion, though: since you're not going to use the kit lens, consider not buying it. For about $100-$150 more, you can go up a step in either the Nikon or Canon lineup and get a camera sold "body only" that's somewhat better in specifications.
Note that neither of these cameras is officially sold in the US market as "body only". If you find it offered that way, you are in the "grey market". This may be a camera meant for a different country, which means you may be trouble getting US warranty service. Or it may be that an dubious vendor has taken the official "kit" apart and is selling the camera separately. In either case, I'd avoid that.
If you do decide to go up a notice, you may also want to check for a Pentax DSLR in that price range — Pentax is the third big-name maker of DSLR cameras, and they have in-body image stabilization and a unique "astrotracer" feature.
Comment: The Pentax K1 is a very popular model for doing astro. But if the OP is planning on using a 12" telescope as a lens, an actual tracking mount is pretty much a necessity that can't be overcome by the astrotracer feature that is more useful for very wide angle astro work.
Comment: +1 for "These automatic comparison sites are *terrible*."
Answer: Normally I'd respond to questions like this with, "Buy either one. They're both good enough."
But for astro work, there probably are at least three considerations you should be aware of. This is particularly the case since you have said in a comment that you are planning on using it with a 12 inch telescope, which usually means deep sky work rather than very wide field landscape astrophotography.
The first is called the "star eater" problem. Basically, all digital cameras do some noise reduction in the analog stage of collecting the information captured by the camera's sensor. This can not be controlled or turned on/off by the end user like noise reduction done to the data after it has been converted to digital information can. Some sensors and brands do this more extensively than others. Those that do it more aggressively sometimes eliminate weaker stars along with actual image noise. Thus, some folks say the camera "eats stars."
The worst offenders have historically been Sony cameras and Nikon cameras that use Sony sensors. Canon tends to be the least offensive because they do minimal on-die noise reduction and leave it to the user to decide how much and how to apply noise reduction to the digital image information in post-processing. Nikon cameras that do not use Sony sensors tend to be somewhere in between.
Some folks¹ claim Sony has "fixed" the star eater problem, others disagree and claim that it's not as bad  as it once was, but there are still issues with green and magenta color shifts on "single pixel" and "two pixel" stars.
So you might want to google around and see where the D3500 and T7 fall in this regard.
The other is sensitivity to Hydrogen alpha emissions at 656.28nm that are heavily attenuated by the IR filter included in the stack of filters in front of the imaging sensors with pretty much all "regular" DSLRs. Hα makes up a large part of the energy that reaches the Earth from nebulae and other deep sky objects that contain a lot of dust.
There have been a few cameras offered by manufacturers with modified sensor stacks that allow Hα to pass through unimpeded. The Nikon D810a and Canon 60a are probably two of the most well known. One can also take a "regular" DSLR or mirrorless camera and send it to a third party specialist company, such as Lifepixel.com, and they will modify the sensor stack by replacing the standard IR filter with one that allows Hα through.
Unfortunately, a camera sensitive to Hα is not very useful for types of photography other than astro work.
One other thing you might want to think about is the suitability of an APS-C sensor vs. a FF one. With about 2.25X more light gathering ability than an APS-C sensor, a FF camera can make a real difference in imaging dim astronomical objects.
Rather than buying either a new T7 or D3500, perhaps you should consider a lightly used older full frame camera, such as a Canon 5D Mark II that can be had in relatively good condition for around $400, and having it modified for astro with Hα sensitivity. For astro work my nearly decade old 5D Mark II is just as good as my newer 5D Mark IV. The faster handling, vastly improved autofocus, better dynamic range at base ISO (which you will rarely, if ever, use doing astro) and many other features that the 5D Mark IV offers over the 5D Mark II are totally irrelevant for astro work.
¹ PetaPixel has run numerous articles over the years that basically say "This time it really has been fixed" every time Sony releases a new generation of sensors. Then those doing serious astro work show how the issue is still present to some extent with those sensors. Fast forward to the release of the next generation of Sony sensors when someone writes another PetaPixel article that says "This time it really has been fixed..."
Comment: For primarily astro work on a large telescope like OP's 12", I think another point to consider is the ability to make the camera suitable for the job. No other camera lineup comes close to Canon's with the unofficial, community-supported Canon Hack Development Kit (CHDK) when it comes to tweaking the system to get the most desired outcome, workflow, etc.

Nikon D3500 vs Canon EOS T7


Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)

Question: I'm trying to update to node 7.x through the terminal on my raspberry pi and I keep encountering this error. The command I'm using is:
sudo curl -sL https://deb.nodesource.com/setup_7.x | bash -

Running this command as root doesn't work so I tried to see if apt-get was being used by any other processes.
ps aux | grep apt
pi        1295  0.0  0.1   4272  1848 pts/0    S+   06:24   0:00 grep --color=auto apt

This is all I get. Ultimately, (although it was initially advised not to do so), I tried removing the files and running the command again.
sudo rm /var/lib/apt/lists/lock && sudo rm /var/lib/dpkg/lock

Now neither one of these files no longer exists and I still receive the same error when trying to use curl. I also tried to kill that one process and I still get the error.
Comment: the process you get from ps is the grep process itself, if you relaunch you'll notice a different pid
Answer: The problem is that you sudo curl but not the bash call which call apt.
just run it fully as root, for example :
sudo su
curl -sL https://deb.nodesource.com/setup_7.x | bash -

or you can do something like
wget https://deb.nodesource.com/setup_7.x
chmod +x setup_7.x
sudo ./setup_7.x

Comment: You don't need sudo for curl. Just sudo bash: curl ... | sudo bash -
Answer: Remove the lock file
sudo rm /var/lib/apt/lists/lock

Then run the command as root or add sudo -E as follows :
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

Answer: I resolved a very similar issue in a Dockerfile, by adding 'sudo' after the pipe:
RUN curl -sL https://deb.nodesource.com/setup_10.x  | sudo bash -


Stop XCode from embedding build time in executables

Question: XCode4 is putting build time in executables it creates. When I build the same code twice, binaries will differ by few bytes belonging to a unix timestmap.
Is there a way to prevent this from happening?
(I'm running expensive tests and benchmarks after each build and cache results based on hash of executables, but ever-changing executables broke my cache and pollute benchmark results with duplicates).
Answer: I've worked around this by switching to building project myself "old skool" way with Makefiles & gcc.


A mixture with ingredients of two equivalences with Riemann Hypothesis

Question: Let $f(x)=x\cdot(\log x)^x$ for $x\geq 2$, then integrating $\log f(x)=\int_2^x f'(t)/f(t)dt$, it is easy to prove the first statement of following, and directly if we put $x=e^H_n$ and add $H_n$ the second ($e>2$)

Lemma. For $x\geq 2$,
  $$x\log \log x=2\log\log 2 +Li(x)+\int_2^x\log\log tdt$$
  where $Li(x)$ is the logarithmic integral $\int_2^xdt/\log t$. And thus
  $$H_n+e^{H_n}\log (H_n)=H_n+2\log\log 2+Li(e^{H_n})+\int_2^{e^{H_n}}\log\log tdt$$
  where $H_n$ is the nth harmonic number $1+1/2+\cdots +1/n$.

Now my question is

Question. Can you continue previous computations to prove a reasonable improve of
  $$\sigma(n)\leq \text{something}\leq \text{RHS of second statement in previous lemma},$$
  where $\sigma(n)$ denote the sum of the positive divisors of $n$, $\sum_{d|n}d$.

Thanks is advance, my only goal is edit the best possible post in this Math Stack Exchange, I apologize to bring this question here because I believe that this community can made contributions. Sorry by my english.
Appendix:
My question as is built, tell us how take an ingredient from an equivalence of Riemann Hypothesis, $\sigma(n)$, and other ingredient, $Li(x)$, from another equivalence of RH and put these together, well, in a not understandable way. Topics as certain type of abundant numbers, Robin approach to RH, the order of growth of $\sigma(n)$ or $H_n$, and the relationship between $Li(x)$ and Riemann Hypothesis can find in the literature. In [4] (I have not an open source to provide it) we can read an integral equal to $\sigma(n)$.
Simply you can read the first paragraph of the section Initial Ideas, page 343 of [2] (given as free  paper), and Lagarias equivalence in the last paragraph before the section Other Zeta and L-functions in page 347 to know two equivalences with Riemann Hypothesis.

Thus (via [3]) Riemann Hypothesis holds if and only if
  $$\sigma(n)\leq H_n+2\log\log 2+Li(e^{H_n})+\int_2^{e^{H_n}}\log\log t dt.$$

References:
[1] Wikipedia.
[2] J. Brian Conrey, The Riemann Hypothesis, Notices of the AMS, MARCH 2003, Volume 50, Number 3 (www.ams.org/notices).
[3] Jeffrey C. Lagarias, An Elementary Problem Equivalent to the Riemann Hypothesis, The American Mathematical Monthly Vol. 109, No. 6 (Jun. -Jul., 2002), pp. 534-543.
[4] George Purdy, An Integral Equal to $\sigma(n)$, Problems and Solutions, Problem E 1850 [1966, 82] American Mathematical Monthly Vol. 74 N. 5 MAY 1967, p. 594-595.
Comment: I've made the change in the misprint and deleted the first comment, to avoid confusion, it is better . Thanks.
Answer: $\int \limits_{2}^{x} \ln \ln t dt = t \ln \ln t-Li(t)|_{2}^{x} = x \ln \ln x-2 \ln \ln 2+Li(2)-Li(x)$
So $\int \limits_{2}^{x} \ln \ln t dt+ 2 \ln \ln 2+Li(x)+\ln x = \ln x+ Li(2)+x \ln \ln x $, put $x=e^{H_n}$ to get  $H_n + Li(2) +e^{H_n} \ln H_n$
So we arrive at $ Li(2) + H_n +e^{H_n} \ln H_n \geq \sigma(n)$ without the $Li(2) \approx 1.04516 $ its the famous C.Lagarias inequality which is true for all $n\geq 1$ iff the R.H. is true.
So nothing is new under the sun, this is known from the 80's.
Comment: Many thanks for your contribution, I am going to study it. As I've said using [3] we get the last paragraph, I that I am asking is if we can do more analysis about it, deduce a more interesting claim than mine from such RHS, if that is possible.


What kind of thermometer do I use to check dryer temperature? Can same one be used to check stove temperature?

Question: Is there a thermometer that can be used to check dryer temperature, and if so, what kind should be used?  Should only a multimeter be used on the dryer's thermostat instead?  I'm just wanting to doublecheck that a dryer is heating to proper temperature.  I would like to know if there is one that can be used both on a dryer and a stove, like maybe a thermometer that is just used for appliance repair.
Answer: I expect people repairing appliances either use

a k-type thermocouple attached to a suitable multimeter.
a thermometer specific to the type of appliance.

The key factors are probably temperature range, accuracy and the mechanical details.
Comment: Please clarify for me if you know if there is a thermometer specific to testing dryer temperature, and if so, what it would be called.  Also, would the k-type thermocouple work on both the stove and dryer?


Why does my pet dog bite and drag my other dog's neck?

Question: Can you please help me out on what is to be done?
Answer: Because they are both female, they are going to have to work out the pecking order. Right now the Terrier is being assertive and trying to be top dog in the household. The Terrier is engaging in dominant, agressive behavior. Something to consider: the pup is 6 months and this is the fall, so your new pup may be heading into her first heat. (You didn't say if either dog was spayed.) It doesn't excuse her behavior, but it might be part of the explanation for it.

The Poodle is demonstrating submissive, frightened behaviors. Possibly due to the difference in size, the aggressive play by her new sis, or it just might be a personality trait. Typically the older dog would be established as the 'ruler'.
It's hard to say if they are actually fighting or not, primarily because dogs tend to play like this, but I think dragging the Poodle around by the neck is a bit much.
I'm not sure what you meant by interferring... but, you are the parent, they are the kids. Turn and say, "(Terrier's name) NO!", in a firm no-nonsense kind of way. This should give you a few seconds to seperate them and make sure the Poodle will be alright. Try to avoid calling the Terrier a 'bad dog', instead focus on 'good dog' comments to encourage proper behavior. Please make a conscious effort to teach/train the Terrier not to be so rough.

Why does my pet dog bite and drag my other dog’s neck?


Detect objects that are touching

Question: how one can detect two object contact. with python, for example, I want every sphere becomes the child of the cube it touches.
Answer: Using closest point on mesh
Test code, assumes spheres are named "Sphere[.nnn]" and cubes "Cube[.nnn]"  If a hit from the sphere's centre to a point on a cube is less than the sphere's radius, then it parents them.
<code>import bpy
from bpy import context

scene = context.scene
spheres = [o for o in scene.objects if o.name.startswith("Sphere")]
cubes = [o for o in scene.objects if o.name.startswith("Cube")]

for s in spheres:
    o = s.matrix_world.to_translation()
    radius = sum(s.dimensions) / 6 # sphere radius guestimation
    for cube in cubes:
        cmwi = cube.matrix_world.inverted()
        local_pos = cmwi * o
        (hit, loc, norm, face_index) = cube.closest_point_on_mesh(local_pos)
        if hit:
            v2 = cube.matrix_world * loc
            # distance from global hit to cube
            l = (v2 - o).length
            if l <= radius:
                cube.parent = s
                cube.matrix_parent_inverse = s.matrix_world.inverted()
</code>
Comment: Thank you. the cube and the sphere was for example. if I have a more complex form a cube, it will not work.
your code gives me an error "need more than 3 values to unpack" on line : (hit, loc, norm, face_index) = cube.closest_point_on_mesh (local_pos)
Comment: What version of blender are you using?, closest point on mesh changed to include hit for 2.77 I think.
Comment: version of Blender: 2.76
Comment: Change to `(loc, norm, face_index) = cube.closest_point_on_mesh(local_pos)`
and just fudge in  `hit = True`  ... or better still upgrade.

Detect objects that are touching


Mutually recursive methods with defaults

Question: Lets say I've got a class with the following methods (this is a bit silly, I know, in reality it's got more to do with default directories):
sub getOne { my $self = shift; return $self->getZero() + 1; }
sub getZero { my $self = shift; return $self->getOne() - 1; }

I want to allow the user to override either one, both or none of these methods. In the case of overriding one of the methods, the other one of course takes the default, so setting getOne to 7 would result in getZero being 6. The user can also override both. But also the user can override none at all, in which case the results should be the obvious 1 and 0. This is the case where the above code fails, it enters a infinite loop in this case.
I know I could have:
sub getOneOverride { undef; }
sub getZeroOverride { undef; }

sub getOne
{
  my $self = shift;
  return $self->getOneOverride() or
    ($self->getZeroOverride() ? $self->getZeroOverride() + 1 : 1);
}

sub getZero
{
  my $self = shift;
  return $self->getZeroOverride() or
    ($self->getOneOverride() ? $self->getOneOverride() - 1 : 0);
}

But this would require separate override and reading methods, which I find a bit messy.
Any way to achieve the above without separate "override" methods?
Answer: Answering my own question here, I've just solved this by breaking the loop with an optional parameter, i.e.
sub getOne  { my $self = shift; return $self->getZero(1) + 1; }

sub getZero
{
  my ($self, $default_call) = @_;
  return $default_call ? 0 : $self->getOne() - 1;
}


I encountered an error while trying to move MAgento website from FTP to localhost on WAMP

Question: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'XXX.tag_summary' doesn't exist, query was: SELECT tag_summary.popularity, tag.* FROM tag_summary
 INNER JOIN tag ON tag.tag_id = tag_summary.tag_id AND tag.status = 1 WHERE (tag_summary.store_id = '1') AND (tag_summary.products > 0) ORDER BY popularity DESC LIMIT 20
Comment: Please ask for trace if required.
Comment: Ensure your database tables don't have prefixes, could be the cause. Please double check that the tag_summary table exists in your database.
Answer: Here you can find the SQL to create the missing table : http://pastebin.com/JipuLqRt (take care if you have table prefix)

Like my response here : https://magento.stackexchange.com/a/96630/33619 one solution you have to fix this kind of error is to install a clean Magento instance and use PhpMyAdmin (or other tool) to see table structure. With that you can find the SQL query to create the table.
For example I am using Sequel Pro and there is a tab for this :
Comment: It says #1215 - Cannot add foreign key constraint
Comment: Can you try this solution to have more information please : http://stackoverflow.com/a/15535110/3531064


Are there any support tools like coderush or resharper for F#?

Question: Are there any support tools like coderush or resharper for F#?
Answer: Preview version of FSharpRefactor released in Visual Studio Gallery.
http://visualstudiogallery.msdn.microsoft.com/339cbae9-911d-4f99-9033-3c3564676f45
http://www.youtube.com/watch?v=T6-YjUULNCA/
Answer: F# Refactor open source project on CodePlex (Apache license).
Answer: Take a look at the open-source Visual F# Power Tools project. They've got a rename refactoring, some code generation stuff (eg. record stub generation), graying out of unused declarations, as well as some other things. They're moving pretty fast at the moment, with lots of new features getting added all the time.
Answer: There's an effort to support F# in ReSharper via an external plug-in (itself written in F#). You can find preliminary info here.
Comment: Now it looks like the project is dead and nothing in Resharper helps with F#. It is sad.
Comment: This project is no longer on GitHub. Moved or dead?
Comment: @bentayloruk the project is currently being restructured. the reason is that it started using some features that were resharper-internal (e.g., r#'s own parser gen). things have changed, and that tech will be part of r#7 sdk. thus, the fsharper project will be posted back once it's updated to use those.
Answer: FSharpRefactor 0.1 (Preview version) Released on the Visual Studio Gallery.
http://visualstudiogallery.msdn.microsoft.com/339cbae9-911d-4f99-9033-3c3564676f45?SRC=Home
Answer: Not yet, as far as I know. I was also looking for something similar to no success. I suspect as soon as F# hits VS2010 as its integral part, or even a bit earlier, such tools will eventually emerge.
As far as ReSharper is concerned, you may want to drop JetBrains a quick email, it would be interesting to know whether these guys have any plans regarding F#.
Answer: Since the push in f# is towards light mode the reformatting possible is likely to be both limited, and hard to implement.
Normally reformatting takes the structural information and uses that to create the textual position. In the case of #light the textual position (of indenting at least) is the structure. As such any reformatting would be at best to sort inter symbol spacing, hardly onerous to do yourself.
I would therefore not expect a commercial product for it at least until the 'proper' integration with the IDE (I do not consider the current CTP proper in this regard since several outstanding bugs with it exist which will not be fixed in 2008)
Comment: But the F# compiler is apache licensed, so you don't need to start from scratch.  In fact, the intellisense is just the compiler with the back end chopped off.
Comment: @Rick I agree, but I'm saying that writing a comercial tool is not likely to be worth the cost/benefit trade off given that the f# compiler is not so 'friendly' in trying to get structure from incomplete (read broken) code as say c# (whose compiler does an *awful* lot of work in that regard, take a look at the Roslyn CTP. That the f# compiler is open source under a very permissive licence does make this much more palatable I freely concede. I'd also love to be proved wrong :)
Answer: CodeRush is working in F# editor. At least some code assistance and code templates. But code templates are not defined yet (you have to create your own).


CAS server authentication using LDAP

Question: I have 2 web application and I want to use CAS server connecting to LDAP for authentication. I  have installed apache DS and configured CAS server like this:
https://wiki.jasig.org/display/CASUM/CAS+on+Windows+Quick+Setup+Guide
first I added this to pom.xml in cas server :

    ${project.groupId}
    cas-server-support-ldap
    ${project.version}

then in deployerConfigContext.xml added this lines:

    ldap://localhost:10389

removed the demo authentication handler
added this:

for the last steps I have added these 2 steps to libs:
spring-ldap-X.Y.Z.RELEASE-all.jar
cas-server-support-ldap-$VERSION.jar
as soon as I deployed cas server in tomcat, I tried to login using admin/secret credentials but this message appears:
The credentials you provided cannot be determined to be authentic.
please help.
Answer: Take a look at the write up on building a CAS server I did awhile back. It should make it easy to understand.
http://blog.mosheldon.com/2011/04/cas-sso-347-with-ldapad-attributes.html

CAS server authentication using LDAP


Does the IronPDF free trial affect already built apps?

Question: I wanted to use the IronPDF library in an app for personal usage. They offer a free 30-day key, but I'm not sure if my PDFs will suddenly get watermarks in 30 days in case they validate the key somehow each time.
Comment: Ah, well, _that's_ more likely, yes. Depending on how the licensing works, it'll probably either check online whether the key is still valid, or the expiry date will be encoded into the key itself.
Comment: I... don't think a trial key would have the power to make watermarks appear in static files. Of course you could inspect the PDFs generated to see if there is some sort of dynamic magic that could make that happen.
Comment: @AKX, no, what I meant is if there is some kind of active validation in the library, it could start putting watermarks in newly-generated files despite the app being built while the trial was active.
Answer: IronPDF is always free and open for development and testing.
If you need to test and share your project in a live environment with no watermarks, please request a 30-day trial key, which can be easily applied directly in your code, as shown below:
<code>IronPdf.License.LicenseKey = "IRONPDF-ZIVDERO-MY-TRIAL-LICENSE-KEY-EXPIRES.15.MAR.2022";
</code>
Other options for applying a key, (web.confg, appsettings.json, etc.) as K J mentioned can also be viewed here:
https://ironpdf.com/docs/license/license-keys/


Tiling the Euclidean plane, and Cayley graph

Question: Tile the Euclidean plane by squares of side length 1. Let W be the group generated by the four reflections in the (extended) sides of any one square. Draw the Cayley graph of W and prove that $W = D_\infty \bigoplus D_\infty$. I am so confused with this question. Any help would be great to get started.
Comment: Well...what have you done so far? From a first glance, I beieve you want to prove that you have a copy of $D_{\infty}$ acting on the $x$-axis and a second copy acting on the $y$-axis, and that these two subgroups generate your groups. Clearly they would intersect trivially and commute, so this would complete your proof...(to prove that these two subgroups exists, take the square that $W$ is acting on in an extended way and see what $W$ does to this square...basically, prove that the reflections of $D_4$ generate the entire groups!)
Answer: What may be confusing about this is that the role that's usually played by rotations in a dihedral group is played by translations here. However, abstractly, this is the same thing: The translations along an axis form an infinite cyclic group, just like the one generated by a rotation through an irrational multiple of $\pi$ in the "normal" infinite dihedral group; and conjugation by any reflection inverts a translation, which is again the same as for the generators of dihedral groups. You can take one reflection and one translation as generators for each axis.


Straight hand in poker

Question: Is it a straight if let's say you have a 3 and a 4 and down on the table are a K an A and a 2?
Answer: No. Straights are from 23456 to TJQKA (where T is 10 in a useful representation of just 1 character). A special lowest case exists as A2345.
Assuming KA234 as a valid straight comes from a wrong assumption from a popular dice game, although such assumption is also wrong in that game, but also widely spread.

Straight hand in poker