qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
9,320,773
If I use any of the CRUD methods of SocialDataService (eg: AddComment), I find that even once the POST has returned successfully SharePoint has not actually processed the change. By that I mean that a quick call to GetCommentsOnUrl will return the old data, even though I am clearly making my request only after receivin...
2012/02/16
[ "https://Stackoverflow.com/questions/9320773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/848249/" ]
``` lista = list.sort(lista) ``` This should be ``` lista.sort() ``` The `.sort()` method is in-place, and returns None. If you want something not in-place, which returns a value, you could use ``` sorted_list = sorted(lista) ``` Aside #1: please don't call your lists `list`. That clobbers the builtin list type...
As previously said in one of the answers this error occurs when value of the list turns out to be empty. Well though not fully relevant to this question, the same error occured for me while reading images using opencv and numpy because the file name was found to be different than that specified probably or because the ...
9,320,773
If I use any of the CRUD methods of SocialDataService (eg: AddComment), I find that even once the POST has returned successfully SharePoint has not actually processed the change. By that I mean that a quick call to GetCommentsOnUrl will return the old data, even though I am clearly making my request only after receivin...
2012/02/16
[ "https://Stackoverflow.com/questions/9320773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/848249/" ]
The exception `TypeError: 'NoneType' object is not subscriptable` happens because the value of `lista` is actually `None`. You can reproduce `TypeError` that you get in your code if you try this at the Python command line: ``` None[0] ``` The reason that `lista` gets set to None is because the return value of `list....
At this link <https://docs.python.org/2/tutorial/datastructures.html> you can read this method "Sort the items of the list in place" this means that the result value will on sorted and the result will be on itself. The function returns None. When you assign the result to "lista" in line 14 ``` lista = list.sort(l...
9,320,773
If I use any of the CRUD methods of SocialDataService (eg: AddComment), I find that even once the POST has returned successfully SharePoint has not actually processed the change. By that I mean that a quick call to GetCommentsOnUrl will return the old data, even though I am clearly making my request only after receivin...
2012/02/16
[ "https://Stackoverflow.com/questions/9320773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/848249/" ]
The exception `TypeError: 'NoneType' object is not subscriptable` happens because the value of `lista` is actually `None`. You can reproduce `TypeError` that you get in your code if you try this at the Python command line: ``` None[0] ``` The reason that `lista` gets set to None is because the return value of `list....
As previously said in one of the answers this error occurs when value of the list turns out to be empty. Well though not fully relevant to this question, the same error occured for me while reading images using opencv and numpy because the file name was found to be different than that specified probably or because the ...
62,834,635
I am not sure whats the problem with mysql statement. I am trying to run the below query which I took from Repository Class in eclipse from my project. ``` select distinct(al.entity) from Allocation al where al.status = 1 and al.userDepartment.user is not null and al.userDepartment.department.costCode in ('finance')...
2020/07/10
[ "https://Stackoverflow.com/questions/62834635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13797081/" ]
You can use : ``` transform(df, WORDS_A_R = ifelse(grepl("^[AR]", WORD_LIST), WORD_LIST, NA)) ``` If you prefer `dplyr` : ``` library(dplyr) df %>% mutate(WORDS_A_R = ifelse(grepl("^[AR]", WORD_LIST), WORD_LIST, NA)) # ID WORD_LIST WORDS_A_R #1 1 APPLE APPLE #2 2 RED RED #3 3 SNOW ...
You can also use `base R` with `substring()` function: ``` #Create condition cond1 <- substr(DF$WORD_LIST,1,1)=='A' | substr(DF$WORD_LIST,1,1)=='R' #Create var DF$WORDS_A_R <- NA DF$WORDS_A_R[cond1]<-DF$WORD_LIST[cond1] ID WORD_LIST WORDS_A_R 1 1 APPLE APPLE 2 2 RED RED 3 3 SNOW <NA> ...
632,519
I want to be able to hide the header at the top of each grid column in a WPF ListView. This is the XAML for my ListView: ``` <Window x:Class="ListViewTest.Test0.ListViewTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Emp...
2009/03/10
[ "https://Stackoverflow.com/questions/632519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76370/" ]
Define a Style like so ``` <Window.Resources> .... <Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Visibility" Value="Collapsed" /> </Style> </Window.Resources> ``` Apply it like so ``` <GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle...
You can also put the `Style` inline like so: ``` <ListView> <ListView.Resources> <Style TargetType="GridViewColumnHeader"> <Setter Property="Visibility" Value="Collapsed" /> </Style> </ListView.Resources> <ListView.View> <GridView> <!-- ... --> </Grid...
632,519
I want to be able to hide the header at the top of each grid column in a WPF ListView. This is the XAML for my ListView: ``` <Window x:Class="ListViewTest.Test0.ListViewTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Emp...
2009/03/10
[ "https://Stackoverflow.com/questions/632519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76370/" ]
Define a Style like so ``` <Window.Resources> .... <Style x:Key="myHeaderStyle" TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Visibility" Value="Collapsed" /> </Style> </Window.Resources> ``` Apply it like so ``` <GridView ColumnHeaderContainerStyle="{StaticResource myHeaderStyle...
Another way you can apply Ray's solution is like this: ``` <ListView> <ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style TargetType="GridViewColumnHeader"> <Setter Property="Visibility" Value="Collapsed" /> </Style> ...
632,519
I want to be able to hide the header at the top of each grid column in a WPF ListView. This is the XAML for my ListView: ``` <Window x:Class="ListViewTest.Test0.ListViewTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Emp...
2009/03/10
[ "https://Stackoverflow.com/questions/632519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76370/" ]
You can also put the `Style` inline like so: ``` <ListView> <ListView.Resources> <Style TargetType="GridViewColumnHeader"> <Setter Property="Visibility" Value="Collapsed" /> </Style> </ListView.Resources> <ListView.View> <GridView> <!-- ... --> </Grid...
Another way you can apply Ray's solution is like this: ``` <ListView> <ListView.View> <GridView> <GridView.ColumnHeaderContainerStyle> <Style TargetType="GridViewColumnHeader"> <Setter Property="Visibility" Value="Collapsed" /> </Style> ...
50,540,868
I retrieve the date from database (using mysql) ``` java.sql.Date dbSqlDateLastRecord = result.getDate("date"); java.util.Date LastRecord = new java.util.Date(dbSqlDateLastRecord.getTime()); ``` and also get a present date ``` LocalDate today = LocalDate.now(); ``` However I didn't find how to calculate the...
2018/05/26
[ "https://Stackoverflow.com/questions/50540868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9821559/" ]
You mean : ``` java.sql.Date dbSqlDateLastRecord = result.getDate("date"); //Convert java.sql.Date to LocaDate LocalDate dateDB = dbSqlDateLastRecord.toLocalDate(); LocalDate dateSS = LocalDate.now(); ``` Then you can Get difference between them : ``` import java.time.Duration; ... long days = Duration.between(da...
Don’t use `java.sql.Date`. Don’t use `java.util.Date`. Both classes are long outdated. Also don’t use any conversions. Get a `LocalDate` from the database: ``` LocalDate dateDB = result.getObject("date", LocalDate.class); ``` This requires at least Java 8 and at lease JDBC 4.2. My guess is you’re long there. The...
4,355,860
I'm still struggling with what must be basic (and resolved) issues related to CQRS style architecture: How do we implement business rules that rely on **a set** of Aggregate Roots? Take, as an example, a booking application. It may enable you to book tickets for a concert, seats for a movie or a table at a restaurant...
2010/12/04
[ "https://Stackoverflow.com/questions/4355860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126014/" ]
Interesting question and with this one you are nailing one of the pain points in CQRS. The way Amazon is handling this is by having the business scenario cope with an error state if the items requested is sold out. The error state is simply to notify the customer by email that the items requested not currently in stoc...
The eTag enables optimistic concurrency which you can use in place of transactional locking to update a document and safely handle potential race conditions. See remarks here <http://msdn.microsoft.com/en-us/library/dd179427.aspx> for more info. Story might go something like this: User A creates an event E with max ti...
4,355,860
I'm still struggling with what must be basic (and resolved) issues related to CQRS style architecture: How do we implement business rules that rely on **a set** of Aggregate Roots? Take, as an example, a booking application. It may enable you to book tickets for a concert, seats for a movie or a table at a restaurant...
2010/12/04
[ "https://Stackoverflow.com/questions/4355860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126014/" ]
Interesting question and with this one you are nailing one of the pain points in CQRS. The way Amazon is handling this is by having the business scenario cope with an error state if the items requested is sold out. The error state is simply to notify the customer by email that the items requested not currently in stoc...
Let's look at the business perspective (I deal in similar things - booking appointments on free slots) ... The first thing in your analysis that strikes me as being off is that there's no notion of a reservable ticket/seat/table. These are the resources being booked. In case of being transactional, you can use some f...
4,355,860
I'm still struggling with what must be basic (and resolved) issues related to CQRS style architecture: How do we implement business rules that rely on **a set** of Aggregate Roots? Take, as an example, a booking application. It may enable you to book tickets for a concert, seats for a movie or a table at a restaurant...
2010/12/04
[ "https://Stackoverflow.com/questions/4355860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126014/" ]
After thinking about this for some time it finally dawned on me that the underlying problem is less related to CQRS than it is to the **non-trasactional** nature of disparate REST services. Really it boils down to this problem: if you need to update several resources, how do you ensure consistency if the second write ...
Interesting question and with this one you are nailing one of the pain points in CQRS. The way Amazon is handling this is by having the business scenario cope with an error state if the items requested is sold out. The error state is simply to notify the customer by email that the items requested not currently in stoc...
4,355,860
I'm still struggling with what must be basic (and resolved) issues related to CQRS style architecture: How do we implement business rules that rely on **a set** of Aggregate Roots? Take, as an example, a booking application. It may enable you to book tickets for a concert, seats for a movie or a table at a restaurant...
2010/12/04
[ "https://Stackoverflow.com/questions/4355860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126014/" ]
After thinking about this for some time it finally dawned on me that the underlying problem is less related to CQRS than it is to the **non-trasactional** nature of disparate REST services. Really it boils down to this problem: if you need to update several resources, how do you ensure consistency if the second write ...
The eTag enables optimistic concurrency which you can use in place of transactional locking to update a document and safely handle potential race conditions. See remarks here <http://msdn.microsoft.com/en-us/library/dd179427.aspx> for more info. Story might go something like this: User A creates an event E with max ti...
4,355,860
I'm still struggling with what must be basic (and resolved) issues related to CQRS style architecture: How do we implement business rules that rely on **a set** of Aggregate Roots? Take, as an example, a booking application. It may enable you to book tickets for a concert, seats for a movie or a table at a restaurant...
2010/12/04
[ "https://Stackoverflow.com/questions/4355860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126014/" ]
After thinking about this for some time it finally dawned on me that the underlying problem is less related to CQRS than it is to the **non-trasactional** nature of disparate REST services. Really it boils down to this problem: if you need to update several resources, how do you ensure consistency if the second write ...
Let's look at the business perspective (I deal in similar things - booking appointments on free slots) ... The first thing in your analysis that strikes me as being off is that there's no notion of a reservable ticket/seat/table. These are the resources being booked. In case of being transactional, you can use some f...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
Next to the aerodynamic advantages (both engine and propeller can run at their optimum speed for best efficiency) already mentioned in the other answers, there is an important **safety advantage:** a variable pitch propeller can be **feathered** such that its drag after an engine failure is minimized. This is critical ...
Propellers get more effective the faster they spin. The limiting factor is the speed of the blade tip, which must remain subsonic. So a propeller of a given size will offer maximum thrust when its RPM gives a blade tip speed of around Mach 0.8. Maximum thrust is needed especially for takeoff and for maximum speed. Whe...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
The comparison with a car's gearbox is unfortunate, and leads to misunderstandings... At the small airspeeds typical of takeoff, the inflow at the rotor plane is small too, and the prop needs a small amount of pitch in order to produce a large amount of thrust at maximum engine revs, the blades working at the angle of...
### Reverse Pitch - Reverse Thrust If the pitch angle is negative (reverse), then some meaningful amount of thrust is produced in the opposite direction than normal. This can be useful to improve stopping distance when landing, and even taxi in reverse. [https://www.skybrary.aero/index.php/Reverse\_Pitch#:~:text=When%...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
It's not just the operating RPM that is pertinent. It's also the pitch of the blades. If your propeller blades' pitch is optimized for takeoff/climb performance, it's going to be aerodynamically inefficient at high true airspeeds, like taking little tiny footsteps on a treadmill that's going really fast. (It works, bu...
![propeller efficiency with pitch](https://i.stack.imgur.com/k4OLS.jpg) Propeller efficiency with pitch, taken from Aerodynamics for Naval Aviators, H.H.Hurt, 1965 Fixed pitch props need to be designed for a specific flight speed, which would invariably be a compromise between takeoff and cruise performance. By varyi...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
Next to the aerodynamic advantages (both engine and propeller can run at their optimum speed for best efficiency) already mentioned in the other answers, there is an important **safety advantage:** a variable pitch propeller can be **feathered** such that its drag after an engine failure is minimized. This is critical ...
![propeller efficiency with pitch](https://i.stack.imgur.com/k4OLS.jpg) Propeller efficiency with pitch, taken from Aerodynamics for Naval Aviators, H.H.Hurt, 1965 Fixed pitch props need to be designed for a specific flight speed, which would invariably be a compromise between takeoff and cruise performance. By varyi...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
### Reverse Pitch - Reverse Thrust If the pitch angle is negative (reverse), then some meaningful amount of thrust is produced in the opposite direction than normal. This can be useful to improve stopping distance when landing, and even taxi in reverse. [https://www.skybrary.aero/index.php/Reverse\_Pitch#:~:text=When%...
![propeller efficiency with pitch](https://i.stack.imgur.com/k4OLS.jpg) Propeller efficiency with pitch, taken from Aerodynamics for Naval Aviators, H.H.Hurt, 1965 Fixed pitch props need to be designed for a specific flight speed, which would invariably be a compromise between takeoff and cruise performance. By varyi...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
The comparison with a car's gearbox is unfortunate, and leads to misunderstandings... At the small airspeeds typical of takeoff, the inflow at the rotor plane is small too, and the prop needs a small amount of pitch in order to produce a large amount of thrust at maximum engine revs, the blades working at the angle of...
![propeller efficiency with pitch](https://i.stack.imgur.com/k4OLS.jpg) Propeller efficiency with pitch, taken from Aerodynamics for Naval Aviators, H.H.Hurt, 1965 Fixed pitch props need to be designed for a specific flight speed, which would invariably be a compromise between takeoff and cruise performance. By varyi...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
It's not just the operating RPM that is pertinent. It's also the pitch of the blades. If your propeller blades' pitch is optimized for takeoff/climb performance, it's going to be aerodynamically inefficient at high true airspeeds, like taking little tiny footsteps on a treadmill that's going really fast. (It works, bu...
### Reverse Pitch - Reverse Thrust If the pitch angle is negative (reverse), then some meaningful amount of thrust is produced in the opposite direction than normal. This can be useful to improve stopping distance when landing, and even taxi in reverse. [https://www.skybrary.aero/index.php/Reverse\_Pitch#:~:text=When%...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
The comparison with a car's gearbox is unfortunate, and leads to misunderstandings... At the small airspeeds typical of takeoff, the inflow at the rotor plane is small too, and the prop needs a small amount of pitch in order to produce a large amount of thrust at maximum engine revs, the blades working at the angle of...
Propellers get more effective the faster they spin. The limiting factor is the speed of the blade tip, which must remain subsonic. So a propeller of a given size will offer maximum thrust when its RPM gives a blade tip speed of around Mach 0.8. Maximum thrust is needed especially for takeoff and for maximum speed. Whe...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
Propellers get more effective the faster they spin. The limiting factor is the speed of the blade tip, which must remain subsonic. So a propeller of a given size will offer maximum thrust when its RPM gives a blade tip speed of around Mach 0.8. Maximum thrust is needed especially for takeoff and for maximum speed. Whe...
![propeller efficiency with pitch](https://i.stack.imgur.com/k4OLS.jpg) Propeller efficiency with pitch, taken from Aerodynamics for Naval Aviators, H.H.Hurt, 1965 Fixed pitch props need to be designed for a specific flight speed, which would invariably be a compromise between takeoff and cruise performance. By varyi...
81,577
From what I understand, the purpose of a variable-pitch propeller (be it manually adjustable, or constant speed) is that it allows the engine to always operate at its most efficient speed, much like the transmission of a car. Is that correct? If so, if an airplane were to accomplish that another way (say, a hybrid gas-...
2020/10/09
[ "https://aviation.stackexchange.com/questions/81577", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/37253/" ]
Next to the aerodynamic advantages (both engine and propeller can run at their optimum speed for best efficiency) already mentioned in the other answers, there is an important **safety advantage:** a variable pitch propeller can be **feathered** such that its drag after an engine failure is minimized. This is critical ...
### Reverse Pitch - Reverse Thrust If the pitch angle is negative (reverse), then some meaningful amount of thrust is produced in the opposite direction than normal. This can be useful to improve stopping distance when landing, and even taxi in reverse. [https://www.skybrary.aero/index.php/Reverse\_Pitch#:~:text=When%...
55,266,640
Is there any way to change the colour of the shadow which is dark under the card? If any solution please let me know or any other workaround is appreciated! [![enter image description here](https://i.stack.imgur.com/7RNiA.png)](https://i.stack.imgur.com/7RNiA.png)
2019/03/20
[ "https://Stackoverflow.com/questions/55266640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1799284/" ]
Adding the following to your CSS will change the `box-shadow` for the `mat-card` ``` .mat-card:not([class*=mat-elevation-z]) { box-shadow: 0 2px 1px -1px rgba(0,0,0,1), 0 1px 1px 0 rgba(0,0,0,1), 0 1px 3px 0 rgba(0,0,0,1); } ``` If you are using an elevation, of course this CSS...
Take a look at the latest [angular material elevation](https://material.angular.io/guide/elevation#mixins) You can do something like this in style.sass ``` @import '~@angular/material/theming'; .my-class-with-custom-shadow { // Adds a shadow for elevation level 2 with color #e91e63 and 80% of the default opacity: ...
55,266,640
Is there any way to change the colour of the shadow which is dark under the card? If any solution please let me know or any other workaround is appreciated! [![enter image description here](https://i.stack.imgur.com/7RNiA.png)](https://i.stack.imgur.com/7RNiA.png)
2019/03/20
[ "https://Stackoverflow.com/questions/55266640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1799284/" ]
Adding the following to your CSS will change the `box-shadow` for the `mat-card` ``` .mat-card:not([class*=mat-elevation-z]) { box-shadow: 0 2px 1px -1px rgba(0,0,0,1), 0 1px 1px 0 rgba(0,0,0,1), 0 1px 3px 0 rgba(0,0,0,1); } ``` If you are using an elevation, of course this CSS...
``` .mat-card { box-shadow: 0px 0px 10px 0px #9b9b9b, 0 1px 1px 0 #9b9b9b, 0 1px 3px 0 #9b9b9b; } ```
55,266,640
Is there any way to change the colour of the shadow which is dark under the card? If any solution please let me know or any other workaround is appreciated! [![enter image description here](https://i.stack.imgur.com/7RNiA.png)](https://i.stack.imgur.com/7RNiA.png)
2019/03/20
[ "https://Stackoverflow.com/questions/55266640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1799284/" ]
Take a look at the latest [angular material elevation](https://material.angular.io/guide/elevation#mixins) You can do something like this in style.sass ``` @import '~@angular/material/theming'; .my-class-with-custom-shadow { // Adds a shadow for elevation level 2 with color #e91e63 and 80% of the default opacity: ...
``` .mat-card { box-shadow: 0px 0px 10px 0px #9b9b9b, 0 1px 1px 0 #9b9b9b, 0 1px 3px 0 #9b9b9b; } ```
30,749,391
My query in sql server is like `where isnull(id,'3') = 3` which would give me all null values as well as values equal to 3. I want to achieve the same in SOLR but not able to get it. I tried ``` id:3 OR -id:[* TO *] ``` but it gave me no result whereas on `-id:[* TO *]` it gives me correct amount of results. How do ...
2015/06/10
[ "https://Stackoverflow.com/questions/30749391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3016485/" ]
maybe the issue here is the precedence of the operators, - is being applied to both condition or something like that (might be a bug), anyway, this works: ``` q=(-id:[* TO *]) OR id:3 ```
try with `id:('' TO *)` OR `id:3`.
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
Not fully understanding the dots - it's key C,from the key sig., and the chords go from F to G7 back to F. That G7 is in 3rd inversion, because the F is in the bass.If it was going to be called V/IV, in key C, that would make it C7, which it obviously isn't, and anyway C7 would be designated I7. RN isn't particularly...
Normally the melody do-ti-la above IV (the subdominant) will be considered (the middle not e) as passing tone. Now together with parallels of 3rd and 6th we get a resoti (V) chord. I think it is most useful to consider this passage as a slash chord and it will help you to transpose it easily in other keys. I think the...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
Not fully understanding the dots - it's key C,from the key sig., and the chords go from F to G7 back to F. That G7 is in 3rd inversion, because the F is in the bass.If it was going to be called V/IV, in key C, that would make it C7, which it obviously isn't, and anyway C7 would be designated I7. RN isn't particularly...
I agree that these are modal 'color' chords over a pedal point. The V chord is not functioning as a dominant at all; rather, it brings out the Lydian nature of the IV chord. The Lydian mode gives that faraway, otherworldly sound, and is especially exploited in cinematic music. You might have better luck with pop/jazz ...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
I see two ways to analyze this. First, it's just a IV-V7-IV with a subdominant pedal. Another possibility is a IV-V42-IV progression. Both give the same note. I think the first describes the music a bit better. It might be worth looking at some of Handel's stuff as he liked the third inversion seventh enough that it's ...
Normally the melody do-ti-la above IV (the subdominant) will be considered (the middle not e) as passing tone. Now together with parallels of 3rd and 6th we get a resoti (V) chord. I think it is most useful to consider this passage as a slash chord and it will help you to transpose it easily in other keys. I think the...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
In your last question, you engaged with the common-tone diminished seventh chord (CT°7). But diminished sevenths aren't the only possible common-tone chords; another common possibility is the common-tone dominant seventh (CTV7), which I would argue is what we have here. This is especially common with IV moving to V ab...
Normally the melody do-ti-la above IV (the subdominant) will be considered (the middle not e) as passing tone. Now together with parallels of 3rd and 6th we get a resoti (V) chord. I think it is most useful to consider this passage as a slash chord and it will help you to transpose it easily in other keys. I think the...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
It's triads over a pedal. F, G/F, F. If tempted to call the second chord G7/F, take the idea a little further... [![enter image description here](https://i.stack.imgur.com/HSiwn.png)](https://i.stack.imgur.com/HSiwn.png) Wouldn't it be ridiculous to call that new chord A♭6/F? No, these are plain triads over a pedal a...
Normally the melody do-ti-la above IV (the subdominant) will be considered (the middle not e) as passing tone. Now together with parallels of 3rd and 6th we get a resoti (V) chord. I think it is most useful to consider this passage as a slash chord and it will help you to transpose it easily in other keys. I think the...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
I see two ways to analyze this. First, it's just a IV-V7-IV with a subdominant pedal. Another possibility is a IV-V42-IV progression. Both give the same note. I think the first describes the music a bit better. It might be worth looking at some of Handel's stuff as he liked the third inversion seventh enough that it's ...
I agree that these are modal 'color' chords over a pedal point. The V chord is not functioning as a dominant at all; rather, it brings out the Lydian nature of the IV chord. The Lydian mode gives that faraway, otherworldly sound, and is especially exploited in cinematic music. You might have better luck with pop/jazz ...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
In your last question, you engaged with the common-tone diminished seventh chord (CT°7). But diminished sevenths aren't the only possible common-tone chords; another common possibility is the common-tone dominant seventh (CTV7), which I would argue is what we have here. This is especially common with IV moving to V ab...
I agree that these are modal 'color' chords over a pedal point. The V chord is not functioning as a dominant at all; rather, it brings out the Lydian nature of the IV chord. The Lydian mode gives that faraway, otherworldly sound, and is especially exploited in cinematic music. You might have better luck with pop/jazz ...
114,211
I wanted to highlight a particular chord of my [previous question](https://music.stackexchange.com/q/114106/77758) because it was bugging me a bit. What would you call a dominant triad over a subdominant bass, in pop/jazz roman numeral analysis? It could be seen as a `V7` in third inversion, but if you have a strong su...
2021/05/05
[ "https://music.stackexchange.com/questions/114211", "https://music.stackexchange.com", "https://music.stackexchange.com/users/77758/" ]
It's triads over a pedal. F, G/F, F. If tempted to call the second chord G7/F, take the idea a little further... [![enter image description here](https://i.stack.imgur.com/HSiwn.png)](https://i.stack.imgur.com/HSiwn.png) Wouldn't it be ridiculous to call that new chord A♭6/F? No, these are plain triads over a pedal a...
I agree that these are modal 'color' chords over a pedal point. The V chord is not functioning as a dominant at all; rather, it brings out the Lydian nature of the IV chord. The Lydian mode gives that faraway, otherworldly sound, and is especially exploited in cinematic music. You might have better luck with pop/jazz ...
47,465,351
I have an object and within that object, I have an array of objects. I'm trying to remove a single object from within the array. My code right now removes the entire object and I'm not sure why. Any thoughts? eg: `Collection example` ``` "profiles": { "names": [ { "first": "Joe", "last": "First", ...
2017/11/24
[ "https://Stackoverflow.com/questions/47465351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5769544/" ]
Use [$pull](https://docs.mongodb.com/manual/reference/operator/update/pull/#pull) operator to remove all matching objects. ``` MyCollection.update({_id: userId}, { "$pull": { "profiles.names": { "first": "Joe" } } }); ``` To remove single object using [$unset](https://docs.mongodb.com/manual/refere...
This is how you can do it, ``` MyCollection.update({ _id: userId) }, { "$pull": { "profiles.names": { "first": "Joe" } } }); ```
47,465,351
I have an object and within that object, I have an array of objects. I'm trying to remove a single object from within the array. My code right now removes the entire object and I'm not sure why. Any thoughts? eg: `Collection example` ``` "profiles": { "names": [ { "first": "Joe", "last": "First", ...
2017/11/24
[ "https://Stackoverflow.com/questions/47465351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5769544/" ]
Use [$pull](https://docs.mongodb.com/manual/reference/operator/update/pull/#pull) operator to remove all matching objects. ``` MyCollection.update({_id: userId}, { "$pull": { "profiles.names": { "first": "Joe" } } }); ``` To remove single object using [$unset](https://docs.mongodb.com/manual/refere...
$pull removes an element from an array. $unset removes the whole array (or any other field).
47,465,351
I have an object and within that object, I have an array of objects. I'm trying to remove a single object from within the array. My code right now removes the entire object and I'm not sure why. Any thoughts? eg: `Collection example` ``` "profiles": { "names": [ { "first": "Joe", "last": "First", ...
2017/11/24
[ "https://Stackoverflow.com/questions/47465351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5769544/" ]
This is how you can do it, ``` MyCollection.update({ _id: userId) }, { "$pull": { "profiles.names": { "first": "Joe" } } }); ```
$pull removes an element from an array. $unset removes the whole array (or any other field).
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
In Python 2.6 or newer, use `format` [syntax](http://docs.python.org/library/string.html#format-string-syntax): ``` '{0:0=#10b}'.format(my_num)[2:] # '00001010' ``` One of the neat things about Python strings is that they are sequences. If all you need to do is iterate through the characters, then there is no need t...
You could use [`zfill`](http://docs.python.org/library/stdtypes.html#str.zfill) instead of `rjust`. ``` list(bin(my_num)[2:].zfill(8)) ```
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
You could use [`zfill`](http://docs.python.org/library/stdtypes.html#str.zfill) instead of `rjust`. ``` list(bin(my_num)[2:].zfill(8)) ```
I have given here program for decimal to binary conversion. ``` print "Program for Decimal to Binary Conversion" n = 0 bin = 0 pos = 1 print "Enter Decimal Number:", n = input() while(n > 0): bin = bin + (n % 2) * pos; n = n / 2; pos *= 10; print "The Binary Number is: ", bin #sample output #Prog...
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
You could use [`zfill`](http://docs.python.org/library/stdtypes.html#str.zfill) instead of `rjust`. ``` list(bin(my_num)[2:].zfill(8)) ```
Here is one method for decimal to binary conversion: * divide the decimal number by 2 * take the remainder and record it in on the side * divide the quotient by 2 * repeat until the decimal cannot be divided further * record the remainder in reverse order and you get the resultant binary number Which may be coded as:...
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
In Python 2.6 or newer, use `format` [syntax](http://docs.python.org/library/string.html#format-string-syntax): ``` '{0:0=#10b}'.format(my_num)[2:] # '00001010' ``` One of the neat things about Python strings is that they are sequences. If all you need to do is iterate through the characters, then there is no need t...
I have given here program for decimal to binary conversion. ``` print "Program for Decimal to Binary Conversion" n = 0 bin = 0 pos = 1 print "Enter Decimal Number:", n = input() while(n > 0): bin = bin + (n % 2) * pos; n = n / 2; pos *= 10; print "The Binary Number is: ", bin #sample output #Prog...
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
In Python 2.6 or newer, use `format` [syntax](http://docs.python.org/library/string.html#format-string-syntax): ``` '{0:0=#10b}'.format(my_num)[2:] # '00001010' ``` One of the neat things about Python strings is that they are sequences. If all you need to do is iterate through the characters, then there is no need t...
Here is one method for decimal to binary conversion: * divide the decimal number by 2 * take the remainder and record it in on the side * divide the quotient by 2 * repeat until the decimal cannot be divided further * record the remainder in reverse order and you get the resultant binary number Which may be coded as:...
2,192,658
I need to convert from an integer to a list of size 8 that is the binary representation of that number (number <= 255) and back. Currently I am using these lines ``` list(bin(my_num)[2:].rjust(8,'0')) int("".join(my_list),2) ``` I did some googling, but had a hard time finding relevant information. I'm just curious ...
2010/02/03
[ "https://Stackoverflow.com/questions/2192658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262632/" ]
Here is one method for decimal to binary conversion: * divide the decimal number by 2 * take the remainder and record it in on the side * divide the quotient by 2 * repeat until the decimal cannot be divided further * record the remainder in reverse order and you get the resultant binary number Which may be coded as:...
I have given here program for decimal to binary conversion. ``` print "Program for Decimal to Binary Conversion" n = 0 bin = 0 pos = 1 print "Enter Decimal Number:", n = input() while(n > 0): bin = bin + (n % 2) * pos; n = n / 2; pos *= 10; print "The Binary Number is: ", bin #sample output #Prog...
9,965,690
I am just a newbie in cakephp and struggled a lot as a beginner, I hope im not exaggerating. I believe I was on the right track of coding a simple registration application when I found out that I am not able to insert any data in my database. The name of my database is "cake" and this is the default configuration: ```...
2012/04/01
[ "https://Stackoverflow.com/questions/9965690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1306464/" ]
You still have to save the username and password to session. but dont save password in clear text , use openssl\_encrypt and openssl\_decrypt with your own hash. <http://php.net/manual/en/function.openssl-encrypt.php> but this function appears from PHP 5.3.0 above
No, don't make your application one giant file. Put your DB credentials in an include outside of the web root. Then, make sure only the users that need it can open it. That's how this is generally done.
9,965,690
I am just a newbie in cakephp and struggled a lot as a beginner, I hope im not exaggerating. I believe I was on the right track of coding a simple registration application when I found out that I am not able to insert any data in my database. The name of my database is "cake" and this is the default configuration: ```...
2012/04/01
[ "https://Stackoverflow.com/questions/9965690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1306464/" ]
There exists a design pattern called [Front Controller](http://en.wikipedia.org/wiki/Front_Controller_pattern), basically what it does is the entire application is served through one page. You implement your own dispatcher and the dispatcher handles all the requests. Such as which object to instantiate or which page to...
No, don't make your application one giant file. Put your DB credentials in an include outside of the web root. Then, make sure only the users that need it can open it. That's how this is generally done.
9,965,690
I am just a newbie in cakephp and struggled a lot as a beginner, I hope im not exaggerating. I believe I was on the right track of coding a simple registration application when I found out that I am not able to insert any data in my database. The name of my database is "cake" and this is the default configuration: ```...
2012/04/01
[ "https://Stackoverflow.com/questions/9965690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1306464/" ]
You should never need to store passwords in the session and there is no need to create individual MySQL users for each user of your application. These things don't make your application more secure and could actually make it less secure. Here are some suggestions: * Create one MySQL user with only the necessary permi...
No, don't make your application one giant file. Put your DB credentials in an include outside of the web root. Then, make sure only the users that need it can open it. That's how this is generally done.
661,190
[Ignasi](https://tex.stackexchange.com/questions/561252/tikz-defining-a-ones-tenths-hundredths-block) made some great code for base ten blocks and I've been trying to use it to automatically generate representations of 2-digit numbers. ``` %%Base 10 Blocks \tikzset { node distance=.1cm, hundred/.style={ ...
2022/10/10
[ "https://tex.stackexchange.com/questions/661190", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/282168/" ]
### Adaptations * defined lengths `\unitsize` and `\unitsep` * use `foreach` to draw nodes * use `\ifnumgreater{\tens}{0}{}{}` etc. to check if which blocks should be drawn * I also thought about using just the number as one parameter, as an extension, but then I saw that this is already done in Jasper's answer. So I ...
I think, an even nicer approach than to have a macro that accepts one, two or three arguments would be to just let PGF do the math. This way, you just type arbitrary numbers between 1 and 999 into the single argument of the macro `\basetenpic` and the number of boxes will be calculated automatically. I would also prob...
10,119,255
What is the good way to express the diagram in C++ with multiple inheritance? Or do I need to use multiple inheritance in this case? Can't I just create a Child1 and a Child2 instance in the base class and use them? ![enter image description here](https://i.stack.imgur.com/B47zV.jpg)
2012/04/12
[ "https://Stackoverflow.com/questions/10119255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/181272/" ]
You can use touch with the `-h` flag in bash to modify the mtime and atime of the symlink instead of the file it references: ``` touch -h somesymlink ``` You can use the `-t` flag to specify a time to set it to, if you don't want to use the current time.
Use `lutimes` instead. See `man lutimes` or <http://www.gnu.org/software/libc/manual/html_node/File-Times.html>
45,714
has anyone else come across this? I'm getting an error when I'm trying to create a product display. It happens when I'm trying to put in the product SKU. > > An AJAX HTTP error occurred. > > > HTTP Result Code: 200 > > > Debugging information follows. > > > Path: <http://hayfield.com:8082/commerce_product/autoc...
2012/10/05
[ "https://drupal.stackexchange.com/questions/45714", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/10404/" ]
Yes. The short answer is you update your Drush make file to point to the new version of the module you want to be included in your new platform(build). In your drush make file you would include the version of each module you are including in your platform build. So views for example would look like this. ``` projects...
Bob beat me to it :) but in response to this and your email you sent me, yes indeed this is the correct procedure. Treat your Drush makefile as the 'blueprint' of your application. Work away in development manually / clone your live site and manually 'drush up' or 'drush dl' a module and test that everything works as...
42,355,172
I am trying to upgrade my Ionic environment to the latest version. I have an existing app I built on Ionic `2.0.0-beta.32`. I want to upgrade it to the latest version `2.0.1` (or the `final release`). My questions are : 1) How can I upgrade my environment ? 2) Is there any changes I have to do in my code ? (if yes ...
2017/02/20
[ "https://Stackoverflow.com/questions/42355172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5878727/" ]
answering question 1: try these in the root of your project > > sudo npm install -g ionic > > > ionic lib update > > > question number 2 is hard to answer. generally you should be good. You should try running your code and do some regression testing and then ask specific questions if you face any problems.
Ionic provides upgrade instructions in their [changelog](https://github.com/driftyco/ionic/blob/master/CHANGELOG.md). Usually it is enough to upgrade your package version, but sometimes when there are breaking changes that you need to manually address they will be listed on that page.
55,587,223
Is there a way to destroy Rails Active Record entries in a table *without* an `id` column? I know there are a few ways to destroy Active Records with `ids`, like these: ```rb User.destroy(1) User.first.destroy ``` However, I cannot seem to find a way to do so without an `id`. I've checked the suggestions in [this li...
2019/04/09
[ "https://Stackoverflow.com/questions/55587223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11249670/" ]
The reason `User.where(name: 'Dummy').destroy` doesn't work is `User.where(name: 'Dummy')` is a relation, not a single record. If you want, for example, to destroy all the records with `name` equal to `'Dummy'`, you can use `destroy_all`: ``` User.where(name: 'Dummy').destroy_all ```
if you want to remove column, you can use ``` User.find_by_name(name: "dummy").destroy ```
71,066,670
I implemented a finite differences algorithm to solve a PDE. The grid is a structured 2D domain of size [Nx, Nz], solved Nt times. I pre-allocate the object containing all solutions: ``` sol = zeros(Nx, Nz, Nt, 'single') ; ``` This becomes very easily too large and I get a '*out of memory*' error. Unfortunately `s...
2022/02/10
[ "https://Stackoverflow.com/questions/71066670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14960130/" ]
You can create a a cell array of sparse matrices to store the results. However computations can be performed on full matrices if working with a full matrix is faster than sparse matrix and convert the full matrix to sparse matrix and place it in the cell.
You could store the array in sparse, **linear** form; that is, a column vector with length equal to the product of dimensions: ``` sol = sparse([], [], [], Nx*Nz*Nt, 1); % sparse column vector containing zeros ``` Then, instead of indexing normally, ``` sol(x, z, t), ``` you need to translate the indices `x`, `z`...
34,303,352
I have two tables: users and threads. When a thread is created, it will store the user\_id in the table as author\_id. I want to display the thread name and the username of its author with the same query. I am currently using two querys as shown: ``` $query2 = mysql_query("SELECT author_id FROM threads WHERE id = $thr...
2015/12/16
[ "https://Stackoverflow.com/questions/34303352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5263983/" ]
``` <?php $sql = ' SELECT t.name, u.username FROM threads t JOIN users u ON t.author_id = u.id WHERE t.id = ' . (int)$threadId . ' '; list($thread_name, $author_name) = mysql_fetch_row(mysql_query($sql)); ``` P.S. [Mysql php extension](http://php.net/manual/en/book.mysql.php) is deprecated.
Try this query: ``` SELECT username FROM users WHERE id = (SELECT author_id FROM threads WHERE id = $threadId LIMIT 1) ``` Note: `Limit 1` is not mandatory as id is unique.
1,458,496
$\int\_{c}^{c+2L} cos(\frac{2\pi nx}{L}) = \frac{L sin(2\pi n) cos(\frac{2 \pi n(c+L)}{L})}{\pi n}$ dx with $n = 0,1,2,...$ I put this integral in Wolfram Alpha and gives me this result, but when I try to do it at hand I arrive to other result. Is Wolfram Alpha wrong?
2015/09/30
[ "https://math.stackexchange.com/questions/1458496", "https://math.stackexchange.com", "https://math.stackexchange.com/users/270447/" ]
Upon integrating, we have for $n\ne 0$, the term $$\begin{align} \sin \left(\frac{2\pi n(c+2L)}{L}\right)-\sin \left(\frac{2\pi nc}{L}\right)&=\sin \left(\frac{2\pi nc}{L}\right)\cos(4\pi n)\\\\ &+\cos \left(\frac{2\pi nc}{L}\right)\sin(4\pi n)\\\\ &-\sin \left(\frac{2\pi nc}{L}\right)\\\\ &=\sin \left(\frac{2\pi nc}{...
No, Wolfram Alpha is correct. But since your $n$ is an integer (which of course Wolfram Alpha does not assume if you don't say so), $\sin(2\pi n)=0$. Hence, the result is zero. **Edit** I suggest that you take care of the integral for $n=0$ by hand. Wolfram Alpha gives a generic result...
204,597
I am looking for a verb which means to engage in a debate or argument. For example, how would I fill in the blank in the following sentence? > > "That is just my idea and I have no intention to \_\_\_\_\_\_\_\_\_." > > > The person saying this doesn't have time to debate. Thanks!
2014/10/26
[ "https://english.stackexchange.com/questions/204597", "https://english.stackexchange.com", "https://english.stackexchange.com/users/65691/" ]
If you are talking about doing something or asking others to do a thing a certain way, the adverb **SO** should be used; *'Position the frame on the cone using the sliding bar so that the cursor of the meter is on the crosshairs'* **SUCH** is a determiner used mainly to add optional emphasis to a noun or noun phras...
*So that* and *such that* are synonymous in this context. However, *such* is more formal, and commonly appears in mathematics (e.g. "The set of all prime numbers *p* such that *p*+2 is also prime"), while *so* is less formal and more likely to appear in (say) a DIY instruction manual. Avoid "in a way that"; it's wordy...
47,140,712
I have a scenario in which I have a team page with pictures and some blurb. Under each picture I have social media links much like the following: [![enter image description here](https://i.stack.imgur.com/qlk2S.jpg)](https://i.stack.imgur.com/qlk2S.jpg) These are images that sit within a horizontal list underneath ea...
2017/11/06
[ "https://Stackoverflow.com/questions/47140712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6744223/" ]
The problem is if you use a `<span>` element you need to set it to `display: inline-block` and you need to set a `width` for the image to show up. Then it works, here is a demo: ```css .linkedin { display: inline-block; width: 140px; height:100px; background-image:url(http://ipsumimage.appspot.com/140x100,...
Best approach for this is to use SVG's and change the fill of the SVG on hover. Your approach should work however, it might be that you've not got the correct size image? try 'background-size: cover;' Or that the element has no width. Try setting a width on the span too. (don't forget to give it 'display: inline-block...
47,140,712
I have a scenario in which I have a team page with pictures and some blurb. Under each picture I have social media links much like the following: [![enter image description here](https://i.stack.imgur.com/qlk2S.jpg)](https://i.stack.imgur.com/qlk2S.jpg) These are images that sit within a horizontal list underneath ea...
2017/11/06
[ "https://Stackoverflow.com/questions/47140712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6744223/" ]
The problem is if you use a `<span>` element you need to set it to `display: inline-block` and you need to set a `width` for the image to show up. Then it works, here is a demo: ```css .linkedin { display: inline-block; width: 140px; height:100px; background-image:url(http://ipsumimage.appspot.com/140x100,...
Font-Awesome is a great idea for what you're trying to achieve. Takes less data to load the page too if you can get away with using text in place of images. By the way, when using the :hover property there is no need to redefine the width and height of the image... Just redefine the changes you'd like to make.
18,844
The external display's max. resolution is 2560 x 1440, but the maximum resolution I can select on the display settings is 2048 x 1152. What can I do to use the display in its max. resolution? System: elementary OS 0.4.1 Loki Display driver: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
2019/04/29
[ "https://elementaryos.stackexchange.com/questions/18844", "https://elementaryos.stackexchange.com", "https://elementaryos.stackexchange.com/users/5938/" ]
Based on [answer](https://unix.stackexchange.com/questions/47749/cannot-add-new-mode-in-xrandr-for-external-monitor/) you can use `gtf height width refresh_rate` and get an new modeline as response and then you can create new mode with the output of the first command `xrandr --newmode modeline`, after that you need to...
Please open terminal pressing `Ctrl`+`Alt`+`T` and execute `xrandr -q` to see the connected displays and their current resolution. Then execute `xrandr --output <monitor_name> --mode <resolution>` to change resolution. For example, `xrandr --output eDP-2-1 --mode 2560x1440`
22,123,472
Help me with this, "Exception in thread "main" java.lang.NullPointerException" thanks ``` private List< PosibleTerreno> posibles_terrenos; private List< PosibleTerreno> terrenos_validos; //------------------------------- int cantidad = this.posibles_terrenos.size(); for (int i = 0 ; i < cantidad ; i++) ...
2014/03/02
[ "https://Stackoverflow.com/questions/22123472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2752917/" ]
You have *[declared](https://www.google.com/search?q=define%20declared%20java)* these variables ``` private List< PosibleTerreno> posibles_terrenos; private List< PosibleTerreno> terrenos_validos; ``` but you have not *[initialized](https://www.google.com/search?q=define%20initialize%20java)* them. You need to do so...
do this before executing the line throwing the exception. ``` private List< PosibleTerreno> posibles_terrenos = new ArrayList<PosibleTerreno>(); private List< PosibleTerreno> terrenos_validos = new ArrayList<PosibleTerreno>(); ```
22,123,472
Help me with this, "Exception in thread "main" java.lang.NullPointerException" thanks ``` private List< PosibleTerreno> posibles_terrenos; private List< PosibleTerreno> terrenos_validos; //------------------------------- int cantidad = this.posibles_terrenos.size(); for (int i = 0 ; i < cantidad ; i++) ...
2014/03/02
[ "https://Stackoverflow.com/questions/22123472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2752917/" ]
You have *[declared](https://www.google.com/search?q=define%20declared%20java)* these variables ``` private List< PosibleTerreno> posibles_terrenos; private List< PosibleTerreno> terrenos_validos; ``` but you have not *[initialized](https://www.google.com/search?q=define%20initialize%20java)* them. You need to do so...
You need to initialize your `List(s)`, you might use a [ArrayList](http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html) and/or a [LinkedList](http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html) perhaps with - ``` private List<PosibleTerreno> posibles_terrenos = new ArrayList<PosibleTerre...
44,639,671
I have an extremely long table with EAV model. My columns are tipically ID, Timestamp, Value. Actually I create an index on ID and Timestamp to increase performance in my queries but it seems to be still slow.. What happend if I split the timestamp in separated integer fields and create an index on those fields? Someth...
2017/06/19
[ "https://Stackoverflow.com/questions/44639671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5185674/" ]
`write.lock` file might be present under `solr/{environment}/data/index` directory due to unclean shutdown. Removing `write.lock` file will fix the issue.
I was having this issue even when `write.lock` was not present. Here's what solved it for me: 1) Delete entire /solr directory 2) run `ps -ef|grep solr` to see any solr processes running 3) run `kill -9 [solr pid]` for each of the processes found in step 2 4) run `rake sunspot:solr:start` and then `rake sunspot:sol...
59,348,048
As AWS changes their root ssl cert for rds services 2019, the old certificate from 2015 looses its validity 03/2020. see <https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.SSL-certificate-rotation.html> How to I configure sequalize to use the new rds-ca-2019 certificate? ``` // current sequalize aws...
2019/12/15
[ "https://Stackoverflow.com/questions/59348048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/827148/" ]
Ensure you update to the latest node mysql package, this may resolve the issue in future. As of now the new aws rds-ca-2019 ca certificate seems not yet to be merged. <https://github.com/mysqljs/mysql/pull/2280> A temporary fix without ca validation: ``` var sequelizeConfig = { ... host: "xyz.rds.amazonaws.com"...
I think the `dialectOptions` parameter should not be defined inside the `pool` but outside. like this: ``` const sequelize = new Sequelize(dbname, username, password, { host: 'host name', dialect: 'mysql', dialectOptions: { ssl: 'Amazon RDS' }, pool: { ... } }); ``` or like this: ``` const seq...
19,411,184
I have a class roughly like this: ``` class C attr_accessor :board # board is a multidimensional array (represents a matrix) def initialize @board = ... # initialize board end def ==(other) @board == other.board end end ``` Still, when I do: ``` s = Set.new s.add(C.new) s.in...
2013/10/16
[ "https://Stackoverflow.com/questions/19411184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1478748/" ]
`Set` uses `eql?` and `hash`, not `==`, to test two objects for equality. See, for example, [this documentation of Set](http://ruby-doc.org/stdlib-1.8.7/libdoc/set/rdoc/Set.html): "The equality of each couple of elements is determined according to Object#eql? and Object#hash, since Set uses Hash as storage." If you wa...
You need to do something below : ``` require 'set' class C attr_accessor :board def initialize @board = 12 end def ==(other) @board == other.board end end s = Set.new c = C.new s.add(c) s.include? c # => true ``` The reason below will not work: ``` s.add(C.new) s.include?(C.new) # => false ```...
19,411,184
I have a class roughly like this: ``` class C attr_accessor :board # board is a multidimensional array (represents a matrix) def initialize @board = ... # initialize board end def ==(other) @board == other.board end end ``` Still, when I do: ``` s = Set.new s.add(C.new) s.in...
2013/10/16
[ "https://Stackoverflow.com/questions/19411184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1478748/" ]
`Set` uses `eql?` and `hash`, not `==`, to test two objects for equality. See, for example, [this documentation of Set](http://ruby-doc.org/stdlib-1.8.7/libdoc/set/rdoc/Set.html): "The equality of each couple of elements is determined according to Object#eql? and Object#hash, since Set uses Hash as storage." If you wa...
``` class C attr_accessor :board # board is a multidimensional array (represents a matrix) def initialize board = [[1],[2]] # initialize board p @board #=> nil !! end def ==(other) @board == other.board end def eql?(other) # not used puts "eql? called" ...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
You can use [ScrollView](https://facebook.github.io/react-native/docs/scrollview.html) to control screen up and down movements. As long as user hasn't focused any `TextInput`, you can [disable scroll](https://facebook.github.io/react-native/docs/scrollview.html#scrollenabled). On focus, just shift up the scrollview usi...
And another solution, working with RN 0.2, this time instead of squashing the content it scrolls. ``` inputFocused: function(ref) { this._scroll(ref, 75); }, inputBlurred: function(ref) { this._scroll(ref, 0); }, _scroll: function(ref, offset) { setTimeout(() => { var scrollResponder = this.refs.m...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
``` import {KeyboardAvoidingView} from 'react-native'; <KeyboardAvoidingView style={styles.container} behavior="padding" enabled> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, m...
And another solution, working with RN 0.2, this time instead of squashing the content it scrolls. ``` inputFocused: function(ref) { this._scroll(ref, 75); }, inputBlurred: function(ref) { this._scroll(ref, 0); }, _scroll: function(ref, offset) { setTimeout(() => { var scrollResponder = this.refs.m...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
Night Fury's answer is pretty good, though wouldn't fuss with the ScrollView's `contentOffset`, I'd use the `ScrollResponder`: ```jsx render() { return ( <ScrollView ref="myScrollView"> <TextInput ref="myInput" onFocus={this._scrollToInput.bind(this)} /> </ScrollView> ); } _scr...
It's a crap shoot to get the native keyboard awareness functionality of ScrollView working. For my Android app, it works perfectly in one screen that is nearly identical as the other for which doesn't work. And on iOS, it just doesn't work. This is what's working for me: ``` import { Keyboard, ScrollView, StyleSheet, ...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
This [package](https://github.com/APSL/react-native-keyboard-aware-scroll-view) does a greate job, introduces a KeyboardAwareScrollView component that scrolls the view up matching the input with the keyboard, then scrolling back down.
It's a crap shoot to get the native keyboard awareness functionality of ScrollView working. For my Android app, it works perfectly in one screen that is nearly identical as the other for which doesn't work. And on iOS, it just doesn't work. This is what's working for me: ``` import { Keyboard, ScrollView, StyleSheet, ...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
In 2017 (RN 0.43) there is special component for this: [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview)
``` import {KeyboardAvoidingView} from 'react-native'; <KeyboardAvoidingView style={styles.container} behavior="padding" enabled> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, m...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
``` import {KeyboardAvoidingView} from 'react-native'; <KeyboardAvoidingView style={styles.container} behavior="padding" enabled> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, marginTop: 30}}> test text before input</Text> <Text style={{height: 100, m...
It's a crap shoot to get the native keyboard awareness functionality of ScrollView working. For my Android app, it works perfectly in one screen that is nearly identical as the other for which doesn't work. And on iOS, it just doesn't work. This is what's working for me: ``` import { Keyboard, ScrollView, StyleSheet, ...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
Night Fury's answer is pretty good, though wouldn't fuss with the ScrollView's `contentOffset`, I'd use the `ScrollResponder`: ```jsx render() { return ( <ScrollView ref="myScrollView"> <TextInput ref="myInput" onFocus={this._scrollToInput.bind(this)} /> </ScrollView> ); } _scr...
And another solution, working with RN 0.2, this time instead of squashing the content it scrolls. ``` inputFocused: function(ref) { this._scroll(ref, 75); }, inputBlurred: function(ref) { this._scroll(ref, 0); }, _scroll: function(ref, offset) { setTimeout(() => { var scrollResponder = this.refs.m...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
In 2017 (RN 0.43) there is special component for this: [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview)
You can use [ScrollView](https://facebook.github.io/react-native/docs/scrollview.html) to control screen up and down movements. As long as user hasn't focused any `TextInput`, you can [disable scroll](https://facebook.github.io/react-native/docs/scrollview.html#scrollenabled). On focus, just shift up the scrollview usi...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
In 2017 (RN 0.43) there is special component for this: [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview)
Night Fury's answer is pretty good, though wouldn't fuss with the ScrollView's `contentOffset`, I'd use the `ScrollResponder`: ```jsx render() { return ( <ScrollView ref="myScrollView"> <TextInput ref="myInput" onFocus={this._scrollToInput.bind(this)} /> </ScrollView> ); } _scr...
30,546,742
I have a login screen created using react-native. How can I shift my screen up when the user is typing in the textInput? Do I listen to the onFocus() event and use css styling to change the style of the view?
2015/05/30
[ "https://Stackoverflow.com/questions/30546742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2023657/" ]
In 2017 (RN 0.43) there is special component for this: [KeyboardAvoidingView](https://reactnative.dev/docs/keyboardavoidingview)
It's a crap shoot to get the native keyboard awareness functionality of ScrollView working. For my Android app, it works perfectly in one screen that is nearly identical as the other for which doesn't work. And on iOS, it just doesn't work. This is what's working for me: ``` import { Keyboard, ScrollView, StyleSheet, ...
52,467,285
In my *render()* I have the following component with event handling. ``` render() { ... <input type="text" onChange={(_) => { this.restate("email", _.target.value); }} /> } private restate(type: string, input: any) { ... if (type === "email") this.setState({ ... }); } ``` This works and behaves as...
2018/09/23
[ "https://Stackoverflow.com/questions/52467285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8744999/" ]
To build up on [SPY\_me's answer](https://stackoverflow.com/a/61668448/14769872), here is my solution if you're using Gradle: ``` repositories { // ... maven { name = 'minecraft-repo' url = 'https://libraries.minecraft.net/' // this lets gradle know where to look for authlib } } de...
Since you use Intellij i guess youre using Maven? If so then paste this in your pom.yml: ```html <repositories> <repository> <id>spigot-repo</id> <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url> </repository> </repositories> <dependencies...
52,467,285
In my *render()* I have the following component with event handling. ``` render() { ... <input type="text" onChange={(_) => { this.restate("email", _.target.value); }} /> } private restate(type: string, input: any) { ... if (type === "email") this.setState({ ... }); } ``` This works and behaves as...
2018/09/23
[ "https://Stackoverflow.com/questions/52467285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8744999/" ]
To build up on [SPY\_me's answer](https://stackoverflow.com/a/61668448/14769872), here is my solution if you're using Gradle: ``` repositories { // ... maven { name = 'minecraft-repo' url = 'https://libraries.minecraft.net/' // this lets gradle know where to look for authlib } } de...
```html <repositories> <repository> <id>minecraft-repo</id> <url>https://libraries.minecraft.net/</url> </repository> </repositories> <dependencies> <dependency> <groupId>com.mojang</groupId> <artifactId>authlib</artifactId> ...
62,425,641
I am trying to find 5th highest salary in bigquery using this query but it gives me error `LEFT OUTER JOIN cannot be used without a condition that is an equality of fields from both sides of the join.` I believe this is the right query for sql for this question but something is not working out in bigquery. Can anybo...
2020/06/17
[ "https://Stackoverflow.com/questions/62425641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4444871/" ]
Your query appears to be returning rows that have four larger salaries. That would be the fifth largest salary. So, just use `dense_rank()`: ``` select w.* from (select w.*, dense_rank() over (order by salary desc) as seqnum from `table` w ) w where seqnum = 5; ```
Below is for BigQuery Standard SQL Using functions like DENSE\_RANK(), ROW\_NUMBER() and such for big volumes of data usually ends up with some thing like Resource Limits Exceeded error. Depends on your real use case - you can consider below alternatives: ``` #standardSQL SELECT * FROM `project.dataset.table` ORD...
9,338,291
In Chrome, when I type `console.log` in the one below: ``` console.log("A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter"); ``` ...it prints it correctly, with no errors or w...
2012/02/18
[ "https://Stackoverflow.com/questions/9338291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/824294/" ]
Functions can access an array-like object called `arguments` that contains all the arguments that they received ``` function print_my_arguments(/**/){ var args = arguments; for(var i=0; i<args.length; i++){ console.log(args[i]); } }; ``` And you can do the opposite conversion (call a function giv...
You can use the arguments array: [jsfiddle.net/kUnJ2/](http://jsfiddle.net/kUnJ2/) ``` function foo() { for (var i = 0; i < arguments.length; i++) { document.body.innerHTML += arguments[i]; } } foo("There ", "are ", "as ", "much ", "arguments ", "as ", "you ", "want."); ```
9,338,291
In Chrome, when I type `console.log` in the one below: ``` console.log("A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter"); ``` ...it prints it correctly, with no errors or w...
2012/02/18
[ "https://Stackoverflow.com/questions/9338291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/824294/" ]
Functions can access an array-like object called `arguments` that contains all the arguments that they received ``` function print_my_arguments(/**/){ var args = arguments; for(var i=0; i<args.length; i++){ console.log(args[i]); } }; ``` And you can do the opposite conversion (call a function giv...
The modern way of doing this is using [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters): ```js function printArguments(...args) { args.forEach((arg, index) => { console.log(`Argument ${index}:`, arg); }); } printArguments('hello', true, new Date());...
9,338,291
In Chrome, when I type `console.log` in the one below: ``` console.log("A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter", "A parameter"); ``` ...it prints it correctly, with no errors or w...
2012/02/18
[ "https://Stackoverflow.com/questions/9338291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/824294/" ]
The modern way of doing this is using [rest parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters): ```js function printArguments(...args) { args.forEach((arg, index) => { console.log(`Argument ${index}:`, arg); }); } printArguments('hello', true, new Date());...
You can use the arguments array: [jsfiddle.net/kUnJ2/](http://jsfiddle.net/kUnJ2/) ``` function foo() { for (var i = 0; i < arguments.length; i++) { document.body.innerHTML += arguments[i]; } } foo("There ", "are ", "as ", "much ", "arguments ", "as ", "you ", "want."); ```
26,000,333
I am trying to create a post an issue to redmine using their API. They say that I should use this format. <http://www.redmine.org/projects/redmine/wiki/Rest_api_with_ruby> Here is my code. ``` issue = Issue.new( :subject => 'Feedback', :assigned_to_id => 1, :project_id => 1, :description => $description, :...
2014/09/23
[ "https://Stackoverflow.com/questions/26000333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2760131/" ]
> > How do I designate a pool of the SSH actors that is separate from the actors Spray uses to handle HTTP requests? > > > You can create a [custom dispatcher](http://doc.akka.io/docs/akka/snapshot/scala/dispatchers.html) for this group of actors. > > These connections take a long time (1 - 3 minutes) to set up...
For posterity here is the solution I ended up going with. I define a router actor. This automatically creates instances of my ssh-actors and routes messages to them. I also tell that actor to use a PinnedDispatcher. This dispatcher says that each actor in my router will be run on it's own thread and stay there, which i...
8,391
`Fatal error: Uncaught RuntimeException: Request have return error: Method not found; Request: {"jsonrpc":"2.0","method":"getblockcount","params":null,"id":1}; in jsonRPCClient.php:166` I don't know what to do. I started monero-wallet-rpc on the port and configured the example.php with port, localhost, username and pas...
2018/05/20
[ "https://monero.stackexchange.com/questions/8391", "https://monero.stackexchange.com", "https://monero.stackexchange.com/users/7662/" ]
getblockcount is a daemon RPC, but you mention monero-wallet-rpc mostly. It is likely you are trying to call this RPC on the wallet, not on the daemon, and the wallet rightfully errors out.
Try params:{} maybe. This one works for me: `curl -X POST http://127.0.0.1:28081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"getblockcount","params":{}}' -H 'Content-Type: application/json'` `{ "id": "0", "jsonrpc": "2.0", "result": { "count": 1097471, "status": "OK" }`
8,391
`Fatal error: Uncaught RuntimeException: Request have return error: Method not found; Request: {"jsonrpc":"2.0","method":"getblockcount","params":null,"id":1}; in jsonRPCClient.php:166` I don't know what to do. I started monero-wallet-rpc on the port and configured the example.php with port, localhost, username and pas...
2018/05/20
[ "https://monero.stackexchange.com/questions/8391", "https://monero.stackexchange.com", "https://monero.stackexchange.com/users/7662/" ]
getblockcount is a daemon RPC, but you mention monero-wallet-rpc mostly. It is likely you are trying to call this RPC on the wallet, not on the daemon, and the wallet rightfully errors out.
Have you try `"id": "0"` instead of `"id": "1"` From the [deamon RPC dev guide](https://getmonero.org/resources/developer-guides/daemon-rpc.html#get_block_count) (up to date): ``` curl -X POST http://127.0.0.1:18081/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_block_count"}' -H 'Content-Type: application/json'...
420,302
How can I test a DC car blower motor with an external resistor? (note that there is an existing question about testing DC motors, but the assumption there is that it has an internal resistor, and it also assumes the tester has access to a "good" motor or a schematic, which I do not) The motor has two terminals on it a...
2019/02/03
[ "https://electronics.stackexchange.com/questions/420302", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/39947/" ]
The resistor is used for voltage reduction to the DC motor in your car fan. The power dissipated in the resistor can be calculated from \$ P = \frac {V^2}{R} \$ or \$ P = I^2 R \$. The resistor needs to be able to radiate this heat away without getting so hot that it melts nearby plastic components or setting itself on...
If that was only one effective resistor it would only need two wires. It has several connections matched to the number of speeds available for the heater, 3 or possibly 4, which is why it is so large also due to the current it has to pass.
420,302
How can I test a DC car blower motor with an external resistor? (note that there is an existing question about testing DC motors, but the assumption there is that it has an internal resistor, and it also assumes the tester has access to a "good" motor or a schematic, which I do not) The motor has two terminals on it a...
2019/02/03
[ "https://electronics.stackexchange.com/questions/420302", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/39947/" ]
The V70 is 25+ year-old design so it uses fairly primitive methods. A *series* resistor (switched for selection) is an acceptable way if controlling speed of a brushed DC motor driving a blower load. The worst case dissipation of such a resistor is half the motor full power consumption, but the designers also have to c...
If that was only one effective resistor it would only need two wires. It has several connections matched to the number of speeds available for the heater, 3 or possibly 4, which is why it is so large also due to the current it has to pass.
57,416,968
What is the most efficient way to accomplish this task. I know of lots of ways to get it to do what I want with either doing something in the where clause or making a subquery, but I do not know which way is the best. I have this simple query (my real query is much more complex so that is why this is important but the...
2019/08/08
[ "https://Stackoverflow.com/questions/57416968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Two options come to mind: ``` where rc.from_date is not null and rc_to_date is not null ``` However, the `NULL` values are probably being created by the `LEFT JOIN`s. I would suggest replacing them with `INNER JOIN`. If the `NULL` values are in the original table, then both change the `LEFT JOIN` to `INNER JOIN` an...
You can add the filter in your join statement, which should narrow down the results from the second table. ``` LEFT JOIN [JMNYC-AMTDB].[AMTPLUS].[dbo].Royalty_By_Customer RC WITH (NOLOCK) on S.Company_Code = RC.Company_Code and S.Division_Code...
2,263,784
Need to execute the below winzip command in a java program. ``` C:\Program Files\WinZip>winzip32 -a -s"password" C:\abc.zip C:\abc.doc ```
2010/02/15
[ "https://Stackoverflow.com/questions/2263784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/226964/" ]
Use [`Runtime#exec()`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#exec(java.lang.String)) ([tutorial here](http://web.archive.org/web/20090806070132/http://java.sun.com/developer/JDCTechTips/2003/tt0304.html), [caveats here](http://web.archive.org/web/20100203124517/http://www.j...
You can simple use [Runtime.exec()](http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String[])); ``` String[] cmd = {"C:\\Program Files\\WinZip\\winzip32", "-a", "-s", "password", "C:\\abc.zip", "C:\\abc.doc"}; Runtime.getRuntime().exec(cmd); ```
2,263,784
Need to execute the below winzip command in a java program. ``` C:\Program Files\WinZip>winzip32 -a -s"password" C:\abc.zip C:\abc.doc ```
2010/02/15
[ "https://Stackoverflow.com/questions/2263784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/226964/" ]
You can simple use [Runtime.exec()](http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String[])); ``` String[] cmd = {"C:\\Program Files\\WinZip\\winzip32", "-a", "-s", "password", "C:\\abc.zip", "C:\\abc.doc"}; Runtime.getRuntime().exec(cmd); ```
Taking a look around the internet, would this do what you're looking for: <https://truezip.dev.java.net/> without having to rely on an external install of WinZip which may or may not exist on the end user system? Just a suggestion.
2,263,784
Need to execute the below winzip command in a java program. ``` C:\Program Files\WinZip>winzip32 -a -s"password" C:\abc.zip C:\abc.doc ```
2010/02/15
[ "https://Stackoverflow.com/questions/2263784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/226964/" ]
Use [`Runtime#exec()`](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Runtime.html#exec(java.lang.String)) ([tutorial here](http://web.archive.org/web/20090806070132/http://java.sun.com/developer/JDCTechTips/2003/tt0304.html), [caveats here](http://web.archive.org/web/20100203124517/http://www.j...
Taking a look around the internet, would this do what you're looking for: <https://truezip.dev.java.net/> without having to rely on an external install of WinZip which may or may not exist on the end user system? Just a suggestion.
13,562,233
I have a project where I use a `NavigationController` as a detailed view for my `SplitViewController`. So when the app shows up, everything is fine in both orientations. However as soon as i push a view inside my navigation controller, if i'm in portrait mode my button to 'show master view' (uisplitview delegate) will...
2012/11/26
[ "https://Stackoverflow.com/questions/13562233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1729268/" ]
You can do it with a UIToolbar. You must first hide the navigationbar and place a UiToolbar on the top of the view. Now you can add as buttons as you want. ``` UIToolbar *tools = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 20, 1036, 42)]; tools.barStyle = UIBarStyleBlackTranslucent; NSMutableArray* but...
You simply can't do that with a regular `UINavigationBar`. You'd have to place your "show master view" button somewhere else - e.g. in a `UIToolbar` at the bottom of your detail view. Or you could code your own NavigationController and NavigationBar, but that's a bit more work. :)
136,759
I would like to merge specific columns from two txt files containing varying number of rows, but same number of columns (as shown below): ``` file1: xyz desc1 12 uvw desc2 55 pqr desc3 12 file2: xyz desc1 56 uvw desc2 88 Preferred output: xyz desc1 12 56 uvw desc2 55 ...
2014/06/12
[ "https://unix.stackexchange.com/questions/136759", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/66134/" ]
If column-order is important, i.e. numbers from the same file should be kept in the same column, you need to add padding while reading the different files. Here is one way that works with GNU awk: *merge.awk* ```awk # Set k to be a shorthand for the key { k = $1 SUBSEP $2 } # First element with this key, add zeros t...
Try this: ``` $ awk ' FNR == NR { a[$1,$2] = $3; next } { print $0,(($1,$2) in a) ? a[$1,$2] : "0" } ' file2 file1 xyz desc1 12 56 uvw desc2 55 88 pqr desc3 12 0 ```
136,759
I would like to merge specific columns from two txt files containing varying number of rows, but same number of columns (as shown below): ``` file1: xyz desc1 12 uvw desc2 55 pqr desc3 12 file2: xyz desc1 56 uvw desc2 88 Preferred output: xyz desc1 12 56 uvw desc2 55 ...
2014/06/12
[ "https://unix.stackexchange.com/questions/136759", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/66134/" ]
If column-order is important, i.e. numbers from the same file should be kept in the same column, you need to add padding while reading the different files. Here is one way that works with GNU awk: *merge.awk* ```awk # Set k to be a shorthand for the key { k = $1 SUBSEP $2 } # First element with this key, add zeros t...
This is a bit long, but works: ``` $ cat file1 file2 | awk '{a[$1FS$2]=a[$1FS$2]FS$3; b[$1FS$2]++} END {for (i in b) max=max<b[i]?b[i]:max; for (i in a) {printf "%s %s", i, a[i]; for (j=b[i]; j<max; j++) printf "%s0", FS printf "%s", RS}}' pqr desc3 12 0 xyz desc1 12 56 uvw desc2 55 88 ``` The awk block can be ...
9,230,451
We are working on shopping cart website with more than 1 lakh products, made on the top of popular e-commerce application - NopCommerce version 2.3 (Just to introduce you to NopCommerce - It's a one of the best & popular open source e-commerce application built on the top of ASP.net version 4 and MVC3.). The site was p...
2012/02/10
[ "https://Stackoverflow.com/questions/9230451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202349/" ]
Question 1: What all is running on this box? If I read correctly, you have one site with 50,000 products (no mention of users or hits) and another with lots more. As you stack sites, you will see some degredation, even if your code is very tight. Question 2: Do you have all layers on a single box? You now have competi...
The answer to database "problems" is fix your poorly designed database. Database "problems" are not a fundamental problem with the ability of databases. It is a problem with your design. Fixes come in many forms, but it's always the answer. Database "problems" are always the same of many different flavors of problems....
9,230,451
We are working on shopping cart website with more than 1 lakh products, made on the top of popular e-commerce application - NopCommerce version 2.3 (Just to introduce you to NopCommerce - It's a one of the best & popular open source e-commerce application built on the top of ASP.net version 4 and MVC3.). The site was p...
2012/02/10
[ "https://Stackoverflow.com/questions/9230451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1202349/" ]
Since you are having CPU issues, I suspect deserialization is the main culprit. In that case, you can make serialization, deserialization nearly 100 times faster by implementing `ISerializable` interface yourself. I have used this technique before for large object graph and the improvement was phenomenal. Say you hav...
The answer to database "problems" is fix your poorly designed database. Database "problems" are not a fundamental problem with the ability of databases. It is a problem with your design. Fixes come in many forms, but it's always the answer. Database "problems" are always the same of many different flavors of problems....
50,089,376
I want to order 4 letters, [a,b,c,d]. I'll ask some question to the user about some of the letters, and depending on his answers, I build the final order. My problem is, if I had 2 rules that looked like this: ``` (defrule rule_1 => (assert (1-a)) ) ``` and ``` (defrule rule_2 => (assert (2-a)) ) ``` a...
2018/04/29
[ "https://Stackoverflow.com/questions/50089376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806754/" ]
Woocommerce stores attributes in the table `wp_woocommerce_attribute_taxonomies`. Querying the database directly is not recommended but I was able to get the attribute ID using this code: ``` global $wpdb; $attribute_id = $wpdb->get_var("select attribute_id from {$wpdb->prefix}woocommerce_attribute_taxonomies where at...
You can use that > > > > > > woocommerce\_get\_product\_terms > > > > > > or > > > > > > get\_the\_terms() > > > > > > > > > <https://developer.wordpress.org/reference/functions/get_the_terms/> ``` global $product; $id = $product->get_id(); ```
50,089,376
I want to order 4 letters, [a,b,c,d]. I'll ask some question to the user about some of the letters, and depending on his answers, I build the final order. My problem is, if I had 2 rules that looked like this: ``` (defrule rule_1 => (assert (1-a)) ) ``` and ``` (defrule rule_2 => (assert (2-a)) ) ``` a...
2018/04/29
[ "https://Stackoverflow.com/questions/50089376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806754/" ]
You can use `wc_attribute_taxonomy_id_by_name($taxonomy_name)`.
You can use that > > > > > > woocommerce\_get\_product\_terms > > > > > > or > > > > > > get\_the\_terms() > > > > > > > > > <https://developer.wordpress.org/reference/functions/get_the_terms/> ``` global $product; $id = $product->get_id(); ```
50,089,376
I want to order 4 letters, [a,b,c,d]. I'll ask some question to the user about some of the letters, and depending on his answers, I build the final order. My problem is, if I had 2 rules that looked like this: ``` (defrule rule_1 => (assert (1-a)) ) ``` and ``` (defrule rule_2 => (assert (2-a)) ) ``` a...
2018/04/29
[ "https://Stackoverflow.com/questions/50089376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4806754/" ]
You can use `wc_attribute_taxonomy_id_by_name($taxonomy_name)`.
Woocommerce stores attributes in the table `wp_woocommerce_attribute_taxonomies`. Querying the database directly is not recommended but I was able to get the attribute ID using this code: ``` global $wpdb; $attribute_id = $wpdb->get_var("select attribute_id from {$wpdb->prefix}woocommerce_attribute_taxonomies where at...
89,064
So I was perusing through the suggested edit queue and came across this suggestion: <https://stackoverflow.com/suggested-edits/37540> I saw the suggestion as a change from a broken link, to a personal blog which is not the sort of changes we should be allowing AFAIK so I rejected it. However immediately after rejecti...
2011/04/28
[ "https://meta.stackexchange.com/questions/89064", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/150562/" ]
Please have a look at the user profiles. They have the same name, but different ID's. This user probably has created a second account by mistake.
It's not the same account. Now that the edit is approved one has 3 rep, the other 1.
121,858
In the early 1990s, local television network affiliates across North America aired this promotional advertisement for *The Next Generation*, featuring a song sung to the tune of Billy Joel's "We Didn't Start the Fire": > > Jean-Luc, Geordi's specs > > Mysteries on the holodecks > > Asteroids, triple droids ...
2016/03/11
[ "https://scifi.stackexchange.com/questions/121858", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/40294/" ]
As Xantec noted and Richard provided a link in the comments above, Voyager used modified Borg several times: > > In 2374, The Doctor was able to modify nanoprobes as an offensive weapon against Species 8472. He reprogrammed them to mimic the alien cells' electrochemical signatures, so that they could evade detection ...
They have... on several occasions in Voyager. * They used Seven-of-Nine's nanoprobes to revive Neelix when he was killed by a protomatter cloud discharge in [VOY: Mortal Coil](https://memory-alpha.fandom.com/wiki/Mortal_Coil_(episode)) * They again used her nanoprobes to 'arrest' the alcohol particles and make an alie...