Сообщения

Сообщения за май, 2018

SQL Server - get first and last (by datetime) DataPoints value

I have two tables in SQL Server database: Meters:     MeterId int [PK]     Name varchar DataPoints:     DataPointId int [PK]     DateTime datetimeoffset     Value decimal     MeterId int [FK -> Meters.MeterId] What I need to do is to read the first and last datapoint's DateTime and Value for each Meter - the result table should look like this: Meter Name | First DateTime | First Value | Last DateTime | Last Value -----------+----------------+-------------+---------------+----------- I was able to write a query which would read min and max datapoint DateTimes for each Meter, but this query does not contain Value field: select     Meters.Name as [Meter Name],     min(DataPoints.DateTime) as [First DateTime],     max(DataPoints.DateTime) as [Last DateTime] from Meters left join DataPoints on DataPoints.MeterId = Meters.MeterId group by Meters.Name How to modify this query so th...

How to boot to new, cloned SSD and not old, source HDD

I recently got a new SSD and I cloned my old HDD to my new SSD. I was able to boot into Ubuntu 16.04 LTS after the cloning process,but when I put the old HDD back into the computer, the computer boots using the old HDD, and not the new SSD as it should. I used boot repair and selected my SSD as my "OS to boot by default" and it fixed grub. Now, when I select the SSD in the updated grub menu, it boots from the HDD instead. How do I fix this? Notes: I think it may have something to do with the UUID. My old HDD is found at /dev/sda2. I currently have Windows 7 installed, and booting properly from the new SSD using the grub menu and experience no issues with Windows.

problems while implementing tiny language parser in python

i was hoping if someone could help me in the implementation of tiny language parser. i was trying to implement the grammar of the tiny language (attached photo), but i have some problem with some functions; which are simple_exp, exp, factor, term. these function i have implemented some code in it based on the grammar but it keeps outputting errors. here is the code of the parser, i have put it in a list so i could control elements inside it import scanner3 def program(l):     if len(l) > 1:         if l[len(l) - 1].value is ";":             print("ERROR.. semi colon at last line")             return False         return stmt_seq(l)     else:         print("minimum num of expressions is not met")         return False def stmt_seq(l):     if stmt(l):         if l[0].value is ";":...

How to get rid of touchpad notification?

I'm running Ubuntu 18.04 on a Surface Pro 2, and nearly everything works out of the box. But: the single most annoying thing is a notification about something not working with the touchpad. It appears most of the time I click on left or right touchpad button. This is the notification. It's being displayed for 2 seconds. With 16.04, a similar notification was shown as one of those bubbles in the upper right corner, it wasn't that much in the way then. In fact the touchpad is working mostly. Right click doesn't work in shell. Hä? Does anybody have an idea how to get rid of this? Thank you.

Agenda de consultas em sql

Boa noite Pessoal, Tenho o seguinte problema, vou receber um banco com "x" vagas disponíveis em diversas especialidades e outro com "y" pacientes solicitando aquelas especialidades segue modelo das tabelas abaixo, teria que elaborar uma query que disponibilizasse as vagas para os pacientes que entraram em contato primeiro e solicitaram as especialidades da tabela vagas: Atualmente minha query está atribuindo todas as vagas para uma mesma pessoa e assim fica repetindo tentei utilizar CTE e select comum porém não tenho ideia de como aplicar essa condição. poderiam me ajudar pois não tenho ideia de como cruzar as duas tabelas dando suas respectivas vagas aos respectivos clientes.

Finding the Vertices of an Ellipse Given Its Foci and a Point on the Ellipse

