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 |
|---|---|---|---|---|---|
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | This is made tricky because of the DoubleClick event. There are a few ways to do this:
1. Handle the double-click event in code behind, and then manually invoke a command/method on your ViewModel
2. Use an attached behavior to route the [DoubleClick event to your Command](https://stackoverflow.com/questions/4629862/at... | I recently needed to trigger an `ICommand` upon double clicking a `ListBoxItem` as well.
Personally, I don't like the `DataTemplate` method as it is binding to the content inside the `ListBoxItem` container, and not the container itself. I've opted to use an Attached Property to assign an `InputBinding` on the contain... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | Unfortunately, only `ButtonBase` derived controls have the possibility for binding `ICommand` objects to their `Command` properties (for the `Click` event).
However, you can use an API provided by Blend to map an event (like in your case `MouseDoubleClick` on the `ListBox`) to an `ICommand` object.
```
<ListBox>
... | This is a bit of a hack, but it works well and allows you to use commands and avoid code behind. This also has the added benefit of not triggering the command when you double-click (or whatever your trigger is) in the empty `ScrollView` area assuming your `ListBoxItems` don't fill the entire container.
Basically, just... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | **EDIT:** I wrote this post as an inexperienced WPF developer, nowadays I'd either use a framework that provides event to command binding, or simply use a button and restyle it. Of course for maximum flexibility this is maybe better.
I find the best way to do this is to create a simple user control wrapper for my cont... | I recently needed to trigger an `ICommand` upon double clicking a `ListBoxItem` as well.
Personally, I don't like the `DataTemplate` method as it is binding to the content inside the `ListBoxItem` container, and not the container itself. I've opted to use an Attached Property to assign an `InputBinding` on the contain... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | **EDIT:** I wrote this post as an inexperienced WPF developer, nowadays I'd either use a framework that provides event to command binding, or simply use a button and restyle it. Of course for maximum flexibility this is maybe better.
I find the best way to do this is to create a simple user control wrapper for my cont... | This is a bit of a hack, but it works well and allows you to use commands and avoid code behind. This also has the added benefit of not triggering the command when you double-click (or whatever your trigger is) in the empty `ScrollView` area assuming your `ListBoxItems` don't fill the entire container.
Basically, just... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | This is made tricky because of the DoubleClick event. There are a few ways to do this:
1. Handle the double-click event in code behind, and then manually invoke a command/method on your ViewModel
2. Use an attached behavior to route the [DoubleClick event to your Command](https://stackoverflow.com/questions/4629862/at... | This is a bit of a hack, but it works well and allows you to use commands and avoid code behind. This also has the added benefit of not triggering the command when you double-click (or whatever your trigger is) in the empty `ScrollView` area assuming your `ListBoxItems` don't fill the entire container.
Basically, just... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | **EDIT:** I wrote this post as an inexperienced WPF developer, nowadays I'd either use a framework that provides event to command binding, or simply use a button and restyle it. Of course for maximum flexibility this is maybe better.
I find the best way to do this is to create a simple user control wrapper for my cont... | If you're looking for a nice simple solution that uses interactions instead of mucking about with user controls, code behind, input bindings, custom attached properties, etc.
And you want something that works at the ListBoxItem level, i.e. not ListBox level as per the (incorrectly) accepted solution.
Then here's a sn... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | Unfortunately, only `ButtonBase` derived controls have the possibility for binding `ICommand` objects to their `Command` properties (for the `Click` event).
However, you can use an API provided by Blend to map an event (like in your case `MouseDoubleClick` on the `ListBox`) to an `ICommand` object.
```
<ListBox>
... | If you're looking for a nice simple solution that uses interactions instead of mucking about with user controls, code behind, input bindings, custom attached properties, etc.
And you want something that works at the ListBoxItem level, i.e. not ListBox level as per the (incorrectly) accepted solution.
Then here's a sn... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | Unfortunately, only `ButtonBase` derived controls have the possibility for binding `ICommand` objects to their `Command` properties (for the `Click` event).
However, you can use an API provided by Blend to map an event (like in your case `MouseDoubleClick` on the `ListBox`) to an `ICommand` object.
```
<ListBox>
... | This is made tricky because of the DoubleClick event. There are a few ways to do this:
1. Handle the double-click event in code behind, and then manually invoke a command/method on your ViewModel
2. Use an attached behavior to route the [DoubleClick event to your Command](https://stackoverflow.com/questions/4629862/at... |
5,545,188 | I need to use a WebView to load certain webpages and dynamically change the css before showing them to the user (which means I have to delete all `<link>` tags and append the one with my css). (Why? Because I want to adapt the look of a particular site - which is not mine - for smartphones)
Now, I've seen that similar... | 2011/04/04 | [
"https://Stackoverflow.com/questions/5545188",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/620142/"
] | This is made tricky because of the DoubleClick event. There are a few ways to do this:
1. Handle the double-click event in code behind, and then manually invoke a command/method on your ViewModel
2. Use an attached behavior to route the [DoubleClick event to your Command](https://stackoverflow.com/questions/4629862/at... | If you're looking for a nice simple solution that uses interactions instead of mucking about with user controls, code behind, input bindings, custom attached properties, etc.
And you want something that works at the ListBoxItem level, i.e. not ListBox level as per the (incorrectly) accepted solution.
Then here's a sn... |
16,532,697 | Recently, I came across a problem in someone's programming class. It asked them to compute a square root using only integers; they were to use one integer to represent the part before the decimal point and another integer to represent the part after the decimal point. The problem said that using floating point numbers ... | 2013/05/13 | [
"https://Stackoverflow.com/questions/16532697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2379613/"
] | Let's say your original number is `x`.
1. Finding part before decimal point is easy - just find the maximal number, which square is less or equal to the original number.
2. Multiply original number by 100 and the integer part of sqrt by 10. Add 1 to it until it's less or equal to `100x`. Do it `n` times and divide by ... | Assume you have an algorithm that creates two integers `A` and `B` so that the ratio `A / B` gives you your desired approximation to the square root to the appropriate number of decimal places. Then, the two numbers you want will be:
* The integer part is `(A - (A % B)) / B`.
* The fractional part: Let `X` be `A % B`.... |
16,532,697 | Recently, I came across a problem in someone's programming class. It asked them to compute a square root using only integers; they were to use one integer to represent the part before the decimal point and another integer to represent the part after the decimal point. The problem said that using floating point numbers ... | 2013/05/13 | [
"https://Stackoverflow.com/questions/16532697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2379613/"
] | Let's say your original number is `x`.
1. Finding part before decimal point is easy - just find the maximal number, which square is less or equal to the original number.
2. Multiply original number by 100 and the integer part of sqrt by 10. Add 1 to it until it's less or equal to `100x`. Do it `n` times and divide by ... | In pseudo-code it would be something like this:
```
int whole_ans = sqrt(num); //stores final answer integer part
int dec_ans; //stores final answer decimal part
int num_of_decimals = x //x is equal to the number of decimal places you want the answer to be
int targetNum = (num - (whole_ans^2)) * 100; //initialize ... |
16,532,697 | Recently, I came across a problem in someone's programming class. It asked them to compute a square root using only integers; they were to use one integer to represent the part before the decimal point and another integer to represent the part after the decimal point. The problem said that using floating point numbers ... | 2013/05/13 | [
"https://Stackoverflow.com/questions/16532697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2379613/"
] | Let's say your original number is `x`.
1. Finding part before decimal point is easy - just find the maximal number, which square is less or equal to the original number.
2. Multiply original number by 100 and the integer part of sqrt by 10. Add 1 to it until it's less or equal to `100x`. Do it `n` times and divide by ... | Suppose you want to compute the square root of 123.4567.
Then all you have to do is shift the decimal point far enough to the right to get an integer radicand -- in this example, four places -- and so, the following is true:
`sqrt(123.4567) = (1/100) * sqrt(1234567)`
That is, all you need to know is how to find the ... |
16,532,697 | Recently, I came across a problem in someone's programming class. It asked them to compute a square root using only integers; they were to use one integer to represent the part before the decimal point and another integer to represent the part after the decimal point. The problem said that using floating point numbers ... | 2013/05/13 | [
"https://Stackoverflow.com/questions/16532697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2379613/"
] | Let's say your original number is `x`.
1. Finding part before decimal point is easy - just find the maximal number, which square is less or equal to the original number.
2. Multiply original number by 100 and the integer part of sqrt by 10. Add 1 to it until it's less or equal to `100x`. Do it `n` times and divide by ... | I believe a modified form of binary search is what will help you achieve that.
Let me elaborate that in c code.
`int square_number = findSquareRootFloor(GivenValue);`
```c
int findSquareRootFloor(int number)
{
int low = 0;
int high = number;
int mid = 0;
while (low <= high)
{
int mid = (hi... |
11,776,737 | How can I access default iOS sound (Tri-tone, Chime, Glass, Horn, Bell, Electronic...) to set it as local notification sound?
I've created local notification, everything works but with default sound (which is Tri-tone). I want to use Chime or another
I only know how to use my own sound files:
```
localNotif.soundNam... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776737",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1367471/"
] | check out [this](http://iphonedevwiki.net/index.php/AudioServices) site.
If you want to play a Default System Sound. refer a following code, but private Frameworks. you will be rejected.
```
AudioServicesPlaySystemSound(1004);
```
and check out other [this](https://developer.apple.com/library/ios/#samplecode/SysSou... | Audio services are not private. The methods are documented in the developers reference guide and referenced in the [Multimedia Programming guide](http://developer.apple.com/library/ios/documentation/AudioToolbox/Reference/SystemSoundServicesReference/Reference/reference.html).
All you need to do if figure out the refe... |
11,776,737 | How can I access default iOS sound (Tri-tone, Chime, Glass, Horn, Bell, Electronic...) to set it as local notification sound?
I've created local notification, everything works but with default sound (which is Tri-tone). I want to use Chime or another
I only know how to use my own sound files:
```
localNotif.soundNam... | 2012/08/02 | [
"https://Stackoverflow.com/questions/11776737",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1367471/"
] | check out [this](http://iphonedevwiki.net/index.php/AudioServices) site.
If you want to play a Default System Sound. refer a following code, but private Frameworks. you will be rejected.
```
AudioServicesPlaySystemSound(1004);
```
and check out other [this](https://developer.apple.com/library/ios/#samplecode/SysSou... | System sounds are not available you your app, unfortunately. From [the docs](http://developer.apple.com/library/ios/DOCUMENTATION/AudioToolbox/Reference/SystemSoundServicesReference/Reference/reference.html#//apple_ref/doc/uid/TP40007916-CH3-SW8):
>
> Note: System-supplied alert sounds and system-supplied user-interf... |
61,742,942 | My file is formatted like this:
```
2106 2002 27 26 1
1 0.000000 0.000000
2 0.389610 0.000000
3 0.779221 0.000000
4 1.168831 0.000000
5 1.558442 0.000000
6 1.948052 0.000000
7 2.337662 0.000000
8 2.727273 0.000000
9 3.116883 0.000000
10 3.506494 0.000000
```... | 2020/05/12 | [
"https://Stackoverflow.com/questions/61742942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12323013/"
] | For this kind of query keep the joins out of it... you're not looking to *join* the information, you just want to aggregate it, and use it for filtering. I find sub-queries far more straight-forward in such situations e.g.
```
select ID, (FName + ' ' + LName) as [Name], ReviewDate, Email
from (
select ID, Supervisor... | use window function `row_number()`.
```
select
ID,
Name,
ReviewDate,
Email
from
(
SELECT
Employee.ID,
(FName + ' ' + LName) as Name,
Review.ReviewDate,
Email,
row_number() over (partition by Employee.ID order by convert(date, Review.ReviewDate) desc) as ... |
61,742,942 | My file is formatted like this:
```
2106 2002 27 26 1
1 0.000000 0.000000
2 0.389610 0.000000
3 0.779221 0.000000
4 1.168831 0.000000
5 1.558442 0.000000
6 1.948052 0.000000
7 2.337662 0.000000
8 2.727273 0.000000
9 3.116883 0.000000
10 3.506494 0.000000
```... | 2020/05/12 | [
"https://Stackoverflow.com/questions/61742942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12323013/"
] | For this kind of query keep the joins out of it... you're not looking to *join* the information, you just want to aggregate it, and use it for filtering. I find sub-queries far more straight-forward in such situations e.g.
```
select ID, (FName + ' ' + LName) as [Name], ReviewDate, Email
from (
select ID, Supervisor... | I have prepared sample data and tested in SQL Server.
```sql
DECLARE @employee table(Id int, FName varchar(30), LName varchar(30), Email varchar(255),SuperVisorId int)
Declare @review table (ID int, PerfomanceRating varchar(30), Comment varchar(30), ReviewDate datetime2, EmployeeID int)
insert into @employee VALUES(1... |
181,941 | I am writing a code to loop through all the files in a folder and reproject them, using a raster as the spatial reference. I have a suspicion that there is a different way to get the coordinate system from a raster. This is my code so far:
```
#Import system modules
import arcpy
import os
#Set environment
arcpy.env.... | 2016/02/23 | [
"https://gis.stackexchange.com/questions/181941",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/65352/"
] | Thank you to everyone who helped me with this. I ended up creating a spatial reference object from the raster. What eventually worked was this:
```
#Set raster as basis for coordinate system
base = "D:/Project/Data/Development.tif"
sr = arcpy.CreateSpatialReference_management("", base)
#Loop through shapefiles in... | if the `out_coor_system` is giving you an object, wouldn't you need to specify something like `out_coor_system.name`? because projections are specified by giving the projection name in the `arc.Project_management` args.I don't think the function is able to evaluate the object as it stands now. |
181,941 | I am writing a code to loop through all the files in a folder and reproject them, using a raster as the spatial reference. I have a suspicion that there is a different way to get the coordinate system from a raster. This is my code so far:
```
#Import system modules
import arcpy
import os
#Set environment
arcpy.env.... | 2016/02/23 | [
"https://gis.stackexchange.com/questions/181941",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/65352/"
] | Thank you to everyone who helped me with this. I ended up creating a spatial reference object from the raster. What eventually worked was this:
```
#Set raster as basis for coordinate system
base = "D:/Project/Data/Development.tif"
sr = arcpy.CreateSpatialReference_management("", base)
#Loop through shapefiles in... | This worked for me:
```
out_coor_system = arcpy.Describe(base).spatialReference
``` |
181,941 | I am writing a code to loop through all the files in a folder and reproject them, using a raster as the spatial reference. I have a suspicion that there is a different way to get the coordinate system from a raster. This is my code so far:
```
#Import system modules
import arcpy
import os
#Set environment
arcpy.env.... | 2016/02/23 | [
"https://gis.stackexchange.com/questions/181941",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/65352/"
] | Thank you to everyone who helped me with this. I ended up creating a spatial reference object from the raster. What eventually worked was this:
```
#Set raster as basis for coordinate system
base = "D:/Project/Data/Development.tif"
sr = arcpy.CreateSpatialReference_management("", base)
#Loop through shapefiles in... | You're codes not quite right. You're trying to create a `spatial reference` object from a `describe` object. Here's a fix:
```
#Set raster as basis for coordinate system
base = "D:/Project/Data/Development.tif"
out_coor_system = arcpy.Describe (base).spatialReference
#Loop through shapefiles in fileList and reproject... |
17,102,466 | I have an `ArrayList<UIToto>`, each `UIToto` contains
```
(String id, String name, String info)
```
For example
```
(4546-fdsf4545sfd-dfs545, titi, female)
(dqs4d65q4-45d4s54545sfd-dfss54545, tutu, male)
```
I have a list of ids like
```
String ids = "dqs4d65q4-45d4s54545sfd-dfss54545, 4545-dsqd45-dqs,4d5s44-... | 2013/06/14 | [
"https://Stackoverflow.com/questions/17102466",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/936917/"
] | Try
```
ArrayList<UIToto> totoList = retrieveTotoList;
ArrayList<UIToto> resultList= new ArrayList<UIToto>();
String[] ids = {"dqs4d65q4-45d4s54545sfd-dfss54545",
"4545-dsqd45-dqs,4d5s44-ss4-dqsd"};
for(int i = 0; i < ids.length; i++) {
for(UIToto uIToto : totoList) {
if(uIToto.getId()... | Depending on your usecase, a Map with the string-id as key might be more elegant then an arrayList when you need to find an object in a collection based on one of the object's values.
```
public static void main(String argv) {
Map<String, UIToto> totoMap = getTotoMap();
String[] ids = {"dqs4d65q4-45d4s54545sfd... |
67,172,235 | I want create countdown timer in service but the service may killed by system or when user shutdown his phone, What is the best alternative to ensure the continuation of the count under any circumstances? | 2021/04/20 | [
"https://Stackoverflow.com/questions/67172235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7474282/"
] | How about a generic object type?
```js
interface SomeInterface {
...
description: { [key: string]: string | number }
}
const myObj: SomeInterface = {}
console.log(myObj.description.TargetId); //works
```
\***But you will not have any autocomplete** | For the example provided, you can use the `Record` interface.
`Record<string, Record<string, any>>` represents an object with unknown keys, where any one of those keys may contain another object of unknown key-value pairs.
You can change the types in the inner Record, if you can be more specific. For instance, in you... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Yes there is:
```
irb(main):001:0> "TAMILNADU".chars.each_cons(2).map(&:join)
=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
See [the documentation of `Enumerable#each_cons`](http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-each_cons). | Another version:
```
str = "TAMILNADU"
(0...str.size-1).map{|x| str[x,2]}
# => ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Yes there is:
```
irb(main):001:0> "TAMILNADU".chars.each_cons(2).map(&:join)
=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
See [the documentation of `Enumerable#each_cons`](http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-each_cons). | And another one using a positive lookahead:
```
str = 'TAMILNADU'
str.scan(/(.)(?=(.))/).map(&:join)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Yes there is:
```
irb(main):001:0> "TAMILNADU".chars.each_cons(2).map(&:join)
=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
See [the documentation of `Enumerable#each_cons`](http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-each_cons). | Thanks(@Doorknob,@hirolau,@Stefan,@Cary Swoveland) for all of your responses find the benchmark report below.
Updated (Tue - Mar- 2015)
```
require 'benchmark/ips'
Benchmark.ips do |x|
str = "TAMILNADU"
x.report("1") {
pairs=[]
numPairs= str.length()-1
i=0
while i<n... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Yes there is:
```
irb(main):001:0> "TAMILNADU".chars.each_cons(2).map(&:join)
=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
See [the documentation of `Enumerable#each_cons`](http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-each_cons). | Another way using a regex:
```
str.gsub(/(.)/,'\1\1')[1...-1].scan(/../)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
or a variant:
```
str.gsub(/./) { |c| c*2 }[1...-1].scan(/../)
```
Any another:
```
a = []
e = str.each_char
loop do
a << (e.next << e.peek)
end
a
```
Edit: I added the last me... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | And another one using a positive lookahead:
```
str = 'TAMILNADU'
str.scan(/(.)(?=(.))/).map(&:join)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | Another version:
```
str = "TAMILNADU"
(0...str.size-1).map{|x| str[x,2]}
# => ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Another version:
```
str = "TAMILNADU"
(0...str.size-1).map{|x| str[x,2]}
# => ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | Another way using a regex:
```
str.gsub(/(.)/,'\1\1')[1...-1].scan(/../)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
or a variant:
```
str.gsub(/./) { |c| c*2 }[1...-1].scan(/../)
```
Any another:
```
a = []
e = str.each_char
loop do
a << (e.next << e.peek)
end
a
```
Edit: I added the last me... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | And another one using a positive lookahead:
```
str = 'TAMILNADU'
str.scan(/(.)(?=(.))/).map(&:join)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | Thanks(@Doorknob,@hirolau,@Stefan,@Cary Swoveland) for all of your responses find the benchmark report below.
Updated (Tue - Mar- 2015)
```
require 'benchmark/ips'
Benchmark.ips do |x|
str = "TAMILNADU"
x.report("1") {
pairs=[]
numPairs= str.length()-1
i=0
while i<n... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | And another one using a positive lookahead:
```
str = 'TAMILNADU'
str.scan(/(.)(?=(.))/).map(&:join)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | Another way using a regex:
```
str.gsub(/(.)/,'\1\1')[1...-1].scan(/../)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
or a variant:
```
str.gsub(/./) { |c| c*2 }[1...-1].scan(/../)
```
Any another:
```
a = []
e = str.each_char
loop do
a << (e.next << e.peek)
end
a
```
Edit: I added the last me... |
28,941,468 | Is there any better way to slice a word in ruby?
My solution:
```
str="TAMILNADU"
pairs=[]
numPairs= str.length-1
i=0
while i<numPairs do
pairs[i] = str.slice(i,2)
i+=1
end
```
Result
```
["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
``` | 2015/03/09 | [
"https://Stackoverflow.com/questions/28941468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323041/"
] | Thanks(@Doorknob,@hirolau,@Stefan,@Cary Swoveland) for all of your responses find the benchmark report below.
Updated (Tue - Mar- 2015)
```
require 'benchmark/ips'
Benchmark.ips do |x|
str = "TAMILNADU"
x.report("1") {
pairs=[]
numPairs= str.length()-1
i=0
while i<n... | Another way using a regex:
```
str.gsub(/(.)/,'\1\1')[1...-1].scan(/../)
#=> ["TA", "AM", "MI", "IL", "LN", "NA", "AD", "DU"]
```
or a variant:
```
str.gsub(/./) { |c| c*2 }[1...-1].scan(/../)
```
Any another:
```
a = []
e = str.each_char
loop do
a << (e.next << e.peek)
end
a
```
Edit: I added the last me... |
49,428,451 | Sorry, this is tricky for me to find through search
```
<div>
<??>
<??> Question </??> <??> X Y <??>
</??>
<button> Answer 1</button>
<button> Answer 2</button>
<button> Answer 3</button>
</div>
```
Where X and Y are numbers from 0 to 100;
How to stack X on top of Y like a fraction, i... | 2018/03/22 | [
"https://Stackoverflow.com/questions/49428451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1728536/"
] | Try this:
```
<sup>X</sup>⁄<sub>Y</sub>
```
Output:
X⁄Y
Reference: <http://changelog.ca/log/2008/07/01/writing_fractions_in_html> | You can place one number vertically over the other but you need to use CSS in tandem.
Declare in HTML:
```
<p>1 <span class="frac"><sup>X</sup><span>/</span><sub>Y</sub></span>.</p>
```
Then CSS:
```
span.frac {
display: inline-block;
font-size: 50%;
text-align: center;
}
span.frac > sup {
display: block;... |
2,945,794 | >
> Can you give some example of an irrational number that can be proved to be irrational with this theorem?
>
>
>
**Theorem**.
Given $a\in \mathbb{R}$, if there exists a sequence of integers $u\_n,v\_n \rightarrow \infty$ such that:
* $a$ is not equal to any $u\_n/v\_n$.
* The quotien sequences aproximates $a$ i... | 2018/10/07 | [
"https://math.stackexchange.com/questions/2945794",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/601468/"
] | First, there are some nice examples like
$$ e=\sum\_{n\ge0}\frac1{n!} $$ or [Liouville-like numbers](https://en.wikipedia.org/wiki/Liouville_number), mentioned in the answers by Wilem2, that can be easily proved to be irrational using the theorem, but for which typically there are simpler irrationality proofs: For $e... | Let's proof that $e=\sum\_{n=0}^{\infty}\frac{1}{n!}$ is irrational with this method:
Define $v\_n=n!$ and $u\_n=n!\left( 1+\frac{1}{1!}+\frac{1}{2!}+\frac{1}{3!}+...+\frac{1}{n!} \right) $
It's direct to see that $u\_n$ is an integer, because expanding the product, each term is an integer:
$$u\_n=\left( n!+\frac{n!... |
2,945,794 | >
> Can you give some example of an irrational number that can be proved to be irrational with this theorem?
>
>
>
**Theorem**.
Given $a\in \mathbb{R}$, if there exists a sequence of integers $u\_n,v\_n \rightarrow \infty$ such that:
* $a$ is not equal to any $u\_n/v\_n$.
* The quotien sequences aproximates $a$ i... | 2018/10/07 | [
"https://math.stackexchange.com/questions/2945794",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/601468/"
] | First, there are some nice examples like
$$ e=\sum\_{n\ge0}\frac1{n!} $$ or [Liouville-like numbers](https://en.wikipedia.org/wiki/Liouville_number), mentioned in the answers by Wilem2, that can be easily proved to be irrational using the theorem, but for which typically there are simpler irrationality proofs: For $e... | With the idea of @AndrésE.Caicedo, I will try to proof the irrationality of the Liouville Constant:
$L=\sum\_{n=1}^{\infty}10^{-n!}=0.11000100000000000000000100000000000000000...$
With $v\_n=10^{n!}$ and $u\_n=10^{n!}\sum\_{i=1}^{n}10^{-i!}$.
Clearly, $v\_n$ is an integer that tends to infinity.
For $u\_n$, note t... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | `NSUserDefaults` uses `NSNumber` to keep numeric values, so you can write something like this:
```
if UserDefaults.standard.object(forKey: "fontsize") != nil {
let fontSize = CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
//use `fontSize`...
} else {
//first run...
}
```
... | Firstly, I don't think 0 makes sense to be the value of a variable called `fontSize`. How can you have text which is size 0? So this isn't really a problem at all.
Just limit the user to select a font size that's above 0. This way, if you get a 0 from the user defaults, you will know that the value has not been set ye... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | `NSUserDefaults` uses `NSNumber` to keep numeric values, so you can write something like this:
```
if UserDefaults.standard.object(forKey: "fontsize") != nil {
let fontSize = CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
//use `fontSize`...
} else {
//first run...
}
```
... | You could register defaults when checking for the first run of the app.
```
func checkFirstRun() {
let currentVersion = (Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String) + " (" + (Bundle.main.infoDictionary!["CFBundleVersion"] as! String) + ")"
let defaults = UserDefaults.standard
let ... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | `NSUserDefaults` uses `NSNumber` to keep numeric values, so you can write something like this:
```
if UserDefaults.standard.object(forKey: "fontsize") != nil {
let fontSize = CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
//use `fontSize`...
} else {
//first run...
}
```
... | As the [documentation for UserDefaults](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/AccessingPreferenceValues/AccessingPreferenceValues.html) tells you: You can (and for your purpose probably should) set default values for the values. You have to add
```
let userDefaults = ... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | >
> I expect an exception or something like that which says this value is
> not saved before
>
>
>
Exceptions are not supported in Swift
>
> But I don't like 0
>
>
>
Use [registerDefaults](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/index.htm... | Firstly, I don't think 0 makes sense to be the value of a variable called `fontSize`. How can you have text which is size 0? So this isn't really a problem at all.
Just limit the user to select a font size that's above 0. This way, if you get a 0 from the user defaults, you will know that the value has not been set ye... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | >
> I expect an exception or something like that which says this value is
> not saved before
>
>
>
Exceptions are not supported in Swift
>
> But I don't like 0
>
>
>
Use [registerDefaults](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/index.htm... | You could register defaults when checking for the first run of the app.
```
func checkFirstRun() {
let currentVersion = (Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String) + " (" + (Bundle.main.infoDictionary!["CFBundleVersion"] as! String) + ")"
let defaults = UserDefaults.standard
let ... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | >
> I expect an exception or something like that which says this value is
> not saved before
>
>
>
Exceptions are not supported in Swift
>
> But I don't like 0
>
>
>
Use [registerDefaults](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSUserDefaults_Class/index.htm... | As the [documentation for UserDefaults](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/AccessingPreferenceValues/AccessingPreferenceValues.html) tells you: You can (and for your purpose probably should) set default values for the values. You have to add
```
let userDefaults = ... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | Firstly, I don't think 0 makes sense to be the value of a variable called `fontSize`. How can you have text which is size 0? So this isn't really a problem at all.
Just limit the user to select a font size that's above 0. This way, if you get a 0 from the user defaults, you will know that the value has not been set ye... | As the [documentation for UserDefaults](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/AccessingPreferenceValues/AccessingPreferenceValues.html) tells you: You can (and for your purpose probably should) set default values for the values. You have to add
```
let userDefaults = ... |
39,437,968 | I want to store font size in user defaults and read it in next runs.
But in first run when I check font size using code below, it returns 0, while I expect an exception or something like that which says this value is not saved before:
```
let font_size=CGFloat(UserDefaults.standard.float(forKey: "fontsize"))
```
Now... | 2016/09/11 | [
"https://Stackoverflow.com/questions/39437968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305135/"
] | You could register defaults when checking for the first run of the app.
```
func checkFirstRun() {
let currentVersion = (Bundle.main.infoDictionary!["CFBundleShortVersionString"] as! String) + " (" + (Bundle.main.infoDictionary!["CFBundleVersion"] as! String) + ")"
let defaults = UserDefaults.standard
let ... | As the [documentation for UserDefaults](https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UserDefaults/AccessingPreferenceValues/AccessingPreferenceValues.html) tells you: You can (and for your purpose probably should) set default values for the values. You have to add
```
let userDefaults = ... |
43,912,951 | I'm kinda of new in android. How can i send an email automatically without a contact chooser.
I write a list of e-mails in edittext and an message and then i want to send to every email address.
How can i do that? | 2017/05/11 | [
"https://Stackoverflow.com/questions/43912951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991978/"
] | Is `array_filter` is the method your looking for. I guess there are enough ways to do this :)
```
$array = [0, 15, 60, 120, 2200];
$number = 15;
$filtered = array_filter($array, function($element) use ($number) {
return ($element <= $number);
});
// $filtered = [0, 15];
$max = max($filtered); //15
``` | This can never be true:
```
if ($val>= $number && $val < $number)
```
---
I would try:
```
$highest = 0;
foreach ($arr as $val) {
if($val <= $number){
if($val >= $highest){
$highest= $val;
}
}
}
return $highest;
``` |
43,912,951 | I'm kinda of new in android. How can i send an email automatically without a contact chooser.
I write a list of e-mails in edittext and an message and then i want to send to every email address.
How can i do that? | 2017/05/11 | [
"https://Stackoverflow.com/questions/43912951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991978/"
] | Is `array_filter` is the method your looking for. I guess there are enough ways to do this :)
```
$array = [0, 15, 60, 120, 2200];
$number = 15;
$filtered = array_filter($array, function($element) use ($number) {
return ($element <= $number);
});
// $filtered = [0, 15];
$max = max($filtered); //15
``` | You can search from the end **if the array is sorted correctly**, it's more simple to just find the first value no more than $number and return it.
```
$result = false;
foreach(array_reverse($arr) as $v)
{
if($v <= $number)
{
$result = $v;
break;
}
}
if($result !== false)
echo $result;
``` |
43,912,951 | I'm kinda of new in android. How can i send an email automatically without a contact chooser.
I write a list of e-mails in edittext and an message and then i want to send to every email address.
How can i do that? | 2017/05/11 | [
"https://Stackoverflow.com/questions/43912951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991978/"
] | Is `array_filter` is the method your looking for. I guess there are enough ways to do this :)
```
$array = [0, 15, 60, 120, 2200];
$number = 15;
$filtered = array_filter($array, function($element) use ($number) {
return ($element <= $number);
});
// $filtered = [0, 15];
$max = max($filtered); //15
``` | You can also use this function:
```
function get_less_value($arr, $number) {
// Always sort the array first
sort($arr);
$i = 0;
$biggest = 0;
while ($number >= $arr[$i]) {
$biggest = $arr[$i];
$i++;
}
return $biggest;
}
echo get_less_value($arr, $number);
```
This is ... |
43,912,951 | I'm kinda of new in android. How can i send an email automatically without a contact chooser.
I write a list of e-mails in edittext and an message and then i want to send to every email address.
How can i do that? | 2017/05/11 | [
"https://Stackoverflow.com/questions/43912951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991978/"
] | This can never be true:
```
if ($val>= $number && $val < $number)
```
---
I would try:
```
$highest = 0;
foreach ($arr as $val) {
if($val <= $number){
if($val >= $highest){
$highest= $val;
}
}
}
return $highest;
``` | You can also use this function:
```
function get_less_value($arr, $number) {
// Always sort the array first
sort($arr);
$i = 0;
$biggest = 0;
while ($number >= $arr[$i]) {
$biggest = $arr[$i];
$i++;
}
return $biggest;
}
echo get_less_value($arr, $number);
```
This is ... |
43,912,951 | I'm kinda of new in android. How can i send an email automatically without a contact chooser.
I write a list of e-mails in edittext and an message and then i want to send to every email address.
How can i do that? | 2017/05/11 | [
"https://Stackoverflow.com/questions/43912951",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7991978/"
] | You can search from the end **if the array is sorted correctly**, it's more simple to just find the first value no more than $number and return it.
```
$result = false;
foreach(array_reverse($arr) as $v)
{
if($v <= $number)
{
$result = $v;
break;
}
}
if($result !== false)
echo $result;
``` | You can also use this function:
```
function get_less_value($arr, $number) {
// Always sort the array first
sort($arr);
$i = 0;
$biggest = 0;
while ($number >= $arr[$i]) {
$biggest = $arr[$i];
$i++;
}
return $biggest;
}
echo get_less_value($arr, $number);
```
This is ... |
3,735,299 | How could I include a unit separator (value 31 in ascii table) in a string other than using `snprintf()`? I want to do like we normally initialize a string.
eg
```
char[100] a = "abc"
``` | 2010/09/17 | [
"https://Stackoverflow.com/questions/3735299",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/450508/"
] | 31 in dec = 0x1f in hex. Therefore,
```
char x[] = "blah\x1f" "blah";
// ^^^^ unit separator.
```
The string is split into two to avoid the compiler reading the escape sequence as 0x1fb (it should be read as 0x1f, which is 31 in decimal). Alternatively you could use octal sequence:
```
char x[] = "blah... | You can do:
```
char str[] = {'a',31,'b','c',0};
``` |
21,902,435 | In Xamarin, how can I get the autolink to work with some TextViews that are displayed inside a Google Map InfoWindow.
Here is my custom\_info\_window XML code:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
... | 2014/02/20 | [
"https://Stackoverflow.com/questions/21902435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1229830/"
] | I don't believe this is possible with the way you have each document currently. If you store the documents as:
```
{name: 'Device1', startTime: '2013-02-19 12:00:00', endTime: '2013-02-19 12:45:00'}
{name: 'Device2', startTime: '2013-02-19 12:02:00', endTime: '2013-02-19 12:50:00'}
```
You could then return a [scrip... | You can take a look at the [elapsed](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elapsed.html) logstash filter.
For your use case, you'll have to tag the start document with a *start\_tag* and stop document with *end\_tag*. You can use 'name' as unique id field.
Hope that helps! |
21,902,435 | In Xamarin, how can I get the autolink to work with some TextViews that are displayed inside a Google Map InfoWindow.
Here is my custom\_info\_window XML code:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
... | 2014/02/20 | [
"https://Stackoverflow.com/questions/21902435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1229830/"
] | I don't believe this is possible with the way you have each document currently. If you store the documents as:
```
{name: 'Device1', startTime: '2013-02-19 12:00:00', endTime: '2013-02-19 12:45:00'}
{name: 'Device2', startTime: '2013-02-19 12:02:00', endTime: '2013-02-19 12:50:00'}
```
You could then return a [scrip... | Searching for the same thing, [here](https://stackoverflow.com/a/37359000/2161698) I found a good example to answer this question, using elapsed filters as Ana said, and combining it with the aggregate filter.
The idea is to measure the time of each stage and then aggregate the timing information between events into a... |
21,902,435 | In Xamarin, how can I get the autolink to work with some TextViews that are displayed inside a Google Map InfoWindow.
Here is my custom\_info\_window XML code:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
... | 2014/02/20 | [
"https://Stackoverflow.com/questions/21902435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1229830/"
] | I don't believe this is possible with the way you have each document currently. If you store the documents as:
```
{name: 'Device1', startTime: '2013-02-19 12:00:00', endTime: '2013-02-19 12:45:00'}
{name: 'Device2', startTime: '2013-02-19 12:02:00', endTime: '2013-02-19 12:50:00'}
```
You could then return a [scrip... | You can use scripted\_metric to get the duration.
```
{
"size": 0,
"aggs": {
"d_ids": {
"terms": {
"field": "name.keyword",
"size": 10
},
"aggs": {
"duration": {
"scripted_metric": {
"map_script": "if (doc.type.value == \"stop\") ... |
21,902,435 | In Xamarin, how can I get the autolink to work with some TextViews that are displayed inside a Google Map InfoWindow.
Here is my custom\_info\_window XML code:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
... | 2014/02/20 | [
"https://Stackoverflow.com/questions/21902435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1229830/"
] | You can take a look at the [elapsed](https://www.elastic.co/guide/en/logstash/current/plugins-filters-elapsed.html) logstash filter.
For your use case, you'll have to tag the start document with a *start\_tag* and stop document with *end\_tag*. You can use 'name' as unique id field.
Hope that helps! | You can use scripted\_metric to get the duration.
```
{
"size": 0,
"aggs": {
"d_ids": {
"terms": {
"field": "name.keyword",
"size": 10
},
"aggs": {
"duration": {
"scripted_metric": {
"map_script": "if (doc.type.value == \"stop\") ... |
21,902,435 | In Xamarin, how can I get the autolink to work with some TextViews that are displayed inside a Google Map InfoWindow.
Here is my custom\_info\_window XML code:
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
... | 2014/02/20 | [
"https://Stackoverflow.com/questions/21902435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1229830/"
] | Searching for the same thing, [here](https://stackoverflow.com/a/37359000/2161698) I found a good example to answer this question, using elapsed filters as Ana said, and combining it with the aggregate filter.
The idea is to measure the time of each stage and then aggregate the timing information between events into a... | You can use scripted\_metric to get the duration.
```
{
"size": 0,
"aggs": {
"d_ids": {
"terms": {
"field": "name.keyword",
"size": 10
},
"aggs": {
"duration": {
"scripted_metric": {
"map_script": "if (doc.type.value == \"stop\") ... |
64,245,204 | This is a code portion of a CRUD that allows me to create, read, update and delete with no refresh page using AJAX, PHP, MySQL and JavaScript. I would like to know if is there any way to sort the results with no refresh page when clicking on the `th` of the `thead` column using AJAX?
index.php
```
include 'inc/funcio... | 2020/10/07 | [
"https://Stackoverflow.com/questions/64245204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14407522/"
] | Your code is almost correct, the issue lies in the fact that `SWR` [internally hashes the keys used for queries/mutation](https://github.com/vercel/swr/blob/651c368833164945a8ee5708eb3dd6091241f05b/src/cache.ts#L45). Therefore, the key used by the `mutate` function is simply not registered in the cache.
### Using glob... | you can do as follow
```
const { data, mutate, error } = useSWR(
["/api/albums/list?id=", appUser.id],
(url, params) => fetcher(url, params)
);
```
to reload swr cache just call `mutate();` .
This mutate refer to your album fetch call. Swr automatically refetch your data. |
64,245,204 | This is a code portion of a CRUD that allows me to create, read, update and delete with no refresh page using AJAX, PHP, MySQL and JavaScript. I would like to know if is there any way to sort the results with no refresh page when clicking on the `th` of the `thead` column using AJAX?
index.php
```
include 'inc/funcio... | 2020/10/07 | [
"https://Stackoverflow.com/questions/64245204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14407522/"
] | The reason your UI is not refreshing after the mutate is because the first argument passed into the `mutate()` and `useSWR()` don't match each other.
The first argument is essentially a unique key that SWR uses to associate the hook with the mutate. Update your mutate call to use the same key as the hook, and it shoul... | you can do as follow
```
const { data, mutate, error } = useSWR(
["/api/albums/list?id=", appUser.id],
(url, params) => fetcher(url, params)
);
```
to reload swr cache just call `mutate();` .
This mutate refer to your album fetch call. Swr automatically refetch your data. |
64,245,204 | This is a code portion of a CRUD that allows me to create, read, update and delete with no refresh page using AJAX, PHP, MySQL and JavaScript. I would like to know if is there any way to sort the results with no refresh page when clicking on the `th` of the `thead` column using AJAX?
index.php
```
include 'inc/funcio... | 2020/10/07 | [
"https://Stackoverflow.com/questions/64245204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14407522/"
] | Your code is almost correct, the issue lies in the fact that `SWR` [internally hashes the keys used for queries/mutation](https://github.com/vercel/swr/blob/651c368833164945a8ee5708eb3dd6091241f05b/src/cache.ts#L45). Therefore, the key used by the `mutate` function is simply not registered in the cache.
### Using glob... | The reason your UI is not refreshing after the mutate is because the first argument passed into the `mutate()` and `useSWR()` don't match each other.
The first argument is essentially a unique key that SWR uses to associate the hook with the mutate. Update your mutate call to use the same key as the hook, and it shoul... |
61,454,637 | I have cell's imageView shadow customization:
```
override func layoutSubviews() {
moviePosterImageView.layer.shadowOffset = .zero
moviePosterImageView.layer.shadowColor = UIColor.black.cgColor
moviePosterImageView.layer.shadowRadius = 5
moviePosterImageView.layer.shadowOpacity = 1
moviePosterImage... | 2020/04/27 | [
"https://Stackoverflow.com/questions/61454637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7442135/"
] | >
> But it breaks imageView sizes and constraints.
>
>
>
Yes, because you forgot to start by saying
```
override func layoutSubviews() {
super.layoutSubviews() // important
```
Since autolayout happens *in* `layoutSubviews`, if you don’t call `super` you prevent it from operating. | Use This Code in another swift File and set shadow in story board or xib easily
```
extension UIView {
@IBInspectable
var cornerRadius: CGFloat {
get {
return layer.cornerRadius
}
set {
layer.cornerRadius = newValue
}
}
@IBInspectable
var borderWidth: CGFloat {
get {
retur... |
4,001,464 | I am trying to solve the following question:
Let $G$ be a finite group and $H$ a subgroup of $G$. Let $A$ be a $G$-module. Show that $\pi: I^{H}\_{G}(A)\to A$ defined by $\pi(f)=\sum\_{g\in G/H}g\cdot f(g^{-1})$ is surjective morphism.
Here, $I^{H}\_{G}(A)$ is the induced module from $H$ to $G$. It is $Hom\_{H}(\math... | 2021/01/27 | [
"https://math.stackexchange.com/questions/4001464",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/809513/"
] | Let's start with the following observation. If $H$ is a subgroup of $G$, then we have an isomorphism $f \colon \mathbb{Z}[G] \to \bigoplus\_{G/H} \mathbb{Z}[H]$ of left $H$-modules. Here the direct sum is taken over the *right* cosets. For convenience, let's enumerate these cosets as $Hg\_1,\ldots,Hg\_r$, and let's wri... | I think it is straightforward to check that $\pi$ is a morphism so I will just show that it is surjective. Let $a \in A$ and define $f:G \to A$ to be this function: for $h \in H$, define $f(h) = h \cdot a$ and for $g \notin H$, define $f(g)=0$. Then $f \in I\_G^H(A)$. We see that $\pi(f)= 1 \cdot f(1)=a$. Therefore $\p... |
37,952,173 | It could be I have completely misunderstood how web services work.
So there's a webservice I want to access through a javascript file sitting in a folder on my desktop. The server I am trying to access has not set a CORS header, so I have some trouble just using regular ol' ajax.
And frankly I am not sure where to ... | 2016/06/21 | [
"https://Stackoverflow.com/questions/37952173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3744244/"
] | So the bad news is that unless the 3rd party service either allows cross-domain requests (this is a configuration on that 3rd party server), or allows JSONP requests, you really have no option to access this service using a browser and javascript.
You could perhaps build your own service to proxy requests to that thir... | I found a solution.
Using something called "JSONP" that I had never heard of until now, i wrote a request like this
```
$.ajax({
type: 'GET',
url: "https://DOMAINNAME.com",
contentType: "application/json",
dataType: 'jsonp',
success: function(data) {
console.log(data)
},
error: func... |
32,013,205 | So I don't know if this is possible, but I would like to return the name of the column which has the closet value to my query.
So this is my table:
```
--------------------------
| ID | D1 | D2 | D3 | D4 |
--------------------------
| 1 | 0 | 10 | 22 | 50 |
--------------------------
```
I would like to do a quer... | 2015/08/14 | [
"https://Stackoverflow.com/questions/32013205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1613529/"
] | Not easily. Since you've got those as different fields in the same record, you'll have to use very ugly queries:
```
SELECT source, val, ABS(20 - val) AS diff
FROM (
SELECT 'd1' AS source, d1 AS val FROM foo
UNION ALL
SELECT 'd2', d2 FROM foo
UNION ALL
SELECT 'd3', d3 FROM foo
UNION ALL
SEL... | Have a look at something like <http://www.techfounder.net/2009/02/02/selecting-closest-values-in-mysql/>
What language are you using to echo out the data? |
32,013,205 | So I don't know if this is possible, but I would like to return the name of the column which has the closet value to my query.
So this is my table:
```
--------------------------
| ID | D1 | D2 | D3 | D4 |
--------------------------
| 1 | 0 | 10 | 22 | 50 |
--------------------------
```
I would like to do a quer... | 2015/08/14 | [
"https://Stackoverflow.com/questions/32013205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1613529/"
] | Not easily. Since you've got those as different fields in the same record, you'll have to use very ugly queries:
```
SELECT source, val, ABS(20 - val) AS diff
FROM (
SELECT 'd1' AS source, d1 AS val FROM foo
UNION ALL
SELECT 'd2', d2 FROM foo
UNION ALL
SELECT 'd3', d3 FROM foo
UNION ALL
SEL... | You can do this with a complicated `case`:
```
select (case least(abs(d1 - 20), abs(d2 - 20), abs(d3 - 20), abs(d4 - 20))
when abs(d1 - 20) then 'd1'
when abs(d2 - 20) then 'd2'
when abs(d3 - 20) then 'd3'
when abs(d4 - 20) then 'd4'
end)
from mytable;
```
Note... |
32,013,205 | So I don't know if this is possible, but I would like to return the name of the column which has the closet value to my query.
So this is my table:
```
--------------------------
| ID | D1 | D2 | D3 | D4 |
--------------------------
| 1 | 0 | 10 | 22 | 50 |
--------------------------
```
I would like to do a quer... | 2015/08/14 | [
"https://Stackoverflow.com/questions/32013205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1613529/"
] | You can do this with a complicated `case`:
```
select (case least(abs(d1 - 20), abs(d2 - 20), abs(d3 - 20), abs(d4 - 20))
when abs(d1 - 20) then 'd1'
when abs(d2 - 20) then 'd2'
when abs(d3 - 20) then 'd3'
when abs(d4 - 20) then 'd4'
end)
from mytable;
```
Note... | Have a look at something like <http://www.techfounder.net/2009/02/02/selecting-closest-values-in-mysql/>
What language are you using to echo out the data? |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | While I can't make any guarantees, something like this might work. It depends on what your optimizer does and whether or not you have side effects in the parameters to operator<<.
```
#ifdef NO_LOG_DEBUG
static class DevNull
{
} dev_null;
template <typename T>
DevNull & operator<<(DevNull & dest, T)
{
return des... | Turns off all optimizations in the program and speeds compilation.
/Od
or boot\_log\_stop |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | @MartinShobe's accepted answer works on:
* g++ (4.7.2) with `-O1` and higher
* clang++ (3.4) with `-O2` and higher
* Visual Studio (2008) with linker flag `/OPT:REF` | Turns off all optimizations in the program and speeds compilation.
/Od
or boot\_log\_stop |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | The accepted answer does not work for me (MSVC 2019, stdc++17).
My solution is a bit whacky though. But the optimization should definitely take care of it:
```
#ifdef NDEBUG
#define LOG_DEBUG if (false) std::cout
#else
#define LOG_DEBUG if (true) std::cout
#endif
```
Usage:
```
LOG_DEBUG << ... << std::endl;
``... | Turns off all optimizations in the program and speeds compilation.
/Od
or boot\_log\_stop |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | While I can't make any guarantees, something like this might work. It depends on what your optimizer does and whether or not you have side effects in the parameters to operator<<.
```
#ifdef NO_LOG_DEBUG
static class DevNull
{
} dev_null;
template <typename T>
DevNull & operator<<(DevNull & dest, T)
{
return des... | @MartinShobe's accepted answer works on:
* g++ (4.7.2) with `-O1` and higher
* clang++ (3.4) with `-O2` and higher
* Visual Studio (2008) with linker flag `/OPT:REF` |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | While I can't make any guarantees, something like this might work. It depends on what your optimizer does and whether or not you have side effects in the parameters to operator<<.
```
#ifdef NO_LOG_DEBUG
static class DevNull
{
} dev_null;
template <typename T>
DevNull & operator<<(DevNull & dest, T)
{
return des... | The accepted answer does not work for me (MSVC 2019, stdc++17).
My solution is a bit whacky though. But the optimization should definitely take care of it:
```
#ifdef NDEBUG
#define LOG_DEBUG if (false) std::cout
#else
#define LOG_DEBUG if (true) std::cout
#endif
```
Usage:
```
LOG_DEBUG << ... << std::endl;
``... |
16,027,876 | I am using `boost::log` as a logger for my C++ program.
During development I often use it this way, for example:
```
#define LOG(severity) BOOST_LOG_SEV(boost::logger::get(), (severity))
#define LOG_ERR LOG(Severity::error)
#define LOG_INFO LOG(Severity::info)
#define LOG_DEBUG LOG(Severity::debug)
```
where `BOOST_... | 2013/04/16 | [
"https://Stackoverflow.com/questions/16027876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/989331/"
] | @MartinShobe's accepted answer works on:
* g++ (4.7.2) with `-O1` and higher
* clang++ (3.4) with `-O2` and higher
* Visual Studio (2008) with linker flag `/OPT:REF` | The accepted answer does not work for me (MSVC 2019, stdc++17).
My solution is a bit whacky though. But the optimization should definitely take care of it:
```
#ifdef NDEBUG
#define LOG_DEBUG if (false) std::cout
#else
#define LOG_DEBUG if (true) std::cout
#endif
```
Usage:
```
LOG_DEBUG << ... << std::endl;
``... |
95,598 | I innocently edited the title of the question, [I accidentally a whole fact table](https://stackoverflow.com/questions/6364780/i-accidentally-a-whole-fact-table). Apparently, this kind of grammar with no verb is [an internet meme](http://knowyourmeme.com/memes/i-accidentally). Because I was not familiar with said meme ... | 2011/06/18 | [
"https://meta.stackexchange.com/questions/95598",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/142684/"
] | The title should be edited correctly and the post locked. The users involved should at least be looked at closely. While perhaps not intended as such, it's just internet vandalism and isn't really what this site is about. | One of the main goals of Stack Exchange is to be the first hit (or one of the first hits) for people trying to solve problems using Google searches. To that end, the clearer the title, the better.
In this case, it appears the author and a high rep user have decided that's not important and are entering into an edit wa... |
95,598 | I innocently edited the title of the question, [I accidentally a whole fact table](https://stackoverflow.com/questions/6364780/i-accidentally-a-whole-fact-table). Apparently, this kind of grammar with no verb is [an internet meme](http://knowyourmeme.com/memes/i-accidentally). Because I was not familiar with said meme ... | 2011/06/18 | [
"https://meta.stackexchange.com/questions/95598",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/142684/"
] | One of the main goals of Stack Exchange is to be the first hit (or one of the first hits) for people trying to solve problems using Google searches. To that end, the clearer the title, the better.
In this case, it appears the author and a high rep user have decided that's not important and are entering into an edit wa... | Found some relevant discussions:
* [Stack Overflow: Where We Hate Fun](https://blog.stackoverflow.com/2010/01/stack-overflow-where-we-hate-fun/) - Jeff basically says *some* fun will be tolerated, as long as it's not disruptive. But **no** smiling.
* [Joke Questions: Please Refrain](https://blog.stackoverflow.com/2009... |
95,598 | I innocently edited the title of the question, [I accidentally a whole fact table](https://stackoverflow.com/questions/6364780/i-accidentally-a-whole-fact-table). Apparently, this kind of grammar with no verb is [an internet meme](http://knowyourmeme.com/memes/i-accidentally). Because I was not familiar with said meme ... | 2011/06/18 | [
"https://meta.stackexchange.com/questions/95598",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/142684/"
] | One of the main goals of Stack Exchange is to be the first hit (or one of the first hits) for people trying to solve problems using Google searches. To that end, the clearer the title, the better.
In this case, it appears the author and a high rep user have decided that's not important and are entering into an edit wa... | I was the OP of the SO question being debated here and I'm sorry for creating such a hubbub.
I'd like to point out that I made the first rollback with a note attached explaining my reasons -- as well as the second (because I was feeling chuffed) but the flurry of edits that followed came from 2 unrelated users, not me... |
95,598 | I innocently edited the title of the question, [I accidentally a whole fact table](https://stackoverflow.com/questions/6364780/i-accidentally-a-whole-fact-table). Apparently, this kind of grammar with no verb is [an internet meme](http://knowyourmeme.com/memes/i-accidentally). Because I was not familiar with said meme ... | 2011/06/18 | [
"https://meta.stackexchange.com/questions/95598",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/142684/"
] | The title should be edited correctly and the post locked. The users involved should at least be looked at closely. While perhaps not intended as such, it's just internet vandalism and isn't really what this site is about. | Found some relevant discussions:
* [Stack Overflow: Where We Hate Fun](https://blog.stackoverflow.com/2010/01/stack-overflow-where-we-hate-fun/) - Jeff basically says *some* fun will be tolerated, as long as it's not disruptive. But **no** smiling.
* [Joke Questions: Please Refrain](https://blog.stackoverflow.com/2009... |
95,598 | I innocently edited the title of the question, [I accidentally a whole fact table](https://stackoverflow.com/questions/6364780/i-accidentally-a-whole-fact-table). Apparently, this kind of grammar with no verb is [an internet meme](http://knowyourmeme.com/memes/i-accidentally). Because I was not familiar with said meme ... | 2011/06/18 | [
"https://meta.stackexchange.com/questions/95598",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/142684/"
] | The title should be edited correctly and the post locked. The users involved should at least be looked at closely. While perhaps not intended as such, it's just internet vandalism and isn't really what this site is about. | I was the OP of the SO question being debated here and I'm sorry for creating such a hubbub.
I'd like to point out that I made the first rollback with a note attached explaining my reasons -- as well as the second (because I was feeling chuffed) but the flurry of edits that followed came from 2 unrelated users, not me... |
4,129,096 | Perl has the \u operator to lowercase a match when using string replacement and regular expressions. Does .Net have anything similar? For example, uppercase all words that start with a <
```
s/<\(\w*\)/<\U\1/
``` | 2010/11/08 | [
"https://Stackoverflow.com/questions/4129096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/92692/"
] | The way to do these kind of things in .NET is using the MatchEvaluator parameter:
```
string pattern = @"<(\w*)";
string replaced = Regex.Replace(line, pattern,
x => "<" + x.Groups[1].ToString().ToUpper());
```
This reads: Whenever you find the regular expression, replace it with the first gr... | You've got some errors in your Perl code. In both Perl and .NET regexes, `\(` and `\)` match the literal characters, `(` and `)`; to use parentheses as grouping operators, leave the backslashes off. Also, `\u` does not *lowercase a match*, it **titlecases** (usually the same as uppercasing) the next *character*. What y... |
32,017,651 | I have been trying to get an excel formula work for over a day now. My Scenario is as below:
Department---------Sev1-----Sev2-------RAG
IT-------------------------0---------0---------Green
Transport --------------0---------2-----------Red
Admin-------------------0-------4 -------------Red
If Sev1 and Sev2 are both... | 2015/08/14 | [
"https://Stackoverflow.com/questions/32017651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5228637/"
] | Assuming Sev1 is column B, Sev2 is column C
Also assuming Sev1, Sev2 are never negative, and Sev2 is never a fraction between 0 and 1.
```
if(B2>0, "Red", if(C2=0, "green", if(C2=1, "Amber", "Red")))
``` | You can nest your if formulas. Assuming that your header starts in A1 then:
```
=IF(B2 > 0, "Red",IF(C2 = 1, "Amber", IF( C2 > 1, "Red", "green")))
``` |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | Delphi-XE7 introduced a new syntax for `dynamic array` initialization.
```
// compile time const declaration of dynamic array
const
my_ConstArray_name: TArray<Integer> = [128, 38459, 438, 23674];
// compile time var declaration of dynamic array
var
my_VarArray_name: TArray<Integer> = [128, 38459, 438, 23674];
``... | Putting aside the general question, I'd like to point out that the specific use-case was never going to work anyway: Delphi can't return on the stack the contents of an array of unknown length.
The return type of a function needs to be known by the calling code. It may be a pointer to the heap: it may even be a memor... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | When it comes to dynamic arrays, yes:
```
type
TIntArray = array of integer;
procedure TForm1.Button1Click(Sender: TObject);
var
MyArr: TIntArray;
begin
MyArr := TIntArray.Create(10, 20, 30, 40);
end;
```
When it comes to static arrays, you need to write a helper function:
```
type
TIntArray = array[0..2] ... | With some extra work, you can achieve a clean implementation:
```
var
x: TRGB;
begin
x := TRGB.Init(0,0,0);
end;
```
---
```
TRGB = record
Red, Green, Blue: real;
class function Init(r,g,b: real): TRGB; static;
end;
class function TRGB.Init(r, g, b: real): TRGB;
begin
Result.Red := r;
Resul... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | When it comes to dynamic arrays, yes:
```
type
TIntArray = array of integer;
procedure TForm1.Button1Click(Sender: TObject);
var
MyArr: TIntArray;
begin
MyArr := TIntArray.Create(10, 20, 30, 40);
end;
```
When it comes to static arrays, you need to write a helper function:
```
type
TIntArray = array[0..2] ... | I know this is an old post, but I came across this while looking into the auto-assignment technique for Delphi. This post has a very nice explanation, along with a way to auto-assign an array of records:
<http://delphi.about.com/od/adptips2006/qt/const_array.htm>
Unfortunately, the initialization can only be done wit... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | This is an area where Delphi turns something that is a simple one-line assignment statement in most languages into something more complicated.
One approach would to declare the value as a typed constant:
```
type
HSVRealArray = array[1..3] of real;
const
constHSVVal: HSVRealArray = (0, 0, 0);
var
currentValue: ... | I know this is an old post, but I came across this while looking into the auto-assignment technique for Delphi. This post has a very nice explanation, along with a way to auto-assign an array of records:
<http://delphi.about.com/od/adptips2006/qt/const_array.htm>
Unfortunately, the initialization can only be done wit... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | When it comes to dynamic arrays, yes:
```
type
TIntArray = array of integer;
procedure TForm1.Button1Click(Sender: TObject);
var
MyArr: TIntArray;
begin
MyArr := TIntArray.Create(10, 20, 30, 40);
end;
```
When it comes to static arrays, you need to write a helper function:
```
type
TIntArray = array[0..2] ... | `[0, 0, 0]` is a set in Delphi. `(0, 0, 0)` is an array constant in Delphi! Just use:
```
HSVtoRGB := (0, 0, 0);
```
(Unless HSVtoRGB is a dynamic array. Did you declare it as `var HSVtoRGB: array[1..3] of integer;` or something similar? |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | I know this is an old post, but I came across this while looking into the auto-assignment technique for Delphi. This post has a very nice explanation, along with a way to auto-assign an array of records:
<http://delphi.about.com/od/adptips2006/qt/const_array.htm>
Unfortunately, the initialization can only be done wit... | `[0, 0, 0]` is a set in Delphi. `(0, 0, 0)` is an array constant in Delphi! Just use:
```
HSVtoRGB := (0, 0, 0);
```
(Unless HSVtoRGB is a dynamic array. Did you declare it as `var HSVtoRGB: array[1..3] of integer;` or something similar? |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | For array handling, array initialization and array constant declarations, Delphi doesn't make simple things simple.
In some situations similar to yours, I initialize the array with a utility function taking one open array parameter and returning the appropiate static string.
```
const
MaxArray = 10;
type
TRea... | `[0, 0, 0]` is a set in Delphi. `(0, 0, 0)` is an array constant in Delphi! Just use:
```
HSVtoRGB := (0, 0, 0);
```
(Unless HSVtoRGB is a dynamic array. Did you declare it as `var HSVtoRGB: array[1..3] of integer;` or something similar? |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | This is an area where Delphi turns something that is a simple one-line assignment statement in most languages into something more complicated.
One approach would to declare the value as a typed constant:
```
type
HSVRealArray = array[1..3] of real;
const
constHSVVal: HSVRealArray = (0, 0, 0);
var
currentValue: ... | Putting aside the general question, I'd like to point out that the specific use-case was never going to work anyway: Delphi can't return on the stack the contents of an array of unknown length.
The return type of a function needs to be known by the calling code. It may be a pointer to the heap: it may even be a memor... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | For array handling, array initialization and array constant declarations, Delphi doesn't make simple things simple.
In some situations similar to yours, I initialize the array with a utility function taking one open array parameter and returning the appropiate static string.
```
const
MaxArray = 10;
type
TRea... | Putting aside the general question, I'd like to point out that the specific use-case was never going to work anyway: Delphi can't return on the stack the contents of an array of unknown length.
The return type of a function needs to be known by the calling code. It may be a pointer to the heap: it may even be a memor... |
6,493,742 | I am currently using the AppDelegate in my first iPhone app to handle application level events.
In my app I have an enabled and disabled state, so when the user selects disabled some of the buttons on the application should be set to disabled.
My AppDelegate gets notified of the state. But what is the best approach t... | 2011/06/27 | [
"https://Stackoverflow.com/questions/6493742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243999/"
] | For array handling, array initialization and array constant declarations, Delphi doesn't make simple things simple.
In some situations similar to yours, I initialize the array with a utility function taking one open array parameter and returning the appropiate static string.
```
const
MaxArray = 10;
type
TRea... | I know this is an old post, but I came across this while looking into the auto-assignment technique for Delphi. This post has a very nice explanation, along with a way to auto-assign an array of records:
<http://delphi.about.com/od/adptips2006/qt/const_array.htm>
Unfortunately, the initialization can only be done wit... |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I really like (and recommend) Billingsley's *Ergodic Theory and Information*. It is a well-written book with very clear explanations. For example, his treatment of entropy tops those in both Walter's *An Introduction to Ergodic Theory* and Petersen's *Ergodic Theory*, both of which are also good books though. | I have learned topological dynamics from this [textbook](http://www.cts.cuni.cz/~kurka/studij.html). |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | What about the following?
Sinai, Ya. G.
Introduction to ergodic theory.
Translated by V. Scheffer. Mathematical Notes, 18. Princeton University Press, Princeton, N.J., 1976. 144 pp. ISBN: 0-691-08182-4
This seems to have the highest content-to-volume ratio. It treats, among others, invariant measures, translations on... | I have learned topological dynamics from this [textbook](http://www.cts.cuni.cz/~kurka/studij.html). |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I really like (and recommend) Billingsley's *Ergodic Theory and Information*. It is a well-written book with very clear explanations. For example, his treatment of entropy tops those in both Walter's *An Introduction to Ergodic Theory* and Petersen's *Ergodic Theory*, both of which are also good books though. | I recommend Foundations of Ergodic Theory by Marcelo Viana and Oliviera <https://books.google.it/books/about/Foundations_of_Ergodic_Theory.html?id=vlRyCwAAQBAJ&printsec=frontcover&source=kp_read_button&redir_esc=y#v=onepage&q&f=false>
This book has almost everything explained. |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I really like (and recommend) Billingsley's *Ergodic Theory and Information*. It is a well-written book with very clear explanations. For example, his treatment of entropy tops those in both Walter's *An Introduction to Ergodic Theory* and Petersen's *Ergodic Theory*, both of which are also good books though. | Personally, I like Mañe's book Teoría Ergódica. I do think it's a classical book full of exercises. On the other hand the book has loads of mistakes, which makes it interesting to read, you realise that you are understanding everything when you spot the mistakes. As far as I know, both versions (English and Portuguese)... |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | For me the standard text is Peter Walters, "[An Introduction to Ergodic Theory](http://books.google.ca/books?id=eCoufOp7ONMC&lpg=PP1&dq=peter%2520walters%2520ergodic%2520theory&pg=PP1#v=onepage&q&f=false)", Springer Graduate Texts in Mathematics. | Personally, I like Mañe's book Teoría Ergódica. I do think it's a classical book full of exercises. On the other hand the book has loads of mistakes, which makes it interesting to read, you realise that you are understanding everything when you spot the mistakes. As far as I know, both versions (English and Portuguese)... |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I think another good choice is the book "Ergodic Theory: With a View Towards Number Theory" by Manfred Einsiedler and Thomas Ward,Graduate Texts in Mathematics 259.Besides basic concepts of ergodic theory,the book also discusses the connection between ergodic theory and number theory,which is a hot topic recently.And a... | I have learned topological dynamics from this [textbook](http://www.cts.cuni.cz/~kurka/studij.html). |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I think another good choice is the book "Ergodic Theory: With a View Towards Number Theory" by Manfred Einsiedler and Thomas Ward,Graduate Texts in Mathematics 259.Besides basic concepts of ergodic theory,the book also discusses the connection between ergodic theory and number theory,which is a hot topic recently.And a... | Personally, I like Mañe's book Teoría Ergódica. I do think it's a classical book full of exercises. On the other hand the book has loads of mistakes, which makes it interesting to read, you realise that you are understanding everything when you spot the mistakes. As far as I know, both versions (English and Portuguese)... |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I second Siming Tu's recommendation for E-W book.
It is a well balanced book (regarding theory vs applications), it has nice appendix contains relevant theory from functional analysis, and it contains a nice selection of subjects (although not addressing entropy, which one might say is a very big problem).
I think tha... | Let me suggest you a recent book by Steve Kalikow and Randall McCutcheon:
"An Outline of Ergodic Theory". This is a nice book to get a solid background in isomorphism theory of measurable dynamical systems. I like the way proofs of theorems are presented through guided exercises. |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I really like (and recommend) Billingsley's *Ergodic Theory and Information*. It is a well-written book with very clear explanations. For example, his treatment of entropy tops those in both Walter's *An Introduction to Ergodic Theory* and Petersen's *Ergodic Theory*, both of which are also good books though. | I'd recommend "Introduction to Ergodic Theory" by Nathanial A. Friedman. The book is reasonably concrete and short and treats the important "cutting and stacking" constructions in detail. This only will help you with the measurable setting and is an older book, though. |
82,661 | Hello,
I'd like to hear your opinion for ergodic theory books which would suit a beginner (with background in measure theory, real analysis and topological groups). I am looking for something well structured, well motivated, and perhaps with application to other fields.
any such book exists?
I tried a book by nadkar... | 2011/12/05 | [
"https://mathoverflow.net/questions/82661",
"https://mathoverflow.net",
"https://mathoverflow.net/users/14105/"
] | I think another good choice is the book "Ergodic Theory: With a View Towards Number Theory" by Manfred Einsiedler and Thomas Ward,Graduate Texts in Mathematics 259.Besides basic concepts of ergodic theory,the book also discusses the connection between ergodic theory and number theory,which is a hot topic recently.And a... | I really like (and recommend) Billingsley's *Ergodic Theory and Information*. It is a well-written book with very clear explanations. For example, his treatment of entropy tops those in both Walter's *An Introduction to Ergodic Theory* and Petersen's *Ergodic Theory*, both of which are also good books though. |
45,971,311 | I'd like to configure bitbutcket to trigger a jenkins build.
I've spent some time researching this and all the answers are from a few years ago, and have not found any guides because things seem to have changed since.
**What I'm trying to do:**
A bitbucket push to a particular branch triggers a build.
**What I've go... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45971311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4534012/"
] | **SPECIFIC solution for Jenkins CI server--Webhook to Jenkins for Bitbucket** plugin has been commercialized in latest version of Bit-Bucket and the current price is around $4800 which was earlier a free offering, because of this, guys who want to save their bucks, can go to the alternative solution by using webhooks f... | Is your Jenkins URL accessible from your bitbucket server? If yes that it should be fairly simple to do it. You add the webhook in your repository as `http://<url-of-jenkins>/git/notifyCommit?url=<url-of-repository>`. When jenkins receives this POST, it automatically triggers builds on those jobs that use this git repo... |
45,971,311 | I'd like to configure bitbutcket to trigger a jenkins build.
I've spent some time researching this and all the answers are from a few years ago, and have not found any guides because things seem to have changed since.
**What I'm trying to do:**
A bitbucket push to a particular branch triggers a build.
**What I've go... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45971311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4534012/"
] | Is your Jenkins URL accessible from your bitbucket server? If yes that it should be fairly simple to do it. You add the webhook in your repository as `http://<url-of-jenkins>/git/notifyCommit?url=<url-of-repository>`. When jenkins receives this POST, it automatically triggers builds on those jobs that use this git repo... | For anyone here after July 2022, here are the simple steps I followed to make it work.
Create a live Jenkins URL
-------------------------
First, create a tunnel from a live URL to your local Jenkins URL using ngrok because using `locahost:8080` directly as your webhook URL on bitbucket will simply not work as bitbuc... |
45,971,311 | I'd like to configure bitbutcket to trigger a jenkins build.
I've spent some time researching this and all the answers are from a few years ago, and have not found any guides because things seem to have changed since.
**What I'm trying to do:**
A bitbucket push to a particular branch triggers a build.
**What I've go... | 2017/08/30 | [
"https://Stackoverflow.com/questions/45971311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4534012/"
] | **SPECIFIC solution for Jenkins CI server--Webhook to Jenkins for Bitbucket** plugin has been commercialized in latest version of Bit-Bucket and the current price is around $4800 which was earlier a free offering, because of this, guys who want to save their bucks, can go to the alternative solution by using webhooks f... | For anyone here after July 2022, here are the simple steps I followed to make it work.
Create a live Jenkins URL
-------------------------
First, create a tunnel from a live URL to your local Jenkins URL using ngrok because using `locahost:8080` directly as your webhook URL on bitbucket will simply not work as bitbuc... |
2,530,690 | I don't usually use regular expressions, hence my question. I need a regex to match the following:
```
'{any-string}'.
```
Any assistance appreciated. | 2010/03/27 | [
"https://Stackoverflow.com/questions/2530690",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/211939/"
] | The most simple expression would be:
```
/{(.*?)}/
```
If you expect more complex strings (for example, some kind of escape sequence where the `{` and `}` characters are allowed within the string) it could be more complex. For instance, with a `\` (backslash) escape sequence:
```
/{((?:\\.|[^}])*)}/
```
Edit: Tha... | To replace anything in `{ }` with what `file_get_contents` returns you can do:
```
$page = file_get_contents('some_file_name or some_url');
$str = '.....{...}....';
$str = preg_replace('/{[^}]*}/',"$page",$str);
``` |
417,635 | I have a Philips 222E display connected via a mini-DP to DVI adapter and DVI cable to a Macbook Air (mid-2011).
Every time that the MBA wakes from sleep, the display shows this static:

The static is replaced with the proper desktop image after aroun... | 2012/04/27 | [
"https://superuser.com/questions/417635",
"https://superuser.com",
"https://superuser.com/users/32448/"
] | I've been investigating a little bit and would be good for you guys have a try with this steps. The steps are written for a different type of Display, but can get the idea:
>
> * Under "SIZE & POSITION" menu, go to "Image Size" and set to "Screen Fit"
> * Under "SETUP & RESET" menu (down on the second page with my mo... | I had similar issues (exactly the same static problems) with a device that did not support HDCP negotiation ([High Bandwidth Digital Content Protection](https://en.wikipedia.org/wiki/High-bandwidth_Digital_Content_Protection)) properly whenever I woke the device up from standby (in my case a Sky+/BenQ monitor combinati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.