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
266,340
Because I am reading lots of pdfs from the screen, the white background make my eyes tired. Is there a decent lightweight pdf reader that can invert colors of everything on the page? I have tried Adobe Reader and Foxit Reader but they only allow to change document colors, if a document is a scanned document everything...
2011/04/04
[ "https://superuser.com/questions/266340", "https://superuser.com", "https://superuser.com/users/19707/" ]
[Sumatra reader](http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html) got this right (what a surprise! It is one of the smallest pdf reader out there) ``` View > Settings > Replace document colors with Windows color scheme ``` worked for me while in high-contrast mode in windows. There is also a flag...
download free app: [Foxit Reader](http://www.foxitsoftware.com/Secure_PDF_Reader/) then: 1. go to:Edit >> Preferences >> Accessibility 2. check "Replace Document Colors" 3. select "custom color" and select colors that you need. 4. uncheck "Only change the content in Black/White color" 5. "OK" by this works you ...
266,340
Because I am reading lots of pdfs from the screen, the white background make my eyes tired. Is there a decent lightweight pdf reader that can invert colors of everything on the page? I have tried Adobe Reader and Foxit Reader but they only allow to change document colors, if a document is a scanned document everything...
2011/04/04
[ "https://superuser.com/questions/266340", "https://superuser.com", "https://superuser.com/users/19707/" ]
This is the Windows version of Cory's answer. This assumes you use Windows 7. * Launch the Magnifier. Search for it in the Start Menu. * Click on the Gear icon to enter the options. In the Options, check "Turn on color inversion". * Click OK to go back to the main window of the Magnifier. * Click on the "Minus" button...
1. Make sure you are using Google Chrome as your browser. 2. Go to the Chrome webstore and add the following extension: [Invert Page Colors](https://chrome.google.com/webstore/detail/invert-page-colors/hjhdnhiofjddcapmffbllcpaodjmdphn) 3. Upload your PDF to Google Drive. 4. Once there, open the PDF in the Google Drive ...
266,340
Because I am reading lots of pdfs from the screen, the white background make my eyes tired. Is there a decent lightweight pdf reader that can invert colors of everything on the page? I have tried Adobe Reader and Foxit Reader but they only allow to change document colors, if a document is a scanned document everything...
2011/04/04
[ "https://superuser.com/questions/266340", "https://superuser.com", "https://superuser.com/users/19707/" ]
This is the Windows version of Cory's answer. This assumes you use Windows 7. * Launch the Magnifier. Search for it in the Start Menu. * Click on the Gear icon to enter the options. In the Options, check "Turn on color inversion". * Click OK to go back to the main window of the Magnifier. * Click on the "Minus" button...
download free app: [Foxit Reader](http://www.foxitsoftware.com/Secure_PDF_Reader/) then: 1. go to:Edit >> Preferences >> Accessibility 2. check "Replace Document Colors" 3. select "custom color" and select colors that you need. 4. uncheck "Only change the content in Black/White color" 5. "OK" by this works you ...
266,340
Because I am reading lots of pdfs from the screen, the white background make my eyes tired. Is there a decent lightweight pdf reader that can invert colors of everything on the page? I have tried Adobe Reader and Foxit Reader but they only allow to change document colors, if a document is a scanned document everything...
2011/04/04
[ "https://superuser.com/questions/266340", "https://superuser.com", "https://superuser.com/users/19707/" ]
This is the Windows version of Cory's answer. This assumes you use Windows 7. * Launch the Magnifier. Search for it in the Start Menu. * Click on the Gear icon to enter the options. In the Options, check "Turn on color inversion". * Click OK to go back to the main window of the Magnifier. * Click on the "Minus" button...
Press `Ctrl+Option+Command+8` to invert the colors of the whole screen. Alternatively, you can go to `System Preferences > Universal Access > Seeing > White on Black` *[Source](http://www.wikihow.com/Invert-Colors-on-a-Mac)*
266,340
Because I am reading lots of pdfs from the screen, the white background make my eyes tired. Is there a decent lightweight pdf reader that can invert colors of everything on the page? I have tried Adobe Reader and Foxit Reader but they only allow to change document colors, if a document is a scanned document everything...
2011/04/04
[ "https://superuser.com/questions/266340", "https://superuser.com", "https://superuser.com/users/19707/" ]
[Sumatra reader](http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html) got this right (what a surprise! It is one of the smallest pdf reader out there) ``` View > Settings > Replace document colors with Windows color scheme ``` worked for me while in high-contrast mode in windows. There is also a flag...
1. Make sure you are using Google Chrome as your browser. 2. Go to the Chrome webstore and add the following extension: [Invert Page Colors](https://chrome.google.com/webstore/detail/invert-page-colors/hjhdnhiofjddcapmffbllcpaodjmdphn) 3. Upload your PDF to Google Drive. 4. Once there, open the PDF in the Google Drive ...
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
The Play 2.5.x documentation states it: > > To wrap a class you have to inject a play.data.FormFactory into your Controller which then allows you to create the form: > > > Form userForm = formFactory.form(User.class); > > > So the first step is to inject the `FormFactory` into your controller. You do it like th...
you don't have to initialize the `FormFactory`, try the following: ``` @Inject FormFactory formFactory; ``` and then in your action, call: ``` formFactory.form(Director.class).bindFromRequest(); ```
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
you don't have to initialize the `FormFactory`, try the following: ``` @Inject FormFactory formFactory; ``` and then in your action, call: ``` formFactory.form(Director.class).bindFromRequest(); ```
Unfortunately, the above answer did not work for me. Here is what I came up with and it works for my project. ``` import play.mvc.*; import play.*; import views.html.logins.*; import models.User; import play.data.Form; import play.data.FormFactory; import javax.inject.Inject; public class Login extends Controller{ ...
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
you don't have to initialize the `FormFactory`, try the following: ``` @Inject FormFactory formFactory; ``` and then in your action, call: ``` formFactory.form(Director.class).bindFromRequest(); ```
``` public class UserController extends Controller { @Inject FormFactory formFactory; public Result loginProcess(){ Form<LoginForm> loginForm = formFactory.form(LoginForm.class).bindFromRequest(); ... } } ``` you dont need that Login constructor there .. see my example
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
The Play 2.5.x documentation states it: > > To wrap a class you have to inject a play.data.FormFactory into your Controller which then allows you to create the form: > > > Form userForm = formFactory.form(User.class); > > > So the first step is to inject the `FormFactory` into your controller. You do it like th...
Unfortunately, the above answer did not work for me. Here is what I came up with and it works for my project. ``` import play.mvc.*; import play.*; import views.html.logins.*; import models.User; import play.data.Form; import play.data.FormFactory; import javax.inject.Inject; public class Login extends Controller{ ...
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
The Play 2.5.x documentation states it: > > To wrap a class you have to inject a play.data.FormFactory into your Controller which then allows you to create the form: > > > Form userForm = formFactory.form(User.class); > > > So the first step is to inject the `FormFactory` into your controller. You do it like th...
``` public class UserController extends Controller { @Inject FormFactory formFactory; public Result loginProcess(){ Form<LoginForm> loginForm = formFactory.form(LoginForm.class).bindFromRequest(); ... } } ``` you dont need that Login constructor there .. see my example
36,099,834
I spent a lot of time trying so solve this problem, and searching the method to substitute this one, without success. First, Play! obligates me to use and inject the FormFactory (that is explained in <https://www.playframework.com/documentation/2.5.0/JavaForms>). But just for instantiate this FormFactory I had to pas...
2016/03/19
[ "https://Stackoverflow.com/questions/36099834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4178613/" ]
``` public class UserController extends Controller { @Inject FormFactory formFactory; public Result loginProcess(){ Form<LoginForm> loginForm = formFactory.form(LoginForm.class).bindFromRequest(); ... } } ``` you dont need that Login constructor there .. see my example
Unfortunately, the above answer did not work for me. Here is what I came up with and it works for my project. ``` import play.mvc.*; import play.*; import views.html.logins.*; import models.User; import play.data.Form; import play.data.FormFactory; import javax.inject.Inject; public class Login extends Controller{ ...
4,155,680
Suppose $y = f(x) = x^2$. We know that $dy = 2x dx$. In high school calculus, I overlooked a lot of details and mechanically calculated $dy$. Now, I am unsure how the definition of differential is developed in elementary (calculus or analysis) language. Of course, if we let $F(x,y) = y - f(x) \equiv 0$ and take exteri...
2021/05/30
[ "https://math.stackexchange.com/questions/4155680", "https://math.stackexchange.com", "https://math.stackexchange.com/users/194736/" ]
The differential $\mathrm df$ of a function $f$ is simply the *linear function* that realises the best linear approximation of the function at a point, in a precise sense given by asymptotic analysis: $$f(x+h,y+k)=f(x,y)+\mathrm df\_{(x,y)}(h,k)+o\bigl(\|(h,k)\|\bigr).$$ This definition can be generalised to normed vec...
The Leibniz notation of differential, also called the derivative at x defines it as $$\frac{dy}{dx}=\lim\_{h\rightarrow 0}{\frac{y(x+h)-y(x)}{h}}$$ Therefore $\frac{dy}{dx}$ is the differential and represents the slope of the tangent to the graph of the function at point (x,y). Further unifying Leibniz with Newton not...
42,288,106
<http://api.vankow.com/file/images/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML> -> loading page to server is not working responsive but open to local page is working responsive. i don't understand file:///C:/Users/mega79/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML
2017/02/17
[ "https://Stackoverflow.com/questions/42288106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7572124/" ]
You seem to be saying that you want your function to take a variable number of separate arrays as arguments, and then find the maximum number within any of those arrays. If so, you can say `[].concat(...arguments)` to create a single new array with all of the values from the individual arrays that were arguments, then...
It sounds like what you are trying to do is ``` function myFun(...arrays) { const allValues = [].concat(...arrays); return Math.max(...allValues); } console.log("The maximum value is " + myFun([1,2,3,4,5], [6,7,8,9])); ``` However I would recommend to avoid spread syntax with potentially large data, and go f...
42,288,106
<http://api.vankow.com/file/images/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML> -> loading page to server is not working responsive but open to local page is working responsive. i don't understand file:///C:/Users/mega79/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML
2017/02/17
[ "https://Stackoverflow.com/questions/42288106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7572124/" ]
You seem to be saying that you want your function to take a variable number of separate arrays as arguments, and then find the maximum number within any of those arrays. If so, you can say `[].concat(...arguments)` to create a single new array with all of the values from the individual arrays that were arguments, then...
You can use rest element at function declaration, pass an array of arrays each preceded by spread element to function parameters and spread element within function ``` function myFun(...arr) { return Math.max.apply(Math, ...arr) } myFun([...firstArr, ...secondArr /*, ...nArr*/ ]); ```
42,288,106
<http://api.vankow.com/file/images/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML> -> loading page to server is not working responsive but open to local page is working responsive. i don't understand file:///C:/Users/mega79/8.9%20%EC%B6%9C%EA%B3%A0%EC%A0%95%EC%82%B0.HTML
2017/02/17
[ "https://Stackoverflow.com/questions/42288106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7572124/" ]
It sounds like what you are trying to do is ``` function myFun(...arrays) { const allValues = [].concat(...arrays); return Math.max(...allValues); } console.log("The maximum value is " + myFun([1,2,3,4,5], [6,7,8,9])); ``` However I would recommend to avoid spread syntax with potentially large data, and go f...
You can use rest element at function declaration, pass an array of arrays each preceded by spread element to function parameters and spread element within function ``` function myFun(...arr) { return Math.max.apply(Math, ...arr) } myFun([...firstArr, ...secondArr /*, ...nArr*/ ]); ```
12,169,595
What are the required steps to use SimpleMembership (ASP.NET MVC 4) with RavenDB (or other databases) instead of SQL Server? I am used to override the MembershipProvider but how does it work with the new SimpleMembership? I saw there is a SimpleMembershipProvider so I think I should override it, but I don't know if t...
2012/08/29
[ "https://Stackoverflow.com/questions/12169595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146070/" ]
So here is what I found after looking at some of the the source code (MVC4). <http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/553690ac9488#src%2fWebMatrix.WebData%2fExtendedMembershipProvider.cs> SimpleMembership is an implementation of the abstract class ExtendedMembershipProvider. The code inside Si...
SimpleMembership is not really meant to be used with the old MembershipProviders as it doesn't fullfill all of the same contracts that are assumed of normal MembershipProviders. Its mostly designed for use via the WebSecurity helper. This link might be helpful for more info: [Web Pages Tutorial](http://www.asp.net/web...
12,169,595
What are the required steps to use SimpleMembership (ASP.NET MVC 4) with RavenDB (or other databases) instead of SQL Server? I am used to override the MembershipProvider but how does it work with the new SimpleMembership? I saw there is a SimpleMembershipProvider so I think I should override it, but I don't know if t...
2012/08/29
[ "https://Stackoverflow.com/questions/12169595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146070/" ]
Here's my implementation for mongodb. Maybe it can help <https://github.com/malibeg/MongodbSimpleMembershipProvider#readme>
SimpleMembership is not really meant to be used with the old MembershipProviders as it doesn't fullfill all of the same contracts that are assumed of normal MembershipProviders. Its mostly designed for use via the WebSecurity helper. This link might be helpful for more info: [Web Pages Tutorial](http://www.asp.net/web...
12,169,595
What are the required steps to use SimpleMembership (ASP.NET MVC 4) with RavenDB (or other databases) instead of SQL Server? I am used to override the MembershipProvider but how does it work with the new SimpleMembership? I saw there is a SimpleMembershipProvider so I think I should override it, but I don't know if t...
2012/08/29
[ "https://Stackoverflow.com/questions/12169595", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146070/" ]
So here is what I found after looking at some of the the source code (MVC4). <http://aspnetwebstack.codeplex.com/SourceControl/changeset/view/553690ac9488#src%2fWebMatrix.WebData%2fExtendedMembershipProvider.cs> SimpleMembership is an implementation of the abstract class ExtendedMembershipProvider. The code inside Si...
Here's my implementation for mongodb. Maybe it can help <https://github.com/malibeg/MongodbSimpleMembershipProvider#readme>
10,284,016
We have SQLite for RDBMS, but are there any disk-based, light-memory-usage key-value databases? In other words, a key-value store that can run on a *small amount of memory* with a *larger* amount of data. I would like to use it on lower-power machines with not a lot of free memory. It seems that [BerkeleyDB](http://en...
2012/04/23
[ "https://Stackoverflow.com/questions/10284016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/99923/" ]
Take a look at [MemcacheDB](http://memcachedb.org/).
It sounds like you're looking for a disk-based key-value store that is performant even when the data won't fit in memory. Like @Ofer Zelig mentioned, fast is relative. But I think it's helpful to look at both the performance benchmarks and the operational guides for a given database. Many, including [Redis](http://red...
4,298,481
I'm wondering weather this is an issue with iOS devices or just the iPad (I've actually only had an iPad to play on). If I were to write a HTML link that linked to an MP4 on a server (over HTTP), the iPad launches it in Safari but doesn't recognise that it's an MP4 and just serves a blank page. I've had a look on oth...
2010/11/28
[ "https://Stackoverflow.com/questions/4298481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398939/" ]
The problem is more than likely the particular encoding characteristics of the MP4. h264 and MPEG-4 have ***loads*** of little options and tweakable parameters. iOS devices are fairly specific about what they do and do not like. (To be fair, this is not a problem specific to iOS devices.) Have a look at Brightcove's [...
I'm experiencing a very similar problem with the iPad in playing an mp4 file, which in fact was encoded by Brightcove. The video won't start inside an html5 video tag using the iPad, while it works perfectly in Chrome, Safari and IE9. You can grab the video here: <http://tinyurl.com/796c5ub> and this is the output of...
4,298,481
I'm wondering weather this is an issue with iOS devices or just the iPad (I've actually only had an iPad to play on). If I were to write a HTML link that linked to an MP4 on a server (over HTTP), the iPad launches it in Safari but doesn't recognise that it's an MP4 and just serves a blank page. I've had a look on oth...
2010/11/28
[ "https://Stackoverflow.com/questions/4298481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398939/" ]
The problem is more than likely the particular encoding characteristics of the MP4. h264 and MPEG-4 have ***loads*** of little options and tweakable parameters. iOS devices are fairly specific about what they do and do not like. (To be fair, this is not a problem specific to iOS devices.) Have a look at Brightcove's [...
Found this while looking for a solution for iOS-related MP4-audio problems: Some of my MP4 audio files would start to play, but at a certain point in the file, playback on iOS would hang, while non-iOS players played the same MP4 files flawlessly till the end. MP4 is a container format. Said to also contain non-audio/...
4,298,481
I'm wondering weather this is an issue with iOS devices or just the iPad (I've actually only had an iPad to play on). If I were to write a HTML link that linked to an MP4 on a server (over HTTP), the iPad launches it in Safari but doesn't recognise that it's an MP4 and just serves a blank page. I've had a look on oth...
2010/11/28
[ "https://Stackoverflow.com/questions/4298481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/398939/" ]
I'm experiencing a very similar problem with the iPad in playing an mp4 file, which in fact was encoded by Brightcove. The video won't start inside an html5 video tag using the iPad, while it works perfectly in Chrome, Safari and IE9. You can grab the video here: <http://tinyurl.com/796c5ub> and this is the output of...
Found this while looking for a solution for iOS-related MP4-audio problems: Some of my MP4 audio files would start to play, but at a certain point in the file, playback on iOS would hang, while non-iOS players played the same MP4 files flawlessly till the end. MP4 is a container format. Said to also contain non-audio/...
14,143,042
EDIT: in theory i think i could accomplish this by having a dummy ul between the 2 level and then positioning the 'second (now 3rd) level. Crude proof of concept > <http://jsfiddle.net/petergus/jk7vU/> I have a horizontal dropdown menu that I am trying to get to stretch its parent div height. The problem I run into is...
2013/01/03
[ "https://Stackoverflow.com/questions/14143042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310375/" ]
I think this is what you want: ``` <!DOCTYPE html> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>test doc</title> <style type="text/css"> ul { display: table; padding: 0; } li { display: inline-block; whi...
something like this?: <http://jsfiddle.net/chanckjh/DDeRT/> html: ``` <div class="nav"> <ul> <li class="nav1">nav <ul> <li>sub</li> <li>sub</li> <li>sub</li> <li>sub</li> </ul> </li> <li class="nav2">nav2 <ul> <li>sub</li>...
782,956
What's the sanest way to achieve something along the lines of `this.gotoAndStop(this._currentframe)`? What I want is that Flash re-loads the current frame as if I was using gotoAndStop (which does nothing if it is given the current frame as target frame).
2009/04/23
[ "https://Stackoverflow.com/questions/782956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92048/" ]
I don't think I understand why you would want to do this, but what if you go to the frame before (or after) the current frame and then go back? ``` var current:int = _currentFrame; gotoAndStop(current - 1); gotoAndStop(current); ``` I haven't done AS2 in quite a while so I'm not at all sure what, if anything, the ab...
You can do it using a movieclip class method on the frame in question prevFrame()
782,956
What's the sanest way to achieve something along the lines of `this.gotoAndStop(this._currentframe)`? What I want is that Flash re-loads the current frame as if I was using gotoAndStop (which does nothing if it is given the current frame as target frame).
2009/04/23
[ "https://Stackoverflow.com/questions/782956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92048/" ]
I don't think I understand why you would want to do this, but what if you go to the frame before (or after) the current frame and then go back? ``` var current:int = _currentFrame; gotoAndStop(current - 1); gotoAndStop(current); ``` I haven't done AS2 in quite a while so I'm not at all sure what, if anything, the ab...
i use this command and this works for me ``` on (release) { prevFrame(); } on (release) { nextFrame(); } ```
350,797
I know perfectly rigid objects are physically impossible, but let me describe a simple thought experiment that I can't theoretically solve. Imagine you have an almost-closed ring-shaped perfectly rigid object. This object when approaching the curved space around a massive object will experience infinite internal stres...
2017/08/07
[ "https://physics.stackexchange.com/questions/350797", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/29621/" ]
Suppose your ring-shaped object isn't perfectly rigid, just rigid enough not to deform significantly (the rigidity doesn't seem to do much in the question; rather, it seems that it is about a very stiff body). Then as it approaches a massive object there will be stresses induced, and the diagonal elements $T^{ii}$ of t...
It is not possible, since there is no perfectly rigid object.
350,797
I know perfectly rigid objects are physically impossible, but let me describe a simple thought experiment that I can't theoretically solve. Imagine you have an almost-closed ring-shaped perfectly rigid object. This object when approaching the curved space around a massive object will experience infinite internal stres...
2017/08/07
[ "https://physics.stackexchange.com/questions/350797", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/29621/" ]
A thin Dyson ring is entirely possible.. Imagine Saturn's rings as a set of nested rings like the concentric grooves on a DVD. Now select one of those nested rings , keep it in orbit around Saturn, and throw the rest of them away. Replace that ring, which is a circular string of unconnected particles, with a chain (whi...
It is not possible, since there is no perfectly rigid object.
350,797
I know perfectly rigid objects are physically impossible, but let me describe a simple thought experiment that I can't theoretically solve. Imagine you have an almost-closed ring-shaped perfectly rigid object. This object when approaching the curved space around a massive object will experience infinite internal stres...
2017/08/07
[ "https://physics.stackexchange.com/questions/350797", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/29621/" ]
Suppose your ring-shaped object isn't perfectly rigid, just rigid enough not to deform significantly (the rigidity doesn't seem to do much in the question; rather, it seems that it is about a very stiff body). Then as it approaches a massive object there will be stresses induced, and the diagonal elements $T^{ii}$ of t...
A thin Dyson ring is entirely possible.. Imagine Saturn's rings as a set of nested rings like the concentric grooves on a DVD. Now select one of those nested rings , keep it in orbit around Saturn, and throw the rest of them away. Replace that ring, which is a circular string of unconnected particles, with a chain (whi...
4,290,416
how much data i can store in sqlite in iphone?
2010/11/27
[ "https://Stackoverflow.com/questions/4290416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/390234/" ]
As Steve said; limited by available disk space. However, there is an additional limitation; you really don't want to be storing BLOBs (big blobs of binary data) in a SQLite database.
It's limited by how much available disk space you have on the phone.
27,597,204
Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am u...
2014/12/22
[ "https://Stackoverflow.com/questions/27597204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4384124/" ]
Could you just set the image in the onActivityResult method ? ``` protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) { Uri selectedImage = d...
You might wanna look into this question, it might fulfill your need. [get selected image from gallery into imageview](https://stackoverflow.com/questions/20197487/get-selected-image-from-gallery-into-imageview)
27,597,204
Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am u...
2014/12/22
[ "https://Stackoverflow.com/questions/27597204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4384124/" ]
Declare image view before class start, ``` ImageView appliance_icon; ``` use this in imageview on click(), ``` appliance_icon = (ImageView) findViewById(R.id.xxxx); appliance_icon .setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ...
You might wanna look into this question, it might fulfill your need. [get selected image from gallery into imageview](https://stackoverflow.com/questions/20197487/get-selected-image-from-gallery-into-imageview)
27,597,204
Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am using to Resize my Images and I want to Stop resizing and Cropping...Here is the code which I am u...
2014/12/22
[ "https://Stackoverflow.com/questions/27597204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4384124/" ]
Declare image view before class start, ``` ImageView appliance_icon; ``` use this in imageview on click(), ``` appliance_icon = (ImageView) findViewById(R.id.xxxx); appliance_icon .setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { ...
Could you just set the image in the onActivityResult method ? ``` protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) { Uri selectedImage = d...
109,121
Suppose that $\vec{G}$ is a directed graph and that $G$ is the undirected graph obtained from $\vec{G}$ by forgetting the direction on each edge. Define $\vec{H}$ to be a minor of $\vec{G}$ if $H$ is a minor of $G$ as undirected graphs and direction on the edges of $\vec{H}$ are the same as the corresponding edges in $...
2012/02/14
[ "https://math.stackexchange.com/questions/109121", "https://math.stackexchange.com", "https://math.stackexchange.com/users/24947/" ]
I think the answer is yes, see **10.5** in [Neil Robertson and Paul D. Seymour. Graph minors. xx. wagner’s conjecture. Journal of Combinatorial Theory, 92:325–357, 2004.](http://www.math.princeton.edu/%7Epds/papers/GM20/GM20.pdf) and the preceding section: > > As a corollary, we deduce the following form of Wagner’s ...
No. Digraphs are not well-quasi ordered under minor containment. However a subclass of digraph, namely semi-complete tournament (a fully connected DAG), are WQO under minor containment. Source: recent (2011-2012) paper by Seymour.
7,073,109
So I have Resque and redis to go set up on Heroku and this is what my `resque.rake` file looks like: ``` require 'resque/tasks' task "resque:setup" => :environment do ENV['QUEUE'] = '*' end desc "Alias for resque:work (To run workers on Heroku)" task "jobs:work" => "resque:work" ``` I ran `heroku rake jobs:work`...
2011/08/16
[ "https://Stackoverflow.com/questions/7073109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421109/" ]
You should use Procfile for resque jobs on heroku <http://devcenter.heroku.com/articles/procfile> Keep in mind that Procfile is used on new Heroku Cedar Stack.
You only need one worker for Resque. You will need to run `heroku rake jobs:work` or use [Resque-Scheduler](https://github.com/bvandenbos/resque-scheduler) (cron, or something to run that task) to to automatically run your jobs.
57,812
If we're talking about 8 hundred (an exact number of hundreds) we use the singular for the ordinal. But what if we use an unspecified quantity such as "more". Or, I just said it: "number of hundreds". So I reckon it's "more hundreds", "more thousands". Is this correct? Exact context: > > If you have a larger budget,...
2012/02/12
[ "https://english.stackexchange.com/questions/57812", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2337/" ]
We use the singular when the magnitude number is modified by *few*: > > We need a few hundred dollars. > > > We need a few thousand widgets. > > > If we keep the object, we would put *more* after the number: > > We need a few hundred more dollars. > > > We need a few thousand more widgets. > > > But if ...
For unknown numbers, we can use "more" with the order of magnitude as in *dozens more*, *hundreds more*, and so on. > > There are 12,000 Starbucks locations in the U.S., and *thousands more* abroad. > > > The national debt is over $15 trillion, but the unfunded liability for Social Security is *tens of trillions mo...
57,812
If we're talking about 8 hundred (an exact number of hundreds) we use the singular for the ordinal. But what if we use an unspecified quantity such as "more". Or, I just said it: "number of hundreds". So I reckon it's "more hundreds", "more thousands". Is this correct? Exact context: > > If you have a larger budget,...
2012/02/12
[ "https://english.stackexchange.com/questions/57812", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2337/" ]
Maybe it would help to think of how it is used. When a cardinal number is used as an adjective, it is treated as adjective in that it does not change number. There is a *red* house. There are many more *red* houses. ... *Red* does not change. There is *one* (more) house. There are five *hundred* (more) houses. OR ......
For unknown numbers, we can use "more" with the order of magnitude as in *dozens more*, *hundreds more*, and so on. > > There are 12,000 Starbucks locations in the U.S., and *thousands more* abroad. > > > The national debt is over $15 trillion, but the unfunded liability for Social Security is *tens of trillions mo...
57,812
If we're talking about 8 hundred (an exact number of hundreds) we use the singular for the ordinal. But what if we use an unspecified quantity such as "more". Or, I just said it: "number of hundreds". So I reckon it's "more hundreds", "more thousands". Is this correct? Exact context: > > If you have a larger budget,...
2012/02/12
[ "https://english.stackexchange.com/questions/57812", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2337/" ]
We use the singular when the magnitude number is modified by *few*: > > We need a few hundred dollars. > > > We need a few thousand widgets. > > > If we keep the object, we would put *more* after the number: > > We need a few hundred more dollars. > > > We need a few thousand more widgets. > > > But if ...
You can use either of *hundred* or *hundreds* in *...few more hundred(s)...* but would write *...few more hundred MHz...* vs *...few more hundreds* of *MHz...* Note, the repetition of *more* in *more hundreds of MHz more* is both clumsy and unnecessary. One instead might write any of > > ... feel free to go for a few...
57,812
If we're talking about 8 hundred (an exact number of hundreds) we use the singular for the ordinal. But what if we use an unspecified quantity such as "more". Or, I just said it: "number of hundreds". So I reckon it's "more hundreds", "more thousands". Is this correct? Exact context: > > If you have a larger budget,...
2012/02/12
[ "https://english.stackexchange.com/questions/57812", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2337/" ]
We use the singular when the magnitude number is modified by *few*: > > We need a few hundred dollars. > > > We need a few thousand widgets. > > > If we keep the object, we would put *more* after the number: > > We need a few hundred more dollars. > > > We need a few thousand more widgets. > > > But if ...
Maybe it would help to think of how it is used. When a cardinal number is used as an adjective, it is treated as adjective in that it does not change number. There is a *red* house. There are many more *red* houses. ... *Red* does not change. There is *one* (more) house. There are five *hundred* (more) houses. OR ......
57,812
If we're talking about 8 hundred (an exact number of hundreds) we use the singular for the ordinal. But what if we use an unspecified quantity such as "more". Or, I just said it: "number of hundreds". So I reckon it's "more hundreds", "more thousands". Is this correct? Exact context: > > If you have a larger budget,...
2012/02/12
[ "https://english.stackexchange.com/questions/57812", "https://english.stackexchange.com", "https://english.stackexchange.com/users/2337/" ]
Maybe it would help to think of how it is used. When a cardinal number is used as an adjective, it is treated as adjective in that it does not change number. There is a *red* house. There are many more *red* houses. ... *Red* does not change. There is *one* (more) house. There are five *hundred* (more) houses. OR ......
You can use either of *hundred* or *hundreds* in *...few more hundred(s)...* but would write *...few more hundred MHz...* vs *...few more hundreds* of *MHz...* Note, the repetition of *more* in *more hundreds of MHz more* is both clumsy and unnecessary. One instead might write any of > > ... feel free to go for a few...
2,488,616
Does anyone know of an example where a Google Map is used to create a map with both a sidebar <http://econym.org.uk/gmap/example_map4c.htm> and tabbed info windows <http://econym.org.uk/gmap/example_map10a.htm>? The markers are defined and ready for sidebar ``` function createMarker(point,name,html) { ...
2010/03/21
[ "https://Stackoverflow.com/questions/2488616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82330/" ]
It sounds like you didn't add the library properly. It is a static library, not an Objective C or data file, so simply adding it to the project isn't enough. All that will happen is that it gets copied into the application bundle, when it needs to be statically linked into the executable. You have to open your targets ...
I downloaded the source from the svn project from [google](http://code.google.com/p/iphone-exif/) and drag and drop into my project. Clicking the target and marking the static lib as "weak" type instead of "required" made no difference.
23,228,276
I am constructing a class to handle drawing a figure based on string input. I want to be able to output the figure to both png and svg images. I process the input pattern to create an abstraction of the figure that will be used in constructing both of the output formats. This abstraction is an array of objects definin...
2014/04/22
[ "https://Stackoverflow.com/questions/23228276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1525769/" ]
If this is an API on a server, presumably it's part of a web framework and served via WSGI. In which case, you are wrong to think that dependencies are loaded for each request. They are not: a process is instantiated to serve requests, and that will persist for many many requests. Within that process, once modules are ...
It should be fine to use the solution that imports the modules inline. There is not really any performance penalty associated with this. When an import statement is encountered, python executes all of the top-level code in the module that is referenced. When finished with this, it caches the module in a standard librar...
17,642,150
I'm trying to make an expandable/collapsible `StackPanel` controlled with a `CheckBox`. First I tried to do that directly in XAML but I couldn't achieved it easy way. It's not a problem for me to have some code-behind for this task. So far I have: ``` private void activateCheck_Checked(object sender, RoutedEventArgs e...
2013/07/14
[ "https://Stackoverflow.com/questions/17642150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2290907/" ]
When you do not explicitly specify a start value for the animation by setting the [`From`](http://msdn.microsoft.com/en-us/library/system.windows.media.animation.doubleanimation.from.aspx) property, the animation starts at the current value of the property. If that is `NaN` however, the animation does not know where to...
You cannot animate width and height properties (or any other properties of type double) if they are by default unset (in that case their value will be NaN). So alternatively you can achieve it with ScaleTransform. Please check this blog article. Hope it helps. <http://marlongrech.wordpress.com/2009/09/07/animating-wid...
217,304
I know something like this has asked before [What to do about Copy Cat answers?](https://meta.stackexchange.com/questions/93755/what-to-do-about-copy-cat-answers) But my question is slightly different. What should we do when some user just copied the content from another answer from `SO` or from other web resources, a...
2014/01/24
[ "https://meta.stackexchange.com/questions/217304", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/245920/" ]
Good catch. And as always with plagiarizers, it's not the only copy & pasted answer. If you feel like doing the work, you can go through the guy's profile and Google-test all his answers for plagiarism. Then flag each occurrence where you find plagiarism for moderator attention, and write "plagiarism: " and then the o...
Flag it for moderator attention, and explain the problem using a custom flag. In some cases, the moderators may already know about the problem. The SE software detects copy/paste posts, and raises an automatic moderator flag when it happens. But cast the flag anyway. It provides confirmation to the moderator that it i...
2,291,022
How do you put views and content in a separate assembly that can be referenced from a MvcApplication?
2010/02/18
[ "https://Stackoverflow.com/questions/2291022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19707/" ]
It sounds like you're talking about portable areas. [Craig Shoemaker](http://weblogs.asp.net/craigshoemaker/)'s [Polymorphic Podcast](http://polymorphicpodcast.com/) had a recent [episode featuring Jeffrey Palermo and Eric Hexter](http://polymorphicpodcast.com/shows/portableareas/), and they discussed portable areas an...
AFAIK, there isn't a straight forward way using webforms (.aspx) as the view. However you can use other view engines (for example [Stringtemplate](http://code.google.com/p/string-template-view-engine-mvc/)) and [embed the pages and images as resources into the dll](http://support.microsoft.com/kb/319292). You will need...
2,291,022
How do you put views and content in a separate assembly that can be referenced from a MvcApplication?
2010/02/18
[ "https://Stackoverflow.com/questions/2291022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19707/" ]
It sounds like you're talking about portable areas. [Craig Shoemaker](http://weblogs.asp.net/craigshoemaker/)'s [Polymorphic Podcast](http://polymorphicpodcast.com/) had a recent [episode featuring Jeffrey Palermo and Eric Hexter](http://polymorphicpodcast.com/shows/portableareas/), and they discussed portable areas an...
quite simple, when you handle your routing -> route it to the assembly and class that handles this. but don't forget you have to implement a few things there. i assume you got this figured out.
13,182,284
I'm using spinner controls in an Android application, and I handle user selections via an `onItemSelectedListener()` method. This seems to work okay when a different selection from the current one is made. I would like, under certain conditions to reset all spinners to default values and ensure that `onItemSelectedList...
2012/11/01
[ "https://Stackoverflow.com/questions/13182284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1400716/" ]
**If you want "onItemSelected" of Spinner to be fired, even if the item in the spinner is selected /if item selected and it is clicked again . Then use this custom class which extends spinner ,this worked for me** Then edit your activity with spinners like this , I changed ``` static Spinner spinner1; ``` to ``...
The default Spinner doesn't trigger any event when you select the same item as your currently selected item. You will need to make a custom Spinner in order to do this. See [How can I get an event in Android Spinner when the current selected item is selected again?](https://stackoverflow.com/questions/5335306/how-can-i...
13,182,284
I'm using spinner controls in an Android application, and I handle user selections via an `onItemSelectedListener()` method. This seems to work okay when a different selection from the current one is made. I would like, under certain conditions to reset all spinners to default values and ensure that `onItemSelectedList...
2012/11/01
[ "https://Stackoverflow.com/questions/13182284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1400716/" ]
The default Spinner doesn't trigger any event when you select the same item as your currently selected item. You will need to make a custom Spinner in order to do this. See [How can I get an event in Android Spinner when the current selected item is selected again?](https://stackoverflow.com/questions/5335306/how-can-i...
Add the same adapter every time if you want to do it using default spinner : @Override public void onItemSelected(AdapterView adapter, View v, int position, long lng) { ``` spinner.setAdapter(adapter); } ```
13,182,284
I'm using spinner controls in an Android application, and I handle user selections via an `onItemSelectedListener()` method. This seems to work okay when a different selection from the current one is made. I would like, under certain conditions to reset all spinners to default values and ensure that `onItemSelectedList...
2012/11/01
[ "https://Stackoverflow.com/questions/13182284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1400716/" ]
**If you want "onItemSelected" of Spinner to be fired, even if the item in the spinner is selected /if item selected and it is clicked again . Then use this custom class which extends spinner ,this worked for me** Then edit your activity with spinners like this , I changed ``` static Spinner spinner1; ``` to ``...
Add the same adapter every time if you want to do it using default spinner : @Override public void onItemSelected(AdapterView adapter, View v, int position, long lng) { ``` spinner.setAdapter(adapter); } ```
97,511
Can "made up my mind be used" in context like: > > I made up my mind about quitting smoking. > > > I am being persuaded that *resolved* should be used instead, but it seems to me that both versions are correct but differ in a level of resolution of speaker.
2013/01/11
[ "https://english.stackexchange.com/questions/97511", "https://english.stackexchange.com", "https://english.stackexchange.com/users/32903/" ]
When you are not sure about a certain usage of a phrase, it is good to use corpora such as [Corpus of Contemporary American English (COCA)](https://www.english-corpora.org/coca/) to find out how the phrase is being used in novels, magazine articles, etc. In this scenario, it is not wrong to use *make up my mind* since...
Yes, both seem to be correct in this context. Though "make up my mind" would suggest you had conflicting opinions within yourself and you had to spend quite some time deciding on which. "Resolve" seems to suggest a decision without having spent much time with different sides of the matter.
52,949,311
I am creating an Asteroids clone and want to create a move function. I thought I could use pattern matching on data types, but of course the type signature then does not conform to the actual method. **I want to use different code if the `t` parameter in the `Moving` data type in the `move` function is of data type `Bu...
2018/10/23
[ "https://Stackoverflow.com/questions/52949311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4798397/" ]
You can't pattern match this way because `Moving o` is polymorphic. If you had a function that moved only bullets, `Moving Bullet` would work to pattern match just like this. There are lots of different ways to get around this.One easy solution, depending on other aspects of your game, would be to bring `Bullet` and `...
I don't disagree with jkeuhlen (or [chepner in your first question on this](https://stackoverflow.com/a/52896185/745903)): you may not really need the type distinction at all, can keep it all on the value level. But you *can* also do it on the type level, and this does make some sense because moving an object should n...
52,949,311
I am creating an Asteroids clone and want to create a move function. I thought I could use pattern matching on data types, but of course the type signature then does not conform to the actual method. **I want to use different code if the `t` parameter in the `Moving` data type in the `move` function is of data type `Bu...
2018/10/23
[ "https://Stackoverflow.com/questions/52949311", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4798397/" ]
You can't pattern match this way because `Moving o` is polymorphic. If you had a function that moved only bullets, `Moving Bullet` would work to pattern match just like this. There are lots of different ways to get around this.One easy solution, depending on other aspects of your game, would be to bring `Bullet` and `...
In addition to [jkeuhlen](https://stackoverflow.com/users/3806046/jkeuhlen)'s answer, you could also use a typeclass: ``` class Moveable a where move :: Float -> a -> a position :: a -> Position velocity :: a -> Velocity data Asteroid = Asteroid { asteroidP :: Position, asteroidV :: Velocity ...
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
Simply install the Adblock Plus addon for Firefox. Open [this URL](https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/) in your Firefox and click `Add to Firefox` [![enter image description here](https://i.stack.imgur.com/Hv0LA.png)](https://i.stack.imgur.com/Hv0LA.png)
* Open Firefox * Open **Add-ons** * Click **Get Add-ons** * Type Adblock Plus in search field * Select **Adblock Plus** * Click **Install** [![ims](https://i.stack.imgur.com/Fn64C.png)](https://i.stack.imgur.com/Fn64C.png) (source: [go-remove-malware.com](http://www.go-remove-malware.com/wp-content/uploads/2014/09/...
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
I will suggest you to install `uBlock` instead of `ABP` because: [uBlock vs. ABP: efficiency compared](https://github.com/chrisaljoudi/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared) `uBlock` can be installed using [uBlock](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/) link `ABP` can be installed u...
Simply install the Adblock Plus addon for Firefox. Open [this URL](https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/) in your Firefox and click `Add to Firefox` [![enter image description here](https://i.stack.imgur.com/Hv0LA.png)](https://i.stack.imgur.com/Hv0LA.png)
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
Simply install the Adblock Plus addon for Firefox. Open [this URL](https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/) in your Firefox and click `Add to Firefox` [![enter image description here](https://i.stack.imgur.com/Hv0LA.png)](https://i.stack.imgur.com/Hv0LA.png)
I would install ghostery for even more privacy with adblock. Less tracking and I noticed that webpages are loading quicker <https://www.ghostery.com/en/>
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
I will suggest you to install `uBlock` instead of `ABP` because: [uBlock vs. ABP: efficiency compared](https://github.com/chrisaljoudi/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared) `uBlock` can be installed using [uBlock](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/) link `ABP` can be installed u...
* Open Firefox * Open **Add-ons** * Click **Get Add-ons** * Type Adblock Plus in search field * Select **Adblock Plus** * Click **Install** [![ims](https://i.stack.imgur.com/Fn64C.png)](https://i.stack.imgur.com/Fn64C.png) (source: [go-remove-malware.com](http://www.go-remove-malware.com/wp-content/uploads/2014/09/...
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
* Open Firefox * Open **Add-ons** * Click **Get Add-ons** * Type Adblock Plus in search field * Select **Adblock Plus** * Click **Install** [![ims](https://i.stack.imgur.com/Fn64C.png)](https://i.stack.imgur.com/Fn64C.png) (source: [go-remove-malware.com](http://www.go-remove-malware.com/wp-content/uploads/2014/09/...
I would install ghostery for even more privacy with adblock. Less tracking and I noticed that webpages are loading quicker <https://www.ghostery.com/en/>
675,580
I use Firefox as my primary browser and I would like to do away with all those pesky ads that different sites keep throwing up and waste my time. I recently refreshed my browser and I lost my previously installed Adblock Plus. It seems that the last updated version of Adblock plus present on the Ubuntu Apps Directory...
2015/09/18
[ "https://askubuntu.com/questions/675580", "https://askubuntu.com", "https://askubuntu.com/users/177601/" ]
I will suggest you to install `uBlock` instead of `ABP` because: [uBlock vs. ABP: efficiency compared](https://github.com/chrisaljoudi/uBlock/wiki/uBlock-vs.-ABP:-efficiency-compared) `uBlock` can be installed using [uBlock](https://addons.mozilla.org/en-US/firefox/addon/ublock-origin/) link `ABP` can be installed u...
I would install ghostery for even more privacy with adblock. Less tracking and I noticed that webpages are loading quicker <https://www.ghostery.com/en/>
47,273,225
I'm trying to make a map that takes a function that calls other functions, and a list of functions - so here is what I've put in: ``` def function1(): return 3 def function2(): return 4 def List_Of_Functions(My_Function): return My_Function print(list(map(List_Of_Functions, [functi...
2017/11/13
[ "https://Stackoverflow.com/questions/47273225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8934944/" ]
Nowhere in the code you are calling any of the functions `function1` or `function2`. I think what you are after is by amending the middle method to become: ``` def List_Of_Functions(My_Function): return My_Function() ``` Without the parentheses after the `My_Function`, it's just passing a reference to the fu...
You missed `function1()` and `function2()` in the last statement ``` def function1(): return 3 def function2(): return 4 def List_Of_Functions(My_Function): return My_Function print(list(map(List_Of_Functions, [function1(), function2()]))) ```
2,003,220
All the time, I use PHP on server side to generate HTML/XHTML directly or via Smarty/PHPTAL or any other templating engine. I do believe most of developers follow the same path most of the time. Now I'm thinking of delegating GUI & client-side to GWT and using to send RPCXML / RPCJSON / POST / GET to server side which...
2010/01/04
[ "https://Stackoverflow.com/questions/2003220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/128028/" ]
You won't find them. GWT uses a non-transparent protocol for GWT-RPC communication. This is easy and relatively convenient in Java where the GWT compiler creates that for you. You'd have to reverse engineer that for PHP. If you want a rich UI with a PHP backend I'd suggest you look at YUI or ExtJS (among others).
Have you tried <http://www.gwtphp.com/> ? I don't have any experience with GWT, and what @cletus is saying may be true, but there do appear to be several projects providing mechanisms for using a PHP backend with GWT.
2,003,220
All the time, I use PHP on server side to generate HTML/XHTML directly or via Smarty/PHPTAL or any other templating engine. I do believe most of developers follow the same path most of the time. Now I'm thinking of delegating GUI & client-side to GWT and using to send RPCXML / RPCJSON / POST / GET to server side which...
2010/01/04
[ "https://Stackoverflow.com/questions/2003220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/128028/" ]
You won't find them. GWT uses a non-transparent protocol for GWT-RPC communication. This is easy and relatively convenient in Java where the GWT compiler creates that for you. You'd have to reverse engineer that for PHP. If you want a rich UI with a PHP backend I'd suggest you look at YUI or ExtJS (among others).
Just for completeness, [GWTPHP](http://code.google.com/p/gwtphp/) claims to support GWT-RPC fully. PHP source is available at [sourceforge](http://sourceforge.net/projects/gwtphp/files/). But the project is not updated since May 2008, although a fix for GWT 2.0 is mentioned in the [issue list](http://code.google.com/p/...
2,003,220
All the time, I use PHP on server side to generate HTML/XHTML directly or via Smarty/PHPTAL or any other templating engine. I do believe most of developers follow the same path most of the time. Now I'm thinking of delegating GUI & client-side to GWT and using to send RPCXML / RPCJSON / POST / GET to server side which...
2010/01/04
[ "https://Stackoverflow.com/questions/2003220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/128028/" ]
Have you tried <http://www.gwtphp.com/> ? I don't have any experience with GWT, and what @cletus is saying may be true, but there do appear to be several projects providing mechanisms for using a PHP backend with GWT.
Just for completeness, [GWTPHP](http://code.google.com/p/gwtphp/) claims to support GWT-RPC fully. PHP source is available at [sourceforge](http://sourceforge.net/projects/gwtphp/files/). But the project is not updated since May 2008, although a fix for GWT 2.0 is mentioned in the [issue list](http://code.google.com/p/...
21,289,998
I need to dequeue a Message from Oracle Advanced Queue (ADQ) through an MDB. The MDB is deployed on Weblogic 11. I can define a Foreign Server for ADQ ([official oracle doc](http://docs.oracle.com/cd/E12839_01/web.1111/e13738/aq_jms.htm)). The qustion is: **what happens if the payload is not a jms type e.g. `queue_p...
2014/01/22
[ "https://Stackoverflow.com/questions/21289998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645339/" ]
``` $('body !nav') ``` is not a valid selector. What you should do is add a listener to the document: ``` $(document).click(function() { // Stuff you want to do on a click }); ``` This will capture all clicks that aren't handled by another function. Then, capture the clicks that happen on nav: ``` $("nav").clic...
try this: ``` $('a#menu').click(function(e) { e.preventDefault(); e.stopPropagation(); //this should just be .addClass but to demonstrate functionality I've left it as .toggleClass $('nav, #wrapper').toggleClass('active'); }); //how I want it to work //on click of anything besides nav, if the active class i...
21,289,998
I need to dequeue a Message from Oracle Advanced Queue (ADQ) through an MDB. The MDB is deployed on Weblogic 11. I can define a Foreign Server for ADQ ([official oracle doc](http://docs.oracle.com/cd/E12839_01/web.1111/e13738/aq_jms.htm)). The qustion is: **what happens if the payload is not a jms type e.g. `queue_p...
2014/01/22
[ "https://Stackoverflow.com/questions/21289998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1645339/" ]
Two things to fix here: 1) Use `stopPropagation()` ([Documentation](http://api.jquery.com/event.stoppropagation/)) on the nav click to avoid registering a body click (the event bubbles up by default): ``` $('nav').click(function(e) { e.stopPropagation(); }); ``` 2) Use the `:not` selector ([Documentation](http:...
try this: ``` $('a#menu').click(function(e) { e.preventDefault(); e.stopPropagation(); //this should just be .addClass but to demonstrate functionality I've left it as .toggleClass $('nav, #wrapper').toggleClass('active'); }); //how I want it to work //on click of anything besides nav, if the active class i...
59,374,057
I am recording the application through Wiremock using JAVA DSL, Do we have the option to customize the mapping file names? instead of getting the filename which is generated from wiremock.. Example: searchpanel\_arrivalairport\_th-72f9b8b7-076f-4102-b6a8-aa38710fde1b.json (Generated form wiremock using java ) I am exp...
2019/12/17
[ "https://Stackoverflow.com/questions/59374057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3729858/" ]
You can use this modified query which will return a row of JSON per row of your table: ``` SELECT ( SELECT [key_en] AS 'en.key', [text_en] AS 'en.text', [html_text_en] AS 'en.htmltext', [key_fr] AS 'fr.key', [text_fr] AS 'fr.text', ...
You can use `apply`: ``` SELECT j.j FROM [MyContent] c CROSS APPLY (SELECT c.[key_en] AS 'en.key', c.[text_en] AS 'en.text', c.[html_text_en] AS 'en.htmltext', c.[key_fr] AS 'fr.key', c.[text_fr] AS 'fr.text', c.[html_text_fr] AS 'fr.htmltext' ...
18,005,158
firstly i've installed PagedList from Nuget package and then deployed the below code into StoreManager Controller ``` using System; using System.Collections.Generic; using System.Data; using System.Data.Entity; using System.Linq; using System.Web; using System.Web.Mvc; using MvcMusicStore.Models; using PagedList; nam...
2013/08/01
[ "https://Stackoverflow.com/questions/18005158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1499233/" ]
The relevant logger used is called `net.sf.ehcache.distribution.RMICachePeer`, where you have to enable `DEBUG` level. How to configure the logger really depends on your logging framework. For log4j you would use something like the following in your `log4j.properties` file: ``` log4j.logger.net.sf.ehcache.distributio...
**There was no problem as such.I think my testing was a bit off the mark.** I had the same jsp being accessed from two nodes(by 2 diff browser sessions) and was relying on my logs to see for cues regarding replication.I just changed my approach to see the content/data on the jsp and i see that the other node fetches th...
38,560,888
I am trying to pass some custom data attributes to a modal which is opened through a link . The HTML snippet is as following: ``` <div class="btn-group"> <button aria-expanded="false" class="btn btn-xs green dropdown-toggle" data-toggle="dropdown" id="button_action" type="button">Action <i class="fa fa-angle-down"><...
2016/07/25
[ "https://Stackoverflow.com/questions/38560888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3651377/" ]
> > Try using bootstrap modal's event callbacks instead of click handler: > > > ``` $('#option_contact').on('shown.bs.modal', function() { var $el = $("#modal_contact"); var $username = $el.data('userName'); alert(username); }); ```
Please check below snippet. you will find the username correctly. In your code you have mentioned "userName" to fetch the attribute value which should be "username". ```js $(document).ready(function(){ $('#modal_contact').on('click', function() { var $el = $(this); var $username = $el.data('username'); ...
38,560,888
I am trying to pass some custom data attributes to a modal which is opened through a link . The HTML snippet is as following: ``` <div class="btn-group"> <button aria-expanded="false" class="btn btn-xs green dropdown-toggle" data-toggle="dropdown" id="button_action" type="button">Action <i class="fa fa-angle-down"><...
2016/07/25
[ "https://Stackoverflow.com/questions/38560888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3651377/" ]
> > Try using bootstrap modal's event callbacks instead of click handler: > > > ``` $('#option_contact').on('shown.bs.modal', function() { var $el = $("#modal_contact"); var $username = $el.data('userName'); alert(username); }); ```
Here is the preview [code solution](https://plnkr.co/edit/fmwzmlZ1Gjktg00l4DcL?p=preview) ``` <!DOCTYPE html> <html> <head> <script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script data-require="bootstrap.js@*" data-semve...
38,560,888
I am trying to pass some custom data attributes to a modal which is opened through a link . The HTML snippet is as following: ``` <div class="btn-group"> <button aria-expanded="false" class="btn btn-xs green dropdown-toggle" data-toggle="dropdown" id="button_action" type="button">Action <i class="fa fa-angle-down"><...
2016/07/25
[ "https://Stackoverflow.com/questions/38560888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3651377/" ]
In order to set data dont use camelCase notation. Insted use something like this `data-user_name="User1"` ```js $('#modal_contact').on('click', function() { var $el = $(this); var $username = $(this).data('user_name'); alert($username); }); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/...
Please check below snippet. you will find the username correctly. In your code you have mentioned "userName" to fetch the attribute value which should be "username". ```js $(document).ready(function(){ $('#modal_contact').on('click', function() { var $el = $(this); var $username = $el.data('username'); ...
38,560,888
I am trying to pass some custom data attributes to a modal which is opened through a link . The HTML snippet is as following: ``` <div class="btn-group"> <button aria-expanded="false" class="btn btn-xs green dropdown-toggle" data-toggle="dropdown" id="button_action" type="button">Action <i class="fa fa-angle-down"><...
2016/07/25
[ "https://Stackoverflow.com/questions/38560888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3651377/" ]
In order to set data dont use camelCase notation. Insted use something like this `data-user_name="User1"` ```js $('#modal_contact').on('click', function() { var $el = $(this); var $username = $(this).data('user_name'); alert($username); }); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/...
Here is the preview [code solution](https://plnkr.co/edit/fmwzmlZ1Gjktg00l4DcL?p=preview) ``` <!DOCTYPE html> <html> <head> <script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script> <script data-require="bootstrap.js@*" data-semve...
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
Variables names are only locally meaningful. Once you hit `return s1,s2,s3,s4` at the end of the method, Python constructs a tuple with the values of s1, s2, s3 and s4 as its four members at index 0, 1, 2 and 3 - NOT a dictionary of variable names to values, NOT an object with variable names and their values, etc. ...
When multiple values are returned from a function as comma-separated, they will be returned as a tuple. So *obj* here will be a tuple with values (s1, s2, s3, s4). ``` >>>print(type()) <class 'tuple'> >>>print(obj[0]) # will print value of s1 "More organized code" ```
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
You're returning a [`tuple`](http://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange). Index it. ``` obj=list_benefits() print obj[0] + " is a benefit of functions!" print obj[1] + " is a benefit of functions!" print obj[2] + " is a benefit of functions!" ```
I am working in python flask: I had the same problem... There was a "," after I declared my my form variables; I am working with wtforms. That is what caused all the confusion
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
``` class list_benefits(object): def __init__(self): self.s1 = "More organized code" self.s2 = "More readable code" self.s3 = "Easier code reuse" def build_sentence(): obj=list_benefits() print obj.s1 + " is a benefit of functions!" print obj.s2 + " is a benefit of f...
I am working in python flask: I had the same problem... There was a "," after I declared my my form variables; I am working with wtforms. That is what caused all the confusion
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
I am working in python flask: I had the same problem... There was a "," after I declared my my form variables; I am working with wtforms. That is what caused all the confusion
When multiple values are returned from a function as comma-separated, they will be returned as a tuple. So *obj* here will be a tuple with values (s1, s2, s3, s4). ``` >>>print(type()) <class 'tuple'> >>>print(obj[0]) # will print value of s1 "More organized code" ```
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
I am working in python flask: I had the same problem... There was a "," after I declared my my form variables; I am working with wtforms. That is what caused all the confusion
You are returning four values from a function and storing them in a variable **obj**, it does not mean *obj* is an object. So you can't access the values as *obj.s1, obj.s2*... instead, use obj[index] to access values. ``` print(obj[0]) ```
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
You're returning a [`tuple`](http://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange). Index it. ``` obj=list_benefits() print obj[0] + " is a benefit of functions!" print obj[1] + " is a benefit of functions!" print obj[2] + " is a benefit of functions!" ```
``` class list_benefits(object): def __init__(self): self.s1 = "More organized code" self.s2 = "More readable code" self.s3 = "Easier code reuse" def build_sentence(): obj=list_benefits() print obj.s1 + " is a benefit of functions!" print obj.s2 + " is a benefit of f...
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
You return four variables s1,s2,s3,s4 and receive them using a single variable `obj`. This is what is called a `tuple`, `obj` is associated with 4 values, the values of `s1,s2,s3,s4`. So, use index as you use in a list to get the value you want, in order. ``` obj=list_benefits() print obj[0] + " is a benefit of functi...
When multiple values are returned from a function as comma-separated, they will be returned as a tuple. So *obj* here will be a tuple with values (s1, s2, s3, s4). ``` >>>print(type()) <class 'tuple'> >>>print(obj[0]) # will print value of s1 "More organized code" ```
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
Variables names are only locally meaningful. Once you hit `return s1,s2,s3,s4` at the end of the method, Python constructs a tuple with the values of s1, s2, s3 and s4 as its four members at index 0, 1, 2 and 3 - NOT a dictionary of variable names to values, NOT an object with variable names and their values, etc. ...
You are returning four values from a function and storing them in a variable **obj**, it does not mean *obj* is an object. So you can't access the values as *obj.s1, obj.s2*... instead, use obj[index] to access values. ``` print(obj[0]) ```
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
You return four variables s1,s2,s3,s4 and receive them using a single variable `obj`. This is what is called a `tuple`, `obj` is associated with 4 values, the values of `s1,s2,s3,s4`. So, use index as you use in a list to get the value you want, in order. ``` obj=list_benefits() print obj[0] + " is a benefit of functi...
I am working in python flask: I had the same problem... There was a "," after I declared my my form variables; I am working with wtforms. That is what caused all the confusion
17,290,114
I'm a beginner in python. I'm not able to understand what the problem is? ``` def list_benefits(): s1 = "More organized code" s2 = "More readable code" s3 = "Easier code reuse" s4 = "Allowing programmers to share and connect code together" return s1,s2,s3,s4 def build_sentence...
2013/06/25
[ "https://Stackoverflow.com/questions/17290114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2276527/" ]
``` class list_benefits(object): def __init__(self): self.s1 = "More organized code" self.s2 = "More readable code" self.s3 = "Easier code reuse" def build_sentence(): obj=list_benefits() print obj.s1 + " is a benefit of functions!" print obj.s2 + " is a benefit of f...
You are returning four values from a function and storing them in a variable **obj**, it does not mean *obj* is an object. So you can't access the values as *obj.s1, obj.s2*... instead, use obj[index] to access values. ``` print(obj[0]) ```
258,014
I thought I once read somewhere that writing to tempdb is faster than an actual table not in tempdb. Is this true in any capacity? I thought I recall it saying something special about tempdb and storing the data in memory?
2020/01/22
[ "https://dba.stackexchange.com/questions/258014", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/150011/" ]
> > writing to tempdb is faster than an actual table not in tempdb > > > It's true. There are two IO enhancements in TempDb. Writes to a table in a user database must have their log records flushed to disk on commit, or if a minimally-logged insert (like SELECT ... INTO), must have the database pages flushed to ...
As well as writes to tempdb often not every hitting disk/network IO, as extended upon in [David Browne's answer](https://dba.stackexchange.com/a/258020/22336), depending on your IO configuration you may find that even when the data is big enough to have to be spooled to disk it is still faster than selecting into a "no...
36,893,364
How to set vertical alignment for `mdRadioButton` directive of `Angular Material` related to text? I have tried both `layout-align` and `vertical-align` style but, the radio button is always align middle related to the text. [here](http://plnkr.co/edit/tOmPZ9wST1P44crxKyRw?p=preview) is the plunker ``` <md-content> ...
2016/04/27
[ "https://Stackoverflow.com/questions/36893364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482476/" ]
Angular Material actually generates a container for the radio button's on/off state and ripple. `<md-radio-button>` is the parent and `_md-container` is the child element you want to modify. [Here's a fork of the plunker](http://plnkr.co/edit/ZjDWBMoZRwSlyzm1QEnM?p=preview) with the modified styles: ``` md-radio-bu...
For Angular it can be achieved by: ``` mat-radio-button .mat-radio-label-content { white-space: normal; } mat-radio-button .mat-radio-label { align-items: normal; } ``` Live Example: <https://stackblitz.com/edit/angular-qkjhrz?embed=1&file=styles.css>
36,893,364
How to set vertical alignment for `mdRadioButton` directive of `Angular Material` related to text? I have tried both `layout-align` and `vertical-align` style but, the radio button is always align middle related to the text. [here](http://plnkr.co/edit/tOmPZ9wST1P44crxKyRw?p=preview) is the plunker ``` <md-content> ...
2016/04/27
[ "https://Stackoverflow.com/questions/36893364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482476/" ]
Angular Material actually generates a container for the radio button's on/off state and ripple. `<md-radio-button>` is the parent and `_md-container` is the child element you want to modify. [Here's a fork of the plunker](http://plnkr.co/edit/ZjDWBMoZRwSlyzm1QEnM?p=preview) with the modified styles: ``` md-radio-bu...
Improving on @athlan's answer slightly... It's better to only set the vertical alignment on the radio button element and not the label too, otherwise non-wrapping labels don't align properly. Also I use an additional class selector to opt-in to this behaviour: (sass) ```css .mat-radio-button.wrapping-radio-button { ...
36,893,364
How to set vertical alignment for `mdRadioButton` directive of `Angular Material` related to text? I have tried both `layout-align` and `vertical-align` style but, the radio button is always align middle related to the text. [here](http://plnkr.co/edit/tOmPZ9wST1P44crxKyRw?p=preview) is the plunker ``` <md-content> ...
2016/04/27
[ "https://Stackoverflow.com/questions/36893364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482476/" ]
For Angular it can be achieved by: ``` mat-radio-button .mat-radio-label-content { white-space: normal; } mat-radio-button .mat-radio-label { align-items: normal; } ``` Live Example: <https://stackblitz.com/edit/angular-qkjhrz?embed=1&file=styles.css>
Improving on @athlan's answer slightly... It's better to only set the vertical alignment on the radio button element and not the label too, otherwise non-wrapping labels don't align properly. Also I use an additional class selector to opt-in to this behaviour: (sass) ```css .mat-radio-button.wrapping-radio-button { ...
5,155,579
I want to be able to set the color inside a Text Field to be a different color than the default white. I can make it grey by reducing the Alpha value but i want to use colors other than gray to denote certain conditions. i.e. red for a warning. I hate asking such a simple question but I did some Google Searches and d...
2011/03/01
[ "https://Stackoverflow.com/questions/5155579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461051/" ]
You can change the background color within the Text Field attributes under the "view" tab in Interface Builder. Note that the setting for "Background" setting for changing the background color is well hidden at the bottom of all the settings, unlike the "Background" setting for setting a background image, which is rig...
to set the background of the textField: ``` UITextField *myTextField; myTextField.backgroundColor = [UIColor redColor]; ```
5,155,579
I want to be able to set the color inside a Text Field to be a different color than the default white. I can make it grey by reducing the Alpha value but i want to use colors other than gray to denote certain conditions. i.e. red for a warning. I hate asking such a simple question but I did some Google Searches and d...
2011/03/01
[ "https://Stackoverflow.com/questions/5155579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461051/" ]
To change the background color in IB, set the **Border** to other than round rect. Programmatically: ``` UITextField *myTextField; myTextField.borderStyle = UITextBorderStyleNone; myTextField.backgroundColor = [UIColor redColor]; ```
You can change the background color within the Text Field attributes under the "view" tab in Interface Builder. Note that the setting for "Background" setting for changing the background color is well hidden at the bottom of all the settings, unlike the "Background" setting for setting a background image, which is rig...
5,155,579
I want to be able to set the color inside a Text Field to be a different color than the default white. I can make it grey by reducing the Alpha value but i want to use colors other than gray to denote certain conditions. i.e. red for a warning. I hate asking such a simple question but I did some Google Searches and d...
2011/03/01
[ "https://Stackoverflow.com/questions/5155579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461051/" ]
To change the background color in IB, set the **Border** to other than round rect. Programmatically: ``` UITextField *myTextField; myTextField.borderStyle = UITextBorderStyleNone; myTextField.backgroundColor = [UIColor redColor]; ```
to set the background of the textField: ``` UITextField *myTextField; myTextField.backgroundColor = [UIColor redColor]; ```
73,065,239
I am setting up Vault with a Raft backend and I'm attempting to set up a cluster using this guide <https://learn.hashicorp.com/tutorials/vault/raft-storage> I got it working without TLS, however I am experiencing errors when trying to implment TLS. Setting up the transit engine and the first raft node is fine, however...
2022/07/21
[ "https://Stackoverflow.com/questions/73065239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3464078/" ]
Based on what I've read, SmallRye docs mention "unmanaged streams", which sounds like something that you want, but I see no clear documentation for what this means. Alternatively, you would need to use `KafkaClientService`, and access the consumer directly; you cannot use `@Incoming`, as this will always start consumi...
I was able to get my initial solution to work. This is how I set up the class responsible for loading the data using the `@Observe` annotation: ``` @ApplicationScoped public class DataLoader { @Inject EntityManager entityManager; protected void onStartup(@Observes StartupEvent startupEvent) { Li...
38,590,128
I 'm looking for a way to read a range of elements in an array of unknown dimension ( not length). The client can send a read request for an object and specify the range to read. The input String could be like this : "1:2:3:2,2:3:1:4" for example. This would mean he wants to read the elements in the range from [1][2]...
2016/07/26
[ "https://Stackoverflow.com/questions/38590128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
here is the Symfony3 Web server configuration information Link: <http://symfony.com/doc/current/cookbook/configuration/web_server_configuration.html> You need to modify your DocumentRoot directive just as @RiggsFolly has indicated. In your browser to access the DEV environment enter: ``` http://doc/app_dev.php ``` ...
`DocumentRoot` is not supposed to contain a PHP script. Its supposed the be a directory only ``` DocumentRoot "C:/Users/Tereza/my_project/web" ```
71,991,457
I have a button in a `<Nav/>` component that is shared between two components. when the button is clicked it opens up a `<FileUpload/>` component. **`<FileUpload/>` can be accessed from:** ``` <Profile /> => routes to '/profile' <Home /> => routes to '/home' ``` inside `<FileUpload/>` is there any way to check whi...
2022/04/24
[ "https://Stackoverflow.com/questions/71991457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17898592/" ]
Using `Array.prototype.reduce` to reduce you can reduce the array into an object and for each package use `Array.prototype.find` to find the corresponding change. Then you can compare the versions and determine its change. ```js const data = [ [ '-', '@date-io/moment', '1.3.13', '1', '3', '13' ], [ '+', '@date...
* Create a `Map` of all subtractions * Loop over all the additions and reduce it to the desired object using the map. ```js const data = [ ["-", "@date-io/moment", "1.3.13", "1", "3", "13"], ["+", "@date-io/moment", "1.3.14", "1", "3", "14"], ["-", "@emotion/react", "11.7.0", "11", "7", "0"], ["-", "@emotion/s...
46,611,986
I have following problem: I've programmed a 2D Game with a multiplayer function. Right now i store others Player Data and GameObjects in two **ArrayList** (The world is stored otherwise). Sometimes the Network-Thread sends Updates, which can not be applied, because the Game draws the Players/Game Objects (*java.util.C...
2017/10/06
[ "https://Stackoverflow.com/questions/46611986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8697391/" ]
If a list is iterated or modified in one thread and also in another thread you will get a `ConcurrentModficationException`. In general user interface applications restrict modifying model data to a single thread, usually the user interface thread, such as the event dispatch thread of Swing, or the platform thread in Ja...
Have you tried using Vector instead? It is part of Collection and is synchronized.
46,611,986
I have following problem: I've programmed a 2D Game with a multiplayer function. Right now i store others Player Data and GameObjects in two **ArrayList** (The world is stored otherwise). Sometimes the Network-Thread sends Updates, which can not be applied, because the Game draws the Players/Game Objects (*java.util.C...
2017/10/06
[ "https://Stackoverflow.com/questions/46611986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8697391/" ]
What happens here is, that 2 Threads are working on the same list. The first one is reading the List (`for (Player p : oPlayer) {`) and the second one is modifying it (`Game.oPlayer.add(new Player(message, id));`). This brings the oPlayer list into an (sort of) "inconsistent" state. Java sees that you modified somet...
If a list is iterated or modified in one thread and also in another thread you will get a `ConcurrentModficationException`. In general user interface applications restrict modifying model data to a single thread, usually the user interface thread, such as the event dispatch thread of Swing, or the platform thread in Ja...
46,611,986
I have following problem: I've programmed a 2D Game with a multiplayer function. Right now i store others Player Data and GameObjects in two **ArrayList** (The world is stored otherwise). Sometimes the Network-Thread sends Updates, which can not be applied, because the Game draws the Players/Game Objects (*java.util.C...
2017/10/06
[ "https://Stackoverflow.com/questions/46611986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8697391/" ]
What happens here is, that 2 Threads are working on the same list. The first one is reading the List (`for (Player p : oPlayer) {`) and the second one is modifying it (`Game.oPlayer.add(new Player(message, id));`). This brings the oPlayer list into an (sort of) "inconsistent" state. Java sees that you modified somet...
Have you tried using Vector instead? It is part of Collection and is synchronized.
8,160,255
In my class "Server.cs", I want to access a textbox from a form. I tried using this code: ``` ServerWindow.WriteChatlog(encoder.GetString(message, 0, bytesRead)); ``` But I got this error: ``` An object reference is required for the non-static field, method, or property 'Chat_Server.ServerWindow.WriteChatlog(string...
2011/11/16
[ "https://Stackoverflow.com/questions/8160255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1036212/" ]
You need to call `WriteChatLog` on an instance of the `ServerWindow` class. Ex: ``` ServerWindow servwin = new ServerWindow(); servwin.WriteChatlog(encoder.GetString(message, 0, bytesRead)); ```
You don't have an actual instance of `ServerWindow` when you're calling `ServerWindow.WriteChatlog`. The method either needs to be static: `public static void WriteChatlog(string text)` or you need an instance of ServerWindow: `ServerWindow serverWindow = new ServerWindow()` I suspect the former is what you actually ne...
8,160,255
In my class "Server.cs", I want to access a textbox from a form. I tried using this code: ``` ServerWindow.WriteChatlog(encoder.GetString(message, 0, bytesRead)); ``` But I got this error: ``` An object reference is required for the non-static field, method, or property 'Chat_Server.ServerWindow.WriteChatlog(string...
2011/11/16
[ "https://Stackoverflow.com/questions/8160255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1036212/" ]
You need to call `WriteChatLog` on an instance of the `ServerWindow` class. Ex: ``` ServerWindow servwin = new ServerWindow(); servwin.WriteChatlog(encoder.GetString(message, 0, bytesRead)); ```
You must use `this.WriteChatlog(...)` or just `WriteChatlog(...)`. This assumes you're calling the code from within the form's code.
8,160,255
In my class "Server.cs", I want to access a textbox from a form. I tried using this code: ``` ServerWindow.WriteChatlog(encoder.GetString(message, 0, bytesRead)); ``` But I got this error: ``` An object reference is required for the non-static field, method, or property 'Chat_Server.ServerWindow.WriteChatlog(string...
2011/11/16
[ "https://Stackoverflow.com/questions/8160255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1036212/" ]
You must use `this.WriteChatlog(...)` or just `WriteChatlog(...)`. This assumes you're calling the code from within the form's code.
You don't have an actual instance of `ServerWindow` when you're calling `ServerWindow.WriteChatlog`. The method either needs to be static: `public static void WriteChatlog(string text)` or you need an instance of ServerWindow: `ServerWindow serverWindow = new ServerWindow()` I suspect the former is what you actually ne...
12,554,005
I have a string, which represents part of xml. ``` string text ="word foo<tag foo='a' />another word " ``` and I need to replace particular words in this string. So I used this code: ``` Regex regex = new Regex("\\b" + co + "\\b", RegexOptions.IgnoreCase); return regex.Replace(text, new MatchEvaluator(subZvyrazni...
2012/09/23
[ "https://Stackoverflow.com/questions/12554005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113171/" ]
A simple trick like this may suffice in some cases if you are not that picky: ``` \bfoo\b(?![^<>]*>) ```
Try this regex: ``` Regex r = new Regex(@"\b" + rep + @".*?(?=\<)\b", RegexOptions.IgnoreCase); ```
12,554,005
I have a string, which represents part of xml. ``` string text ="word foo<tag foo='a' />another word " ``` and I need to replace particular words in this string. So I used this code: ``` Regex regex = new Regex("\\b" + co + "\\b", RegexOptions.IgnoreCase); return regex.Replace(text, new MatchEvaluator(subZvyrazni...
2012/09/23
[ "https://Stackoverflow.com/questions/12554005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113171/" ]
This is what you want ``` (?<!\<[\w\s]*?)\bfoo\b(?![\w\s]*?>) ``` works [here](http://regexhero.net/tester/) I had answered a related question [here](https://stackoverflow.com/questions/12305182/parse-commas-not-surrounded-by-brackets/12305883#12305883)
Try this regex: ``` Regex r = new Regex(@"\b" + rep + @".*?(?=\<)\b", RegexOptions.IgnoreCase); ```
12,554,005
I have a string, which represents part of xml. ``` string text ="word foo<tag foo='a' />another word " ``` and I need to replace particular words in this string. So I used this code: ``` Regex regex = new Regex("\\b" + co + "\\b", RegexOptions.IgnoreCase); return regex.Replace(text, new MatchEvaluator(subZvyrazni...
2012/09/23
[ "https://Stackoverflow.com/questions/12554005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113171/" ]
A simple trick like this may suffice in some cases if you are not that picky: ``` \bfoo\b(?![^<>]*>) ```
This is what you want ``` (?<!\<[\w\s]*?)\bfoo\b(?![\w\s]*?>) ``` works [here](http://regexhero.net/tester/) I had answered a related question [here](https://stackoverflow.com/questions/12305182/parse-commas-not-surrounded-by-brackets/12305883#12305883)
14,674,356
I have a custom class derived from List with an Add method that adds only if a certain condition is satisfied. Do I also need to override\* AddRange, or does AddRange simply call Add on each element of the given range? \*: Yes, `new` is *hiding* and not overriding in the context of C#.
2013/02/03
[ "https://Stackoverflow.com/questions/14674356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1042555/" ]
If you want to create custom collection. Don't derive it from `List<T>` but from [`Collection<T>`](http://msdn.microsoft.com/en-us/library/ms132397.aspx) or directly implement `IList<T>` or `ICollection<T>`. Indeed, the `Add` method in the `List<T>` class is not virtual. Note: `List<T>.AddRange` uses `Array.Copy`. ##...
If you need a collection that behaves exactly like a `List<T>`, except for adding only valid objects, I wouldn't create a custom collection. Use **Extensions** instead and call them `AddIfValid(T value)` and `AddRangeIfValid(IEnumerable<T>)` or whatever you like, as long as it's clear what the Extension is doing. Her...
14,674,356
I have a custom class derived from List with an Add method that adds only if a certain condition is satisfied. Do I also need to override\* AddRange, or does AddRange simply call Add on each element of the given range? \*: Yes, `new` is *hiding* and not overriding in the context of C#.
2013/02/03
[ "https://Stackoverflow.com/questions/14674356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1042555/" ]
If you want to create custom collection. Don't derive it from `List<T>` but from [`Collection<T>`](http://msdn.microsoft.com/en-us/library/ms132397.aspx) or directly implement `IList<T>` or `ICollection<T>`. Indeed, the `Add` method in the `List<T>` class is not virtual. Note: `List<T>.AddRange` uses `Array.Copy`. ##...
Don't use hiding that changes the semantics of the method. That's really bad design. Create a new class that implements `IList<T>`. The easiest way to do that is inheriting from `Collection<T>`. `Collection<T>` implements `IList<T>` and has four extension points in the form of `protected virtual` methods: ``` InsertI...