Google logs my activities wrong

Question: My Google activities log says I have been messaging people late at night and in the early morning, but I know for a fact I haven't. Plus I have a search on my Google maps I never did. These things are putting a strain on my marriage and I want answers to why this is happening to me. I rarely go anywhere due to me meaning a stay at home mom. I want answers and I want to be able to show my husband that I'm not lying to him about any of this. I'm also getting to were I don't want to do anything on my phone far as searches, texting or making calls.
Comment: For maps showing wrongly see [Google Maps Location History is showing an incorrect location](https://android.stackexchange.com/q/44608). For messages etc, please provide more information as also the device used and Android version
Comment: It is showing an incorrect location that I never did search and my husband and I both have seen it. The problem with this is that the place is a road like 20 minutes away from  me and I never look up a road.
Answer: I've had similar mysterious activity showing up on my account in the past (albeit, several years ago).  It's important to remember that your Google account, and thusly your usage history, can be shared across multiple devices, including a mixture of desktop, laptop, mobile, even TV and assistant enabled devices like Google Home.
I spent a moment going over security and reviewing my account  - it sounds like you would benefit from the same.
First, visit https://myaccount.google.com/
Secondly, sign in to your Google account and you should see some options on the left side pane:

Under Data & personalization, you can review your privacy settings and also see location history.  Clicking on Location History reveals a page where you can review which devices are contributing to your accounts history.  Be sure to have only the devices you actively use as checked.

Under Security, I highly recommend turning on 2-step verification.  Also, make sure you have no security issues including any unidentified sign-ins from devices you don't recognize.  You can revoke access to your Google account on a device-basis from this screen.

Under People and Sharing you can view who is sharing content with you, including location history.  You can also control which content you see, of course, including location sharing.

In regards to your mobile devices, make sure you audit and remove any suspicious looking apps that you may not remember downloading.
Finally, reset your Google password.  This is the single best security practice and often the most overlooked.
Answer: Your messaging activity is not normal... I'd suggest placing an SMS logger on the device to double check no application is sending messages without your permission, you can find them online ( try searching Parental Control )
I feel that you may be searching for an answer that doesn't exist, are you sure that your location is wrong... For example, You mention that the location is actually near you, this can be two things, The amount of satellites that are deciding the location.. ( On Android, the GPS is not super accurate, it's based on several methods of accumulating location based information to calculate your location - WiFi Device's your near ( connected or not ) - Radio tower your connected to, or multiple towers ( triangulation ) - NFC devices you've passed, that are identifiable by a location ) ... For example, if you passed a Free WiFi Hotspot, your location would be linked to the location of the hotspot owners address )
You will often have an incorrect location ( sometimes up to 100 klm out ) - ( It should say the accuracy of the location based on several algorithms )
So the GPS location might be the radio tower your Android is connecting too, It could also be a WiFi Hotspot that your device is recognizing or it could be your Device hasn't found enough satellites to calculate an accurate location yet ( it usually warms up and calculates the location within 1 meter accuracy at 3seconds - so pay attention if it's GPS based accuracy or Network Location based accuracy ).
As for text messages ... It honestly sounds like you're lying at this point, but it is possible... Some applications can take control of your phone completely through sms commands, the device gets a message and the application hides it from the user, the message tells the app to send back the (eg. call log ) and the app sends a silent message with the information requested by the command SMS ) ... These apps are called SpyWare or MalWare ( Spying & Malicious ) you should open Setting's, Apps, and look through your apps, searching online for each one your unsure about.
P.S Some apps send messages in the background for certain thing's like verifications via SMS etc....

Google logs my activities wrong


Freelancing as Physicist / Mathematician

Question: I am looking for freelance jobs that would allow me to work remotely and part-time. From what I see, apart from coding jobs (most of which seem to be full-time), only jobs as scientific editor come up. Does anybody have any experience of freelancing as a Physicist/Mathematician with academic background? What would be your suggestions in terms of websites, job titles to look out for, etc.?
Answer: A third area, in addition to @MichaelLai's first two, might be financial services. But, alas, that would also be lots (and lots) of programming. However, you'd also be developing models requiring lots of math.
I have an ms in physics, but most of my work has been programming models for the financial services industry in New York City. For instance, binomial tree models (e.g., https://en.wikipedia.org/wiki/Binomial_options_pricing_model) to solve the Black-Scholes equation (e.g., https://www.hoadley.net/options/bs.htm) Take a look at those pages, and I think you'll agree that your math background will be put to pretty good use (albeit lots different from C*-algebras, etc:).
Also, my experience is mostly contract programming in New York City, where financial services comprise a large segment of the city's economy. I know nothing about San Diego. And also, although contract programming is typically hourly, I've usually been expected to put in hours that amount to full-time work, or even more hours. However, on various occasions I've had fixed-price contracts, where you agree to deliver a product/project for an agreed-upon fixed price regardless of the hours spent. Then your hours are up to you, although the contract usually has a calendar time-frame for various deliverables leading up to the finished project. And that can be a daunting constraint, depending on how well your experience has prepared you to develop the model.
Answer: I think that two of the areas that you can definitely look into would be in the area of AI/machine learning for something more specific, or you can brand yourself as a data scientist if you just want to do general data modelling and analysis of 'big data'.
Most people that I know who are well-trained in the mathematical sciences seem to be picking up work in this area.
Answer: From my own experience (as a physicist with research experience):

Data science and Finance seem like obvious choices... however both these fields seem to require a great deal of learning and practice before one becomes competitive and can have an edge due to rigorous training in physics/math.
Scientific writing or vulgarization (writing about science for laymen) might be good as side jobs, but certainly not as a full-time activity: the time one invests in researching the subject and actually writing is not justified by the earnings.
Doing homework and final projects for students is an area where contracts are easy to find and carry through, but there is no much money there... and there are obvious moral issues involved.
Doing actual projects for small companies is good, if you already have some research experience (i.e., for those with postdoc, PhD, or at least Master experience). The clients however are hard to find, although they usually come with long-term contracts.
Comment: I recall an awful experience with a small company willing to implement things they thought to have seen in scientific papers. The whole project was a complete failure due to their expectations too high, lack of realism on the workload and inability to assess the mathematical methods.
Comment: @HarryCover My best experiences were with the small companies headed by former scientists, knowing what to expect and do not expect from me. I did have negative experience with a company that wanted a scientist, but expected me to function as code developer. Another client asked me to "simply write the formula", while I was suggesting to do a bit of data analysis to determine what formula may actually be relevant. Then there are those who ask to do literature survey, evaluate feasibility of a project, etc. - this is a reasonable approach, when they agree to pay for the time that you invest.


Enable Virtual Com port, serial connection (update)

Question: I'm working with an IMX6 board, running a linux kernel, u-boot, and rootfs that were generated from yocto. I used one of the core images. core-image-minimal-dev to build the kernel image. I added in usbutils to as an image_install within the core-image-minimal-dev recipe.
I posted a previous question looking for support on getting power to the USB2.0 port, and that has now been addressed. What I'm looking to accomplish now is to get the device recognizable as a VCP. I need to connect a external device to the USB2.0 and be recognized as a tty connection. At this point when I plug the device in all i get is.
new full-speed USB device number 5 using ci_hdrc
usb 2-1: New USB device found, idVendor-10c4, idProduct=ea60
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: CP2104 USB to UART Bridge Controller
usb 2-1: Manufacturer: Silicon Labs
usb2-1: SerialNumber: 013C2C09

no changes occur in /dev/ directory as it should. I'm hoping to see something along the lines of /dev/ttyUSB0. Where I can then write an application that will communicate over serial using that port.
through my research I came across several references that virtual com port drivers are pre-built into the linux kernel. I found a set of instructions on the FTDI chip website with some instructions.
http://www.ftdichip.com/Support/Documents/AppNotes/AN_220_FTDI_Drivers_Installation_Guide_for_Linux.pdf
I went through the steps to add a new rule for the FTDI VCP.
I grabbed the idproduct number and idvendor number from when the device was plugged in. As I don't have the command udevcontrol_reload rules loaded into the os, I just did a power cycle. Unfortunately there was no luck.
Next I made changes to the kernel via menu configuration.
bitbake -c menuconfig virtual/kernel
USB_SERIAL_CONSOLE was already enabled on the board. Was labeled USB Serial Converter support
So I went and enable USB_SERIAL_CP210X  which was labeled as USB CP210x family of UART Bridge Controllers.
when I pressed, , I received a pop up.
This feature depends on another which has been configured as a module. As a result, this feature will be built as a module.
after USB CP210x was marked with an
exited out of menu config and proceeded to compile the kernel with
bitbake -f -c compile virtual/kernel
followed by bitbake core-image-minimal-dev
I still don't see a vcp populate in /dev/
I visited the linux kernel driver database and its reporting the USB CP210x family of UART Bridge Controllers has no dependences. So I don't understand why the popup said it had other dependencies.
The next thing I found in my research was the need to load the module into linux either via insmod or mknod. So I looked into that. Each of the references I found were directing me to compile some .ko files that were located in lib/modules/... /serial/ directory.  However, going through the rootfs for the os, I can't find a modules directory. either by ~/lib/  or by /usr/lib
(UPDATE)
So I've configured the defconfig so that
config_usb_serial
config_usb_serial_ftdi_sio

are both to be loaded and not as modules.
I found some helpful information that includes creating a mknod and then insmod.
$ mknod /dev/ttyUSB0 c 188 0
$ insmod /lib/modules/4.1.15-1.0.0+g3924425/kernel/drivers/usb/serial/usbserial.ko vendor=0x067b product=0x2303

for me I would want to use the cp2104 driver, instead of the generic. What I'm having issues with now is that I don't have a modules directory. Within the /lib/ directory where I should have a modules directory, there isn't one. Any insight into why im missing the modules directory?
Any suggestions?
Answer: Firstly if there's no reason for loading it (or it's deps) as a module, I'd look at building them statically into the kernel so you don't need to load them, or look at the distro you are using and how that loads modules.
If you think you've loaded the module correctly but you're not sure - use lsmod.
If lsmod is showing cp210 then you already have the module loaded and this is not your issue.
Comment: djsmiley2k, I'm new to yocto and manipulating kernels. When I attempted load cp210 it required me to do it as a module, as I pressed  and it defaulted to .

