Is there a way to print the rax soap request and response during a call out in apex

Question: We have several call outs from salesforce to an external webservices where we consume the external application wsdl and make call outs from our visual force pages. Do you guys know  how can i print the entire soap request and response in xml stream or log it for debugging? How do you guys do this now?
Buyan
Answer: Enable Apex Debug logs the SOAP request and responses are output to these. The Debug log Category of Callout is describes here as follows...

Includes the request-response XML that the server is sending and receiving from an external Web service. This is useful when debugging issues related to using Force.com Web services API calls.

The easiest way to capture an Apex Debug log is to have Developer Console open when you perform the operation in the UI, as described here. The more traditional route is to go to Debug Logs under the Setup menu. Both give the same results.
Comment: Does this work in Sandbox orgs as well as production orgs?
Comment: Yes it does work in Sandbox aswell
Answer: You can use http://requestb.in/
Just change the endpoint url to be the url you get from requestbin and add http://requestb.in/ in remote sites. Do the callout and you can inspect the soap message on postbin
Comment: Can you explain a bit more on what you mean by requestbin? Is it a third party service or what? what is postbin and can you share some examples of code please?
Comment: I used it today. On the site I clicked button "Create a Request Bin" and was redirected to http://requestb.in/19b1hsy1?inspect, then I sent my requests to http://requestb.in/19b1hsy1 and inspected them on http://requestb.in/19b1hsy1?inspect. Looks like in my particular case my version of sobjectPartnerSOAPsForceCom didn't write all the fields to the SOAP message


Direction of dipole moment

Question: How do you find out the direction of the dipole moment in a charge distribution? For example a sphere with charge density $\rho$ in northern hemisphere and $-\rho$ at southern hemisphere? How can you think about the direction in general?
Answer: Generally speaking, the dipole moment of a neutral charge distribution points in a direction that goes from the places with negative charge to the places with positive charge. Moreover, if the distribution has any sort of rotational symmetry axis (either continuous or discrete) then the dipole moment needs to lie along that axis.
To go beyond that, then you need to step away from hand-waving statements and actually calculate the dipole moment through its definition,
$$
\mathbf p = \int \mathbf r \, \rho(\mathbf r)\mathrm d\mathbf r,
$$
normally through direct and explicit integration.

Direction of dipole moment


Does XBox 360 Live require a broadband connection?

