(ask) XOR calculation issue on file in java

Question: I would like to execute XOR operation in my code. However I have strange behavior on the output. Sometimes the result is right but sometime it's not.
Here's the situation:
I have file which I already split into two parts and then I created one parity file using xor operation on both file (source files). So now I have three files. Then I deleted one of the source file. I would like to retrieve the missing file within xor operation between parity file and the remaining source file regarding the missing file. I am using hash function to check whether the output is correct or not. If the function is called only one time, everything is fine, but whenever I have many operations to retrieve the missing file on other files, sometimes my function generates the wrong result.
When they generate the wrong results, it's always generating the same file. BUT if I put thread.sleep for 1 second, they always generate the correct result even if I have more than 1000 operations.
Could somebody help me to spot which part of my code is broke?
<code>private byte[] parityByte(byte[] firstByte, byte[] secondByte) {
    int size1;
    size1 = firstByte.length;

    int size2;
    size2 = secondByte.length;

    byte[] parity;
    parity = new byte[size1];
    for (int i = 0; i < size2; i++) {
        parity[i] = (byte) (firstByte[i] ^ secondByte[i]);
    }
    for (int i = size2; i < size1; i++) {
        parity[i] = firstByte[i];
    }
    return parity;
}

/**
 * get original chunks
 */
public Chunk getOriginal(Chunk parity, Chunk compare, String orig) throws FileNotFoundException, IOException {

    File par = new File(parity.getHash());

    InputStream parity = new BufferedInputStream(new FileInputStream(parity.getHash()));

    InputStream source = new BufferedInputStream(new FileInputStream(compare.getHash()));

    int size = (int) par.length();

    int bufferSize = size;
    byte[] firstBuffer = new byte[size];
    byte[] secondBuffer = new byte[size];

    long remainSize;
    byte[] destByte = new byte[1];
    parity.read(destByte, 0, 1);
    Integer dest = new Integer(destByte[0]);
    remainSize = size - 1 - dest;

    OutputStream originalChunk;
    originalChunk = new FileOutputStream(orig);

    while (remainSize > 0) {
        if (remainSize > bufferSize) {
            remainSize -= bufferSize;
        } else {
            bufferSize = (int) remainSize;
            firstBuffer = new byte[bufferSize];
            secondBuffer = new byte[bufferSize];
            remainSize = 0;
        }
        parity.read(firstBuffer, 0, bufferSize);
        source.read(secondBuffer, 0, bufferSize);
        originalChunk.write(parityByte(firstBuffer, secondBuffer));

    }
    originalChunk.flush();
    parity.close();
    source.close();
    originalChunk.close();

    Chunk tempChunk = Chunk.newChunk(orig);
    return tempChunk;
}
</code>
Thank you
sorry for my bad english.
Answer: You are assuming that all the reads fill the buffer. Check the Javadoc. The read(byte[] ...) method returns a value, and it is for a reason.
Have a look at DataInputStream.readFully() for a simple solution.
Comment: Thanks @ejp but using DataInputStream.readFully() still doesnt work.


connected QHD monitor to laptop using HDMI, resolution limited to FHD

Question: I have a laptop (MSI GE60) with FullHD screen and I want to connect this with a QHD monitor (2560x1440), but when I connect by HDMI I have FullHD as max possible resolution. I don't know how to set the UHD resolution. OS Windows 8.1. Any ideas?
Comment: Thats because windows knows your monitor, he doesnt know anything more than it. Like mine I have a Geforce GT 640M LE which is quite powerful and can render UHD too but look at this: http://upload7.ir/uploads//f9bb892891d542020404f1b1c662e107b24334aa.jpg
Comment: I need Windows :)
Answer: That's the maximum resolution that machine can output over HDMI.
See http://service.msicomputer.com/msi_user/support/TechFAQdetail.aspx?formid=3076
Comment: Uff i have MSI GE60 2OC
Answer: This could be the HDMI cable. You'll need at least a High Speed HDMI cable to support this resolution. Standard speed cables only support resolutions up to 1080p.
Comment: Still not work...
Comment: Not just the cable. All parts need to support it. Laptop, cable and monitor.
Answer: A lot of monitors using HDMI 1.x have the resolution limited to FHD when receiving the image data through their HDMI port.
A workaround for this problem is using displayport (if the laptop has it) or an HDMI-to-DVI cable where you connect the DVI-part to the monitor. But make sure you use a Dual Link cable for this (DVI: 24 + 1 pins), because a Single Link (DVI: 18 + 1 pins) is limited to 1920x1200 which is again lower than the native resolution of your monitor.


How to change a single character in an excel formula for 1500 rows

Question: I have over 1500 rows of information with formulas such as, ='3'!$AH$6 , where each column contains information from another sheet within the workbook. In the example, the sheet labeled '3' is referenced. Is there a way to change only the reference to another sheet for all 1500 rows at one time? For example change the formula to ='4'!$AH$6. I only need to change the reference to another sheet as the cell references will stay the same. I hope this makes sense, thanks for any help.
Answer: There are several ways to do this

Use VBA » ALT+F11 to insert and ALT+F8 to execute this little macro
This has the benefit that you can insert even invalid references (e.g. the reference will be there only on another PC or in the future) without a update data dialog for every cell
If you want, you can select single columns with columns("A:A") instead of usedrange
Sub replace()
 Application.DisplayAlerts = False
 For Each cell In UsedRange
    cell.Formula = replace(cell.Formula, "='4", "='3")
 Next
 Application.DisplayAlerts = True
End Sub

Use Excel find & replace function » CTRL+H and search in formulas.
Select your columns you want to alter before you open the dialog
Answer: You can select the cells you'd like to adjust and use Ctrl+H to replace 3 with 4.
Since the formula has no other 3s, this easy trick should work.
Answer: Just erase the Cell data on all rows, edit just the first line and then copy the formula over the rows pulling the cross, on the bottom right corner of the cells..
You edit the first cell, then pull a cros of this cell, located at the right bottom corner, pull it to the row you want (in case, pull it down to the row 1500)


Ajax web application framework

Question: I'm about to start a new web application project and am looking for advice about what technologies to use and how.
I've used ASP.NET webforms in my previous work, but this time I want to use Ajax to prevent the continual need for postbacks which would not suit the complexity of this application.
Essentially, the UI will have an interface similar to a traditional Windows application, for example a main view which will occupy the browser window and numerous modal dialogs which I'll display over the main view.
I suspect this will lead to a hugely complex and difficult to maintain application unless I'm able to componentize the project and load these components dynamically. For example, load the dialog HTML and script dynamically, on demand.
Is there an Ajax / web application framework out there that would support me in this approach? I'm most comfortable with ASP.NET so an approach centred around that would be preferable.
Answer: Perhaps you may have a look at GWT. Mainly, this is java that is compiled into HTML + Ajax.
The client interface is component-oriented, and many concerns of ajax development are managed by the framework.
Unfortunately, I don't know of any equivalent in the .Net world.

Ajax web application framework


Fan control GPIO settings

Question: I have several Raspberry Pi 4 with a case that includes a fan. I connected the red cable to 5v Power(Physical/Board pin 4) and the black cable to GPIO 14 (Physical/Board pin 8). I setup raspi-config to turn on fan at 60 and use GPIO 14. When the temperature goes higher than 60 degrees, I notice the GPIO gets triggered, but the FAN doesn't spin. If I connect power and ground the fan spins. I would really prefer to make a config change and have to unmount and take apart 8 Raspberry Pi.
GPIO 14: level=1 fsel=1 func=OUTPUT pull=NONE
Comment: https://learn.pimoroni.com/tutorial/sandyj/getting-started-with-fan-shim Check this on here..Nice way around
Answer: You should NEVER connect a GPIO to an inductive load.  Eventually you will destroy the GPIO and the Pi.
You should NEVER connect a GPIO to a voltage outside the range 0 to 3.3 volts. Eventually you will destroy the GPIO and the Pi.
A GPIO can only supply (source or sink) about 20 milliamps at 3.3 volts.  Nowhere near enough to power a motor even if it was safe to do so.
Comment: Thanks for that. If I had external power and relay switch for the power, is there a way to configure it?
Comment: @nyitguy Yes, using a relay (or just simply a transistor) is the common way of powering a fan. You'll find lots of tutorials on how to wire that up. I'm a bit confused that your housing does not include the relevant electronics (or at least a description on how you should do that)
Answer: I endorse joan's comments.
It is simple to control a fan with inexpensive circuit.
See https://raspberrypi.stackexchange.com/a/105820/8697
See https://docs.google.com/document/d/1bxIzUXLXdrtTo7DwAYv8maLeBssYau4nWwyeAAjot-0 for a picture of my module.
Comment: I know it's super simple but do they sell the pieces needed already built? I have a total of 8 to do.
Answer: When you use raspi-config to configure a GPIO to control a fan, you get the message "The fan on GPIO xx is enabled and will turn on at yy degrees".
That means, the GPIO will go high. So the fan would have to be connected to the GPIO with it's red wire, and the black wire would go to ground.
But, as one of the other answers says, the GPIO might not cope well with the inductive load. Also the GPIO going high will mean it will be at ca. 3.3V, which is not enough to make a 5V fan spin.
So what you need to do is add a circuit with resistor and transistor, as found elsewhere. E.g. see the circuit found in this (german language) tutorial.
Answer: you need a PWM fan mate...
the third wire goes to the GPIO.

Fan control GPIO settings


Simpler, Cleaner Inline Links [JADE Preprocessing]

Question: I wish to write the following simple html in Jade:

Nevertheless, you can read his stuff on his nameless blog as well as on the Voice college blog.

An ugly, long, error-prone way of doing this is:
p Nevertheless, you can read his stuff on his nameless
    a(href="blog") blog
    |  as well as on the
    a(href="voice") Voice
    |  college blog.

Is there an easier / simpler way of writing this? Thanks
Edit: Please ignore the code highlighting colours as they have no significance.
Answer: The quickest way is to break out of jade and into markdown, see more here: Jade: Links inside a paragraph


how to create partitions in ubuntu after installing

Question: I have installed ubuntu 14 in lenovoG50 80, after installing win 10 and installed it by erasing the hard disk completely by choosing an option from installing menu. After installing , I am unable to see disk in my home page.I want to do partitions and use it like in windows.What to do for it?
Comment: Use gparted. It's in the Software Center, if it's not already installed. Also try `gnome-disk-utility`/Disks. And first you installed win10, it erased everything, and then you installed Ubuntu 14.10?
Answer: You should use gparted for that, it's just like diskmgmt yet more powerful utility for disk partitioning.
BTW can you explain your situation with more details, you might not know English well because it's pretty hard to understand what you've written. I believe you're trying to dual boot Windows 10 & Ubuntu. Follow this guide.