The question is as follows: The focal points of an ellipse are (12,0) ( and (−12,0) ( , and the point (12,7) ( is on the ellipse. Find the points where this curve intersects the coordinate axes. I know that the center of the ellipse would be (0,0 ( ) because that is the midpoint of the foci. However, I am not sure as to how this information will help me in finding the intersections on the coordinate axes (or the vertices). Any help will be greatly appreciated.

Custom field update API

I am working in a sandbox, and using the Tooling API. I need to update the metadata of the custom field in Salesforce, but I am unable to do so. For this I am trying to work on the PATCH method. Below is the postman request i have used to update the custom field metadata: Method: PATCH URL: https://cs21.salesforce.com/services/data/v34.0/tooling/sobjects/CustomField/customfieldid HEADERS: Authorization : Bearer TOken Content-Type : application/json Body: { "FullName":"Contact.AFMO_Account__c", "Metadata": { "description": "test" } }

What's the safest way to turn left from a right-side bike lane?

(United States road configuration and customs here. Sorry, those of you who drive on the left!) On my trip home, I use a bike lane near the right side of a very busy one-way arterial street; there is a bus/right-turn lane between the bike lane and the curb. I need to turn left, crossing three lanes of traffic, at a T-intersection (no street to the right). My options are: Turn left directly from the bike lane. Keeping a weather eye on traffic, move into the left-hand lane and turn from there. Veer right onto the sidewalk (avoiding buses, obviously); wait for the pedestrian light to cross. Which of these is the canonically correct way to manage, assuming heavy car traffic?

How to overseed new sod on clay?

I have a new place on a quarter-acre lot. The sod has been out for a few months and still doesn't look like it has taken--even with regular watering. After reading a bunch of stuff online, I went out and bought grass seed, topsoil, and Milorganite fertilizer. I also have a grass seed spreader. I picked a roughly 100 sq. ft. section of lawn to experiment on and did the following steps: Mowed to the lowest setting Raked the grass with one of these kinds of rakes (Note: this pulled up a little sod, but mainly just showed me how much dead grass was just sitting there) Spread seed Used a whole bag (25 lb I think) of Scott's topsoil, and tried to spread it as evenly as I could (this was a surprisingly grueling task--the rake may not have been the best). This seemed to barely give me any coverage though... Drizzled the Milorganite fertilizer on top, and raked over everything again to spread it Watered Did I do this right? The initial result is pretty uneven looking currently...

ssdfdfsd

sdfsdfsdfsdf

Show that limn→∞∫

1 0 g(x)f(nx)dx=(∫ 1 0 g(x)dx)(∫ 1 0 f(x)dx)I am new to this type of mathjax formatting, so feel free to refine this question. I've tried my best with the formatting. Anyway, this is a question I've encountered in a homework sheet, and I do not even know where to begin: Let f:[0,∞)→R be a continuous real valued function such that f(x+1)=f(x) for all x≥0 . If g:[0,1]→R is an arbitrary continuous function, show that lim n→∞ ∫ 1 0 g(x)f(nx)dx=(∫ 1 0 g(x)dx)(∫ 1 0 f(x)dx). We were given a hint: ∫ 1 0 g(x)f(nx)dx= 1 n n ∑ i=1 ∫ i i−1 g( u n )f(u)du, and put t=u−i+1. I have absolutely no idea where to begin. My thoughts are that this question will involve the use of Lebesgue's convergence theorem, and perhaps the monotone convergence theorems. I have a very basic understanding of these theorems but still struggle when they need to be applied. My understanding is that: Function must be Riemann Integrable fn→f almost everywhere |fn|...

Show that limn→∞∫

1 0 g(x)f(nx)dx=(∫ 1 0 g(x)dx)(∫ 1 0 f(x)dx)I am new to this type of mathjax formatting, so feel free to refine this question. I've tried my best with the formatting. Anyway, this is a question I've encountered in a homework sheet, and I do not even know where to begin: Let f:[0,∞)→R be a continuous real valued function such that f(x+1)=f(x) for all x≥0 . If g:[0,1]→R is an arbitrary continuous function, show that lim n→∞ ∫ 1 0 g(x)f(nx)dx=(∫ 1 0 g(x)dx)(∫ 1 0 f(x)dx). We were given a hint: ∫ 1 0 g(x)f(nx)dx= 1 n n ∑ i=1 ∫ i i−1 g( u n )f(u)du, and put t=u−i+1. I have absolutely no idea where to begin. My thoughts are that this question will involve the use of Lebesgue's convergence theorem, and perhaps the monotone convergence theorems. I have a very basic understanding of these theorems but still struggle when they need to be applied. My understanding is that: Function must be Riemann Integrable fn→f almost everywhere |fn|...

Firebase Auth returns wrong value

import android.support.annotation.NonNull; import android.util.Log; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException; import com.google.firebase.auth.FirebaseAuthInvalidUserException; import com.google.firebase.auth.FirebaseAuthUserCollisionException; import com.google.firebase.auth.FirebaseUser; import com.sachintitus.instafy.instafy.repository.Model.Status; public class FirebaseAuthentication implements Authentication {     public static String TAG = "FIREBASEAUTHENTICATION";     public Status userAuthStatus;     private FirebaseAuth mAuth;     public FirebaseAuthentication() {         mAuth = FirebaseAuth.getInstance();         userAuthStatus = Status.SIGNED_OUT;   ...

Firebase Auth returns wrong value

import android.support.annotation.NonNull; import android.util.Log; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseAuthInvalidCredentialsException; import com.google.firebase.auth.FirebaseAuthInvalidUserException; import com.google.firebase.auth.FirebaseAuthUserCollisionException; import com.google.firebase.auth.FirebaseUser; import com.sachintitus.instafy.instafy.repository.Model.Status; public class FirebaseAuthentication implements Authentication {     public static String TAG = "FIREBASEAUTHENTICATION";     public Status userAuthStatus;     private FirebaseAuth mAuth;     public FirebaseAuthentication() {         mAuth = FirebaseAuth.getInstance();         userAuthStatus = Status.SIGNED_OUT;   ...

Log Rotation Duplicating

My log rotation is rotating the already rotated files. How can I stop this? Here's my log rotation file: /srv/logs/httpd/example.com/* /srv/logs/httpd/sub.example.com/*  {     daily     size 200M     rotate 30     missingok     notifempty     sharedscripts     compress     delaycompress     postrotate         /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true     endscript } and my directories I want rotated are: /srv/logs/httpd/example.com /srv/logs/httpd/sub.example.com Currently my dir looks like this: -rw-r--r--. 1 root root    0 Apr 18 03:07 access.log.2.gz-20180417 -rw-r--r--. 1 root root    0 Apr 20 03:11 access.log.2.gz-20180417-20180418 -rw-r--r--. 1 root root    0 Apr 21 03:13 access.log.2.gz-20180417-20180418-20180420 -rw-r--r--. 1 root root    0 Apr 23 03:33 access.log...

Log Rotation Duplicating

My log rotation is rotating the already rotated files. How can I stop this? Here's my log rotation file: /srv/logs/httpd/example.com/* /srv/logs/httpd/sub.example.com/*  {     daily     size 200M     rotate 30     missingok     notifempty     sharedscripts     compress     delaycompress     postrotate         /bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true     endscript } and my directories I want rotated are: /srv/logs/httpd/example.com /srv/logs/httpd/sub.example.com Currently my dir looks like this: -rw-r--r--. 1 root root    0 Apr 18 03:07 access.log.2.gz-20180417 -rw-r--r--. 1 root root    0 Apr 20 03:11 access.log.2.gz-20180417-20180418 -rw-r--r--. 1 root root    0 Apr 21 03:13 access.log.2.gz-20180417-20180418-20180420 -rw-r--r--. 1 root root    0 Apr 23 03:33 access.log...

Is there a name for the abbreviated syntax used in signs?

For instance, a train sign might say South bound trains this platform rather than Use this platform to take a Southbound train. There is an interesting lack of articles and sometimes verbs, is there a name for this style (or a reason for it)?

Duplicate additional participant created during online payment(event)

In online event registration, duplicate additional participant created when user click continue button on review page after come back from Payment gateway(PG like Paypal Standard, Monerise) by clicking browser back button. Civicrm version: 4.6.2 Any fix? Thanks, Siv

split and capitalize

Challenge : Given a string split at specific positions and capitalize the first character of the given word. Capitalize the first word's first char if and only if it was already capitalized Input : A string s and a character c. Ouput : The string with each occurrence of c replaced with the first char capitalized Examples : Hello_world , _                 ---> HelloWorld me,no,like, ,                   ---> meNoLike you-got-it, -                   ---> youGotIt Am^I^clear, ^                   ---> AmIClear go!full!caps, !                 ---> goFullCaps weird&but&tRue, &               ---> weirdButTRue ProbleM1fixed1no,1              -...

Sending Emails using python 2 ERROR

I'm going to make this short so basically, I'm trying to send an email with text that says something. the following code it what I'm using:       import smtplib gmail_user = 'name@gmail.com'  gmail_password = 'password' sent_from = gmail_user  to = 'me@gmail.com'  subject = 'OMG Super Important Message'  body = 'blah blah blah this is a message' email_text = """\  From: %s  To: %s  Subject: %s %s """ % (sent_from, ", ".join(to), subject, body) try:      server = smtplib.SMTP_SSL('smtp.gmail.com', 465)     server.ehlo()     server.login(gmail_user, gmail_password)     server.sendmail(sent_from, to, email_text)     server.close()     print 'Email sent!' except:      print 'Something went wrong...' so where it says 'body' I can put like a variable not just a text and it would send. But now, when I send a program to someone and th...

How to select features for clustering to detect the number of different unique products in a search result?

I am trying to use clustering to determine the number of products in a search of products. So far I am using kmeans clustering. I have run into a problem where I cannot determine good features to use. Here are my clustering results for one search. As you can see, there is clearly three different groups showing up at the moment. However, when you look at the top terms of each cluster, there is a clear issue. A lot of the terms are repeating in each cluster. There is another issue, when I try to have the model predict which clusters a few test items are in, which are clearly different products, it says that they are in the same group. Here are the test terms: Adjustable DC-DC LM 2596 Converter Buck Step Down Regulator Power Module LW SZUS 10pcs Mini360 3A DC Voltage Step Down Power Converter Buck Module 3.3V 5V 9V 12V 5V Out, 6V to 12V In AMS1117-5.0 5.0V Step-Down Linear Voltage Regulator Module 10pcs Mini LM2596s 3A DC to DC Buck Converter Power Supply Step Down Module I have t...

Missing latexindent from TeXLive full installation

Even after sudo apt-get install texlive-full on Linux I'm apparently missing latexindent. I can't configure any command with this application within TeXstudio because I get the following, as an example: Error: Could not start the command: latexindent.pl -w "main".tex Same error within the terminal calling from the same directory where I downloaded latexindent from its GitHub repository. I checked for Perl in my system via info perl; it's installed. How is this fixed?

Как преобразовать вертикальную запись в горизонтальную?

Имеется файл iplir.conf (конфиг VipNet) например такой : > #commentary [id] id= 0x1a0e000d name= координатор2 filterdefault= pass ip= 192.0.2.9 ip= 192.0.2.10 tunnel= 192.0.2.201-192.0.2.202 to 192.0.2.201-192.0.2.202 firewallip= 192.0.2.11 port= 55777 proxyid= 0x00000000 usefirewall= off fixfirewall= off virtualip= 203.0.113.1 version= 3.0-670 #commentary [id] id= 0xffffffff name= Encrypted broadcasts filterdefault= drop filterudp= 137, 137, pass, any filterudp= 138, 138, pass, any filterudp= 68, 67, pass, any filterudp= 67, 68, pass, any filterudp= 2046, 0-65535, pass, recv filterudp= 2046, 2046, pass, send filterudp= 2048, 0-65535, pass, recv filterudp= 2050, 0-65535, pass, recv filterudp= 2050, 2050, pass, send [id] id= 0xfffffffe name= Main Filter filterdefault= pass [id] id= 0x1a0e000b name= administrator filterdefault= pass ip= 192.0.2.55 accessip= 203.0.113.2 firewallip= 192.0.2.6 port= 55777 proxyid= 0xfffffffe dynamic_timeout=...

What to say to in-law when their spouse has passed away

What would one say to their mother/father/brother/sister-in-law when their spouse has passed away? 「ご愁傷様でございます」「心からお悔やみ申し上げます」, which are the phrases one typically uses to convey their condolences, feels too distant but I am not sure there are other options available.

Why are quantum gates unitary and not special unitary?

Given that the global phases of states cannot be physically discerned, why is it that the quantum circuits are phrased in terms of unitaries and not special unitaries? One answer I got was that it is just for convenience but I'm still unsure. A related question is this: are there any differences in the physical implementation of a unitary U U (mathematical matrix) and V:= e iα U V , say in terms of some elementary gates? Suppose there isn't (which is my understanding). Then the physical implementation of c-U c and c-V c should be the same (just add controls to the elementary gates). But then I get into the contradiction that c-U c and c-V c of these two unitaries may not be equivalent up to phase (as mathematical matrices), so it seems plausible they correspond to different physical implementations. What have I done wrong in my reasoning here, because it suggests now that U U and V V must be implemented differently even though they are equivalent u...

Crypto: why is(n't) the following indistinguishable from random?

I'm reading these notes, trying to understand why Regev encryption is circularly secure. They say (at the very end) that the following pair of values is indistinguishable from uniform: ( a ′ −⌊ q 2 ⌋ u i ,< a ′ ,s>+e). (1) where q q is an integer, a ′ a and s s are uniformly selected vectors, and u i u is the i th i standard basis vector. e e is a small error term selected from a special distribution so that the pair ( a ′ ,< a ′ ,s>+e) ( looks like it was selected from the uniform distribution - this is the learning with errors (LWE) assumption. I can see why (1) would look uniform, however the original value they wanted to show was uniformly random was: (a,<a,s>+e+ s i ⌊ q 2 ⌋). (2) Where s i s is an element of s s , the secret key, and a a is another uniformly selected vector. In the notes they chose a' so that (2) = (1) and the claim follows. My question is, why was this necessary at all? Isn...

Robust significance test for rare events

Let us assume that we're sampling species and observe the sample of say N=1000 N events. The real distribution of species frequencies shows that they are extremely low, e.g. a log-normal distribution around p= 10 −8 p spanning two orders of magnitude, or an empirical distribution to be inferred from the fact that we've observed m=10 m events after sampling M= 10 9 M times. Any event that we observe will (likely) have a frequency of 1/1000 1 , and, according to Binomial or Poisson distribution we can conclude that the observed frequency is significant. My question is to how perform an appropriate statistical testing for such events that will be in line with basic reasoning and filter events that are expected to have 1 1 or 2 2 observations simply by chance. I would suggest that some form of multiple testing correction can fix the things, but I don't know if its the right way to go. Other suggestion is to go with Beta Binomial distribution or to util...

Robust significance test for rare events

Let us assume that we're sampling species and observe the sample of say N=1000 N events. The real distribution of species frequencies shows that they are extremely low, e.g. a log-normal distribution around p= 10 −8 p spanning two orders of magnitude, or an empirical distribution to be inferred from the fact that we've observed m=10 m events after sampling M= 10 9 M times. Any event that we observe will (likely) have a frequency of 1/1000 1 , and, according to Binomial or Poisson distribution we can conclude that the observed frequency is significant. My question is to how perform an appropriate statistical testing for such events that will be in line with basic reasoning and filter events that are expected to have 1 1 or 2 2 observations simply by chance. I would suggest that some form of multiple testing correction can fix the things, but I don't know if its the right way to go. Other suggestion is to go with Beta Binomial distribution or to util...

Bean initialization with no-default constructor and final fields in Spring Boot

In ConfigurationProperties class I have a Map like this: @ConfigurationProperties(prefix = "some") public class SomeConfigurationProperties {     private Map<String, SomeClass> map = new HashMap<>(); ... } And I want in mentioned SomeClass all fields to be final, so I had to implement no-default constructor and I am fine with that. The one who is not, is spring initializer, so before starting application, I got this error:  Caused by: java.lang.NoSuchMethodException: some.package.SomeClass.<init>() I can't set default constructor in SomeClass cause I will get final fields uninitialized: The blank final field somefield may not have been initialized How I should setup initialization of bean SomeClass with no-default constructor, but if it can be without XML Spring configuration, because I am using Spring Boot and don't want to mess up with that.

Converting dollar sign notation to dot notation

How would I make the following into the same function with dot notation?  print $ map (`elem` Emoji.table) keywords

Converting dollar sign notation to dot notation

How would I make the following into the same function with dot notation?  print $ map (`elem` Emoji.table) keywords

How to delete a folder in remote Windows from Linux

I am running automation tests on both local (Linux) and remote Selenium node (Windows). And I want to delete a folder created during test, using Java Runtime.getRuntime().exec. It works fine on local (Linux), but I have a hard time to figure out how to do it on Windows node. The following is my attempts: try {     if (rBundle.getString("RUN_ON").equalsIgnoreCase("local")) // delete folder temp on local (Linux) - it works         Runtime.getRuntime().exec("rm -rf " + System.getProperty("user.home") + "/Temp");     else // delete folder C:/Temp on remote Windows         Runtime.getRuntime().exec("rm -rf IEUser@10.2.2.240/C/Temp");         // Runtime.getRuntime().exec("rm -rf //10.2.2.240/C/Temp"); } catch (IOException e) {     e.printStackTrace(); } I try to delete folder C:/Temp on the remote Windows, but I don't have any success. I don't get any Exceptions, it went though that block. Obv...

How to delete a folder in remote Windows from Linux

I am running automation tests on both local (Linux) and remote Selenium node (Windows). And I want to delete a folder created during test, using Java Runtime.getRuntime().exec. It works fine on local (Linux), but I have a hard time to figure out how to do it on Windows node. The following is my attempts: try {     if (rBundle.getString("RUN_ON").equalsIgnoreCase("local")) // delete folder temp on local (Linux) - it works         Runtime.getRuntime().exec("rm -rf " + System.getProperty("user.home") + "/Temp");     else // delete folder C:/Temp on remote Windows         Runtime.getRuntime().exec("rm -rf IEUser@10.2.2.240/C/Temp");         // Runtime.getRuntime().exec("rm -rf //10.2.2.240/C/Temp"); } catch (IOException e) {     e.printStackTrace(); } I try to delete folder C:/Temp on the remote Windows, but I don't have any success. I don't get any Exceptions, it went though that block. Obv...

ROAS driving me crazy

Can anyone else help me please! I have all clients connecting to a L2 switch, these trunk (etherchannel) into another L2 switch, which then trunk (etherchannel) into another L2 switch (core) and these have a single trunk into the gateway switch. The gateway switch has a trunk to the gateway router, the gateway router has a standard port configured, it has a sub-interface for each VLAN along with the relevant encapsulation dot1q VLAN tag and it also has DHCP pools for each VLAN. Clients on the user access level are able to get an IP address from the DHCP service running on the gateway router. Clients are able to ping their gateways, they are able to ping other VLAN gateways, they are able to ping the gateway router VLAN1 address, however they are unable to ping ANY other VLAN1 address. These VLAN 1 addresses are able to ping any other VLAN1 address but are unable to ping any VLAN 10 or 20 address (gateway or client). All L2 switches have a default gateway using the sub-interfa...

tensorflow custom op gradient

We want to create a custom layer in tensorflow. Therefore, we decided to simply start with a toy example: a copy-Layer. After some try and error, we got to the point where it seems like the gradient would pass the right values through. However, in the second iteration the features get NAN's. It may be a simple mistake, but currently I can't see it. In general, I have two questions: Can someone spot the problem here and how to solve it? What is a good method to debug a tensorflow session? copy_op.cc #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" #include <stdio.h> namespace tensorflow { typedef Eigen::ThreadPoolDevice CPUDevice; typedef Eigen::GpuDevice GPUDevice; template<typename Device, typename T> class MyCopyOp: public OpKernel { public:     explicit MyCopyOp(OpKernelConstruction* context) :             OpKernel(context) {     }     void Compute...

What is the throttle setting of a piston aircraft during cruise?

I am learning to fly nowadays, I am sorry if this sounds like a dump question. What is the throttle setting of an aircraft during cruise flight? After stabilizing the flight after climb do i need to turn down the throttle?

A proton's weak charge is .0719. Is this dimensionless? A ratio?

A recent piece of major news in the physics world is that the proton's weak-force charge was measured to be .0719. Is that a ratio? A dimensionless number, with no units? The articles I read didn't say.....

Eclipse: Cant finish creating new C Project

Hello dear Eclipse developer, I am already pretty desperate about figuring out the following problem, and maybe you can be part of the solution. So heres the Context: I want to develop an application for a Nucleo STM32F401RE Microprocessor Developmentboard. To do so i need to set up the Eclipse Oxygen 3 IDE for my Windows XP x86 OS as descriped in this guide: https://www.carminenoviello.com/2014/12/28/setting-gcceclipse-toolchain-stm32nucleo-part-1/ In short: Install Eclipse Oxygen 3 Install C/C++ Development Tools Install the GNU ARM plug-ins for Eclipse Install the GCC ARM tool-chain Install the Build Tools Install the ST Link drivers for STM32Nucleo board Every Step worked as expected and as descriped in the guide so far. The next step is creating a test project, so I followed the project creation wizard for c/c++ projects in eclipse, which worked fine as well until i reached the very last step of the project creation wizard. The last step wants me to select the path ...

Check element-wise of netcdf data using R

I need some idea on how to systematically execute my meteorology finding sourced from netcdf data using R. I want to identify which coordinate on which hours on which days having horizontal wind larger than 40 m/s. If this is a single latitude and longitude, I can convert the data into ".txt" file and do the Boolean test in R. But this checking need to look at 6 hourly data for 30 days in a certain range of coordinate. Let say I have a box of coordinate, (long = 90 E : 130.5 E and lat = 4.50 S : 15 N). My idea is that the checking element-wise will looping in a range of latitude and longitude for each 6 hourly on each days, and then the result will be save as logical operator (yes/no @ 0101). Is this possible, or this can simply achieved using pattern recognition in Keras? This is my first time using netcdf in R, where should I start? Kindly help, Thank you..

Alexa Simulator “hangs”

I'm in my baby-steps in Alexa Skills development and I'm stuck in the testing part. It seems that the simulator just hangs. The bubbles wont go away and I dont get any some sort of a response. I made sure that the skill is configured using EN-US and that the Lambda function is hosted on US-East (N.Virgina). Not entirely sure what to do from here.

Meaning of a sentense

End of the tutorial course instructor told us "Before you relax into that warm feeling of accomplishment" What does mean? Thanks

Meaning of a sentense

End of the tutorial course instructor told us "Before you relax into that warm feeling of accomplishment" What does mean? Thanks

How to boot to cloned ssd ubuntu and not hdd ubuntu with both hard disk installed

I recently got a new SSD and I cloned my old HDD to my new SSD. I was able to boot into Ubuntu 16.04 LTS after the cloning process, but when I put the old HDD back into the computer, the computer boots using the old HDD, and not the new SSD as it should. I used boot repair and selected my SSD as my "OS to boot by default" and it fixed grub. Now, when I select the SSD in the updated grub menu, it boots from the HDD instead. How do I fix this? Notes: I think it may have something to do with the UUID. My old HDD is found at /dev/sda2. I currently have Windows 7 installed, and booting properly from the new SSD using the grub menu and experience no issues with Windows.

How to boot to cloned ssd ubuntu and not hdd ubuntu with both hard disk installed

I recently got a new SSD and I cloned my old HDD to my new SSD. I was able to boot into Ubuntu 16.04 LTS after the cloning process, but when I put the old HDD back into the computer, the computer boots using the old HDD, and not the new SSD as it should. I used boot repair and selected my SSD as my "OS to boot by default" and it fixed grub. Now, when I select the SSD in the updated grub menu, it boots from the HDD instead. How do I fix this? Notes: I think it may have something to do with the UUID. My old HDD is found at /dev/sda2. I currently have Windows 7 installed, and booting properly from the new SSD using the grub menu and experience no issues with Windows.

SAML bearer flow for retrieving an OAuth token gives an assertion error

i'm posting the following request; trying to get an OAuth token: POST /services/oauth2/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Asaml2-bearer&assertion=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzYW1sOkFzc2VydGlvbiB4bWxuczpzYW1sPSJ1cm46b2FzaXM6bmFtZXM6dGM6U0FNTDoyLjA6YXNzZXJ0aW9uIj4NCiAgPHNhbWw6SXNzdWVyPjNNVkc5OXF1c1ZaSndoc2xxMWRNS3cweVFoSm5pTDlTNVBCSVVOa2Q2OFB2bVlzTEpPRi4xRzQxNmx1eXM3SlJ0QTUuWUtqeTc2QVQ3d2U4NExfU2k8L3NhbWw6SXNzdWVyPg0KICA8c2FtbDpTdWJqZWN0Pg0KICAgIDxzYW1sOk5hbWVJRCBGb3JtYXQ9InVybjpvYXNpczpuYW1lczp0YzpTQU1MOjEuMTpuYW1laWQtZm9ybWF0OnVuc3BlY2lmaWVkIj5uYXNlZW1AdmF0aXQuY29tLmRldg0KICAgIDwvc2FtbDpOYW1lSUQ+DQogIDwvc2FtbDpTdWJqZWN0Pg0KPC9zYW1sOkFzc2VydGlvbj4NCg== HTTP/1.1 Host: login.salesforce.com Content-Type: application/x-www-form-urlencoded Content-Length: 0 Connection: Keep-Alive The unencoded SAML looks like this: <?xml version="1.0" encoding="utf-8"?> <saml:Assertion xmlns:saml="urn:oasis:...

Probability distribution whose moments are 2n choose n

The probability distribution whose odd moments are zero and whose even moments are the catalan numbers is the semicircle distribution. What is the distribution whose even moments are n choose n/2? Is there a good way of recovering a distribution from its moments?

Ideal generated by $x_1 - a_1, \dots, x_k - a_k$ is prime in polynomial ring over integral domain

I would like to show the ideal $P_k = \langle x_1 - a_1, \dots, x_k - a_k \rangle$ of $R = F[x_1,\dots,x_n]$, where $F$ is a field, $k \leq n$ and $a_i \in F$, is a prime ideal. In the case where all $a_i = 0$, I think the natural isomorphism $R/P_k \rightarrow F[x_{k+1},\dots,x_n]$ allows us to conclude $R/P_k$ is an integral domain completing the argument. But in the case of general $a_i \neq 0$, I can't see how to set up a similar isomorphism neatly. Also, am I correct in thinking the result holds if we replace $F$ with any integral domain?

Even moments = 0 iff $X=0$?

Kind of a dumb question. I wasn't able to find this in probability texts, either elementary (Larsen and Marx) or advanced (David Williams), so it's probably wrong. Is this false? Let $X$ be a random variable s.t. $E[X^n] < \infty \ \forall n \in \mathbb N$. $$(\exists n \in \mathbb N, E[X^{2n}] = 0) \iff X=0 \ \text{a.s.}$$ Pf: 'if' is obvious, and the conclusion can be strengthened from $\exists$ to $\forall$. 'only if' $X^{2n} \ge 0$. By Markov's inequality, $\forall a > 0$, $$P(X^{2n} \ge a) \le \frac{E[X^{2n}]}{a} = 0$$ $$ \iff P(X^{2n} < a) = 0 \ \forall a > 0$$ $$ \iff P(X^{2n} = 0) = 1$$ $$ \iff P(X = 0) = 1$$ QED Actually the assumption strengthens itself again from $\exists$ to $\forall$. Is that wrong? Also, what probability texts, either elementary or advanced, mention anything like this please? Advanced probability stuff: $X$ is a random variable in $\mathcal (\Omega, \mathscr F, \mathbb P)$.

Real symmetric matrices are diagonalizable.

How can I prove that real symmetric matrices are diagonalizable ?

method/function to generate the column names for a spreadsheet application similar to Excel

I'm trying to achieve the below output, e.g if i pass 5 to the function columnNames, it should print A, B, C, D, E and if pass 27 it should print A, B, C, D, E...AA, BB, CC etc. I need to work with the below code snippet and I only need to work on the columnNames method.   import java.io.*;     import java.util.*;     import java.text.*;     import java.math.*;     import java.util.regex.*; public class Tester {     static List<String> columnNames(int n) {         List<String> result = new ArrayList<String>();         return result;     }     public static void main(String[] args) throws IOException {         Scanner in = new Scanner(System.in);         int _columns = Integer.parseInt(in.nextLine().trim());         List<String> result = columnNames(_columns);   ...

Prove that the infinite intersection of Rn=[0,

1 n ]×[0, 1 2n ] equals (0,0)I understand that Rn is a subset of Rn−1 due to the Archimedean Property, however I don't understand why the intersection is (0,0).

Python Keep new words in dictionary by using key as prefix

I have a dictionary say, stringToListDict = {'foo' : [], 'bar' : []} Now lets say we do +foofoo stringToListDict = {'foo' : ['foofoo'], 'bar' : []} +barbar stringToListDict = {'foo' : ['foofoo'], 'bar' : ['barbar']} +foobarbar stringToListDict = {'foo' : ['foofoo', 'foobarbar'], 'bar' : ['barbar']} +notMatchingAnyKey Simply discard this new string. As you can see the added string goes by matching keys as prefix. I can do this by traversing through each key one by one of the dictionary till I get a matching prefix. But is there any other elegant or efficient approach? You don't have to worry of edge scenarios like what would happen if : stringToListDict = {'foo' : ['foofoo'], 'foobar' : [], 'bar' : ['barbar']} then +foobarbar FYI, this is not an assignment.

Possible height and size of a giant tree on an Earth-like planet?

I'm working on a story about another dimension of this same Earth but without the same human development and history. The land and natural conditions would be the same except for the ones directly affected/created by humans. In this dimension, I want a human society living IN tree cities (cities created inside giant trees). I've already though of the "technology" possible for that and how a few selected trees became giantic (short version: humans are really good at bioengineering in this dimension). The trees would be from different species autoctone to each the zone (Iberian peninsula, in this case). However, I'm not sure how big those trees could be but I'm sure there are physic limitations for that. I don't want a massive city yet I would like if it the tree could be big enough to contain a minimun of a thousand people but, hey, the more the merrier! So, basically, How big (height and witdth)could a tree be keeping the Earth physical laws? If you ...

Gergonne Point, can't find coordinates of points of tangency of the inscribed circle

This is my attempt to demonstrate properties of Gergonne point, but i'm new in mathematica and have troubles with finding points of tangency for inscribed circle... InCircle[{x1_, y1_}, {x2_, y2_}, {x3_, y3_}] := With[{ u = Norm[{x2, y2} - {x3, y3}], v = Norm[{x3, y3} - {x1, y1}], w = Norm[{x1, y1} - {x2, y2}]}, Circle[(u {x1, y1} + v {x2, y2} + w {x3, y3})/(u + v + w), 1/2 Sqrt[-(((u - v - w) (u + v - w) (u - v + w)))/(u + v + w)]]]; Manipulate[ Graphics[{Thick, Green, Line[{a[[1]], a[[2]], a[[3]], a[[1]]}], Red, Thick, InCircle[a[[1]], a[[2]], a[[3]]], Red, PointSize[Large],Point[{a[[4]]}]}, PlotRange -> 6.0], {{a, {{-1, -1}, {1, -1}, {0, 1}}}, Locator}]    

Need backup wallet each time after transaction sent?

Is it true, each time an amount was sent from a wallet afterwards need to do a backup, write down 12 words? Unfortunatelly I hade Copay, saved only before transaction was sent, and now I can not get back the remaining amount.

What can I do if my USB flash drive is write-protected or read-only?

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch. Why did this happen and what can I do about it? Is there a way to remove the write protection? (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives.) This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.

How is saltwater able to conduct electric charge between two wires?

Say I put some wires in a container filled with saltwater, but the wires do not touch, and I connect these wires to a battery: simulate this circuit – Schematic created using CircuitLab I know that the saltwater will complete the circuit, and some current will flow. But how can this happen? Do the electrons fly off one wire and jump through the saltwater to the other wire? Aren't the electrons stuck in the wire? Why would they be able to do this when there is saltwater between the wires, but not when there is air between the wires? If the electrons can't leave one wire, travel through the saltwater, and get to the other wire (can they?), then how is there a complete circuit?

How does LIGO detect Gravitational Waves if they bend both space and time?

Please note that this is not an inquiry into the mechanisms of technology that LIGO uses to detect gravitational waves. Also, I am not a flat-earther. I was watching physicists vs. flat-earthers debate (who knew reality could be up for debate) and a point was brought up by a flat-earther: "A core aspect of Einstein's relativity is that time and space are woven into a 4D spacetime. So gravitational waves warp space (the distance of LIGO arms that light must travel) and time (ticking of clocks slows for light). If the speed of light is constant, and time and space warp accordingly to keep it constant, therefore you won't be able to detect an interference pattern --> Einstein was wrong (if they detect something that means the speed of light wasn't constant, and if they don't then general relativity is wrong)." tl;dr the warping of space is cancelled out by dilation of time (to keep light's speed constant) so the photon will always be in phase and no in...