qid
int64
1
74.7M
question
stringlengths
0
70k
date
stringlengths
10
10
metadata
list
response
stringlengths
0
115k
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 ```
12,802,957
I have three web projects on Asp.net MVC3: Portal.Web -> Common controllers and models Portal.WebsiteCustom -> Custom website 1 Portal.WebsiteCustom2 -> Custom website 2 Both custom sites uses the controllers and models of Portal.Web. Now i would like to add the common views on this project and set MVC to look on ...
2012/10/09
[ "https://Stackoverflow.com/questions/12802957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445003/" ]
> > Is this possible? > > > Yes. > > How i could archieve this? > > > You will have to embed those views as resources into the assembly and then reference the assembly in your client MVC project. Next you will have to write a custom virtual path provider that is able to retrieve those views as embedded resou...
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...
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...
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...
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 ...
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 ...
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 ...
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;...
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 |...
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 ...
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.
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, '_'); ```
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...
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`
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...
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 ...
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"...
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); ```
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...
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 (\...
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.
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...
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...
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 ...
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...
16,605,578
this is my array: ``` orlist="" orlist="T_TAB1 \n" orlist=$orlist"T_TAB2 \n" orlist=$orlist"T_TAB3 \n" orlist=$orlist"T_TAB4 \n" echo $orlist arrIdx=0 OLD_IFS=$IFS; IFS="\n" for IndixList in ${orlist[@]}; do echo $IndxList MYDIR[${arraryIndix}]=$IndixList (( arraryIndix = $arraryIndix+ 1 )) done IFS=$OLD...
2013/05/17
[ "https://Stackoverflow.com/questions/16605578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1540456/" ]
Well your problem came because if you write `\n`, it's not necessarily treated as a new line, somebody have to translate the sequence of `\` followed by `n` as a newline. also same in `IFS="\n"` IFS needs to be set to something which evaluates to a newline, not a combination of `\` and `n`. Also orlist is a variable, y...
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}\...
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...
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...
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...
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...
49,548,107
how to add progress view in moya swift ?, is this correct. is this a correct way to use progressblock. ``` let instance = MoyaProvider<ServiceType>() self.view.showLoadingHUD() instance.request(.GetRouteDetail, callbackQueue: DispatchQueue.main, progress: { (response) in if response.completed{ ...
2018/03/29
[ "https://Stackoverflow.com/questions/49548107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5852117/" ]
just modify the `hideLoadingHud` in inside the success or failure block. bz that part result handler ``` let instance = MoyaProvider<ServiceType>() self.view.showLoadingHUD() instance.request(.GetRouteDetail, callbackQueue: DispatchQueue.main, progress: { (response) in }) { (result) in self.vi...
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...
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...
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...
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$...
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 ...
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...
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.
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...
82,650
I have an EOS 750D and [simple reversing ring](http://photovideo.com.au/images/CANREV52270.jpg). There is no problem with capturing photos using the viewfinder. I have to use M mode and set everything manually. But when I use live view (or try to capture video) I can only see a black screen. When in video mode, there ...
2016/09/08
[ "https://photo.stackexchange.com/questions/82650", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/39108/" ]
Basic cameras use "exposure simulation" in Liveview to help the shooter visualize what the final exposure will be. This creates problems when using manual lenses or any lens that does not communicate with the camera. More advanced cameras have the option to turn off "exposure simulation" but basic cameras like the 75...
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"> ...
52,616,343
I'm wondering if it's better practice to use Bundle or make another class entirely to save data? During a fragment change I can set it up so that onSaveInstanceState() saves information. Alternatively, I could store that information as a static variable in another class, then create a getter function in that class an...
2018/10/02
[ "https://Stackoverflow.com/questions/52616343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10318432/" ]
For the various steps, I can give you the following hints. ### File names For obtaining mp3 file names the [glob](https://docs.python.org/3/library/glob.html) module is your friend: `glob.iglob('*.mp3', recursive=True)`. ### Dealing with mp3 For dealing with mp3 files you can use practically any command line utilit...
13,823
I have installed MySQL via [homebrew](https://brew.sh/): `brew install mysql`. I'd like to get the MySQL preference pane hooked up to my installation of MySQL through homebrew. How can I achieve this?
2011/05/09
[ "https://apple.stackexchange.com/questions/13823", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/6162/" ]
See [my answer to your question at superuser.com](https://superuser.com/a/413814/121764).
51,643,920
Given these two classes: ``` public class Abc { public static void Method(string propertyName) { } } public class Def { public int Prop { get; } public void Method2() { Abc.Method("Prop"); } } ``` As is, Roslyn rule CA1507 (use nameof) will be triggered for `Method2`. I don't want that, because that strin...
2018/08/02
[ "https://Stackoverflow.com/questions/51643920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2234468/" ]
I believe that this rule only [triggers](https://github.com/dotnet/roslyn-analyzers/blob/ea231a69f9891764f10c5ed214409627da010be7/src/Microsoft.CodeQuality.Analyzers/Core/Maintainability/UseNameofInPlaceOfString.cs#L67)1 when the name of your parameter is `paramName` or `propertyName`2. So let's change the parameter: ...
6,229,913
I am struggling to get my interior background image to display in IE, works fine in FF and chrome. Cant figure it out. ``` <div id="banner"> <div id="banner-image"><cms:CMSEditableImage ID="BannerPhoto" runat="server" ImageHeight="284" ImageWidth="892" /></div> </div> <div id="interior-content-blo...
2011/06/03
[ "https://Stackoverflow.com/questions/6229913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/783021/" ]
You can change how the keyboard behaves when it appears over the Ad. Go into your AndroidManifest.xml and add this attribute in the activity tag with the AdMob banner. ``` android:windowSoftInputMode="adjustPan" ``` This will prevent the ads from jumping above the keyboard and hiding the input. Instead, they will ap...
56,394
I have replaced three flats on my new bike and found each time a tear or hole at the base of the air valve. What can cause this.
2018/08/11
[ "https://bicycles.stackexchange.com/questions/56394", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/38917/" ]
1. As Kibbee suggests, the wrong size valve. 2. A badly-formed valve hole in the rim. It's not that unusual to find that there is a "lip" of metal at the hole that will cut into the tube. This requires a bit of filing with a small round file to correct. 3. Running the tire flat or with very low pressure. As an under-in...
1,650,529
An often given example of a group of infinite order where every element has infinite order is the group $\dfrac{\mathbb{(Q, +)}}{(\mathbb{Z, +})}$. But I don't see why every element necessarily has finite order in this group. Why is this true? Also, what is the identity element of this group?
2016/02/11
[ "https://math.stackexchange.com/questions/1650529", "https://math.stackexchange.com", "https://math.stackexchange.com/users/312641/" ]
The identity of $G =\mathbb Q / \mathbb Z$ is $\mathbb Z$. 1) Every element of $G$ has **finite** order. Indeed, if you take any $r + \mathbb Z \in G$ where $r \in \mathbb Q$ then we may write $r = \frac{m}{n}$, with $m,n \in \mathbb Z $ and $n > 0$. Thus $$n (r + \mathbb Z) = m + \mathbb Z = \mathbb Z$$ then it f...
32,730
The following code evaluates the similarity between two time series: ``` set.seed(10) RandData <- rnorm(8760*2) America <- rep(c('NewYork','Miami'),each=8760) Date = seq(from=as.POSIXct("1991-01-01 00:00"), to=as.POSIXct("1991-12-31 23:00"), length=8760) DatNew <- data.frame(Loc = America, ...
2012/07/21
[ "https://stats.stackexchange.com/questions/32730", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/12141/" ]
The "a" in "gam" stands for "additive" which means no interactions, so if you fit interactions you are really not fitting a gam model any more. That said, there are ways to get some interaction like terms within the additive terms in a gam, you are already using one of those by using the `by` argument to `s`. You coul...
36,403,859
How do I use "UPSERT" or "INSERT INTO likes (user\_id,person\_id) VALUES (32,64) ON CONFLICT (user\_id,person\_id) DO NOTHING" in PostgreSQL 9.5 on Rails 4.2?
2016/04/04
[ "https://Stackoverflow.com/questions/36403859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3384741/" ]
Have a look at `active_record_upsert` gem here: <https://github.com/jesjos/active_record_upsert>. This does the upsert, but obviously only on Postgres 9.5+.
27,150,695
This may (should) have been asked before somewhere but I can't seem to find an answer. If someone provides a link I can delete this post!: Just trying to get my head around some of composer's (probably applies to other package managers too) functionality. Basically I just want to know what composer does in the follow...
2014/11/26
[ "https://Stackoverflow.com/questions/27150695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624933/" ]
### To question 1 Yes Composer can only install one version of each extension/package. ### To question 2 Because of answer 1: Composer would consider your main project and the external package as incompatible. In this case you could * stay with version 5 at your main project too. * ask the external package owner...
33,785,851
I've tried this code. ``` varying vec2 blurCoordinates[2][2]; ``` But it results in error: Vertex shader compilation failed. ERROR: 0:10: '[' : Syntax error: syntax error ERROR: 1 compilation errors. No code generated.
2015/11/18
[ "https://Stackoverflow.com/questions/33785851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4426075/" ]
As already noted in genpfault's answer, GLSL does not support multidimensional arrays right from the beginning. The extension [`GL_ARB_arrays_of_arrays`](https://www.opengl.org/registry/specs/ARB/arrays_of_arrays.txt) does provide the features you are looking for. It was promoted an OpenGL core feature in Version 4.3,...
38,092,075
So simply put I'm trying to make a simple search engine where I've got a MySQL database and its contents being displayed on a HTML table (using PHP to get the information) and I want to make a search bar that as you type, filters the list automatically. I've found tutorials on how to make that with plain text where it ...
2016/06/29
[ "https://Stackoverflow.com/questions/38092075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5800070/" ]
I have doubt in the way you are passing the data. Try to pass the data without doing **stringify** and see if it works.
1,199,486
How can i use the server.mappath method in a C# class library class ,which acts as my BusinessLayer for My ASP.NET WEbsite
2009/07/29
[ "https://Stackoverflow.com/questions/1199486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40521/" ]
By calling it? ``` var path = System.Web.HttpContext.Current.Server.MapPath("default.aspx"); ``` Make sure you add a reference to the System.Web assembly.
99,841
> > Slight specific staining with the antibody was observed in **isolated** peripheral blood lymphocytes. > > > Would this **isolated** always evoke the meaning "[happening or existing only once, separate](http://dictionary.cambridge.org/dictionary/english/isolated)", as in > > There were only a few **isolated...
2016/08/06
[ "https://ell.stackexchange.com/questions/99841", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/2127/" ]
I would interpret this sentence as meaning "isolated ... from tissue." However, I am not a physician or biologist and I can't say whether one would interpret it differently. What I can do is quote a number of publications that use that phrase: > > [*Apoptogenic effect of fentanyl on freshly isolated peripheral blood ...
37,739,324
I have the following code where `Model.VerticalType` contains string. I want to compare it with an `Enum` but I get error: Operator '==' cannot be applied to operands of type 'string' and `DGS.DGSAPI.UI.BusinessModels.Enums.VerticalType.Voice` ``` @if (Model.VerticalType == DGS.DGSAPI.UI.BusinessModels.Enums.Vertica...
2016/06/10
[ "https://Stackoverflow.com/questions/37739324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5788013/" ]
Call `.ToString()` on the enum value. ``` @if (Model.VerticalType == DGS.DGSAPI.UI.BusinessModels.Enums.VerticalType.Voice.ToString()) ``` This will convert the enum to it's name, in this case `Voice`.
12,511,801
I have two dictionaries as follows: `D1={'a':1,'b':2,'c':3}` and `D2={'b':2,'c':3,'d':1}` I want to merge these two dictionaries and the result should be as follows: `D3={'a':1,'b':2,'c':3,'b':2,'c':3,'d':1}` how can I achieve this in python?
2012/09/20
[ "https://Stackoverflow.com/questions/12511801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1321663/" ]
> > I want to merge these two dictionaries and the result should be as > follows: > > > D3={'a':1,'b':2,'c':3,'b':2,'c':3,'d':1} > > > how can I achieve this in python? > > > You can't. You can only have one value per key in a Python dict. What you can do is to have a list or a set as the value. Here is an e...
69,908,135
I just tried building my old project in vs2019 to newer vs2022 but getting following error and unable to build it. Can somebody suggest what can be done to resolve the issue? ``` Severity Code Description Project File Line Suppression State Error The "ResolveManifestFiles" task failed unexpectedly. ...
2021/11/10
[ "https://Stackoverflow.com/questions/69908135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1761822/" ]
Not sure why, but if you remove "Enable ClickOnce security settings" it'll work. Regards
72,363,010
How can I add random numbers (for example from 1 to 100) into an array using Julia language? Also, the array already has to have a defined length (for example 30 numbers).
2022/05/24
[ "https://Stackoverflow.com/questions/72363010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19053578/" ]
If your initial vector is `v`, you can do as follows: ``` v .+= rand(1:100,length(v)) ``` * `rand(1:100,length(v))` will generate a random vector of integers between 1 and 100 and of length identical to `v`'s one (the `length(v)` part), you can read the [rand()](https://docs.julialang.org/en/v1/stdlib/Random/#Base.r...
80,633
What is the best textbook (or book) for studying Etale cohomology?
2011/11/10
[ "https://mathoverflow.net/questions/80633", "https://mathoverflow.net", "https://mathoverflow.net/users/-1/" ]
Not a textbook, but a free PDF by J.S. Milne, <http://www.jmilne.org/math/CourseNotes/LEC.pdf>, pretty good IMHO.
58,595
> > Es ist für beide fast so, als **seien** sie niemals getrennt gewesen. > > > Warum wird hier der Konjunktiv 1 verwendet? Es handelt sich um keine indirekte Rede wo der Konjunktiv 1 hauptsächlich verwendet wird. Meines Wissens nach sollte hier Konjunktiv 2 verwendet werden, also: > > Es ist für beide fast so, ...
2020/05/14
[ "https://german.stackexchange.com/questions/58595", "https://german.stackexchange.com", "https://german.stackexchange.com/users/40962/" ]
Von der Konsistenz her gesehen hast Du recht und es müsste der Konjunktiv 2 verwendet werden. Da sie tatsächlich getrennt waren, beschreibt der Nebensatz eine irreale Situation, wofür normalerweise der Konjunktiv 2 verwendet wird. Es liegt keine indirekte Rede (oder ähnliches) vor, die den Konjunktiv 1 verlangen würde....
57,032,235
I'm trying to filter a Dataframe based on the length of the string in the index. In the following example I'm trying to filter out everything but `Foo Bar`: ``` index Value Foo 1 Foo Bar 2 Bar 3 In: df[df.index.apply(lambda x: len(x.split()) > 1] Out: AttributeError: 'Index' object has no attribute 'ap...
2019/07/15
[ "https://Stackoverflow.com/questions/57032235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7542939/" ]
We do not need `apply` here ``` df[df.index.str.count(' ')==1] ``` To fix your code `map` ``` df[df.index.map(lambda x: len(x.split()) > 1)] ```
6,904,065
this is from selenium grid. How to write java/C# code to make parallel execution. Is this enough? ``` ISelenium selenium1 = new DefaultSelenium("localhost", 5555, "*iehta", "http://localhost/"); ISelenium selenium2 = new DefaultSelenium("localhost", 5556, "*iehta", "http://localhost/"); ISelenium selenium4 = new Def...
2011/08/01
[ "https://Stackoverflow.com/questions/6904065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267679/" ]
Why is there parameter ``` <arg value="-parallel"/>? ``` This is for testng. This would run all the methods/classes/tests in parallel rather than sequentially. You can see more about this property [here](http://testng.org/doc/documentation-main.html#parallel-running). You have registered 3 RCs and ideally you should...
513,765
The comments section of [this post](http://www.ehow.com/how_5157582_calculate-pi.html) says that $\pi$ does repeat itself if done under base 11... and that it somehow defines the universe. * Can anyone expand on the idea that irrational numbers may repeat if a different base is used? * Does $\pi$ in fact repeat under ...
2013/10/03
[ "https://math.stackexchange.com/questions/513765", "https://math.stackexchange.com", "https://math.stackexchange.com/users/4420/" ]
The comment is mistaken. A number is rational if and only if its expansion *in any base* is eventually recurring (possibly with a recurring string of $0$s). Thus $\pi$ has no recurring expansion in any base. --- **Why?** Well suppose it did. Then $$\pi = n . d\_1d\_2 \cdots d\_k \overline{r\_1 r\_2 \cdots r\_{\ell}}...
43,185,964
Getting this error why trying to deploy the war in weblogic > > Caused By: weblogic.management.DeploymentException: [HTTP:101170]The > servlet Web Rest Services is referenced in servlet-mapping /myrest/\* > but not defined in web.xml. > at weblogic.servlet.internal.WebAppServletContext.verifyServletMappings(WebAp...
2017/04/03
[ "https://Stackoverflow.com/questions/43185964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1847484/" ]
> > `<servlet-name --> Jersey Web Application != Web Rest Services` > > > The `<servlet-name>` in the `<servlet-mapping>` should correspond to a `<servlet-name>` in a `<servlet>` definition. Hence the error > > The servlet Web Rest Services is referenced in servlet-mapping /myrest/\* but not defined in web.xml >...
18,630,436
I need to read permanent (burned-in) MAC address of network adapter. Since MAC address can be easily spoofed, I need to read the real one which is written on EEPROM. I need to do it using C++ on Linux. I tried using [ethtool](http://linux.die.net/man/8/ethtool) which is quite good and works fine. However on some syste...
2013/09/05
[ "https://Stackoverflow.com/questions/18630436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1338432/" ]
If you haven't find the answer yet, you might want to check this out. <https://serverfault.com/questions/316976/can-i-get-the-original-mac-address-after-it-has-been-changed>
66,323,859
I am trying to understand the memory leak. I don't understand why below MyInt deconstruct in main is never called and a memory leak happens. ``` class MyInt { int *_p; public: MyInt(int *p = NULL) { _p = p; } ~MyInt() { delete _p; } int &operato...
2021/02/22
[ "https://Stackoverflow.com/questions/66323859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9261745/" ]
> > I don't understand why below MyInt deconstruct in main is never called and a memory leak happens. > > > Because you use an allocated pointer to `MyInt`. You have to call ``` delete en; ``` to de-allocate it. Deleting `en`, the destructor of `MyInt` is called and the memory associated to `_p` is de-allocat...
445,304
I am designing a system to 'hack' into a CAN bus. My first idea was to split the target CAN bus, terminating both ends into isolated CAN transceivers, and use a MCU to pass packets between the buses while altering values inside the packets. Below is a rough picture of the setup: [![Hand drawn system diagram](https://i...
2019/06/25
[ "https://electronics.stackexchange.com/questions/445304", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/183950/" ]
According to your schematic, you broke up the bus in two and there's no termination anywhere. You get the wrong impedance instead of the expected 60 Ohm. Before each transceiver on the "hack" device, you need terminating resistors of 120 Ohm between CANH and CANL. In addition, the "hacker" MCU's CAN controller must a...
6,756
It seems pretty normal to see screenshots of MS Word, steps for "this is how you generate a template". I don't think Microsoft would object. But I'm not sure about reprinting images from in-game scenes for specific games, like Diablo II. Do you need to obtain permission to include a screenshot of a game in your book?
2012/12/06
[ "https://writers.stackexchange.com/questions/6756", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/389/" ]
There are four factors to determining Fair Use of copyrighted material that must be weighed in the balance: * Purpose and character of use...better if not for profit; better if transforming in some way * The nature of the work...factual is better, creative works less so * The amount and substance of the work...less is...
7,615,807
After renaming my heroku app from the heroku website, whenever I cd to its directory in a terminal and run any heroku command, I get `App not found`. Does anybody know of a way to remedy this?
2011/09/30
[ "https://Stackoverflow.com/questions/7615807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/454761/" ]
Try to update the git remote for the app: ``` git remote rm heroku git remote add heroku git@heroku.com:yourappname.git ```
1,746,676
I am creating a classifieds website. Im storing all ads in mysql database, in different tables. Is it possible to find these ads somehow, from googles search engine? Is it possible to create meta information about each ad so that google finds them? How does major companies do this? I have thought about auto-genera...
2009/11/17
[ "https://Stackoverflow.com/questions/1746676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Google doesn't find database records. Google finds web pages. If you want your classifieds to be found then they'll need to be on a Web page of some kind. You can help this process by giving Google a site map/index of all your classifieds. I suggest you take a look at [Google Basics](http://www.google.com/support/webm...
213,778
I want to perform a statistical test: Wilcoxon Signed Rank Test to test if there is a significant difference between them, but I don't know if the two samples are dependent or not? Context: I have a dataset that contains a set of elements, I want to predict the dependent variable, I use two models A and B to perform th...
2016/05/21
[ "https://stats.stackexchange.com/questions/213778", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/116392/" ]
The answer is *dependent*. Or, to be a bit more precise: paired. The thing to keep in mind here is that you only have one sample, and have two measurements for each observations in that sample. If, instead, you had two distinct samples (e.g., one representing the first 100 cases in your data set and the other the se...
22,875,579
I would like to add a CSS class to a Bootstrap (3.x) tooltip, but it seems not working. So I would like to use Firebug to inspect the tooltip content. However, when I move my mouse to the Firebug area, the dynamically generated tooltip disappers. How can I inspect a dynamically generated Bootstrap tooltip? Here is t...
2014/04/05
[ "https://Stackoverflow.com/questions/22875579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997474/" ]
1. Enable the [*Script* panel](https://getfirebug.com/wiki/index.php/Script_Panel) 2. Reload the page 3. Inspect the `<label>` element containing `Some Text?` 4. Right-click the element and choose *Break On Child Addition or Removal* from the context menu 5. Move the mouse over the question mark => The script execution...
64,288,547
Currently doing a school mini-project where we have to make a program to extract the domain name from a few given URL's, and put those which end in .uk (ie are websites from the united kingdom) in a list. A couple of specifications: * We cannot import any modules or anything. * We can ignore urls that don't start wit...
2020/10/09
[ "https://Stackoverflow.com/questions/64288547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13292868/" ]
This should work ```py def compute(): ret = [] hs = ['https:', 'http:'] domains = ['uk'] file = open('urlfile.txt','r') urllist = file.read().splitlines() for url in urllist: url_t = url.split('/') # \setminus {http*} if url_t[0] in hs: url_t = (url_t[2]).s...
45,867,756
I am trying to customize the font on my site title to Raleway in Wordpress. I have added the google font code in `Customize` > `Typography`. This is working to change the font on my PC but not on my mobile device. I added this code to the Custom CSS panel: ``` @site-title { font-family: 'Raleway'; font-style...
2017/08/24
[ "https://Stackoverflow.com/questions/45867756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8513028/" ]
`#` is only used to indicate a comment when used inside Python code. In your query, it is inside the query string, and so is not parsed as a comment identifier, but as part of the query. If you delete it, you are left with 8 `%s` and only 7 items inside `payload`.
33,273,809
I'm making a basic calculator where you can plus, times, divide and minus as i was experimenting to see if it worked i noticed that instead of 5 divided by being equal to 1.25 it only displayed 1. Here's the code i use to handle the math problems: ``` if (box.getSelectedItem().equals(divide)){ JOptionPane.showM...
2015/10/22
[ "https://Stackoverflow.com/questions/33273809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5448013/" ]
Since you are using Integer,it is happening. Use [Double](http://docs.oracle.com/javase/7/docs/api/java/lang/Double.html) to preserve decimals. In your case,use ``` Double.parseDouble(first.getText()) / Double.parseDouble(second.getText()) ```
9,929
One of Blackberry's [strongest assets](http://www.marketwatch.com/story/rim-the-long-slow-death-spiral-begins-2011-12-20?pagenumber=2) is the "network" that it uses. Can someone explain, or link to technical information that covers what this secure network is, and what it does better than the rest?
2011/12/20
[ "https://security.stackexchange.com/questions/9929", "https://security.stackexchange.com", "https://security.stackexchange.com/users/396/" ]
How dare you! How dare you question the most secure mobile platform available to mankind! My attempt at humor there.. now to a serious answer before the mods attack. Blackberry has some whitepapers regarding security here: <http://us.blackberry.com/ataglance/security/> I would argue the network is not RIM's strongest ...
15,053,715
I'm making a management program with C# & SQL Server 2008. I want to search records using Blood Group, District & Club Name wise all at a time. This is what is making prob: ``` SqlDataAdapter sda = new SqlDataAdapter("SELECT * FROM Table2 WHERE @Blood_Group =" + tsblood.Text + "AND @District =" + tsdist.Text ...
2013/02/24
[ "https://Stackoverflow.com/questions/15053715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2104796/" ]
The correct syntax is to use parametrized queries and absolutely never use string concatenations when building a SQL query: ``` string query = "SELECT * FROM Table2 WHERE BloodGroup = @BloodGroup AND District = @District AND Club_Name = @ClubName"; using (SqlDataAdapter sda = new SqlDataAdapter(query, Mycon1)) { s...
34,995
I planted red and new potatoes in early May. They were planted 6-8 inches deep. The potatoes were sprouted potatoes from our local hardware store. Our soil is heavy clay but the potatoes were planted in purchased hummus which had been worked into the soil to a depth of about 15 inches. Our climate zone is zone 9B. [!...
2017/08/13
[ "https://gardening.stackexchange.com/questions/34995", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/19536/" ]
Judging by the state of the plants when you dug them up, and what the soil surface looks like there are no nutrients whatever in it. The potatoes *tried* to grow, using the material stored in the tuber, but that's as much as they managed to do. The leaves never developed properly, nor did the roots. They would have gr...
34,640,668
I'm working on a plugin for Revit. Revit permits only dll type addins and I chose c# and wpf for gui. I couldn't initialize wpf natively so I needed to contain it in a system.windows.window as content. Now if I close that window with upper right X program continues (looping processing etc.) it doesn't get terminated. ...
2016/01/06
[ "https://Stackoverflow.com/questions/34640668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4338414/" ]
Unfortunately I don't know how to do this without any existing form. But I'm sure you have some kind of main form you can access. Or you can obtain a `Form` using ``` var invokingForm = Application.OpenForms[0]; ``` So you can change the code of your method like this: ``` static void OnNewMessage(object sender, S22...
35,253,840
I am building an app which uploads files to the server via ajax. The problem is that users most likely sometimes won't have the internet connection and client would like to have the ajax call scheduled to time when user have the connection back. This is possible that user will schedule the file upload when he's offline...
2016/02/07
[ "https://Stackoverflow.com/questions/35253840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2008950/" ]
The short answer is no, your app can't run code after being terminated. You can run code in your `AppDelegate`'s `applicationWillTerminate`, but that method is mainly intended for saving user data and other similar tasks. See [this answer](https://stackoverflow.com/a/32225247/5389870) also.
26,556
I am wanting to write a chess engine (see here: [Creating chess engine, machine learning vs. traditional engine?](https://chess.stackexchange.com/questions/26489/creating-chess-engine-machine-learning-vs-traditional-engine)). The first step I am doing is taking a position in as an FEN and converting this position into ...
2019/10/08
[ "https://chess.stackexchange.com/questions/26556", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/19802/" ]
I immediately notice that you've missed the castling moves (O-O and O-O-O). I would list the pawn-promoting moves according to their PGN syntax (=Q/R/N/B suffix), as that's the most commonly used in computer chess. Algebraic notation can be ambiguous for sliding and leaping pieces (everything except pawn and king, ac...
988,147
Can one give an example of an abelian Banach algebra with empty character space? Such algebra must be necessarily non-unital. I couldn't find any examples of such algebras. Thanks!
2014/10/23
[ "https://math.stackexchange.com/questions/988147", "https://math.stackexchange.com", "https://math.stackexchange.com/users/186437/" ]
The [Volterra algebra](http://mathworld.wolfram.com/VolterraAlgebra.html) $V$ is an example of a commutative Banach algebra without maximal ideals (hence with empty character space). See also Definition 4.7.38 in > > H. G. Dales, *Banach algebras and automatic continuity*, London Math. Soc. > Monographs, Volume 24,...
59,699,155
Now I started studying Angular, I was doing a simple exercise, but I had a giant doubt. I have two components (Navbar and app), in navbar I present one that returns me the value 5. In the component app, by clicking the EXECUTE button, I want the value displayed in Navbar to 4 (-1). Is there a way to do this or make an...
2020/01/11
[ "https://Stackoverflow.com/questions/59699155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12696698/" ]
In your case, the "button" and the component are in the same .html -and in the same `<router-outlet></router-outlet>` you only need a [template reference variable](https://angular.io/guide/template-syntax#template-reference-variables-var) ``` <app-navbar #navbar></app-navbar> <p>My APP COMPONENT</p> <button (click)="...
83,697
Everybody needs a leisure activity. Most of the books I need for mine are downstairs, with none in the bedroom. But as I like to keep an eye on things I have this (unsorted) pile by my bed to remind me. **What's my hobby?** [![enter image description here](https://i.stack.imgur.com/KfTm8.jpg)](https://i.stack.imgur.c...
2019/05/06
[ "https://puzzling.stackexchange.com/questions/83697", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/58787/" ]
Your hobby is > > **birdwatching** (hinted by the word "hobby" and the reference to "keeping an eye on things"). > > > We have: > > The Four **Feathers** > > What is the name of this book? (published by **Pelican**) > > Poems of Matthew **Arnold** -- "Arnold" means something like "strength of the eagl...
1,687
Editing a question has the effect of bumping it on top of the front page. Should we limit the number of edits done on old questions? Bumping forty old questions in the front page has just the effect to hide the newest questions. I am asking the question because something I observed between today, and yesterday. I a...
2011/07/29
[ "https://english.meta.stackexchange.com/questions/1687", "https://english.meta.stackexchange.com", "https://english.meta.stackexchange.com/users/252/" ]
Are you referring to JSBangs removing a tag from 40 different questions? That's the only thing I see at the moment, scrolling down. If you need to remove a lot of tags, **you should post a request here on meta,** since developers have the ability to destroy tags without causing revisions. So the mistake in this case ...
6,902,467
In some programming API's I see a list of methods to call, like getBoolean(String key, getDouble(String key), and getString(String key). Some other API's use a general get(String key) method, and return an Object which you are supposed to cast to an appropriate type yourself. Now I am writing my own data accessing poi...
2011/08/01
[ "https://Stackoverflow.com/questions/6902467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/789939/" ]
Advantage: getBoolean(), getDouble(), etc. allow you to return the respective primitive types. As far as I've seen, that's the primary reason anyone writes methods like that.
12,766,528
I want to create a function object, which also has some properties held on it. For example in JavaScript I would do: ``` var f = function() { } f.someValue = 3; ``` Now in TypeScript I can describe the type of this as: ``` var f: { (): any; someValue: number; }; ``` However I can't actually build it, without requ...
2012/10/07
[ "https://Stackoverflow.com/questions/12766528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/664175/" ]
Update: This answer was the best solution in earlier versions of TypeScript, but there are better options available in newer versions (see other answers). The accepted answer works and might be required in some situations, but have the downside of providing no type safety for building up the object. This technique wil...
3,059,019
INFORMIX-SQL or any other SQL-based DB: Suppose I have an app where depending on the value of some columns, example: ``` company.code char(3) {abc} company.branch char(2) {01} ``` Can I construct table name "abc01" for inclusion in SELECT \* FROM abc01; ? In other words, a variable table name.. same question appli...
2010/06/17
[ "https://Stackoverflow.com/questions/3059019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366797/" ]
Only in a language which can manipulate character strings and handle Dynamic SQL. It has to create the statement on the fly. You can only use placeholders in queries for values, not for the structural elements of the query such as the table name or column name.
29,549,905
I am trying to create a simple 3D scatter plot but I want to also show a 2D projection of this data on the same figure. This would allow to show a correlation between two of those 3 variables that might be hard to see in a 3D plot. I remember seeing this somewhere before but was not able to find it again. Here is so...
2015/04/09
[ "https://Stackoverflow.com/questions/29549905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1130635/" ]
You can add 2D projections of your 3D scatter data by using the `plot` method and specifying `zdir`: ``` import numpy as np import matplotlib.pyplot as plt x= np.random.random(100) y= np.random.random(100) z= np.sin(3*x**2+y**2) fig= plt.figure() ax= fig.add_subplot(111, projection= '3d') ax.scatter(x,y,z) ax.plot(...
827,893
I have two menu items for dir, mark, regexp, multiple and single on the menu bar in dired mode. While it doesn't affect the usage, but it seems something is wrong and makes me feel uncomfortable. Anyone know what is the cause? Thank you very much!
2014/10/17
[ "https://superuser.com/questions/827893", "https://superuser.com", "https://superuser.com/users/380371/" ]
Do you see this problem already with `emacs -Q`? If not, then try to see which part of your config file triggers this problem.
32,626,809
I'm looking for a way to map "emacs" to "emacs -nw" in powershell. I tried this (screenshot below), and it adds it as an alias, but it doesn't work. However, the command "emacs -nw" works before setting the alias. [![enter image description here](https://i.stack.imgur.com/q4HkM.png)](https://i.stack.imgur.com/q4HkM.pn...
2015/09/17
[ "https://Stackoverflow.com/questions/32626809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3603899/" ]
try creating a function: ``` function emacs {emacs.exe -nw} ``` then add it to your powershell profile ( `$profile` )
48,583,446
Which one is better: having a BLOB field in the same table or having a 1-TO-1 reference to it in another table? I'm making a MySQL database whose main table is called item(ID, Description). This table is consulted by a program I'm developing in VB.NET which offers the possibility to double-click a specific item obtaine...
2018/02/02
[ "https://Stackoverflow.com/questions/48583446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3802998/" ]
You can add the BLOB field directly to your main table, as BLOB fields are not stored in-row and require a separate look-up to retrieve its contents. Your dependent table is needless. BUT another and preferred way is to store on your database table only a pointer (path to the file on server) to your image file. In thi...
30,540,835
I am struggling with a problem big time and just can't see how it can be done... so any help appreciated from you SQL gurus! What I have now is a table like this: ``` Sticker Price Cash Price Credit Price Value Yes Yes NULL 107 NULL Yes NULL ...
2015/05/30
[ "https://Stackoverflow.com/questions/30540835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4955095/" ]
What do you mean by "any subsequent errors then end up failing silently"? If the original promise `rp` fails, the `catch` executes… *at the time of failure.* Once a promise is rejected, that's it, there can be no "subsequent errors." Also, `should` looks like an assertion (e.g. from `chai`) which would suggest that yo...
54,617,134
The problem is incorrect path to remote host, but is not true. I have acces to my server via ftp without problems. All WP files are there and the site is working fine (frontend/backent). I have also access to phpMyAdmin to MySQL datepase binded to this site. I have notce that paht to the web files is differ depend on F...
2019/02/10
[ "https://Stackoverflow.com/questions/54617134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041089/" ]
relative pathes resolved by current directory. Solutions: Get script directory and combine with the relative path, something like: ``` require(dirname(__FILE__).'/../../../app.config.php'); ```
24,217,412
I am in the process of making a simple racing game using Apple's SceneKit library. I have modeled a left turn section of the race track. I am able to successfully load the model into an SCNGeometry that I can then render. However, I would like to be able to use this model for both a left and right turn segment. To do t...
2014/06/14
[ "https://Stackoverflow.com/questions/24217412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2351182/" ]
Alright, turns out setting the SCNNode's x scale to -1 does in fact mirror the SCNGeometry.The issue is, when an SCNGeometry is mirrored that way, all of the faces are pointed inwards instead of outwards so none are rendered. If the object's material is changed so that the front faces are culled instead of the back fac...
71,321
My daughter is 8 and has been taking private piano lessons for around 3 months now but will take a break from lessons over the summer. In the fall (when school starts back up) she will be taking cello lessons at school. What if anything can I do with her over the summer on the piano that will help prepare her or make ...
2018/05/25
[ "https://music.stackexchange.com/questions/71321", "https://music.stackexchange.com", "https://music.stackexchange.com/users/10492/" ]
I have a couple of thoughts. First, she will be reading primarily bass clef for cello, so any drilling of those notes in particular will be useful. Also, help her to "forget" her piano fingering. I have piano students who play stringed instruments and discussing fingering is such a pain. I wish there was a universal fi...
2,042,775
Solve the following recurrence relation by examining the first few values for a formula and then prove your conjectured formula by induction $h\_n=h\_{n-1} -n+3, \ (n\geq 1); \ h\_0=2$ --- Here I've gone all the way to $n=8$ and the only pattern I've noticed is in the differences. By that I mean, --- $h\_0=2$ $h...
2016/12/04
[ "https://math.stackexchange.com/questions/2042775", "https://math.stackexchange.com", "https://math.stackexchange.com/users/373431/" ]
You noticed the pattern examining the first few values and noticed that the difference between successive terms varies as a linear function of $n$. If you make an analogy with derivatives, this seesm to mean that the terms vary as a quadratic function of $n$.
47,949,328
I'm trying to pass a json script to curl using powershell. It seems to work if I hard code it right into a variable escaping the double quotes with backslash, but I want to pass the json in a file. I tried putting the json script in a separate json file and then use get-content and throw it in a variable, but it does n...
2017/12/23
[ "https://Stackoverflow.com/questions/47949328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4352563/" ]
Try: ``` $json = Get-Content C:\test.json -Raw ``` By default `Get-Content` loads into an array of strings. The `-Raw` flag forces it to load into a single string. You should also be able to do this and tell curl to read the file itself: ``` curl -v -X POST https://[...] -d @test.json ``` From the man page: > ...