Question: My son wants an XBox 360 and insists it will work online with it's own WiFi and not use my download despite the fact that I have turned off my broadband WiFi.  I think it needs an external broadband connection and am even more convinced now I've been on this site.  Please confirm I'm right - my teenage son thinks his mother is just out to spoil his fun!
Comment: Welcome to Gaming.SE @Tina! Be sure to check the [FAQ](http://gaming.stackexchange.com/faq) if you have any questions about the site or posting! :)
Comment: In case it wasn't clear from the comments below, think of *"Wifi"* to mean *"wireless connection."*  It is a way of connecting your computer/xbox/whatever to your internet connection, but it is not itself an internet connection.
Answer: The short answer is that the Xbox LIVE service requires an internet connection to work. Wi-Fi itself cannot access the internet, you need a gateway in the home, usually a modem, DSL modem or cable modem. Wi-Fi itself is not an internet connection, but merely a mechanism that the devices in your house can use to talk to one another and to your router/gateway, your real connection to the internet.
So if your broadband Wi-Fi is disabled, the Xbox 360 will not be able to access the internet unless it is turned back on. Note that WiFi isn't necessary, the Xbox 360 can also use an Ethernet cable as well.
Here is a link to the Xbox LIVE Getting Started page, which should outline the requirements for using Xbox LIVE.
Note that to just play games on disc, LIVE is not required, but it is for things like validating downloadable content and playing multiplayer over the internet.
Comment: I'd like to note that I just took a look at [the compatible hardware list](http://support.xbox.com/en-us/xbox-live/get-started/connecting/network-hardware-compatible-xbox-live) (edited 2011-09-30) and they gutted it removing most brands, including Apple whom they previously said worked fine. So don't take that list as the most accurate.
Answer:
My son wants an XBox 360 and insists it will work online with it's own WiFi and not use my download despite the fact that I have turned off my broadband WiFi.

By broadband wifi, if you mean your wireless router's wifi, then no, his XBox can't connect to wifi unless he steals an open connection from a neighbor. The Xbox has an adapter that will connect THROUGH wifi, if there's a broadcast. Think of it like a radio (the Xbox) tuning into a station (the router). If the station isn't broadcasting, you're not getting any music.

I think it needs an external broadband connection and am even more convinced now I've been on this site. Please confirm I'm right - my teenage son thinks his mother is just out to spoil his fun!

The Xbox is playable without an internet connection, as far as I know. You can't play online, with friends or access any of the store offerings and content without the connection enabled via wifi or Ethernet cable.
Something else to consider: you can control how much online play, if at all, he can have. You can also set it up to not allow him to speak to anyone not on his friends list, and vice versa. So I couldn't send him a message or even talk to him, unless he added me as a friend first. There are a lot of parental settings you can configure if that's a concern.
Hope this helps.
Comment: +1 for mentioning parental controls.  Also, XBox 360 games are *required* to stay below a bandwidth limit, so if she is concerned about her son *"using up all her download"*, she shouldn't:  An Xbox 360 online for 6 hours a day, every day, would take up about 30MB (0.03GB) a month.  And that's assuming she has a monthly limit - most broadband connections these days don't.
Answer: The Xbox connecting to the internet using only it's own WiFi, without other devices? Doesn't work. Simply put, an Xbox 360 requires an external internet connection to access the internet.
However, do note that an internet connection is not required to use an Xbox 360 - you just lose out on benefits of connecting it - no multiplayer games, no access to DLC, no Xbox Live friends, etc.

For any device using WiFi to get to the internet (a laptop, Xbox, eBook reader, toaster, etc) it needs something to connect to - a home broadband router, a free WiFi point down the local coffee shop, a free WiFi network provided by the local council, etc (not all are valid choices for an Xbox!). Or, it needs another source for it's internet connection sure as a mobile phone pass-through or a 3G dongle, etc.
For an Xbox being used to game from home, you would normally expect it to be connected to your home broadband - either via a WiFi or network cable connection to a router, or possibly via a network bridge through any Windows computer (For example. the Xbox can connect to a computer, which will then carry the connection between it and your broadband router or modem).
Answer: An Xbox 360 will need an external internet connection, either through ethernet cable, or wifi (you'll need to buy the wifi adapter separately if you buy an old style xbox).
Comment: The [new Xboxes](http://en.wikipedia.org/wiki/Xbox_360#Current_models_.28Xbox_360_S.29) have wireless built-in.
Comment: @josh3736 Ah yes, I completely forgot about that. Thanks.


Amazon S3 upload in Salesforce Visualforce page

Question: Is there a good resource or apps in appxchange where I can put a upload field to a custom object in visualforce page that uploads file to Amazon s3 account?  I don't want to re invent to wheel if something like this is out there.
Answer: There are quite a number of AppExchange apps that use S3 for storage.  I'd be surprised if one of those doesn't fit your needs.
There's also the Amazon Toolkit if you need a custom solution.
As always, if you're directing the upload through Apex (3rd party or custom), you'll need to watch out for file size being limited by platform limits on heap size and callout size. If you're dealing with large files, make sure the AppExchange app supports them; or if doing a custom solution, you may want to investigate client-side direct S3 upload rather than diverting through Apex.
Answer: You can use Drag, Drop & Upload Files to Amazon S3 App for the same (https://appexchange.salesforce.com/listingDetail?listingId=a0N3000000B5ZPqEAN) . I am using it from last 2 years and it has got following features

Drag and Drop interface to upload file
You can view/delete your files from Salesforce
Its free

Also they provide Good Support if you have any issues & they provide additional customizations.


How to repair the handle of a mitre saw

Question: The handle of my mitre saw has cracked and is about to break. How can I repair this to be able to keep using the saw?
Comment: Normally, I'd try an appropriate cement for that type of plastic, perhaps epoxy -- **however the break appears to be near a shut-off switch, which is safety related.** As @crip659 states, look for a replacement.
Comment: Might be able to glue it, but probably be best to replace the handle.  Google make and model of saw for replacement parts.
Comment: @DrMoishePippik That switch turns the laser guide on/off. It is **not** a safety switch. Source: I have the same saw.
Comment: Huh ..  I have that same saw - think I'm going to go take a closer look at the handle and see if there are any signs of cracking in that spot ...
Comment: Do a web search for *  replacement parts*.   Depending on the age of your machine, the handle might be available for $20 to $50.   Then it's up to you whether you want to replace it or use the boat-repair style approach in the top answer.
Answer:
Find a way to clamp the handle back together, perhaps with a large woodworker's clamp, so that the crack line is nearly invisible and the the switch is retained solidly where it belongs; this is key to this type of repair working. (If this is not possible, do not continue.) Clean the handle of any soil or skin oils with something that will evaporate quickly such as Windex or isopropyl alcohol.

Cut a sheer nylon stocking into narrow strips perhaps 1/2" wide and several inches long.

Mix up some 2-part epoxy. Saturate the nylon stocking strips with epoxy, squeegee off any excess epoxy from the strips with a pop stick or dowel and start wrapping the broken area of the handle with the strips of epoxy-soaked nylon. Overlap the strips, criss-cross them and build up an epoxy/nylon "bandage" around the crack and beyond to the intact area. Use your judgment to determine how thick to make the bandage. Think of it like a cast for a broken arm. Thicker is stronger. Depending on how fast your epoxy hardens, you might have to mix several small batches. You may find it most convenient to manipulate the nylon strips with tweezers, chop sticks and gloved hands.

Allow the epoxy to fully harden – at least 24 hours – before stressing the handle.

I've made repairs like this on cracked and broken plastic parts inside machinery, and some repairs have lasted for years under daily stress. It makes an incredibly strong repair. And remember, at this point you have nothing to lose but a couple of bucks in materials, so it's worth giving it a try!
Comment: The drawback to this method is that if it _doesn't_ work, or it doesn't last very long, you now have a thick epoxied mess to try to remove before putting on a replacement handle. It might involve cutting through the patch job which could involve accidentally cutting through wiring inside. Not saying _don't_ attempt this, but to just think through the potential long-term consequences.
Comment: It is too bad where the cracks are, right at the switch and dead man control.  It will make life harder to do the repair right.  @FreeMan  The addition of the nylon in the the epoxy should make a very strong repair.  Much stronger and more dependable than epoxy alone, but it is at an awkward place.
Comment: Additionally, applying epoxy _could_ lead to some leaking through the handle and epoxying the two switches (dead-man's switch and power switch) into place, requiring replacement anyway.
Comment: According to another comment from an owner of the same saw, the black switch is not safety related, but turns the laser guide on/off.
Comment: Whether the switch is for the guide light or a safety, if epoxy drips into it, it may no longer function.
Comment: Nice: a [cast](https://en.wikipedia.org/wiki/Orthopedic_cast) for your saw.
Comment: Thanks for this answer. I ended up buying the replacement part, but being aware of this technique I'm sure will help me patch a few things in the future.
Answer: With the possibility of the handle breaking and my hand slipping down into the path of a spinning blade, if it were mine, I'd search online for a factory replacement handle. (Yes, I know many tools have electric brakes, but even so, I'm rather fond of my fingers and would like to minimize the possibility of their separation from my person.)
I've found numerous on-line suppliers that sell factory original repair parts for a wide variety of tools, usually for significantly less than the manufacturer sells the parts. Use your favorite search engine to search for <brand> <model number> replacement parts and you're very likely to find several resellers of parts. In my experience, they'll have exploded drawings of the tool, well labeled for part identification, and often written or video instructions on how to do the repair.
I upgraded the handle of my miter saw (the upgrade included a shadow-line light for the blade). The installation involved removing the blade guide and several other cover bits and routing wiring for the new light, as well as the upgraded handle (including an on/off switch for the light), and wiring updates to tap the new light into the existing wiring. All told, it took about 30 minutes to remove the old handle, remove all the other parts, install the new light and updated covers, and install the new handle.
Of course, repair vs replace is a dollar cost vs time cost vs potential for injury judgement call that each person must make for himself. IMHO, even at full manufacturer price, I would replace instead of repair.
Comment: I always prefer replace-part to a monkey-it-together solution. It looks like this is a [$25 part](https://www.amazon.com/RIDGID-RYOBI-OEM-080016005717-GENUINE/dp/B076FM32MX/ref=pd_lpo_1?pd_rd_i=B076FM32MX&psc=1) (definitely double-check that is the right part for your model, but it's "Ryobi Green" so I made an assumption) so I would just buy the replacement. Besides it won't look super janky when you are done.
Comment: I did order the part, thanks.

How to repair the handle of a mitre saw


I need to design below is any idea its highly appreciate?

Question: Need to design attached page need idea for this it is possible using LWC and another method we have in salesforce?
Comment: Yes, you can easily write this. Where are you having problems with this?
Answer: You could use a lightning datatable with row numbers:
https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable
For the last column you could use the lightning checkbox group:
https://developer.salesforce.com/docs/component-library/bundle/lightning-checkbox-group/example
Hope it helps! :)


Simulating interaction between two users in Jmeter

Question: I have to register two users and simulate interaction between them (for example, a conversation).
I can do the following: register the first user, then register the second, sign in using first user's data, write message to the second user and sign out. Then sign in using the second user's data, answer to the message and sign out.
Is it possible to implement users' conversation without signing out if the system requires enabled cookies for users?
Comment: I implemented the first scenario you described. Because writing messages to DB and then reading is not an option. Something strange happens when setting cookies, so my variant also failed. Thank you for attention!
Comment: Maybe someone, who hasn't read the question yet, can suggest some trick with cookies. I think it would be right to wait for a while...
Answer: I don't understand why you don't want to sign out as it's in your scenario.
You could code your scenario with:

Thread Group

Cookie Manager

CSV Dataset config

Once Only Controller

Then organise you CSV like this:
<code>    First Line : U1_LOGIN, U2_LOGIN,U1_MESSAGE,U2_MESSAGE
    Second Line : U3_LOGIN, U4_LOGIN,U3_MESSAGE,U4_MESSAGE
    ...
</code>
Finally organize your Test Plan like this:
<code>     CSV Data Set
     Thread Group
     \- CookieManager
     \- OnceOnlyController
        \- Register U1_LOGIN
        \- SignOut U1_LOGIN
        \- Register U2_LOGIN
        \- SignOut U2_LOGIN
     \- SignIn U1_LOGIN
     \- Write Message U1_MESSAGE
     \- SignOut U1_LOGIN
     \- SignIn U2_LOGIN
     \- Write Message U2_MESSAGE
     \- SignOut U2_LOGIN
</code>
Of course it's a draft , add all necessary assertions
Another option if you don't want to signout.
Create 2 thread groups:

one that writes

one that reads

This will require you to fill database with messages to read before the test.
It's up to you to say if it will simulate correctly your system.
But the option you intend to take seems to me wrong cause it is not maintanable regarding jmeter and not sure it reflects a real use case
Comment: Thank you for the answer, @PMD UBIK-INGENIERIE. The test plan you have described is the one I can implement, but don't want to do. I want to write a test plan without additional "sign out"-s because when I test manually using two different browsers I don't need to sign out. I found how to save cookies, how to clear them and how to set them, but setting doesn't work at the moment (I use CookieManager and Cookie classes). I hope to solve this problem today.


Can I open an account in Europe or Turkey ,being just as a tourist?

Question: is it possible for a foreigner, the person not residing there but can travel as a tourist,  to open an account in Europe or In middle east countries like Turkey or Dubai?
Answer: Although countries like these abide by strict regulations, the truth is that it depends on what country you are a citizen of, and how much money you show up with.
Then the answer becomes "yes"


How can I download free apps without registering an Apple ID?

Question:
"This Apple ID has not been yet been used before in the iTunes Store. Tap review to sign in, then review your account information."

I keep getting this message when I try to install free apps from App Store. I don't want to give my account info until I actually purchase something.
Can I not download free apps until I provide my account information? My email verification is complete. I'm using an iPhone 3GS logged in to my iTunes account.
Answer: This is by design. Apple requires you to set up an account even for free purchases (except podcasts).
In the past, you could set up a free account in iCloud and get away with not entering information, but now the security is getting beefed up.
You may be asked for three security questions and to re-verify your account periodically. The passwords are now more strict in needing a mix of case and numbers where you used to be able to choose a simpler password for your Apple ID.
There are cases where the device is not working properly and you keep getting this verification error, but in the case you describe it is now mandatory to enter more information when setting up your account initially.
Comment: Note that it is possible to set up an account without a credit card, but it requires you to do it in a very specific way.  I did this for my kids phone.
Comment: It always has been possible to make a Store Account without a credit card - but never possible to download without establishing an account / registration of some sort. _(although the process to make a free account has changed slightly over time, and the data required shifts every so often)_
Answer: The App Store requires you to have a valid Apple ID (normally an e-mail address) in order to download any content from there.
However, you do not need to add payment methods when following this guide:
Create an iTunes Store, App Store, or iBooks Store account without a credit card or other payment method


Did Diaochan really love Lü Bu?

Question: I am watching a series on Three kingdoms (2010), were it is shown that, Diaochan was really in love with Lü Bu, it was only Wang Yun, who schemed an act of proposing her daughter as a bride to Dong Zhou in order to have chaos between him and his son. So, I was confirming about this, as I can't find any proof of it, other than "Romance of Three kingdom" which is a novel written 1000 years later after that incident.
Answer: Moot, because Diaochan is not a real person. She is described in Romance of the Three Kingdoms, which is a historical novel that is not history. In the actual history Sanguozhi (quoted in Wikipedia's article on Diaochan):

卓常使布守中閤,布與卓侍婢私通,恐事發覺,心不自安.

This is not easy to translate, but the essence is that Lü Bu had an affair with one of Dong Zhuo's maids, was afraid of being discovered, and was uneasy as a result. Notably the maid's name is not recorded, and there is no indication that the maid is related to Wang Yun.
If we associate Diaochan with the historical maid, then whether she actually loved Lü Bu is anyone's guess. If we associate Diaochan with Wang Yun's daughter, then she's not a real person, and the question of whether she loved Lü Bu does not arise.
Comment: You said what i _tried_ to say, more clearly, and with citations.  Upvote!
Answer: Given that is mostly fictional, not historical, it is quite unlikely.

In the 14th-century historical novel Romance of the Three Kingdoms, Wang Yun was the adoptive father of the fictional maiden Diaochan, whom he used to stir up conflict between Lü Bu and Dong Zhuo, causing the former to betray and assassinate the latter.  Wikipedia

If this is correct, then the intrigue is an artifact of the novel, not established in history.
Note Wikipedia:RomanceOfTheThreeKing

Some 50 or 60 Yuan and early Ming plays about the Three Kingdoms are known to have existed, and their material is almost entirely fictional, based on thin threads of actual history. The novel is thus a return to greater emphasis on history, compared to these dramas.[20] The novel also shifted towards better acknowledgement of southern China's historical importance, while still portraying some prejudice against the south.[21] The Qing dynasty historian Zhang Xuecheng famously wrote that the novel was "seven-parts fact and three-parts fiction."[11][22] The fictional parts are culled from different sources, including unofficial histories, folk stories, the Sanguozhi Pinghua, and also the author's own imagination. Nonetheless, the description of the social conditions and the logic that the characters use is accurate to the Three Kingdoms period, creating "believable" situations and characters, even if they are not historically accurate.[23]

Romance of the Three Kingdoms, like the dramas and folk stories of its day, features Liu Bei and his associates as the protagonists; hence the depiction of the people in Shu Han was glorified. The antagonists, Cao Cao, Sun Quan and their followers, on the other hand, were often denigrated. This suited the political climate in the Ming dynasty, unlike in the Jin dynasty when Cao Wei was considered the legitimate successor to the Han dynasty.[citation needed]

Some non-historical scenes in the novel have become well-known and subsequently became a part of traditional Chinese culture.

The novel may be more historical, but my understanding is that period sources are quite limited.
Also,

Diaochan was one of the Four Beauties of ancient China. Although based on a minor historical personage, she is mostly a fictional character. WIkipedia Diaochan

And

Diao Chan is allegedly one of the four ancient Chinese beauties. Despite her absence in historical records, she was immortalized as a heroine by the well-known Chinese literary classics Romance of Three Kingdoms. wku.edu
Answer: Given that Romance of the Three Kingdoms is a historical novel, it is highly unlikely that the story of Diaochan and Lübu is true. A historical source you want to refer to is 《三国志》, or else known as the Records of the Three Kingdoms, which is the universally recognized source of history from the Han Dynasty to the Three Kingdoms period that the novel was mainly based off of.
In that version of the events, it is said that the historical figure Diaochan was mainly based off of was a wife of Lübu. Sources also say that Diaochan was a maid of Dong Zhuo, with whom Lübu had an affair with, as mentioned above.
However, as historical records mainly concentrate on the male figures of this period, the real identity of Diaochan and her story is disputed and isn't factually known.

Did Diaochan really love Lü Bu?


How to allow users in ACL group to add & remove contacts in groups

Question: I'm implementing ACLs for a client.  Users can only have view or edit to a group when adding permissions, so then don't have the ability to add or remove a contact from that group. In fact, I've found there are ways to add and delete a contact to/from a group - but the more usual methods result in the message "API permission check failed for GroupContact/delete call; insufficient permission: require access CiviCRM and edit all contacts"
 This is a Drupal system & they have 'edit groups' permissions. Giving the permission 'edit all contacts' then opens up all contacts to a user, which is obviously incorrect.
Is this a limitation of ACLs? Or is there some way around this problem?
Answer: Can you try apply patch from here ? If the patch works for you than it would be worth adding your test result on PR to speed up the merge process.
Comment: You can also apply the patch manually by editing the file and adding lines with says + and remove lines which says -
Comment: Unfortunately I don't do cmd line stuff, I'm strictly an implementer. Actually I do cmd line stuff on IBM mainframes but that was many years ago! If you can send me the full code I can install that, rather than the patch. And thx for the fast response.


Downloading code from Google Code without using a version control system

Question: Is there a method to download a folder from Google Code without having to use the version control system?
Answer: From what platform?
From Linux, if the code repository is subversion, you can do something like:
wget -m http://fofix.googlecode.com/svn/MFH-Mod/trunk/

There is a not so small caveat to that command, it will download the entire repository to the drive (that is all the tags and branches plus the trunk).
Another approach is using lftp:
lftp http://fofix.googlecode.com/svn/MFH-Mod/trunk/
lftp fofix.googlecode.com:/svn/MFH-Mod/trunk>
lftp fofix.googlecode.com:/svn/MFH-Mod/trunk>mirror <directory to download>

And that will download only that directory, recursively.
From Windows there are some mirroring apps, I can't recommend a specific one though.
Comment: There's a wget tool you can download for Windows.
Comment: Can you please tell me one mirroring app as I'm on windows 7?
Answer: I was looking for the same thing. The next best approach could be to use the following minimalistic standalone executable for Windows (~8.45 KB only):
http://downloadsvn.codeplex.com/
It's far better than having to install a standard SVN or GIT version-control system (you should have .NET Framework installed though). Although this is an old post, I hope it helps.
Answer: I know that this is a pretty old post, but for people which get here by googling, I want to say, that you can download the clean trunk instead of the entire repository with wget using this address:
[project_name_here].googlecode.com/svn/trunk

Instead of:
code.google.com/p/[project_name_here]/source/browse/trunk

Answer: Many of the projects have a "Downloads" tab where they will offer the source code in a zip file. This might be the easiest way to access a specific version of the code. As for accessing the live repository you might be out of luck.
Comment: Depending on the scm used in the googlecode project it is incorrect to say that.


Where do these convergence conditions come from?

Question: I have been reading a book on Reinforcement Learning and the author mentions "a well-known result in stochastic approximation theory" that gives us the conditions required to assure convergence in probability 1. Screenshot of these conditions below:

What is this well-known result? I've been trying to google around for it but am having trouble finding it.
$\ $
Edit for additional clarity
Here the $\alpha_n$ are step size parameters for processing rewards. You can see them being defined on p.25 (as it appears on the book page not page count in a PDF reader) of the book, with the below screenshot taken from p.26.
Comment: How can we locate the appropriate portions of the huge book to find the definitions of  $\alpha_n(a)$? By no means are these standard notations.
Answer: In a lecture from David Silver, he mentions that these are the conditions for the Robbins-Monro algorithm to converge, which is what I was looking for.


How do I use CMD to merge multiple text files and separate them with line breaks?

Question: I know I can use copy *.txt newfilename.txt to merge all the text files in a folder. Is there a way to do this, but separate each merged file with a line break?
Comment: What do you mean by a line break?
Comment: Say I have 2 files:  one file has 3 lines:  cat1 is on the first line. cat2 is on the second line and cat3 is on the third line.  the second file has 1 line.  hat1.  how do i get it so that the merged file has hat1 on the fourth line, instead of cat3hat1 on the third line.
Answer: CMD has several commands you can use to accomplish this.

Type will show the contents of a file
>>textfile.txt will append the output to an existig file
echo. will print an empty line
FOR will allow you to execute one or more commands based on a set of criteria, such as all files in a directory

Using these 4 commands, you can construct a way to accomplish what you want.
If you do not want to automate this as it are only a few files and you are doing it once, forget about the FOR and do it manually. (much easier)
The command would be this:
type file1.txt >> newfile.txt
echo. >> newfile.txt
type file2.txt >> newfile.txt
echo. >> newfile.txt
type file3.txt >> newfile.txt
echo. >> newfile.txt

If you need to include a FOR the command would be this:
FOR %f IN (*.txt) DO type %f >> newfile.log & echo. >> newfile.log

Do note: if the newfile.txt already exists, it will only append to it, not create a new file. Delete the old first
EDIT: corrected for and changed name. tnx Techie007 for pointing that out.
Comment: Except it will include `newfile.txt` in the For loop. :)  Output to a different folder, or with a different extension.  Also, as-is this command doesn't work due to the `/F` option: `The system cannot find the file *.txt.`.
Answer: You can use the following command in dos
more file1.txt >> file2.txt
a blank line will get inserted after every file that is being merged,
this is useful when you have to merge a common file frequently.
further examples
more file1.dat >> output.dat
any extension with files that are of ascii characters can be merged and the original file will still be available unless you delete.
You can use the following command to merge and delete the second file.
copy file1.txt 00000.txt
more 00000.txt >> 11111.txt
del 00000.txt
you can merge any type of file extensions,
a blank line gets inserted after each file that is merged
commonly used extensions are .txt, .dat, .log, etc.,


Difficult probability with a Die

Question: Dirac and Pauli are playing a game with an ordinary six-sided die. Dirac's target numbers are
1, 2, 3, and Pauli's target numbers are 4, 5, 6. They take turns in rolling the die, with Dirac going first. If the one whose turn it is rolls a target number which he has not previously rolled, he gets to roll again; if he rolls a target number which he has previously rolled, or a number which is not one of his target numbers, his turn ends. The first player to have rolled all three of his target numbers (not necessarily all in the one turn) wins. What is the probability that Dirac wins?
Comment: Yes, that's wrong, since the other player will eventually have to go through the same "disadvantage" in order to win.
Comment: I haven't seen any effective methods to attack this question. To try to get some intuition as to what may be happening, I did a tree diagram, but i) the diagram becomes unwieldy within just 2 moves and ii) I realize it will never end, as there are scenarios where the players keep on rolling non-targets, though the probabilities of these scenarios decreases with each move. The first player to roll a target number disadvantages themselves since it becomes harder for them to roll a target number from then on, so Dirac's chances are probability less than 50%, but that may just be plain wrong.
Answer: If it is your roll and both players have already hit two of their targets, then write your probability of winning as $p_{2,2}$.  If you make your remaining target then you win; if you don't then your chance of losing becomes $p_{2,2}$.  So
$$p_{2,2} = \frac{1}{6} + \frac{5}{6}\left(1-p_{2,2}\right)$$
which you can solve for $p_{2,2}$.
Similarly if it is your roll you have already hit one and your opponent two, then your chance of winning is $p_{1,2}$ which (since you either hit or miss) satisfies
$$p_{1,2} = \frac{2}{6} p_{2,2} + \frac{4}{6}\left(1-p_{2,1}\right)$$
and if it is your roll and you have already hit two and your opponent one
$$p_{2,1} = \frac{1}{6} + \frac{5}{6}\left(1-p_{1,2}\right)$$
which are a pair of simultaneous equations you can solve for $p_{1,2}$ and $p_{2,1}$.  And the same techniques will work solving in turn single or simultaneous linear equations until you reach $p_{0,0}$, which is the probability at the start for the first person to roll.
Answer: I'm not going to give you the full answer, but this should get you on track.
Each player starts with three target numbers. When they roll a target number, it ceases to be one. So if $X$ is a geometric distribution with parameter 3/6, $Y$ is a geometric distribution with parameter 2/6, and $Z$ is a geometric distribution with parameter 1/6, then the number of rolls Dirac must make is a discrete distribution $D = X + Y + Z - 2$ (the $-2$ corresponds to rolling again when he hits one, and is essentially irrelevant). Pauli's distribution $P$ is identical. What you're after is $P(D \le P)$.
Comment: $P(D\le P)$, to be precise, since Dirac goes first. In fact, since $P(DP)$ by symmetry, we only need to calculate $P(D=P)$, which is a single instead of a double summation.
Comment: Oops; and nice observation.
Comment: I'm sorry to have to ask for more, but I haven't been able to deduce much yet. I have not done an undergraduate course in probability theory yet so I was unfamiliar with "geometric distributions". I took a read of the Wikipedia article, but I am still quite confused, especially by some notation. For example, if X, Y and Z are distributions, how do we add such things? I believe this question can be solved with just a freshman's knowledge base, so could you please rephrase your hint for someone of that level? Sorry for the hassle and thanks for your help.
Comment: @Bernard, I can't rephrase for a freshman level because I don't know what that is. I've never done an undergraduate probability course either; just A/S level statistics. Sorry.
Comment: Ok well I've probably been looking at this problem for too long tonight anyway, it's given me a headache. I'll read through the articles on Geometric distributions again tomorrow and I'll see if I can work through it with your hint. Thank you very much.

Difficult probability with a Die


Crash report log

Question: I'm an Android app beta user. I keep encountering crash on my Android phone. I rarely use the stackexchange app for more than 5 minutes without crashing.
In the Help page there is a sentence "Crash reports are automatically reported back to us." How can I get the log of crash report? I'm wondering whether all the forced close events I encountered are treated as "crash" and reported back or not.
Comment: @Emracool but no window came up.
Comment: If it force-closes and you're wondering whether it's being reported, just click the "report" button on the window that comes up.
Answer: Every single time the app crashes or becomes non-responsive, we automatically get told. There's no way for you to look at it yourself in the app and we're most likely not going to make one. If you use an app off the Play Store (for example, aLogcat) or the logcat utility if you have a developer environment, you'll be able to see it in your device's log.

Crash report log


Does GRE Tunneling support the Websocket Protocol?

Question: Just curious because I am going to use a GRE Tunnel that has a ddos filtered ip, then tunnel it to my main gameserver. My gameserver uses HTML 5 Websockets and port 9300.
Answer: GRE is a tunneling protocol at the network layer (OSI layer 3) and thus will transport everything above it, which includes TCP (layer 4) and HTTP (layer 7). And since WebSockets are just some kind of tunnel inside HTTP it will transport them too.
Comment: WebSocket is not *under HTTP*, because of HTTP limitation WebSocket is a *sibling* protocole, linked to HTTP for javascript applications. So WebSocket is a *TCP* protocol, as you rightly said: *which is, like everything, transported by GRE.*
Comment: @F.Hauri: WebSockets are established by using the Upgrade facility of a HTTP request. Thus WebSockets are essential a layer 4 protocol like Tcp inside a Tunnel created by a layer 7 protocol (HTTP). There are no WebSockets without HTTP first.


Hosting Nopcommerce Using Azure Website Shared plan

Question: I want to host my NopCommerce ecommerce site using Azure Website Shared plan. However it says for this plan it "include 240 minutes of cpu capacity per day". Anyone have any idea how many users will this be able to serve per day approximately? I am clueless
Answer: As this seems to be a commercial venture using the shared plan could cause unwanted, business damaging outages.
Some of the shared plan's limits (CPU, memory) can possibly be triggered by a short but intensive burst of requests. The required requests are significantly less than for a DoS which is kind of the worst case.
When a resource has been used over limit your azure website will be "switched off" until the calculation period for the limit has passed. For an online store scenario this would mean a significant service disruption.
Assuming that there are no unwanted or malicious requests at all, there is still no reliable way to guesstimate your resource usage from the information you provided. You would have to deploy the actual application with actual (or closely approximated) data, execute a large number of expected business transactions (e.g. start session, add to basket, checkout ...) and look at the resource usage the portal is giving you. Doing a proper performance estimation like that can even be useful for a reserved plan in order to determine the number of business transactions you can handle per instance per time before you have to scale up.


Sum of two correlated geometric Brownian motions

Question: Suppose $S_1$ and $S_2$ are geometric Brownian motions satisfying
$$dS_1 = S_1[\mu_1 dt + \sigma_1 dX_1], \qquad dS_2 = S_2[\mu_2 dt + \sigma_2 dX_2],$$
where $d\langle X_1, X_2\rangle = \rho$. One can check, using Ito's Lemma for instance, that $P = (S_1+S_2)/2$ follows the process
$$dP = \frac12(dS_1 + dS_2) = \frac12(\mu_1S_1 + \mu_2S_2)dt + \frac12\sigma_1S_1 dX_1 + \frac12\sigma_2S_2 dX_2.$$
This is a bit surprising to me, since I would have thought the sum is also a GBM with the appropriate volatility and mean parameters. Furthermore, we haven't made any use of the correlation condition. So, is it true that the sum of two correlated GBMs is a GBM? What about for three correlated GBMs (with the weights summing to 1)?
Comment: Any insights, anyone?
Answer: Seems like a sum of GBMs is not a GBM.
Note that GBM has lognormal increments, so our sum of correlated GBMs must have lognormal increments if it is GBM. The answer to  https://stats.stackexchange.com/questions/238529/the-sum-of-independent-lognormal-random-variables-appears-lognormal suggests that sums of lognormals are not necessarily lognormal, "not even for i.i.d. lognormals".


Why is equal temperament based on n-th root of 2?

Question: Why is Equal temperament based on defining the smallest ratio as the n-th root of 2, 2^(1/n). Or how did someone arrive at conclusion, that he/she/they must use 2? Is it because A5 is A4*2?
Comment: Musical pitch is not additive, but multiplicative if you check the frequencies, and that's why dividing an interval equally involves computing roots and not just division.
Answer: It's because the frequency ratio of the octave is 2:1. So to divide the octave into n equal parts, you take the nth root of 2.
So, essentially, yes: A5 = A4 * 2. And, more generally, XY = X(Y-1) * 2, where X is some pitch name, and Y is the octave designation.
Answer: The standard 2^(1/n) is based on the octave (a factor of 2), but 2 is just a choice. It's possible to define equal temperaments using other intervals, for example the Bohlen-Pierce scale which divides the twelfth into 13 equal parts: 3^(1/13).
If you compare music using the Bohlen-Pierce scale and the standard octave-based scale (and equal temperaments based on other than 12), you'll understand why the vast majority of music uses 2^(1/12).
There are other octave-based equal temperaments  that provide better approximations of just intonation, but they are not as practical or well-established as the 12-note scale.
Comment: "you'll understand why the vast majority of music uses 2^(1/12)": you can also understand this if you construct a scale based on the equal division of the fifth into seven semitones.  If you do that, the octave is 3.35 cents sharp.  It might also be worth mentioning that the 12-note scale was developed before equal temperament.
Comment: @phoog no, you wouldn't notice much if the octave is 3.35 cents sharp, that's too small of a discrepancy. With Bohlen-Pierce however, the closest interval to an octave is a whopping 30 cents flat. Basically, octaves should just be considered to not exist at all in BP... which is of course a rather tricky exercise for composers and listeners, since everyone is so used to having the octave as almost an identity relation.
Comment: On the other hand, if you spend a *lot* of time listening to good music in other divisions of the octave, you'll start to wonder why the vast majority of music uses 2^(1/12) after all. There are definite concrete advantages (accurate 5ths, reasonable major 3rds, not too many notes, ability to modulate key), but it's also a question of what your ears are used to, and other scales offer other possibilities.
Comment: @leftaroundabout you would notice it because of acoustic interference.  If you play A4 and A5 together you will hear beating at a rate of about 1.7 per second or 102 per minute.
Comment: @phoog no, except the most minimalistic, distraction-free contexts. The point where fine tuning actually starts to matter lies somewhere between 5 ct and 20 ct. The 12-edo fifths and the stretched octaves on a piano _are perfect_ for all practical intends. The 15-edo sharp thirds are borderline (but still usually accepted), but 30 ct is in a completely different category.
Comment: It's a pity that this VERY 'outside case' has attracted so many likes!
Comment: @leftaroundabout "except the most minimalistic, distraction-free contexts": if the tuning is precise, for example a single rank of organ pipes instead of large sections of string players, you will hear the difference even in the absence of distraction.  As to stretched tuning, if any two keys separated by an octave have to be stretched by some number of cents to sound like an in-tune octave then they would obviously have to be a few cents farther apart still in order to sound like they were 1203.35 cents apart. What is a "15-edo sharp third"? 5/15 = 4/12; 6/15 of an octave is closer to a 4th.
Comment: @Laurence no, it's a pity that good inventions like the Bohlen-Pierce scale have gotten so little attention as yet. This answer provides a contribution to amending this grievance.
Answer:
How did someone arrive at conclusion, that he must use 2? Is it because A5 is A4*2?

Yes.
More precisely, it's because "equal temperament" is shorthand for "equal divisions of the octave" in addition to the fact that the octave is a doubling of the frequency.

Why is Equal temperament based on defining the smallest ratio as the n-th root of 2, 2^(1/n).

The reason for the exponentiation is of course the logarithmic relationship between pitch and frequency.  If you picked some other base than 2, you would be dividing some other interval into equal steps.
For example, the acoustically pure major third is a ratio of 5:4 or 1.25:1.  You can divide that into four equal half steps with a ratio of 1.25^(1/4).
(If you do that then 12 of those half steps have a ratio of 1.25^(12/4) = 1.25^3 = 1.953125.  If you tune A=440 Hz in this system, the 12th half step above will be 859.375 Hz instead of 880 Hz.)
Answer: It is exactly because of that. Note that intervals are additive, while frequency ratios are multiplicative. If in an additive system you wanted to divide an octave in 12 equal spaces you'd divide the distance by 12. In a multiplicative system you'd rather take the 12-th root of an octave, which is the number x so that x^12 (which is 12 steps up) is an octave, which is 2.
If you want you can think of intervals as logarithms of the frequency ratios. Then 1 octave = 2, so the interval in octaves is the base 2 logarithm of the frequency ratio. Multiply this value by 12 and you've got semitones. In the other direction: To get from semitones to frequency ratios we need to divide them first by 12 and then take that power of 2. So 1 semitone is 1/12 octaves is 2^(1/12) frequency ratio is the 12th root of 2.
A different interpretation: Suppose you've got 12 different (just) semitones s1, ..., s12. Then we hope that these 12 semitones for an octave, so s1·s2·...·s12 = 2. Then the 12th root of 2 is the so called geometric mean of these 12 semitones, so a single interval that on average behaves the same way as s1,...,s12 multiplicatively in the sense that if you replace all s1,...,s12 by that interval the product of all does not change.
Comment: Thank you very much for your answer.
Answer: Doubling the frequency of a note puts it up an octave.   If A4 is 440Hz, the next A up (A5) will be 880Hz (and A3, the next one down, will be 220Hz).   Can we accept that as a given?  So that's why '2'.
You'll notice that the difference between A3 and A4 is 220Hz Between A4 and A5 is 440Hz.  We're multiplying here, not adding.
So if we want to have 12 equal divisions between A4 and A5, i.e. multiply the frequency by the same figure (call it x) 12 times, then 'x times x times x times x....(12 times)' needs to come out as '2'.   Or, in math language, x needs to be the 'twelfth root of 2'.
Answer: Short answer: Yes.
Long answer: Sound is a wave. Two tones with frequencies in a 2:1 ratio are, so to speak, the pair that's most in sync of all without being identical; the compound wave has the simplest possible profile that two different frequencies can make.
To a gradually but fast lessening extent, something similar can be said of other pairs where the frequency ratio is a fraction of two small numbers, and indeed, the ratio of 3:2 (or 2:3 going down) forms a fifth in Pythagorean tuning. But an octave, the simplest and purest of them all, is the uncontested queen of all musical intervals.
When we move on from Pythagorean to equal temperament, she shall not be dethroned.
Answer: This is a complex question of physics, human physiology, math, technology and history.

First, the physics part.

A lot of sound sources happen to generate a base frequency and its (almost integer or almost half-integer) multiplies.

Second, the human ears and the brain between them:

Consequently, human ears are quite precise at detecting these multiplies in order to attribute a complex sound to a single sound source. Sometimes, the base frequency is inaudible for one reason or another so we are equally good at detecting simple ratios as 2/3, 3/4 and so on.
This ability, in fact, dates well before we became humans. Most mammals have it as well (I am not aware of wider taxon featuring this, but it is quite possible that some birds have it, too).
Did you see the "almost" word above? Single sounds that are precise at these ratios sound pretty and sounds that deviate from them sound unpleasant. Going deeper into this is called "harmony".

Third, the math.

One can build a pitch scale by using the "natural" intervals (1:2 now called octave, 2:3, 3:4 and so on) and seed the intervals between them with additional fixed pitches based on whatever logic or aesthetics one may decide. Human ears are hard-wired for the small-integer ratios, the rest is "in between".

The history

Long ago, the collective music thinking came up with the Pythagorean scale (actually way older than its namesake). It had 8 intervals of unequal size, some of them good enough to put a half-tone between them, others - not really. Good for a lot of purposes, bad when one wants an universal, transposable instrument like a pipe organ or a piano.
After some tweaking, people arrived to the 12 equal temperament scale by fixing only the octave at an easy frequency ratio (1:2) and spacing the 12 intervals inside equally (ratio-wise). Some of the scale points went almost exactly at the Pythagorean points, others went somewhat off, but the overall result is good enough to be the base of the modern Western and far-East (Chinese) music.

Now, the caveats: 12 equal temperament scale is not the only one in use and itself is somewhat tweaked for one use or another. String instruments and vocals do what they call "intonation" and completely different pitch scales (e.g. microtonal ones, middle-East traditional music that uses equal-ish temperament scales with different number of intervals) do exist as well.
Comment: This doesn't address the question of why n-tone ETs use the nth root.
Comment: @Aaron: If one wants to have positive real values x, y, z, such that xyz=2, there are many xyz triples that could work, such as e.g. {1.25, 1.25, 1.28} but only one where x=y=z, and the value that would need to be shared among x, y, and z would be--*by definition*, the cube root of 2.  For an n-tone *equal temperament*, the note ratio must be the nth root of 2.  For an n-tone *unequal* temperament, an infinite range of sets of values would be possible.
Comment: @Aaron: If one wanted a three-tone scale, it's possible that the set of frequency ratios {1.25,1.25,1.28} might sound better than {cubert(2),cubert(2),cubert(2)}, if one started on the second note of the scale the frequency ratios would be {1.25,1.28,1.25}, violating the advantage of an equal temperament, which is that a scale which starts on any note should be equivalent to a scale which starts on any other note.
Comment: @supercat I don't mean to be obtuse, but I have no idea what you're trying to explain to me, and I get the impression you either didn't understand my comment here (the post doesn't address the original question), or you didn't ready my answer. Please explain what I'm missing.


Increase the logo size in lightning experience

Question: In salesforce lightning experience i've tried to change the logo size but it's not working it is appearing small in lightning pages. How can we increase the size?
Comment: What exactly did you try so far?
Comment: Follow steps from this link http://salesforce.stackexchange.com/questions/131986/change-salesforce-logo-on-lightning
Answer: As of Summer '17, I have not found an out-of-the-box way to increase the size. The App Manager is expecting a 45x45 pixels square image. If you use a non-square, then the longer dimension will max at 45px, resulting in the shorter side being very short.
UPDATE: Override global styles
I found a way around the square logo limitations. I added CSS to a custom Lightning Component and then added to the page via the Lightning App Builder.
This is the CSS you need:
Note that this needs to go in the .cmp file itself and not in the styles file of the bundle. Then you need to make sure this component is added to whatever page(s) load first when you load the Salesforce org.
This isn't a perfect solution, and you're definitely going to have some scenarios where people come in via direct links to some page that hasn't loaded this custom component, but at least it's a workaround.


What's the difference between Kd and IC50?

Question: What's the difference between the equilibrium binding constant ($K_d$) and Inhibitory Concentration 50 $IC_{50}$? They both seem to mark halfway points. Is the only difference that $K_d$ refers to any binding, whereas $IC_{50}$ refers exclusively to inhibition?
Comment: For a reversible inhibitor, the relationship between Ki and IC(50) will critically depend on the mechanism of inhibition, and IMO IC(50) values are at best misleading (and at worst meaningless).  Consider a (reversible) competitive inh: the IC50 value determined at a substrate conc equal to Km will be very different to that determined at, say, a substrate conc equal to 10-times Km.  There is a great [paper](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1152414/) by A. Naqui who explains this very well. For a reversible inh, IC50 only equals Ki if the mechanism of inhibition is non-competitive.
Comment: I have expanded on this topic ( a bit too much perhaps) in the section "Reversible Inhibition & IC50. A Brief Comment" of [this](https://biology.stackexchange.com/a/3250/1136) old answer.  For a much too detailed treatment of reversible inhibition, see [this answer](https://biology.stackexchange.com/a/58437/1136)
Answer: First, let's review the definitions of $K_d$ and $IC_{50}$.
$K_d$
$K_d$ refers to the dissociation rate at equilibrium and is calculated by $\frac{K_{on}}{K_{off}}$. This is the rate at which the peptide is bound to the target protein ($K_{on}$) divided by the rate at which the peptide unbinds or comes off the target protein ($K_{off}$). So when you look at binding curves, it's the 50% bound/unbound point on the curve (the inflection point).

$IC_{50}$
$IC_{50}$ indeed refers specifically to the inhibition of binding or inhibition of a function at which 50% of the peptide is bound and 50% is not bound (or 50% of the function is active and 50% is inactive).
Comparison
In some cases $K_{d}$ and $IC_{50}$ may be very similar values even identical, but in other cases $K_{d}$ and $IC_{50}$ values actually differ.
Pragmatically, $K_{d}$ values generally are considered more "constant" and vary less with changes in concentration of the target protein and peptide. They are more independent from the assay set up and type. In contrast, an $IC_{50}$ value can range depending on the assay set up (not considered constant values). For example, the $IC_{50}$ values in Fluorescence Polarization depend heavily on what "probe" molecule was used and the concentrations of the target protein and peptide.
Comment: (+1) [I am not the downvoter]
Comment: If Kd has dimensions of concentration (Molarity, say), shouldn't Kd be defined as k-off/k-on? (Kd will be the ratio of a first-order rate constant (k-off) divided by a second-order rate constant (k-on), giving overall dimensions of concentration. For example:  time^(-1)/( conc^(-1) time^(-1)), giving 1/conc^(-1), which is just conc


how user access page tables

Question: how will translation of address take place in user mode? if user has a separate page table, then where are these stored? Moreover, how will the user access page tables stored in kernel address space in a system having hardware page table walk mechanism?
Comment: I do not think user can work directly with those addresses and pages. User make system call to the kernel.
Comment: thank you for reply. actually my doubt is that if i am working in user mode, then how will the virtual address be translated  to physical address because in one of the links i read that page tables are stored in kernel address space and as per my understanding, user can not access kernel space. so how will the translation take place and how a hardware page table walker will walk the page table in this scenario?
Answer: The kernel sets up the page tables for each process. The mapping from virtual to physical addresses is done by the memory management unit (MMU) in hardware. This is done transparently to user mode code. User mode does not change the page tables, and they are only visible to the kernel.
The process's virtual address space is divided into areas with differing properties: some areas are read-only, some read-write, and typically most virtual addresses have no mapping at all. Access violations are handled by the kernel. For example, when a process accesses a memory location that has no mapping to a physical memory frame, an exception is raised . This exception (trap) is handled by kernel code, which can kill the process, send a signal to it, or the kernel can transparently create a mapping for the page.
Transparently (to the user mode code) mapping a page can happen because the page has been swapped out. In this case the so called page fault handler maps the page to a free physical RAM frame, and arranges for the page to be read in from swap space. When the page has been restored, the process is scheduled to run again, and the process can continue execution as if nothing had happened.
Comment: Thanks for replying. So what you are saying is that the page tables for user mode are stored in kernel address space and they are read only for user mode????
Comment: The page tables are not accessible (i.e. not readable) at all from user mode, and user mode does not need to access them. Memory management is handled transparently to user mode, you don't need to include code in your application programs that handles page tables. The situation is the same as with process scheduling: scheduling is handled by kernel invisibly to the user mode program. The idea is to provide resources like CPU and memory to processes as if they were the only running program on the machine.

how user access page tables


Hyundai Accent starting issue

Question: My car started fine a couple of days ago and today when I went to start it, it won't even turn over. The lights work, the battery is only a year old. Not sure where to check next.
Any suggestions???
Comment: Do the dash lights light up?  Do you hear any relays clicking when you put the ignition switch in the start position?
Comment: all the lights work, there is some very soft clicking not much
Comment: It sounds like the starter solenoid when bad. The clicking you hear is probably a relay for the solenoid.
Answer: You indicated above that there is 'soft clicking' when you try and start the car. My bet is a weak battery - you can still have headlamp power, but not enough charge in the battery to turn over the engine.
Try this, turn on the headlamps and have someone stand in front and observe the lights as you turn the key to start - if the headlamps dim way down, it's most likely a weak charge of the battery.
You can also just go ahead and try and jump it - it won't hurt anything if your battery is charged.
Also check your fuses - there will be a large fuse (~20 amps or more) for the starter.
Answer: I don't think the it will be a flat battery, since a flat battery will usually caused a repeated clicking of the starter solenoid and a flickering of the dash lights when you turn the key.
Either the contacts on the relay you can hear clicking are faulty, so there is no power getting to the starter solenoid, or the control wire on the starter solenoid has disconnected, or possibly the starter solenoid is faulty.
If you can identify the starter relay in the fuse box, you could try swapping it for an identical one.
Check also that the thin wire is securely connected to the starter solenoid on the side of the starter motor.
You could try connecting a wire directly from the battery positive terminal to the small control connector on the solenoid to see if it then operates.  Make sure the car can't move if you do this.

Hyundai Accent starting issue


Using Paper under review as a Scientific Report in PhD application

Question: I have submitted a paper at a conference and it is currently under review. Can I use this paper as a 'scientific report' (asked to assess candidate's writing skills) for a Ph.D application ?
Answer: So long as this is for an internal evaluation process that doesn't involve any form of "publication," it's hard to see how this could be a problem. You retain rights as the author of a paper, especially if it hasn't been published.
If you have concerns over whether it is allowed, you can always ask the conference organizers if it's acceptable. On the other hand, if you are concerned whether the department you are submitting to will accept it, ask the department.
Answer: Submit it as a preprint in ArXiv and cite the corresponding document (I am assuming it has the minimum quality to be submited here). Producing preprints is a good practice (specially for countries with limited access to co$tly journals).
In my opinion: do not cite "submitted to TOP JOURNAL" papers. Only Tyche knows what is going to happen with that submission (e.g. maybe the referee is your arch enemy).
Comment: I believe this is more of a "writing portfolio"-type submission to establish the candidate's abilities, not a demonstration of publishing record.


how to store the data for function f(time,length)

Question: I have a function which has discrete time step ,discrete length from origin . These two give height of the function. For example at time 1.2sec , and length 5.5cm from origin height is 10cm. The step size of time is 0.4sec and length step size is 0.5cm. How to store this, I cannot use 2D array with time and length as indexes because those are floating point numbers , which is best method to store this kind of data?
Answer:
I cannot use 2D array with time and length as indexes because those are floating point numbers

Since you're using discrete time [and length] step[s] with fixed step sizes 0.4sec and 0.5cm, you actually can use an integer-indexed array. For f(i,j), i~time, j~length, just calculate time = time0 + i*dt, where time0=0 (or any origin you like), and dt=0.4 (as per your post). And similarly for the length dimension. And note that both functions are easily invertible in case you need to find the indices corresponding to a given time,length (you also might want to write an interpolation function between i,j points).
Comment: @MokkaNaresh By "unknown" I assume you mean "not easily computable", i.e., just a bunch of (time,length,height) triples that are input.  Then I'm not sure about "only"; not sure about "best", either. Lots of approaches you could program, depending on the exigencies of the situation, e.g., how much input there is, how frequently you have to access it, etc. Not too much input that's accessed frequently might suggest a different approach than lots of input accessed only a few hundred thousand times.
Comment: what if the step size is unknown! , is the hash only one that can be used to store ?


What would be the grad program for studying Paralegal in the US?

Question: What would be the grad program for studying Paralegal in the US?
Answer: In the US, there isn't any standard- there are associate's, bachelor's, and master's degree programs for paralegals along with shorter certificate programs.  There are also professional certifications that you can take a test for.
If you really want a master's degree, there are lots of programs offering a "Master's in Legal Studies" for paralegals.
Comment: Thank you, so these Master's degree is designed for NON-Legal / Lawyers to do this program ???
Comment: They're not law degrees.  It wouldn't surprise me if an immigrant with legal training from another country took one of these programs and became a paralegal in the US.
Comment: Thank you Professor, very helpful


Why "di" in "Un bel di, vedremo"?

Question: I was wondering why "di" is translated as "day" in English in "Un bel di, vedremo"?
Comment: Note that many literal word representations for English speaking audiences, coming from foreign languages, often miss important aspects such as the accented "ì" of "dì" (a literary form of "giorno" - day - in Italian) , which is very different from the normal "i" of "di" ("of"), since English only uses basic Latin characters, except for the rare case of language borrowings (mostly coming from French), like "rosé", "déjà vu", etc. This is unfortunately common for lyrics and music terms that traditionally originate from European countries, using languages that require diacritical marks.
Comment: It's also important to notice that most English readers, not being used to care about diacritical marks, often underestimate or ignore them. The case of "i" is peculiar, because the accent is even more difficult to notice for people that are not used to these aspects. Interestingly enough, the most commonly used accent in Italian is the grave one \` (often called "backtick" when used standalone), usually found at the end of oxytone words ("pietà", "caffè"), indicating an *open* vowel; but "i" is a *closed* vowel, so it could theoretically be written as "dí", unlike the accepted rule of "dì".
Answer: Because the correct spelling is Un bel dì vedremo, dì with the accent,  not di.
And dì in Italian means day.
See
https://www.treccani.it/vocabolario/di/
Di without accent is the preposition:
https://www.treccani.it/vocabolario/di1/
Comment: Ho capito. Grazie mille!
Comment: You are welcome!

Why “di” in “Un bel di, vedremo”?


Is there any way to make yourself invisible to mobs on Minecraft?

Question: I'm playing a technic mod pack and it has orespawn on it. Well I'm trying to steal from the ore tree but the queen keeps aggroing on me no matter where I go. I know its supposed to be difficult but is there any way to make myself untargetable by the queen even if its only for a brief second?
Answer: Mods are kind of a sticky topic when trying to answer a question mainly because we don't know exactly how yours work because they differentiate from one another so drastically. But, from what I know there are many solutions to mobs in traditional vanilla minecraft which could be a solution to your problem.
Option 1
Make a potion. Many potions are provided in minecraft to help the players traverse around or eliminate problems. For example, create an invisibility potion to bypass particularly sticky situatuations, in your case, the queen.
Option 2
If at all possible kill the queen using your resources, throw her off a cliff, kill it with fire, smack it with your sword, poison it, killing an annoying mob is better than to sneak around it or ignore it.
Option 3
You can also most likely make the queen unable to reach you, for example, trap it in a pit, use your surroundings to your advantage.
Option 4
Lastly, you could cheat to make your way through. Though, this reduces from the game's quality you can use console codes to make yourself invisible to the queen.
In conclusion, use your smarts to try and outwit or kill the queen to obtain your loot, and if it must be resorted to, use console commands to get your loot. Hope this helped.
Comment: When using an invis. potion and you're carrying something (eg. weapon, wearing armour) there is a chance the mob can see you.


growth scale for entire functions?

Question: I came across this while reading Ya. Levin's book. Let $f$ be an entire function and $r>0$. Define $$M_f(r)=\mbox{max}_{|z|=r}|f(z)|\;.$$
One can express $f$ in power series as
$$
f(z)=\displaystyle\sum_{n=0}^{\infty}c_nz^n~,~~\displaystyle\lim_{n\rightarrow\infty}\sqrt[n]{|c_n|}=0\;.
$$
He asks the question whether $M_f(r)$ can grow arbitrarily fast. This is a nice question, but where would you begin to try to investigate this?
Answer: Take any sequence $z_n$ with $|z_n| = n$, and any sequence of positive numbers $v_n$.  Find a sequence of polynomials
$p_n(z)$ such that $p_n(z_n) = v_n$, $p_n(z_j) = 0$ for $j < n$, and $|p_n(z)| \le 2^{-n}$ on $\{z: |z| < n-1\}$.  Then $f(z) = \sum_n p_n(z)$ is entire and has
$M_f(n) \ge v_n$.

growth scale for entire functions?


How to know if model is overfitting or underfitting?

Question: I understand that using cross validation we can validate our model, but it is also possible that maybe our model is underfitting; hence, providing wrong results. One possibility that I can think of is that if even after making our model less complex results are not right then our model might be underfitting, it is just a guess!

Please write if anything I am missing or any other way to decide whether our model is overfitting or underfitting?
Answer: You can determine the difference between an underfitting and overfitting experimentally by comparing fitted models to training-data and test-data.
Typical graphs:
a

b

c

d

These plots will show you the accuracy of the model, as function of some parameter (e.g. 'complexity'), for both the

training-data (the data use for fitting)
and test data (data kept separate from the training phase)

One normally chooses the model that does the best on the test-data. If you deviate then for...

For underfitting models, you do worse because they do not capture the true trend sufficiently.
If you get more underfitting then you get both worse fits for training and testing data.
for overfitting models, you do worse because they respond too much to the noise, rather than the true trend.
If you get more overfitting then you get better fits for training data (capturing the noise, but it is useless or even detrimental), but still worse for testing data.

After performing these steps, you should remain in sight that, while you may have selected the least underfitting/overfitting model out of your options, this does not mean that there would not be some other better model.
In particular: the true model, might be an overfitting model in circumstances of high noise-signal ratios (see  https://stats.stackexchange.com/a/299523/164061 )
Comment: The first plot seems to show error over training time.
Comment: @Tim Training time makes a model (e.g. an artificial neural network) better in fitting the training data (increases complexity) but not necessarily the testing data. Thus it is related to overfitting vs. underfitting.
Comment: More direct approach: use a proper accuracy scoring rule (log-likelihood, etc.) to compare the simple model with a model that generalizes the simple model.  This assesses adequacy of the simple model.  If it's not adequate, it's underfit.
Comment: @FrankHarrell log-likelihood may not always be straightforward to express. For GLM and such things with clearly expressible error distributions it is, but beyond that?
Comment: Log-likelihood and Bayesian counterparts are available in any fully-specified statistical model.  This is related to efficient pseudo R^2 measures and AIC.
Answer: A sign of Underfitting could be when the accuracy of the test and training are very similar. The way to "fix" it and through "tuning".
If you are trainning a NN you could increase the number of training cycles, on the other hand, if you are working with traditionalML, for example a Logistic Regression, you coudl try to tune certain parameters(that come by default) of the algorithm that leas to a better perfomance of this, in the case of Logistic Regression it would be changing the differente values of C
i.e
signal of underfitting, then I tune my model
<code># default
logreg = LogisticRegression(solver='liblinear', random_state=0)
</code>
worst performance, discard it
<code># instantiate the model
logreg001 = LogisticRegression(C=0.01, solver='liblinear', random_state=0)
</code>
it improves performance so I keep it.
<code># instantiate the model
logreg100 = LogisticRegression(C=100, solver='liblinear', random_state=0)
</code>


Coaxial cable test with VNA to estimate Wave Velocity and Attenuation

Question: I'm doing a lab course concerning microwave measurements, during which I'm supposed to test an open, short and 50 Ohms terminated coaxial cable. The cable is connected to a VNA at the S_11 port and for each cable type, the phase as well as the magnitude (in linear and log scale) were being measured in the frequency domain. The task is to estimate the wave velocity in the cable (and from that the cable length) as well as the attenuation. I assume this is a really basic problem but I'm completely new to the field of electrical engineering, so I'm stuck at how to start. All I found is that the velocity can be estimated using the phase/ the "period length" of the phase since obviously it has a periodic behavior.
Answer: With the far_end shorted, the VNA will show a notch (or peak) at some frequency proportional to the length.
The depth of the notch, or height of the peak, indicates attenuation.
From what I recall of such measurements (discussed in the literature or the equipment manuals), an OPEN is easier to achieve than a SHORT. The SHORT needs 0 inductance, which is impossible given the finite length of wire needed to short the center pin to the shield.
Thus your instructor probably wants you to learn about that (small distance, but not zero) SHORT as an error source.
Have fun.
Comment: Short is easier than open. Just slap a metal surface across the reference plane. Opens have fringing capacitance that needs to be characterized and corrected for. At least in coax, this is much worse than the inductance of a short standard. In other geometries (that OP didn't ask about) the parasitic of a short might be comparably problematic to those of an open.


how to get zoomed in images of tiny seeds with phone camera?

Question: I have some tiny seeds on a plate that I want to take pictures of, and I want them to appear big in pictures so I can identify them at the same time, covering the whole or at least half of the plate. I can put them under the microscope and get pictures of them, but my field of view gets very small, and I can only take pictures of hardly one square cm. Is there any way I could do it with the phone camera? I have tried Keywing's 20x macro lens and other lenses, but you need to be at a distance of 1 inch, and it covers a very small portion of my plate that contains seeds. I have attached a picture of a plate containing seeds (this is a full zoomed-in picture from an iPhone 8, even though bigger seeds are recognizable, but the smaller darker seeds are different types that you can not tell from this picture) and a picture of how I see them under a microscope (I was not able to add the picture). I don't need microscope-level magnification, but enough that I can tell small seeds apart.
enter image description here
Answer: You cannot have high magnification and large field of view simultaneously... so what you want is a compromise. And that's not something add-on phone lenses really offer.
You can have a higher resolution with a wider field of view, which allows zooming in more to see more detail. But that requires lenses better than generally available for a phone, and more importantly sensors that are not overly diffraction limited. Most cell phone cameras (like your iPhone 8) are operating at/very near their diffraction limit, even at max aperture.
So a phone camera isn't really a great choice for this. You might be able to do better with a more current phone with a higher resolution camera, more zoom, and/or macro function (i.e. iPhone 13 or 15). But a compact camera with macro function may still be the better/cheaper choice (i.e. olympus TG series)
Comment: You would need quite a good camera to get sufficient resolution over that field of view. But it's doable. Also good bright even lighting to allow you to optimise the aperture
Answer: On Amazon, order "close focusing monocular, about 25 dollars. This monocular will provide magnified views of the seeds. Adjust the view you see through the monocular that satisfy your needs. We are talking zoom amount and focus. Now place the eyepiece of the monocular over the lens of phone camera. Take a few shots, within a few minutes of practice you will be taking good magnified images of these seeds. This technique is called "afocal photography".
As an alternative, purchase a 10X Hasting Triplet jewelers loupe. This is a pocket magnifier thirty dollars. Place the loupe over the phone camera lens and compose and shoot.
The Hasting Triplet Loupe functions as a super close-up lens. This works flawless.
Comment: Expect vignetting when using the 10x magnifier. (Don't ask me how I know!)
Answer: Try a scanner:
If it's really just about having an image of these seeds (for documenting them etc.) and getting the focal length right for all of them, then the easiest way to get really nice high-res images is with a scanner.
Leave the lid open and use in a dim room to get a nice pitch black background; close the lid if you want a white background OR put some paper on the seeds so as not to crush them.
I accidentally discovered this technique in high school (more than twenty years ago) -- you can do some really creative stuff with it. But I recently heard somebody using a scanner on the Frames photography podcast. Can't remember the artist's name of episode though.
Edit:
Found the artist. The name is Robert Schultz.

Here's his website.
And here's a link to the Frames episode.


Is there a way to use CLI wallet non-interactively?

Question: I want to run a script using the cli wallet. I know can use the --password and --command arguments to the cli, but sometimes the wallet will still prompt for input (passwords/confirmation etc.). Is there a way to configure the wallet to avoid this when running a non-interactive script?
Answer: If you can predict the questions you are expecting the command to require an answer to, then on Mac/Linux you can simply pipe in a list of answers. E.g.
monero-wallet-cli < echo -e "response1\nresponse2"

However, this could be brittle if changes are made to monero-wallet-cli. The best option is therefore to use the Monero RPC interface, and to use something like jq to extract fields from the response.
Comment: I guess this could work. As far as I can see, however, I cannot be sure which answers are needed. For example, the `refresh` command sometimes requires password and sometimes not.
Comment: @PyrolitePancake yes that's a good point. The right way to do this is with the RPC interface. Most people performing automated tasks would want the wallet running in the background all the time, so that when it's time to make a transaction, they don't have to wait for a refresh before they can create their transaction. There is nothing to stop you temporarily starting the RPC listener just to execute a few commands, at which point you can shut it down in your script.
Comment: You could make use of `set ask-password 0` to disable password prompts on an opened wallet. Also you can make use of the linux tool `expect` to script monero-wallet-cli, but the most sensible thing is to use monero-wallet-rpc.
Comment: I guess wallet-rpc is the _right_ way to do it. Its just a shame because the wallet commands are a simpler to use.
Comment: Btw. I had to do `echo -e "response\n" | ./monero-wallet-cli` to have this work.


How does Google App Engine remote_api work

Question: As I understand it, and I may be wrong, but GAE's remote_api allows one application to access another application's datastore. I'll be blunt I don't understand how this works. I have read the article that everyone likes to point to, but I still don't understand how you can link two applications. Can someone explain it to me, perhaps with a small example or just point me to a tutorial that does this?
Answer: Think of remote_api as a remote shell to your own application. You're not linking two different applications together — there is no way to do that AFAIK — you're just communicating with a single application using a local shell. Your commands are sent over HTTP to a little handler running on your application, which then executes those commands in your app and returns the results. You need to enable remote_api in your app.yaml to get that handler running.
Comment: For future reference, it's better to post App Engine questions on Stack Overflow. In fact, Stack Overflow is now the official support channel for GAE.


How to show temporal difference methods converge to MLE?

Question: In chapter 6 of Sutton and Barto (p. 128), they claim temporal difference converges to the maximum likelihood estimate (MLE). How can this be shown formally?
Answer: The convergence and optimality proofs of (linear) temporal-difference methods (under batch training, so not online learning) can be found in the paper Learning to predict by the methods of temporal differences (1988) by Richard Sutton, specifically section 4 (p. 23). In this paper, Sutton uses a different notation than the notation used in the famous book Reinforcement Learning: An Introduction (2nd ed.), by Sutton and Barto, so I suggest you get familiar with the notation before attempting to understand the theorem and the proof. For example, Sutton uses letters such as $i$ and $j$ to denote states (rather than $s$), $z$ to denote (scalar) outcomes and $x$ to denote (vector) observations (see section 3.2 for example of the usage of this notation).
In the paper The Convergence of TD($\lambda$) for General $\lambda$ (1992), Peter Dayan, apart from recapitulating the convergence proof provided by Sutton, he also shows the convergence properties of TD($\lambda$) and he extends Watkins' Q-learning convergence theorem, whose sketch is presented in his PhD thesis Learning from Delayed Rewards (1989), and defined in detail in Technical Note: Q-learning (1992), by Dayan and Watkins, to provide the first strongest guarantee or convergence proof for TD(0).
There is much more research work on the convergence properties of TD methods, such as Q-learning and SARSA. For example, in the paper On the Convergence of Stochastic Iterative Dynamic Programming Algorithms (1994), where Q-learning is presented as a stochastic form of dynamic programming methods, the authors provide a proof of convergence for Q-learning by making direct use of stochastic approximation theory. See also Convergence of Q-learning: a simple proof by Francisco S. Melo. In the paper Convergence Results for Single-Step On-Policy Reinforcement-Learning Algorithms, the authors provide a proof of the convergence properties of on-line temporal difference methods (e.g. SARSA).
Comment: @RémyHosseinkhanBoucher I'm not sure whether I fully read the 1994 paper, and, if I did, it was already a few years ago, so I don't remember the details and I can't confirm that's the case. I had read Melo's paper though. Anyway, thanks for pointing this out. Regarding your question, now, I don't remember the details of the proofs  to tell you if they mention anything about the "convergence to the MLE". I would need to read them again. Let me know if you figure out anything about this issue.
Comment: @RémyHosseinkhanBoucher Yes! Are you referring to Belief MDPs? Basically, you treat belief states as the states.
Comment: Notes by Francisco S. Melo are deeply inspired by the paper On the Convergence of Stochastic Iterative Dynamic Programming Algorithms (1994) I think ! Nothing about "Likelihood" however?
Comment: By the way, I have seen an article saying on your blog MDP are PO-MDP. Reciprocally, PO-MDP can be transformed into MDP but with larger spaces! see p. 96 from Adaptive Markov Control Processes - O. Hernandez Lerma


Is it possible to charge a panasonic HDC SD900 while filming?

Question: On this camera, the battery can only be charged inside the camera. So I cannot charge one battery while using an other.
My only alternative is to charge while I film. Can I do that?
Answer: Yes, you can.
I first asked the question on a youtube video reviewing the camera. And I got the folowing response:

Yes, it works. You can do anything while charging.

Now, I have bought the camera and tried it myself, and I confirm that Yes, is it possible to charge a panasonic HDC SD900 while filming.
Answer: I don't know on this exact model, but if it has a dedicated power port, then it should be able to charge while filming.


Why does benzene have a D6h point group?

Question: I understand the fact that the molecule has a principal axis of rotation of C6 however when following the point gorup flow chart why is the answer to the second question NO when it contains two C3 axis? Hence the answer should be a YES right? (I understand the molecule has C2 axis as well)
Comment: Only different axes count.
Comment: Also, you chart seems to miss the groups $T,\;T_h,\;O,\;\text{ and }I$.
Comment: As @IvanNeretin stated - There's rather 1 C6 axis, than 2 C3 axis
Answer:
Does it have two or more $C_2$ axes with $n>2$?

This question is asking if there is more than one $C_{n>2}$ axis not if there is more than one $C_{n>2}$ symmetry operation.
Yes, benzene has some $C_3$ operations. However, as pointed out in the comments, the $C_3$ axis lies along the $C_6$ axis - both run through the center of the ring perpendicular to the plane of the molecule. This axis is also a $C_2$ axis. There is only one $C_{n>2}$ axis - it just happens to be both a $C_6$ and a $C_2$ axis. All other rotation axes in benzene are $C_2$.
Comment: While reading https://www.nature.com/articles/srep25670 I double checked the definition of $D_{6h}$ and this question came up in a search. While it's not related to benzene *per se* the following question in Math SE is about graphene-like [xene materials](https://chemistry.stackexchange.com/q/123524/16035) and probably requires an understanding of symmetries to address. Any thoughts or recommendations? [Determining if a coincident point in a pair of rotated hexagonal lattices is closest to the origin](https://math.stackexchange.com/q/3705547/284619)


integrate a .net application with alfresco using cmis

Question: How to integrate a .net application with alfresco ?
How cam cmis be used to do the same?
Answer: You can use Apache Chemistry DotCMIS to perform perform CMIS requests from your .net code. The API is very similar to the Java OpenCMIS API, so you can then find a tutorial on using OpenCMIS to talk to Alfresco and do largely the same thing with DotCMIS.
If you're new to CMIS, then Apache Chemistry provides a very handy overview on their site.
Answer: The example at http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/source/sample/WcfCmisTest/ should get you started with C# , CMIS and Alfresco.


Flex - databinding from a Tree to a Repeater

Question: I'm trying to make an XML questions editor in flash.
Basically I load in the XML into a Tree component - XML like so:
<questions>
<question id="1" type="radio" text="This is question 1" isBranch="true">
  <option id="1.1" correct="false" text="This is option 1" />
  <option id="1.2" correct="false" text="This is option 2" />
  <option id="1.1" correct="false" text="This is option 1" />
  <option id="1.2" correct="false" text="This is option 2" />
  <option id="1.3" correct="true" text="This is option 3" />
  <option id="1.4" correct="false" text="This is option 4" />
</question>
<question id="2" type="check" text="This is question 2" isBranch="true">
  <option id="2.1" correct="true" text="This is option 1" />
  <option id="2.2" correct="false" text="This is option 2" />
  <option id="2.3" correct="true" text="This is option 3" />
</question>
</questions>

So that goes into the tree. On change I get a list of the options for the selected question (item..option) - and that XMLList is passed into a (custom) component.
That component (not sure if this is the best way to go about it but still...) - has a couple of Repeater controls - one which is bound to the XMLList for a radio question, the other bound to the XMLList of a cheque box question.
Each repeater loops the number of options, placing a TextInput in (to edit the option text) and either a radio or cheque box (depending on the question type)
So - what I am after is when the text is edited for an option, the XML in that TextInput is bound to the XML which is the dataProvider for the tree. So for example if "This is option 1" is changed to "This is option Foo" - the Tree updates with that.
So far my repeater (eg. for the radios) is like this
<mx:Repeater id="repeaterRadio" dataProvider="{optionsListRadio}">
  <mx:TextInput width="359" id="radioText"
     editable="true" enabled="true" text="{repeaterRadio.currentItem.@text}"/>
  <mx:RadioButton id="radioArray"
    data="{repeaterRadio.currentItem.@id}"
    selected="{repeaterRadio.currentItem.@correct=='true'}"/>
</mx:Repeater>

No binding works - all I get here is warnings like:
warning: unable to bind to property 'text' on class 'XML' (class is not an IEventDispatcher)

I sort of get why this is the case, but am at a loss how to go about binding the data the user can edit back to the source xml. I know I can make the tree itself editable but that's not really an option here.
So any pointers or ideas would be very appreciated!
Answer: I think there are two classes that might be able to help convert the XML into a bindable object, and then reconvert back to XML when the user is finished, mx.rpc.xml.SimpleXMLDecoder and mx.rpc.xml.SimpleXMLEncoder
Answer: Just replace repeaterRadio.currentItem.@text with XML(repeaterRadio.currentItem).@text.


Pass same value to different text in drop down WFFM SItecore

Question: I want to pass same value for different text items in drop down. But drop down "value" field is only accepting unique values.
When I open Data source field of WFFM sitecore "drop list" item and give the source of items.
Answer: This is standard behavior, value should be unique for DDL.
You can create custom DDL and keep DDL's items inside page content as datasource.

In below screenshot choose Sitecore items. Here each item has key, value fields. We can set same value for key field for multiple items. This will be fulfill your requirement.


Remove a horizontal top strip on all pages of a pdf file

Question: I have a pdf file which contains some three lines of text on the top of every page.  Is there any way to remove that 2cm horizontal strip from all pages of this pdf file using any command line tool.  I am using ubuntu.
Comment: Why not remove the text instead of resizing the page? Or is it part of an image? Mind posting it?
Comment: I don't have the incovation handy, but I have done things like this using tools in the ImageMagick suite, which does handle PDFs.
Comment: It is an old scanned book.  May be it was published in 1904.  Its size is 220Mb.   It has some dark ugly borders due to scanning.  I want to trim them to save some Mb and to have a neat copy.
Answer: PDFjam should be able to do it. It should be installable on Ubuntu with sudo apt install pdfjam. Then, move into the directory containing your PDF files and run:
for f in *pdf; do pdfjam --keepinfo --trim "2cm 0mm 0mm 0mm" --clip true --suffix "cropped" "$f"; done

That will create a cropped copy of each pdf file in the directory, where file.pdf becomes file-cropped.pdf. If you are satisfied those are correct, you can move them to a new directory (mv *-cropped.pdf newdir/) and delete the rest.
Comment: Sorry for delayed response and thanks for the reply.  I have only one file I tried using  --trim "0mm 3cm 0mm 0mm" option but the result was still each page had white space.  I am editing my Question with the results.


How often should the air filter in the furnace be changed?

Question: Does the period of change of this air filter have an affect on the longevity of the heating and a/c system? What is a good rule of thumb to require replacement?
Comment: Can someone answer this in *runtime hours* rather than in months? I run my furnace about 15× as much in January as I do in October, and not at all in the warm months, so the typical "every _n_ months" normally given don't make much sense to me. Thanks!
Comment: I change mine when it looks quite filthy.
Comment: Also, my thermostat, like a lot of digital thermostats, keeps track of the number of hours the furnace is run. So that's easy.
Answer: Dirty filters not only make the HVAC equipment not last as long, but the low air flow makes them less energy efficient. A dirty furnace does not conduct heat into the air as well and the dirt sticks to the fan blades making it not last as long or spin as easily.
There are two main types of air filters:
The 1" thick ones that look like this:

And the 6" thick filters look like this:

(source: filterscanada.ca)
Generally the 1" filters are good for a month or two. The 6" thick ones are good for 6 months.
There are also 2", 4", and 5" filters available but generally not at the local hardware store. Some folks who have 6" filters use a 2" + 4" filter and replace the 2" one every other month and the 4" once a year. This seems like a hassle to me, but it might save you $50 a year if you have 6" filters.
Comment: My furnace manual says that I should replace my 4" filter once a year.  My local furnace repair guy says to go by that, but the filter gets filthy enough after about 6 months that I feel the need to just replace it then.  :-)
Answer: The rule of thumb is every 3 months but it does depend on the filter and your air quality. And yes, if you don't keep the filter clean it will shorten the life of your unit and could cause other problems like a frozen coil (where the air handler coil freezes because there isn't enough airflow).
I like to use the cheap air filters as they allow the best airflow. Some units are made for the better filters but those can cause more problems than the solve.
Answer: It depends on the filter.  Go to Lowes or Home Depot and they will have a chart with the different filter qualities and the recommended length of time they can be in service.  In general, the cheapest filters that cost only a couple of bucks have to be replaced once a month.  As you go up to more expensive filters, you can replace them every 3 or 6 months.
I currently buy the ones that need to be replaced every 3 months.
Answer: 1-2 months for a 1" filter, and 6 months for a 6" filter is a good rule of thumb. However, that is for average conditions in an average home. You may want to check yours more frequently if you have any pets since fur will tend to dirty up the filter quicker, and reducing the filter's usable life.
You can also compare a new one (or photo of a new one that you took before putting it in) with the current one to determine how "bad" or "dirty" the current one looks. If it looks bad, change it.
Answer: If you install a GeneralAire G99 Air Filter Gage, it will tell you exactly when your air filter needs to be changed. It can be found for < $20 online. I don't have one, but I've thought about it...
After doing a bit of research, I've decided to change mine every 3 months. I don't use the cheapest filters, but I don't get the incredibly expensive ones, either.
Answer: i would say that rule of thumb must be different for different places. e.g if you're living in industrial area like where you have alot of pollution in the air , you must go for change before the time mentioned in the manual but if you're living in healthy environment like well planned societies than it could lasts more than specified time. In short you must check the quality of the filter time to time.