How to generate fake postback with javascript?

Question: I have Dropdownlist on my page and its selectedindexchanged method created in code behind file (.cs).
I wanted to create fake postback with A tag (onmouseover event).
First i viewed source of html.
<select name="ctl00$cpholder_ana$ddlFaturaNolar" onchange="javascript:setTimeout('__doPostBack(\'ctl00$cpholder_ana$ddlFaturaNolar\',\'\')', 0)" id="ctl00_cpholder_ana_ddlFaturaNolar">
    <option selected="selected" value="CHOOSE"></option>
    <option value="001926">[ 30.04.2009 - 156.492,00 TL ]  001926</option>
</select>

Then, I copied
onchange="javascript:setTimeout('__doPostBack(\'ctl00$cpholder_ana$ddlFaturaNolar\',\'\')', 0)"

And, I created A tag with mouseover event(to make Postback but as it fired by Dropdownlist)
asdasdasdasdad

But it didn't drop to SelectedIndexChanged method.

First, WHY?
Second, How can i do this?

Thanks from now.
Answer: You can use this code snippet -
__doPostBack('<%= dropdownlist.UniqueID %>', '');

You can't use hard-coded unique ids because they may change due to many reasons. For e.g. the id will change if the parent control's id changes, etc. You will have to get the UniqueID rendered from the server side using the code like the one given above.
EDIT: Forgot to mention one important thing. The page will postback only when the selectedIndex of the dropdown changes :) So, if you want to fire that event, change the index of the dropdown list using this and then call the __doPostBack code -
document.getElementById("<%= dropdownlist.UniqueID %>").selectedIndex = 1;
__doPostBack('<%= dropdownlist.UniqueID %>', '');

EDIT2: Adding upon what Bob said, you can make use of hidden server controls. I suggest you use a asp:Hidden control and hook up its OnValueChanged event. So, whenever you want to post your page back to the server, you just have to change the value of your hidden variable. This way you won't have to use a hidden button.
document.getElementById("<%= hiddenField.UniqueID %>").value = (new Date()).getTime();

Comment: I changed to: asdasdasdasdad     But it doesn't work.
Answer: I am sorry to say guys
__doPostBack is not working for DropDownList but it is working for Button. So do one thing
Add a button which should be followed like this

<asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
  <asp:ListItem Text="All" Value="0" Selected="True"></asp:ListItem>
  <asp:ListItem Text="Published" Value="1"></asp:ListItem>
  <asp:ListItem Text="Pending" Value="2"></asp:ListItem>
  <asp:ListItem Text="Rejected" Value="3"></asp:ListItem></asp:DropDownList>

now call your __doPostBack method
__doPostBack('<%= btnRefresh.UniqueID %>','');

Answer: Another option you can try, which I find easier and is like likely to break, is to create a hidden (style="display:none" don't use the visible property) asp:Button on your page. When you want to post back you can just simulate the click on that button
 document.getElementById("<%= Button1.ClientID %>").click();

If you want to stick to posting back on the drop down, make sure the AutoPostBack property of the dropdown is still set to true. Just keep in mind this behavior is a little strange, you are firing a selected changed event on a mouse over. Not only is this a little confusing, you also are increasing the risk of accidental postbacks, as it is very easy to mouse over something and expect nothing to happen.
Answer: Is it not <%= ddlFaturaNolar.ClientID %>?
Comment: ClientID doesn't work for buttons, etc. So its better to use UniqueID for every control.
Comment: Okay, then ignore my answer. :-)


How can Sasuke's Sharingan erase Jiraiya's memory?

Question: In the Boruto: Naruto Next Generations - Episode 136 Crossing Time!, Sasuke uses his Sharingan to erase the memory of both Jiraiya and Naruto since they have learned things they shouldn't which can disrupt the timeline. Since Genjutsu won't affect Jiraiya, how did the Sharingan's ability erase Jiraiya's memory?
Answer:
How can Sasuke's Sharingan erase Jiraiya's memory?

Tampering with people's memory, although not necessarily with genjutsu, is definitely a thing in Naruto's world: for instance, in Naruto manga chapter 247 Sasori claims to have a few sleeper agents whose memory he had previously concealed; films and anime have used this trope a few times to mantain consistency of fillers with the main storyline. So it isn't surprising to learn that sufficiently powerful genjutsus can erase memories, and we may as well take Jiraya's nonchalant claim that this is possible as an in-world declaration that it is possible.

Since Genjutsu won't affect Jiraiya, how did the Sharingan's ability erase Jiraiya's memory?

The premise is false: it's never been stated that Jiraya is immune to genjutsu.


Can peaceful former-pets turn hostile?

Question: As I was exploring Gehennom, I lost a couple of balrogs and vrocks when I fell through a trapdoor and couldn't get back to them in time to prevent them from going feral. I've yet to find polycontrol of any sort, so I'm unable to become a demon to retame. They are all peaceful, but the weakest is still 160 hp, and all are well-equipped (making them formidable, yet killable).  I don't particularly need them anymore, so I'm wondering if I just leave them be, will they stay peaceful (particularly, after I get the Amulet and have to pass their level with Rodney on my tail)?
Answer: If your former pets have gone feral but remained peaceful, then they'll stay that way as long as you don't attack them (deliberately or by accident).  Of course, they may still block your path, or get in the way of your ranged attacks, and they can attack you (even while remaining nominally peaceful) if you're wearing a ring of conflict.
The behavior of abandoned pets will depend on their tameness.  Basically, a pet left on another level will lose one point of tameness after 75 turns, and every 150 turns thereafter.  If this would reduce its tameness to zero or below, then it will stop being your pet when you next enter the level it's on, and it will be either peaceful or hostile depending on how long it was abandoned.*
The exact chance of the former pet being peaceful, as opposed to hostile, is (former tameness) / (total tameness lost while you were away).  However, once the former pet has gone feral, it's just another monster, and no further tameness checks will be applied to it.  So if it's peaceful now, it will not become hostile on its own.

*) As a special case, if the abandoned pet would've starved to death while you were away, it will turn hostile instead.  There's a comment in the source code saying that this is to avoid such pets instantly dying of hunger on their next move.  However, this check is made after the tameness check described above, so it only applies to pets that still have positive tameness left.  Thus, a bit paradoxically, a starving ex-pet with (at least) one point of tameness left will turn hostile when you return to its level, but leaving the same pet alone long enough for its tameness to drop to zero will cause it to turn peaceful instead.

Can peaceful former-pets turn hostile?


EBS backed EC2 instanced stopped, different when started again

Question: I've had an EC2 instance for about a year running a LEMP stack. This week I tried adding a server block to NGINX and weirdness happened. For reference I ssh in as ubuntu, and have never to my knowledge logged in as any other user.
First:
After configuring the server block for the new site (site2.com), testing the conf and restarting NGINX, site2.com showed a file I know I made quite some time ago, but I couldn't find it anywhere. I grepped the heck out of the instance, no sign of the file, and it was definitely not in the site2 root directory or /var/www/html. During this time site1 was working fine.
Second:
In the process of trying to figure this out, I stopped NGINX, confirmed site1 went down, but site2 was still pointing at the file I couldn't find. I tried cacheless refreshes, firefox -> forget site, tried chrome, etc, fairly certain it was not a cached thing. I listed the running services, but didn't see anything the would act as a web server.
Third:
While trying to hunt down the issue (starting to get a little desperate over the ghost file) I looked at iptables, which I never altered (I use UFW), but it was suggested on a blog of forum or whatnaught. I flushed them, and shortly after that puTTY froze up and kicked me off. I tried aws instance -> stop and then start, and then the real fun began.
Fourth:
After the instance was running again I tried to ssh in with puTTY to no avail, the system wouldn't accept the key file. I ended up having to remake the ppk file, and then was able to get back in, but everything was different. All the configuration, all the installed programs, all the relevant files are now missing like the ghost file site2 was serving, but in a horrible twist, the ghost file is now very happily sitting in /var/www/html as if it had never not been there.
df -h shows the drive is holding 4.5G of data, but trying to find that data didn't get me anywhere. I'm also being told there is no "No space left on device" when I try an apt-get update.
Any suggestions at this point are welcome.
Answer: Turned out I have two instances running under the same aws account. One was set up under the free trial they give you. I then went through lightsail to set up the system that I actually use. I didn't remember that, and the lightsail server doesn't show up on the AWS console.


My fish tank still smells a little of vinegar

Question: Is it ok to put my fish back in the tank after I've cured the silicone but it still smells a little of vinegar?
Answer: Looking at the chemistry of condensation curing of silicone, that vinegar smell is literally coming from a chemical bond being formed -- the smell is a byproduct. You have to remember, acetic acid (the stuff in vinegar) can either evaporate or solublize in water. There's also a special salt in the silicone that is necessary for it to form a solid structure, and this salt is also soluble in water.
If there is any vinegar smell, that means it's still setting/curing/evaporating, so by no means should you add your fish just yet (unless you're ok with acidic water for your fish and potential holes in the silicone)

Picked up at FishLore Forum:

Generally speaking, silicone takes:
1-2 hours to get a 'skin' (go off)
24 hours to set and seal (safe for showering)
48 hours to set, seal and bond (safe for immersion in water)
7-10 days to be fully cured, ready for use in a full fish tank. Most tank builders will require the tank to stay 'still' and clamped for 7 days before moving it. After 7-10 days, the silicone is strong enough to handle the pressures and movements.
I recently bought some silicone, and it had a clear guideline on the back "If using for an aquarium, allow 7 days before filling" or something like that.


Full wave bridge rectifier

Question: Where should the ground be placed in a full wave bridge rectifier ? I mean if the ground was placed at one end of the load resistor, then won't the other diode (which would be forward biased in one cycle) that leaves from that point( point of contact of the resistor and ground) be cut off since that diode is not having a forward voltage of 0.7 volts ?
Comment: Briefly, no. You can put ground wherever you like. Voltage is relative.
Comment: Thanks for commenting. That was a new knowledge for me that u could put ground anywhere in the circuit. Thanks :)
Answer: You cannot have a common ground between input and output of a bridge rectifier (or you will short out diodes and Bad Things will happen).
So, ground either the input or the output or neither, depending on safety and other requirements, but never both.
Comment: Good answer. I really appreciate that answer. Thanks Spehro Pefhany :)
Comment: Agreed!  I blew the circuit breaker in our part of the building by connecting the on-board ground with my laptop's ground via a programming header.  Lesson learned!

Full wave bridge rectifier


As a beginner in trading, I would like to know types of online trading to avoid