I attempted lsmod at your suggestion and the only  thing that was was returned looked like this  " Module                  Size  Used by"
That was all.


Is interest expense a cash flow transaction?

Question: I keep my personal finances on ledger (http://www.ledger-cli.org/) and I am working to create a cash flow report. For this report, I'm listing all the income and expenses of the month and all the payments I make to debt. I keep track of interest charges as an expense, so it's showing on this report but I wonder if it should. Should any charge on the credit cards be on the cash flow report for that matter?
Answer: Yes, "Interest Expense" is an "Operating cash outflow".
If it is booked properly on the income statement, it should easily be shown on the cash flow statement by the direct method.
By the indirect method, it will already be shown as operating cash flow by "Net income".


Why does SQOOP launch 4 mappers by default?

Question: I am just trying to understand why by default SQOOP launches 4 mappers? In some cases if we raise the mappers to 8, there are chances that could give us better performance. So, what criteria has been considered for choosing the default mappers as 4 ?  Thanks in Advance.
Answer: I will quote 7.2.4.Controlling Parallelism from Apache Sqoop's official site.
By default, four tasks are used. Some databases may see improved performance by increasing this value to 8 or 16.

Do not increase the degree of parallelism greater than that available within your MapReduce cluster; tasks will run serially and will likely increase the amount of time required to perform the import.

Likewise,

Do not increase the degree of parallelism higher than that which your database can reasonably support. Connecting 100 concurrent
clients to your database may increase the load on the database server
to a point where performance suffers as a result.

So your answer is Performance Issues. To achieve a better performance under normal conditions, this value was decided to be named as default. Hope that helps.


Does timing of emails matter?

Question: I wonder: everyone in academia handles a lot of email, on all aspects of their work. I mean, emails about conferences, emails about journals and papers, emails about research, teaching, supervized students, and so on. So if you have a big announcement to send to many people (eg seminar or conference) does it matter WHEN you send it? I mean, is it better to send it on Wednesday afternoon (middle of the week) rather than Saturday evening (middle of week end)? I imagine if people receive the email at time they are busy they possibly will overlook it.
Answer: First, I don't think it makes much difference. Researchers deal with information, and a lot of that information is communicated through emails nowadays. So, most researchers I know are very careful about their emails and read them thoroughly. Especially if you write to people who know you, your name should be enough for them to read your email through anyway.
But, I can understand if you have an important announcement to make to a large list of people (who don't all know you personally), you may want to "micro-optimize" this. I have done it in the past: having a call-for-papers email ready on Saturday, and waiting 'til Monday afternoon (US time) to send it, thinking people who read it with a fresh mind, and not alongside the batch of "week-end email" that they might triage on Monday morning. (Some people stay connected during week-ends, of course, and for those it makes no matter.)
Answer: Marketing experts advise to send emails on Tuesday, Wednesday and Thursday. They also advise to send the email early in the morning, so that they will be at the top of the pile for those that check their emails right after waking up/arriving at the office.
Sunday afternoon is also a good choice. If the receiver reads emails during the weekend, you will be one in a very few, and if the mail is read on Monday, it will be at the top of the pile.
Answer: My short answer is that I only send important email within working hours avoid early morning late afternoon hours. I usually get a very high reply rate with this technique as opposed to send email at midnight.
Comment: Is it reasonable to expect the recipients of "big announcement ... to many people" to all be within the same timezone? It is always midnight somewhere on this earth.
Comment: @WillieWong Technically, you're right.  However, if you are sending a conference announcement (for example), you are most likely targeting primarily *either* North America *or* Europe *or* Asia *or* Australia...  You will not get everyone, but often 80% of your target audience will be in a handful of timezones.
Comment: @DanC The _handful of timezones_ is actually around the globe. My time zone is Asia Pacific, UTC + 8. Monday morning 11 am US East (EST) is my Monday midnight. My current time 11:30 am is UTC 3:30 am.

Does timing of emails matter?


Can mining rewards be based on real world data

Question: Is is possible to replace mining as a guessing game where your chance of winning is related to the how quickly your machine can perform calculations compared to how quickly other miners are performing similar calculations with electricity generation data rather than a solution to a mathematical problem to generate block rewards.
Is it possible to have the network generate a unique random number which is assigned to the transaction which records the successful production of a predetermined amount of electricity from data derived from an electricity meter, the electricity meter is attached to a network node and records and transmits transactions (data logs) to the network.
Each energy producer uses a smart meter to record their electricity production a computer with the blockchain installed which is attached to the meter that collects and transmits those transactions to and from the blockchain network, the transactions are validated and do not allow for conflicting transactions, the transactions are put into blocks of up to 2KB or about 70 transactions,  the M.I. devices compute cryptographic hashes until they find a block good enough to count, the block  is then submitted to the blockchain network which earns the energy producer a reward.
Every electricity producer that produces the require amount of kWh of electricity will have the same chance earning a reward as it is a guessing game where your chance of winning is related to the how quickly you produce the electricity, and not how much processing power you have.
Comment: It would be difficult to prevent cheating.
Answer: This is not really possible: other participants can not provably verify the output of the electricity meter. What if it is malfunctioning or modified by a malicious entity? Proof-of-work has the key advantage of being independently verifiable. Anyone can compute the blockhash and see that it is smaller than the target without any additional information or having to trust anyone.
Comment: "tampering is a criminal offence" - the whole point of [open] blockchains is to avoid the "call the cops" security model. Sure, if you trust the government and the police to act in your best interest, this is fine, but for the majority of the global population this is a bad security assumption.
Comment: The electricity meters are attached to network nodes, and this data is transmitted to the network every 5 minutes
Comment: The meters are class 1 smart meters ,they communicate every 5 minutes to the energy utilities, any tampering is a criminal offence. Every participant in the system has a smart meter and a computer with a network node that communicates both electricity consumption and production with every other participant in the network on a 5 minute interval


Can I use these letters of reference later?

Question: I was working with some startups as their tech advisory and with some others as tech lead. But now I want to concentrate on my main goal, that is research. That requires me to work with researchers and study. So I asked people I was working with, for a recommendation letter. As I am aiming towards Waterloo for my masters for research. The real problem is I was not so much focused on my academics as I was busy here. Though I still have last two years to cover up at Waterloo, usually checks last two year scores. I just want to know will these LORs will help me, when I will apply, in Waterloo, after my engineering and giving my GRE.
Answer: I suggest that if you want letters that won't become relevant for a few years, that you tell the writers that so that they might be able to update their recommendations at the appropriate time, without forgetting you. Keeping in touch is also useful for that.
I don't know the procedures at Waterloo, but some universities require direct transmission from the writer, not the candidate.
Whether they help or not depends on too many things, including the unknown future, to comment directly. But having the "on the shelf" is probably useful.
Comment: Actually yes, that's what my end goal is. that if for some reason, i couldn't get writers to update it, for any reason. I can explain my 2 year low performance in academics. and maybe at least, try to stand a chance, not just thrown out of consideration.


How to convert SFM models to Blender on a Mac?

Question: I want to convert some SFM models to Blender but all the conversion tools I can find (i.e. Crowbar) are for Windows only. Is there any way to port SFM models to Blender on a mac?
Answer: I know you asked this 8 months ago. but there is a way to install windows on a mac. it will partition your hard drive. it's dual booting. this is done by an official application included in macOS, called Bootcamp assistant. you'll need a 32GB or bigger pendrive, and a copy of windows (which is provided by Apple on the app's website) I've used it a lot. macOS can interact with the partitioned windows part of the hard drive, but it's read-only. (you can only open files from the drive, or copy them to a write and read the drive and modify the copy) unfortunately, windows cant interact with mac. to switch OS hold alt when booting up the PC and you'll see two drives. "windows" and "Macintosh HD" in that order. if you don't hold alt, it automatically boots on windows. I don't know if you can change it.


Why does the impeller of a torque converter sit behind the turbine?

Question: i saw this picture of a Chrysler A-727 TorqueFlite and it shows that the impeller actually comes after the turbine. Why is it done like this? Doesn't it make more sense to put the impeller before the turbine since the engine rotates the impeller? Why go to the trouble of putting the impeller behind the turbine?
Answer: Looking at the design, you can see the input shaft of the transmission goes all the way through the torque converter and sits in the front part where the turbine is. The splined part at the input shaft engages the turbine. The stator sits behind it (towards the transmission), which is attached to the TC shell. If this was done in reverse, stability would be sacrificed and the transmission input shaft would wear out quicker because there would be basically nothing supporting the turbine except the end of the input shaft. With it all the way through, the input shaft only needs to spin and is supported at both ends. I would lay wager the fluid could be made flow with either setup and work. This just makes more sense structurally.
Comment: @TimothyScherer - In the image you linked, there appears to be a rod which goes completely through the  TC, which would give everything support. It connects the left and right "Abtrieb" together. The difference is, the engine is combined at the front of the transmission and power is sent backwards, through a gear, re-oriented 90° to match the transmission orientations, then fed into the TC. If you look at it the TC it is setup the same way, with P (impeller) attached to the TC outer shell, L (stator) in between, and the P (impeller) attached to the output where it attaches to the drive.
Comment: i see thanks, so im guessing in this case in the picture in the link https://tankautomotives.files.wordpress.com/2023/01/leo1.png since TC is nowhere near the engine it will suffer in terms of stability and have less lifetime compared to the layout of torqueflite right? In this picture "antrieb" means the engine , P means Pumpenrad (impeller) , L means leitrad (stator) , T means turbine. So in this case the impeller comes first then stator then turbine and TC itself is nowhere near the engine.
Comment: ahh yeah i see now thanks a lot. I guess i should fix a couple sentences in that blog that i wrote now that i learned whats actually going on with that layout of TC. Also Here is link to whole blog if you are interested https://tankautomotives.wordpress.com/2023/01/09/leopard-1-transmission-and-steering-unit-zf-4hp-250-explained/


Volume of one equivalent of a gas

Question: How do we define an equivalent when we are not talking about any particular reaction? Like, we say that equivalent volume of Oxygen is 5.6L, so we have taken the n-factor to be 4, and in CO2 we take n-factor = 2.
What is the defining factor for an equivalent here?
Comment: In short, we don't.
Comment: There is nothing to define: it is the volume occupied by one equivalent of gas. What is the equivalent, depends on the reaction.
Comment: So how do we define the volume occupied by one equivalent of a gas?
Comment: I see, so we can't define the volume of an equivalent of a gas in absolute terms, that is without relating to a reaction? Thanks
Answer: The meaning of the word "equivalent" is relative to something. Fortunately, as a chemical term, that is still true. An equivalent is more completely called "a reaction equivalent" and is relative to the reaction. There are a few standard reactions (which are typically industry or discipline based) and it might be used usefully in limited (well constrained) situations. The problem is, especially when dealing with reactive gasses, that the words "uncontrolled" and "detonation" might also occur when explaining that you chose the wrong standard - the correct standard reaction is NOT always obvious or determinable in context. So, my best advice is that when someone uses "equivalent" ask what reaction, specifically, they are referring to. And when using the word yourself, always note the context. Examples: NCO equivalents, H(0) equivalents, H(+) equivalents may all refer to the same compound but would have different values.
Answer: You do not need to define the volume equivalent of a gas in relation to a reaction: you define it in relation to the number of molecules in the gas (or, more conveniently, the number of moles which is a convenient unit to measure the number of molecules).
Since ideal gases occupy the same volume if they have the same number of moles of their constituent molecules, volume (at constant temperature and pressure) is a proxy for the number of moles.

Volume of one equivalent of a gas


How do I know which of my laptop GPUs are running games?

Question: My laptop has 2 GPUs, one of them is the default Intel HD Graphics 3000, and the other the Nvidia Geforce GT 630M. Obviously I want to use the 630M to play my games. How can I assure this is happening? When I go into Start → Run → dxdiag and look at the Display tab, it says that I am using the Intel HD Graphics Family for the display. Does this mean it is being used for games too?
Comment: What OS are you using?
Comment: Generally, if your laptop gets hot enough to boil water on, it means your nVidia card is being used.
Answer: On the NVidia Control Panel you can choose which graphic card to use, but you can not know which graphic card is running.
If you just want to know which graphic card is running, you can have an icon in the notification area which show the running graphic card.
Here is the explanation to enable it according to acer website:

1 - Click Start and then Control Panel. Select Classic View from the
  left side of the window.
2 - Double-click NVIDIA Control Panel.
3 - Click View and next Display GPU Activity Icon in Notification Area.
4 - Click the new icon in the notification area. A pop-up will show applications using the   NVIDIA graphics. When the NVIDIA
  graphics is not used, it will show None.
Comment: I believe this is the answer the OP is looking for.
Comment: In german it is in the menu "Desktop" and then "GPU Aktivitätssymbol im Infobereich anzeigen"
Answer: In the Nvidia Control Panel you can specify which GPU to use on a per EXE basis, or which once is on by default. If you are getting poor performance add your game's EXE to the list under Program Settings or temporary change the value in Global Settings.

I know for Minecraft I had to add Java.exe to my program settings list for it to use the better GPU
while running the game.
Comment: Thanks for the reply buddy, I'll give that a try - do you know if there is anyway to literally just disable the intel one or make sure that the 630m is default for everything?
Comment: Yes, under `Global Settings` select `High performance NVIDIA processor`. Note that you will have a shorter battery life when you are not plugged in and a higher average temperature as programs that don't need the hotter, more power hungry, GPU will still use it anyway. If you are getting bad FPS, then force it to the Nvidia GPU, otherwise just let it autoselect.
Answer: Another quick option is to open the windows task manager (ctrl + shift + escape ) and go to the performance tab. There you will find both graphic cards and their usage.
task manager


Are these walls load bearing?

Question: Looking purchase this house, however, want to remove the bar and closets in "red", could that whole area be removed, or are those load-bearing/structural walls? The original structure for this house was a single story and these current plans are the proposed extension, upwards. Any help will be really appreciated.
Comment: They could be. Do you have the structural plans as well? That's what I need to be able to tell.
Comment: Hi represton,
The real estate agent doesn't have the structural plans, unfortunately.
Answer: No, the walls around the bar and closet do not appear to be load bearing walls, except I would not remove the North-South wall between the Kitchen and Lounge.
The dashed lines on the Ground Floor Plan indicate the structural floor framing for the the First Floor Plan (above).
As you can see, a steel beam has been added just South of the Bar area and extends over the Kitchen. However, none of the new floor joists rests on the walls around the Bar, except the North-South between the Kitchen and Lounge.
Comment: Thanks @lee-sam, that is very helpful, so if I am able to remove the walls, in "green" on the updated picture, that will work?
Comment: Yes, you can remove the walls marked in green. To check my answer, look in the attic and you'll see no beams, joists, posts, etc. resting on these walls.

Are these walls load bearing?


Download SharePoint Online built-in template?

Question: I know that, with custom scripting enabled, you can save a SharePoint Online site as a template and then download the .wsp solution to your computer. I was wondering if this was possible with a built-in template, such as STS#0 or WIKI#0?
Answer: Actually, I don't know exactly what you need to do to can help you further!
But if you are talking about accessing the default template physical path C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\sts that contains the site template files, so it's not possible to do that in SPO.
However, if you are thinking to create your own template that is identical to the built-in template like STS#0 and you would like to generate a WSP solution for that template,
So you can simply do that by creating a new site from this build-in template without doing any kind of customization, then save this site as a template!
In this case, you have already a wsp solution for your own site template that is similar to the built-in template.

Check also, Templates in SharePoint Online
Answer: I have tested with STS#0 template and it is supported to be saved as a template and download to local drives. (I cannot test with WIKI#0 since this template is not available in my tenant.)
If you cannot find the Save site as template option with custom script enabled in this site, you can use the following URL to redirect to the page:
https://<tenant>.sharepoint.com/sites/<site>/_layouts/15/savetmpl.aspx


How to fix cPanel after restore a droplet from snapshot?

Question: During the cPanel setup the hostname of the original droplet was set as: srv.domain.com
On DigitalOcean I made a snapshot and created a new droplet from snapshot.
I changed IP address in Basic WebHost Manager® Setup -> Basic Config on the new droplet.
After switching DNS to the new droplet when I open mydomain.com
I get errors:
SSL_ERROR_BAD_CERT_DOMAIN. The certificate is only valid for the following names: srv.domain.com, www.srv.domain.com
SSL report for srv.domain.com shows the Issuer - cPanel, Inc. Certification Authority
So what's happening is the web server for one domain uses different certs for other service domain. It is replacing the certificate to those used for service domains.
Answer:
Change IP:

Basic WebHost Manager® Setup.
Home » Account Functions » Change Site's IP Address.

Update license to match the new IP cPanel/WHM store.


Are the citrus seeds necessary when making marmalade?

Question: Are the seeds necessary when making marmalade to extract pectin? If so, should the seeds be whole or ground up? Is the best way to keep them separate with a cheesecloth bag? This recipe is with Seville oranges and low in sugar.
Comment: I never use the seeds when I make orange marmalade. There's plenty of pectin in the peel.
Comment: Padma could you please add the recipe (or it's link) you will be using to your question. Some marmalade recipes use/need the seeds, others do not.
Comment: @DebbieM I don't have the recipe. My mother makes it this way. But when the fruit is ground up in the food processor the seeds get ground up too and then she has to pick them out. (I'm trying to save her some work).
Answer: Without seeing the recipe and procedure, it is hard to say if the seeds are necessary, there are many recipes for Seville orange marmalade that don't call for the seeds, and some that do. There is a good chance that they aren't essential to the recipe, that being said:
There is pectin in the seeds of citrus, but there is no need to grind or chop them for it to be released. Tying them in a cheesecloth bag, that would be easy to remove after cooking, would be fine.
(If the recipe uses added pectin, then the seeds shouldn't be needed at all.)


With Oracle, how can I restore a table that I dropped accidentally?

Question: I have actually dropped instead of deleting a table in Oracle SQL.
Drop table emp;

Is there any way to retrieve it back?
Comment: Do you have a backup?
Comment: if you're lucky and it's still in the recycle bin, you can see those in SQL Developer on your connection tree and right click to restore them...otherwise, you're going to have to ask your DBA to restore it from a backup
Comment: Done it through sqlplus.
Answer: Actually there exists a way to retrieve back the dropped table. Please find the steps below. When you drop a table, the database does not immediately remove the space associated with the table. Instead, the table is renamed and, along with any associated objects, it is placed in the Recycle Bin of the database. The Flashback Drop operation recovers the table from the recycle bin.
Also please check if you are using oracle 10g and above too.
SQL> drop table vimal;

 Table dropped.

SQL> show recyclebin;
ORIGINAL NAME    RECYCLEBIN NAME                OBJECT TYPE  DROP TIME
---------------- ------------------------------ ------------ -------------------
VIMAL            BIN$c9/MeUSERvCmafRSweHlWQ==$0 TABLE        2017-01-   06:16:57:29

SQL> flashback table "BIN$c9/MeUSERvCmafRSweHlWQ==$0" to before drop;

Flashback complete.

SQL> select * from vimal;

NAME               ID
---------- ----------
f                   1

I request you to please read the oracle documentation for further clarification. Please go through them.
Reference can be taken from : https://docs.oracle.com/cd/B19306_01/backup.102/b14192/flashptr004.htm
Comment: http://elena-sqldba.blogspot.in/2013/01/how-to-retrieve-dropped-table-in-oracle.html
Answer: Use this:
select object_name, original_name, type from recyclebin;

Although the dropped table is renamed, it retains its data, you can easily "undrop" the table by using the flashback.
flashback table yourTableName to before drop;

Answer: Recovering dropped table is easy in Oracle, provided that the table was not dropped with PURGE option. In case the table is dropped and space occupied by the table is released and the table does not get moved into the recycle bin. But if table is dropped without PURGE option, Oracle has this very neat feature - Recycle bin, similar to the recycle bin in Windows. There are two recyle bin views in Oracle: USER_RECYCLEBIN and DBA_RECYCLEBIN, Synonym RECYCLEBIN points to your USER_RECYCLEBIN.
http://elena-sqldba.blogspot.in/2013/01/how-to-retrieve-dropped-table-in-oracle.html
http://www.dba-oracle.com/t_recover_dropped_table.htm
Comment: Does it have a version for Oracle (as per op's question)?
Comment: A upvote since you have given the correct reference and changed the answer.


Fetch DB results from TOAD for DB2 using Ruby

Question: How to fetch DB results from TOAD for DB2 using Ruby/capybara
Answer: Are you asking about TOAD, the DB client app? If so, Capybara is not the tool you should use as it only works for web apps (browser or headless browser tests). If you want to check the contents of a DB2 database using ruby then you could connect to it with ActiveRecord and run queries using that. On the other hand if you want to automate TOAD's user interface using ruby/capybara then you're out of luck - that's not possible.


Oracle partitioning scenario with primary key absolutely required

Question: Is there any partitioning scenario in which the partitioned table is absolutely required to have primary key?
Answer: Yes, reference partitioning requires a primary key on the parent table.

Reference partitioning enables the partitioning of two tables that are
  related to one another by referential constraints.
The partitioning key is resolved through an existing parent-child
  relationship, enforced by enabled and active primary key and foreign
  key constraints.

If you try to do this with a unique key instead of a primary key, you will get this error:
<code>ORA-02268: referenced table does not have a primary key
</code>
Comment: @M.Dawid You can partition index-organized tables too. Index-organized tables must have a primary key, but that is the requirement of the IOT, not partitioning.


Can I remove a virus by flashing my android?

Question: Guys my android is rooted, it was working fine . One day when I turned on my android many notifican like "setting has stoped" began to come . I was redirected to homescreen again and again . To remove this virus I reset my android tablet but even after factory data reset my problem was not solved . When I connected to wifi then automatically new apps were downloaded and I also noticed that wifi and unknown resourses were automatically enabled . I decided to reset my android again but there was again no improvement and some kind of porn apps became system apps . I also did hard reset but that also not worked . Now I am thinking to flash my android through SP Flash tool . Will it work?
Comment: It should work. By the way how did you root it?
Comment: I did it by the help of king root
Comment: so, was it like this from the time you rooted or after?
Comment: which device has the problem(which phone do you use?)
Answer: All this behaviour can occur if the application you used to root your phone installs some kind of malware or you get a malware at a later point. You cannot remove this by a factory reset as it does not remove root or system apps and does not rewrite the system partition. Your only rescue here is to download SP Flash Tool and flash your system image, as flashing a system image rewrites your system partition and will remove every unwanted app, but you will lose root. If you want to root it again use SuperSU with TWRP. It will not install any malware and your problem will get resolved.


How to find the sum and overpayment of three table values

Question: I need to find the each client sum of TotalAmount in Invoice_TBL and sum of TotalPaid in Payment_TBL. The below i have mentioned three tables.

Retrieve query answer should like below image from the above 3 tables.
Answer: Probably easiest to do with sub-selects:
select clientno
     , coalesce(totalamount,0) as totalamount
     , coalesce(totalpaid,0) as totalpaid
     , least(coalesce(totalamount,0)-coalesce(totalpaid,0),0) as overpaid
from (
    select c.clientno
        , (select sum(i.totalamount)
           from invoice i
           where c.clientno = i.clientno) as totalamount
        , (select sum(p.totalpaid)
           from payment p
           where c.clientno = p.clientno) as totalpaid
    from client c
)

If least is not availible in your DBMS something like:
case when totalamount-totalpaid > 0
     then 0
     else totalamount-totalpaid
end as overpaid

should do
A slightly different approach is to use LATERAL. I think this is called CROSS APPLY in sql-server. I cannot verify this at the moment so you will probably have to modify this:
select clientno
    , coalesce(totalamount,0) as totalamount
    , coalesce(totalpaid,0) as totalpaid
    , case when coalesce(totalamount,0)-coalesce(totalpaid,0) > 0
           then 0
           else coalesce(totalamount,0)-coalesce(totalpaid,0)
      end as overpaid
from (
    select c.clientno, i.totalamount, p.totalpaid
    from client c
    outer apply (
        select sum(totalamount) as totalamount
        from invoice
        where clientno = c.clientno
    ) as i
    outer apply (
        select sum(totalpaid) as totalpaid
        from payment
        where clientno = c.clientno
    ) as p
) as x;

Answer: I'm a fan of CTEs personally.  I'm not sure which of these will perform better though so you will need to do some testing.
WITH InvTotal AS (SELECT ClientNo, SUM(TotalAmount) AS TotalAmount
                    FROM Invoice
                  GROUP BY ClientNo),
    PayTotal AS (SELECT ClientNo, SUM(TotalPaid) AS TotalPaid
                    FROM Invoice
                 GROUP BY ClientNo)
SELECT Client.ClientNo, ISNULL(TotalAmount,0) AS TotalAmount,
        ISNULL(TotalPaid,0) AS TotalPaid,
        CASE WHEN ISNULL(TotalAmount,0) - ISNULL(TotalPaid,0) > 0 THEN 0
            ELSE ISNULL(TotalAmount,0) - ISNULL(TotalPaid,0) END AS Overpaid
FROM Client
LEFT OUTER JOIN InvTotal
    ON Client.ClientNo = InvTotal.ClientNo
LEFT OUTER JOIN PayTotal
    ON Client.ClientNo = PayTotal.ClientNo;


Serverless game server architecture

Question: First post on the software engineering stack exchange, I hope the question fits the purpose of this sub.
I'm building a serverless game server with the following architecture and was wondering if anyone here has already attempted this and if it's a valid strategy. Also if you're aware of any caveats I should know of, I will be grateful for any input here.
I've run into a problem here which I'm not completely sure how to address.
The infrastructure
I am using is AWS Lambda and SQS
How it works
The core of the game is intended to work as follows:
A game consists of a number of rounds.
Each round has a duration of 10 seconds, has one question and one correct answer.
Each player must have their answer in before the end of the round.
I.e. a game would look like this:
Game started at 10:00:00
round 1 starts at 10:00:00
round 1 ends at 10:00:10
round 2 starts at 10:00:10
round 2 ends at 10:00:20
etc...
My approach:
When all players have confirmed their participation, the game is created.
This will queue up a delayed SQS message that will trigger a lambda function for each round. Delayed by round number * 10 seconds each.
The code of this lambda function will simply round up all the answers that have been entered for its assigned round, assign a score to each and persist that to a DB and die.
The problem
Delayed SQS messages are cool and all, they do exactly what you'd expect, they only appear in the queue after your specified timeout, however, that is currently not a valid trigger for a lambda function. I'm aware SNS does serve this purpose but AFAIK there is no way to delay an SNS.publish() invocation.
What I'm bending over backwards here to avoid is to have a lambda function waiting for X amount of seconds until it publishes an SNS notification.
Are there any solutions that could help me approach my goal?
Thanks in advance
Answer: In AWS when you want to orchestrate this sort of thing, you want to look at using Step Functions. You can create the game event state machine with Step Functions.

Serverless game server architecture


Is it legal to develop a commercial player that a proprietary file format?

Question: I managed to reverse engineer a proprietary file format enough to be able to 'play' it. I am working on a project where I am building an app that reads these such a file and play it. Where do I stand legally if I want to sell this on steam or on a similar platform?
Comment: You're already admitting a major breach just by the reverse-engineering. Don't be naïve, dump the project.
Comment: Not so fast @Nij - if he decoded the format *without reference to any proprietary player* he may be on solid ground. Courts have gone both ways on this. - Of course he could be in the right and still be bankrupted by strategic lawsuit.
Answer: It depends on how you reverse-engineered the player, but the prospects are not good. In particular, it depends on whether you can do it without using the original program. For the most part, you can't buy software, you can only buy a license to use it, and the terms of use typically expressly forbid reverse engineering (even though copyright law would allow it, if you bought the software). The simple fact of the file format being proprietary does not mean that you can't create a conversion program, but you'd need some legal way to figure out what the format is, apart from using the software to determine what the effect of X is. If the EULA doesn't forbid it, then it is okay.


how to automatically reverse the direction of a stopped gear motor and restart 12 hours later

Question: The reversible gear motor needs to turn on @ 6:00 am pull a object 12 inches and shut off.  Twelve hours later the gear motor needs to turn on and reverse the direction and place the object back in place.  A timer would turn the motor on and a contact switch would turn it off but how would you get it to reverse direction and stop it at starting point?  What other pieces of equipment are required and how would it be wired.  The object being moved would be connected to a chain.  The object could also be connected to a actuator?
Comment: @Derekw what research have you done into solving this problem? Have you googled any sites that might offer this type of solution such as garage door manufaturers? If you have and they are inappropriate then please do add the reasons to your question so that we all don't go down routes that make no-sense (-1) for now but supply more info and it'll get better.
Comment: ac or dc power for the motor?
Comment: dc motor but could also use ac
Comment: i did not know where to start? The problem I want to solve is to build a automatic door so my chickens can leave their coop while I'm at work 1 am - 11 am. They then need to be closed in at night for protection while  I'm asleep. The web has sites that offer automatic door but there expensive and cheaply made (nylon cables and automatic blind motors)! The suggestion of a stepper motor sounds like it might simplify the solution. The ply wood sheet would only weigh 4 pounds.
Comment: car barrier actuators (like those used in car parks) are good for that sort if movement....the rest is timers and relays....
Comment: @Derek w Stepper motors are never a simple solution considering how you need to control them and of course the cost factor might easily prohibit them (inc. controller). Have you considered how automated cat flaps work? There are now a ton of questions in light of what you have disclosed and the really serious ones revolve around how complicated the door (not the opening/closing mechanism) has to be.
Comment: Another possibility is a satellite dish linear, actuator you can run them on 12v
Answer: Ah, the old chicken coop door circuit. I've linked to this so often on various forums, I wonder if I should just commercialize it and get it over with ;-)
The simplest way of doing this without involving electronics is to use two single pole double throw relays as an electromechanical H-bridge and two normally-closed limit switches that stop it when triggered. The relays are connected in such a fashion that activating one causes the motor to run in one direction until it hits a limit switch. The limit switch disconnects the relay coil and stops the motor. Then when the other relay is activated, the same thing happens in the other direction. The activation is done by two timers that provide contact closure outputs.

The inputs are "move door LEFT" and "move door RIGHT"
I first posted this design to www.backyardchickens.com about four years ago. I haven't built it myself, but the people who have say it works quite well and is simple enough for a non-technical person to understand.
Hope I described it well enough to understand.
Comment: THANK YOU FOR THE DIAGRAM. THE COMPONENTS ARE EASILY ACCESSIBLE AND TECH SKILL IS MINIMAL. I WILL GATHER THE PARTS AND GIVE THIS A TRY. THE GIRLS WILL BE HAPPY TO GET OUT EARLY AND STAY OUT TILL DUSK. THANKS DEREK W
Answer: Garage/Industrial doors open when you press a button and if you walk away they stop at the required point. If you press open when they are open they do nothing. Should you then press "close" they start to close and whether you are there or not they close and stop. This involves "knowing when to reverse the motor", "knowing when to stop" and "ignoring illegal commands".
Instead of the "open" button you had a timer that triggered at 6am. Instead of the "close" button you had a timer that counted 12hours from the open time.
Look up garage doors
Answer: (In addition to what @Andy aka said:) In general you could do this in one of two ways:

Open loop. This is where you assume that the motor is doing what it is supposed to do, but you don't check.
Closed loop. In this configuation you have sensors that provide feedback to the system.

So if you know that your motor will move your object 12 inches if it is turned on for 120 seconds, you could use an open loop. As @Kvegaoro implied, with DC motors, generally you just reverse the polarity to make them rotate in the opposite directions.
However, what you probably really want is a closed loop system: the motor is turned on by a timer (or a microcontroller), and some sort of switches (mechanical, optical, or otherwise) tell you when the object is in position so that the motor is shut off.
EDIT A: The usual type of circuit to control the direction of a motor is called H-bridge or "full bridge".
EDIT B: There are two ways to go: a circuit with a central brain, and one without.  The former might look something like this (under the assumption that your sensing switches are normally closed).  The timer would reverse the direction of the H-bridge output ever 12 hours. The diodes are there so that once a switch is tripped, the motor is still able to go in the other direction. You'd probably want flyback diodes there somewhere, given that the motor is an inductive load, but this is just a general sketch.

simulate this circuit – Schematic created using CircuitLab
Myself, however I would probably use a microcontroller or an Arduino: this will give you much more flexibility as to how the system is configured.
Comment: when the timer turns the motor on and the contact switch turns it off what is needed to reverse the polarity automatically and then turn it on twelve hours later day in day out?
Comment: The timer would be connected to a normally closed contact switch then to the motor.  How is the h bridge activated, does it have to have power all the time and how would it be connected to the timer,motor?
Answer: I'd suggest a stepper motor. This way, you can command the motor to turn an exact amount (revolutions and fractions of a revolution) in either direction.
Answer: I would take an arduino, some relays boards and a real time clock (a chip). The reversing of the engine is done by reversing the polarity. Easy to do with relais.


Meshing 3D surface data in python

Question: I have a dataset of 3-dimensional points for which I'd like to construct a mesh, using python. All the software I've seen requires that you provide the edges. Is there a program in python which takes as the input a set of points in 3D and output a mesh? If possible, I'd like the meshing to be uniform.
Comment: What is the geometry of the object that you want to mesh. The convex hull of the points?
Answer: If an unrestricted triangulation is OK, you can do it with scipy.spatial.Delaunay which uses Qhull.
Answer: CGAL (http://www.cgal.org) has a number of modules for triangulating points in 3D (surface meshes from points, triangulations of points in 3D, etc). Python wrappers for a subset of CGAL modules are available (https://code.google.com/p/cgal-bindings), including for 3D triangulations. I've used the CGAL C++ interface for triangulating points in 3D, but I have no experience with the Python interface.
Answer: You could try VTK which has a Python API. I would first try ParaView and bring your points into that and then try some of the filters (e.g. Delaunay). If the filters work in ParaView with your data (which is VTK based) then you can use VTK to do the job. How successful you will be will depend on what the points look like and how nicely they suit the filters.
If VTK looks like it will work, have a look at the Kitware tutorials on VTK as I know there is one that walks through using Python/VTK.
Answer: The Python library PyVista is a wrapper of VTK.
<code>import pyvista as pv
import numpy as np
import vtk

offset = np.array([0])
cells = np.array([8, 0, 1, 2, 3, 4, 5, 6, 7])
cell_type = np.array([vtk.VTK_HEXAHEDRON], np.int32)
pts = np.array([[-0.5, -0.5, -0.5],
                [-0.5, -0.5,  0.5],
                [-0.5,  0.5,  0.5],
                [-0.5,  0.5, -0.5],
                [ 0.5, -0.5, -0.5],
                [ 0.5,  0.5, -0.5],
                [ 0.5,  0.5,  0.5],
                [ 0.5, -0.5,  0.5]], np.float64)

grid = pv.UnstructuredGrid(cells, cell_type, pts)

deltess = grid.delaunay_3d()
edges = deltess.extract_edges() # or extract_feature_edges if you want only the exterior edges
edges.plot()
</code>
Answer: If you have the point cloud normals available (or can estimate them using local plane fits & can re-orient them), then Poisson surface reconstruction can give quite satisfactory results. In addition, a whole range of surface reconstruction methods are available, i.e. methods in Open3D or data-driven (learning based) methods such as DSE/IER.

Meshing 3D surface data in python


Is it safe to allot an IP address to a computer, and not running a webserver on it?

Question: I have a few instances running on the Amazon cloud. Some are DB-servers, some are blogs and one has my webapp. The DB-servers don't have apache or any other web-servers installed. So will it be safe to allot an IP to the DB-Servers?
Comment: @pauska, by default, Amazon EC2 instances only have a private IP address, and you can attach an "elastic" public IP to it as an add-on. I assume that is what is meant.
Comment: ...why wouldn't it be?
Comment: What does "allot" mean?
Comment: Also there are some limits to how many public IPs you can have IIRC.  Generally database servers should not need public IPs.
Comment: Thanks for the responses, @mfarver As it is, each server has a public DNS, So its easier to remember the IP, than the public DNS. The DBserver runs mongoDB.
Answer: Sure.  TCP/IP can be used for anything, including connecting to databases.  For instance, you might be interested in the MySQL wire protocol.
Of course, your database server must be properly secured.  You should be especially careful if it is accessible from the outside Internet.
See this article for how to secure MySQL.  Similar (but distinct) advice applies to other database systems.
Answer: Best practice as I've known it is to stick a firewall between any server & the Internet, NAT the public IPs to private, and open the necessary ports ONLY.  Absolutely lock that server down as described, but at the least, this will save your DB server from having to process all the random port scanning & scripted attacks.
Comment: Is this pattern called DMZ?
Comment: @halp: No.  DMZ is the common name for translating ALL ports on a particular public IP to a private IP, while Kara is suggesting only forwarding the few ports that are vital, and thus blocking public access to other services which might be vulnerable.
Comment: Figured I'd leave DMZ out of it, there's a sick amount of information if you pull up that tag. (there I go with the subtle hints)
Answer: If I understand mattdm's clarification to your question, then you are currently running DB servers in Amazon EC2 on instances that do not have public IP addresses. Not having any experience with any of Amazon's "cloud" offerings, am I correct to assume, then, that you access your DB servers from your other servers via some kind of Amazon-provisioned private network?
Anyway, keeping my (possibly way off-base) assumptions in mind, if your current setup works for you without assigning public IPs to your DB servers, then why change it? Giving your DB servers public IP addresses will make them (potentially) accessible from the internet at large, which will introduce security concerns that you will need to address. Since it is very easy to get security wrong, my answer to your question is No, unless you've already got a well-thought-out security infrastructure built up around your servers.
Comment: yea, your answer makes sense. I am a greenhorn in security matters. There is a public DNS for each server, granted by amazon itself. We can control whether the server gets a public facing IP address, ie elastic IP. And then we can also create security groups with firewall rules, and make servers part of those groups. atm I only have ssh and http ports open.


Tridion Keywords with special characters

Question: Can I have the special char (for example superscript, subscript) with tridion keywords/categories display text field and display that in Tridion DXA application.
Answer: I presume you're wanting to publish the keyword and use it for display in your output channel?
So you'll likely have noted that if you take formatted text and copy, say from Word, and then paste into the GUI you'll see all formatting (see the end of the post - some special characters are not considered 'formatting') removed - so that's not an option.

You can add specific HTML tags, such as , but these will be escaped and I'd avoid taking content from a user and directly uneconding to valid HTML.
You can use your own notation - you'll likely have seen square brackets used a lot - to indicate start and end of 'some' sort of formatting you require. Using this method your Content Delivery Environment decides on the required presentation (e.g. you may want superscript note1 in desktop/print but in mobile, (note1) is better) so "[sup]note1[/sup]" can now be displayed however your channel decides is best suited.
Of course if by 'special char' you mean specific characters such as copyright (©) where these can be pasted directly from applications such as Word.

Some things to watch for are
- Size of the keyword - there is a limitation and extra notation for formatting etc. will consume space
- Special formatted characters may cause issues with some types of output (for example, if you wanted to inject certain characters into a JSF tag it's likely going to cause problems)
- Put some consideration in to ensure you get the balance between the technical requirement and the editor experience right
Answer: The Keyword title and description are intended as plain text; they can be abused for formatted text as Mark explained.
However, Keywords can also have custom metadata. So, you could put formatted text in a Rich Text Field in custom metadata.  DXA will include Keyword metadata when expanding linked Keywords (for Keyword fields).  You can use DXA's semantic mapping to map Keyword metadata fields to properties on a Keyword Model.
Comment: I prefer this approach to Mark's, but unfortunately this is not possible for Categories. You **can** set a Metadata Schema (MS) for categories, but it just defines the default MS for all of its child keywords.
Comment: True. See https://community.sdl.com/ideas/sdl-tridion-dx-ideas/sdl-tridion-sites-ideas/i/sdl-tridion-sites-ideas/metadata-on-sites-cm-categories
Comment: Yeah, am familiar with this one, actually I was collaborating with Jan at the time when we needed this feature, hence the idea/request :)


Activity history report

Question: I have a report that provides a count of activities by sales rep.
I need to modify this report to count only one record per account/company.  In short, our reps are required to make X number of calls per week and I want to only count records once per account/company.  If they 'log a call' for ABC 5 times during the week, I want to only count it once.
Thanks!
Answer: You could use the "Power of one" trick as explained in How do get the count of distinct or unique parent records in reports? and Record count wrong in Report questions (I'm not sure whether we should merge or leave it as standalone Q).
Create a numeric "Count of Accounts" formula on Account (value should be just "1") and try to make an "Activities with Accounts" report.

There will be mismatch between Record count and your field which i think is what you're after.

Activity history report


What part is called the crust?

Question:
I'm actually a bit confused, and it seems like nobody here is able to tell me what is what. Is it just the "outer part" which is the crust, or all of the pizza on the picture? And if only the outer part is called crust, what's the whole thing called then?
Answer: In foods like pastries, the "crust" is generally the part made of bread or something similar. In a pizza, the crust is the bottom layer, usually made of bread or something similar, on which you put any cheese, sauce, and "toppings".

In the above picture, the crust is underneath and on the sides of this pepperoni pizza.  You may also notice it's a "cheese-filled" crust, meaning the outer edge has a hollow center filled with melted cheese.
In a pie, the crust is the outer "shell", that goes up the sides and sometimes completely covers the top:

In the above picture, the crust is what encloses the "filling" of the pie.  Here it's a full crust that completely covers the top, but in others it can be a "lattice" crust that forms a pattern over the top, or no top crust at all.
In bread, "crust" refers to the (usually harder) outermost layer.

In the above picture, the crust is the brownish part around the softer yellow part.  For example, some people like to cut the crusts off of their sandwiches before eating, preferring only the soft part of the bread.
Lastly, there are other foods that have a crust that is not made of bread but simply harder than the rest.  For example, a crème brûlée is a dish of custard where the top part has been caramelized (melted with a hot flame) into a hard shell.

In this dish the crust or shell is the thin top layer which you crack to get to the custard underneath.
"Crust" is not only used for food.  It can be any hard or solid substance that forms on the edge or top of some other substance, usually a liquid.  For example the outermost layer of the Earth is often referred to as the "crust", as it is outer to the semi-liquid "mantle".

Side note:  Now I'm hungry.
Answer: I can see your confusion. The photo you show could be called a pizza crust.

However the bits of pizza slices that don't have topping on them are called "crusts".

If someone asks you "do you eat the crust?" they are almost surely referring to the outer parts without topping (I suppose you could scrape the topping off the pizza and eat that, but that would be odd).
Comment: @P.H. You may wish to wait a while before accepting an answer (including mine), because a better one may come along.
Answer: I can't tell by looking at the picture what it is. If it's only baked pie dough, then it's all (and only) crust.
Crust:

[Merriam-Webster]
2 a : the pastry shell of a pie : piecrust
b : the bready layer that forms the foundation of a pizza

Pizza:

[Merriam-Webster]
a dish made typically of flattened bread dough spread with a savory mixture usually including tomatoes and cheese and often other toppings and baked — called also pizza pie

What part is called the crust?


Any frameworks that outline the requirement or recommendation of a Security Operations Center?

Question: We can all agree it's best practice to implement a SOC within an organization, but are there any frameworks or compliance requirements that specifically call it out?
Answer: I disagree with your premise.
"Monitoring" is required by many frameworks and regulatory requirements, but I'm not sure there is value in specifying the overhead of a SOC to implement monitoring so specifically.
Setting up a SOC is a natural consequence of being compliant with the various frameworks. In order to be consistent, to have staff on hand to respond, and having repeatable and consistent processes for monitoring and response can be done in a variety of different ways. Once the number of things to monitor, the number of events, and the number of incidents reaches a critical point, the natural next step is setting up a SOC.
Answer: In the PCI DSS, section 12.5.2 calls out the requirement to assign responsibilities to a person or team to "Monitor and analyze security alerts and information, and distribute to appropriate personnel."
It may not be spelled 'SOC', but it matches the definition.
Comment: But that requirement can also be met with a single part-time person. And that's not a SOC.
Comment: Whether or not the SOC is properly sized is up to the QSA. The DSS just says someone has to be responsible for those duties.
Comment: My point is: is a single part-time employee a "SOC"? I get the "monitoring" part (see my answer). I'm trying to get to, is that a SOC, and then, does the PCI-DSS description constitute a SOC?
Comment: The answer seemed to satisfy the person who asked the question. I think arguing whether or not a certain threshold should receive a special label is trivial and counterproductive to helping them.


Blender particle system with video layer

Question: Very new to Blender...but I'm attempting to create animated rain ripples with just a texture layer. I have set up a video layer as a plane in Blender then plugged it through a particle system to display across a plane. The only thing I can't figure out is how I can randomize the playback of the video layer so that the ripples aren't all playing back in sync. I know you can offset frames for playback, but I need to randomize it for the particle system. Is this possible?[
Answer: I'm afraid out of the box that is not possible. They all share the same material and therefore the same texture. If the texture is animated all of them will be in the same point of the animation.
Workarounds:

make 3-4 planes, add them to a group and instead of object in your particle emitter choose group and pick random. Then create 3-4 materials with the same image texture and offset them by n frames.
Use dynamic paint. It takes a little longer to bake, but you can actually use the result as a normal map, giving you much more realism. Or you can even bake the animation to vertices to get real displacement. Careful though for a large plane that could take a lot of vertices.
Comment: Thank you for the response. I actually don't need displacement for the ripples since it's so stylized, so I will try using the emitter with the grouped planes and multiple materials.


Magic VLSI D flipflop with IRSIM

Question: I'm working on a project in magic VLSI design tool and Ive been able to create a working D flip flop and simulated it correctly in the IRSIM. The end goal was to create a counter with D flip flops. Once I put the D flip flops into feedback they seem to break the simulator and refuses to act as they should in a normal Qnot to D feedback path. Is there something in IRSIM that I'm missing? I included my feed back testing with Qnot into D and forced a logic 1 into D and removed it and it oscillates, but doesnt change Qcurrent ever.
Answer: Don't try to change the data input and the clock at the same time. You are violating the setup and/or hold time of your latch. Try changing the clock value about half-way between edges of the data input.
By the way, what you have is a level-sensitive bistable element, which I refer to as a latch. I reserve the word "flip-flop" for edge-sensitive elements.
Comment: I added a set and reset and now it works correctly once I seed it with a 1 and remove it. Thanks
Comment: [link](https://imgur.com/a/mCveDIU)

Magic VLSI D flipflop with IRSIM


Tagging a PDF background image as background without tagging foreground content

Question: I have a tagged PDF that has a one remaining accessibility problem: some background images were never tagged as background images.  Is there a way to do this in Acrobat Pro DC without also tagging the foreground content (which is properly tagged)?  If I use the "Touch up reading order" tool, it seems I can only select a rectangle, then everything in that rectangle ends up getting tagged as background.  If I use the "Find Element" dialog, then press "Tag Element", there is no option to tag as background or artifact.
Answer: You seem to have experience tagging, so maybe this is off-base for your task, but when using the touch up reading order (TURO) tool, you should see the outlines of the objects on a page. In my example, the object that needs to be tagged as background can be selected by clicking on its number (in this case 1) and then clicking the background button in the TURO window.

********Edited based on comment
If the figure was never tagged as anything before, have you tried using the Content Panel instead of the TURO? You'll see the untagged content (elements outside of the containers--ignore "Annotations") here.
In this example, my untagged background image consists of two paths. I can right click on each and choose Create Artifact. Because these are both in a row, I can also select both together before creating an artifact, but never do that if there is anything in between the two.
Comment: I see the numbers (if `Show Page Content Groups` is checked, and `Structure Types` is selected), but I only see them for previously tagged objects. Untagged items (such as the background in question) do not appear to have the numbers.


frame_change_pre handler not getting called for scene strip

Question: I've checked out similar questions and I believe that this is a distinct question. I'm attempting to update a text object every frame based on an attribute on another object so essentially I'm just using the code from this answer.
import bpy

scene = bpy.context.scene
obj = scene.objects['Text']

def recalculate_text(scene):
    x = scene.objects['Cube'].location[0]
    obj.data.body = 'Distance in x-direction: {0:.1f} meters'.format(x)

bpy.app.handlers.frame_change_pre.append(recalculate_text)

My problem is that I'm referencing the scene that uses the frame_change_pre handlers from the sequencer as a scene strip. I attempted to refer to objects absolutely (as opposed to via the provided scene object):
import bpy

obj = bpy.data.objects['Text']

def recalculate_text(scene):
    x = bpy.data.objects['Cube'].location[0]
    obj.data.body = 'Distance in x-direction: {0:.1f} meters'.format(x)

bpy.app.handlers.frame_change_pre.append(recalculate_text)

But that hasn't worked either. The numbers just don't animate at all while rendering. (although the frame_change_pre handler works when I scrub around in the scene that has the Text object)
Any ideas about how to get a frame_change_pre handler to work with a scene strip?
Answer: The resolution to this problem was to use the frame_change_post callback to as described in this answer.


Computational Geometry journals

Question: What are good computational geometry journals? I'm also counting geometric modeling as part of computational geometry. Are there any good journals that are considered to be non-mainstream in the US?
Answer: I highly recommend Discrete and Computational Geometry: http://www.springer.com/mathematics/numbers/journal/454  If what you want is an excellent survey of materials related to discrete and computational geometry I also recommend this Handbook: http://cs.smith.edu/~orourke/books/discrete.html  edited by Joseph O'Rourke and Jacob Eli Goodman.
Answer: Computational Geometry: Theory and Applications and International Journal of Computational Geometry and Applications are the ones that focus on algorithms. For geometric modeling, there's Computer Aided Design, Computer Aided Geometric Design, Graphical Models.

Computational Geometry journals


Zend application and click fraud detections

Question: Hi i have an zend application which generate an ads based content, when a user signup he can start sharing the ads by just copy paste the URL in fb,tw or g+ . The problems is i had detected a several clicks from the same ip address from users...some goes 200 clicks within few seconds.What is best way to prevent multiple clicks from a similar ip address? need an idea in code form..Thanks
Answer: Due to network setup, one company with 1,000 employees could all have the same IP address.  If 200 of them all get an E-mail memo to click something, it could appear as if the same IP has clicked a link 200 times in a few seconds.  (My Company does this.  Though, we don't have 1,000 office employees.)  So you have to account for this if you want each of those people to be counted if they're individuals.
(1) One thing to do is to set a cookie on the first click and then ignore further clicks if they have that cookie.  This will help with the above as it will be per PC.  Since this scenario, you're not dealing with people likely trying to game the system, they will likely have Cookies enabled.
(2) Second thing to do is to store the IP address.  You can allow "x" number of clicks in a given timeframe and then start rejecting clicks from that IP address after that time, until "Y" amount of time has passed.  This will help with those trying to game the system and who will more likely not have cookies enabled due #1 above.
You could store these in a database with a timestamp and then just apply some business logic on the timestamp for what you want to accept in terms of "clicks per second per IP".
Now, this is all a fairly "uncomplicated" way of trying to prevent click fraud.  Search Engines and other business who sell ads employ a much more complicated logic for avoiding click fraud.  They will also look at metrics such as the user agent string, etc.
I hope that helps!
Cheers!


c# NetworkStream write() and read()

Question: I'm wondering how to stop Networkstream.Read() from blocking thread. I have separate thread where NetworkStream.Read() is waiting for data from server. Assume that user press some button that send some data to server. But I can't call NetworkStream.Write() while there is NetworkStream.Read() in other thread waiting for data. I can lock NetworkStream each time but NetworkStream.Read() will block thread so I can't send data until read at least 1 byte.
Answer: You can issue both read and write simultaneously as stated in the docs at MSDN docs

Read and write operations can be performed simultaneously on an instance of the NetworkStream class without the need for synchronization. As long as there is one unique thread for the write operations and one unique thread for the read operations, there will be no cross-interference between read and write threads and no synchronization is required.
Answer: You will need to use non-blocking read operation as described at : http://msdn.microsoft.com/en-us/library/system.net.sockets.networkstream.beginread.aspx
Answer: You might query NetworkStream.DataAvailable Property in some time periods and read only if it is true. "If DataAvailable is true, a call to Read returns immediately." So you won't block the stream.
Answer: The NetworkStream class provides methods for sending and receiving data over Stream sockets in blocking mode. For more information about blocking versus nonblocking Sockets, see Using an Asynchronous Client Socket

c# NetworkStream write() and read()


Is it possible to extract just the East and West horizon angles for a point in ArcGIS?

Question: I have a group of observer points that I need horizon angles for (just East 0 deg and West 180 deg).  I am thinking that I should be able to somehow extract these from the Viewshed, however the process is unclear.  Does anyone know how this could be accomplished in viewshed or another application?
Answer: It is possible but the process is not exactly simple.
The first step is to use Skyline tool to obtain skyline vertices (basically horizons). Then you need to convert vertices of skyline to points - tool Feature Vertices To Points. Based on observation point and points from skyline you can calculate distance and horizontal angle using Generate Near Table. From the result you can select your horizons - with angles 90 (East) a 270 (West) degrees (0 is North). With the knowledge of distance, Z value of skyline points and Z value + offset of the observer you can calculate the horizon angles.


Gaussian Process; Balanced Trainingset vs Imbalanced real-world data

Question: I am using a Gaussian Process model for probabilistic classification. My data covers two classes, let's call them "Sick" and "Healthy". For each of these classes, I have 5000 training samples. Although my data is balanced, the prior for being "Healthy" in the real world is around 100 times larger than that for "Sick". I want my model to take that into account when calculating probabilities.
I came up with two different approaches:
1) Give the model imbalanced training data, i.e. repeat the "Healthy" samples 100 times. But this will a) promote overfitting and b) make training and prediction really slow and expensive, so I don't like the approach very much.
2) Leave the Gaussian process model balanced, and adjust the probabilities afterwards, e.g. multiplying them with a prior or something like that - maybe there there is some Bayes-related rules on what to do. I don't know exactly how that should work, though.
Could you give me an opinion on my approaches and/or point me to a fruitfull direction?
Answer: I have now found a helpful piece of literature which basically answers my question.
In case others are interested, here is a publication that I found very useful:
M. Saerens, P. Latinne, and C. Decaestecker.
Adjusting the outputs of a classifier to new a priori probabilities: a simple procedure.
Neural computation
, 14(1):21–41, 2002


What are the different types of stores I should include when designing a town? (D&D)

Question: The other night I was designing the first town for my upcoming D&D campaign, and after a while I quickly ran into a wall: although I knew enough to include an inn, a fishing market (for the town's main export), and a few guard towers, I wasn't sure what other types of shops I should include. I know the generic types of stores range from things like blacksmiths and armories to enchanters and potion shops, but the subject matter seems so wide that I'm afraid I might forget something obvious and potentially ruin the sense of immersion for the players when my mistake is caught. So, something along the lines of a list with the types of shops that one can expect to find in a town would be greatly appreciated. Thanks in advance.
Comment: Why do you feel the need to predetermine every shop in the town? There is nothing immersion-destroying in telling the players that there are a couple of buildings or streets that are home to miscellaneous stores, giving a couple of specific examples. If the players ask for somewhere specific give it to them (or don't, based on the request) - you can add it in to the miscellaneous shops on the fly. Your time as GM is much better spent creating a story for the characters, not mapping out every piece of minutiae they may never even want/need/find.
Comment: This is probably too broad as is. There are hundreds of options for types of shops that might appear in a town. Generally, any tradesman that exists in the town would have a shop there. Consider this list of 100 medieval careers: http://abutterflydreaming.com/2009/02/06/100-medieval-careers/. Many of those could have an associated store front.
Comment: @Winterblood My concern with predetermining the stores was that I wanted to have a map of the town drawn out for the PCs, as I saw somewhere else that that was a good way to present a town to the players. I see what you mean, though, about my time being better spent on other things. I'll try to not scrutinize as much over these types of things.
Comment: @JamesGames2k Maps are good, but town maps either require tiny towns, tons of work, or that you leave most of the buildings unlabelled and fill things in as they come up.  Zoning is useful in the last case.
Comment: What size town are you trying to build?
Comment: @Shalvenay The town is going to be relatively small, with the population being mostly fisherman and traveling merchants.
Answer: The general answer
Think in terms of food, clothing and shelter.  Where do these things come from? How do they get made/repaired?  The more remote the town is, the more they'll be self sufficient in terms of basic necessities, but also the less variety of materials/products - and stores and workers there will be.  In some cases, it might be each family has someone in the extended family who can do one of the key tasks, and you better hope your uncles are good at carpentry or you'll just have to live with a leaky roof.
What's easy to do is instead of thinking of EVERY possible shop or workshop that you'd need, is think of where generally in town it would sit.  You have docks, so naturally fish, seaweed, local trade, and boat making/repair (hulls, sails, oars, nets) will be there.  If you have general sections of town, if a player asks, you can simply say "Oh, of course, it's in this section" and just declare there's an appropriate shop.
Specifics
There's been tons of sources listing out some of these things, ranging from AD&D costs of hirelings to things like Burning Wheel's lifepath system, to websites focused on historical living in ancient times.  This is a LOT of research and frankly I find it doesn't pay off in terms of fun in play to do, but you can try if you're really invested in it.
Immersion, what kind and how to make it easier?
First off, understand when people say "Immersion" they may mean many different things and what you are looking to do, probably doesn't depend on you having exactly mapped out each building, each inhabitant or every item in the game world.  It also doesn't depend on 100% historical accuracy.
In fact, unless you're playing a game about guilds instigating a trade war or attempting to crush out their rivals through clever engineering of regulations on the size and weight of bread loaves (which...happened actually in history...), odds are pretty good the players aren't going to be having the time of their lives shopping for stuff.

"I need replacement boots."
"The attendent spends 30 minutes shaping
  leather to get your foot size.  It's pretty uncomfortable and weird,
  but you spend the time watching the bugs on the wall.  A week later,
  your new boots are ready.  You pay by bringing two chickens, tied and
  carried by their legs, and one poops on the side of your pants before
  you step through the door."

If you're a new DM, you should probably think about what things the players find fun, if immersion's part of it, what definition of immersion they're using, and what techniques will help that, and what prep helps you make that happen without necessarily making a full list of shops.
For me - I write down what a town has good abundance of both in terms of resources and skilled people and where they are lacking.  "Fishing Village, knows local waters and weather, has skilled boatsmen in light craft, can repair simple things easily, and has a few trade languages they know well.  Has only basic and functional smithing and weaving."  With these notes, I just improvise the rest.
If you feel totally stuck, "Wait, there's someone who makes barrels? Oh geez, I didn't think of that!" - you can simply talk to your players as players - "Hey, I'm new at this, let's take 5 minute bathroom break and let me think about how that works."  But, odds are, unless you're playing a very unusual game, that this particular issue is probably not what your players are interested in.
Comment: The cool thing I've discovered when GM'ing is that most of the really awesome stuff the GM has is pulled off the top of his head. Generally, I write up an outline of the potential major characters and events of a session beforehand, and then for npc's I'll just make up a personality on the spot as needed. Makes the world seem more broad, and the players don't know you are struggling to keep up and think you planned everything out.
Comment: Yeah, I might have been freaking out a little too much over nothing. Sorry about that. I'll definitely use this advice in the future (if only to keep myself from trying to find a way to accurately price shoelaces), so thank you very much.
Comment: It's no problem - GMing seems like a big thing and honestly there's a LOT of people who are really into designing 200 NPCs for every town.  In my experience though, that's not the way most people get benefit in play from.
Answer: The easiest answer, if you aren't drawing it out, is to just say "Yes, there is in fact a shoe store: 'Jacksons's Imperial Boots Emporium.'"
I would also say that, unless it's exceedingly small (or perhaps, especially if it is such), then it would also have a trading center in the middle of town where people can just set up booths, instead of permanent stores.
Also, those inns should generally not be "The" inn, but one of a few inns, unless it's quite small. Having more than one of something lends legitimacy to the setting, especially if 2 have been parked right next to each other, and have an openly competitive relationship.
Without more specific details about the town, I can't really tell you much more. I assume it's a fishing town, as it's the main trade good. Food-based economies tend to have the largest markets/trading centers, and only occasional proper stores. So, you could probably really make the blacksmith "The" blacksmith who serves everyone.
I'd say that enchanters and potion smiths are wandering tradesmen, if I was doing it, as a small town just can't support the high prices that magical items entail.
Comment: Thanks, this helps a lot. I didn't intend to leave the town with only one inn, just I thought I might want to add shops before a second inn.
Answer: In the comments you mention that the town will feature a population of primarily fishermen and travelling merchants - use this to your advantage.
With even just a few travelling merchants in the town at any given time the timber and stone stores may be minimal in a small town situated on a trade route. A couple of permanent stores (general store, blacksmith) may be all that you need to define, with the travelling merchants providing most of the other goods that are on offer.
This also makes your mapping task easier - provide a couple of "real" stores, then most everything else can be found at either the town square/bazaar (if your town allows merchant stalls) or at the inn(s).
Also remember that in smaller towns one store is more likely to cover a wider variety of goods because there isn't a large enough population to warrant a whole store for a product. Your general store may sell clothing, pottery, adventuring gear and cookware, the inn may offer trail rations and common potions alongside warm meals, alcohol and beds, and your blacksmith may keep a small stock of magic items (not just weapons & armour) and leather goods.


Arbitrary motion of a normal mode

Question: If a system having rigid boundaries is set into vibration with just right initial conditions, it would vibrate at a certain frequency (normal mode). But why we take the general motion to be superposition of all the normal modes , under arbitrary initial conditions.
It doesn't make sense to me. Does this mean the system is vibrating at all possible frequencies at the same time?
Answer: Yes, in general the motion will involve multiple normal mode frequencies simultaneously.
For a familiar example of motion with multiple simultaneous frequencies, consider a musical instrument — a piano, say. When you hammer a piano string, the string produces multiple harmonics in additional to the fundamental frequency. These additional frequencies change the sound you hear, and the pattern of harmonics is what determines the timbre or tone quality of a given instrument. I've included a plot of the frequency spectrum of a piano note (source). The amplitudes in the plot correspond to the amplitudes in the linear combination of different normal modes.

Arbitrary motion of a normal mode