qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
4,049,200
I understand conceptually that a function $f\colon A\to\mathbf R$ is differentiable at a point $a\in A$ if it can be well approximated by a line there; more precisely, if we can find a constant $f'(a)$ such that $$f(a+h) = f(a) + f'(a)h+o(h).$$ > > My goal: I want to understand (intuitively) what it means when a func...
2021/03/04
[ "https://math.stackexchange.com/questions/4049200", "https://math.stackexchange.com", "https://math.stackexchange.com/users/714716/" ]
Here are some thoughts: To study, as always, I use my favourite tool of [Taylor's theorem](https://brianbabu890.medium.com/)(\*): $$ f(a+h) = f(a) + h f'(a) + \frac{h^2}{2} f''(a) +O(h^3)$$ Now, let's analyze $f''(a)$, if $f(a+h)$ is not differentiable, it means the left hand derivative and right hand derivative are...
I think that there is a sense in which polynomials can indeed be viewed as "defining the notion of smoothness" because a function whose $n$th derivative is identically $0$ is a polynomial of degree $n-1$.
4,049,200
I understand conceptually that a function $f\colon A\to\mathbf R$ is differentiable at a point $a\in A$ if it can be well approximated by a line there; more precisely, if we can find a constant $f'(a)$ such that $$f(a+h) = f(a) + f'(a)h+o(h).$$ > > My goal: I want to understand (intuitively) what it means when a func...
2021/03/04
[ "https://math.stackexchange.com/questions/4049200", "https://math.stackexchange.com", "https://math.stackexchange.com/users/714716/" ]
Here are some thoughts: To study, as always, I use my favourite tool of [Taylor's theorem](https://brianbabu890.medium.com/)(\*): $$ f(a+h) = f(a) + h f'(a) + \frac{h^2}{2} f''(a) +O(h^3)$$ Now, let's analyze $f''(a)$, if $f(a+h)$ is not differentiable, it means the left hand derivative and right hand derivative are...
I think it would be difficult to deduce that $x|x|$ is not twice differentiable at $x=0$ simply by looking at its graph, but this is how I would think about it. Every function $y=f(x)$ can trivially be parameterised with respect to the $x$-coordinate, meaning that we can define its displacement function as $s(t)=(t,f(t...
3,219,233
I have fixed area 2d space filled with rectangles. I'd like to move the rectangles around, add new ones, remove some, but not allow them to overlap. If all of the rects are the same height and width (50x50px), what data structure should I use to store their position and what space they are using and what lookup method ...
2010/07/10
[ "https://Stackoverflow.com/questions/3219233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/388434/" ]
This is the easy part of the classic [collision detection](http://en.wikipedia.org/wiki/Collision_detection) problem. Mostly [AABB Trees](http://www.cyberkreations.com/kreationsedge/?page_id=27) (not sure if that's the *best* link, but that's the name, anyway) are used to solve it efficiently, but look up anything coll...
I'm not sure I fully understand your environment but you could consider using a 2-dimensional array which is essentially a matrix. Each spot would represent one of your squares in your 2D space.
3,219,233
I have fixed area 2d space filled with rectangles. I'd like to move the rectangles around, add new ones, remove some, but not allow them to overlap. If all of the rects are the same height and width (50x50px), what data structure should I use to store their position and what space they are using and what lookup method ...
2010/07/10
[ "https://Stackoverflow.com/questions/3219233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/388434/" ]
In general, you should use a multidimensional data structure when dealing with these kind of problems. [kd-tree](http://en.wikipedia.org/wiki/Kd-tree) and [R-tree](http://en.wikipedia.org/wiki/R-tree) are good starting point to learn the subject. Since these structures are relatively complex, consider using it only if ...
I'm not sure I fully understand your environment but you could consider using a 2-dimensional array which is essentially a matrix. Each spot would represent one of your squares in your 2D space.
276,562
New to mathematica and have looked into the matrix page but can't find anything to help. y= (4,3,3,1), u1=(1,1,0,1), u2= (-1,3,1,-2), u3=(-1,0,1,1)
2022/11/27
[ "https://mathematica.stackexchange.com/questions/276562", "https://mathematica.stackexchange.com", "https://mathematica.stackexchange.com/users/85306/" ]
We can minimize the square of the distance of `λ1*u1 + λ2*u2 + λ3*u3` and `y`. ``` u1 = {1, 1, 0, 1}; u2 = {-1, 3, 1, -2}; u3 = {-1, 0, 1, 1}; y = {4, 3, 3, 1}; sol=Minimize[(λ1*u1 + λ2*u2 + λ3*u3 - y) . (λ1*u1 + λ2*u2 + λ3*u3 - y), {λ1, λ2,λ3}] proj = λ1*u1 + λ2*u2 + λ3*u3 /. sol[[2]] ``` [![enter image description...
``` W = {{1, 1, 0, 1}, {-1, 3, 1, -2}, {-1, 0, 1, 1}}; y = {4, 3, 3, 1}; ``` Find the coefficients `x` that minimize the squared deviation: ``` x = LeastSquares[Transpose[W], y] (* {8/3, 2/5, 0} *) ``` From this, calculate the vector `z` that approximates `y` optimally in the least-squares sense: ``` z = Tr...
59,482,652
I have the following js code structure; ``` Promise_1.then(function(){ for(){ Promise2.then(function(){ ... }) } }).then( Promise_3.then(function(){ for(){ Promise4.then(function(){ ... }) } }) ).then( function(){ // SOME CODE } ) ``` I want to execute SOME C...
2019/12/25
[ "https://Stackoverflow.com/questions/59482652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9108471/" ]
```html <form action="{{ route('accounts.update', $user->id) }}" method="post"> @csrf @method('PUT') <div class="form-group row"> <label for="balance" class="col-md-4 col-form-label text-md-right">{{ __('Enter Client\'s Balance :') }}</label>...
I think you should remove **name="\_method"** attribute from your **form** tag because it's reserved by laravel for hidden inputs example : ``` <input type="hidden" name="_method" value="PUT"> // same as @method('PUT') ``` see : <https://laravel.com/docs/5.7/routing#form-method-spoofing>
59,482,652
I have the following js code structure; ``` Promise_1.then(function(){ for(){ Promise2.then(function(){ ... }) } }).then( Promise_3.then(function(){ for(){ Promise4.then(function(){ ... }) } }) ).then( function(){ // SOME CODE } ) ``` I want to execute SOME C...
2019/12/25
[ "https://Stackoverflow.com/questions/59482652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9108471/" ]
```html <form action="{{ route('accounts.update', $user->id) }}" method="post"> @csrf @method('PUT') <div class="form-group row"> <label for="balance" class="col-md-4 col-form-label text-md-right">{{ __('Enter Client\'s Balance :') }}</label>...
HTML form is not supporting PUT/PATCH method. So when you want to perform PUT/PATCH action using HTML form in Laravel, you have to add `@method('put')` and set form method as `method="post"`. So you can change your code as: ``` <form action="{{ route('accounts.update', $user->id) }}" method="post"> @csrf @method...
67,260,014
I've been reading F# articles and they use single case variants to create distinct incompatible types. However in Ocaml I can use private module types or abstract types to create distinct types. Is it common in Ocaml to use single case variants like in F# or Haskell?
2021/04/26
[ "https://Stackoverflow.com/questions/67260014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118651/" ]
For what it's worth it seems to me this wasn't particularly common in OCaml in the past. I've been reluctant to do this myself because it has always cost something: the representation of `type t = T of int` was always bigger than just the representation of an int. However recently (probably a few years) it's possible...
Yet another case for single-constructor types (although it does not quite match your initial question of creating distinct types): fancy records. (By contrast with other answers, this is more a syntactic convenience than a fundamental feature.) Indeed, using a [relatively recent feature](https://www.ocaml.org/releases...
67,260,014
I've been reading F# articles and they use single case variants to create distinct incompatible types. However in Ocaml I can use private module types or abstract types to create distinct types. Is it common in Ocaml to use single case variants like in F# or Haskell?
2021/04/26
[ "https://Stackoverflow.com/questions/67260014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118651/" ]
For what it's worth it seems to me this wasn't particularly common in OCaml in the past. I've been reluctant to do this myself because it has always cost something: the representation of `type t = T of int` was always bigger than just the representation of an int. However recently (probably a few years) it's possible...
Another use case of single-constructor (polymorphic) variants is documenting something to the caller of a function. For instance, perhaps there's a caveat with the value that your function returns: ``` val create : unit -> [ `Must_call_close of t ] ``` Using a variant forces the caller of your function to pattern-ma...
67,260,014
I've been reading F# articles and they use single case variants to create distinct incompatible types. However in Ocaml I can use private module types or abstract types to create distinct types. Is it common in Ocaml to use single case variants like in F# or Haskell?
2021/04/26
[ "https://Stackoverflow.com/questions/67260014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118651/" ]
Another specialized use case fo a single constructor variant is to erase some type information with a GADT (and an existential quantification). For instance, in ```ml type showable = Show: 'a * ('a -> string) -> showable let show (Show (x,f)) = f x let showables = [ Show (0,string_of_int); Show("string", Fun.id) ] ``...
Yet another case for single-constructor types (although it does not quite match your initial question of creating distinct types): fancy records. (By contrast with other answers, this is more a syntactic convenience than a fundamental feature.) Indeed, using a [relatively recent feature](https://www.ocaml.org/releases...
67,260,014
I've been reading F# articles and they use single case variants to create distinct incompatible types. However in Ocaml I can use private module types or abstract types to create distinct types. Is it common in Ocaml to use single case variants like in F# or Haskell?
2021/04/26
[ "https://Stackoverflow.com/questions/67260014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118651/" ]
Another specialized use case fo a single constructor variant is to erase some type information with a GADT (and an existential quantification). For instance, in ```ml type showable = Show: 'a * ('a -> string) -> showable let show (Show (x,f)) = f x let showables = [ Show (0,string_of_int); Show("string", Fun.id) ] ``...
Another use case of single-constructor (polymorphic) variants is documenting something to the caller of a function. For instance, perhaps there's a caveat with the value that your function returns: ``` val create : unit -> [ `Must_call_close of t ] ``` Using a variant forces the caller of your function to pattern-ma...
67,260,014
I've been reading F# articles and they use single case variants to create distinct incompatible types. However in Ocaml I can use private module types or abstract types to create distinct types. Is it common in Ocaml to use single case variants like in F# or Haskell?
2021/04/26
[ "https://Stackoverflow.com/questions/67260014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/118651/" ]
Yet another case for single-constructor types (although it does not quite match your initial question of creating distinct types): fancy records. (By contrast with other answers, this is more a syntactic convenience than a fundamental feature.) Indeed, using a [relatively recent feature](https://www.ocaml.org/releases...
Another use case of single-constructor (polymorphic) variants is documenting something to the caller of a function. For instance, perhaps there's a caveat with the value that your function returns: ``` val create : unit -> [ `Must_call_close of t ] ``` Using a variant forces the caller of your function to pattern-ma...
32,393,748
I have a SQL Server table like this ``` ProdID Code -------- ------ 1001 A 2001 B 1001 C 3001 D 3001 E 1001 F 1001 Z 2001 G 2001 H 3001 ...
2015/09/04
[ "https://Stackoverflow.com/questions/32393748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Try this ``` ;With cte As (Select ProdID, Code, Row_Number() Over(Partition By ProdID Order By Code Desc) As rn, Count(*) Over(Partition By ProdID) As NbrRows From mytable) Select ProdID, Code From cte Where rn <= 2 And NbrRows > 1 Order By ProdID, Code desc; ``` **`[sql fiddle demo](http://sqlfiddle.com/#!6/9ee7...
Using `ROW_NUMBER` and `COUNT`: [**SQL Fiddle**](http://sqlfiddle.com/#!3/152f7/1/0) ``` ;WITH cte AS( SELECT *, rn = ROW_NUMBER() OVER(PARTITION BY ProdID ORDER BY Code DESC), cnt = COUNT(*) OVER(PARTITION BY ProdID) FROM tbl ) SELECT ProdID, Code FROM cte WHERE rn <= 2 AND cnt >=...
33,628,183
I want to do the following: ``` button.setBackgroundResource(R.layout.caracbout); ``` But this function only works like this: ``` button.setBackgroundResource(R.drawable.xxxx); ``` my button is ``` <Button android:layout_width="0dp" android:layout_height="match_parent" andro...
2015/11/10
[ "https://Stackoverflow.com/questions/33628183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5546215/" ]
You can set the background like this, ``` Button btn = (Button) findViewById(R.id.btn); btn.setBackgroundResource(R.drawable.ic_launcher); ```
Layouts are not background images. They contain the information which is necessary to draw application views/screens. To draw a button with custom background you can use drawable resource file. <http://developer.android.com/guide/topics/resources/drawable-resource.html>
33,628,183
I want to do the following: ``` button.setBackgroundResource(R.layout.caracbout); ``` But this function only works like this: ``` button.setBackgroundResource(R.drawable.xxxx); ``` my button is ``` <Button android:layout_width="0dp" android:layout_height="match_parent" andro...
2015/11/10
[ "https://Stackoverflow.com/questions/33628183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5546215/" ]
create your caracbout2 xml file in directory drawable and use R.drawable.caracbout2 in java you can learn from [this](http://developer.android.com/intl/zh-cn/guide/topics/resources/drawable-resource.html) for drawable resource.
Layouts are not background images. They contain the information which is necessary to draw application views/screens. To draw a button with custom background you can use drawable resource file. <http://developer.android.com/guide/topics/resources/drawable-resource.html>
2,156,505
When it's $\frac z{z-1}$ the answer in the discrete domain can be found in the general tables = $u[n]$, but for $\frac z{z+1}$ I can't find the rule. Some examples say it's $(−1)^nu[n] $ or $a^k\cos(k\pi)$, which one is it and why?
2017/02/22
[ "https://math.stackexchange.com/questions/2156505", "https://math.stackexchange.com", "https://math.stackexchange.com/users/299075/" ]
To be well defined, the $z$ transform must include the ROC (radius of convergence). You can see that in this example. You can write: $$\frac{z}{z+1}=\frac{1}{1+z^{-1}}=\sum\_{n=0}^{\infty}(-z^{-1})^n \tag{1}$$ which is the $Z$ transform of $(−1)^nu[n]$ but also you can write $$\frac{z}{z+1}=z \frac{1}{1+z}=z \sum...
$$\frac{z}{z+1}=\frac{1}{1-(-z^{-1})}=\sum\_{n=0}^{\infty}(-z^{-1})^n=\sum\_{n=0}^{\infty}(-1)^nz^{-n}=\mathcal{Z}\{(-1)^nu[n]\},\quad |z|>1$$
1,640,512
I have a Fritzbox 7490. I set the IPv4 DNS Server to OpenDNS (208.67.222.222 and 208.67.220.220), but somehow these server are not used when I make requests. How I noticed it: There is a Domain that is being blocked by my ISP (it's s.to, but I don't know what is on there I just used it for my test scenario because I ...
2021/04/09
[ "https://superuser.com/questions/1640512", "https://superuser.com", "https://superuser.com/users/1055592/" ]
Wireless networks are considered to be an increased risk over wired networks by some. Previous wireless security protocols (e.g. [WEP](https://en.wikipedia.org/wiki/Wired_Equivalent_Privacy#Weak_security), [WPA1/ WPA2](https://en.wikipedia.org/wiki/Wi-Fi_Protected_Access#Security_issues)) have shown to contain serious ...
The most common type of wireless security is Wi-Fi security which is not considered secure in Windows 10 despite the presence of some safeguards such as encryption, reliability, SSID, use VPN, and integrity. This is because: 1. It uses an older security standard. For example, this can occur if you connect to a Wi-Fi n...
112,306
* I'm running OS X 10.9 with Server 3.0.1 on a Mac residing on a private subnet sitting behind a router whose WAN port is plugged into a cable modem, hence the ISP is a well known cable internet service provider. * This server has its DNS correctly configured (i.e., the result of "sudo changeip -checkhostname" on the s...
2013/11/30
[ "https://apple.stackexchange.com/questions/112306", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63748/" ]
This problem was been resolved. The ASUS "Dark Knight" router which was providing the private LAN (NAT) and port forwarding to the Mac running OS X Server has a firmware bug. The bug manifest by DROPPING the ESTABLISHED TCP connection on port 2195 between the Mac running OS X Server and APNS, after two hours of quiesce...
My first steps in diagnosis would be to forward both those ports and see what happens (I might even put the machine into a DMZ for a couple of hours). I'd then put a packet sniffer on the 17.0.0.0/8 address block and see what traffic on what ports is going across the net when it does work and when it doesn't.
112,306
* I'm running OS X 10.9 with Server 3.0.1 on a Mac residing on a private subnet sitting behind a router whose WAN port is plugged into a cable modem, hence the ISP is a well known cable internet service provider. * This server has its DNS correctly configured (i.e., the result of "sudo changeip -checkhostname" on the s...
2013/11/30
[ "https://apple.stackexchange.com/questions/112306", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63748/" ]
We originally filed a bug report regarding this problem with Apple (at the time we weren't deterministically certain it was a bug, but considering the efforts we made to resolve this with Apple Enterprise support, it seemed probabilistically to be a bug). Recently Apple engineering responded to us stating they have att...
My first steps in diagnosis would be to forward both those ports and see what happens (I might even put the machine into a DMZ for a couple of hours). I'd then put a packet sniffer on the 17.0.0.0/8 address block and see what traffic on what ports is going across the net when it does work and when it doesn't.
112,306
* I'm running OS X 10.9 with Server 3.0.1 on a Mac residing on a private subnet sitting behind a router whose WAN port is plugged into a cable modem, hence the ISP is a well known cable internet service provider. * This server has its DNS correctly configured (i.e., the result of "sudo changeip -checkhostname" on the s...
2013/11/30
[ "https://apple.stackexchange.com/questions/112306", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63748/" ]
This problem was been resolved. The ASUS "Dark Knight" router which was providing the private LAN (NAT) and port forwarding to the Mac running OS X Server has a firmware bug. The bug manifest by DROPPING the ESTABLISHED TCP connection on port 2195 between the Mac running OS X Server and APNS, after two hours of quiesce...
I believe that @user3051849 has the root cause, but in my case I can't swap out the router. So, enclosed are my two workarounds. As of OSX Server 3.1.2 this problem remains. Use Apple's launchctl to create a job that runs every 2 hours to restart the mail server. So, this should only be used on mail servers that are n...
112,306
* I'm running OS X 10.9 with Server 3.0.1 on a Mac residing on a private subnet sitting behind a router whose WAN port is plugged into a cable modem, hence the ISP is a well known cable internet service provider. * This server has its DNS correctly configured (i.e., the result of "sudo changeip -checkhostname" on the s...
2013/11/30
[ "https://apple.stackexchange.com/questions/112306", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/63748/" ]
We originally filed a bug report regarding this problem with Apple (at the time we weren't deterministically certain it was a bug, but considering the efforts we made to resolve this with Apple Enterprise support, it seemed probabilistically to be a bug). Recently Apple engineering responded to us stating they have att...
I believe that @user3051849 has the root cause, but in my case I can't swap out the router. So, enclosed are my two workarounds. As of OSX Server 3.1.2 this problem remains. Use Apple's launchctl to create a job that runs every 2 hours to restart the mail server. So, this should only be used on mail servers that are n...
201,761
I know that there are differences in measurement due to quantisation, probability, and collapse in quantum physics, but I am having trouble explaining how these ideas relate to measurement in an understandable manner. In what ways does measurement in quantum mechanics differ from measurement in classical mechanics?
2015/08/21
[ "https://physics.stackexchange.com/questions/201761", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/89829/" ]
In quantum phyiscs we have a state. In classical physics we have a state. The former is function from configuration space at each time and the later is a point in configuration space for each time. What we call a measurement in classical physics reveals as much information as we want about the state without changing...
All the essential elements are already mentioned in this answer and the linked post in comments. So I'll try to give you more intuition with examples. In principle all measurements performed on a system, will disturb it in some way, be it a classical or quantum system. In the former case, the disturbance for the most...
69,014
I have been looking all over and either I can't find anything or I can't find anything that works... so here I am. How can I go about setting up SSL/HTTPS with regards to Mongrel? Thanks in advance!
2009/09/26
[ "https://serverfault.com/questions/69014", "https://serverfault.com", "https://serverfault.com/users/21287/" ]
You run it through a real webserver first, like nginx or Apache, which does the SSL work for you, and then passes back a header saying whether or not the connection was made via SSL (only important if you're doing things like redirecting if a needs-to-be-secure page was accessed without SSL). In theory, I guess you co...
I struggled with this for a while. Mongrel prefers 'The Ruby Way' which is different then the Apache way. Configure Apache HTTP to serve HTTPS traffic. Then proxy the plaintext/HTTP connections on the backend. 1. Install mod\_proxy. I actually had to recompile httpd to include proxy support. LoadModule proxy\_module...
69,014
I have been looking all over and either I can't find anything or I can't find anything that works... so here I am. How can I go about setting up SSL/HTTPS with regards to Mongrel? Thanks in advance!
2009/09/26
[ "https://serverfault.com/questions/69014", "https://serverfault.com", "https://serverfault.com/users/21287/" ]
It should of course be noted that Mongrel simply "doesn't do" SSL itself.
I struggled with this for a while. Mongrel prefers 'The Ruby Way' which is different then the Apache way. Configure Apache HTTP to serve HTTPS traffic. Then proxy the plaintext/HTTP connections on the backend. 1. Install mod\_proxy. I actually had to recompile httpd to include proxy support. LoadModule proxy\_module...
37,079,953
I have three model classes ``` public class Item1{ public int Id; public List<Item2> Item2List { get; set; } } public class Item2{ public int Id; //this is the FK public int Item1Id {get;set;} public Item1 Item1 {get;set;} //Not in db. Ignored field in EntityTypeConfiguration publ...
2016/05/06
[ "https://Stackoverflow.com/questions/37079953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6301786/" ]
What you want is not possible. Of course you can't populate a not-mapped property in an EF LINQ query, because that's the idea of not mapping it. But you already knew that. What you'd really like to do is something like this: ``` context.Item1s.Select(item1 => new Item1 { Id = item1.Id, Item2s = item1.Item2Li...
You are not using the ef conventions. Refer to <https://msdn.microsoft.com/en-us/data/jj819164.aspx> for that. You have to do something like this: --- ``` public class Item1{ public int Item1Id{get;set;} public ICollection<Item2> Item2s{ get; set; } } public class Item2{ public int Item2Id{get;set;} //No...
283,211
I want to use the Whitney Mann U test (i.e. Wilcoxon Rank Sum) test to test for differences in an ordinal outcome variable (say a 5 point Likert item) among two randomly selected samples. I've read a few articles online and I'm not sure what challenges are introduced when the data are in fact ordinal. Hopefully you all...
2017/06/02
[ "https://stats.stackexchange.com/questions/283211", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/14233/" ]
If you want to compare Likert item data from two groups with methods that I believe no one will object to, you have a couple of options. One is ordinal regression, which is very flexible for experimental design, and is relatively easy in some software packages. Another is the Cochran-Armitage test. The traditional fo...
Neither web site is entirely wrong but neither gives you the full story, either. I also think you are confusing the names of somewhat different tests. The Mann-Whitney and the Wilcoxon test are essentially the same and they are used to compare two distinct samples. The signed rank test, an extension of the the Wilcoxo...
53,297,935
I have problem when I custom font on Flutter My folder font myapp/fonts/SairaSemiCondensed-Bold.ttf here my pubspec.ymal ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/fonts:SairaSemiCondensed-Bold.ttf weight: 700 ``` I got error like this ``` Error on line 55, column 4 of pubspec.ya...
2018/11/14
[ "https://Stackoverflow.com/questions/53297935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8561296/" ]
Try ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/fonts:SairaSemiCondensed-Bold.ttf weight: 700 # indented more ``` but it's more likely that the indentation of the whole block is wrong (or missing). Try to indent all lines in your questions one tab or 2 spaces more. Indentation is ...
try removing the {:} colon in the fonts directory and write ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/SairaSemiCondensed-Bold.ttf weight: 700 # indented more ``` INSTEAD
53,297,935
I have problem when I custom font on Flutter My folder font myapp/fonts/SairaSemiCondensed-Bold.ttf here my pubspec.ymal ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/fonts:SairaSemiCondensed-Bold.ttf weight: 700 ``` I got error like this ``` Error on line 55, column 4 of pubspec.ya...
2018/11/14
[ "https://Stackoverflow.com/questions/53297935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8561296/" ]
Try ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/fonts:SairaSemiCondensed-Bold.ttf weight: 700 # indented more ``` but it's more likely that the indentation of the whole block is wrong (or missing). Try to indent all lines in your questions one tab or 2 spaces more. Indentation is ...
The issue was coming up with me. please recheck all lines in your `pubspec.yaml` file. it's spaces issue.
53,297,935
I have problem when I custom font on Flutter My folder font myapp/fonts/SairaSemiCondensed-Bold.ttf here my pubspec.ymal ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/fonts:SairaSemiCondensed-Bold.ttf weight: 700 ``` I got error like this ``` Error on line 55, column 4 of pubspec.ya...
2018/11/14
[ "https://Stackoverflow.com/questions/53297935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8561296/" ]
The issue was coming up with me. please recheck all lines in your `pubspec.yaml` file. it's spaces issue.
try removing the {:} colon in the fonts directory and write ``` fonts: - family: SairaSemiCondensed fonts: - asset: fonts/SairaSemiCondensed-Bold.ttf weight: 700 # indented more ``` INSTEAD
40,827,710
I am trying to learn functional programming and Scala, so I'm reading the "Functional Programming in Scala" by Chiusano and Bjarnason. I' m having trouble understanding what fold left and fold right methods do in case of a list. I've looked around here but I haven't find something beginner friendly. So the code provide...
2016/11/27
[ "https://Stackoverflow.com/questions/40827710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3342710/" ]
According to my experience, one of the best ways to workout the intuition is to see how it works on the very simple examples: ``` List(1, 3, 8).foldLeft(100)(_ - _) == ((100 - 1) - 3) - 8 == 88 List(1, 3, 8).foldRight(100)(_ - _) == 1 - (3 - (8 - 100)) == -94 ``` As you can see, `foldLeft/Right` just passes the elem...
Say you have a list of numbers, and you want to add them all up. How would you do that? You add the first and the second, then take the result of that, add that to the third, take the result of that, add it to the fourth.. and so on. That's what fold let's you do. ``` List(1,2,3,4,5).foldLeft(0)(_ + _) ``` The "+"...
60,077,241
`d = {1: ['a'], 3: ['b','c'], 4: ['a','d'], 5: ['b','c','d']}`, this is just an example. I have a large file of such key-values pair. My question is how can I find values that is present in multiple key-value pair. I want to fetch that key-value pair. For this example, the first value corresponding to key `1` is `'a'` ...
2020/02/05
[ "https://Stackoverflow.com/questions/60077241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10899026/" ]
In order to have an Excel-DNA function that allows passing in an *unknown* number of arguments at run-time, you need to use `params object[]` in your function arguments. ``` public static class MyFunctions { [ExcelFunction] public static object Hello(params object[] values) { return "Hello " + Date...
The others answers are useful if you'd like to allow multiple parameters, and perhaps easiest for an end user to use. But you could also pass the discontinuous ranges directly into the single `AllowReference=true` parameter you start with, by adding parentheses in the formula: `=Fnc1((A1,A5,A10:A12))` The single `Exc...
41,913
So if I have a custom function with a DB query within *template.php* such as ``` function innovista_get_page_children() { $result = db_query("SELECT link_path FROM {menu_links}"); return $result; } ``` and I have a content type specific template page, then how do I echo the results in the template file? I tried...
2012/09/06
[ "https://drupal.stackexchange.com/questions/41913", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/9568/" ]
Every theme function/template runs [`hook_preprocess_HOOK()`](http://api.drupal.org/hook_preprocess_hook) and [`hook_process_hook()`](http://api.drupal.org/hook_process_hook) before executing the function/template. `hook_preprocess_HOOK` is where you'd want to set up any new variables. The hook is passed an array of va...
First I dont suggest put your function in template.php directly, (you can put in in custom module) I suggest you act more professionaler in function, This code showed your are begginer in drupal developing, however . this code have to work because template.php function in exist form basic drupal bootstrapping. ...
41,913
So if I have a custom function with a DB query within *template.php* such as ``` function innovista_get_page_children() { $result = db_query("SELECT link_path FROM {menu_links}"); return $result; } ``` and I have a content type specific template page, then how do I echo the results in the template file? I tried...
2012/09/06
[ "https://drupal.stackexchange.com/questions/41913", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/9568/" ]
The error message itself is clear I think. You are trying to print an object as a string. otherwise, your query seems correct. ``` function innovista_get_page_children() { $result = db_query("SELECT link_path FROM {menu_links}"); return $result; } <?php $results = innovista_get_page_children(); print '<pre>'; f...
Every theme function/template runs [`hook_preprocess_HOOK()`](http://api.drupal.org/hook_preprocess_hook) and [`hook_process_hook()`](http://api.drupal.org/hook_process_hook) before executing the function/template. `hook_preprocess_HOOK` is where you'd want to set up any new variables. The hook is passed an array of va...
41,913
So if I have a custom function with a DB query within *template.php* such as ``` function innovista_get_page_children() { $result = db_query("SELECT link_path FROM {menu_links}"); return $result; } ``` and I have a content type specific template page, then how do I echo the results in the template file? I tried...
2012/09/06
[ "https://drupal.stackexchange.com/questions/41913", "https://drupal.stackexchange.com", "https://drupal.stackexchange.com/users/9568/" ]
The error message itself is clear I think. You are trying to print an object as a string. otherwise, your query seems correct. ``` function innovista_get_page_children() { $result = db_query("SELECT link_path FROM {menu_links}"); return $result; } <?php $results = innovista_get_page_children(); print '<pre>'; f...
First I dont suggest put your function in template.php directly, (you can put in in custom module) I suggest you act more professionaler in function, This code showed your are begginer in drupal developing, however . this code have to work because template.php function in exist form basic drupal bootstrapping. ...
463,530
Here is what I did to fix this problem * I installed the japanese language pack. * I unchecked the "Hide fonts according to your language settings" option. * I set the local language to Japanese and back to my language * I delete the FNTCACHE.DAT in C:\Windows\System32 There is a 50% chance that when I do a cold boot...
2012/08/19
[ "https://superuser.com/questions/463530", "https://superuser.com", "https://superuser.com/users/152913/" ]
It's just way too simple and easy. Create a file named 火.txt and place it on your desktop, then reboot. (Tested only on Win7) This will work because of font-caching. There are two main parts in the os that create the cache. One is the Windows Explorer, the other one the DirectWrite part of DX. The problem is, that DXW...
* Make sure you are also using Keyboard for Japanese language. * Also use the **Japanese locale**.
42,136,342
Is there a way to do this as an extension to Array as opposed to a switch statement that's going to grow and grow? ``` fileprivate var exteriorColorOptions = [ExteriorColorOption]() fileprivate var otherOptions = [SomeOtherOption]() : more options func add(option:FilteredOption) { switch(op...
2017/02/09
[ "https://Stackoverflow.com/questions/42136342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/175956/" ]
This should work: ``` extension Array { mutating func appendIfPossible<T>(newElement: T) { if let e = newElement as? Element { append(e) } } } ``` The conditional cast `newElement as? Element` succeeds if the new element conforms to or is an instance of (a subclass of) the arrays...
Actually the answer is correct but maybe not exactly what you want: ``` extension Array { mutating func safeAppend(newElement: Element?) { if let element = newElement { append(element) } } ``` This one will throw a compile time error in case you try appending an element thats not of the arr...
43,099,851
I have two collection views. Tapping unselected cells in Collection View 1 selects them, and adds the selected cell to Collection View 2. Tapping on selected cells in Collection View 1 (allHobbiesCV) will unselect them and remove them from Collection View 2 (myHobbiesCV). Essentially, all it's doing is toggling. Cells...
2017/03/29
[ "https://Stackoverflow.com/questions/43099851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4220994/" ]
You can use Information\_schema or sys.columns ``` select * from information_schema.columns where table_name = 'card' and table_schema = 'schema1' except select * from information_schema.columns where table_name = 'card' and table_schema = 'schema2' ``` --With full join ``` select * from information_schema.columns ...
``` select Column_Name from information_schema.columns where table_name = 'sysjobs' and table_schema = 'YourSchema1' except select Column_Name from information_schema.columns where table_name = 'sysjobservers' and table_schema = 'YourSchema2' ``` Also, what you can do it is create a variable and loop through all sche...
43,099,851
I have two collection views. Tapping unselected cells in Collection View 1 selects them, and adds the selected cell to Collection View 2. Tapping on selected cells in Collection View 1 (allHobbiesCV) will unselect them and remove them from Collection View 2 (myHobbiesCV). Essentially, all it's doing is toggling. Cells...
2017/03/29
[ "https://Stackoverflow.com/questions/43099851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4220994/" ]
You can use Information\_schema or sys.columns ``` select * from information_schema.columns where table_name = 'card' and table_schema = 'schema1' except select * from information_schema.columns where table_name = 'card' and table_schema = 'schema2' ``` --With full join ``` select * from information_schema.columns ...
I tried to add one column in my second schema and wrote following query adn I got the output what I want. ``` select * from information_schema.columns t1 where t1.table_name = 'card' and t1.table_schema = 'Custom' and t1.column_name not in(select t2.column_name from information_schema.columns t2 where t2.table...
10,848
I'm building a MOC to scale with the [Saturn V set](https://rads.stackoverflow.com/amzn/click/B071G3QMS2) and am having trouble figuring out how tall the 1st stage engines are but the entire thing would be really helpful! Thanks!
2019/01/12
[ "https://bricks.stackexchange.com/questions/10848", "https://bricks.stackexchange.com", "https://bricks.stackexchange.com/users/11182/" ]
I've been contemplating this question for quite a while. In the [great tradition](https://bricks.stackexchange.com/a/1953/6174) of this site I felt this needed practical verification. I decided to make a ruler based on scaling up set [5005107, LEGO Buildable Ruler](https://brickset.com/sets/5005107-1/LEGO-Buildable-Rul...
On the box the entire rocket is shown to be 100cm. I just measured the first stage, that is 40,7cm. Else you can go to service.lego.com and download the instructions aand start counting/calculating (the studs face in different directions, so you can't just count).
10,848
I'm building a MOC to scale with the [Saturn V set](https://rads.stackoverflow.com/amzn/click/B071G3QMS2) and am having trouble figuring out how tall the 1st stage engines are but the entire thing would be really helpful! Thanks!
2019/01/12
[ "https://bricks.stackexchange.com/questions/10848", "https://bricks.stackexchange.com", "https://bricks.stackexchange.com/users/11182/" ]
Other answers seem to be focused on stage dimensions, rather than engines as asked in the question, so I'll address that. Scaling is a pretty easy math. Stud is 8 mm and brick height is 9.6 mm. Given that the entire 100 cm (1000 mm) Saturn V rocket is 125 studs or 104 bricks and half plate high (104.166667). The rea...
On the box the entire rocket is shown to be 100cm. I just measured the first stage, that is 40,7cm. Else you can go to service.lego.com and download the instructions aand start counting/calculating (the studs face in different directions, so you can't just count).
10,848
I'm building a MOC to scale with the [Saturn V set](https://rads.stackoverflow.com/amzn/click/B071G3QMS2) and am having trouble figuring out how tall the 1st stage engines are but the entire thing would be really helpful! Thanks!
2019/01/12
[ "https://bricks.stackexchange.com/questions/10848", "https://bricks.stackexchange.com", "https://bricks.stackexchange.com/users/11182/" ]
I've been contemplating this question for quite a while. In the [great tradition](https://bricks.stackexchange.com/a/1953/6174) of this site I felt this needed practical verification. I decided to make a ruler based on scaling up set [5005107, LEGO Buildable Ruler](https://brickset.com/sets/5005107-1/LEGO-Buildable-Rul...
Other answers seem to be focused on stage dimensions, rather than engines as asked in the question, so I'll address that. Scaling is a pretty easy math. Stud is 8 mm and brick height is 9.6 mm. Given that the entire 100 cm (1000 mm) Saturn V rocket is 125 studs or 104 bricks and half plate high (104.166667). The rea...
36,346,597
I want to use numpy for a program I have to run and I want to do it in the IDLE IDE. I have installed the numpy binary from online, but when I try running "import numpy" and then some numpy commands in my script, but the python shell returns an error saying ``` Traceback (most recent call last): File "/Users/Admin/D...
2016/04/01
[ "https://Stackoverflow.com/questions/36346597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6142712/" ]
The title is misleading in the following sense. You do not want to import a module to IDLE. You want to import it to the python that is running your code. When running IDLE, this currently is the same python running IDLE. To find which python is running, the following should work anywhere on any recent python, either d...
To install packages without affecting anaconda's configuration you can use [pip from within IDLE](https://stackoverflow.com/questions/12332975/installing-python-module-within-code): ``` import pip pip.main(["install","numpy"]) ``` In later versions this is no longer directly exposed, [since doing this in production ...
36,346,597
I want to use numpy for a program I have to run and I want to do it in the IDLE IDE. I have installed the numpy binary from online, but when I try running "import numpy" and then some numpy commands in my script, but the python shell returns an error saying ``` Traceback (most recent call last): File "/Users/Admin/D...
2016/04/01
[ "https://Stackoverflow.com/questions/36346597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6142712/" ]
To install packages without affecting anaconda's configuration you can use [pip from within IDLE](https://stackoverflow.com/questions/12332975/installing-python-module-within-code): ``` import pip pip.main(["install","numpy"]) ``` In later versions this is no longer directly exposed, [since doing this in production ...
I was getting error > > > > > > > > > > > > import numpy as npa > > > > > > > > > > > > > > > > > > Traceback (most recent call last): File "", line 1, in import numpy as np ModuleNotFoundError: No module named 'numpy' I went to below path from cmd (admin) C:\Users\\AppData\Local\Programs\Python\Py...
36,346,597
I want to use numpy for a program I have to run and I want to do it in the IDLE IDE. I have installed the numpy binary from online, but when I try running "import numpy" and then some numpy commands in my script, but the python shell returns an error saying ``` Traceback (most recent call last): File "/Users/Admin/D...
2016/04/01
[ "https://Stackoverflow.com/questions/36346597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6142712/" ]
The title is misleading in the following sense. You do not want to import a module to IDLE. You want to import it to the python that is running your code. When running IDLE, this currently is the same python running IDLE. To find which python is running, the following should work anywhere on any recent python, either d...
I was getting error > > > > > > > > > > > > import numpy as npa > > > > > > > > > > > > > > > > > > Traceback (most recent call last): File "", line 1, in import numpy as np ModuleNotFoundError: No module named 'numpy' I went to below path from cmd (admin) C:\Users\\AppData\Local\Programs\Python\Py...
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
Although not free I have had good experience using Red-Gates [SQL Compare tool](http://www.red-gate.com/products/SQL_Compare/index.htm). It worked for me in the past. They have a free trial available which may be good enough to solve your current issue.
There are several database compare tools out there. One that I've always like is SQLCompare by [Red Gate](http://www.red-gate.com). You can also try using: ``` SELECT name FROM sys.objects WHERE modify_date > @cutoffdate ``` In SQL 2000 that wouldn't have always worked, because using ALTER didn't update the date co...
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
you can also use the following code snipet ``` USE AdventureWorks2008; GO SELECT SprocName=name, create_date, modify_date FROM sys.objects WHERE type = 'P' AND name = 'uspUpdateEmployeeHireInfo' GO ```
There are several database compare tools out there. One that I've always like is SQLCompare by [Red Gate](http://www.red-gate.com). You can also try using: ``` SELECT name FROM sys.objects WHERE modify_date > @cutoffdate ``` In SQL 2000 that wouldn't have always worked, because using ALTER didn't update the date co...
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
Although not free I have had good experience using Red-Gates [SQL Compare tool](http://www.red-gate.com/products/SQL_Compare/index.htm). It worked for me in the past. They have a free trial available which may be good enough to solve your current issue.
You can use following type of query to find modified stored procedures , you can use any number then 7 as per your needs ``` SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 7 ```
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
There are some special cases where scripts might not give optimal results. One is deleting stored procedures or other objects in dev environment – you won’t catch this using system views because object won’t exist there any longer. Also, I’m not really sure this approach can work on changes such as permissions and si...
Although not free I have had good experience using Red-Gates [SQL Compare tool](http://www.red-gate.com/products/SQL_Compare/index.htm). It worked for me in the past. They have a free trial available which may be good enough to solve your current issue.
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
instead of using sysobjects which is not recommended anymore use sys.procedures ``` select name,create_date,modify_date from sys.procedures order by modify_date desc ``` you can do the where clause yourself but this will list it in order of modification date descending
There are some special cases where scripts might not give optimal results. One is deleting stored procedures or other objects in dev environment – you won’t catch this using system views because object won’t exist there any longer. Also, I’m not really sure this approach can work on changes such as permissions and si...
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
instead of using sysobjects which is not recommended anymore use sys.procedures ``` select name,create_date,modify_date from sys.procedures order by modify_date desc ``` you can do the where clause yourself but this will list it in order of modification date descending
you can also use the following code snipet ``` USE AdventureWorks2008; GO SELECT SprocName=name, create_date, modify_date FROM sys.objects WHERE type = 'P' AND name = 'uspUpdateEmployeeHireInfo' GO ```
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
You can execute this query to find all stored procedures modified in the last x number of days: ``` SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < X ```
You can use following type of query to find modified stored procedures , you can use any number then 7 as per your needs ``` SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 7 ```
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
There are some special cases where scripts might not give optimal results. One is deleting stored procedures or other objects in dev environment – you won’t catch this using system views because object won’t exist there any longer. Also, I’m not really sure this approach can work on changes such as permissions and si...
There are several database compare tools out there. One that I've always like is SQLCompare by [Red Gate](http://www.red-gate.com). You can also try using: ``` SELECT name FROM sys.objects WHERE modify_date > @cutoffdate ``` In SQL 2000 that wouldn't have always worked, because using ALTER didn't update the date co...
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
You can execute this query to find all stored procedures modified in the last x number of days: ``` SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < X ```
Although not free I have had good experience using Red-Gates [SQL Compare tool](http://www.red-gate.com/products/SQL_Compare/index.htm). It worked for me in the past. They have a free trial available which may be good enough to solve your current issue.
85,036
I need to manually migrate modified stored procedures from a DEV SQL Server 2005 database instance to a TEST instance. Except for the changes I'm migrating, the databases have the same schemas. How can I quickly identify which stored procedures have been modified in the DEV database for migration to the TEST instance? ...
2008/09/17
[ "https://Stackoverflow.com/questions/85036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16137/" ]
There are some special cases where scripts might not give optimal results. One is deleting stored procedures or other objects in dev environment – you won’t catch this using system views because object won’t exist there any longer. Also, I’m not really sure this approach can work on changes such as permissions and si...
You can use following type of query to find modified stored procedures , you can use any number then 7 as per your needs ``` SELECT name FROM sys.objects WHERE type = 'P' AND DATEDIFF(D,modify_date, GETDATE()) < 7 ```
6,753,076
I have a classlibrary project, then add a new empty report .rdlc, when compiled throw this error > > "The report definition is not valid. Details: the report definition has an invalid target namespace 'http://schemas.microsoft.sqlserver.reporting/2008/01/reportdefinition' which cannot be upgraded" > > > This cann...
2011/07/19
[ "https://Stackoverflow.com/questions/6753076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/852719/" ]
I had a similar issue today and I found solution [here](http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/47ecd315-6372-46cf-b319-df098334fc74). Thanks Jim Lafler. My "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\ReportingServices\Microsoft.ReportingServices.targets" file had changed...
Try changing the namespace. Open your **.rdlc** file in text/xml editor and change the namespace to ``` <Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" ```
6,286,610
I downloaded Firefox 4 today, and realized my site does not work as expected. As I looked for answers over the internet, I found solutions that called for adding the inline script by way of `document.write('<script src="path/js/inlineScript.js" type="text/javascript"><\/script>')`. I copied and pasted all of my inli...
2011/06/08
[ "https://Stackoverflow.com/questions/6286610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552085/" ]
Handling (to me) means taking appropriate action to resume the flow of your application. If you rethrow the exception, then you haven't handled it. Logging would be one case where you might rethrow an exception. An example of a exception that can be handled: you are running a service that notifies a particular user of...
Outside of the key framework exceptions which cannot be caught by the CLR (StackOverflow, OutOfMemory, etc) there are several exceptions that generally should not be caught as they represent developer errors that should be addressed during development. While logging the exceptions can be seen as a mechanism to "handle"...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
If you check out the source of the function `comment_form()`, you'll see it doesn't even print a class on the input; ``` <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> ``` I'm guessing you need to add a class for styli...
I was searching for the same solution and at last i found the solution, the below code worked perfectly for me, I wanted to add "btn btn-primary" class to the submit button in comment form. ``` ob_start(); comment_form( $args ); $form = ob_get_clean(); $form = str_replace('class="comment-form"','class="comment-form"'...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
I'm working with the Foundation framework as well. I've found that the easiest way to add a class to a non-filterable element is to do it with jQuery. ``` jQuery(document).ready(function($) { //noconflict wrapper $('input#submit').addClass('button'); });//end noconflict ```
I suggest those who have this problem to set a style for "post-comment" id, like what i did: ``` #post-comment { background: none repeat scroll 0 0 transparent; border: 1px solid #FFFFFF; padding: 8px 20px; float: left;} ``` good luck! :)
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
From WordPress Version 4.1 ([trac ticket #20446](https://core.trac.wordpress.org/ticket/20446)) it's now added to pass your own class as an argument of `comment_form($args)` using `'class_submit'` array key: ``` $args = array( 'class_submit' => 'btn btn-default' ); ``` No need to do extra hard work. (Edited the Code...
Why do you need a class on the submit button? You can give it an ID, as you have discovered, and that's all you need for styling it. ``` comment_form(array('id_submit'=>'buttonPro')); ``` Then to style it: ``` input#buttonPro {...} ``` Simple. Or, if you prefer to use classes only for some reason: ``` .form-subm...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
Why do you need a class on the submit button? You can give it an ID, as you have discovered, and that's all you need for styling it. ``` comment_form(array('id_submit'=>'buttonPro')); ``` Then to style it: ``` input#buttonPro {...} ``` Simple. Or, if you prefer to use classes only for some reason: ``` .form-subm...
I'm going to reply (late) since I was looking for an answer to this and decided to tackle it myself. First, to answer the question "why add a class?"... In my case, I chose to use a UI framework called [Foundation](http://foundation.zurb.com/) to design my most recent theme for my personal blog. I chose it precisely b...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
If you check out the source of the function `comment_form()`, you'll see it doesn't even print a class on the input; ``` <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> ``` I'm guessing you need to add a class for styli...
I suggest those who have this problem to set a style for "post-comment" id, like what i did: ``` #post-comment { background: none repeat scroll 0 0 transparent; border: 1px solid #FFFFFF; padding: 8px 20px; float: left;} ``` good luck! :)
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
I suggest those who have this problem to set a style for "post-comment" id, like what i did: ``` #post-comment { background: none repeat scroll 0 0 transparent; border: 1px solid #FFFFFF; padding: 8px 20px; float: left;} ``` good luck! :)
I'm going to reply (late) since I was looking for an answer to this and decided to tackle it myself. First, to answer the question "why add a class?"... In my case, I chose to use a UI framework called [Foundation](http://foundation.zurb.com/) to design my most recent theme for my personal blog. I chose it precisely b...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
I was searching for the same solution and at last i found the solution, the below code worked perfectly for me, I wanted to add "btn btn-primary" class to the submit button in comment form. ``` ob_start(); comment_form( $args ); $form = ob_get_clean(); $form = str_replace('class="comment-form"','class="comment-form"'...
I suggest those who have this problem to set a style for "post-comment" id, like what i did: ``` #post-comment { background: none repeat scroll 0 0 transparent; border: 1px solid #FFFFFF; padding: 8px 20px; float: left;} ``` good luck! :)
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
If you check out the source of the function `comment_form()`, you'll see it doesn't even print a class on the input; ``` <input name="submit" type="submit" id="<?php echo esc_attr( $args['id_submit'] ); ?>" value="<?php echo esc_attr( $args['label_submit'] ); ?>" /> ``` I'm guessing you need to add a class for styli...
Why do you need a class on the submit button? You can give it an ID, as you have discovered, and that's all you need for styling it. ``` comment_form(array('id_submit'=>'buttonPro')); ``` Then to style it: ``` input#buttonPro {...} ``` Simple. Or, if you prefer to use classes only for some reason: ``` .form-subm...
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
From WordPress Version 4.1 ([trac ticket #20446](https://core.trac.wordpress.org/ticket/20446)) it's now added to pass your own class as an argument of `comment_form($args)` using `'class_submit'` array key: ``` $args = array( 'class_submit' => 'btn btn-default' ); ``` No need to do extra hard work. (Edited the Code...
I'm working with the Foundation framework as well. I've found that the easiest way to add a class to a non-filterable element is to do it with jQuery. ``` jQuery(document).ready(function($) { //noconflict wrapper $('input#submit').addClass('button'); });//end noconflict ```
19,710
How do I add a class to the comment submit button? The simplified function `comment_form(array('id_submit'=>'buttonPro'));` obviously only changes the id and `class_submit` does not seem to exist. I have read through both [Otto's](http://ottopress.com/2010/wordpress-3-0-theme-tip-the-comment-form/) and [Beau's](http:...
2011/06/10
[ "https://wordpress.stackexchange.com/questions/19710", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/1057/" ]
From WordPress Version 4.1 ([trac ticket #20446](https://core.trac.wordpress.org/ticket/20446)) it's now added to pass your own class as an argument of `comment_form($args)` using `'class_submit'` array key: ``` $args = array( 'class_submit' => 'btn btn-default' ); ``` No need to do extra hard work. (Edited the Code...
I'm going to reply (late) since I was looking for an answer to this and decided to tackle it myself. First, to answer the question "why add a class?"... In my case, I chose to use a UI framework called [Foundation](http://foundation.zurb.com/) to design my most recent theme for my personal blog. I chose it precisely b...
57,160,129
Is it possible to pass types as function aguments as in the below example? ```py def test(*args): '''decorator implementation with asserts''' ... @test(str, int) def fn1(ma_chaine, mon_entier): return ma_chaine * mon_entier @test(int, int) def fn2(nb1, nb2): return nb1 * nb2 ``` or should I pass th...
2019/07/23
[ "https://Stackoverflow.com/questions/57160129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5539707/" ]
Does it work? ``` def test(obj, typ): if isinstance(obj, typ): print('Type Matches') return True return False test('mystring', str) "Type Matches" ``` Yes. Should you do this? [Probably not](https://stackoverflow.com/questions/19684434/best-way-to-check-function-arguments-in-python) [And...
Python function's argument doesn't care about its type. You can pass the arguments of any type, and can check the type of arguments. It is simple you can check the type of arguments what you get. try ``` def fn1(ma_chaine, mon_entier): if type(ma_chaine) == int && type(mon_entier) == int: return ma_...
208,124
I've been searching and I cannot find an answer on any of these sites that will work. I want to copy all of the contents of [this folder](ftp://ftp.eso.org/pub/qfits/) to my server. Which Linux command should I use to do that? I don't want to manually run through all of the objects in that folder, one at a time per se....
2015/06/07
[ "https://unix.stackexchange.com/questions/208124", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/91274/" ]
you can use something like ``` cd directory-where-you-want-to-put-the-files wget -r ftp://ftp.eso.org/pub/qfits/ ```
FTP? ``` #!/bin/sh # ftp://ftp.eso.org/pub/qfits/ HOST='ftp.eso.org' USER='anonymous' PASSWD='<your.email.address>' ftp -n $HOST <<EOF quote USER $USER quote PASS $PASSWD prompt off cd /pub/qfits ls mget * quit EOF exit 0 ```
64,631,230
Is there a way to disable the SAS authorization scheme for a Logic App HTTP-trigger? **In the documentation I read the following:** "Inbound calls to a request endpoint can use only one authorization scheme, either SAS or Azure Active Directory Open Authentication. Although using one scheme doesn't disable the other s...
2020/11/01
[ "https://Stackoverflow.com/questions/64631230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14558025/" ]
We can't disable the SAS authorization in logic app and according to some research, it seems we can't have it return an error in the case that SAS was used. For your requirement of disable SAS, you can go to [feedback page](https://feedback.azure.com/forums/34192--general-feedback) and raise a post to suggest develop t...
The Logic App only accepts authorization through either SAS or OAuth and it returns an error when both a SAS-query-parameter and Authorization-header are provided. This means there are two scenario's: * Authorization header is present, so authorization was acquired using OAuth * Authorization header is missing, so aut...
9,700,360
I've got liquid layout website that displays (8 x 240px) columns on 1920x1080px. There are no spaces between them. I added this to HEAD: ``` <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=yes,width=960" > <meta name="viewport" content="width=device-width; height=device-height;"> ``` I t...
2012/03/14
[ "https://Stackoverflow.com/questions/9700360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1074346/" ]
I haven´t used `meta viewport` before but it seems strange to set it twice and why use semicolon `;` in one and commas `,` in the other? This seems more right to me but I haven´t tested it; ``` <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1,maximum-scale=1,user-scalable=yes,wid...
The best way I've found is to use jquery to switch the viewport setting depending on screen size. ``` if($(window).width() >= 768) { // Change viewport for smaller devices $('meta[name=viewport]').attr('content','width=959'); } ```
22,597,229
I need to make a kind of time line like [this one](http://www.vintagesynth.com/timeline/), the best I get is to vertically align the item: **CSS** ``` ul { list-style-type: none; text-decoration: none; color: #000; background: none repeat scroll 0% 0% #EBEFF9; border: 1px solid #D9E...
2014/03/23
[ "https://Stackoverflow.com/questions/22597229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can add a `div` "wrapper" to your `ul` ans set it to [`float: left;`](https://developer.mozilla.org/en-US/docs/Web/CSS/float). Something like [this](http://jsfiddle.net/sPp52/2/). **HTML** ``` <div class="wrapper"> <h3>March</h3> <!-- If you have to use a list, you can use it like this. Each <li>...
Wrapping your elements in a floated div can get you there. ``` .box {float: left; margin-right: 5px;} ``` Full example: <http://jsfiddle.net/6hwAT/>
22,597,229
I need to make a kind of time line like [this one](http://www.vintagesynth.com/timeline/), the best I get is to vertically align the item: **CSS** ``` ul { list-style-type: none; text-decoration: none; color: #000; background: none repeat scroll 0% 0% #EBEFF9; border: 1px solid #D9E...
2014/03/23
[ "https://Stackoverflow.com/questions/22597229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can add a `div` "wrapper" to your `ul` ans set it to [`float: left;`](https://developer.mozilla.org/en-US/docs/Web/CSS/float). Something like [this](http://jsfiddle.net/sPp52/2/). **HTML** ``` <div class="wrapper"> <h3>March</h3> <!-- If you have to use a list, you can use it like this. Each <li>...
You can right click on [that page](http://www.vintagesynth.com/timeline/) and select `View Page Source` menu (if you are using `Chrome`) or similar menus in other browsers. Then you could see the source code for CSS and Javascript internally provided by developer of that page. For example the css code for styling timel...
22,597,229
I need to make a kind of time line like [this one](http://www.vintagesynth.com/timeline/), the best I get is to vertically align the item: **CSS** ``` ul { list-style-type: none; text-decoration: none; color: #000; background: none repeat scroll 0% 0% #EBEFF9; border: 1px solid #D9E...
2014/03/23
[ "https://Stackoverflow.com/questions/22597229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can add a `div` "wrapper" to your `ul` ans set it to [`float: left;`](https://developer.mozilla.org/en-US/docs/Web/CSS/float). Something like [this](http://jsfiddle.net/sPp52/2/). **HTML** ``` <div class="wrapper"> <h3>March</h3> <!-- If you have to use a list, you can use it like this. Each <li>...
You should wrap your `UL`s with floated `DIV`s elements so that you will be able to enjoy from columns syle. Take a look at my solution at jsFiddle: <http://jsfiddle.net/ynevet/cJDT9/> **CSS:** ``` .float-left { float: left; margin-right: 12px; } ul { list-style-type: none; text-decoration: none; ...
22,597,229
I need to make a kind of time line like [this one](http://www.vintagesynth.com/timeline/), the best I get is to vertically align the item: **CSS** ``` ul { list-style-type: none; text-decoration: none; color: #000; background: none repeat scroll 0% 0% #EBEFF9; border: 1px solid #D9E...
2014/03/23
[ "https://Stackoverflow.com/questions/22597229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can add a `div` "wrapper" to your `ul` ans set it to [`float: left;`](https://developer.mozilla.org/en-US/docs/Web/CSS/float). Something like [this](http://jsfiddle.net/sPp52/2/). **HTML** ``` <div class="wrapper"> <h3>March</h3> <!-- If you have to use a list, you can use it like this. Each <li>...
You need to wrap each month title and it's accompanying list within a container, apply a width to this container and float it to the left. As the months can be considered a list as well, it would make sense semantically to have an ordered list, with each month as a list item (which would constitute the container) and...
32,461,736
After migration website on wordpress to another server and another domain. I have website root in the same directory. I heard that there is some config in database of this plugin POLYLANG but have no idea where. I have an error like: > > Class 'PLL\_Links\_' not found in /wp-content/plugins/polylang/include/model.php...
2015/09/08
[ "https://Stackoverflow.com/questions/32461736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2998059/" ]
This question can be still actual for some people. I've spent tons of hours on it. And the trick that helped me is to fall back to v.0.9.8 from here - <https://wordpress.org/plugins/polylang/advanced/>. Then get v.1.9.3 and unpack it to plugin folder. Then you are good to go with v.2+
I got here because Polylang 2.3.1 was throwing a similar error after a database migration: ``` Class 'PLL_Links_' not found in /wp-content/plugins/polylang/include/model.php on line 560 ``` If you look at the code in the model.php file referenced in the error, you can see that the plugin tries to retrieve a class na...
32,461,736
After migration website on wordpress to another server and another domain. I have website root in the same directory. I heard that there is some config in database of this plugin POLYLANG but have no idea where. I have an error like: > > Class 'PLL\_Links\_' not found in /wp-content/plugins/polylang/include/model.php...
2015/09/08
[ "https://Stackoverflow.com/questions/32461736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2998059/" ]
This question can be still actual for some people. I've spent tons of hours on it. And the trick that helped me is to fall back to v.0.9.8 from here - <https://wordpress.org/plugins/polylang/advanced/>. Then get v.1.9.3 and unpack it to plugin folder. Then you are good to go with v.2+
I did a global domain replacement in the file when moving the database from local to live . The problem in the end was that the serialized array in wp\_option.option\_name = "polylang" is broken. You must change strings length in the domain array: ``` wp_option.option_name = ...."domains";a:1: {s:2:"en";s:21:"http://...
32,461,736
After migration website on wordpress to another server and another domain. I have website root in the same directory. I heard that there is some config in database of this plugin POLYLANG but have no idea where. I have an error like: > > Class 'PLL\_Links\_' not found in /wp-content/plugins/polylang/include/model.php...
2015/09/08
[ "https://Stackoverflow.com/questions/32461736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2998059/" ]
I had the same error, prior to the error was an "Undefined index" notice. It was caused by an empty `$this->options['force_lang']` var. This var is loaded from the `wp_options` table, the `option_name` within this table is `polylang`. There should be a JSON encoded array of `polylang` options. In my case the issue co...
I got here because Polylang 2.3.1 was throwing a similar error after a database migration: ``` Class 'PLL_Links_' not found in /wp-content/plugins/polylang/include/model.php on line 560 ``` If you look at the code in the model.php file referenced in the error, you can see that the plugin tries to retrieve a class na...
32,461,736
After migration website on wordpress to another server and another domain. I have website root in the same directory. I heard that there is some config in database of this plugin POLYLANG but have no idea where. I have an error like: > > Class 'PLL\_Links\_' not found in /wp-content/plugins/polylang/include/model.php...
2015/09/08
[ "https://Stackoverflow.com/questions/32461736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2998059/" ]
I had the same error, prior to the error was an "Undefined index" notice. It was caused by an empty `$this->options['force_lang']` var. This var is loaded from the `wp_options` table, the `option_name` within this table is `polylang`. There should be a JSON encoded array of `polylang` options. In my case the issue co...
I did a global domain replacement in the file when moving the database from local to live . The problem in the end was that the serialized array in wp\_option.option\_name = "polylang" is broken. You must change strings length in the domain array: ``` wp_option.option_name = ...."domains";a:1: {s:2:"en";s:21:"http://...
53,643,238
We are trying to Consume REST API, for message processor which has some operation which might take more than configured timeout. Would like to know, if the timeout of Http call to API, will stop execution of API, or API will keep executing? Idea is that, we can fire and forget API, we are not worried if API does not ...
2018/12/06
[ "https://Stackoverflow.com/questions/53643238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1153316/" ]
Since you want to know how many times the if statement run (and you don’t use debugger), store those times in a variable. ``` //... int timesRun = 0; while( ){ if( ){ timesRun++; } } System.out.println(“Debug: I’d statement run”+timesRun+” times”); ```
if `MySQLAccess sql = new MySQLAccess()` throws, `m++` will not be reached.
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
You can use the `Task<T>` for this. This will take care of all the synchronisation for you and allows you to block untill the value is available: ``` private static Task<HeavyObject> heavyObjectInitializer; // Call this method during application initialization public static void Bootstrap() { heavyObjectInitializ...
Put the method calls into a queue which you process when you finish initialising. Only put methods into the queue when you have not yet initialised.
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
You can use the `Task<T>` for this. This will take care of all the synchronisation for you and allows you to block untill the value is available: ``` private static Task<HeavyObject> heavyObjectInitializer; // Call this method during application initialization public static void Bootstrap() { heavyObjectInitializ...
You could move to a an event driven architecture where you application is in different states. Initially the application moves into the **Starting** state. In this state `HeavyObject` is created using a background task. When the initialization is complete an event is fired. (You don't have to use an actual .NET `event...
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
You can use the `Task<T>` for this. This will take care of all the synchronisation for you and allows you to block untill the value is available: ``` private static Task<HeavyObject> heavyObjectInitializer; // Call this method during application initialization public static void Bootstrap() { heavyObjectInitializ...
Check this [Prototype Pattern](http://en.wikipedia.org/wiki/Prototype_pattern). Maybe it can help you You only need to create your object once and clone it when you need another one.
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
I think that a better design would be an asynchronous factory, where the *calling* code `await`s the object creation and then receives a regular object instance. Stealing liberally [from Stephen Toub](http://blogs.msdn.com/b/pfxteam/archive/2011/01/15/10116210.aspx): ``` public class AsyncLazy<T> : Lazy<Task<T>> { ...
You can use the `Task<T>` for this. This will take care of all the synchronisation for you and allows you to block untill the value is available: ``` private static Task<HeavyObject> heavyObjectInitializer; // Call this method during application initialization public static void Bootstrap() { heavyObjectInitializ...
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
I think that a better design would be an asynchronous factory, where the *calling* code `await`s the object creation and then receives a regular object instance. Stealing liberally [from Stephen Toub](http://blogs.msdn.com/b/pfxteam/archive/2011/01/15/10116210.aspx): ``` public class AsyncLazy<T> : Lazy<Task<T>> { ...
Put the method calls into a queue which you process when you finish initialising. Only put methods into the queue when you have not yet initialised.
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
I think that a better design would be an asynchronous factory, where the *calling* code `await`s the object creation and then receives a regular object instance. Stealing liberally [from Stephen Toub](http://blogs.msdn.com/b/pfxteam/archive/2011/01/15/10116210.aspx): ``` public class AsyncLazy<T> : Lazy<Task<T>> { ...
You could move to a an event driven architecture where you application is in different states. Initially the application moves into the **Starting** state. In this state `HeavyObject` is created using a background task. When the initialization is complete an event is fired. (You don't have to use an actual .NET `event...
11,261,147
I have an object that takes a long time to be initialized. Therefore I the capability to Start Initializing on application startup. Any subsequent calls to methods on the class we need to have a delay mechanism that waits for the class to finish initialization. I have a couple of potential solutions however I am not ...
2012/06/29
[ "https://Stackoverflow.com/questions/11261147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/125747/" ]
I think that a better design would be an asynchronous factory, where the *calling* code `await`s the object creation and then receives a regular object instance. Stealing liberally [from Stephen Toub](http://blogs.msdn.com/b/pfxteam/archive/2011/01/15/10116210.aspx): ``` public class AsyncLazy<T> : Lazy<Task<T>> { ...
Check this [Prototype Pattern](http://en.wikipedia.org/wiki/Prototype_pattern). Maybe it can help you You only need to create your object once and clone it when you need another one.
17,453,339
![JSON undefined errors](https://i.stack.imgur.com/iuXtX.png) `JSON.stringify(null)` returns the string `null`. `JSON.stringify(undefined)` returns the value `undefined`. Shouldn't it return the *string* `undefined`? Parsing the value `undefined` or the string `undefined` gives a `SyntaxError`. Could someone explai...
2013/07/03
[ "https://Stackoverflow.com/questions/17453339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552067/" ]
`undefined` is not valid JSON, so the function is working properly. <http://en.wikipedia.org/wiki/JSON#Data_types.2C_syntax_and_example>
``` if(JSON.stringify(input) === undefined) { // error handle } ``` or ``` if(input === undefined) { // error handle } else { JSON.stringify(input); } ``` Sorry. Life is hard sometimes. This is pretty much what you have to do.
17,453,339
![JSON undefined errors](https://i.stack.imgur.com/iuXtX.png) `JSON.stringify(null)` returns the string `null`. `JSON.stringify(undefined)` returns the value `undefined`. Shouldn't it return the *string* `undefined`? Parsing the value `undefined` or the string `undefined` gives a `SyntaxError`. Could someone explai...
2013/07/03
[ "https://Stackoverflow.com/questions/17453339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/552067/" ]
`undefined` is not valid JSON, so the function is working properly. <http://en.wikipedia.org/wiki/JSON#Data_types.2C_syntax_and_example>
The reason for this is that `null` is caused by a variable that doesn't have a value, so when converted to JSON it gives you JSON that doesn't have a value, undefined means it doesn't exist at all, so you can't create a JSON object of something that doesn't exist. Just check ``` if(typeof myvar === 'undefined') ```...
25,511,984
In **DOM** (Document Object Model) specification, interface Node has a method: ``` Node GetChild(); ``` It states that if **Node** has no child then a return value is **NULL**. What is the right way to implement this approach in **C++** without returning a pointer to a child Node. (Better to prevent from memory leak...
2014/08/26
[ "https://Stackoverflow.com/questions/25511984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1920999/" ]
Waiting a bit now, but the Library Fundamentals TS will be providing [`std::experimental::optional`](http://en.cppreference.com/w/cpp/experimental/optional). Elsewise if you can use [`boost::optional`](http://www.boost.org/doc/libs/1_56_0/libs/optional/doc/html/index.html), which has similar semantics. You can use it...
Such thing as `boost::optional` will help you: <http://www.boost.org/doc/libs/1_56_0/libs/optional/doc/html/index.html>
73,612,276
I am using the google\_maps\_flutter: ^2.1.3 package in my Flutter project that I am currently developing and I want to show active regions on the map in the application. I tried to show the active regions on the map using polygons, but I couldn't paint the part outside of these regions a different color. Actually, exa...
2022/09/05
[ "https://Stackoverflow.com/questions/73612276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14606266/" ]
Based on Matt's answer, I came up with the exact solution. First, I couldn't draw a polygon that would cover the entire world, and instead I increased the polygon count to 2. I drew 2 polygons covering the whole world, from 0 to east and from 0 to west. I set the strokeWidth values to 0 so that these polygons do not dr...
`Polygon` has a `holes` parameter which accepts a list of `List<LatLng>`. What you want to do is create one big polygon that covers the world (or viewport) and set that to be the background color. Then put your actual polygon(s) that you want to draw in the `holes` section to create a cutout: ``` Polygon maskedArea = ...
1,437,662
I have to factorise- $$x^6+5x^3+8$$Answer is $$(x^2−x+2)(x^4+x^3−x^2+2x+4)$$.I have also used factor theorem.Please help me.Thanks in advance.
2015/09/16
[ "https://math.stackexchange.com/questions/1437662", "https://math.stackexchange.com", "https://math.stackexchange.com/users/242402/" ]
Break the equation $x^6+5x^3+8$ into $x^6+8-x^3+6x^3$. It then comes into the form $a^3+b^3+c^3-3abc$. Factorise it using the formula $a^3+b^3+c^3-3abc=(a+b+c)(a^2+b^2+c^2-ab-bc-ca)$.
It can be factored with help of following identities (applied twice below, marked by a '\*') $$u^3 \pm v^3 = (u \pm v)(u^2 \pm uv + v^2)$$ Let $u = x^2 + 2$, we have $$\begin{align} x^6 + 5x^3 + 8 &= (x^2)^3 + 2^3 + 5x^3\tag{1}\\ &\stackrel{\*}{=} (x^2+2)(x^4 - 2x^2 + 4) + 5x^3\\ &= u(u^2 - 6x^2) + 5x^3\tag{2}\\ &=...
63,874,613
I'm using a Windows 10 computer and I have a file that I want to use in a Java application. Let's call the file example.xml.gz. I want to convert it to an XML file so I can view the data in Eclipse, but I can't figure out how to extract the data. Do I unzip it, if so how?
2020/09/13
[ "https://Stackoverflow.com/questions/63874613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11444939/" ]
Open gitbash and in the dir where the xml.gz file is located use: gunzip example.xml.gz then the XML file will be extracted and you can open the xml file.
You can gunzip a file in Java with this simple method: ``` public static void gunzip(Path fin, Path fout) throws IOException { System.out.println("GUNZIP "+fin+" -> "+fout); try(final OutputStream out = Files.newOutputStream(fout); final InputStream in = new GZIPInputStream(Files.newInputStream(fin))...
59,233,856
I'm trying to get highest price of a product. I'm able to store the prices in an object. I want to know how to get the maximum value from that object. Below is my code! ``` public class amazon { static WebDriver driver; public static void main(String[] args) throws Exception { System.setProperty("webd...
2019/12/08
[ "https://Stackoverflow.com/questions/59233856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11517146/" ]
Map the strings to ints (or longs, or some type of currency), then you can get the max using a Comparator ``` int max = driver.findElements(By.xpath("//span[@class='a-price-whole']")).stream() .map(WebElement::getText) .map(s -> s.replace(",", "")) .map(Integer::parseInt) .max(Integer::compare) ....
create an int and call it max (=0), run on each element of the list using a loop (for loop recommended), on each element, check if its bigger than max, if yes, put the value in max, here is a little code, in case the list is called "list", change it to whatever you want ``` int max=0; for (int i : list){ if (i >max...
59,233,856
I'm trying to get highest price of a product. I'm able to store the prices in an object. I want to know how to get the maximum value from that object. Below is my code! ``` public class amazon { static WebDriver driver; public static void main(String[] args) throws Exception { System.setProperty("webd...
2019/12/08
[ "https://Stackoverflow.com/questions/59233856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11517146/" ]
You first need to convert the numbers to int, and than you can use `Collections.max` on the list ``` List<Integer> prices = new ArrayList<>(); List<WebElement> tags = driver.findElements(By.xpath("//span[@class='a-price-whole']")); for (WebElement tag: tags) { prices.add(Integer.parseInt(tag.getText().replace(",",...
create an int and call it max (=0), run on each element of the list using a loop (for loop recommended), on each element, check if its bigger than max, if yes, put the value in max, here is a little code, in case the list is called "list", change it to whatever you want ``` int max=0; for (int i : list){ if (i >max...
59,233,856
I'm trying to get highest price of a product. I'm able to store the prices in an object. I want to know how to get the maximum value from that object. Below is my code! ``` public class amazon { static WebDriver driver; public static void main(String[] args) throws Exception { System.setProperty("webd...
2019/12/08
[ "https://Stackoverflow.com/questions/59233856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11517146/" ]
You first need to convert the numbers to int, and than you can use `Collections.max` on the list ``` List<Integer> prices = new ArrayList<>(); List<WebElement> tags = driver.findElements(By.xpath("//span[@class='a-price-whole']")); for (WebElement tag: tags) { prices.add(Integer.parseInt(tag.getText().replace(",",...
Map the strings to ints (or longs, or some type of currency), then you can get the max using a Comparator ``` int max = driver.findElements(By.xpath("//span[@class='a-price-whole']")).stream() .map(WebElement::getText) .map(s -> s.replace(",", "")) .map(Integer::parseInt) .max(Integer::compare) ....
2,260,393
I found this on MSE : [Prove $\int\_{B(x,r)}|\nabla u|^2\leq \frac{C}{r^2}\int\_{B(x,2r)}|u|^2$ if $-\Delta u(x)+f(x)u(x)=0.$](https://math.stackexchange.com/questions/2087724/prove-int-bx-r-nabla-u2-leq-fraccr2-int-bx-2ru2-if-del) And I was wondering why in the proof of @xpaul we can choose $\xi$ as $|\nabla \xi|\leq...
2017/05/01
[ "https://math.stackexchange.com/questions/2260393", "https://math.stackexchange.com", "https://math.stackexchange.com/users/386627/" ]
Choose $\xi \in C\_c^\infty$ such that $0 \le \xi \le 1$, $\xi \equiv 1$ on $B(0,1)$, $\xi \equiv 0$ outside $B(0,2)$. Then $|\nabla \xi|$ is bounded by some constant $C$ (this constant can be taken arbitrarily close to $1$, but this is not important here). Now let $\xi\_r(x) = \xi(x/r)$. This function satisfies: $0 ...
One way to see the general idea is that if a smooth function $\xi$ has to go from taking the value $1$ at a point $x\_1$ to taking the value $0$ at another point $x\_0$ with $|x\_0 - x\_1| = r$, then $|\nabla \xi|$ will need to be at least $r^{-1}$ somewhere between $x\_1$ and $x\_0$. If this were not the case, then yo...
18,673,860
I have got an array which I am looping through. Every time a condition is true, I want to append a copy of the `HTML` code below to a container element with some values. Where can I put this HTML to re-use in a smart way? ``` <a href="#" class="list-group-item"> <div class="image"> <img src="" /> </d...
2013/09/07
[ "https://Stackoverflow.com/questions/18673860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358522/" ]
Add somewhere in body ``` <div class="hide"> <a href="#" class="list-group-item"> <table> <tr> <td><img src=""></td> <td><p class="list-group-item-text"></p></td> </tr> </table> </a> </div> ``` then create css ``` .hide { display: none; } ``` and add to your js ```...
Very good [answer](https://stackoverflow.com/a/46699845/4814971) from [DevWL](https://stackoverflow.com/users/2179965/devwl) about using the native HTML5 [template](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template) element. To contribute to this good question from the OP I would like to add on how to ...
18,673,860
I have got an array which I am looping through. Every time a condition is true, I want to append a copy of the `HTML` code below to a container element with some values. Where can I put this HTML to re-use in a smart way? ``` <a href="#" class="list-group-item"> <div class="image"> <img src="" /> </d...
2013/09/07
[ "https://Stackoverflow.com/questions/18673860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358522/" ]
Use HTML template instead! ========================== Since the accepted answer would represent overloading script method, I would like to suggest another which is, in my opinion, much cleaner and more secure due to XSS risks which come with overloading scripts. I made a [demo](https://codepen.io/DevWL/pen/YrjyWm?edi...
Add somewhere in body ``` <div class="hide"> <a href="#" class="list-group-item"> <table> <tr> <td><img src=""></td> <td><p class="list-group-item-text"></p></td> </tr> </table> </a> </div> ``` then create css ``` .hide { display: none; } ``` and add to your js ```...
18,673,860
I have got an array which I am looping through. Every time a condition is true, I want to append a copy of the `HTML` code below to a container element with some values. Where can I put this HTML to re-use in a smart way? ``` <a href="#" class="list-group-item"> <div class="image"> <img src="" /> </d...
2013/09/07
[ "https://Stackoverflow.com/questions/18673860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358522/" ]
You could decide to make use of a templating engine in your project, such as: * [mustache](http://mustache.github.io/) * [underscore.js](http://underscorejs.org/) * [handlebars](http://handlebarsjs.com/) If you don't want to include another library, John Resig offers a [jQuery solution](http://ejohn.org/blog/javascri...
Add somewhere in body ``` <div class="hide"> <a href="#" class="list-group-item"> <table> <tr> <td><img src=""></td> <td><p class="list-group-item-text"></p></td> </tr> </table> </a> </div> ``` then create css ``` .hide { display: none; } ``` and add to your js ```...
18,673,860
I have got an array which I am looping through. Every time a condition is true, I want to append a copy of the `HTML` code below to a container element with some values. Where can I put this HTML to re-use in a smart way? ``` <a href="#" class="list-group-item"> <div class="image"> <img src="" /> </d...
2013/09/07
[ "https://Stackoverflow.com/questions/18673860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1358522/" ]
Old question, but since the question asks "using jQuery", I thought I'd provide an option that lets you do this without introducing any vendor dependency. While there are a lot of templating engines out there, many of their features have fallen in to disfavour recently, with iteration (`<% for`), conditionals (`<% if`...
Here's how to use the `<template>` element and jQuery a little more efficiently, since the other jQuery answers as of the time of writing use `.html()` which forces the HTML to be serialized and re-parsed. First, the template to serve as an example: ```html <template id="example"><div class="item"> <h1 class="tit...