Question: Which types of online trades are haram? I would like to know under which basis trading for stocks, and similar types of trading are haram.
Comment: Can you finetune your question to one topic at a time? it will be easier to answer.
Answer: You should try to, if you are going to trade, avoid risks. If you are pretty certain, then I do not see why it is 'haraam'. If you are not certain, then it is like gambling, which IS haraam.
Forex trading is the trading of currencies. Again, I would look to the prior advice. If you are not certain that you would gain, do not do it as it would be counted as gambling.
Options trading is gambling. There isn't really a way to see it as halal. It honestly is just a person saying thy will sell something in the future at this price, or buy something in the future at this price. It is gambling.
Cryptocurrencies are digital currencies. Saying that thy on their own is haram is like saying that the US dollar, the Euro and the GBP is haram, it's not. Its what you do with them that is halal/haraam, likewise for most things. They become haraam with your intention on what to do with them. If you see it as a more secure way to store money, or a good way to pay online for things, then that is halal. If you would like to gamble with it, or loan off with interest, that is haraam.
I am NO scholar. I am infact a recent convert/someone who became more religious in the past month or two. I am only saying things based off of my view/interpretation of the Hadith, Quran and Sunnah.


How to do unit conversion on a Terrain dataset?

Question: I was wondering if there is a way to change the elevation units of a Terrain dataset (from example from meter to feet)?
Comment: Not that I know of. In tools like Contour_3d you can set the Z factor (multiple) to convert metres to feet or feet to metres. A terrain takes on the spatial reference of the dataset that it resides in, so if the Z units of the dataset are metres (default) then the terrain will be in metres, if it's feet then the terrain units will be in feet.
Answer: I am not sure if this would apply, but instead of changing the values, could you just change the display.
See if this will help you...check Ryan K's answer.
Setting default units for Shape_Area to be Acres using ArcGIS Desktop
Comment: Thanks for the thought, but I think that does not work for me. I am trying to intersect the topo with some water surface elevation TINs (created from water surface elevation values on riverine cross sections) that are in feet. I could change the water surface elevation values on the cross sections to meter as a workaround though.


Can I save image created in PowerPoint as a printable vector?

Question: I was asked to create a logo to be printed on a large number of t-shirts for an event. I designed the logo in PowerPoint using text, shapes and a .png image. The people from the printing company said that they need it in vector format (corel, adobe illustrator or editable pdf). I exported the logo as a .emf / .pdf file, but they say the image is still bitmap and they need it in vector file. Is there a way to export the image from PowerPoint so that they can print it?
Comment: Did you add any text effects like glow? If all you did was write text and or place objects without effects and exported to a PDF. Then the graphic will be in vector format. If you apply effects, then they might be rasterized. I am not sure if all effects get rasterized, I just tested with outer glow.
Comment: I do not mean to be rude but that process is **totally wrong**; the usage of power point, a png. If it is a large event, it would be a lot better if **a profesional designer design the T shirt, or a large number of T shirts will be wasted**. A good design is an investment.
Answer: While EMF and PDF can both be vector formats, you say that your logo contains a PNG image. PNG is a raster image format, so when you export to PDF or EMF, you'll have a vector image with an embedded PNG. This is probably the issue your printer is having.
You cannot simply convert a raster graphic like a PNG file to a vector graphic by saving it as a vector format. You will need to either 1.) re-create the PNG aspects as a vector or 2.) use an application like Adobe Illustrator to trace it.
If you are looking for a free program for vector graphics, I'd recommend Inkscape. Inkscape does have limited tracing abilities, although your mileage will vary depending on your image.
[I feel that I have a moral duty to tell you that PowerPoint is not for drawing things. PowerPoint is for making dreadfully boring slideshows with cheesy star-swipe transitions and clip art circa 1998. Use the appropriate tool for a job. Use Inkscape, Illustrator, or even LibreOffice Draw to make your logo; use PowerPoint for the Annual Q4 Sales Working Group Planning Meeting presentation.]
Comment: Actually powerpoint is probably the most used vector drawing program out there. Ive seen many a fine drawing made with powerpoint. Offcoure it lacks cmyk mode and users of powerpoint rarely know what they are doing, which ruins many works, not PP itself. Not that i would use it because it has a horrible scaling problem. But overall it works fine as long as you distill PDF files (And do not use native export) and actually know what your doing, by which time you either avoid it or simplify your workflow. PS: you can paste artwork from PP to illustrator directly and vice versa
Comment: @joojaa you are right that PowerPoint *can* be used for good drawings, and my assessment is a bit tongue-in-cheek. A good designer can make good work regardless of the tool, in the same way that a good wood-worker could make a nice chess piece out of a block of cedar and a flat head screw driver. Just because you *can* do it doesn't make the tool any more appropriate.
Comment: I agree with Scribblemacher. Power Point is a presentation tool. It may be possible to draw with it, but the point is, it's not a design tool.
Comment: What other reason is there? I mean i made a font with a text editor, because I can. I draw 3D objects in illustrator (instead of any of my 3D cads that would do the same in quarter of the time) because i can. I build my own screencapture software and pedal because i can. It do t have to make sense. ;)
Answer: If you design a vector image in PowerPoint using tools like text and shapes, as long as you do not apply any shadows, blur, gradient, beveling, etc, you can export as a PDF and it will export as a vector.
Any effects you apply are exported as raster. Without effects, your PDF can be opened in Inkscape (free) or Adobe Illustrator and edited like any other vector graphic.
Also please note that your PNG is a raster graphic, and if you used it in your design, this part of your logo will not export as a vector.
Answer:
I disagree PowerPoint is not used for drawing. I created these characters using PowerPoint, using the Line tool and other shapes, adding the background from Pixabay.


Can EVs charge from solar panels directly?

Question: Going to leave my car in an outdoor parking lot for a week, and it made me curious. Can I attach a small solar panel (<100W) to the inside of any modern EV such that there is a higher state of charge when I come back?
Comment: Welcome to Motor Vehicle Maintenance & Repair! You state "any modern EV", which makes this a VERY broad question. Every EV manufacturer, I'm sure, does their charging differently. Saying "every" as a prerequisite makes it highly unlikely. Secondly, the input rate of EVs is very high in comparison to the "<100W" you're suggesting. Might the 100W do something? Sure, it might provide another 100 feet of travel in the vehicle (if it can take the power at all). Realistically, it's not going to do much, though.
Comment: @Pᴀᴜʟsᴛᴇʀ2 "any" means "does there exist?" so I'm just looking for an example, not a list.
Comment: Some new Hyundais have solar roofs, which have 0.2kWp, and can add 2.5 miles of range per sunny day. Not much, but also not nothin'. Who knows if the added cost, weight, and complexity are worth it, though! https://techcrunch.com/2022/03/23/hyundai-sonata-hybrid-roof/
Comment: Fisher Ocean has a solar roof, which is claimed to add "up to 1,500 … miles per year" (4 mi/day) https://www.fiskerinc.com/ocean
Comment: Back when Toyota came out with the Prius, there was supposedly an aftermarket solar panel you'd glue to the roof of it to give you an extra 10% range. Didn't hear too much about it for too long, though. I thought it would be ingenious to have something like that. I'm surprised Tesla hasn't incorporated some of the solar cells to such a task on their EVs. If you could add an additional 10% of range onto them by just adding the cells, seems like it would be a huge win.
Answer: A Tesla supercharger maxes out at about 250kW.
Your 100W solar panel is a 250th of the power, so assuming you can work the adapters required (unsure if this is possible - probably need to create an inverter circuit) the Tesla-quoted 15 minutes for 200 miles of charge would be just under 3 days for 200 miles of charge.
Realistically, it isn't going to happen. You need more current! You need more power!
Comment: The charging plan Rory states assumes 100% output from the panel for the duration of "just under 3 days", which is unrealistic. You'd get that much power over *3 days worth* of charging, which could take DAYS to complete. You also have losses in the vehicle while it's just sitting, due to the systems used to maintain the vehicle. I mean, I walk by some Telsas in the garage at work and they light up. The sensors which stay active to detect these things and then what it takes to actually light up the vehicle all incur losses.
Comment: Why do I need more current or power? The car is going to be parked for multiple days. Taking multiple days is, in fact, the whole point of the question. Do people only charge Teslas at a Supercharger, or do they also charge at home on a 1.8kW circuit?
Comment: remember, whatever circuit you build will have losses - you can't just "push electrons in" - you'll need to build something to present the charge in a way the car can accept
Comment: You need to talk about KWH not KW.  A Tesla car stores 50-100 KWH of power. A 100W solar panel makes 0.1 KWH/hour.
Answer: In theory this could be done.  But in practice there is no way to plug in a PV panel to any currently made EV.  I suppose if you were creative enough you could design and build an interface but it's not going to be trivial.
So the answer is effectively NO, you cannot do this.
Even if you could do it, the contribution of your 100W panel is going to be insignificant.  The smallest Tesla battery is a 50 kWH unit and I'm not sure they actually make any of those.  So assuming you are someplace very sunny and you get 12 hours of sunlight that maxes out your panel at 100W.  That will give you 1200 WH of energy every day.
That amounts to a paltry 2.4% of the total charge in the battery.  Now in reality there is nowhere on earth that gets 12 hours of "noon" sunlight so you are more likely going to be in the range of less than 1% charge per day.
Answer: Honestly the answers above are quite good but I mean to answer this in a more general matter and say that there are hybrid cars specifically designed with this idea in mind. You can see one example here https://www.eproinn.com/en/life-save-en/ but you have to realize that the batteries of a hybrid vehicle are significantly smaller than an ev and there a lot of circuits and design specifications under the hood to enable a charge boost with lets say 8 hours of sunlight.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Asterisk Bridging/Answering Late Causing Failure w/AMD

