qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
8,713,090
I'm trying to center the names(#box2) and the topic(#box1) on top of an image. ``` <?php require_once('seminar_config.php'); ?> <a href="print.certificate.php">Print</a> <body> <?php $participants = $db->get_results("SELECT participant FROM tbl_participants WHERE state=1"); $topics = $db->get_results("SELECT topic F...
2012/01/03
[ "https://Stackoverflow.com/questions/8713090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/225269/" ]
Old question, but I had similar problem today. Here is how I was able to solve it after trying every method in the history of html and css to center something. I used a table like JorisW: ``` <table style='width:100%' align='center'> <tr> <td> <img src="image.gif"> </td> </tr> </tab...
Try using tables and inline css styles ``` <table align="left" width="100%" style="page-break-after:always; margin-top:25px; margin-left:25px; font-family:tahoma; font-size:20px; "> <tr><td>Your info</td></tr> </table> ```
39,927,079
I am unsure what is wrong with my code. I am trying to write a program that finds the prime factorization of a number, and iterates through numbers. My code is ``` import math import time def primfacfind(n1,n2): while n1 < n2: n = n1 primfac=[] time_start = time.clock() def pri...
2016/10/07
[ "https://Stackoverflow.com/questions/39927079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6723642/" ]
Download something like [Sublime](https://www.sublimetext.com/) and highlight the code. Spaces will be dots and tabs will be dashes.
I put that code in my editor and it compiled just fine. So I went to line 12 where you have `sieve = [True] * n` and got rid of the indentation so it was indented the same as the line above it `def primes(n):` and I was able to recreate your error. Perhaps try and add an additional indentation than you think. You can...
17,441,419
I am trying to get a list title, What I want is when I type in Edittext on home page then add into list after clicking on Ok button. Right now I don't know where to put my refresh method that I am calling from customAdapter class on Homepage Activity. Please view my HomePage Activity: ``` public class Main_Activity e...
2013/07/03
[ "https://Stackoverflow.com/questions/17441419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1927757/" ]
In `onclick` method you may call your refresh method `refresAdapter(List<Tasks> dataitems)` after `db.addTaskList(addtasktitle);` statement. Or simply you may write `adapter.notifyDataSetChanged()` after this `db.addTaskList(addtasktitle)`; statement
call this method `adapter.notifyDatasetChanged()` if you want to do it for the navigation drawer, do it in `draweropen` method
67,779,344
I am trying to compile an Alpine Go container which uses [GORM](https://gorm.io/docs/connecting_to_the_database.html#SQLite) and it's [SQLite driver](https://github.com/go-gorm/sqlite) for an in-memory database. This depends on CGO being enabled. My binary builds and executes fine using `go build .`, but when running m...
2021/05/31
[ "https://Stackoverflow.com/questions/67779344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7125937/" ]
I'm not sure if this is what you ask, but you cannot (well, it depends...) reverse a hashing algorithm to acquire an original password from the hash. You do the opposite: hash password provided by the user and check if a resulting hash is the same as the one stored earlier: ``` if (user == "user" && password == md5("1...
You should not store user credentials on the device, encrypted or not. If the user uninstalls your app or clears cache, they will be locked out. They also would not be able to log in from another device. Credentials should be handled by the server. To encrypt passwords you should use a library like bcrypt. It allows y...
43,097,634
Im making a loading bar. And now i got an error when i click on download > > Uncaught TypeError: Cannot read property 'style' of null > > > I dont know what i am dong wrong please can someone help me here is my code ``` <a class="tooltip-test" id="header"><div class="progress" id="headerTop" style="cursor:defa...
2017/03/29
[ "https://Stackoverflow.com/questions/43097634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7707983/" ]
I think the problem is with this line: ``` var elem = document.getElementById("myBar"); ``` You're selecting by Id but myBar is a class So you should select by classname You could also just select by id as you do below: ``` var elem document.getElementById("MyElement"); ``` That's probably the easiest thing to ...
**Observation :** There is no `id` with name `myBar` is available in your `DOM`. **Statement :** `var elem = document.getElementById("myBar")` will return null. Hence, you are getting below error as you are trying to access `style` property of `null`. > > Uncaught TypeError: Cannot read property 'style' of null > ...
43,097,634
Im making a loading bar. And now i got an error when i click on download > > Uncaught TypeError: Cannot read property 'style' of null > > > I dont know what i am dong wrong please can someone help me here is my code ``` <a class="tooltip-test" id="header"><div class="progress" id="headerTop" style="cursor:defa...
2017/03/29
[ "https://Stackoverflow.com/questions/43097634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7707983/" ]
I think the problem is with this line: ``` var elem = document.getElementById("myBar"); ``` You're selecting by Id but myBar is a class So you should select by classname You could also just select by id as you do below: ``` var elem document.getElementById("MyElement"); ``` That's probably the easiest thing to ...
After Jonathan's correction, another issue might be that *elem*, *width* and *id* are defined in the parent move() function, and not in the child frame() function. ``` <script type="text/javascript"> function move() { document.getElementById("headerTop").style.cursor = "wait"; ...
43,097,634
Im making a loading bar. And now i got an error when i click on download > > Uncaught TypeError: Cannot read property 'style' of null > > > I dont know what i am dong wrong please can someone help me here is my code ``` <a class="tooltip-test" id="header"><div class="progress" id="headerTop" style="cursor:defa...
2017/03/29
[ "https://Stackoverflow.com/questions/43097634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7707983/" ]
After Jonathan's correction, another issue might be that *elem*, *width* and *id* are defined in the parent move() function, and not in the child frame() function. ``` <script type="text/javascript"> function move() { document.getElementById("headerTop").style.cursor = "wait"; ...
**Observation :** There is no `id` with name `myBar` is available in your `DOM`. **Statement :** `var elem = document.getElementById("myBar")` will return null. Hence, you are getting below error as you are trying to access `style` property of `null`. > > Uncaught TypeError: Cannot read property 'style' of null > ...
56,953,249
Is there a shortcut similiar to `{` and `}` in vim? I.e. move to block start/end? Use case: Caret is at the beginning of tons of imports, want to move caret to next blank line after imports
2019/07/09
[ "https://Stackoverflow.com/questions/56953249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1576149/" ]
You can see the different kepmaps for the caret movement in the IntelliJ IDE by going to `File->Settings->Keymap`, where in the seach bar you type `Move Caret`. [![enter image description here](https://i.stack.imgur.com/Tkniy.png)](https://i.stack.imgur.com/Tkniy.png) In your case you can use `Ctrl+Up` to move the Ca...
In a code block, you can use "Code block start" and "Code block end" actions (Cmd-Alt-[, Cmd-Alt-] in the default Mac keymap, Ctrl-[ and Ctrl-] in the default keymap on other operating systems). This shortcut doesn't work in the import block, but normally this is not needed because the standard way to work with impor...
39,297,989
i am trying my routing feature of abgular2 RC5, Please have look at below code. **app.component.ts** ``` import { Component,HostBinding } from '@angular/core'; import { ROUTER_DIRECTIVES } from "@angular/router"; @Component({ selector: 'my-app', template: ` <h1>My First Angular 2 App </h1> <router-outlet></router-...
2016/09/02
[ "https://Stackoverflow.com/questions/39297989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3109806/" ]
``` import { RouterModule,Routes } from '@angular/router' import { HomeComponent } from './homecomponent'; import { UserComponent } from './usercomp'; const APP_ROUTES:Routes = [ { path:'user', component: UserComponent }, { path:'', component...
I think you need to add pathMatch to your default route: ``` { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', loadChildren: './app/home/home.module#HomeModule' } ```
6,144
I'm currently in a weird situation - I have a large amount of accrued debt (85k principal, ~15k accrued interest so far), spread amongst multiple smaller student loans. Some are federal stafford loans, which were taken out at Max, and some are large private student loans. Currently, I'm paying them at minimum through...
2011/02/07
[ "https://money.stackexchange.com/questions/6144", "https://money.stackexchange.com", "https://money.stackexchange.com/users/2694/" ]
The U.S. Department of Ed offers Loan consolidation that you may want to take a look at: <https://loanconsolidation.ed.gov/AppEntry/apply-online/appindex.jsp> Going through a Government Agency as opposed to a private lender might reduce the burden (co-signers, collateral) you need to pass to get the loan.
I can't help you with consolidation, but I'd suggest automating as much of the payments as possible. * Do your lenders support automatic debit of your checking for the payments? * Can you use online bill pay to make the payments? If not, you might take a look at any of the numerous online banks that have online bill ...
6,144
I'm currently in a weird situation - I have a large amount of accrued debt (85k principal, ~15k accrued interest so far), spread amongst multiple smaller student loans. Some are federal stafford loans, which were taken out at Max, and some are large private student loans. Currently, I'm paying them at minimum through...
2011/02/07
[ "https://money.stackexchange.com/questions/6144", "https://money.stackexchange.com", "https://money.stackexchange.com/users/2694/" ]
To add to @bstpierre's answer, you should automate all your loans except for the one with the highest interest rate. Leave that one manual, and pay the most you can afford each month, to pay it off as quickly as possible. Once you finish that loan, move to the next highest interest rate. Ultimately, this won't be qui...
The U.S. Department of Ed offers Loan consolidation that you may want to take a look at: <https://loanconsolidation.ed.gov/AppEntry/apply-online/appindex.jsp> Going through a Government Agency as opposed to a private lender might reduce the burden (co-signers, collateral) you need to pass to get the loan.
6,144
I'm currently in a weird situation - I have a large amount of accrued debt (85k principal, ~15k accrued interest so far), spread amongst multiple smaller student loans. Some are federal stafford loans, which were taken out at Max, and some are large private student loans. Currently, I'm paying them at minimum through...
2011/02/07
[ "https://money.stackexchange.com/questions/6144", "https://money.stackexchange.com", "https://money.stackexchange.com/users/2694/" ]
To add to @bstpierre's answer, you should automate all your loans except for the one with the highest interest rate. Leave that one manual, and pay the most you can afford each month, to pay it off as quickly as possible. Once you finish that loan, move to the next highest interest rate. Ultimately, this won't be qui...
I can't help you with consolidation, but I'd suggest automating as much of the payments as possible. * Do your lenders support automatic debit of your checking for the payments? * Can you use online bill pay to make the payments? If not, you might take a look at any of the numerous online banks that have online bill ...
59,808,007
I'm working on this guessing game where the user needs to guess the word in under 6 tries. They have the ability to try and guess the whole word but if guessed incorrectly the game ends. When the game ends it gives them the option to play again. My problem is that when I try to guess the word for the second time it giv...
2020/01/19
[ "https://Stackoverflow.com/questions/59808007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10939155/" ]
Before returning a widget in the future builder, you can check if the date condition is satisfied. ``` if (snapshot.data != null) { return Container( child: ListView.builder( itemCount: snapshot.data.length, itemBuilder: (BuildCont...
You can create a filter icon above the listview, so you can use the date picker to select the date and based on the date you can filter the list and show it in your list view. let me know if this works for you. Thanks
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
Subversion is a version control system not a deployment system. Don't use it. Since you are doing everything manual right now (building & test) I would also deploy manually, that can also mean that you write some scripts that check the right version out from subversion and deploy it to whatever environment you want it ...
There are several ways that you can do this: **Use a build server** I've heard of teams using CCNET.net or FinalBuilder Server for this. Basically, what happens is that the build script has code to push the latest build, every time somebody makes a check in. I wouldn't recommend this for production though. This shoul...
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
Subversion is a version control system not a deployment system. Don't use it. Since you are doing everything manual right now (building & test) I would also deploy manually, that can also mean that you write some scripts that check the right version out from subversion and deploy it to whatever environment you want it ...
This question is really a question about release procedures (and tools), rather than system administration, but here's my best answer: Any recent version of Subversion takes excellent care of your configuration management needs, but, like Peter said, it's not a deployment tool. One option would be to build deployment ...
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
Subversion is a version control system not a deployment system. Don't use it. Since you are doing everything manual right now (building & test) I would also deploy manually, that can also mean that you write some scripts that check the right version out from subversion and deploy it to whatever environment you want it ...
We also use Subversion to control our source, but use Webistrano to deploy from Subversion to our servers. [Webistrano](https://github.com/peritor/webistrano) is a web-frontend to [Capistrano](https://github.com/capistrano/capistrano/wiki), a popular deployment and automation tool in the Ruby community. It allows you ...
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
Subversion is a version control system not a deployment system. Don't use it. Since you are doing everything manual right now (building & test) I would also deploy manually, that can also mean that you write some scripts that check the right version out from subversion and deploy it to whatever environment you want it ...
I was able to do this by creating a fresh *post-commit* file with the following two lines: ``` #!/bin/bash ssh -i /path/to/key-file -pSSH-PORT user@hostname svn update /path/to/project/folder/ ```
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
There are several ways that you can do this: **Use a build server** I've heard of teams using CCNET.net or FinalBuilder Server for this. Basically, what happens is that the build script has code to push the latest build, every time somebody makes a check in. I wouldn't recommend this for production though. This shoul...
We also use Subversion to control our source, but use Webistrano to deploy from Subversion to our servers. [Webistrano](https://github.com/peritor/webistrano) is a web-frontend to [Capistrano](https://github.com/capistrano/capistrano/wiki), a popular deployment and automation tool in the Ruby community. It allows you ...
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
There are several ways that you can do this: **Use a build server** I've heard of teams using CCNET.net or FinalBuilder Server for this. Basically, what happens is that the build script has code to push the latest build, every time somebody makes a check in. I wouldn't recommend this for production though. This shoul...
I was able to do this by creating a fresh *post-commit* file with the following two lines: ``` #!/bin/bash ssh -i /path/to/key-file -pSSH-PORT user@hostname svn update /path/to/project/folder/ ```
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
This question is really a question about release procedures (and tools), rather than system administration, but here's my best answer: Any recent version of Subversion takes excellent care of your configuration management needs, but, like Peter said, it's not a deployment tool. One option would be to build deployment ...
We also use Subversion to control our source, but use Webistrano to deploy from Subversion to our servers. [Webistrano](https://github.com/peritor/webistrano) is a web-frontend to [Capistrano](https://github.com/capistrano/capistrano/wiki), a popular deployment and automation tool in the Ruby community. It allows you ...
97,022
We are building a web app and are almost ready to start deployment to a production server. We are using Subversion for version control and I'm now wondering what the best way would be to deploy to staging and later to production. Right now we develop and test with 2 persons locally on our own machines and commit to ou...
2009/12/23
[ "https://serverfault.com/questions/97022", "https://serverfault.com", "https://serverfault.com/users/29990/" ]
This question is really a question about release procedures (and tools), rather than system administration, but here's my best answer: Any recent version of Subversion takes excellent care of your configuration management needs, but, like Peter said, it's not a deployment tool. One option would be to build deployment ...
I was able to do this by creating a fresh *post-commit* file with the following two lines: ``` #!/bin/bash ssh -i /path/to/key-file -pSSH-PORT user@hostname svn update /path/to/project/folder/ ```
237,523
Lets say my multinomial logistic regression predict that a chance of a sample belonging to a each class is A=0.6, B=0.3, C=0.1 How do I threshold this values to get just binary prediction of a sample belonging to a class, taking in to an account imbalances of classes. I know what I would do if it's just a binary decisi...
2016/09/29
[ "https://stats.stackexchange.com/questions/237523", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/53084/" ]
According to @cangrejo's answer: <https://stats.stackexchange.com/a/310956/194535>, suppose the original output probability of your model is the vector $v$, and then you can define the prior distribution: $\pi=(\frac{1}{\theta\_1}, \frac{1}{\theta\_2},..., \frac{1}{\theta\_N})$, for $\theta\_i \in (0,1)$ and $\sum\_i...
This was helpful, thanks! But it is not applicable during model training. When it comes to using this method after training the model (after finding the hyperparameters relevant to the model), it's valid; only that there has to be some way of standardizing this to avoid loss of generality and for it to be applicable on...
68,797,509
I’m new here and to web development so forgive me if I’m asking such a simple question. When I use a CSS debugger chrome extension, they work on websites but do not work on my local HTML file in the browser. Can anyone explain why and/or provide a solution as to how to get this working?
2021/08/16
[ "https://Stackoverflow.com/questions/68797509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16675972/" ]
Well, let me teach you a trick to you do not need an extension to "see" the elements if is that you want. You can paste it in the console of the developer mode. It will create an mouse event that will capture the tag which you mouse over, then outline it with random color: ``` document.addEventListener("mouseover", f...
Which debugger are you using? if you are debugging layout for elements you can simply add the below line in css of a webpage to show outlines, like this: ```css * { outline: 1px solid red; } ``` For example: ```css * { outline: 1px solid red; } div { width: 100vw; height: 100vh; } ``` ```html <div></div> ...
38,128,345
I have a vector of integers like this: ``` a <- c(2,3,4,1,2,1,3,5,6,3,2) values<-c(1,2,3,4,5,6) ``` I want to list, for every unique value in my vector (the unique values being ordered), the position of their occurences. My desired output: ``` rep_indx<-data.frame(c(4,6),c(1,5,11),c(2,7,10),c(3),c(8),c(9)) ```
2016/06/30
[ "https://Stackoverflow.com/questions/38128345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4175156/" ]
You can do this, using `sapply`. The ordering that you need is ensured by the `sort` function. ``` sapply(sort(unique(a)), function(x) which(a %in% x)) #### [[1]] #### [1] 4 6 #### #### [[2]] #### [1] 1 5 11 #### ... ``` It will result in a list, giving the indices of your repetitions. It can't be a data.frame b...
You can use the `lapply` function to return a list with the indexes. `lapply(values, function (x) which(a == x))`
38,128,345
I have a vector of integers like this: ``` a <- c(2,3,4,1,2,1,3,5,6,3,2) values<-c(1,2,3,4,5,6) ``` I want to list, for every unique value in my vector (the unique values being ordered), the position of their occurences. My desired output: ``` rep_indx<-data.frame(c(4,6),c(1,5,11),c(2,7,10),c(3),c(8),c(9)) ```
2016/06/30
[ "https://Stackoverflow.com/questions/38128345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4175156/" ]
`split` fits pretty well here, which returns a list of indexes for each unique value in `a`: ``` indList <- split(seq_along(a), a) indList # $`1` # [1] 4 6 # # $`2` # [1] 1 5 11 # # $`3` # [1] 2 7 10 # # $`4` # [1] 3 # # $`5` # [1] 8 # # $`6` # [1] 9 ``` And you can access the index by passing the value as ...
You can do this, using `sapply`. The ordering that you need is ensured by the `sort` function. ``` sapply(sort(unique(a)), function(x) which(a %in% x)) #### [[1]] #### [1] 4 6 #### #### [[2]] #### [1] 1 5 11 #### ... ``` It will result in a list, giving the indices of your repetitions. It can't be a data.frame b...
38,128,345
I have a vector of integers like this: ``` a <- c(2,3,4,1,2,1,3,5,6,3,2) values<-c(1,2,3,4,5,6) ``` I want to list, for every unique value in my vector (the unique values being ordered), the position of their occurences. My desired output: ``` rep_indx<-data.frame(c(4,6),c(1,5,11),c(2,7,10),c(3),c(8),c(9)) ```
2016/06/30
[ "https://Stackoverflow.com/questions/38128345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4175156/" ]
`split` fits pretty well here, which returns a list of indexes for each unique value in `a`: ``` indList <- split(seq_along(a), a) indList # $`1` # [1] 4 6 # # $`2` # [1] 1 5 11 # # $`3` # [1] 2 7 10 # # $`4` # [1] 3 # # $`5` # [1] 8 # # $`6` # [1] 9 ``` And you can access the index by passing the value as ...
You can use the `lapply` function to return a list with the indexes. `lapply(values, function (x) which(a == x))`
38,128,345
I have a vector of integers like this: ``` a <- c(2,3,4,1,2,1,3,5,6,3,2) values<-c(1,2,3,4,5,6) ``` I want to list, for every unique value in my vector (the unique values being ordered), the position of their occurences. My desired output: ``` rep_indx<-data.frame(c(4,6),c(1,5,11),c(2,7,10),c(3),c(8),c(9)) ```
2016/06/30
[ "https://Stackoverflow.com/questions/38128345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4175156/" ]
Perhaps this also works ``` order(match(a, values)) #[1] 4 6 1 5 11 2 7 10 3 8 9 ```
You can use the `lapply` function to return a list with the indexes. `lapply(values, function (x) which(a == x))`
38,128,345
I have a vector of integers like this: ``` a <- c(2,3,4,1,2,1,3,5,6,3,2) values<-c(1,2,3,4,5,6) ``` I want to list, for every unique value in my vector (the unique values being ordered), the position of their occurences. My desired output: ``` rep_indx<-data.frame(c(4,6),c(1,5,11),c(2,7,10),c(3),c(8),c(9)) ```
2016/06/30
[ "https://Stackoverflow.com/questions/38128345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4175156/" ]
`split` fits pretty well here, which returns a list of indexes for each unique value in `a`: ``` indList <- split(seq_along(a), a) indList # $`1` # [1] 4 6 # # $`2` # [1] 1 5 11 # # $`3` # [1] 2 7 10 # # $`4` # [1] 3 # # $`5` # [1] 8 # # $`6` # [1] 9 ``` And you can access the index by passing the value as ...
Perhaps this also works ``` order(match(a, values)) #[1] 4 6 1 5 11 2 7 10 3 8 9 ```
15,460,039
I'm currently working on load balancing project. I need access to the file on another computer connected to mine over LAN so that I could balance the disk space of that computer. Is there any way possible to do this using java? like how i can display all the files stored in the other computer in something like a tree??...
2013/03/17
[ "https://Stackoverflow.com/questions/15460039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2179089/" ]
Java doesn't provide a native method to achieve that. The easiest way might be to use NFS mount the other computers' disks to your computer, then your Java code could operate those remote disk just like local disk.
First, you have to share the file over the Network, and give the remote computer read/write permissions to all the files. Then you can use the java.nio classes to do it very easily: ``` import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; public class MoveRemo...
58,212,508
I'm new to C++ I don't understand why I'm getting this error. Out of 5 statements that are similar 3 mark error but the other two are okay. The error is in the main function. ``` #include <iostream> using namespace std; // Function declaration void getGallons(int wall); void getHours(int gallons); void getCostpa...
2019/10/03
[ "https://Stackoverflow.com/questions/58212508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12156468/" ]
Reducing to three lines (the other errors are analogous): ``` int wall; getGallons(wall); getHours(gallons); // error here ``` While `wall` is defined, `gallons` is not. And where do you want to get `gallons` from anyway? The result is hidden deep inside another function. How do you want to get it out from there...
Reason is variables are not defined before they are used. Following changes added to the code. * since you have named functions as "getSomeValue()" better to use a return type instead of void. * its better to use double instead of int, because there are divisions in the calculation * also used nested function calls ...
58,212,508
I'm new to C++ I don't understand why I'm getting this error. Out of 5 statements that are similar 3 mark error but the other two are okay. The error is in the main function. ``` #include <iostream> using namespace std; // Function declaration void getGallons(int wall); void getHours(int gallons); void getCostpa...
2019/10/03
[ "https://Stackoverflow.com/questions/58212508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12156468/" ]
Reducing to three lines (the other errors are analogous): ``` int wall; getGallons(wall); getHours(gallons); // error here ``` While `wall` is defined, `gallons` is not. And where do you want to get `gallons` from anyway? The result is hidden deep inside another function. How do you want to get it out from there...
Here are a few errors/issues 1. You have function declarations which are redundant. You only need them if you plan on calling the function before the definition. 2. In your main method, you don't declare gallons 3. In your main method, you don't give values for wall and pricepaint. 4. In your functions, you operate vi...
58,212,508
I'm new to C++ I don't understand why I'm getting this error. Out of 5 statements that are similar 3 mark error but the other two are okay. The error is in the main function. ``` #include <iostream> using namespace std; // Function declaration void getGallons(int wall); void getHours(int gallons); void getCostpa...
2019/10/03
[ "https://Stackoverflow.com/questions/58212508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12156468/" ]
Reason is variables are not defined before they are used. Following changes added to the code. * since you have named functions as "getSomeValue()" better to use a return type instead of void. * its better to use double instead of int, because there are divisions in the calculation * also used nested function calls ...
Here are a few errors/issues 1. You have function declarations which are redundant. You only need them if you plan on calling the function before the definition. 2. In your main method, you don't declare gallons 3. In your main method, you don't give values for wall and pricepaint. 4. In your functions, you operate vi...
51,983,019
Skip to EDIT2 which works There is: * Project (has\_many :group\_permissions) * GroupPermission (belongs\_to :project) I have a form where you can create a new project. A project has several attributes like name, status etc. and now important: iit. iit is selectable with radio buttons: yes or no. What I want: If ...
2018/08/23
[ "https://Stackoverflow.com/questions/51983019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8609958/" ]
add your inputformatter as the first formatter `InputFormatters.Insert(0,new StringRawRequestBodyFormatter())` then in this formatter in CanRead method check if the parameter that is being bound has a custom attribute you specify alongside FromBody ``` public override Boolean CanRead(InputFormatterContext context) ...
Yes this can be in the Startup.cs by adding a new route in the config method, you should have something like this by default you need to add a new one for the controller that you want: ``` app.UseMvc(routes => { routes.MapRoute( name: "default", templ...
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
The reason it doesn't work is because *`T` is not known at compile time*. You are asking to take a list of a known type and use it as a list of an *unknown* type, which is not allowed (without dynamics or some other non-compile-time-type-safe mechanism). Since you're only supporting 4 types anyways, it sounds like yo...
The thing you are asking is not possible. I would recommend to type your `listToSearch` as `IList`. This will keep as much generic as you want. You can access all common list actions and you don't have to rely on generics. ``` IList listToSearch = null; ```
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
The reason it doesn't work is because *`T` is not known at compile time*. You are asking to take a list of a known type and use it as a list of an *unknown* type, which is not allowed (without dynamics or some other non-compile-time-type-safe mechanism). Since you're only supporting 4 types anyways, it sounds like yo...
I ran into something like this before I understood what generics are for. In my case I was trying to reduce the number of methods that were needed to add data to a handler before writing it as an `xml` file which isn't too far from what you are trying to accomplish. I was trying to reduce the number of exposed methods ...
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
The reason it doesn't work is because *`T` is not known at compile time*. You are asking to take a list of a known type and use it as a list of an *unknown* type, which is not allowed (without dynamics or some other non-compile-time-type-safe mechanism). Since you're only supporting 4 types anyways, it sounds like yo...
If you were, at least, returning `IEnumerable<T>` I could understand using the type parameter, but what you are doing here is reinventing method overloading. Try this: ``` public IEnumerable<Doctor> SearchDoctors(string field, string rangeStart, string rangeEnd = null) { return Search(doctorList, field, rangeStar...
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
You can cast it to a `List<T>` by casting it to an object first: ``` if (typeof(T) == typeof(Doctor)) { listToSearch = (List<T>)(object)doctorList; } ```
The thing you are asking is not possible. I would recommend to type your `listToSearch` as `IList`. This will keep as much generic as you want. You can access all common list actions and you don't have to rely on generics. ``` IList listToSearch = null; ```
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
You can cast it to a `List<T>` by casting it to an object first: ``` if (typeof(T) == typeof(Doctor)) { listToSearch = (List<T>)(object)doctorList; } ```
I ran into something like this before I understood what generics are for. In my case I was trying to reduce the number of methods that were needed to add data to a handler before writing it as an `xml` file which isn't too far from what you are trying to accomplish. I was trying to reduce the number of exposed methods ...
22,636,332
I am using c# and have 4 existing lists, each of a different type (i.e. `List<Doctor>`, `List<Patient>` etc') I have a generic search method which receives type T and should search using LINQ the appropriate list based on the type T. I created a `var List<T> listToSearch` and wanted to set it to the appropriate list ...
2014/03/25
[ "https://Stackoverflow.com/questions/22636332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1053122/" ]
You can cast it to a `List<T>` by casting it to an object first: ``` if (typeof(T) == typeof(Doctor)) { listToSearch = (List<T>)(object)doctorList; } ```
If you were, at least, returning `IEnumerable<T>` I could understand using the type parameter, but what you are doing here is reinventing method overloading. Try this: ``` public IEnumerable<Doctor> SearchDoctors(string field, string rangeStart, string rangeEnd = null) { return Search(doctorList, field, rangeStar...
255,478
**Edit:** The original question before being re-edited too much: ``` \newcommand\divspace{\,} \[ \arraycolsep=0em \begin{array}{r@{\divspace}c@{\divspace}lllll} & & \multicolumn{4}{l}{7.24}& \\ \cline{2-6} 3427 &\big)&\multicolumn{6}{c}{24811.48}\\ & & 23989& ...
2015/07/15
[ "https://tex.stackexchange.com/questions/255478", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/10669/" ]
The mark up seems to complex; you want to align digits, so do it. ``` \documentclass{article} \begin{document} \[ \setlength{\arraycolsep}{0pt} \begin{array}{r@{\,}cccc} & & \multicolumn{3}{l}{150}\\ \cline{2-5} 2 &\big)& 3 & 0 & 0 \\ & & 2 & 0 & \\ \cline{3-5} & & 1 & 0 & 0 \\ & & 1 & 0 & 0 \...
Are you looking for a long division? How about something like this: ``` \documentclass{article} \input{longdiv} \begin{document} \longdiv{300}{2} \end{document} ``` > > ![enter image description here](https://i.stack.imgur.com/GkRHC.png) > > >
255,478
**Edit:** The original question before being re-edited too much: ``` \newcommand\divspace{\,} \[ \arraycolsep=0em \begin{array}{r@{\divspace}c@{\divspace}lllll} & & \multicolumn{4}{l}{7.24}& \\ \cline{2-6} 3427 &\big)&\multicolumn{6}{c}{24811.48}\\ & & 23989& ...
2015/07/15
[ "https://tex.stackexchange.com/questions/255478", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/10669/" ]
I am sorry, but I witnessed the very first moment of posting the question and it was re-edited too much that it became another question. So, I re-posted the original question (which exactly conforms to the title). The incorrect placement of the dividend is shown by the code output: ![enter image description here](htt...
Are you looking for a long division? How about something like this: ``` \documentclass{article} \input{longdiv} \begin{document} \longdiv{300}{2} \end{document} ``` > > ![enter image description here](https://i.stack.imgur.com/GkRHC.png) > > >
53,917
I use worpress 3.3.2 and there several users in my multiblog. Only registered users can leave comments, but comments must be approved by post author or administrator. When some user makes a comment every author sees notification about new comment awaiting moderation. How can i hide notifications about comments that ar...
2012/06/01
[ "https://wordpress.stackexchange.com/questions/53917", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/16650/" ]
No plug-in needed for this. Just open your theme files using the WordPress theme editor or via FTP. Look for the code that is being used to display the notice. It should be in the `index.php` file, maybe in a `content.php` file if your theme uses that, and in some cases it's in your `functions.php` file. It will use th...
There is a plug in called Role Manager <http://www.im-web-gefunden.de/wordpress-plugins/role-manager/> that can help you with that.
61,563,466
I am using [craco](https://github.com/gsoft-inc/craco) with create react app and I would like to add a plugin only in DEV mode or by ENV Var my craco.config looks is: ``` const path = require('path'); const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); module.exports = () => { return { webpack...
2020/05/02
[ "https://Stackoverflow.com/questions/61563466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9050897/" ]
You can set an environment variable right before any script command. For example, in your package.json, add a new line in the `scripts` paragraph that sets some variables: ``` "scripts": { "start": "craco start", "build": "craco build", "test": "craco test", "analyzer": "env NODE_ENV=production ANALYZ...
you can use conditions from craco like `when`, `whenDev`, `whenProd`, `whenTest` ``` webpack: { plugins: [...whenDev(() => [new BundleAnalyzerPlugin()], [])] }, ```
12,799,264
I'm trying to link a foreignKey on provider and a M2Mfield on bestbuy\_type - however each time I try saving anything to either of these fields I get the error: ``` (1452, 'Cannot add or update a child row: a foreign key constraint fails (`savingschampion`.`products_masterproduct`, CONSTRAINT `provider_id_refs_id_2ea9...
2012/10/09
[ "https://Stackoverflow.com/questions/12799264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/991277/" ]
Turns out that the new tables being created were using InnoDB rather than MyISAM like the existing tables. Adding this line to my Database config solved this for me by forcing the new tables created by South to use MyISAM: ``` 'OPTIONS' : { 'init_command' : 'SET storage_engine=MyISAM', }, ```
**'OPTIONS' : { 'init\_command' : 'SET storage\_engine=MyISAM', },** <<-- This did not work for me but after cleaning the data in my database tables I want to modify it worked, though it's not a good approach to follow.
12,799,264
I'm trying to link a foreignKey on provider and a M2Mfield on bestbuy\_type - however each time I try saving anything to either of these fields I get the error: ``` (1452, 'Cannot add or update a child row: a foreign key constraint fails (`savingschampion`.`products_masterproduct`, CONSTRAINT `provider_id_refs_id_2ea9...
2012/10/09
[ "https://Stackoverflow.com/questions/12799264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/991277/" ]
Turns out that the new tables being created were using InnoDB rather than MyISAM like the existing tables. Adding this line to my Database config solved this for me by forcing the new tables created by South to use MyISAM: ``` 'OPTIONS' : { 'init_command' : 'SET storage_engine=MyISAM', }, ```
I have resolved the same problem converting all the MyISAM type tables to InnoDB applying the SQL commands produced by this script: ``` SET @DATABASE_NAME = 'name_of_your_db'; SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM information_schema.tables AS tb WHERE table_schema...
12,799,264
I'm trying to link a foreignKey on provider and a M2Mfield on bestbuy\_type - however each time I try saving anything to either of these fields I get the error: ``` (1452, 'Cannot add or update a child row: a foreign key constraint fails (`savingschampion`.`products_masterproduct`, CONSTRAINT `provider_id_refs_id_2ea9...
2012/10/09
[ "https://Stackoverflow.com/questions/12799264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/991277/" ]
Turns out that the new tables being created were using InnoDB rather than MyISAM like the existing tables. Adding this line to my Database config solved this for me by forcing the new tables created by South to use MyISAM: ``` 'OPTIONS' : { 'init_command' : 'SET storage_engine=MyISAM', }, ```
backup the data in the table then delete the data from the table. Run migrations again it will work fine.
12,799,264
I'm trying to link a foreignKey on provider and a M2Mfield on bestbuy\_type - however each time I try saving anything to either of these fields I get the error: ``` (1452, 'Cannot add or update a child row: a foreign key constraint fails (`savingschampion`.`products_masterproduct`, CONSTRAINT `provider_id_refs_id_2ea9...
2012/10/09
[ "https://Stackoverflow.com/questions/12799264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/991277/" ]
Turns out that the new tables being created were using InnoDB rather than MyISAM like the existing tables. Adding this line to my Database config solved this for me by forcing the new tables created by South to use MyISAM: ``` 'OPTIONS' : { 'init_command' : 'SET storage_engine=MyISAM', }, ```
This usually happens when you have a foreign key that reference a default that does not exist. l recommend you check if the object exist in the table that is adding the foreign key. If it does not exist change your default value that you are adding during migration to the one that exists, this can be done in migration ...
20,405,595
So I want to write ten digits to a .txt file and when I run it, I want to place myself at the last digit so I can manually change the final digit. This is what I got so far: ``` public static void main(String[] args) throws IOException { int[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; File file = new File("text.t...
2013/12/05
[ "https://Stackoverflow.com/questions/20405595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3071133/" ]
**Step 1** Read everything into memory from the file. ``` StringBuilder contents = new StringBuilder(); File file = new File("test.txt"); BufferedReader br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null) { contents.append(line); } ``` **Step 2** Adjust the data...
You have two separate problems. The first is how to get your "input". The data you want the user to add. To do that the simplest way would be to take a command line paramater in the arguments and use that as the final character. so after doing the bw.write but before bw.close do ``` for (String str: args) { bw.wr...
20,405,595
So I want to write ten digits to a .txt file and when I run it, I want to place myself at the last digit so I can manually change the final digit. This is what I got so far: ``` public static void main(String[] args) throws IOException { int[] a = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; File file = new File("text.t...
2013/12/05
[ "https://Stackoverflow.com/questions/20405595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3071133/" ]
Chris's answer is probably the most straight forward. However another possible way is using a `RandomAccessFile`. This would be a good option if the file you are maintaining is very large. ``` public class RAFExample { public static void main(String[] args){ int[] values = {1,2,3,4,5,6,123}; File file = ne...
You have two separate problems. The first is how to get your "input". The data you want the user to add. To do that the simplest way would be to take a command line paramater in the arguments and use that as the final character. so after doing the bw.write but before bw.close do ``` for (String str: args) { bw.wr...
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
In dimens.xml. Use this: ``` <dimen name="design_snackbar_padding_horizontal">0dp</dimen> ``` But remember that this will get applied to all the snackbars in your application.
Before showing the Snackbar you can remove the parent layout padding in the following way: ``` //... _firmwareSnackbar.getView().setPadding(0,0,0,0); _firmwareSnackbar.show(); ```
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
Before showing the Snackbar you can remove the parent layout padding in the following way: ``` //... _firmwareSnackbar.getView().setPadding(0,0,0,0); _firmwareSnackbar.show(); ```
Add to theme of App or Activity `<item name="snackbarStyle">@style/Widget.Design.Snackbar</item>`
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
Before showing the Snackbar you can remove the parent layout padding in the following way: ``` //... _firmwareSnackbar.getView().setPadding(0,0,0,0); _firmwareSnackbar.show(); ```
You shoud remove paddings from a parent view: ```java View snackBarLayout = findViewById(R.id.mainLayout); Snackbar globalSnackbar = Snackbar.make(snackBarLayout, "", Snackbar.LENGTH_INDEFINITE); Snackbar.SnackbarLayout layout = (Snackbar.SnackbarLayout) globalSnackbar.getView(); layout.setPadding(0,0,0,0); ```
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
If you are using material components, then add this code to your style.xml file under values ``` <style name="Widget.SnackBar" parent="Widget.MaterialComponents.Snackbar"> <item name="android:layout_margin">0dp</item> </style> ``` then ``` <style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar"> ...
Before showing the Snackbar you can remove the parent layout padding in the following way: ``` //... _firmwareSnackbar.getView().setPadding(0,0,0,0); _firmwareSnackbar.show(); ```
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
In dimens.xml. Use this: ``` <dimen name="design_snackbar_padding_horizontal">0dp</dimen> ``` But remember that this will get applied to all the snackbars in your application.
Add to theme of App or Activity `<item name="snackbarStyle">@style/Widget.Design.Snackbar</item>`
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
In dimens.xml. Use this: ``` <dimen name="design_snackbar_padding_horizontal">0dp</dimen> ``` But remember that this will get applied to all the snackbars in your application.
You shoud remove paddings from a parent view: ```java View snackBarLayout = findViewById(R.id.mainLayout); Snackbar globalSnackbar = Snackbar.make(snackBarLayout, "", Snackbar.LENGTH_INDEFINITE); Snackbar.SnackbarLayout layout = (Snackbar.SnackbarLayout) globalSnackbar.getView(); layout.setPadding(0,0,0,0); ```
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
If you are using material components, then add this code to your style.xml file under values ``` <style name="Widget.SnackBar" parent="Widget.MaterialComponents.Snackbar"> <item name="android:layout_margin">0dp</item> </style> ``` then ``` <style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar"> ...
Add to theme of App or Activity `<item name="snackbarStyle">@style/Widget.Design.Snackbar</item>`
43,598,901
The following is the record of 10 devices for every few minutes. I need to return unique set of the record for each id and each should be only the latest. How can I do that with elastic search or any other solution would be good. ``` { {id: 1, time: 12345}, {id: 2, time: 12346}, {id: 1, time: 12347}, ...
2017/04/24
[ "https://Stackoverflow.com/questions/43598901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3705055/" ]
If you are using material components, then add this code to your style.xml file under values ``` <style name="Widget.SnackBar" parent="Widget.MaterialComponents.Snackbar"> <item name="android:layout_margin">0dp</item> </style> ``` then ``` <style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar"> ...
You shoud remove paddings from a parent view: ```java View snackBarLayout = findViewById(R.id.mainLayout); Snackbar globalSnackbar = Snackbar.make(snackBarLayout, "", Snackbar.LENGTH_INDEFINITE); Snackbar.SnackbarLayout layout = (Snackbar.SnackbarLayout) globalSnackbar.getView(); layout.setPadding(0,0,0,0); ```
57,531
I updated to OS X 10.8 and my process count went from about 75 under Mac OS X 10.7.4(?) to 96. What can I do to fix this? I use my Mac (MacBook Pro, Mid 2010, 2.8 Ghz Core i7, 8GB RAM, 256 GB SSD) for iOS development and the occasional gaming and it bugs me how the process count keeps jumping with each OS upgrade. Si...
2012/07/26
[ "https://apple.stackexchange.com/questions/57531", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1258/" ]
The number of processes is completely unimportant. Your machine can run tens of thousands if it needed to. Ask yourself the question: What are those processes doing? Is any one eating up ram nonestop? Tons of memory? Lots of those may be os-related. Use "Activity Monitor" installed with OSX to figure this stuff out. [...
And I have 142… who cares? Is there any impact on performance caused? You can probably turn off every convenience and feature such as time machine, automatic software update checks, iCloud syncing, push e-mail, cal-dav, spot light indexing, menu bar try icons, dock, finder, etc. and end up with "~30" processes… but wh...
57,531
I updated to OS X 10.8 and my process count went from about 75 under Mac OS X 10.7.4(?) to 96. What can I do to fix this? I use my Mac (MacBook Pro, Mid 2010, 2.8 Ghz Core i7, 8GB RAM, 256 GB SSD) for iOS development and the occasional gaming and it bugs me how the process count keeps jumping with each OS upgrade. Si...
2012/07/26
[ "https://apple.stackexchange.com/questions/57531", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1258/" ]
And I have 142… who cares? Is there any impact on performance caused? You can probably turn off every convenience and feature such as time machine, automatic software update checks, iCloud syncing, push e-mail, cal-dav, spot light indexing, menu bar try icons, dock, finder, etc. and end up with "~30" processes… but wh...
toAlex: While all the answers you have been given thus far are absolutely correct, what they are failing to understand is what is the underling question: How to I, as a 'total geek with a need to control all aspects of my techno-life" (<- tongue and cheek), gain total control over MY machine?! I get this... I hate w...
57,531
I updated to OS X 10.8 and my process count went from about 75 under Mac OS X 10.7.4(?) to 96. What can I do to fix this? I use my Mac (MacBook Pro, Mid 2010, 2.8 Ghz Core i7, 8GB RAM, 256 GB SSD) for iOS development and the occasional gaming and it bugs me how the process count keeps jumping with each OS upgrade. Si...
2012/07/26
[ "https://apple.stackexchange.com/questions/57531", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/1258/" ]
The number of processes is completely unimportant. Your machine can run tens of thousands if it needed to. Ask yourself the question: What are those processes doing? Is any one eating up ram nonestop? Tons of memory? Lots of those may be os-related. Use "Activity Monitor" installed with OSX to figure this stuff out. [...
toAlex: While all the answers you have been given thus far are absolutely correct, what they are failing to understand is what is the underling question: How to I, as a 'total geek with a need to control all aspects of my techno-life" (<- tongue and cheek), gain total control over MY machine?! I get this... I hate w...
4,107
I am trying to add this script (Marc Anderson's blog) to AllItems.aspx. Please guide me where it needs to go and what needs to be done to make it work. Thank you. ``` <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script> <script language="javascript" type="te...
2010/07/17
[ "https://sharepoint.stackexchange.com/questions/4107", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/-1/" ]
I was able to solve my problem. I copied the files from a temp folder and using JavaScript I was able to print the files using Microsoft OneNote 2010.
I would try to make a print css file. Add a link to the page (masterpage) and open the current page in a new window, loading the print CSS. Off-course you could always add a dropdown button using code, but you still need to make the print css.
4,107
I am trying to add this script (Marc Anderson's blog) to AllItems.aspx. Please guide me where it needs to go and what needs to be done to make it work. Thank you. ``` <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script> <script language="javascript" type="te...
2010/07/17
[ "https://sharepoint.stackexchange.com/questions/4107", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/-1/" ]
I basically map a network drive to the location (i.e. turn <http://it-etp.xyzcorp.com/sites/abcdept/> to \it-etp.xyzcorp.com\sites\abcdept\, browse to it, and map a drive to the location (mapping a drive is optional, but helpful in SharePoint management in the long run). There are many ways to perform the next steps, b...
I would try to make a print css file. Add a link to the page (masterpage) and open the current page in a new window, loading the print CSS. Off-course you could always add a dropdown button using code, but you still need to make the print css.
4,107
I am trying to add this script (Marc Anderson's blog) to AllItems.aspx. Please guide me where it needs to go and what needs to be done to make it work. Thank you. ``` <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script> <script language="javascript" type="te...
2010/07/17
[ "https://sharepoint.stackexchange.com/questions/4107", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/-1/" ]
I was able to solve my problem. I copied the files from a temp folder and using JavaScript I was able to print the files using Microsoft OneNote 2010.
I basically map a network drive to the location (i.e. turn <http://it-etp.xyzcorp.com/sites/abcdept/> to \it-etp.xyzcorp.com\sites\abcdept\, browse to it, and map a drive to the location (mapping a drive is optional, but helpful in SharePoint management in the long run). There are many ways to perform the next steps, b...
13,784,995
I am having a problem with a while loop in c++. The while loop is always being executed the first time around but when the program reaches the cin of the while loop the while loop works perfectly I was wondering what I was doing wrong. Thanks in advance. Also I am sorry if the problem is noobish. I am still a beginner....
2012/12/09
[ "https://Stackoverflow.com/questions/13784995", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1888952/" ]
You have a semicolon(';') in the `while`. That's causing the problem. Don't write ``` while(.... lots of conditions ...); { //stuff } ``` Write ``` while(.... lots of conditions ...) { //stuff } ``` Notice the lack of the `;` in the 2nd one. Other than that, what if you had to check for the word `Pneumo...
A control statement executing a single line of code can be written in two different way. ``` if (optketchup == "yes") { slcketchup = "with"; } ``` ``` if (optketchup == "yes") slcketchup = "with"; ``` Also the following code is valid; the difference is that there isn't any instruction to execute when `optketchup...
31,037,749
Is there any way to disable selection of multiple columns for a Swing JTable? I've disabled selection all together in the "Tid" column by overriding the selection intervals of the selection model: ``` myTable.getColumnModel().setSelectionModel(new DefaultListSelectionModel() { private boolean isSelectable(...
2015/06/24
[ "https://Stackoverflow.com/questions/31037749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3075917/" ]
First get the `TableColumnModel` from the `JTable` ``` TableColumnModel columnModel = table.getColumnModel(); ``` Next, get the `LstSeletionModel` for the `TableColumnModel` ``` ListSelectionModel selectionModel = columnModel.getSelectionModel(); ``` With this, you could set the `selectionMode` that the model wil...
Actually, it was a simple enough addition to my already existing overrides that was needed. ``` @Override public void setSelectionInterval(int index0, int index1) { if (isSelectable(index0, index1)) { if (index0==index1) { //The if condition needed. super.setSelectionInterval(index0, index1); ...
46,882,380
``` import numpy as np with open("/Users/myname/Downloads/names/yob1880.txt","r") as f: text = f.readlines() for line in text: print (line) def mapper(): for lines in line: data = line.strip().split("\t") name, sex, number = data print ("{0}\t{1}".format(name, number)) ``` dataset ...
2017/10/23
[ "https://Stackoverflow.com/questions/46882380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8817356/" ]
Try this: ``` import numpy as np import csv with open("/Users/myname/Downloads/names/yob1880.txt","r") as f: csv_file = csv.reader(f) def mapper(): for line in csv_file: name, sex, number = line print ("{0}\t{1}".format(name, number)) mapper() ``` The csv module helps out...
I think, instead of ``` for lines in line: data = line.strip().split("\t") name, sex, number = data print ("{0}\t{1}".format(name, number)) ``` You should actually use the single line (which in your case is called `lines` or rephrase your variables). Thus, think about this here: ``` for li...
34,903,203
Is it possible to change edit the css of only 4th tab of this li menu. If so, how? All help appreciated. Thank you! ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title active" id="tab-1-title" da...
2016/01/20
[ "https://Stackoverflow.com/questions/34903203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5816510/" ]
You can use `:nth-child(4)`, in the case you want the **4th child** of anything: ```css .rt_tabs li:nth-child(4) { background: #99c; } ``` ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title ...
Your element already has an id, so its easy ```css #tab-4-title{ /*Whatever change you want*/ } ```
34,903,203
Is it possible to change edit the css of only 4th tab of this li menu. If so, how? All help appreciated. Thank you! ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title active" id="tab-1-title" da...
2016/01/20
[ "https://Stackoverflow.com/questions/34903203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5816510/" ]
You can use `:nth-child(4)`, in the case you want the **4th child** of anything: ```css .rt_tabs li:nth-child(4) { background: #99c; } ``` ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title ...
`.tab_nav li:nth-child(4)` targets the 4th `li` child of `.tab_nav`. Or in this case `.tab_nav li:last-child` should also work. More information on nth-child: <https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child>
34,903,203
Is it possible to change edit the css of only 4th tab of this li menu. If so, how? All help appreciated. Thank you! ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title active" id="tab-1-title" da...
2016/01/20
[ "https://Stackoverflow.com/questions/34903203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5816510/" ]
You can use `:nth-child(4)`, in the case you want the **4th child** of anything: ```css .rt_tabs li:nth-child(4) { background: #99c; } ``` ```html <div class="rt_tabs clearfix left tab-style-2" id="single-product-details" data-tab-style="tab-style-2"> <ul class="tab_nav hidden-xs"> <li class="tab_title ...
Use the id: ``` #tab-4-title {...} ``` Use a attribute selector: ``` [data-tab-number="4"] {...} ``` Use a pseudo-selector: ``` li:nth-child(4) {...} li:last-child {...} li:nth-last-child(1) {...} li:last-of-type {...} ``` There are several other possibilities.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
For BW projects, I cooked my own Unit Test framework based on BW Processes itself. So the automated tests and validations are coded in the TIBCO project itself. For AMX projects I recommend SOAPUI for automated testing of your services. However, I coded all the unit tests in the underlying language, in my case Java, u...
With BW-TEST you can practice TDD and add your projects to your CI Check it out on <http://nicosommi.com/?p=209> It's open source
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
With BW-TEST you can practice TDD and add your projects to your CI Check it out on <http://nicosommi.com/?p=209> It's open source
[IBM RIT](http://pic.dhe.ibm.com/infocenter/rithelp/v8r5m0/topic/com.ibm.rational.rit.accessibility.doc/helpindex_rit.html) is very good tool to work on this kind of scenarios, it can help you to assert different scenarios and also to evaluate code coverage.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
For BW projects, I cooked my own Unit Test framework based on BW Processes itself. So the automated tests and validations are coded in the TIBCO project itself. For AMX projects I recommend SOAPUI for automated testing of your services. However, I coded all the unit tests in the underlying language, in my case Java, u...
[IBM RIT](http://pic.dhe.ibm.com/infocenter/rithelp/v8r5m0/topic/com.ibm.rational.rit.accessibility.doc/helpindex_rit.html) is very good tool to work on this kind of scenarios, it can help you to assert different scenarios and also to evaluate code coverage.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
[IBM RIT](http://pic.dhe.ibm.com/infocenter/rithelp/v8r5m0/topic/com.ibm.rational.rit.accessibility.doc/helpindex_rit.html) is very good tool to work on this kind of scenarios, it can help you to assert different scenarios and also to evaluate code coverage.
I recommend IBM RIT. it is part of IBM RTW stack. You can use it in TDD and CI/CD models of delivery easily.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
Trying to do a methodology like TDD using soap UI would not be very effective. I have used This for BW and you do not get the same level of granularity and comfort from a full unit test suite. BWUnit is a good tool, and if you have a good relationship with your TIbco PSG guys you may be able to get TibUnit which is a P...
I recommend IBM RIT. it is part of IBM RTW stack. You can use it in TDD and CI/CD models of delivery easily.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
I've had great success creating a soap interface layer for each of my processes (taking in the same arguments) and leveraging [SoapUI](http://soapui.org) to do all the testing driven from a few database tables. Edit: What I described is pretty much how BWUnit is working: it creates a web service interface around eac...
I recommend IBM RIT. it is part of IBM RTW stack. You can use it in TDD and CI/CD models of delivery easily.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
For BW projects, I cooked my own Unit Test framework based on BW Processes itself. So the automated tests and validations are coded in the TIBCO project itself. For AMX projects I recommend SOAPUI for automated testing of your services. However, I coded all the unit tests in the underlying language, in my case Java, u...
I've had great success creating a soap interface layer for each of my processes (taking in the same arguments) and leveraging [SoapUI](http://soapui.org) to do all the testing driven from a few database tables. Edit: What I described is pretty much how BWUnit is working: it creates a web service interface around eac...
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
Deopends on the protocol used (what is used). Racoon and SoapUI has been mentioned. With them you can test on a "per module" level. That is Component or System tests. Especially usful for performance tests. However this is the most common way to test tibco components. I will have a look at the BWUnit, looks interesti...
[IBM RIT](http://pic.dhe.ibm.com/infocenter/rithelp/v8r5m0/topic/com.ibm.rational.rit.accessibility.doc/helpindex_rit.html) is very good tool to work on this kind of scenarios, it can help you to assert different scenarios and also to evaluate code coverage.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
There's an old framework called [Raccoon](http://raccoonfwk.sourceforge.net/) built above Tibco ActiveEnterprise. It has a component for unit testing called [UiTest](http://raccoonfwk.sourceforge.net/tibco/uiTest.html) focused on RendezVous messaging. It doesn't seem to have too much activity lately, though.
I recommend IBM RIT. it is part of IBM RTW stack. You can use it in TDD and CI/CD models of delivery easily.
2,635,830
Does anyone know what unit testing tools are available when developing Tibco processes? In the next few months I'll be working on a Tibco project and I'm trying to find any existing unit testing frameworks that might make the job easier to build with a TDD approach. Thus far, the only one I've been able to locate is ...
2010/04/14
[ "https://Stackoverflow.com/questions/2635830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39532/" ]
Trying to do a methodology like TDD using soap UI would not be very effective. I have used This for BW and you do not get the same level of granularity and comfort from a full unit test suite. BWUnit is a good tool, and if you have a good relationship with your TIbco PSG guys you may be able to get TibUnit which is a P...
[IBM RIT](http://pic.dhe.ibm.com/infocenter/rithelp/v8r5m0/topic/com.ibm.rational.rit.accessibility.doc/helpindex_rit.html) is very good tool to work on this kind of scenarios, it can help you to assert different scenarios and also to evaluate code coverage.
13,992,683
When running a spec I am getting all the output of the database transaction as well: ``` lee$ rspec spec/mailers/ Connecting to database specified by database.yml (0.1ms) BEGIN User Exists (0.7ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = 'user@example.name' LIMIT 1 User Exists (0.4ms) SELECT 1 AS...
2012/12/21
[ "https://Stackoverflow.com/questions/13992683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/99877/" ]
In you environment initializer for test (config/environments/test.rb), [configure](http://guides.rubyonrails.org/configuring.html) proper logger level: `config.logger.level = Logger::FATAL`
Part of the problem probably stems from `Poltergeist` being used as the `Capybara` javascript driver. I had a similar issue when using `capybara-webkit`. Try using this syntax: ``` Capybara.register_driver :poltergeist_silent do |app| Capybara::Poltergeist::Driver.new(app, :logger => nil) end Capybara.javascript_dri...
1,061,588
I created and enabled a service: ``` $ sudo systemctl enable /path/to/imaservice.service Created symlink /etc/systemd/system/multi-user.target.wants/imaservice.service → /path/to/imaservice.service. Created symlink /etc/systemd/system/imaservice.service → /path/to/imaservice.service. ``` It exists and persists in bo...
2018/08/02
[ "https://askubuntu.com/questions/1061588", "https://askubuntu.com", "https://askubuntu.com/users/855870/" ]
After submitting the bug report, I got the following reply from one of the developers: > > This issue has been fixed and pushed to GNOME Extensions. It’s pending a manual review (these reviews are done by volunteers and they can take forever) but the update should be available soon. > > > If you’re impatient, you c...
Fixed version is pending review, until you can use that: ``` %H:%M %;@ ``` "%; @" generates a number, I do not know what this number is but it works
23,396,053
I'm calculating the determinant of a matrix, the calculations and therefore a method is called depending on the dimensionality of the data, for example: ``` template<int X, int Y> float determinant(X, Y, std::vector<Vector> &data) { // Determine the dimensionality of matrix data (x and y) } ``` The problem that...
2014/04/30
[ "https://Stackoverflow.com/questions/23396053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1326876/" ]
Since vectors aren't fixed-size, they could be jagged. (Constrast this with, e.g. `std::array<>` or `T [N][M][L]`; you could deduce their ranks at compiletime). Let's assume they're not: see it **[Live On Coliru](http://coliru.stacked-crooked.com/a/dbe4121ef644a3a0)** ``` #include <vector> #include <cstdint> #include...
What about deriving from PCA into class that holds X and Y ``` template<int X,int Y> PCA_size : public PCA { enum { Xv=X}; enum { Yv=Y}; } ``` Then you can just recast existing PCA object into yours ``` static_cast<PCA_size<3,5> >(PCA_instance); ```
117,993
I will be moving to a new city to take up a job in 20 days. How soon I can apply for the renewal of my passport from the new place, after moving in there? Can I use my rental agreement and HR letter as address proof?
2018/07/06
[ "https://travel.stackexchange.com/questions/117993", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/80110/" ]
Your own government's instructions indicate you can apply as soon as you have the required proof: [Change of Address](https://portal1.passportindia.gov.in/AppOnlineProject/online/faqServicesAvailable) > > Q61: How do I change the address on my passport? > > A: To change the address in the passport, you have to a...
You have to give details of all places you have stayed during past one year and the police verification would be done at all those places. It will be better if you can get the passport reissued and police verification done at current address itself.
32,674,843
Say I have a master branch and a branch for developing a feature: ``` -- s -- x -- x -- x -- HEAD [master] \ \ bs -- x -- x -- x [feature] ``` and the feature branch for some reason (laziness) is a bit old. Now when I'm on `master` and do `git diff feature`, I got all the diff from `s` to `HEAD` as w...
2015/09/20
[ "https://Stackoverflow.com/questions/32674843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172265/" ]
As [Jonathon Reinhart noted](https://stackoverflow.com/a/32674865/1256452) you just need to diff commit `s` against the tip of `feature`. As you noted, you forgot to mention that you want to have git find commit `s` for you. The general way to ask git to find `s` is to find the "merge base" between `HEAD` (`master`) a...
If you want to see the changes from `s` to `feature`, then: ``` git diff s feature ``` From the man page: > > > ``` > git diff [--options] <commit> <commit> [--] [<path>…​] > This is to view the changes between two arbitrary <commit>. > > ``` > > For all of your diffing needs, consult <http://git-scm.com/docs...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*Debris* is broken-apart pieces of stuff arising from some sort of violent event that pulls things apart. (*Rubble* is a close synonym, although it carries more of a static feeling; we wouldn't usually say "rubble flying in the air," for example.) *Wreckage* is what's left of something identifiable that has been damage...
*debris* or *remains* would be acceptable: * The debris from the crash of Flight XYZ * The remains of the aeroplane However, *debris* and *remains* aren't completely interchangeable. You would *not* use *debris* to describe parts of deceased/maimed living being. * The remains of the man were discovered... * **not**...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*debris* or *remains* would be acceptable: * The debris from the crash of Flight XYZ * The remains of the aeroplane However, *debris* and *remains* aren't completely interchangeable. You would *not* use *debris* to describe parts of deceased/maimed living being. * The remains of the man were discovered... * **not**...
Debris is broken-apart pieces of stuff left over after some sort of violent event that pulls things apart. (Rubble is a close synonym.) Wreckage is what's left of something identifiable that has been damaged beyond repair, but as jimsug has mentioned, it would not be used to refer to living things that have died. In th...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*debris* or *remains* would be acceptable: * The debris from the crash of Flight XYZ * The remains of the aeroplane However, *debris* and *remains* aren't completely interchangeable. You would *not* use *debris* to describe parts of deceased/maimed living being. * The remains of the man were discovered... * **not**...
**Wreckage** refers to one or more large pieces of something that has been *wrecked*, severely damaged by something other than time. (e.g. the wreckage of a bus that has fallen over a small cliff). **Debris** is from the French word *débris*, originally meaning to *break down*, and refers to many small pieces of wreck...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*Debris* is broken-apart pieces of stuff arising from some sort of violent event that pulls things apart. (*Rubble* is a close synonym, although it carries more of a static feeling; we wouldn't usually say "rubble flying in the air," for example.) *Wreckage* is what's left of something identifiable that has been damage...
For the item in this photo (an airplane) I would call this **wreckage**. This generally applies to things that are destroyed by some force, such as means of transportation (cars, trains, etc.) *debris* in a very general sense could be used. *remains* (as I use it) usually refers to living things that aren't living a...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
For the item in this photo (an airplane) I would call this **wreckage**. This generally applies to things that are destroyed by some force, such as means of transportation (cars, trains, etc.) *debris* in a very general sense could be used. *remains* (as I use it) usually refers to living things that aren't living a...
Debris is broken-apart pieces of stuff left over after some sort of violent event that pulls things apart. (Rubble is a close synonym.) Wreckage is what's left of something identifiable that has been damaged beyond repair, but as jimsug has mentioned, it would not be used to refer to living things that have died. In th...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
For the item in this photo (an airplane) I would call this **wreckage**. This generally applies to things that are destroyed by some force, such as means of transportation (cars, trains, etc.) *debris* in a very general sense could be used. *remains* (as I use it) usually refers to living things that aren't living a...
**Wreckage** refers to one or more large pieces of something that has been *wrecked*, severely damaged by something other than time. (e.g. the wreckage of a bus that has fallen over a small cliff). **Debris** is from the French word *débris*, originally meaning to *break down*, and refers to many small pieces of wreck...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*Debris* is broken-apart pieces of stuff arising from some sort of violent event that pulls things apart. (*Rubble* is a close synonym, although it carries more of a static feeling; we wouldn't usually say "rubble flying in the air," for example.) *Wreckage* is what's left of something identifiable that has been damage...
Debris is broken-apart pieces of stuff left over after some sort of violent event that pulls things apart. (Rubble is a close synonym.) Wreckage is what's left of something identifiable that has been damaged beyond repair, but as jimsug has mentioned, it would not be used to refer to living things that have died. In th...
26,366
Please suggest the most proper word to describe the picture below. ![enter image description here](https://i.stack.imgur.com/zvjWx.jpg) Can I use "debris" to describe it? Are they completely interchangeable?
2014/06/14
[ "https://ell.stackexchange.com/questions/26366", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
*Debris* is broken-apart pieces of stuff arising from some sort of violent event that pulls things apart. (*Rubble* is a close synonym, although it carries more of a static feeling; we wouldn't usually say "rubble flying in the air," for example.) *Wreckage* is what's left of something identifiable that has been damage...
**Wreckage** refers to one or more large pieces of something that has been *wrecked*, severely damaged by something other than time. (e.g. the wreckage of a bus that has fallen over a small cliff). **Debris** is from the French word *débris*, originally meaning to *break down*, and refers to many small pieces of wreck...
61,366,909
Consider below code: ```js let myData = { a: 1 } const app = new Vue({ data: myData }); ``` As Vue docs says when we try to add a property like below, the new property isn't reactive: ```js myData.b = 12; console.log(app.b); // undefined ``` Vue docs suggests using `Vue.set`: ```js Vue.set(myData, 'b', ...
2020/04/22
[ "https://Stackoverflow.com/questions/61366909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3578287/" ]
> > The question is simple: How to create a root level property and make it reactive? > > > The properties in `data` are only reactive if they existed when the instance was created. That means if you add a new property, like: ``` myData.b = 12; ``` Then changes to `b` will not trigger any view updates. If you k...
I can't find in documentation if you can add property to the root level and make it also reactive, but there is alternative solution. ```js let myData = { obj: { a: 1 } } const app = new Vue({ data: myData, watch: { obj: { handler(val) { console.log('watching !'...
61,366,909
Consider below code: ```js let myData = { a: 1 } const app = new Vue({ data: myData }); ``` As Vue docs says when we try to add a property like below, the new property isn't reactive: ```js myData.b = 12; console.log(app.b); // undefined ``` Vue docs suggests using `Vue.set`: ```js Vue.set(myData, 'b', ...
2020/04/22
[ "https://Stackoverflow.com/questions/61366909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3578287/" ]
The docs clearly say you **cannot add** top [level keys](https://v2.vuejs.org/v2/guide/reactivity.html#For-Objects). > > Vue does not allow dynamically adding new root-level reactive properties to an already created instance. > > > You **must** add a key to the root level object so you can update it later. You c...
> > The question is simple: How to create a root level property and make it reactive? > > > The properties in `data` are only reactive if they existed when the instance was created. That means if you add a new property, like: ``` myData.b = 12; ``` Then changes to `b` will not trigger any view updates. If you k...
61,366,909
Consider below code: ```js let myData = { a: 1 } const app = new Vue({ data: myData }); ``` As Vue docs says when we try to add a property like below, the new property isn't reactive: ```js myData.b = 12; console.log(app.b); // undefined ``` Vue docs suggests using `Vue.set`: ```js Vue.set(myData, 'b', ...
2020/04/22
[ "https://Stackoverflow.com/questions/61366909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3578287/" ]
The docs clearly say you **cannot add** top [level keys](https://v2.vuejs.org/v2/guide/reactivity.html#For-Objects). > > Vue does not allow dynamically adding new root-level reactive properties to an already created instance. > > > You **must** add a key to the root level object so you can update it later. You c...
I can't find in documentation if you can add property to the root level and make it also reactive, but there is alternative solution. ```js let myData = { obj: { a: 1 } } const app = new Vue({ data: myData, watch: { obj: { handler(val) { console.log('watching !'...
249,394
I have 2 files containing a list of songs. hdsongs.txt and sdsongs.txt I wrote a simple script to list all songs and output to text files, to then run a diff against. It works fine for the most part, but the actual diff command in the script is showing the same line as being different. This is actually happening for m...
2015/12/14
[ "https://unix.stackexchange.com/questions/249394", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/147481/" ]
My guess is you simply haven't sorted the files. That's one of the behaviors you can get on unsorted input: ``` $ cat file1 foo bar $ cat file2 bar foo $ $ diff file1 file2 1d0 < foo 2a2 > foo ``` But, if you sort: ``` $ diff <(sort file1) <(sort file2) $ ``` The `diff` program's job is to tell you whether two ...
I would suggest trying to use something like the hexdiff program to get a binary/hexadecimal output, as the human eye can't always tell the difference between the characters a computer displays, and some characters may not be displayed.
249,394
I have 2 files containing a list of songs. hdsongs.txt and sdsongs.txt I wrote a simple script to list all songs and output to text files, to then run a diff against. It works fine for the most part, but the actual diff command in the script is showing the same line as being different. This is actually happening for m...
2015/12/14
[ "https://unix.stackexchange.com/questions/249394", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/147481/" ]
My guess is you simply haven't sorted the files. That's one of the behaviors you can get on unsorted input: ``` $ cat file1 foo bar $ cat file2 bar foo $ $ diff file1 file2 1d0 < foo 2a2 > foo ``` But, if you sort: ``` $ diff <(sort file1) <(sort file2) $ ``` The `diff` program's job is to tell you whether two ...
Since you have not stated that the files are sorted, I'll assume that they aren't.  This is the expected output from `diff` when a line appears in both files, but in different locations.  This would be clear if you looked at the entire `diff` output, rather than piping it through `grep`.
52,453,330
Here I need to convert my nested JSON into a custom JSON without having nested objects. ```js function transform(){ let items = [ { "carId":328288, "firstName":"yathindra", "lastName":"rawya", "list":[ { "id":182...
2018/09/22
[ "https://Stackoverflow.com/questions/52453330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8353827/" ]
Please replace your code with below one, it will work straight away. Key will be "state-1", "state-2" instead of "0", "1" ``` function transform(){ let items = [ { "carId":328288, "firstName":"yathindra", "lastName":"rawya", "list":[ { ...
Prepend your key with a zero, and then insertion order is maintained. In a CSV, that seems a good option. If you want to use the spread operator, use an object instead of an array. ```js function transform() { let items = [{ "carId": 328288, "firstName": "yathindra", "lastName": "rawya", ...
52,453,330
Here I need to convert my nested JSON into a custom JSON without having nested objects. ```js function transform(){ let items = [ { "carId":328288, "firstName":"yathindra", "lastName":"rawya", "list":[ { "id":182...
2018/09/22
[ "https://Stackoverflow.com/questions/52453330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8353827/" ]
Please replace your code with below one, it will work straight away. Key will be "state-1", "state-2" instead of "0", "1" ``` function transform(){ let items = [ { "carId":328288, "firstName":"yathindra", "lastName":"rawya", "list":[ { ...
Javascript `Object` first shows the sorted number list and then, the rest of the object's content as it is! run the following code and see what happens:D ```js console.log(JSON.stringify({1:true, b:false, 3:false})) ``` So if you want to keep your order, don't use numbers as keys!
36,948,316
I am just wondering if there is a way to simulate a "no connection" event in a mocha unit test. I have a method that return a promise that should wait for an internet connection with a polling strategy and I want to test it out with mocha. There is a method to achieve such a result. Some code: ``` it('should wait for...
2016/04/29
[ "https://Stackoverflow.com/questions/36948316", "https://Stackoverflow.com", "https://Stackoverflow.com/users/803678/" ]
You can use [sinon](http://sinonjs.org/) to stub `needle.get` ``` var needle = require("needle"); var sinon = require("sinon");; before(() => { sinon.stub(needle, "get", (url, calback) => { var dummyError = {}; callback(dummyError); }) }); // Run your 'it' here after(() => { needle.get....
If you have no connection or any problems of connection, use the `reject()` of your promise and catch them. `done` is a function, and if you call the function with a non-null parameter, it means that your test is not good. Maybe you have to try: ``` my_object.wait.connection() .then(() => done(1)) .catch(() => don...