qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
38,470,462
I have the following: ``` public class Car{ public Car() {//some stuff } private Car [] carmodels ; public Car [] getCarModel() { return this.carmodels; } public void setcarModel(Car [] carmodels ) { this.carmodels = carmodels; } ``` Now on my test class, I have something like this ``` public void main (String ...
2016/07/20
[ "https://Stackoverflow.com/questions/38470462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3841581/" ]
Add a setter that accepts an index: ``` public void setCarModel(int index, Car carModel) { this.cardmodels[index] = carModel; } ``` Then, inside your loop, call ``` car.setCarModel(i, new Car()); ```
``` for(int i =0;i<5;i++) { car.getCarModel()[i] =new Car(); } ``` or Write another overloaded setter by passing index. ``` public void setCarModel(int index, Car c) { carmodels[index] = c; } for(int i =0;i<5;i++) { car.setCarModel(i, new Car()); } ```
38,470,462
I have the following: ``` public class Car{ public Car() {//some stuff } private Car [] carmodels ; public Car [] getCarModel() { return this.carmodels; } public void setcarModel(Car [] carmodels ) { this.carmodels = carmodels; } ``` Now on my test class, I have something like this ``` public void main (String ...
2016/07/20
[ "https://Stackoverflow.com/questions/38470462", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3841581/" ]
See the method `getCarModel`? That method returns a `Car[]` right? That means you can do anything you can do on an array on `car1.getCarModel()`! So how do you set an item at an index of an array? You do this: ``` someArray[someIndex] = someValue; ``` If we apply this to the array returned by `car1.getCarModel`, `...
``` for(int i =0;i<5;i++) { car.getCarModel()[i] =new Car(); } ``` or Write another overloaded setter by passing index. ``` public void setCarModel(int index, Car c) { carmodels[index] = c; } for(int i =0;i<5;i++) { car.setCarModel(i, new Car()); } ```
10,424,848
I have installed all the necessary files from android site, but when I run my emulator it just displays "ANDROID" and nothing else. I am using Intel Dual core (2.20GHz), ASUS motherboard and 3gb of RAM. Whats the prob I couldnt understand.. Even one of my friend using Intel Dual core(1.80GHz) with 1gb of RAM running sm...
2012/05/03
[ "https://Stackoverflow.com/questions/10424848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349138/" ]
The emulator is slow becasue it is, of all things, emulating a completely different architecture (arm), and if it's the first time you've started it it has to create the memory file toi emulate the SD card you told it was there. My bet would be that you simply didn't wait long enough for it to boot up. You can save ...
The Emulator must be booting. Just waiting for it. The time is depending on your machine.
10,424,848
I have installed all the necessary files from android site, but when I run my emulator it just displays "ANDROID" and nothing else. I am using Intel Dual core (2.20GHz), ASUS motherboard and 3gb of RAM. Whats the prob I couldnt understand.. Even one of my friend using Intel Dual core(1.80GHz) with 1gb of RAM running sm...
2012/05/03
[ "https://Stackoverflow.com/questions/10424848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349138/" ]
The emulator is slow becasue it is, of all things, emulating a completely different architecture (arm), and if it's the first time you've started it it has to create the memory file toi emulate the SD card you told it was there. My bet would be that you simply didn't wait long enough for it to boot up. You can save ...
Or you might want to look at the GPU support that comes with the new SDK. It's much faster <http://android-developers.blogspot.com/2012/04/faster-emulator-with-better-hardware.html>
8,324,359
I am a beginner in Java programming. Using JavaMail API, I wrote a program to send emails. Now I need to create a front end and connect those. I use only Notepad to write programs, I don't use any IDE. How to create front end easily and connect to my program? My program is: ```java import javax.mail.*; import javax.m...
2011/11/30
[ "https://Stackoverflow.com/questions/8324359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1073084/" ]
1. Factor out a method which takes parameters and do the email sending. No system.out and system.in allowed in this method. 2. For a test, you can drive this method with your existing code parts which reads parameters from console. 3. Make a GUI form which contains all input fields and probably some button. Your code w...
You can make packages. Different Packages for different purposes. Like you can create a package to get only your front end classes and other package containing your above class to send emails. Then you can call methods of this class from your front end classes. For making front end, you can use Swings to create GUI ...
1,644,694
$$a^2+ab+b^2\ge 3(a+b-1)$$ $a,b$ are real numbers using $AM\ge GM$ I proved that $$a^2+b^2+ab\ge 3ab$$ $$(a^2+b^2+ab)/3\ge 3ab$$ how do I prove that $$3ab\ge 3(a+b-1)$$ if I'm able to prove the above inequality then i'll be done
2016/02/07
[ "https://math.stackexchange.com/questions/1644694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/300970/" ]
**Hint**: Let $a=x+1$ and $b=y+1$ (in the original inequality).
Follow [@BarryCipra](https://math.stackexchange.com/a/1644721/307483)'s hint of letting $a=x+1$ and $b=y+1$: $$(x+1)^2+(x+1)(y+1)+(y+1)^2 \geq 3((x+1)+(y+1)-1)$$ Expand the left side and simplify the right side: $$x^2+2x+1+xy+x+y+1+y^2+2y+1 \geq 3(x+y+1)$$ Simplify the left side and distribute the $3$ on the right si...
1,644,694
$$a^2+ab+b^2\ge 3(a+b-1)$$ $a,b$ are real numbers using $AM\ge GM$ I proved that $$a^2+b^2+ab\ge 3ab$$ $$(a^2+b^2+ab)/3\ge 3ab$$ how do I prove that $$3ab\ge 3(a+b-1)$$ if I'm able to prove the above inequality then i'll be done
2016/02/07
[ "https://math.stackexchange.com/questions/1644694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/300970/" ]
This type of inequality can be proved in the similar way like this: $$ a^2 + ab + b^2 - 3(a + b - 1) = a^2 + ab + b^2 - 3a - 3b + 3 $$ $$ = a^2 - 2a + 1 + b^2 - 2b + 1 + ab -a -b + 1 = (a - 1)^2 + (b-1)^2 +(a-1)(b-1) $$ $$\ge 2|a-1||b-1| - (a -1)(b-1) \ge 0$$ The last one comes from AM-GM inequality.
Follow [@BarryCipra](https://math.stackexchange.com/a/1644721/307483)'s hint of letting $a=x+1$ and $b=y+1$: $$(x+1)^2+(x+1)(y+1)+(y+1)^2 \geq 3((x+1)+(y+1)-1)$$ Expand the left side and simplify the right side: $$x^2+2x+1+xy+x+y+1+y^2+2y+1 \geq 3(x+y+1)$$ Simplify the left side and distribute the $3$ on the right si...
55,577,262
Using `@WebMvcTest` will auto-configure all web layer beans by looking for a `@SpringBootConfiguration` class (such as `@SpringBootApplication`). If the configuration class is in a different package and can't be found by scanning, can I provide it directly to `@WebMvcTest`?
2019/04/08
[ "https://Stackoverflow.com/questions/55577262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9773274/" ]
The following will point to the correct `@SpringBootApplication` class: ``` @RunWith(SpringJUnit4ClassRunner.class) @WebMvcTest(controllers = {MyController.class}) @ContextConfiguration(classes={MySpringBootApplicationClass.class}) public class MyControllerTest { //... } ```
If you are using ***@WebMvcTest*** for your test , it means you are focusing mainly on testing the spring mvc layer and not going any deeper into the application. > > So this annotation can be used only when a test ***focuses on Spring > MVC components*.** By default, tests annotated with @WebMvcTest will > also au...
10,537,897
How can I override spring messages like 'Bad Credentials'? I've configured my servlet context file with following beans ``` <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basename" value="WEB-INF/messages" /> <property name="de...
2012/05/10
[ "https://Stackoverflow.com/questions/10537897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/547750/" ]
It turns out that these beans should be defined in general application context and not in myservlet-servlet.xml file. Once I moved the definitions from servlet context it started to work as expected.
Use correct property name. Use basenames instead of basename
54,908,164
jQuery newbie. My goal is to loop through each article and append the img to the div with the class body. The problem is its taking every image and appending to the div with the class body. Thanks! My Script ``` jQuery('article .date').each(function() { jQuery(this).closest('article').find('img').after(this); });...
2019/02/27
[ "https://Stackoverflow.com/questions/54908164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10529685/" ]
You could slice a given array and take only five elements for getting an average. ```js function standardDeviation(array) { const arrAvg = tempArray => tempArray.reduce((a, b) => a + b, 0) / tempArray.length; return array.map((_, i, a) => arrAvg(a.slice(i, i + 5))); } var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]...
You could try using the slice() function of array element. ``` // simulated loop index var curr_index_pos = 3; // entire array var array_full = [1,2,3,4,5,6,7,8,9,10]; // array with 5 next values from "curr_index_pos" var array_5 = array_full.slice(curr_index_pos,curr_index_pos+5); var sum = 0; for( var i = 0; i ...
57,785,687
I have a Pandas Dataframe containing multiple colums of strings. I now like to check a certain column against a list of allowed substrings and then get a new subset with the result. ``` substr = ['A', 'C', 'D'] df = pd.read_excel('output.xlsx') df = df.dropna() # now filter all rows where the string in the 2nd column ...
2019/09/04
[ "https://Stackoverflow.com/questions/57785687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9360663/" ]
You could use [`pandas.Series.isin`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.isin.html) ```py >>> df.loc[df['type'].isin(substr)] year type value price 0 2000 A 500 10000 4 2006 C 500 12500 5 2012 A 500 65000 7 2019 D 500 51900 ```
you could use [pandas.DataFrame.any](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.any.html#pandas.DataFrame.any) or [pandas.DataFrame.all](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.all.html) if you want where all instances match ``` df.loc[df['type'].apply(lambda x: all( word in x...
273,530
Suppose $$y^{'}+p(x)y=q(x),\,\,\,y(x\_0)=y\_0$$ where $p$ and $q$ are continuous functions in some interval $I$ containing $x\_0$. Show that the particular solution is $$y(x)=e^{\int\_{x\_o}^{x}{p(t)}dt}[\int\_{x\_0}^{x}{e^{\int\_{x\_0}^{t}{p(\xi)}d\xi}q(t)dt+y\_0}]$$ I have no idea where the $\xi$ comes from. I can o...
2013/01/09
[ "https://math.stackexchange.com/questions/273530", "https://math.stackexchange.com", "https://math.stackexchange.com/users/54398/" ]
Searching for the method called **Variation of Parameters**, we will find out, for the linear 1-order differential equation $y'+p(x)y=q(x)$ where the functions $p(x), q(x)$ have the conditions as you gave them above; there is a solution like $y\_1(x)=\text{e}^{\int-p(x)dx}$.(You know all of these) The method goes furt...
if you multiply $e^{\int p(x)\text{d}x}$ to both sides of the equation,get: $$y'e^{\int p(x)\text{d}x}+p(x)ye^{\int p(x)\text{d}x}=q(x)e^{\int p(x)\text{d}x}$$ the above equation can be written as $$\text{d}\left(ye^{\int p(x)\text{d}x}\right)=\text{d}\left(\int q(x)e^{\int p(x)\text{d}x}\right)$$ then you can get the ...
377,587
I'm trying to use the `tikz-feynman` package to produce a fairly simple diagram, I produced the following plot: ``` \documentclass[tikz]{standalone} \usep...
2017/06/30
[ "https://tex.stackexchange.com/questions/377587", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/9585/" ]
Once the diagram has been placed with [Ti*k*Z-Feynman](http://jpellis.me/projects/tikz-feynman) ([CTAN](http://ctan.org/pkg/tikz-feynman)), you can access the vertices as you would with other coordinates in Ti*k*Z. In your case, you probably don't want to redraw the whole diagram as you want to make it salient as it i...
This is one case where manual placement can come to the rescue, if you want to do anything beyond the simple case of the question (with an s-channel 2-to-2 diagram and a single emission in the initial state). This gives you complete freedom on the look and feel of the diagram. ``` \documentclass[tikz, border=10pt]{sta...
24,981,863
In my iOS 7.1 application that I'm trying to develop, I need to figure out percentages of a specific number which is entered in a UITextField. It would appear when executing the code I get the wrong percentage of that number entered. I've tried two different ways to get the require percentage answer I'm looking for, h...
2014/07/27
[ "https://Stackoverflow.com/questions/24981863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3881740/" ]
Don't omit your brackets when performing calculations with code. For "250 x 1 - 72%" to get 70, you need to do this: 250 x (1 - 0.72) = 250 x 0.28 = 70 Formulas in () will be calculated first, followed by multiplication and division (whichever first), then followed by addition and subtraction (whichever first). So, i...
Your formula to calculate the percentage is incorrect. One correct way to calculate percentages is 250 / 100 x 72 This gives you 72% of 250. The result of that isn't 70, btw, but 180. If you want 70, then you don't want 72% but 28% (or 100% - 72%): 250 / 100 x (100 - 72)
56,045,959
There are a lot of posts about how to count `NaN` in a list or pandas series, as well as the time efficiency of the various options. One solution I have not seen is self equality: If `y == np.nan` then `(y != y) is True`. So a quick way to count the NaNs in a list would be: ```py import pandas as pd import numpy as np...
2019/05/08
[ "https://Stackoverflow.com/questions/56045959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5531578/" ]
You could use [`numpy.isnan()`](https://docs.scipy.org/doc/numpy/reference/generated/numpy.isnan.html), so your code would look like: ```py import pandas as pd import numpy as np lst = pd.Series([np.nan, 5, 4, 3, 2, np.nan]) count = len([x for x in lst if np.isnan(x)]) ``` But if you want to be fancy: ```py count ...
Based on the comments, I did a basic time complexity experiment between the two proposed methods. Note that this doesn't address any cases where your approach fails, as I didn't find any. Setup: ``` def make_col(): return [np.random.choice([1,2,3,4,5,6,7,8,9,10,np.NaN]) for i in range(100000)] df=pd.DataFrame({k...
36,511,990
Assume I receive two arguments to a template, T1 and T2. If I know T1 is itself a templated class (e.g., a container), and T2 can be anything, is it possible for me to determine the base template type for T1 and rebuild it using T2 as its argument? For example, if I receive `std::vector<int>` and `std::string`, I woul...
2016/04/09
[ "https://Stackoverflow.com/questions/36511990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301053/" ]
define a util class, like following: ``` public class AcitivtyUtil { public static void showActivity(Activity from, Class<?> to, boolean finish) { Intent intent = new Intent(from, to); from.startActivity(intent); if (finish) { from.finish(); } } } ``` then you can ...
Okay I edited my answer Ertürk. Change the parameter of your Activity act parameter of your `showActivity` to Intent intent and pass the value of intent params to your method's intent. So to use it, it'll be like: ``` showActivity(new Intent(this, LoginActivity.class)); ```
36,511,990
Assume I receive two arguments to a template, T1 and T2. If I know T1 is itself a templated class (e.g., a container), and T2 can be anything, is it possible for me to determine the base template type for T1 and rebuild it using T2 as its argument? For example, if I receive `std::vector<int>` and `std::string`, I woul...
2016/04/09
[ "https://Stackoverflow.com/questions/36511990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301053/" ]
define a util class, like following: ``` public class AcitivtyUtil { public static void showActivity(Activity from, Class<?> to, boolean finish) { Intent intent = new Intent(from, to); from.startActivity(intent); if (finish) { from.finish(); } } } ``` then you can ...
you can use the following: ``` public void ShowActivity(Activity act) { Intent intent = new Intent(this, act.getClass()); startActivity(intent); } ```
36,511,990
Assume I receive two arguments to a template, T1 and T2. If I know T1 is itself a templated class (e.g., a container), and T2 can be anything, is it possible for me to determine the base template type for T1 and rebuild it using T2 as its argument? For example, if I receive `std::vector<int>` and `std::string`, I woul...
2016/04/09
[ "https://Stackoverflow.com/questions/36511990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301053/" ]
you can use the following: ``` public void ShowActivity(Activity act) { Intent intent = new Intent(this, act.getClass()); startActivity(intent); } ```
Okay I edited my answer Ertürk. Change the parameter of your Activity act parameter of your `showActivity` to Intent intent and pass the value of intent params to your method's intent. So to use it, it'll be like: ``` showActivity(new Intent(this, LoginActivity.class)); ```
41,353
I face a problem where I need to compute similarities over bilingual (English and French) texts. The "database" looks like this: ``` +-+-+-+ | |F|E| +-+-+-+ |1|X|X| +-+-+-+ |2| |X| +-+-+-+ |3|X| | +-+-+-+ |4|X| | +-+-+-+ |5| |X| +-+-+-+ |6|X|X| +-+-+-+ |7|X| | +-+-+-+ ``` which means that I have English and French t...
2018/11/17
[ "https://datascience.stackexchange.com/questions/41353", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/21560/" ]
This paper from Amazon explains how you can use aligned bilingual word embeddings to generate a similarity score between two sentences of different languages. Used movie subtitles in four language pairs (English to German, French, Portuguese and Spanish) to show the efficiency of their system. ["Unsupervised Quality ...
You could take pretrained embedder on multiple languages, then check distances between the encodings. There's unofficial `pypi` port of Facebook's [LASER](https://pypi.org/project/laserembeddings/). It's langauge-agnostic and pretrained on both `en` and `fr`. ``` from laserembeddings import Laser laser = Laser() sen...
58,783,984
am making a card where i have the image and description below but the image is too zoomed and doesnt look attractive i've tried to adjust the height and image but it doesnt work [![enter image description here](https://i.stack.imgur.com/ZXyPR.png)](https://i.stack.imgur.com/ZXyPR.png) HTML ``` <div id="event-card"...
2019/11/09
[ "https://Stackoverflow.com/questions/58783984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
All well.. images.. biggest problem ever :D Well you actually have few options. I will be straightforward ```css img { width: 100%; height: 100%; object-fit: cover; } ``` This will make image look natural and not stretched but it might cut it on sides for that ```css img { max-width: 100%; height: auto;...
What is the original width and height of the image? if the image height `500px` and the width `500px` and you set it width `500px` and height `200px` it will cause a problem like you facing, to avoid this issue you can set the image as a background you can create another div with the height and width you want and set t...
12,703,271
I need to write a script in CentOS, which will run in background. This script need to check whether a file name "status.txt" has been created in /root/MyFile folder on not. If that file is created, an event should be captured by my script. What code snippet I should write in my script, so that it gets event that the t...
2012/10/03
[ "https://Stackoverflow.com/questions/12703271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1716243/" ]
The simplest solution: ``` while true; do do [ -e "/root/MyFile/status.txt" ] && { echo file is created; break; } sleep 1 done ``` Instead of `echo file is created` you can write the commands you want to execute. You can to the same with **inotify**: ``` inotifywait --format '%f' -m /root/MyFile 2> /dev/null |...
If your kernel is newer than 2.6.13 you could use [inotify](http://en.wikipedia.org/wiki/Inotify) mechanism to achieve your goal. Install package [inotify-tools](https://github.com/rvoicilas/inotify-tools/) and write the script that will watch for your file, using provided [examples](https://github.com/rvoicilas/inotif...
33,938
I'm trying to set Single-Click (in explorer) in some Kiosk-like PCs, running Windows XP, but I can't find any way to set it through GPO. Is there any way to do this?
2009/06/30
[ "https://serverfault.com/questions/33938", "https://serverfault.com", "https://serverfault.com/users/132/" ]
You're not going to be able to change this with "Administrative Templates". This is one of those annoying values that's stored in a REG\_BINARY structure (specifically HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellState) and is wholly undocumented in structure. You could script a registry merge to this ...
The policy is called "Turn on Classic Shell" User Configuration | Administrative Templates | Windows components | Windows Explorer
3,004,566
This is my first time posting so do correct me if I am doing anything wrong. Please help me with this math problem from the British Maths Olympiad (1994 British Maths Olympiad1 Q1 Number Theory). > > Starting with any three digit number $n$ (such as $n = 625$) we obtain a new number $f(n)$ which is equal to the sum...
2018/11/19
[ "https://math.stackexchange.com/questions/3004566", "https://math.stackexchange.com", "https://math.stackexchange.com/users/616837/" ]
Let $n=100a+10b+c,$ where $a> 0$ and $b,c\geq 0$. We are trying to solve $$100a+10b+c=a+b+c+ab+ac+bc+abc \\ \implies 99a+9b=abc+ab+ac+bc \\ \implies a(99-b-c-bc)=b(c-9) \\$$$c-9\leq 0$, but $b+c+bc\leq 99$. So the above equation holds iff $b=c=9$, which means $a$ can take any value.
Here's part $(b)$ because I'm assuming you don't need help with part $(a)$: --- We want to compute all possible integers $n$ such that $\frac{n}{f(n)} = 1$. Since we know that, by assumption, $n$ is a three-digit number, we can write $$n = 100a + 10b + c,$$ where $a, b, c$ are integers. If this is the case, in term...
3,004,566
This is my first time posting so do correct me if I am doing anything wrong. Please help me with this math problem from the British Maths Olympiad (1994 British Maths Olympiad1 Q1 Number Theory). > > Starting with any three digit number $n$ (such as $n = 625$) we obtain a new number $f(n)$ which is equal to the sum...
2018/11/19
[ "https://math.stackexchange.com/questions/3004566", "https://math.stackexchange.com", "https://math.stackexchange.com/users/616837/" ]
Let $n=100a+10b+c,$ where $a> 0$ and $b,c\geq 0$. We are trying to solve $$100a+10b+c=a+b+c+ab+ac+bc+abc \\ \implies 99a+9b=abc+ab+ac+bc \\ \implies a(99-b-c-bc)=b(c-9) \\$$$c-9\leq 0$, but $b+c+bc\leq 99$. So the above equation holds iff $b=c=9$, which means $a$ can take any value.
let n=100a+10b+c f(n)= a+b+c+ab+bc+ca+abc if n/f(n)=1 we get n=f(n) 100a+10b+c=a+b+c+ab+bc+ca+abc 99a+9b=ab+bc+ca+abc 99a+9b=a(b+c+ca)+bc Let a=1 99+9b=b+c+2bc 99+8b=c(1+2b)=(95+4)+8b= 95 + 4(1+2b) 95=c(1+2b)-4(1+2b)=(c-4)(1+2b) since c, b are integers from [1,9] 95=19\*5=(c-4)(1+2b) c-4 is s...
3,004,566
This is my first time posting so do correct me if I am doing anything wrong. Please help me with this math problem from the British Maths Olympiad (1994 British Maths Olympiad1 Q1 Number Theory). > > Starting with any three digit number $n$ (such as $n = 625$) we obtain a new number $f(n)$ which is equal to the sum...
2018/11/19
[ "https://math.stackexchange.com/questions/3004566", "https://math.stackexchange.com", "https://math.stackexchange.com/users/616837/" ]
Here's part $(b)$ because I'm assuming you don't need help with part $(a)$: --- We want to compute all possible integers $n$ such that $\frac{n}{f(n)} = 1$. Since we know that, by assumption, $n$ is a three-digit number, we can write $$n = 100a + 10b + c,$$ where $a, b, c$ are integers. If this is the case, in term...
let n=100a+10b+c f(n)= a+b+c+ab+bc+ca+abc if n/f(n)=1 we get n=f(n) 100a+10b+c=a+b+c+ab+bc+ca+abc 99a+9b=ab+bc+ca+abc 99a+9b=a(b+c+ca)+bc Let a=1 99+9b=b+c+2bc 99+8b=c(1+2b)=(95+4)+8b= 95 + 4(1+2b) 95=c(1+2b)-4(1+2b)=(c-4)(1+2b) since c, b are integers from [1,9] 95=19\*5=(c-4)(1+2b) c-4 is s...
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
The `$` in RegExp is a special character, so you need to escape it with backslash. ``` new_str = str.replace(new RegExp('\\$', 'g'), '_'); ``` however, in JS you can use the simpler syntax ``` new_str = str.replace(/\$/g, '_'); ```
........ ``` str.replace(new RegExp('\\$', 'g'), '_'); ``` Becaue `$` is special char in js, you need to escape it.
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
You don’t need to use `RegExp`. You can use the literal syntax: ``` str.replace(/\$/g, '_') ``` You just need to escape the `$` character as it’s a special character in regular expressions that marks the end of the string. --- **Edit**    Oh, you can also use `split` and `join` to solve this: ``` str.split("$").j...
........ ``` str.replace(new RegExp('\\$', 'g'), '_'); ``` Becaue `$` is special char in js, you need to escape it.
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
........ ``` str.replace(new RegExp('\\$', 'g'), '_'); ``` Becaue `$` is special char in js, you need to escape it.
You don't need regular expressions just to replace one symbol: ``` newStr = oldStr.replace('$', '_') ```
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
The `$` in RegExp is a special character, so you need to escape it with backslash. ``` new_str = str.replace(new RegExp('\\$', 'g'), '_'); ``` however, in JS you can use the simpler syntax ``` new_str = str.replace(/\$/g, '_'); ```
You don’t need to use `RegExp`. You can use the literal syntax: ``` str.replace(/\$/g, '_') ``` You just need to escape the `$` character as it’s a special character in regular expressions that marks the end of the string. --- **Edit**    Oh, you can also use `split` and `join` to solve this: ``` str.split("$").j...
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
The `$` in RegExp is a special character, so you need to escape it with backslash. ``` new_str = str.replace(new RegExp('\\$', 'g'), '_'); ``` however, in JS you can use the simpler syntax ``` new_str = str.replace(/\$/g, '_'); ```
You don't need regular expressions just to replace one symbol: ``` newStr = oldStr.replace('$', '_') ```
2,434,413
As the title states, I need to relace all occurrences of the $ sign in a string variable with an underscore. I have tried: ``` str.replace(new RegExp('$', 'g'), '_'); ``` But this doesn't work for me and nothing gets replaced.
2010/03/12
[ "https://Stackoverflow.com/questions/2434413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/111292/" ]
You don’t need to use `RegExp`. You can use the literal syntax: ``` str.replace(/\$/g, '_') ``` You just need to escape the `$` character as it’s a special character in regular expressions that marks the end of the string. --- **Edit**    Oh, you can also use `split` and `join` to solve this: ``` str.split("$").j...
You don't need regular expressions just to replace one symbol: ``` newStr = oldStr.replace('$', '_') ```
36,426,547
I am using Ubuntu 14.04 I wanted to install package "requests" to use in python 3.5, so I installed it using pip3. I could see it in /usr/lib/python3.4, but while trying to actually execute scripts with Python 3.5 I always got "ImportError: No module named 'requests'" OK, so I figured, perhaps that's because the pack...
2016/04/05
[ "https://Stackoverflow.com/questions/36426547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4680896/" ]
**First of all, it is a very bad idea to remove your *system* Python 3 in Ubuntu (which 3.4 is in recent subrevisions of Trusty LTS)**. That is because it is a **vital part of the system**. If you run the command `apt-cache rdepends python3`, you'd see that packages such as `ubuntu-minimal`, `ubuntu-release-upgrader-co...
Ubuntu 14.04LTS uses the [*trusty* package list](http://packages.ubuntu.com/trusty/). That repository comes with [Python 3.4.0-0ubuntu2](http://packages.ubuntu.com/trusty/python3). So the `pip` contained in `python3-pip` belongs to *that* version: 3.4. As such, when using Python 3.5, packages installed using Python 3....
36,426,547
I am using Ubuntu 14.04 I wanted to install package "requests" to use in python 3.5, so I installed it using pip3. I could see it in /usr/lib/python3.4, but while trying to actually execute scripts with Python 3.5 I always got "ImportError: No module named 'requests'" OK, so I figured, perhaps that's because the pack...
2016/04/05
[ "https://Stackoverflow.com/questions/36426547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4680896/" ]
**First of all, it is a very bad idea to remove your *system* Python 3 in Ubuntu (which 3.4 is in recent subrevisions of Trusty LTS)**. That is because it is a **vital part of the system**. If you run the command `apt-cache rdepends python3`, you'd see that packages such as `ubuntu-minimal`, `ubuntu-release-upgrader-co...
1. Open a text-only virtual console by using the keyboard shortcut `Ctrl` + `Alt` + `F3`. 2. At the `login:` prompt type your username and press `Enter`. 3. At the `Password:` prompt type your user password and press `Enter`. 4. Reinstall the default Python 3 version by running the following command: ``` sudo apt inst...
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
The fastest way is to transform both in sets and print the difference: ``` >>> print(set(x).difference(set(y))) {6} ``` This code print numbers present in `x` but not in `y`
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] for i in x: if i in y: print(f"{i} found") else: print(f"{i} not found") ```
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
The fastest way is to transform both in sets and print the difference: ``` >>> print(set(x).difference(set(y))) {6} ``` This code print numbers present in `x` but not in `y`
to get not matches: ``` def returnNotMatches(a, b): return [[x for x in a if x not in b], [x for x in b if x not in a]] ``` or ``` new_list = list(set(list1).difference(list2)) ``` to get the intersection: ``` list1 =[1,2,3,4,5,6] list2 = [1,2,3,4,5] list1_as_set = set(list1) intersection = list1_as_set.inte...
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
The fastest way is to transform both in sets and print the difference: ``` >>> print(set(x).difference(set(y))) {6} ``` This code print numbers present in `x` but not in `y`
This is the best option in my opinion. ``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] for number in x: if number not in y: print(f"{number} not found") ```
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
You can do like this: ``` x = [1,2,3,4,5,6] y = [1,2,3,4,5] for i in x: if i not in y: print(i) ```
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] for i in x: if i in y: print(f"{i} found") else: print(f"{i} not found") ```
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
You can do like this: ``` x = [1,2,3,4,5,6] y = [1,2,3,4,5] for i in x: if i not in y: print(i) ```
to get not matches: ``` def returnNotMatches(a, b): return [[x for x in a if x not in b], [x for x in b if x not in a]] ``` or ``` new_list = list(set(list1).difference(list2)) ``` to get the intersection: ``` list1 =[1,2,3,4,5,6] list2 = [1,2,3,4,5] list1_as_set = set(list1) intersection = list1_as_set.inte...
70,814,373
``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] if x == y: print("Numbers found") else: print("Numbers not found") ``` *I want to print the numbers which are not present in list y.*
2022/01/22
[ "https://Stackoverflow.com/questions/70814373", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17741997/" ]
You can do like this: ``` x = [1,2,3,4,5,6] y = [1,2,3,4,5] for i in x: if i not in y: print(i) ```
This is the best option in my opinion. ``` x =[1,2,3,4,5,6] y = [1,2,3,4,5] for number in x: if number not in y: print(f"{number} not found") ```
36,809,868
I have two inputs one for min and the other for max value. How can I add validation so the min < max? ```html <div class="form-group"> <label class="control-label"> Montant minimum</label> <input id="min" class="form-control" type="number" ng-model="type.minMontant" required/> </div> <div class="form...
2016/04/23
[ "https://Stackoverflow.com/questions/36809868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120367/" ]
**Not Sure if this is wat you want** **if you want validation messages to show then you have to use angular-messages** ``` <div ng-app> <div class="form-group"> <label class="control-label"> Montant minimum</label> <input id="min" class="form-control" type="number" min="0" max="{{maxMontant}}" ng...
add `min` and `max` attiribute(html5) ``` <div class="form-group"> <label class="control-label"> Montant minimum</label> <input id="min" class="form-control" type="number" ng-model="type.minMontant" min="0" required/> </div> <div class="form-group"> <label class="control-label"> Montant maximum</label> ...
36,809,868
I have two inputs one for min and the other for max value. How can I add validation so the min < max? ```html <div class="form-group"> <label class="control-label"> Montant minimum</label> <input id="min" class="form-control" type="number" ng-model="type.minMontant" required/> </div> <div class="form...
2016/04/23
[ "https://Stackoverflow.com/questions/36809868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6120367/" ]
**Not Sure if this is wat you want** **if you want validation messages to show then you have to use angular-messages** ``` <div ng-app> <div class="form-group"> <label class="control-label"> Montant minimum</label> <input id="min" class="form-control" type="number" min="0" max="{{maxMontant}}" ng...
You can have custom validators to check integrity of range and then check the input value with available range. Following is a simulation of it: [JSFiddle](https://jsfiddle.net/RajeshDixit/guumuvn1/1/) ```js $scope.validate = function() { var valid = $scope.validateMin() && $scope.validateMax(); if (valid) { ...
450,107
I'm trying to compile a project from the command line, like this: ``` devenv.exe myproj.sln /build release ``` It looks like the code compiles well, but that's not all I need: I want to be able to capture the output (e.g. warnings, errors) from the compiler as they occur. Unfortunately as soon as I issue the above ...
2009/01/16
[ "https://Stackoverflow.com/questions/450107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46411/" ]
devenv uses this interesting dispatcher that switches between command line mode and windowed mode. There's actually a devenv.com in addition to devenv.exe, and since \*.com takes precedence over \*.exe, it gets invoked first. devenv.com analyzes the command line and decides what to invoke. In other words, change your ...
use devenv.com in place of devenv.exe and you will get what you want. You can use MSBuild.exe as well for more options.
62,761,664
I'm getting via url querystring variables like: myserver\_state=1&myserver\_running=2&myserver\_mem=3 Currently i'm adding to an existing json like: ``` { "key1": "1", "key2": "2", "key3": "3", "myserver_state": "1", "myserver_running": "2", "myserver_mem": "3" } ``` And i really want it like thi...
2020/07/06
[ "https://Stackoverflow.com/questions/62761664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2115947/" ]
Just use multidimensional array within your URL like: ``` test.php?key1=1&key2=2&myserver[state]=1&myserver[running]=2&myserver[mem]=3 ``` so easy script ``` <?php echo '<pre>'; echo json_encode($_GET, JSON_PRETTY_PRINT); ``` will give you ``` { "key1": "1", "key2": "2", "myserver": { "state"...
in order to create a nested JSON object, you need to create an array within an array. E.g. ``` $example = [ 'key1' => 'foo', 'key2' => 'bar', 'key3' => [ 'subkey1' => 'foo', 'subkey2' => 'bar', ], ]; ``` When running it through `json_encode()`, it will result in ``` { "key1": "foo...
42,343,463
I am having below dummy table ``` select * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ``` which will give outpu...
2017/02/20
[ "https://Stackoverflow.com/questions/42343463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2431786/" ]
Here is one method: ``` select col1, col2 from t where col1 <= col2 union all select col1, col2 from t where col1 > col2 and not exists (select 1 from t t2 where t2.col1 = t.col2 and t2.col2 = t.col1); ```
``` select DISTINCT * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ```
42,343,463
I am having below dummy table ``` select * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ``` which will give outpu...
2017/02/20
[ "https://Stackoverflow.com/questions/42343463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2431786/" ]
Here is one method: ``` select col1, col2 from t where col1 <= col2 union all select col1, col2 from t where col1 > col2 and not exists (select 1 from t t2 where t2.col1 = t.col2 and t2.col2 = t.col1); ```
``` select col1, col2 from t where col1 <= col2 union select col2, col1 from t where col1 > col2 ```
42,343,463
I am having below dummy table ``` select * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ``` which will give outpu...
2017/02/20
[ "https://Stackoverflow.com/questions/42343463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2431786/" ]
The following will work for Oracle and Postgres: ``` select distinct least(col1, col2), greatest(col1, col2) from the_table; ``` Online example: <http://rextester.com/BZXC69735>
``` select DISTINCT * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ```
42,343,463
I am having below dummy table ``` select * from ( select 'A' as col1, 'B' as col2 from dual union select 'B' as col1, 'A' as col2 from dual union select 'A' as col1, 'C' as col2 from dual union select 'C' as col1, 'A' as col2 from dual union select 'A' as col1, 'D' as col2 from dual )a ``` which will give outpu...
2017/02/20
[ "https://Stackoverflow.com/questions/42343463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2431786/" ]
The following will work for Oracle and Postgres: ``` select distinct least(col1, col2), greatest(col1, col2) from the_table; ``` Online example: <http://rextester.com/BZXC69735>
``` select col1, col2 from t where col1 <= col2 union select col2, col1 from t where col1 > col2 ```
9,582,357
My knowledge of MVC and Razor is quite basic so I'm hoping its something rather simple. Basically, I have my `Controllers` as normal but my `Views` folder has a nested structure. For example, instead of: ``` Views -> Index.cshtml ``` It is like ``` Views -> BrandName -> Index.cshtml ``` I created a custom helper ...
2012/03/06
[ "https://Stackoverflow.com/questions/9582357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/849843/" ]
Use the following ``` public ActionResult Collection(int id) { var collectionModel = ds.GetCollection(id); return View("/Brand2/Collection", collectionModel); } ``` The above code will search for the following views. ``` ~/Views/Brand2/Collection.aspx ~/Views/Brand2/Collection.ascx ~/Views/Shared/Brand2/Col...
You can do this on application start by adding paths that the view engine should check like so. ``` RazorViewEngine razorEngine = ViewEngines.Engines.OfType<RazorViewEngine>() .FirstOrDefault(); List<string> viewLocationFormats = new List<string>(); newPartialViewFormats.A...
1,605,718
I need to calculate: $$ \iint \_D \frac{2y^2+x^2}{xy}~\mathrm dx~\mathrm dy $$ over the set $D$ which is: $$ y\leq x^2 \leq 2y , \quad 1\leq x^2 +y^2 \leq 2 , \quad x\geq 0 $$ can someone help me understand what possible change of variables can I do here? Thanks a lot in advance .
2016/01/09
[ "https://math.stackexchange.com/questions/1605718", "https://math.stackexchange.com", "https://math.stackexchange.com/users/173919/" ]
You have $$\begin{aligned}\vert f(x)-f(y) \vert &= \left\vert \sqrt{x^2+1}-\sqrt{y^2+1} \right\vert \\ &= \left\vert (\sqrt{x^2+1}-\sqrt{y^2+1}) \frac{\sqrt{x^2+1}+\sqrt{y^2+1}}{\sqrt{x^2+1}+\sqrt{y^2+1}} \right\vert \\ &= \left\vert \frac{x^2-y^2}{\sqrt{x^2+1}+\sqrt{y^2+1}} \right\vert \\ &\le \frac{\vert x-y \vert (\...
Note that $f'(x)= x/\sqrt {x^2+1}$ for all $x.$ We thus have $|f'(x)|<1$ everywhere. Suppose $x,y\in \mathbb R.$ Then the mean value theorem gives $$f(y)-f(x) = f'(c)(y-x) \implies |f(y)-f(x)| \le |y-x|.$$ This easily gives the uniform continuity of $f$ on $\mathbb R.$
54,902,426
I'm trying to use a plotly example in Python 3, but getting a syntax error in this line: ``` return map(lambda (x, y, an): (x, y), cornersWithAngles) ``` I already read that using parentheses to unpack the arguments in a lambda is not allowed in Python 3, but I don't know how exactly to adjust my code to solve that ...
2019/02/27
[ "https://Stackoverflow.com/questions/54902426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5890524/" ]
This is an oversight in the SystemVerilog LRM. There's no syntax to specify a required set of parameters for an interface in a module header. You might check your synthesis tool to see if they provide any way of specifying parameter overrides for the top-level synthesis instance.
You specify the parameter when you instantiate the interface; you do not specify it in the port list of the module. Given ``` interface myinterface #(parameter DATA_SIZE = 0); ... ``` All you need is ``` module mymodule (myinterface.mymodport mybus); ... ``` because somewhere else you have ``` myinterface #(.DA...
195,688
I've written a code in a WP\_Query to converting a string (the\_content) to an array (choices). But it seems wrong! In fact, the choices array is empty after each loop. However str string is notnull. How can i handle this array to be nutnull? Any help would be appreciated. ``` $first_query = new WP_Query( $args ); ...
2015/07/27
[ "https://wordpress.stackexchange.com/questions/195688", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/71448/" ]
You have a couple of issues here * `the_content()` echos the content to screen. You should be using `get_the_content()` which returns the content. Just remember, `get_the_content()` is unfiltered, so if you need filtered content, use `apply_filters( 'the_content', get_the_content() )` which will return filtered conten...
Try with: `$str = get_the_content();`
108,171
How do I get the following to show up (on stackoverflow) with color syntax highlighting? class Foo { internal Foo() { for (int i = 0; i < 42; ++i); } }
2011/10/02
[ "https://meta.stackexchange.com/questions/108171", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/170189/" ]
See <https://stackoverflow.com/editing-help>. Basically, for code, indent four spaces -- you can do this by pasting code then highlighting and hitting `Ctrl` + `K` or the ``{}`` button above the editing box. As far as syntax highlighting, see [Changes to syntax highlighting](https://meta.stackexchange.com/questions/7...
If you want to insert code inline like this `int i = 0;` use backticks: ``int i = 0;``. If you want an entire block of code you can highlight it and then click the code button which looks like `{}`. You can also hit `Ctrl+K` while it's highlight, or just manually indent it all 4 spaces: ``` class Foo { internal Foo() ...
12,521
Who knows two hundred eighty-five? ---------------------------------- ?חמישה ושמונים ומאתים - מי יודע ------------------------------- In the spirit of the song ["Echad - mi yodeya"](http://en.wikipedia.org/wiki/Echad_Mi_Yodea), please post interesting and significant Jewish facts about the number 285. The best lazy ...
2011/12/22
[ "https://judaism.stackexchange.com/questions/12521", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/2/" ]
As Alex correctly noted here [Arba'a Ushmonim Umatayim - mi yodeya?](https://judaism.stackexchange.com/questions/12394/arbaa-ushmonim-umatayim-mi-yodeya/12404#12404) 285 is the most psukim read on a regular shabbat in sefard/chassidishe shuls: * Mattot 112 * Ma'asei 132 * Maftir 3 * Haftora 27 * Mincha 11 * TOTAL 285 ...
The first translation of the Hebrew Bible was written in Greek. This began in 285 BCE
12,521
Who knows two hundred eighty-five? ---------------------------------- ?חמישה ושמונים ומאתים - מי יודע ------------------------------- In the spirit of the song ["Echad - mi yodeya"](http://en.wikipedia.org/wiki/Echad_Mi_Yodea), please post interesting and significant Jewish facts about the number 285. The best lazy ...
2011/12/22
[ "https://judaism.stackexchange.com/questions/12521", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/2/" ]
As Alex correctly noted here [Arba'a Ushmonim Umatayim - mi yodeya?](https://judaism.stackexchange.com/questions/12394/arbaa-ushmonim-umatayim-mi-yodeya/12404#12404) 285 is the most psukim read on a regular shabbat in sefard/chassidishe shuls: * Mattot 112 * Ma'asei 132 * Maftir 3 * Haftora 27 * Mincha 11 * TOTAL 285 ...
Gimtaria "El Rahum (Merciful God)."
40,849,509
Using the defaults of the train in caret package, I am trying to train a random forest model for the dataset xtr2 (dim(xtr2): 765 9408). The problem is that it unbelievably takes too long (more than one day for one training) to fit the function. As far as I know train in its default uses bootstrap sampling (25 times) a...
2016/11/28
[ "https://Stackoverflow.com/questions/40849509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845158/" ]
My thoughts on your questions: 1. Yes! But don't forget you also have control over the search grid `caret` uses for the tuning parameters; in this case, `mtry`. I'm not sure what the default search grid is for `mtry`, but try the following: ctrl <- trainControl("cv", number = 5, verboseIter = TRUE) set.seed(101) # f...
You use `train` for determining `mtry` only. I would skip the `train` step, and stay with default `mtry`: ``` rf.mdl =randomForest(x=xtr2,y=as.factor(ytr2),ntree=500, keep.forest=TRUE,importance=TRUE,oob.prox =FALSE) ``` I strongly doubt that 3 different runs is a good idea. If you do 10 fold cr...
40,849,509
Using the defaults of the train in caret package, I am trying to train a random forest model for the dataset xtr2 (dim(xtr2): 765 9408). The problem is that it unbelievably takes too long (more than one day for one training) to fit the function. As far as I know train in its default uses bootstrap sampling (25 times) a...
2016/11/28
[ "https://Stackoverflow.com/questions/40849509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845158/" ]
My thoughts on your questions: 1. Yes! But don't forget you also have control over the search grid `caret` uses for the tuning parameters; in this case, `mtry`. I'm not sure what the default search grid is for `mtry`, but try the following: ctrl <- trainControl("cv", number = 5, verboseIter = TRUE) set.seed(101) # f...
I would also just add, that it the main issue is speed, there are several other random forest implementations in `caret`, and many of them are much faster than the original `randomForest` which is notoriously slow. I've found `ranger` to be a nice alternative that suited my very simple needs. Here is a nice [summary ...
40,849,509
Using the defaults of the train in caret package, I am trying to train a random forest model for the dataset xtr2 (dim(xtr2): 765 9408). The problem is that it unbelievably takes too long (more than one day for one training) to fit the function. As far as I know train in its default uses bootstrap sampling (25 times) a...
2016/11/28
[ "https://Stackoverflow.com/questions/40849509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845158/" ]
You use `train` for determining `mtry` only. I would skip the `train` step, and stay with default `mtry`: ``` rf.mdl =randomForest(x=xtr2,y=as.factor(ytr2),ntree=500, keep.forest=TRUE,importance=TRUE,oob.prox =FALSE) ``` I strongly doubt that 3 different runs is a good idea. If you do 10 fold cr...
I would also just add, that it the main issue is speed, there are several other random forest implementations in `caret`, and many of them are much faster than the original `randomForest` which is notoriously slow. I've found `ranger` to be a nice alternative that suited my very simple needs. Here is a nice [summary ...
3,989,152
I want to calculate $$\sum\_{k=0}^\infty\binom{k+3}k(0.2)^k$$ to get the exact value of it. I have excel and other tools to help me so it is fine if it is computationally expensive. Is there a clear and repeatable way to solve this infinite series? Thank you. This is my first post and be sure to give me some suggesti...
2021/01/17
[ "https://math.stackexchange.com/questions/3989152", "https://math.stackexchange.com", "https://math.stackexchange.com/users/875026/" ]
It’s a general fact that $$\sum\_{k\ge 0}\binom{k+n}nx^k=\frac1{(1-x)^{n+1}}\;.$$ You can prove this by induction on $n$, starting with the geometric series $$\frac1{1-x}=\sum\_{k\ge 0}x^k$$ and differentiating repeatedly with respect to $x$. You want the case $n=3$: $$\sum\_{k\ge 0}\binom{k+3}kx^k=\sum\_{k\ge 0}\...
Using the [negative binomial coefficient](https://math.stackexchange.com/a/217647/13854) $\binom{-4}{k}$, we have $$ \begin{align} \sum\_{k=0}^\infty\binom{k+3}{k}(0.2)^k &=\sum\_{k=0}^\infty\binom{-4}k(-1)^k(0.2)^k\\ &=(1-0.2)^{-4}\\[6pt] &=\frac{625}{256} \end{align} $$
1,576,277
I hosted one `DotNetNUke Application` to my production server, and locally it works perfectly. But, when browsing it redirects to the error page. How do I set the `default.aspx` as my application default page? I am getting the error as below: ``` DotNetNuke Error ---------------------------------------------------...
2009/10/16
[ "https://Stackoverflow.com/questions/1576277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191017/" ]
That's very easy - build a folder tree based on GUID values parts. For example, make 256 folders each named after the first byte and only store there files that have a GUID starting with this byte. If that's still too many files in one folder - do the same in each folder for the second byte of the GUID. Add more level...
I would try and keep the # of files in each directory to some manageable number. The easiest way to do this is name the subdirectory after the first 2-3 characters of the GUID.
1,576,277
I hosted one `DotNetNUke Application` to my production server, and locally it works perfectly. But, when browsing it redirects to the error page. How do I set the `default.aspx` as my application default page? I am getting the error as below: ``` DotNetNuke Error ---------------------------------------------------...
2009/10/16
[ "https://Stackoverflow.com/questions/1576277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191017/" ]
I would try and keep the # of files in each directory to some manageable number. The easiest way to do this is name the subdirectory after the first 2-3 characters of the GUID.
Sorting the audio files into separate subdirectories may slower if `dir_index` is used on the ext3 volume. (dir\_index: "Use hashed b-trees to speed up lookups in large directories.") This command will set the dir\_index feature: `tune2fs -O dir_index /dev/sda1`
1,576,277
I hosted one `DotNetNUke Application` to my production server, and locally it works perfectly. But, when browsing it redirects to the error page. How do I set the `default.aspx` as my application default page? I am getting the error as below: ``` DotNetNuke Error ---------------------------------------------------...
2009/10/16
[ "https://Stackoverflow.com/questions/1576277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191017/" ]
That's very easy - build a folder tree based on GUID values parts. For example, make 256 folders each named after the first byte and only store there files that have a GUID starting with this byte. If that's still too many files in one folder - do the same in each folder for the second byte of the GUID. Add more level...
Sorting the audio files into separate subdirectories may slower if `dir_index` is used on the ext3 volume. (dir\_index: "Use hashed b-trees to speed up lookups in large directories.") This command will set the dir\_index feature: `tune2fs -O dir_index /dev/sda1`
1,576,277
I hosted one `DotNetNUke Application` to my production server, and locally it works perfectly. But, when browsing it redirects to the error page. How do I set the `default.aspx` as my application default page? I am getting the error as below: ``` DotNetNuke Error ---------------------------------------------------...
2009/10/16
[ "https://Stackoverflow.com/questions/1576277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191017/" ]
That's very easy - build a folder tree based on GUID values parts. For example, make 256 folders each named after the first byte and only store there files that have a GUID starting with this byte. If that's still too many files in one folder - do the same in each folder for the second byte of the GUID. Add more level...
Construct n level deep folder hierarchy to store your files. The names of the nested folders will the first n bytes of the corresponding file name. For example: For storing a file "63f4c070-0ab2-102d-adcb-0015f22e2e5c" in a four level deep folder hierarchy, construct 6/3/f/4 and place this file in this hierarchy. The d...
1,576,277
I hosted one `DotNetNUke Application` to my production server, and locally it works perfectly. But, when browsing it redirects to the error page. How do I set the `default.aspx` as my application default page? I am getting the error as below: ``` DotNetNuke Error ---------------------------------------------------...
2009/10/16
[ "https://Stackoverflow.com/questions/1576277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191017/" ]
Construct n level deep folder hierarchy to store your files. The names of the nested folders will the first n bytes of the corresponding file name. For example: For storing a file "63f4c070-0ab2-102d-adcb-0015f22e2e5c" in a four level deep folder hierarchy, construct 6/3/f/4 and place this file in this hierarchy. The d...
Sorting the audio files into separate subdirectories may slower if `dir_index` is used on the ext3 volume. (dir\_index: "Use hashed b-trees to speed up lookups in large directories.") This command will set the dir\_index feature: `tune2fs -O dir_index /dev/sda1`
61,174,221
I need to parse date value to specific format without using format field in dateFromString operator. [Mongo Playground](https://mongoplayground.net/p/U9thsJCE88V) Current situation : in Mongodb 4.0 if I format dateString using below it code it give me mentioned output. ``` parsedDate: { $dateFromString: ...
2020/04/12
[ "https://Stackoverflow.com/questions/61174221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10516241/" ]
If I get the requirement right, Try the following query which uses: [`$dateFromParts`](https://docs.mongodb.com/manual/reference/operator/aggregation/dateFromParts/) **Input:** ``` [ { "date": ISODate("2020-01-16T08:54:17.604Z") } ] ``` **Query:** ``` db.collection.aggregate([ { $project: { out...
This worked for me: I used combined solution from @ambienBeing and @techstack. Thanks [Mongo playground](https://mongoplayground.net/p/aUBwxfZO_Qm) ``` "parsedDate": { "$dateFromParts": { "year": { "$year": { $dateFromString: { dateString: { ...
61,174,221
I need to parse date value to specific format without using format field in dateFromString operator. [Mongo Playground](https://mongoplayground.net/p/U9thsJCE88V) Current situation : in Mongodb 4.0 if I format dateString using below it code it give me mentioned output. ``` parsedDate: { $dateFromString: ...
2020/04/12
[ "https://Stackoverflow.com/questions/61174221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10516241/" ]
I think following query will solve your problem because MongoDB 3.6 supports *dateFromString* Input: ``` [ { "dateS": "2020-01-16T08" } ] ``` Query: ``` db.collection.aggregate([ { "$project": { "year": {"$substr": ["$dateS",0,4]}, "month": {"$substr": ["$dateS",5,2]}, "day": {"$sub...
This worked for me: I used combined solution from @ambienBeing and @techstack. Thanks [Mongo playground](https://mongoplayground.net/p/aUBwxfZO_Qm) ``` "parsedDate": { "$dateFromParts": { "year": { "$year": { $dateFromString: { dateString: { ...
37,167,788
I have a TableViewController in a TabBar. When I select one cell of my tableView, I want start a new controller with pushViewController(MyNewController). This is my code : **In my TableView :** ``` func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { let storyboard ...
2016/05/11
[ "https://Stackoverflow.com/questions/37167788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6175849/" ]
First, the correct way to write your query is: ``` SELECT CustomerID, SUM(SubTotal) FROM Sales.SalesOrderHeader GROUP BY CustomerID; ``` Using `SELECT DISTINCT` with window functions is clever. But, it overcomplicates the query, can have poorer performance, and is confusing to anyone reading it. To get the informat...
You should use `group by` instead of `PARTITION BY` whenever you need an aggregate (`sum/count/max`) against a specific column like (customerid) as following ``` select customerId, sum(subTotal) FROM sales.salesOrderHeader group by customerId ``` **Edit** : including missing requirement of date (response to comment)...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
**No.** That's the meaning of the word "advance": these are monies that the publisher is willing to give you up-front with the belief that your work will sell enough copies to cover the advance. Keep in mind that the advance is not "free money": it's a portion of the royalties for your book that you receive ahead of t...
**Maybe**. If, for some unforeseen reason, the book is cancelled between the time the contract is signed and the publication date, the publisher may request that any paid-out portion of the advance be repaid. For instance, it might happen if the first half of the book is amazing, but the second half is a complete turk...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
**No.** That's the meaning of the word "advance": these are monies that the publisher is willing to give you up-front with the belief that your work will sell enough copies to cover the advance. Keep in mind that the advance is not "free money": it's a portion of the royalties for your book that you receive ahead of t...
It ***really, really depends on your contract***. There may be some situations, such as you refuse to edit the book or make requested changes and the publisher cancels the contract. The best idea? Negotiate with your publisher so that the advance (against royalties) is yours. If you're contract isn't clear enough about...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
**No.** That's the meaning of the word "advance": these are monies that the publisher is willing to give you up-front with the belief that your work will sell enough copies to cover the advance. Keep in mind that the advance is not "free money": it's a portion of the royalties for your book that you receive ahead of t...
Generally speaking, if a pubisher gives you an advance against royalties, and then publishes your book, and the book doesn't sell well, you don't have to refund the advance. This is the normal understanding of an "advance" in the world of trade publishing. But read your contract carefully before you sign it.
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
**No.** That's the meaning of the word "advance": these are monies that the publisher is willing to give you up-front with the belief that your work will sell enough copies to cover the advance. Keep in mind that the advance is not "free money": it's a portion of the royalties for your book that you receive ahead of t...
As someone else stated, it depends on your contract. I had a situation where I received an advance for a book proposal, but personal issues and family matters caused me to miss my deadline, and the publisher requested the money back. I hadn't spent any of it and felt it was the right thing to do because I hadn't delive...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
**Maybe**. If, for some unforeseen reason, the book is cancelled between the time the contract is signed and the publication date, the publisher may request that any paid-out portion of the advance be repaid. For instance, it might happen if the first half of the book is amazing, but the second half is a complete turk...
As someone else stated, it depends on your contract. I had a situation where I received an advance for a book proposal, but personal issues and family matters caused me to miss my deadline, and the publisher requested the money back. I hadn't spent any of it and felt it was the right thing to do because I hadn't delive...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
It ***really, really depends on your contract***. There may be some situations, such as you refuse to edit the book or make requested changes and the publisher cancels the contract. The best idea? Negotiate with your publisher so that the advance (against royalties) is yours. If you're contract isn't clear enough about...
As someone else stated, it depends on your contract. I had a situation where I received an advance for a book proposal, but personal issues and family matters caused me to miss my deadline, and the publisher requested the money back. I hadn't spent any of it and felt it was the right thing to do because I hadn't delive...
1,077
Do publishers give you an advance as some sort of earnest money for your manuscript? If your work doesn't sell very well do you have to give the advance back to them? Do they ever just buy your work and you get some money plus royalties? thanks.
2011/01/11
[ "https://writers.stackexchange.com/questions/1077", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/289/" ]
Generally speaking, if a pubisher gives you an advance against royalties, and then publishes your book, and the book doesn't sell well, you don't have to refund the advance. This is the normal understanding of an "advance" in the world of trade publishing. But read your contract carefully before you sign it.
As someone else stated, it depends on your contract. I had a situation where I received an advance for a book proposal, but personal issues and family matters caused me to miss my deadline, and the publisher requested the money back. I hadn't spent any of it and felt it was the right thing to do because I hadn't delive...
73,459,978
I'm trying to do a database migration using `GCP Database Migration Service` My source database is of `Postgres` type (hosted on `Heroku`), but the name of the database is not `postgres` but rather something like `d12bdsdjs` ... My question is ... is there a way for me to use the `GCP Database Migration Service` to s...
2022/08/23
[ "https://Stackoverflow.com/questions/73459978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599899/" ]
Use a `for` loop to generate a range of valid indices for each array: ``` for($i = 0; $i -lt $array1.Count; $i++){ Write-Host "Server named '$($array1[$i])' has SID '$($array2[$i])'" } ``` But a better solution would be to create a single array of *objects* that have both pieces of information stored in named pr...
You could use a [hash table](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.2) or [ordered dictionary](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.2#creating-ordered-dicti...
73,459,978
I'm trying to do a database migration using `GCP Database Migration Service` My source database is of `Postgres` type (hosted on `Heroku`), but the name of the database is not `postgres` but rather something like `d12bdsdjs` ... My question is ... is there a way for me to use the `GCP Database Migration Service` to s...
2022/08/23
[ "https://Stackoverflow.com/questions/73459978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599899/" ]
Use a `for` loop to generate a range of valid indices for each array: ``` for($i = 0; $i -lt $array1.Count; $i++){ Write-Host "Server named '$($array1[$i])' has SID '$($array2[$i])'" } ``` But a better solution would be to create a single array of *objects* that have both pieces of information stored in named pr...
An alternative approach is to use [`[System.Linq.Enumerable]::Zip`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip?view=net-6.0) which provides convenient API(like [python `zip`](https://docs.python.org/3.3/library/functions.html#zip) function). ie, You could do ``` $array1 = @("server1", "ser...
73,459,978
I'm trying to do a database migration using `GCP Database Migration Service` My source database is of `Postgres` type (hosted on `Heroku`), but the name of the database is not `postgres` but rather something like `d12bdsdjs` ... My question is ... is there a way for me to use the `GCP Database Migration Service` to s...
2022/08/23
[ "https://Stackoverflow.com/questions/73459978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599899/" ]
Use a `for` loop to generate a range of valid indices for each array: ``` for($i = 0; $i -lt $array1.Count; $i++){ Write-Host "Server named '$($array1[$i])' has SID '$($array2[$i])'" } ``` But a better solution would be to create a single array of *objects* that have both pieces of information stored in named pr...
``` $array1 = @("server1", "server2") $array2 = @("SID1", "SID2") for($i=0; $i -lt $array1.Count; $i++){ Write-Host $array1[$i] ":"$array2[$i] } ```
73,459,978
I'm trying to do a database migration using `GCP Database Migration Service` My source database is of `Postgres` type (hosted on `Heroku`), but the name of the database is not `postgres` but rather something like `d12bdsdjs` ... My question is ... is there a way for me to use the `GCP Database Migration Service` to s...
2022/08/23
[ "https://Stackoverflow.com/questions/73459978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599899/" ]
You could use a [hash table](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.2) or [ordered dictionary](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_hash_tables?view=powershell-7.2#creating-ordered-dicti...
``` $array1 = @("server1", "server2") $array2 = @("SID1", "SID2") for($i=0; $i -lt $array1.Count; $i++){ Write-Host $array1[$i] ":"$array2[$i] } ```
73,459,978
I'm trying to do a database migration using `GCP Database Migration Service` My source database is of `Postgres` type (hosted on `Heroku`), but the name of the database is not `postgres` but rather something like `d12bdsdjs` ... My question is ... is there a way for me to use the `GCP Database Migration Service` to s...
2022/08/23
[ "https://Stackoverflow.com/questions/73459978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2599899/" ]
An alternative approach is to use [`[System.Linq.Enumerable]::Zip`](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.zip?view=net-6.0) which provides convenient API(like [python `zip`](https://docs.python.org/3.3/library/functions.html#zip) function). ie, You could do ``` $array1 = @("server1", "ser...
``` $array1 = @("server1", "server2") $array2 = @("SID1", "SID2") for($i=0; $i -lt $array1.Count; $i++){ Write-Host $array1[$i] ":"$array2[$i] } ```
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
I think the examples given in the question and in the answers are grammatically non-trivial and thus **prone to translation mistakes**, even by a human learning a language (two substantives, two verbs, etc). That Google makes mistakes might not be so surprising, and we could even argue that the tests were too stringent...
The point of Google Translate (and this is not just for Latin) is that it only serves a purpose if you are able to judge the quality of its output, and understand that it's not a faithful account of the source text in any case. This means, of course, that it must only be used to translate a text in a language you *don...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
To answer the question ("What is Latin Google Translate good for?") as stated: ***Absolutely nothing***. At least reliably.
I think the examples given in the question and in the answers are grammatically non-trivial and thus **prone to translation mistakes**, even by a human learning a language (two substantives, two verbs, etc). That Google makes mistakes might not be so surprising, and we could even argue that the tests were too stringent...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
A classmate of mine who got his Ph.D. in natural-language processing and now works at Google told me the following. It might be out of date and I might be remembering it wrong. But I just did a little, er, googling, and this seems to be passably well corroborated by other sources. How it works ------------ Google Tra...
I think the examples given in the question and in the answers are grammatically non-trivial and thus **prone to translation mistakes**, even by a human learning a language (two substantives, two verbs, etc). That Google makes mistakes might not be so surprising, and we could even argue that the tests were too stringent...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
To answer the question ("What is Latin Google Translate good for?") as stated: ***Absolutely nothing***. At least reliably.
The point of Google Translate (and this is not just for Latin) is that it only serves a purpose if you are able to judge the quality of its output, and understand that it's not a faithful account of the source text in any case. This means, of course, that it must only be used to translate a text in a language you *don...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
To answer the question ("What is Latin Google Translate good for?") as stated: ***Absolutely nothing***. At least reliably.
I found a very specific use for it this summer. For a couple weeks I was at one of the living-Latin summer programs run by [SALVI](http://www.latin.org), and the rule there—as at other such programs I've attended—is that you're not allowed to speak any language but Latin except in emergencies. Since my husband, who spe...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
While Google Translate may be useless to an advanced Latin speaker, a beginner such as me finds it helpful for gaining **quick insights.** I use it in combination with **little tricks,** such as splitting the sentence into separate clauses and/or adding punctuation and converting the syntax to the [Subject–Verb–Object...
I found a very specific use for it this summer. For a couple weeks I was at one of the living-Latin summer programs run by [SALVI](http://www.latin.org), and the rule there—as at other such programs I've attended—is that you're not allowed to speak any language but Latin except in emergencies. Since my husband, who spe...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
A classmate of mine who got his Ph.D. in natural-language processing and now works at Google told me the following. It might be out of date and I might be remembering it wrong. But I just did a little, er, googling, and this seems to be passably well corroborated by other sources. How it works ------------ Google Tra...
I found a very specific use for it this summer. For a couple weeks I was at one of the living-Latin summer programs run by [SALVI](http://www.latin.org), and the rule there—as at other such programs I've attended—is that you're not allowed to speak any language but Latin except in emergencies. Since my husband, who spe...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
A classmate of mine who got his Ph.D. in natural-language processing and now works at Google told me the following. It might be out of date and I might be remembering it wrong. But I just did a little, er, googling, and this seems to be passably well corroborated by other sources. How it works ------------ Google Tra...
While Google Translate may be useless to an advanced Latin speaker, a beginner such as me finds it helpful for gaining **quick insights.** I use it in combination with **little tricks,** such as splitting the sentence into separate clauses and/or adding punctuation and converting the syntax to the [Subject–Verb–Object...
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
A classmate of mine who got his Ph.D. in natural-language processing and now works at Google told me the following. It might be out of date and I might be remembering it wrong. But I just did a little, er, googling, and this seems to be passably well corroborated by other sources. How it works ------------ Google Tra...
To answer the question ("What is Latin Google Translate good for?") as stated: ***Absolutely nothing***. At least reliably.
4,349
Google Translate is notoriously unreliable for Latin. However, the translations do make some amount of sense. **Is there some kind of translation task involving Latin that Google Translate is relatively reliable for?** I tried it for simple phrases to and from English. Here are the result of my little test1: 1. Puer ...
2017/05/11
[ "https://latin.stackexchange.com/questions/4349", "https://latin.stackexchange.com", "https://latin.stackexchange.com/users/79/" ]
I think the examples given in the question and in the answers are grammatically non-trivial and thus **prone to translation mistakes**, even by a human learning a language (two substantives, two verbs, etc). That Google makes mistakes might not be so surprising, and we could even argue that the tests were too stringent...
I found a very specific use for it this summer. For a couple weeks I was at one of the living-Latin summer programs run by [SALVI](http://www.latin.org), and the rule there—as at other such programs I've attended—is that you're not allowed to speak any language but Latin except in emergencies. Since my husband, who spe...
24,275
I have a mac and raspberry pi connected via ethernet cable which are communicated fine. Internet sharing is turned on but my raspberry pi can't connect to the internet. My mac is connected to the internet via Wifi with the following settings: ![enter image description here](https://i.stack.imgur.com/sfLfg.png) Inter...
2014/11/04
[ "https://raspberrypi.stackexchange.com/questions/24275", "https://raspberrypi.stackexchange.com", "https://raspberrypi.stackexchange.com/users/22249/" ]
Your route is incorrect: default 192.168.1.254 If your gateway (in this case the Mac) is at .1.90, your gateway has to be at .1.90 If you have just set the fixed IP in network/interfaces, then you may need to restart your networking stack (/etc/init.d/network restart). Also check your current network configuration w...
You have to enable this in 'Sharing' under 'Settings' Follow this <http://millibit.blogspot.com/2014/12/ceph-pi-making-pi-with-mac.html#internet_sharing>
1,612,989
The number of maps $f$ from the set $\{1,2,3\}$ into the set $\{1,2,3,4,5\}$ such that $f(i)\le f(j)$, whenever $i<j$.
2016/01/15
[ "https://math.stackexchange.com/questions/1612989", "https://math.stackexchange.com", "https://math.stackexchange.com/users/305289/" ]
You have to choose the $3$ function values $f(1),f(2),f(3)$ from $5$ possibilities, with repetition allowed. The order of the $3$ chosen numbers is not important, because once you have chosen them, the condition $f(i)\le f(j)$ tells you which is $f(1)$, which is $f(2)$ and which is $f(3)$. The number of choices of $3$...
Hint - Suppose you map $1$ to $1$, now if $2$ maps to $1$ then $3$ can map to $1,2,3,4$ or $5$, Similarly if $2$ maps to $2$ then $3$ will have $4$ choices to map to, so the total no of functions when $1$ maps to $1$ is $(5+4+3+2+1)$ Similarly count the others when $1$ maps to $2,3,4$ or $5$
83,380
I have found lots of information online about European pilots owning and flying N-reg aircraft using trusts set up in the US. I live in Europe, but I'm a US citizen, so must I also set up a trust because I don't live in the US? I cannot seem to find a definitive answer on this with references to supporting regulation.
2021/01/08
[ "https://aviation.stackexchange.com/questions/83380", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/52979/" ]
As a US citizen you can own an N-reg aircraft directly, regardless of where you live. The regulations on aircraft registration are in [14 CFR Part 47](https://www.ecfr.gov/cgi-bin/text-idx?node=pt14.1.47#se14.1.47_17). They say *who* can register an N-reg aircraft, but they don't say anything about *where* that person ...
According to NBAA, trusts are used by non-US citizens to register aircraft with the FAA. Because you are a US citizen, it looks like you don't need a trust to maintain the FAA registration. Here's the article with references to the FARs: <https://nbaa.org/flight-department-administration/aircraft-registration-transacti...
83,380
I have found lots of information online about European pilots owning and flying N-reg aircraft using trusts set up in the US. I live in Europe, but I'm a US citizen, so must I also set up a trust because I don't live in the US? I cannot seem to find a definitive answer on this with references to supporting regulation.
2021/01/08
[ "https://aviation.stackexchange.com/questions/83380", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/52979/" ]
As a US citizen you can own an N-reg aircraft directly, regardless of where you live. The regulations on aircraft registration are in [14 CFR Part 47](https://www.ecfr.gov/cgi-bin/text-idx?node=pt14.1.47#se14.1.47_17). They say *who* can register an N-reg aircraft, but they don't say anything about *where* that person ...
No, as a US citizen you do not need to jump through any hoops to register an N-reg aircraft in your name, anywhere in the world. It doesn't matter where you live. I used to own an N-reg aircraft when I lived in Germany. It was registered to my German address. When I moved back to the US and brought it with me I submitt...
41,673,206
There are around 3 hundred components rendered inside the wrapper component and its taking to much of time to render. But I need thousand of components to get rendered inside the wrapper container. How can I achieve this without any performance issues while rendering the components [Image shows the rendering time taken...
2017/01/16
[ "https://Stackoverflow.com/questions/41673206", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2282123/" ]
You could sort the strings for the same order and join it. ```js function getUnique(a, b) { return [a.toString(), b.toString()].sort().join(''); } console.log(getUnique("apple", "ball")); console.log(getUnique("ball", "apple")); ``` For numbers, i suggest to use a separator and numerical order. ```js functi...
You can use `concat` method. See this example: ``` var str1 = "Hello "; var str2 = "world!"; var res = str1.concat(str2); ``` Source: <http://www.w3schools.com/jsref/jsref_concat_string.asp>
10,432,297
I'm working with a simple ASMX web service that gives the users the ability to add comments. For each comment that gets added I add a timestamp to the row. The issue I'm running into is that If I add two comments 1 second apart they will both have the same timestamp. Instead of using `DateTime.Now` in my code I use a s...
2012/05/03
[ "https://Stackoverflow.com/questions/10432297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135049/" ]
If you right click on the file, you should be able to see the permissions and attributes of the file.
Right click one the file--> Details . You can see the computer name where it was created and the date.
10,432,297
I'm working with a simple ASMX web service that gives the users the ability to add comments. For each comment that gets added I add a timestamp to the row. The issue I'm running into is that If I add two comments 1 second apart they will both have the same timestamp. Instead of using `DateTime.Now` in my code I use a s...
2012/05/03
[ "https://Stackoverflow.com/questions/10432297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135049/" ]
Check at the end of the line. Under GNU/Linux lines end with \n (ascii: 0x0A) while under Miscrosoft W$ndos it is \r\n (ascii: 0x0D 0x0A). Wikipedia: <https://en.wikipedia.org/wiki/Newline>
Right click one the file--> Details . You can see the computer name where it was created and the date.
10,432,297
I'm working with a simple ASMX web service that gives the users the ability to add comments. For each comment that gets added I add a timestamp to the row. The issue I'm running into is that If I add two comments 1 second apart they will both have the same timestamp. Instead of using `DateTime.Now` in my code I use a s...
2012/05/03
[ "https://Stackoverflow.com/questions/10432297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135049/" ]
found this: <http://bit.ly/J258Mr> for identifying a word document but some of the info is relevant > > To see on which computer the document had been created, open the Word > document in a hex editor and look for "PID\_GUID". This is followed by > a globally unique identifier that, depending upon the version of W...
Right click one the file--> Details . You can see the computer name where it was created and the date.
10,432,297
I'm working with a simple ASMX web service that gives the users the ability to add comments. For each comment that gets added I add a timestamp to the row. The issue I'm running into is that If I add two comments 1 second apart they will both have the same timestamp. Instead of using `DateTime.Now` in my code I use a s...
2012/05/03
[ "https://Stackoverflow.com/questions/10432297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1135049/" ]
The one thing I can think on the top of my mind is inspecting the newline characters on your file - I'm assuming your files do have multiple lines. If the file was generated using Windows then a newline would be characterized by the combination of carriage return and line feed characters (CR+LF) whereas a simple line f...
Right click one the file--> Details . You can see the computer name where it was created and the date.
6,095
The stock media player on my phone has an annoying behaviour. Whenever I unplug the headphones, if the media player is paused or not running, it immediately starts running and playing my playlist. This is very annoying because everyone in the room is forced to listen to my songs until I manage to tap (twice) the Music ...
2011/02/17
[ "https://android.stackexchange.com/questions/6095", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1926/" ]
This is a known bug in Android (even in certain Eclair systems). There's a widget called [Headset Blocker](https://market.android.com/details?id=com.idunnolol.headsetblocker) that when added to any of your homescreens and activated prevents the music player from playing whenever you unplug your headest. Freeware and i...
Since you mentioned Motorola in the question, this might be your problem: The Droid and Milestone were having this problem on Android 2.0.1 or less. It was corrected on Android 2.1. So update your phone to the latest version and it should be corrected.
6,095
The stock media player on my phone has an annoying behaviour. Whenever I unplug the headphones, if the media player is paused or not running, it immediately starts running and playing my playlist. This is very annoying because everyone in the room is forced to listen to my songs until I manage to tap (twice) the Music ...
2011/02/17
[ "https://android.stackexchange.com/questions/6095", "https://android.stackexchange.com", "https://android.stackexchange.com/users/1926/" ]
This is a known bug in Android (even in certain Eclair systems). There's a widget called [Headset Blocker](https://market.android.com/details?id=com.idunnolol.headsetblocker) that when added to any of your homescreens and activated prevents the music player from playing whenever you unplug your headest. Freeware and i...
I used to have this problem on my Motorola Droid 1. I used Tasker to "stop music" on certain headset events. [See my answer here.](https://android.stackexchange.com/questions/4940/random-music-playback-winamp-cubed/4962#4962)
53,868,770
I simply want to use a modified example of Nested flex on the [PrimeNG Flex](https://www.primefaces.org/primeng/#/flexgrid) by using the code below: ``` <h3>Nested</h3> <div class="p-grid nested-grid"> <div class="p-col-8"> <div class="p-grid"> <div class="p-col-6"> <div class="...
2018/12/20
[ "https://Stackoverflow.com/questions/53868770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/836018/" ]
the example in the site shows kind of like this i don't think you need 'p-grid nested-grid' ``` <div class="p-grid"> <div class="p-col-8"> <div class="p-grid"> <div class="p-col-6"> 6 </div> <div class="p-col-6"> 6 </div> <div class="p-col-12"> ...
Remove the `nested-grid` class in the first `div` element, it's not needed as shown in the example. ``` <div class="p-grid"> <div class="p-col-8"> <div class="p-grid"> <div class="p-col-6"> 6 </div> <div class="p-col-6"> 6 </di...