Question: My problem is that Asterisk seems to be answering the phone just a bit too late after the "Hello?" for the AMD functionality to work right, i.e. the AMD comes in on the silence and the person has to say hello again for it to know there's a person there.
We've tested it using IAX via a softphone and see more or less the same delay upon answering so we're assuming it's the Asterisk configuration.
I have more or less a vanilla Asterisk install. We are initiating outbound calls via SIP through a local provider. I'm using the "Manager" portion of the Java Asterisk API to tell Asterisk to make the call and then the Java Agi API to deal with it.
The SIP portion of the config looks like this (sip.conf):
<code>[my-sip-trunk]
disallow=all
allow=ulaw
allow=alaw
allow=gsm
host=<ip to our provider>
type=peer
canreinvite=no
nat=never
</code>
The data I send via the Manager to Asterisk looks something like this:
<code>Channel:  SIP/<phonenumberhere>@my-sip-trunk
Context:  MyContext
Extension:  100
Priority:  1
Caller ID:  <caller's caller ID>
</code>
In my extensions.conf I have the appropriate info and-- solely for the purpose of this demonstration-- only a couple of commands:
<code>[MyContext]
exten => 100,1,Answer()
exten => 100,n,Background(beep)
</code>
What happens is I pick up the phone, have time to say, "Hello?" and have the beep occur shortly after I finish speaking.  The beep tells me when the AMD would have started listning-- but since it's past when I started speaking it will only hear silence.
Does anyone have any ideas where/how I've misconfigured Asterisk to have this delay?
Answer: SIP call progress analysis is notoriously fickle (it basically doesn't work).
What I've had to do in the past is use a SIP proxy that analyzes the audio in-band, and then passes the result back to Asterisk.
Check out Sangoma Call Analyzer.


Joomla 2.5 GZIP compression error

Question: This is completely annoying...
I have enabled gzip compression in Joomla system configuration
I have also enabled gzip compression in the htaccess file...
But every time I test http://ganeshgrow.es in websites like GTmetrix or Google Insights, they tell me that the 70% can be compressed for a better perfomance...
So...?
What should I do?
Answer: You are compressing the main html Joomla output and files delivered from your site. However, your site may be including more files from other sources.
To debug it, you can inspect how your page loads network resources, with Firebug or Chrome dev tools (F12), to detect uncompressed assets.
Comment: Mmmm I don't understand exactly what I have to do
Comment: You have to check all http headers, of all loaded assets from your page, to discover what is not compressed.
Comment: You mean this: http://gyazo.com/0dc92758a9782b9bc7a955bbc2950089 ??
Comment: You have inspect network activity (look for Content-Encoding header). For instance, with Firebug http://getfirebug.com/network
Comment: I have gzip, but if i check it with a tester, it tells me that i dont have it enabled
Answer: There are quite a few things you can do.
For starters, have a look at the information that GTMatrix provides you:

Serve scaled images. When using images on websites, make sure they are always scaled down to the minimum size you need. You should also saves images as Web Version which simply means the quality is slightly reduces but the so is the size of the file, and drastically too. If you have Photoshop or Gimp, then make full use of them.
Defer parsing of JavaScript. If I rightly remember, you're using JCE Optimize, which has the option to defer your Javascript.
*Leverage browser caching. For more information on how to improve this, have a look at this
Combine images using CSS sprites. When using a CMS, this can be quite hard as most of the images will belong to other extensions, however, again, with JCE Optimize, there's an option to convert all images into a sprite, so try enabling this option.
Avoide CSS @import. As you may notice from the results, some of your CSS files are using @import url('URL HERE');. Instead of doing this, CSS files are better off being imported through the  tag.
Comment: When I enable the CSS sprites option from JCH Optimize, the CSS of my website breaks. It happens the same when I try to put all my css/js files in just one... and I'm sure the website is slow because of all the files it's trying to load... So... I really don't know what to do
Comment: I have been thinking... My website is probably slow because of the JS files that it's trying to load BEFORE page does... So... what about moving all the js files to the bottom of the page...? I can't move it with JCH Optimize, because I can't compress the js files. It returns me an error... So I downloaded ScriptDown plugin... and when I press F5... http://gyazo.com/d2b4ff043774cb52967df85b12aca1fc
Answer: Your web server must also be configured to allow this. If it doesn't have mod_deflate installed then no matter how many times you ask it to gzip the output, it isn't going to.

Joomla 2.5 GZIP compression error


What type of Azure configuration should I use for a MongoDB deployment?

Question: I keep running into a lot of different competing information on what type of VM and where the data should be stored for a MongoDB deployment in Azure.   When reading over the D series VMs it specifically mentions using the local SSD to store the data.   I had started to go down this route but stopped the VM and started it 20 minutes later and everything in the local SSD was gone.  So now I am looking at using a DS series VM but don't know how many IOPS the OS Disk has or if I should attach a striped disk. There seem to be no good tutorials on how to create a striped disk in Azure and none of the web tools allow you to create one.
Answer: As you have noticed the SSD in the D series is intended for temporary storage only, its great for transient data but not if you want to persist anything. If you want storage performance you would need to use premium storage to attach to the VM, which will persist. Storage speeds are listed below:

If you want to stripe multiple LUNS together then you can, but you will need to attach these as separate volumes to the VM, and then use either disk management or Storage Spaces (storage spaces will likely give slightly better performance) to stripe them inside Windows. You can't configure a stripe at the fabric level.
Answer: D just provides a local SSD for the ephemeral disk, whereas regular VMs provide a local spinning one.
Any of the Premium Storage VMs (like DS) let you attach a less local SSD for persistent storage. This is the starting point for your strategy. You can attach more disks if you want to have a striped volume, for example RAID 0 on Linux. The actual volume creation is an operating system function, not Azure's.
Another part of your strategy is the caching policy, both at the Azure level as well as the operating system level. The Using Linux VMs with Premium Storage section of the documentation covers some important points on thar regards.


How to configure the environment for AMS-tex?

Question: I installed the Miktex, Winedt, and Texmaker in my PC.
And I saw that there is amstex in MikTex package manager. Unfortunately, I still can not successfully compile the files written in ams-tex, such as the the ams-guid.tex provided by this wedsite
Here is my error message:
The reason that I use ams-tex is that my uncle's work are all write with ams-tex. Thus, he would like to keep using ams-tex rather than latex. However, I found that configuring the environment is not an easy work. Does anyone know how to build the environment properly?
Answer: You just need to run pdftex (or tex) on a file with the following structure:
\input amstex.tex
\documentstyle{amsppt}

<the document>

just like the amsguide.tex file starts. The important thing is not to run latex in one of its flavors.
You can also build the format, but it's not required and does not really save time. On my machine the saving is less than 0.4 seconds.
Comment: Thanks for you reply. It's correct and helpful.
Answer: You have to build an amstex format (amstex.fmt), which is not done bt default. For that, launch MiKTeX Settings, right click on amstex, select include (so that at each update of amstex, the format will be redone then  right-click on Build format, like in this image:

You'll also have to configure TeXmaker so that you can launch amstex from within the interface.
Edit: If you have WinEdt installed, there is a menu item for AmSTeX in  TeX > DVI >AmSTeX (shortcut Shift + Ctrl + A).
Comment: Thank for your detailed reply despite that building an amstex format is unnecessary. This figure helps me to find out that my miktex is not in correct version.


Parent content type

Question: In SharePoint 2010, is there any chance to create a parent content type? If so, how? I want to create a new parent content type and inherit it for other types.
Answer: In SharePoint, all content types inherit from "Item". You can create any number of new Content Types, that inherit any number of times from each other (singularly, no multiple inheritance here), but they must ultimately inherit from Item. There is no getting around this.
Also note that it's impossible to change the parent content type for an existing content type. You must create re-create a content type and inherit from the desired one if you wish to 'change' the parent content type. Unfortunately for child content types, this also means re-creating them.
Take great care when choosing your content type hierarchy, and devote significant effort (read: time) in this area of your information architecture design, as it is very difficult, if impossible to change later in use.
Answer: Parent content type cannot be updated using UI,but it may be update using Code.
If you can create a feature that contains all your custom content types, you will be able to change the XML that defines each content type and it's columns.
Comment: Hi Welcome to SharePoint StackExchange, while your answer may theoretically answer the question it lacks the required content to do so. Please consider revising to guide the question asker with more insight. Refer to the [FAQ][1] for more information [1]: http://sharepoint.stackexchange.com/faq

Parent content type


What's wrong with this derivation of the volume of a hemisphere?

Question: My idea to calculate the volume of the hemisphere is to sum up the area of circles of all radii up to the radius of the hemisphere we are interested in: $$\int_0^r \pi x^2 dx$$
This gives $\frac{1}{3}\pi r^3 \neq \frac{2}{3}\pi r^3$, so deviating by a factor of $2$ from the known formula for the volume of a hemisphere. Can you explain where my reasoning is wrong and why it deviates by a factor of $2$?
Comment: @RobbieGoodwin. Of course there is, but someone had to come up with that formula, which indicates that there is value in learning to derive things of that nature.
Comment: Remembering having once experienced the same misapprehension myself, I'd like to differently summarize the answers you've gotten in case it proves helpful: while $\pi x^2$ does range over the correct set of values for cross-sectional area as $x$ varies between $0$ and $r$, their *density* $dx$ with respect to the $x$-coordinate differs from what the correct expression $\pi (r^2-x^2)$ for the hemisphere would give, and both 'width' and 'height' matter in integration. Specifically, you had the radii $x$ of the disks decreasing linearly as $x$ goes from $r$ to $0$, actually resulting in a cone...
Comment: ...whereas if you inspect a hemisphere at equally spaced $x$-coordinates then you see it shrinks slower than linearly as you move away from the equator and remains disproportionately wider than the cone would be throughout, only catching up by tapering off rapidly at the pole -- all as reflected in the radius-function $\sqrt{r^2-x^2}$ as $x$ goes from $0$ to $r$ (yes, here $x=0$ at the widest part whereas for the radius-function $x$, it corresponds to the narrowest, but this reversal of the $x$-coordinate turns out to be unimportant -- because it doesn't distort densities).
Comment: Funny that the volume of a hemisphere is exactly twice the volume of a cone with the same height and ground area! I wonder if there's simple a geometric argument that illustrates this.
Comment: I could never have got that far, but isn't this re-inventing the wheel?

Is there not an established formula that gives a better solution?
Comment: @MadPhysicist Jolly good, and how does that help here?
Comment: @RobbieGoodwin. It's literally the entire point of this question
Comment: @MadPhysicist Far from that being literally the entire point, the Question makes no faint allusion to any such thing. Read it again, please.
Answer: You're computing the volume of a cone, not a hemisphere!
More precisely, your integral gives the volume obtained by rotating the triangle $0 \le y \le x \le r$ about the $x$-axis.
The hemisphere, on the other hand, is obtained by rotating the region
$0 \le y \le \sqrt{r^2-x^2}$, $0 \le x \le r$ about the $x$-axis,
so to get the volume you need to write
$$
\int_0^r \pi \Bigl( \sqrt{r^2-x^2} \Bigr)^2 \, dx
$$
instead.
Comment: You are adding discs together: they are the discs of radius $\sqrt{r^2-x^2}$ as $ x $ goes from $0$ to $r $, not the discs of radius $x$.
Comment: You can make a cone by piling discs whose radii linearly transition from 0 up to the radius of the base of the cone. A hemisphere's disks' radii do not transition linearly because the profile of a hemisphere is curved not straight as is the profile of a cone.
Comment: You are right, I originally misread the question.
Comment: I see. I did not think about it as a rotation but rather as piling up disks of different sizes. Could you give me some intuition why integrating from 0 to r can be seen as a rotation? It's hard for me to grasp it, because intuitively it seems to me we are not rotating around the full circle, but only for a segment of the circle of length r
Comment: @HansLundmark Jiminy Christmas, you'd think I hadn't literally just been teaching volumes of revolution yesterday. I'll turn my math degree**s** back in now.... Or maybe just take a beat to sanity-check before commenting =D
Comment: Famously, Archimedes knew that if you consider a hemisphere and a cone, where the cone stands on the same (equator) circle as the hemisphere and has its apex on the north pole of the hemisphere, then the ratio of the volumes of hemisphere to cone is $2:1$. In fact, Archimedes additionally had a cylinder, standing on the same circle as the two others, and with the same height as them, and he found the ratio of volumes $3:2:1$.
Answer: The thing to keep in mind with disk integration is the fact that the variable of integration represents the thickness of each disk.
You are trying to integrate the volume of a half-sphere, using:
$$
\int_0^r \pi x^2 dx
$$
with the idea being that a bunch of circular disks (each of area $A=\pi x^2$) should add up to make a half-sphere.  So if we investigate, things seem to make sense at the endpoints of $x=0$ and $x=r$ where the areas are $A=\pi 0^2$ and $A=\pi r^2$ respectively as expected.  But because the overall answer is incorrect we clearly have to investigate further!
What occurs at the half-way point?  At $x=r/2$ the area is $A=\pi (r/2)^2$... but that is much too narrow a disc! A hemisphere is still pretty wide midway up.  Doing a simple Pythagorean Theorem check, the hypotenuse being $r$ and the side being $r/2$ would mean the disk radius should be $\sqrt{3/4}r\approx 0.866r$ not $0.5r$!
Do you see the issue now? Setting the area of each disk to $A=\pi x^2$ inherently implies that the disk's radius at each point $x$ is exactly equal to $x$... but that $x$ relationship is one of a straight line, not a half-circle profile.  So, as others have mentioned, what you end up with is a stack of disks with linearly increasing radius... a cone! (The reason you're off by a factor of 2 is coincidence due to $V_{cone}=\pi r^2 h/3=\pi r^3/3$ versus $V_{hemisphere}=V_{sphere}/2=(4\pi r^3/3)/2=2\pi r^3/3$ and not because you forgot a 2 somewhere.)
To fix the issue you have to make sure that each disk (which has thickness $dx$ at point $x$) has the correct radius to match the circle for that $x$ location.  This means you need to use the Pythagorean Theorem to find a relationship between each slice's $x$ position and it's radius.
Answer: Your problem seems to be that you don't have a clear concept of how to integrate the volume of an object by stacking disks on each other.
In order to compute a volume by stacking disks, you need the distance between disks to be proportional to how much the variable of integration (in your case $x$) has increased. A way to look at this is that if you take a stack of disks for which $x$ increases by $\Delta x$ for each new disk, the "thickness" of that disk needs to be $\Delta x.$
A classic puzzle that is constructed with disks of uniform thickness that increase in radius by a constant amount for each disk is the Towers of Hanoi.
Usually the disks are stacked from the largest to the smallest rather than smallest to largest, but you would just have to turn the stack upside down to fix that.
And the stack of disks looks like a cone, never like a hemisphere:

The correct way to do what you are trying to do is called the disk method.
It works when you are computing the volume of an object that has a rotational axis of symmetry such that the space occupied by the object never changes when you spin it around this axis.
Such an object can be sliced into disks perpendicular to the axis.
(For some objects, some of the disks will have circular holes in the middle,
but this does not happen for a hemisphere.)
To do the disk method you have to start at one end of the object's axis and integrate along the axis. At each distance $x$ from the end of the axis, you have to determine what radius of disk fits in the object on that particular plane.
For a hemisphere you can choose to integrate from the flat end to the round end or from the round end to the flat end. But in neither case will the radius of each disk be equal to the distance from the end you started at.
The only object for which that is true is a cone,
which is why the integral you wrote will give you the volume of a cone of height $r$ and circular radius $r$ every time.


company name in place of first/last name for Business customer group?

Question: How can i make the customer group Business request a Company Name instead of
First Name or Last Name. this way when signing up a company i can put in the company info since there wont be any first/last name. i then need the company name to be shown anywhere first/last name is usually shown (invoices, account area, ETC.)
Comment: How would you know the group before registering the customer?
Comment: @mbalparda Well business customers are registered from the backend by me, while regular customers can register through the frontend registration page
Comment: @Nxlevel can you confirm this worked?  I want to do the same thing.  Thanks!
Answer: What is your Magento version?
The idea how to achieve your goal is: Make the last name field optional and hide it, and change the first name label to company. So the first name value of the customer is company name that customer entered, and company name will display on everywhere first name field should be.
So first thing first, make last name field optional:

How to make last name optional in Magento 1.8 , Magento 1.7 eva attributes table name is eva_attribute, you can find the attribute_code = 'lastname'
Hide last name field in everywhere(disallowed customer enter last name), there are 4 files should update(maybe more files):

app/design/frontend/default/yourtheme/template/customer/form/register.phtml

Has the HTML form for initial registration Note: this file will also be used for a one-shot database extension

app/design/frontend/default/yourtheme/template/customer/form/edit.phtml

Has the HTML form for edit by customers

app/code/core/Mage/Customer/Model/Entity/Setup.php

Has an array full of customer attributes to use for registration

app/code/core/Mage/Customer/etc/config.xml

Has a description of fields to be used in the forms

app/code/core/Mage/Customer/controllers/AccountController.php

For checkbox option

Reference: Custom Account/Registration Fields
After you update the files, you should register and test the changes is working or not. Test the email content, place order and invoice etc, make sure everywhere only display the company name.

Ohh! one more thing, GOOD LUCK!


I was refused a UK visa

Question: Q1: Please what can I do next?
Q2: What does it means for me in future and when I re-apply again?
Q3: Is it good idea to reapply back in 1 month time?
Comment: This is probably the worst refusal I've ever seen on TSE. It indicates that you do not meet any of the eligibility criteria and did not provide any relevant supporting documents. There's no point re-applying. Possible duplicate of [UK visa refusal on V 4.2 a + c (and sometimes 'e')](https://travel.stackexchange.com/questions/92121/uk-visa-refusal-on-v-4-2-a-c-and-sometimes-e)
Comment: In the era of online and international postage, what is the reason to fly from Nigeria to the UK to collect some *paper* document? This application smells a lot.
Comment: Read the linked question and answer. Fully document evidence that you have strong ties to your home country and sufficient funds to afford a 22 day trip to the UK. In addition, given the unusual situation, you need a letter from the University of Ulster explaining why you need to collect the paperwork in person. When I applied to a US PhD program all the paperwork related to my London University bachelor's and master's degrees was done through e-mail to the two colleges involved. That is normal. Needing to collect paperwork in person is not, and needs documentation.
Comment: @Traveller Suppose the OP could file a new application with proper documentation (Letter from University of Ulster identifying the paperwork and explaining why it must be collected in person, letter from a university in Nigeria showing the OP is a current student, but permitted to be absent for the trip to the UK, bank statements showing sufficient excess of income over expenses to justify the trip...). Would it be worth reapplying?
Comment: @Patricia Shanahan Maybe, if the OP can file a strong application. The premise of collecting paperwork seems weak but I suppose it could depend on what that paperwork is and why the OP can't just arrange for it to be posted to them.
Comment: I made mistakes, please what can I do next?
Answer:
To go to my university to get some document which will be of help in the future

Really? Is that the best you came up with in a visa application? I'm sorry to be blunt but you just wasted your hard earned money. That was never going to get approved that way.
Successful applicants spend a great deal of time or attention on applications to make a strong case. Those vague statements do not get visas.
Please consider reapplying only when there is a more convincing reason.
Even a non-visa national can not be so casual in a landing interview and expect leave to be granted, let alone a visa application.
Comment: I have tried to get a letter from my university but the are not responding back. Please what can I do next?
Comment: @Zukqi Why do you think you have to go to collect the paperwork in person? Can you address all the other deficiencies in your application? Read the linked question and answer to understand what is required and if/how you can meet those requirements. If you can't get a letter confirming that you must go in person, you have no evidence to support the stated reason for the trip and there is nothing you can do. Don't even think about re-applying quickly with a different reason - that will just further damage your credibility and lead to another refusal.
Comment: Ok the paperwork was Recommendation or reference letter which I call my school for it previously but the told me that I have to get it from my lectures only and I thought if I am going to visit uk while not go and pick it up my self.

I was refused a UK visa


How to delete Content Area in Existing Template

Question: I'm trying to create a new template based on an Existing (stock) Template in Content Builder. The stock template includes a "Pre Header" content area that I do not need. I deleted the content blocks within the area, but I'm still left with an empty Pre Header content area. How do I go about deleting this? I looked in Properties of the Content Area and do not see an option to delete it.
Answer: There is no way to do this without editing the code of the original template. However if a content block is left empty it shouldn't show up in your final email. If you go to preview/test tab the preheader content block should disappear, as well if you send a test email.


Can a template file write, copy, or rename files?

Question: Can code put in a template file write, copy, rename files, or read files that aren't template files?
Answer: Twig is extendable, so it can do whatever it's given the ability to do.
But no, core Twig and core Drupal do not include extensions for manipulating files.
Templates are for displaying things, it wouldn't make conceptual sense for them to be able to manipulate the file system (even if you could technically provide an extension to give them that ability).
Comment: Yes, the engine can create cached files (and should almost always be configured to do so), but it does that from outside the template, not inside. No, Drupal doesn't store compiled templates in the database, again a plugin could probably be written to do so, but for now they're stored in the file system. I wonder is there a hidden question you're getting towards but haven't asked yet? In the abstract these feel like un-useful things to know, but not sure if you have an underlying goal or are just hunting for any knowledge you can find on the subject
Comment: All Core extensions are declared in TwigExtension: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Template%21TwigExtension.php/class/TwigExtension/9.5.x
Comment: Ok, thanks! One more question: at SO I've received a comment that Twig creates compiled templates if the cache is enabled. That's some kind of "creating" files. But I can't find the answer to the question, does Drupal-specific Twig also compile such files or it stores compiled templates in the database? Could you tell me more about
Comment: @Clive It's a question of security. I mean if a developer working on Twig templates uploads them to a server via specific file uploader which allows only `.twig` files, can he add some line to a template that in turn can create for example PHP file with executable code? Or if he uploads a file as `.twig`, can he then somehow rename it to `.php` using a line inside of Twig template? And so on
Comment: No they can't do that, not out of the box anyway, you'd need to give them that power (which obviously you wouldn't do). Twig compiles down to PHP, so your risk shifts to how secure the Twig project itself or Drupal/Symfony's potential use of it is, IMO (and your own codebase, custom/contrib modules, etc)


Just installed Ubuntu 22.04 on a dual-boot setup, now my other OS isn't showing up

Question: I just installed Ubuntu 22.04 on my system in a dual-boot configuration. In the past, when I did this with Ubuntu 20.04, a GRUB boot menu would show up at each boot, allowing me to choose which OS to boot. However, this doesn't happen anymore - I am unable to boot any operating system other than Ubuntu 22.04. What happened, and how do I fix it?
Comment: Please, edit your question and add the output of `grub-install -V` to get the version of grub and  `sudo update-grub` to know if it finds OS to boot
Answer: In Ubuntu 22.04, the feature that usually populates the boot menu with all of your operating systems is called os-prober. For security reasons, os-prober was disabled by default in the bootloader included with an early alpha version of Ubuntu 22.04 (GRUB 2.06), which made it so that the other operating systems on your system were not detected. (Source: https://www.gnu.org/software/grub/manual/grub/html_node/Simple-configuration.html#Simple-configuration Search for "os-prober" on the page to find the relevant info.)
To get your other operating systems to show up in the boot menu, you can re-enable os-prober. This will come with some security risks (for instance, if you have a malicious drive plugged into your system, and something like a kernel update causes os-prober to be executed, the malicious drive could try to exploit a security vulnerability in your system), but for many users, it's not that big of a deal, and the benefits outweigh the risks.
To re-enable os-prober, open a terminal with Ctrl+Alt+T, and run sudo nano /etc/default/grub to edit the grub-mkconfig configuration file. You will be asked for a password before the file opens, since you're opening it as a root user. Once the file is open, add GRUB_DISABLE_OS_PROBER=false to the file, press Ctrl+S to save, and Ctrl+X to exit. Finally, run sudo grub-mkconfig -o /boot/grub/grub.cfg to regenerate your GRUB configuration and boot menu, then type exit to leave the root shell. You can now close the terminal, and you should be done!
Comment: Instead of `grub-mkconfig -o /boot/grub/grub.cfg` you can simply run `sudo update-grub`
Comment: better to run each command that needs root with `sudo`, rather than running a shell as root. It's somewhat harder to by mistake mess something up that way.
Comment: @Esther Not a bad idea, I'll edit my answer.
Comment: If it does not help, have a look at this: https://www.techrepublic.com/article/how-to-repair-the-grub2-boot-loader-on-linux/


Why do not we have tag synonyms like they are on Stackoverflow

Question: For example, let's look at the tag selenium2 on Stackoverflow. There is a synonym 'selenium-webdriver' When we are trying to find synonym for selenium2 on sqa.stackexchange.com then there is no synonym for selenium2. Shouldn't tags have the same synonyms?
Answer: We currently do have some synonyms. You can review them at https://sqa.stackexchange.com/tags/synonyms
As for differences between SO and SQA, we're two different sites, and our tags are not connected in any way. They don't have the same descriptions either.
If you have a certain reputation you can suggest synonyms on a tag's wiki, or at any time you can post on meta about them. If you're interested, you could compile a list of the popular SQA tags that have synonyms on SO and post that list on meta. Folks could suggest feedback for a few days, and then I or another diamond can enact those synonyms.
Comment: Ok, it's clear about differences between SO and SQA. I'd like to suggest synonym for selenium but don't have enough reputation. But if I found some more synonyms I definitely create new topic and I hope it will help organize tags. Thank you.
Comment: That's perfect. What you could even do is have a topic as a header, and 'answer' the 'question' with a pairing. People could voice their opinion by voting up and down, and with comments, and others could make suggestions too. If they reach a certain threshold and no complaints in the comments, I can add them and delete that answer, and we can continue to use the post.


Firefox issue with keyboard

Question: Suddenly I can't type in Firefox. Keyboard doesn't have any issue as everything works fine on other applications. I have tried disabling add-ons, restarting FF in safe mode, resetting Firefox, all with no success. My Firefox is version 26.0.
Answer: Try using a previous version of FF, it can be that there was a Windows update that somehow messed something up with that version of FF. My PC usually starts acting weird after a Windows update. I then do a system restore from before the update and then all is well again.
Comment: thanx @Stagger, Its working properly today after restarting! :) thanks again

Firefox issue with keyboard


Show that the function $f(z) = \frac{\sin(z)}{z^n}$ has an anti-derivative $F(z)$ in $\mathbb{C}\setminus \{0\} \iff n$ odd.

Question: I think that you have to show that $f(z)$ is analytic in $\mathbb{C}\setminus \{0\} \iff n$ odd, and tried writing $\sin(z) = z - \frac{z^3}{3!}+\frac{z^5}{5!}-\frac{z^7}{7!}$ and then dividing by$z^n$, and it's clear that then the series when $n$ is even contains odd powers of $z$, suggesting divergence and thus non-analyticy. And for $n$ odd, the series only contains even powers, but I can't prove it exactly. Can anybody help?
Comment: The issue is whether you have a $z^{-1}$ term before you try to take an antiderivative.  If $n$ is not, you can verify that such a term doesn't exist, and then you can check that the Laurent series converges.  However, if there is such a term, then you can argue that if your function had an analytic anti-derivative, then $\log$ would have to be an analytic function on $\mathbb C \backslash\{0\}$
Comment: Also for $n=0$.
Comment: Ah I see, yes, that's actually very simple! Thank you. I understand your argument.
Answer: Let $n=2k+1$, then
$$
f(z)=\frac{1}{z^{2k+1}}\sum_{n=0}^\infty \frac{z^{2n+1}}{(2n+1)!}\\
=
\sum_{n=0}^\infty \frac{z^{2(n-k)}}{(2n+1)!}
$$
Now, the first few of these terms may well be negative powers of $z$ (if not, this function is a power series, and so is analytic, and so has an antiderivative), depending on how big $k$ is, but what happens when you integrate something like
$$
\frac{1}{z^{2j}}
$$
in a closed loop around $0$? Note that the way we construct antiderivatives is by defining
$$
F(z)=\int_0^1f(\gamma(t))\gamma'(t)\mathrm dt
$$
where $\gamma$ is some path from some point (this will determine the constant up to which antiderivatives are defined) to the point $z$ in $\mathbb{C}\setminus \{ 0\}$. Note that by our computation, the choice of path $\gamma$ doesn't matter, and so this is a well defined function.


For KL divergence, would we consider two distribution has same random variable?

Question: from the formula of KL divergence
$$ KL(P||Q) = \int_{-\infty}^{\infty} p(x) \log \left(\frac{p(x)}{q(x)}\right)\operatorname{d}x$$
I feel the $P$ and $Q$ has the same random variable, but, the distribution associated with a random variable should be unique, so how could we have two separate distributions with the same random variable? I can think $x$ is just dummy variable at here but again, how could this be valid from the definition?
Answer: When considering
$$KL(P||Q) = \int_{-\infty}^{\infty} p(x) \log \left(\frac{p(x)}{q(x)}\right)~\text{d}x$$
it can be expressed as
$$KL(P||Q) = \mathbb E_p\left[\log \left(\frac{p(X)}{q(X)}\right)\right]$$
meaning it is the expectation of a transform of the random variable $X$ with density $p$ (or distribution $P$). There is therefore no assumption of $X$ being distributed from both $P$ and $Q$. Note however that it can equally be written as
$$KL(P||Q) = \int_{-\infty}^{\infty} q(x)~\frac{p(x)}{q(x)}~\log \left(\frac{p(x)}{q(x)}\right)~\text{d}x=\mathbb E_q\left[\frac{p(X)}{q(X)}~\log \left(\frac{p(X)}{q(X)}\right)\right]$$meaning that it can also be expressed as an integral under $Q$ (or any other distribution following the same reasoning).


Build chromium for raspberrypi2 on wayland with yocto project brings error related to egl.pc and wayland-egl.pc

Question: I have completed building qt5 on raspberrypi2 by following the instruction here: http://www.embarcados.com.br/raspberry-pi-2-qt5-yocto-parte-1/
My next goal is to build chromium with wayland and egl. I have added one more layer from "https://github.com/OSSystems/meta-browser".
Actually, I could successfully build chromium with x11 but still failing with wayland. The things I did for wayland is to add "wayland" with DISTRO_FEATURES_append = " wayland" and remove x11 with DISTRO_FEATURES_remove = " x11".
However, this yields errors and the error messages mentions that missing "egl.pc" and "wayland-egl.pc". Should I add some more components in "DEPENDS" section which will be pre built and create those two package config files in addition to those components in chromium.inc? The build configurations and error messages shown are below.

Build Configuration:
  BB_VERSION        = "1.26.0"
  BUILD_SYS         = "x86_64-linux"
  NATIVELSBSTRING   = "Ubuntu-14.04"
  TARGET_SYS        = "arm-poky-linux-gnueabi"
  MACHINE           = "raspberrypi2"
  DISTRO            = "poky"
  DISTRO_VERSION    = "1.8"
  TUNE_FEATURES     = "arm armv7a vfp thumb neon callconvention-hard vfpv4 cortexa7"
  TARGET_FPU        = "vfp-vfpv4-neon"
  meta-embarcados
  meta-rpi          = "fido:dfb2e27bf26b109fc6ccb3bc91924fb3bb24f655"
  meta-qt5          = "fido:fc026381545650e10fdd488d5b2a3b2d78f87793"
  meta-raspberrypi  = "fido:b896a7da70dd7a16ba7ffd664f7747cb37e1d142"
  meta-oe
  meta-ruby
  meta-gnome        = "fido:10d3c8f85280a0bf867a8e4f84bcda81c290d28e"
  meta
  meta-yocto        = "fido:cd2c9acdbd75c83790e8144d2a834f5b5de35df0"
  meta-browser      = "master:ca96f4326345dcd779fc539877a04f069f431749"
NOTE: Preparing RunQueue
  NOTE: Executing SetScene Tasks
  NOTE: Executing RunQueue Tasks
  ERROR: Function failed: do_configure (log file is located at /home/paul/yocto/build-browser-fido/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/chromium/40.0.2214.91-r0/temp/log.do_configure.13805)
  ERROR: Logfile of failure stored in: /home/paul/yocto/build-browser-fido/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/chromium/40.0.2214.91-r0/temp/log.do_configure.13805
Updating projects from gyp files...
  Package xcb-shm was not found in the pkg-config search path.
  Perhaps you should add the directory containing xcb-shm.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'xcb-shm', required by 'cairo', not found
  gyp: Call to 'pkg-config --cflags pangocairo pangoft2' returned exit status 1.
  Requested 'egl >= 9.1.3' but version of egl is 0.0
  Package wayland-egl was not found in the pkg-config search path.
  Perhaps you should add the directory containingwayland-egl.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'wayland-egl' found
  gyp: Call to 'pkg-config --cflags "egl >= 9.1.3" "wayland-client >= 1.4.0" >>

Thank you very much for your help.
Comment: @AFract I editied a bit to improve readability. what about now? Thanks.
Comment: Please use SO post edition feature to improve readibility of your post (you can see how to add line breaks at the right of screen). Currently your post is hard and uncomfortable to read. Thanks
Comment: Your post is tagged `chromium-embedded` are you actually using the `Chromium Embedded Project` from which that tag originates?
Comment: @amaitland, I copied chromium from meta-browser as the link in the question. removed chromium-embedded to reduce confusion. Thanks.
Answer: I found that I should have not done DISTRO_FEATURES_remove = " x11". However, I`m still attempting to launch chromium based on wayland compositor.


best language / framework for a web CRUD app with roles on Linux

Question: I have a Linux web server and I'd like to make some database tables (currently in Access) available on the web for CRUD.  There needs to role-based security.  What's the quickest path to develop this?
Also, which database would be best?  I already have mySQL running on that box if it makes any difference.
Answer: This will turn into a religious war between the Ruby on Rails camp and the Python camp, with a good smattering of the PHP and Perl. You should evaluate the langauges yourself and decide what is best for you. There are, of course, other choices, however listing those would just elicit mroe religious battles. Although, I would say all of those I listed would be reasonable choices. You can usually create a good design in spite of any shortcommings your chosen language may have.
Answer: I agree with Chuck, the question shouldn't really be about the language, but about the framework you choose.
I did something similar to you a while back, and ended up using Ruby on Rails, and the activescaffold plugin (http://www.activescaffold.com/) to provide a pretty front end. The actual code I ended up writing was extremely minimal. There are other plugins for Rails which provide role based security too (which I didn't bother with, I just had "you're either logged in and have write access, or you're not logged in and you don't") and which also mean you don't have to write much stuff yourself.
So put me in the camp for Rails come the religious war ;)
Edit: MySQL is a perfect database to use, so you don't have to worry there.
Answer: If you want a solid, clean, stable CRUD web app that can be maintained and expanded for years to come, stick with the standards: PHP, Perl, JavaScript, CSS, and HTML.  Learn those roots languages well.  Take the time to do it right and focus on good coding habits like clarity, consistency, and organization.  Practice good reuse of code, good naming, good commenting, and good database design.  Test, document, and refactor.  Take pride in the craftsmanship of your CRUD app.  Learn it inside and out.  Set the stage so you can later maintain and expand it.  Your goal is to build something that will work well, last a long time, and make a great return on the business investment.  Someone once said that it takes 10 years to become a good coder.
As for frameworks, plugins, and external libraries, that's wonderful icing to put on your cake.  But never confuse the icing with the cake.  If you want to learn to code, take the time to learn it right.  If you're not comfortable coding a simple CRUD app, you'll be even less comfortable trying to navigate the framework-generated code.  Coding is a wonderful gig.  But never mistake the sizzle for the steak.
Answer: I don't think language is the question you should be asking. There's no language particularly well-suited to CRUD Web apps. There are many frameworks designed for that sort of thing, though, in many different languages, and those are probably what you'll want to look at.
I think Rails is the best in general, and that's what I use for most projects. It's very well-suited to CRUD apps (to the point where it allows you to create a simple one without writing any code at all). But if there really were an undisputed "best" choice, you'd probably already know about it. Instead, some apps are made with Rails, some with Django, some with Cake, and so on and so forth.


How much can someone see from my iPhone by connecting to my wifi

Question: How much can someone see from my iPhone by connecting to my wifi and can they copy my messages files documents etc
Comment: Any specific reason why you'd post two nearly identical questions? Here's the other one: [Privacy of my files and messages while another device is connected to my iphone](http://security.stackexchange.com/q/47639/20074). Voting to close this one since it's newer, and perhaps mods will be so kind to merge the two since this one already has one reply.
Answer: If you are transmitting anything through WiFi then an eavesdropper can capture all the transmitted packets and analyze the data. Thus, anything you transmit should be encrypted (using TLS preferbly).
And dont rely much on the WiFi encryption as most of the time (other than WPA2 enterprise), as it can be cracked by someone who knows the pre-shared key and recorded the handshake.
Otherwise, if there is an app that allows remote access or file sharing then someone may be able to hack into your phone. Especially if your iPhone is jailbroken, then  1 out of 20 iPhones/iPads can be hacked in less than a minute.
And lastly viruses, trojans and malware can also intrude on your privacy once you are connected to the Internet. Again, this happens only if your phone is jailbroken. Because according to here, there are no known iOS viruses that can infect an iPad or iPhone that has not been jailbroken.
Because iOS implements something called sandboxing, which restricted the resources that each app can use. So, a malicious app will have a hard time accessing data stored in other apps unless it is jailbroken.


XenServer move VM Failed

Question: We currently are running our XenServer virtual machines off of an over extended Drobo unit and wanted to migrate a particular 600+GB VM off of the Drobo onto a newer Drobo, so I attached a storage repository on the new Drobo and used the XenServer "Move" feature. I checked back a few hours later to find an "error - connection was reset". Now both of the two disks have incomplete data and will not work. Is there any way to recover this data via a block level sync of some sort?
Answer: Wrote this for our internal wiki after researching for quite a while:
Signs that this is a problem:
Clicking on drive properties will show that it is attached to the control domain
VMs won't boot when this drive is attached.
First we want to see if any tasks involving this VDI are being run, we do not want to do anything to it while tasks are being run. In order to do this:
SSH or console view into pool master
xe task-list
look for anything involving that name. (you can | grep "UUID or name")
If this doesn't return anything, then we want to unplug and destroy the VBD to the dom0. The VBD is the connection between the VDI and the VM or control domain. Destroying it will not damage data.
SSH or console to Pool master
list_domains
xe vdi-list
find the disk in question
copy the UUID of this disk
find the vbd UUID by running "vbd-list vdi-uuid="
There will be a VBD for the control domain and for whatever VM it's attached to. Copy the UUID of the VBD for the control domain
Unplug the VBD: xe vbd-unplug uuid=
Destroy the VBD: xe vbd-destroy uuid=
Answer: Something similar happened to me while moving vms.
What I did is the following:

Try to copy the VM (not move) (doesn't matter if it doesn't start up)
If the copy is successful try starting the VM. If I doesn't work, try detaching and re attaching the virtual drive.

If still doesn't work, you should see if you have snapshots of the VMs.
What did work for me was attaching the vdi to a VM created from one snapshot.
Before trying to move/copy again make sure your network is working properly, you can try moving big files manually between the servers (using sftp or rsync). Sometimes with big files problems appear. Most of the time are defective cables or switches.
I hope you manage to recover your vms!
Comment: Thank you for the response, this we did try, however doing this sort of thing through the XenCenter gui tends to not work so well we have found in hindsight. Ended up being a stuck VDI, I will post a more in depth solution.

XenServer move VM Failed


Chronological order when using "and"?

Question: In a sentence like "At the party, I ate and drank" where the actions are done concurrently, does the order of the verbs show anything about chronological order? For example, in "At the party, I ate and drank" does the fact that "drank" is second mean that you only started drinking after eating something and then only after that did you do the actions together concurrently, or is possible that you did drink before eating and the whole sequence of events is ambiguous?
Comment: No. In other examples, it may do (*I caught him and raced after him), but here, 'We drank and ate' would sound unnatural, eating being the 'senior partner'.
Answer: The sequence is ambiguous, and occurs during a time period specified by at the party ("while I was...").
Some sequences sound better because of learned repetition, e.g. eat, drink and be merry (Eccl. 8:15). So "ate and drank" sounds slightly better than "drank and ate". Also one usually doesn't proceed from only one activity to another - we often eat and drink at the same meal.
Given three activities that might happen at a (wild) party, "laughed", "sang" and "danced on a table", does it really matter which order they occurred? In that situation, the order might matter, but generally, the shorter words might go first.
And finally, some sequences are logical during a time frame. "I drank too much and got sick" are logically sequential.
Answer: It's the verbs themselves, not the "verb and verb" structure, that imply whether there's concurrency or sequence here. "Ate and drank" implies concurrency, while "drank and drove" would have implied sequence.
The author could have unambiguously imposed sequence upon the actions by using the word then, as in, "At the party, I ate and then drank." ...Or, even more specifically, "At the party, I ate, and then I drank."

Chronological order when using "and"?


Where is this brightly coloured house in Koskinou, Rhodes?

Question: I am looking for the location of a house, I know it is in Koskinou village in Rhodes, but I want the exact location.
This is the google map
Comment: As the question is now it is likely to be closed, as 'no use for others' or one of the other standard reasons to close questions. Can you please add why you want to know the location and what use it is to others to have this answered?
Comment: We have had a troll that kept posting poor quality photos with a 'where is this' questions, which is why we are sharp on it. I will not close this question but leave it up to the community. Nice place by the way.
Comment: that's a good game of geoguessr.
Comment: Sorry, I think this is just personal favor and 'no use for others', i am new and i don't know the rules on this website, if this bothers you, close the question as you want.
Answer: Well, that took a long time to find.... The colours are much more faded on Google Maps (don't know about real life?), but I'm confident this is it.
It's on 28is Oktovriou, near the western end of that street, close to the cliff, right on the nearly 90° bend towards the south, at 36.385744913006974, 28.212052853156727.
Click on picture to get to the location on Google Maps:
Comment: Also, [xkcd has something to say about that level of precision on GPS coordinates.](https://xkcd.com/2170/)
Comment: I spent a while on Satellite View myself but I completely forgot that 3D view was an option.  ::: facepalm :::
Comment: @MichaelSeifert eh eh apparently Google Maps must be counting atoms :-)


I can't pose my character with the hair particle system

Question: I've made a tiger and a hair particle system for fur. It all worked well until I rigged it. The model moved with the bones bit not the hair. Please help
Answer: Check your modifier stack. You most likely have the Armature under the particle system (usually happens when creating something like this). Instead, you will want the armature to be above the particle system so that the hair grows out of the deformed model.


viewing frames of animation

Question: I have a simple query, (I hope). I have a few frames of a walking figure which I can animate, but I need to access the frames so I can print and trace them for hand drawn work. Problem is, after I animate them, where do they go???
Answer: With the default key bindings, F12 will render a frame, and F11 will toggle the render view on and off.  The rendered result is shown in the "UV Image Editor" panel.  In that view, select from the menus Image -> Save As Image to save the one frame.
If you have more than just one or two frames, this will quickly get tedious.  Go into Scene settings, set up an output folder, and you can render a stack of separate frame images in one go.

viewing frames of animation


How to display badges with username?

Question: How can i display the badges with username like stackexchange? I am using D6 and user badge and userpoints modules.
Answer: Two modules you can try both of which integrate with user badges but will need a little more customization to get it right. Try the user_picture_block module:

Create just one block with the logged on user's picture, if he/she has one. In addition, User titles, points and badges are also displayed, if there are any.

Also, there is the author_pane module which also has built-in integration with user_badges:
Comment: I used "Author Pane" module which is also a good option. Actually, I had used this module before. But did not know it is integrated with "user badges" module.
Comment: It is an alternative but a good option. I used the  "user_picture_block" module. But badge images do not come. So, how can i do this?

How to display badges with username?


Capitalize titles, terms of endearment?

Question: If I have a sentence, "No, dear, you should not." which is dialog second-person, does "dear" stay lower-case? It seems so, even though you would say, "No, Father, you should not." when the father is being directly addressed by his son or daughter. (What about "No, dear Father, you should not."?) Also, should I say "No, m'lady, you should not." when, again, Lady So-and-so is being directly addressed? Again, it would be "No, Countess, you should not." I'm confused.
Comment: Essentially another duplicate of [When should "doctor" be capitalized?](https://english.stackexchange.com/questions/301661/when-should-doctor-be-capitalized): 'It's always capitalised when used as a prestigious title. 'The Doctor meets his old enemy, the Meddling Monk'. It's just rarely used as a prestigious title in everyday usage. However, Jane Straus, at GrammarBook.com conceded: 6a 'Capitalize a formal title when it is used as a direct address. The more formal the title, the more likely it is to be capitalized. Examples: Will you take my temperature, Doctor? We're sorry to ...
Comment: report, Captain, that we're headed for choppy waters. That's what you say, mister. Good afternoon, sweetheart.' There are less clear-cut cases; 'father' may be left uncapitalised . I'd say that 'dear' would rarely be capitalised. You can check for usage with _M'Lady_ and _Countess_.
Answer: Capitalization is for formal titles or names. Dear, honey, sweetheart, and the like are all endearments, not proper names or titles. Father/Mother, when spoken by children are capitalized, because that is the parent's title (or their name, as far as some children are concerned). "m'lady" is a way of addressing someone with deference, but is not a formal title like Lady or Countess.
This may help: http://excellenceinediting.blogspot.com/2012/08/to-cap-or-not-to-cap-that-is-question.html

Capitalize titles, terms of endearment?


Fourier transform of product of radial power with fractional laplacian

Question: I know that in $\mathbb{R^n}$, the Fourier transform of a fractional laplacian $\widehat{(-\Delta)^s u}(\xi) = |\xi|^{2s} \hat{u}(\xi)$. In particular, when $s=1/2$, $\widehat{(-\Delta)^{\frac{1}{2}} u}(\xi) = |\xi|\hat{u}(\xi)$. I am studying an operator $H_s{v} =- r^{\frac{n-1}{2}}((-\Delta)^{\frac{1}{2}}u)$, where $u$ is radially symmetric and $u(r)=r^{\frac{1-n}{2}}v(r)$. I want to solve $H_s{v} =- v$. Because of nice Fourier invertibility properties for $s=1/2$, I wanted to use Fourier analysis to solve this. I was wondering if there was a simple way to express the Fourier transform of the operator, $\hat{H_s(v)}=\widehat{r^{\frac{n-1}{2}}(-\Delta)^{\frac{1}{2}}(r^{\frac{1-n}{2}}v)}$ in terms of $\hat{v}(\xi)$.
Answer: Let $a = {n-1}/2$. Actually, when $a$ is not a negative even integer, the Fourier transform of $\frac{1}{r^a} = \frac{1}{|x|^a}$ is $\mathcal{F}(\frac{1}{|x|^a}) = \frac{c_{n,a}}{|x|^{n-a}}$ (to be interpreted as the associated Hadamard finite part distribution if $a<0$), so
$$
\mathcal{F}(r^{a}(-\Delta)^{1/2} r^{-a} v) = c_{n,a}c_{n,-a}\,\frac{1}{|\xi|^{n+a}} * \left(|\xi| \left(\frac{1}{|x|^{n-a}}* \hat{v}\right)(\xi)\right)
$$
You can also rewrite that with fractional laplacians as
$$
\mathcal{F}(r^{a}(-\Delta)^{1/2} r^{-a} v) = (-\Delta)^{a/2}\left(|\xi| \left((-\Delta)^{-a/2} \hat{v}\right)(\xi)\right)
$$
or in a more integral form
$$
\mathcal{F}(r^{a}(-\Delta)^{1/2} r^{-a} v)(\xi) = c_{n,a}\,(-\Delta_{\xi})^{a/2}\int_{\mathbb{R}^n} \frac{|\xi|\, \hat{v}(y)}{|\xi-y|^{n-a}}\,\mathrm{d}y
$$


Convert Virtual Machine disks to bootable images

Question: I have a couple of virtual machines that, over a few months, I have installed numerous pieces of software upon. Unfortunately, for some of the software to run at a usable speed, I need to run it on a real computer, where it can access more memory, computing power, and bandwidth. So, does anyone know of some software that can "burn" a virtual machine disk onto a flash drive or HDD so it can be booted from? I would prefer if said software runs on windows (otherwise I would need to make a bootable linux drive to make another bootable drive). I would also prefer something that I can point at a vmdk and a drive and walk away (as opposed to a utility that can do this, but requires me to "walk it though" through several steps of extraction and conversion. Thanks!
Answer: For windows
Most cloning packages will do it.

You have imagex.exe by Microsoft
sysprep /generalize
Boot from Windows PE/Windows 7 DVD
net use (drive letter):  (unc)
and save image to network share.

On the real hardware boot the same way except use imagex with the command line arguments to restore the image.

I believe Acronis True Image can do this also.
Install Acrnois inside the VM and attach a USB hard drive.
Run  sysprep /generalize  This will help with driver issues
Save image to ext usb hard drive.
Make bootable acronis restore CD.
Attach ext USB hard drive to real hardware.
Boot real PC with Acronis CD/DVD
Restore from ext USB hard drive.
Reboot
Wait for sysprep to complete
install drivers for real hardware.


Is "screen-cleanup" service safe to disable?

Question: I want to decrease my startup process and I see the service named "screen-cleanup"
What is that? Is it safe to remove?
Comment: How did you get that service first up? What version of ubuntu are you using?
Comment: I don't know, I installed many things. I'm using 14.04 Trusty Tahr Daily Build
Comment: @rofiquzzaki You need to tell us what you installed (or tried to), "screen-cleanup" is not a default application.
Comment: ok, i've installed bum, minicom, pidgin, gnome (complete), sysv-rc-conf, and many other things (I forget)
Comment: @edwin [Yes, it is default](https://help.ubuntu.com/community/InitScriptList)
Comment: @Izkata I cannot find it on my install, maybe OP is using an old(er) version of Ubuntu?
Answer: Short Answer:
First of all, the mystery application to which that particular startup service belongs, is screen, which you may have installed separately, or it may have come as part of byobu terminal multiplexer.  Is it safe to disable? Basically, yes, but you won't be able to use screen. You can, however, still use byobu. I currently have it disabled, and writing this after a reboot.
More Details
Now, onto the investigation and some proofs. Every start-up process has a start-up scripts, and initialization scripts to those are located in /etc/rc folders. There is several of them, depending on your system's run level. Run level topic is something separate from this question, but if anyone is interested, I recommend reading up on this answer from superuser.com, and man pages for init, update-rc.d, and runlevel.
My current run-level is 2, and under /etc/rc2.d/ I have the initializing script for screen-cleanup, S20screen-cleanup. If you cat it, you'll see that basically all it does is clean up saved sessions from screen (stored in /var/run/screen).

Disabling can be done through Start-up Applications (GUI) or by renaming the initialization script from S20screen-cleanup to K20screeen-cleanup ( more precisely , it is 'sudo mv S20screen-cleanup K20screen-cleanup' command).
What will happen if you disable this service ? Having rebooted my machine , I tried 3 things: enter screen, enter byobu, and ls /var/run/screen . The result is that byobu still runs (probably because it falls back to using tmux,, which also comes with byobu), screen won't start (reports "Cannot make directory '/var/run/screen': Permission denied"
), and the said folder is not existent. But hey, the system is still running, everything still works, so you could say it's safe enough to disable that service, especially if you don't usually use screen or byobu.
P.S:   Although this answer is somewhat late, I hope moderators will allow leaving it here, so it may be useful to other users who are looking into disabling some of the startup services.


Is President Putin a terrorist according to the definitions used in international law and treaties?

Question: Is there a international law that decides who is a terrorist, and based on the acts committed in Ukraine, can Vladimir Putin be judged as a terrorist?
Comment: I'm voting to close this question because it belongs on Politics.SE
Comment: @ZOMVID-21, I edited this slightly. I hope it still reflects the question of the original poster.
Answer: In recent decades, the term 'terrorist' has been so over-used as to become meaningless, unless an exact context is given.
Wikipedia quotes the UNGA (archive site), which decided that

Criminal acts intended or calculated to provoke a state of terror
in the general public, a group of persons or particular persons for political purposes are [...]

Note that the UNGA talks about criminal acts. Under international law, war is not always a crime. Also, the individuals engaged in war are not held to the normal criminal law standards even if starting the war was a crime. A soldier who shoots at an enemy soldier does not have to prove self-defense under criminal law standards.
International law has various conventions and customs regarding starting wars (jus ad bellum) and fighting wars (jus in bello).

The crime of aggression is unlawfully starting a war. It is not commonly called terrorism or state terrorism. President Putin may or may not be guilty of this, he has not been tried and found guilty. (I have a firm opinion on his guilt, but I'm not a competent court of law.)
War crimes are various acts during a war, regardless of whether the war itself was lawful or not. They are often called terrorist acts, but this is an oversimplification for propoaganda purposes. Both President Putin and some of his subordinates may or may not be guilty of this. Ukrainian courts have sentenced Russian soldiers for war crimes, just as Russian courts have sentenced Ukrainians. (I believe that soldiers on both sides committed war crimes, with the preponderance being Russian crimes, and also that both Ukrainian and Russian trials are influenced by political considerations. I believe that Russia is ordering war crimes, while Ukraine is failing to prevent crimes by their troops.)