qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins. I would say that the core seems to be fine but if you're using a lot of plugins you might run int...
In my experience, jQuery 1.x has been very backwards-compatible until version 1.9. > > The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated. ...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery seems to be nicely backward compatible. I have been using it for more than a couple of years now through several versions of the core and have not had issues when upgrading except a few minor ones with some plugins. I would say that the core seems to be fine but if you're using a lot of plugins you might run int...
jQuery has produced backwards compatibility plugins since version 1.0. > > Web development has changed a lot over the years, and jQuery has changed along with it. Through all of this time, the team has tried to walk the line between maintaining compatibility with code from the past versus supporting the best web dev...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery is so serious about backwards compatibility that they produce a "backwards compatibility" plugin for each release: <http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin>. It let people who don't need backwards compatibility save on page weight.
*My experience* is that when upgrading, I sometimes find that stuff that used to work breaks. For instance, when upgrading from 1.7.2 to 1.8.3 I found some drag-and-drop features stopped working. Some problems may be due to deprecated jQuery functions being dropped, still in use by incompatible versions of [jQuery UI](...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery is so serious about backwards compatibility that they produce a "backwards compatibility" plugin for each release: <http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin>. It let people who don't need backwards compatibility save on page weight.
In my experience, jQuery 1.x has been very backwards-compatible until version 1.9. > > The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated. ...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery is so serious about backwards compatibility that they produce a "backwards compatibility" plugin for each release: <http://docs.jquery.com/Release:jQuery_1.2#jQuery_1.1_Compatibility_Plugin>. It let people who don't need backwards compatibility save on page weight.
jQuery has produced backwards compatibility plugins since version 1.0. > > Web development has changed a lot over the years, and jQuery has changed along with it. Through all of this time, the team has tried to walk the line between maintaining compatibility with code from the past versus supporting the best web dev...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
*My experience* is that when upgrading, I sometimes find that stuff that used to work breaks. For instance, when upgrading from 1.7.2 to 1.8.3 I found some drag-and-drop features stopped working. Some problems may be due to deprecated jQuery functions being dropped, still in use by incompatible versions of [jQuery UI](...
In my experience, jQuery 1.x has been very backwards-compatible until version 1.9. > > The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated. ...
281,438
We have had issues with Mootools not being very backward compatible specifically in the area of drag and drop functionality. I was wondering if anyone has had any similar problems with jQuery not being backward compatible. We are starting to use it quite heavily and are thinking about upgrading to a newer version to st...
2008/11/11
[ "https://Stackoverflow.com/questions/281438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
jQuery has produced backwards compatibility plugins since version 1.0. > > Web development has changed a lot over the years, and jQuery has changed along with it. Through all of this time, the team has tried to walk the line between maintaining compatibility with code from the past versus supporting the best web dev...
In my experience, jQuery 1.x has been very backwards-compatible until version 1.9. > > The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated. ...
65,846,973
I use the following script to extract the image name and image URL of all the images inside a google drive folder. It extracts this info into a google sheets doc. Is it possible to add the image dimensions (image height and width) into the script so it pulls into the doc aswell? Script: ``` // replace your-folder bel...
2021/01/22
[ "https://Stackoverflow.com/questions/65846973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15060086/" ]
Explanation: ------------ Your goal is to retrieve the `width` and the `height` of the pictures that are stored in a specific folder in Google Drive. * This info is located in [imageMediaMetadata](https://developers.google.com/drive/api/v2/reference/files) in the properties `imageMediaMetadata.width` and `imageMediaM...
You may use the [ImgApp library](https://github.com/tanaikech/ImgApp) to retrieve the width and height of any image file in Google Drive. ```js var blob = DriveApp.getFileById(fileId).getBlob(); var res = ImgApp.getSize(blob); var width = res.width; var height = res.height; ```
33,552,294
Is there a way in SQL server to create a function to have the following string 'ABC,DEF,GHI' output the value 3. And then is it possible to have a function that would allow you to specify what token of the string you want output. So input would be the string and the token you want returned. input: ('ABC,DEF,GHI', 2) o...
2015/11/05
[ "https://Stackoverflow.com/questions/33552294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3604669/" ]
The first question ``` declare @token varchar(20) set @token = 'ABC,DEF,GHI' select len(@token) - len(replace(@token ,',','')) + 1 ```
This function does what I need for part 2 ``` CREATE FUNCTION dbo.itemAtIndexInASplitString( @stringToSplit VARCHAR(MAX), @delimiter VARCHAR(5), @indexToReturn int) RETURNS varchar(max) AS BEGIN DECLARE @returnList TABLE ([ID] int, [Name] [nvarchar] (500)) DECLARE @name NVARCHAR(255) DECLARE @pos INT DECLARE @index IN...
33,552,294
Is there a way in SQL server to create a function to have the following string 'ABC,DEF,GHI' output the value 3. And then is it possible to have a function that would allow you to specify what token of the string you want output. So input would be the string and the token you want returned. input: ('ABC,DEF,GHI', 2) o...
2015/11/05
[ "https://Stackoverflow.com/questions/33552294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3604669/" ]
The first question ``` declare @token varchar(20) set @token = 'ABC,DEF,GHI' select len(@token) - len(replace(@token ,',','')) + 1 ```
this is much shorter than the code you are writing: A short explanation: By replacing the `,` with `</x><x>` we just have to add a `<x>`in front and a `</x>` at the end and - voila! - we've got XML. XML is easy to index. You must use the XQuery-function `sql:variable()` to get the variable index into the XPath. ``` ...
33,552,294
Is there a way in SQL server to create a function to have the following string 'ABC,DEF,GHI' output the value 3. And then is it possible to have a function that would allow you to specify what token of the string you want output. So input would be the string and the token you want returned. input: ('ABC,DEF,GHI', 2) o...
2015/11/05
[ "https://Stackoverflow.com/questions/33552294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3604669/" ]
this is much shorter than the code you are writing: A short explanation: By replacing the `,` with `</x><x>` we just have to add a `<x>`in front and a `</x>` at the end and - voila! - we've got XML. XML is easy to index. You must use the XQuery-function `sql:variable()` to get the variable index into the XPath. ``` ...
This function does what I need for part 2 ``` CREATE FUNCTION dbo.itemAtIndexInASplitString( @stringToSplit VARCHAR(MAX), @delimiter VARCHAR(5), @indexToReturn int) RETURNS varchar(max) AS BEGIN DECLARE @returnList TABLE ([ID] int, [Name] [nvarchar] (500)) DECLARE @name NVARCHAR(255) DECLARE @pos INT DECLARE @index IN...
31,382,847
I am trying to send a very basic mail with PHP using the below code; ``` if (mail('mymail@gmail.com','Test mail','Testing mail function!')) { echo "Email was sent successfully!"; } else { echo "Email was not sent!"; } ``` However, the output is always 'Email was not sent'. I am running this script locally on...
2015/07/13
[ "https://Stackoverflow.com/questions/31382847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4466617/" ]
Try with this library: [PHPMailer](https://github.com/PHPMailer/PHPMailer) You can use smtp instead of sendmail.
Mail Settings in XAMPP ---------------------- ``` $this->email->from('mygmail@gmail.com', 'myname');//your mail address and name $this->email->to('target@gmail.com'); //receiver mail $this->email->subject('testing'); $this->email->message($message); $this->email->send(); //sending mail Configuration in sendmail.ini ...
31,382,847
I am trying to send a very basic mail with PHP using the below code; ``` if (mail('mymail@gmail.com','Test mail','Testing mail function!')) { echo "Email was sent successfully!"; } else { echo "Email was not sent!"; } ``` However, the output is always 'Email was not sent'. I am running this script locally on...
2015/07/13
[ "https://Stackoverflow.com/questions/31382847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4466617/" ]
Try with this library: [PHPMailer](https://github.com/PHPMailer/PHPMailer) You can use smtp instead of sendmail.
You need to run Mercury to simulate a mail server, this is a Mercury tutorial: <http://system66.blogspot.com.es/2010/01/how-to-send-mail-from-localhost-with.html> Or you can use a PHPMailer.
38,983,359
enter image description hereOk, I am just starting to learn python, and I can't figure out why my IF/Else statement keeps getting this error after I enter Else: "SyntaxError: unindent does not match any outer indentation level". Here is my code if x>1000: print('3') else: SyntaxError:SyntaxError: unindent does not ...
2016/08/16
[ "https://Stackoverflow.com/questions/38983359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2177572/" ]
Each indentation level should have four spaces. ``` if x > 1000: print('3') else: pass # Must match indentation level of `print('3')` above. Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "c...
You are probably mixing up spaces and tabs. Only use one of those. If you are using spaces, make sure you are using the same amount of spaces. Also else must have something in it, like pass or return
38,983,359
enter image description hereOk, I am just starting to learn python, and I can't figure out why my IF/Else statement keeps getting this error after I enter Else: "SyntaxError: unindent does not match any outer indentation level". Here is my code if x>1000: print('3') else: SyntaxError:SyntaxError: unindent does not ...
2016/08/16
[ "https://Stackoverflow.com/questions/38983359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2177572/" ]
Ah, IDLE. You have tried to enter this into shell, right? So the thing looks like ``` >>> if x > 1000: print(3) else: ``` right? The point is, `>>>` doesn't count when calculating indents. So in fact if and else are *not* in the same column as far as IDLE is concerned. :-( [The indents it sees are 0, 8, ...
Each indentation level should have four spaces. ``` if x > 1000: print('3') else: pass # Must match indentation level of `print('3')` above. Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin Type "help", "copyright", "c...
38,983,359
enter image description hereOk, I am just starting to learn python, and I can't figure out why my IF/Else statement keeps getting this error after I enter Else: "SyntaxError: unindent does not match any outer indentation level". Here is my code if x>1000: print('3') else: SyntaxError:SyntaxError: unindent does not ...
2016/08/16
[ "https://Stackoverflow.com/questions/38983359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2177572/" ]
Be careful with spaces and tabs, even if lines look visually indented, from python perspective they maybe are not indented [![enter image description here](https://i.stack.imgur.com/SWwRG.png)](https://i.stack.imgur.com/SWwRG.png) For example, look at the image, line 2 contains 4 spaces and line 6 contains one tab. I...
You are probably mixing up spaces and tabs. Only use one of those. If you are using spaces, make sure you are using the same amount of spaces. Also else must have something in it, like pass or return
38,983,359
enter image description hereOk, I am just starting to learn python, and I can't figure out why my IF/Else statement keeps getting this error after I enter Else: "SyntaxError: unindent does not match any outer indentation level". Here is my code if x>1000: print('3') else: SyntaxError:SyntaxError: unindent does not ...
2016/08/16
[ "https://Stackoverflow.com/questions/38983359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2177572/" ]
Ah, IDLE. You have tried to enter this into shell, right? So the thing looks like ``` >>> if x > 1000: print(3) else: ``` right? The point is, `>>>` doesn't count when calculating indents. So in fact if and else are *not* in the same column as far as IDLE is concerned. :-( [The indents it sees are 0, 8, ...
You are probably mixing up spaces and tabs. Only use one of those. If you are using spaces, make sure you are using the same amount of spaces. Also else must have something in it, like pass or return
38,983,359
enter image description hereOk, I am just starting to learn python, and I can't figure out why my IF/Else statement keeps getting this error after I enter Else: "SyntaxError: unindent does not match any outer indentation level". Here is my code if x>1000: print('3') else: SyntaxError:SyntaxError: unindent does not ...
2016/08/16
[ "https://Stackoverflow.com/questions/38983359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2177572/" ]
Ah, IDLE. You have tried to enter this into shell, right? So the thing looks like ``` >>> if x > 1000: print(3) else: ``` right? The point is, `>>>` doesn't count when calculating indents. So in fact if and else are *not* in the same column as far as IDLE is concerned. :-( [The indents it sees are 0, 8, ...
Be careful with spaces and tabs, even if lines look visually indented, from python perspective they maybe are not indented [![enter image description here](https://i.stack.imgur.com/SWwRG.png)](https://i.stack.imgur.com/SWwRG.png) For example, look at the image, line 2 contains 4 spaces and line 6 contains one tab. I...
14,781,105
I have a CSS dropdown menu. It works properly with Firefox, Chrome, IE7+, but not Safari. Weird. The drop down menu stay in the :hover state if you are in the parent menu. I can quite describe this right, but basically the dropdown menu works fine on any page, except when the parent item is selected. Works fine: <htt...
2013/02/08
[ "https://Stackoverflow.com/questions/14781105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1895126/" ]
It appears that the Home and Services pages each use different methods of revealing the dropdown. The Home page changes the `display` of the dropdown `UL`. The Services page changes the `overflow` of the dropdown's parent `LI`, which seems to cause problems in Safari. I suggest using the Home page method on all pages.
The same JavaScript `/CatalystScripts/Java_DynMenusSelectedCSS.js` is being referenced five times throughout the page. Try reducing it to only one and see if that helps.
14,781,105
I have a CSS dropdown menu. It works properly with Firefox, Chrome, IE7+, but not Safari. Weird. The drop down menu stay in the :hover state if you are in the parent menu. I can quite describe this right, but basically the dropdown menu works fine on any page, except when the parent item is selected. Works fine: <htt...
2013/02/08
[ "https://Stackoverflow.com/questions/14781105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1895126/" ]
It appears that the Home and Services pages each use different methods of revealing the dropdown. The Home page changes the `display` of the dropdown `UL`. The Services page changes the `overflow` of the dropdown's parent `LI`, which seems to cause problems in Safari. I suggest using the Home page method on all pages.
You are also using jQuery (line 14-18) but not including the jquery js file.
710,974
We know the centripetal force $F\_c$ had magnitude $m\omega^2r$. But let's try to write it in vector form. First of all,since it is directed along the radius,the unit vector in radial direction in this case is $-\hat{\boldsymbol{r}}$. And since the magnitude is $m\omega^2r$,we finally get $$\vec{\mathrm{F\_c}}=-\mathr...
2022/05/28
[ "https://physics.stackexchange.com/questions/710974", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
Your shm equation I will write as the displacement $y(t) = A \cos (-\omega t+\Psi)$. Thus at some position you have a particle executing shm with amplitude $A$, frequency $\omega$, and phase $\Psi$. Now suppose that the phase $\Psi$ is a function of position $x$. $\Psi (x) = \psi(x) + \phi\,\Rightarrow \, y(x,t)...
The first one gives for every $t$ the displacement of the observed body in simple harmonic motion. [![SHM](https://i.stack.imgur.com/WKOpW.gif)](https://i.stack.imgur.com/WKOpW.gif) The second one gives you some quantity in space and time for every $t$ and $x$, let it be the change in pressure (sound), height (string)...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
**Make her as powerful as you imagine she is.** Because that is where the awesome is! You worry your character will be overpowered which means you can imagine her doing overpowered stuff. You worry she will be able to do stuff no-one can counter. And I think you like it. **Have her do that stuff!** Please! Have her to...
One of the easy ways to eliminate the more extreme abuses is a line-of-sight limitation. You can only teleport to a location if you can currently see it. That puts a hard cap on the range of the effect, and introduces opportunities for opponents to disrupt it (fight indoors, obscure their vision, etc). Teleporting some...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
Do a little twist on some old thaumaturgy tropes. You want it to be contiguous floor or some such, so make it where a change in flooring would be a block. Tile floor acts as one piece, wood another. This sets up people who are aware of the ability to build in some limitations. If you can teleport, it's less effective ...
### "Electrical magic"-based teleportation: requires a conductive path. Suppose your teleportation magic makes your teleporting person act as a self-propelled surge of electrons. As long as they are in physical contact with a conductive surface or conduit, they can teleport to any other point on it with enough space f...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
**Make her as powerful as you imagine she is.** Because that is where the awesome is! You worry your character will be overpowered which means you can imagine her doing overpowered stuff. You worry she will be able to do stuff no-one can counter. And I think you like it. **Have her do that stuff!** Please! Have her to...
Please be much more imaginative. Either explain or drop any difference between “using magic” and how else they might "teleport”. Explain how a “hand” matters, rather than a foot or shoulder, knee or elbow. A “circular arena…” is one thing. A “circular area…”; even “a circle…” very different. You might not care. Your...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
### "Electrical magic"-based teleportation: requires a conductive path. Suppose your teleportation magic makes your teleporting person act as a self-propelled surge of electrons. As long as they are in physical contact with a conductive surface or conduit, they can teleport to any other point on it with enough space f...
Please be much more imaginative. Either explain or drop any difference between “using magic” and how else they might "teleport”. Explain how a “hand” matters, rather than a foot or shoulder, knee or elbow. A “circular arena…” is one thing. A “circular area…”; even “a circle…” very different. You might not care. Your...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
**Make her as powerful as you imagine she is.** Because that is where the awesome is! You worry your character will be overpowered which means you can imagine her doing overpowered stuff. You worry she will be able to do stuff no-one can counter. And I think you like it. **Have her do that stuff!** Please! Have her to...
### "Electrical magic"-based teleportation: requires a conductive path. Suppose your teleportation magic makes your teleporting person act as a self-propelled surge of electrons. As long as they are in physical contact with a conductive surface or conduit, they can teleport to any other point on it with enough space f...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
Do a little twist on some old thaumaturgy tropes. You want it to be contiguous floor or some such, so make it where a change in flooring would be a block. Tile floor acts as one piece, wood another. This sets up people who are aware of the ability to build in some limitations. If you can teleport, it's less effective ...
First, you already limited the most unfair application by limiting it to ground use : The dropping someone off in space and coming back. This was also only usable if you allow forced teleportation of others. Which you can limit (maximum weight, maximum volume or needing the consent of other living beings to move them)...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
**Make her as powerful as you imagine she is.** Because that is where the awesome is! You worry your character will be overpowered which means you can imagine her doing overpowered stuff. You worry she will be able to do stuff no-one can counter. And I think you like it. **Have her do that stuff!** Please! Have her to...
First, you already limited the most unfair application by limiting it to ground use : The dropping someone off in space and coming back. This was also only usable if you allow forced teleportation of others. Which you can limit (maximum weight, maximum volume or needing the consent of other living beings to move them)...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
**Limitations in other places** Positioning is powerful. Incredibly, insanely powerful. In any engagement this is more important that the weapon your holding, as the position in regards to your opponents dictate what is effective. If you let someone teleport at will with some items every few seconds as long as they h...
One of the easy ways to eliminate the more extreme abuses is a line-of-sight limitation. You can only teleport to a location if you can currently see it. That puts a hard cap on the range of the effect, and introduces opportunities for opponents to disrupt it (fight indoors, obscure their vision, etc). Teleporting some...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
### "Electrical magic"-based teleportation: requires a conductive path. Suppose your teleportation magic makes your teleporting person act as a self-propelled surge of electrons. As long as they are in physical contact with a conductive surface or conduit, they can teleport to any other point on it with enough space f...
First, you already limited the most unfair application by limiting it to ground use : The dropping someone off in space and coming back. This was also only usable if you allow forced teleportation of others. Which you can limit (maximum weight, maximum volume or needing the consent of other living beings to move them)...
198,077
In my story, there is a character that is capable of using magic or an ability that allows them to "teleport" as long as they are in contact with the ground or the area that they want to use it on with at least one hand. For example, in the middle of a circular arena 100m in diameter, as long as they are touching the ...
2021/03/19
[ "https://worldbuilding.stackexchange.com/questions/198077", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/83344/" ]
Instead of true teleportation, have them move within the ground as if it were not solid. They can "merge" with it and move around really fast - maybe so fast that for practical purposes, it is much the same as teleporting. The advantage of this is that it prevents the user from abusing this power. For example, in the ...
One of the easy ways to eliminate the more extreme abuses is a line-of-sight limitation. You can only teleport to a location if you can currently see it. That puts a hard cap on the range of the effect, and introduces opportunities for opponents to disrupt it (fight indoors, obscure their vision, etc). Teleporting some...
59,330,671
Given the following two strings: ``` let subject: &str = "zoop-12"; let trail: &str "-12"; ``` How would I go about removing `trail` from `subject` only once? I would only like to do this in the case that `subject` has these characters at its end, so in a case like this I would like nothing removed: ``` let subject...
2019/12/13
[ "https://Stackoverflow.com/questions/59330671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9315690/" ]
You can use a dictionary to assign the `printerX_name_long`. ``` def get_network_printer(name_short): return { printer1_name_short: printer1_name_long, printer2_name_short: printer2_name_long }.get(name_short, "default") def btn_add_printer(self): network_printer = get_network_printer(self.ui.comb...
So since both functions use exactly the same code you could create a function that does this code, and then call that function from the other two. something like ```py class my_class: def btn_add_printer(self): self.printer_func() def btn_remove_printer(self): self.printer_func() def pri...
59,330,671
Given the following two strings: ``` let subject: &str = "zoop-12"; let trail: &str "-12"; ``` How would I go about removing `trail` from `subject` only once? I would only like to do this in the case that `subject` has these characters at its end, so in a case like this I would like nothing removed: ``` let subject...
2019/12/13
[ "https://Stackoverflow.com/questions/59330671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9315690/" ]
You can use a dictionary to assign the `printerX_name_long`. ``` def get_network_printer(name_short): return { printer1_name_short: printer1_name_long, printer2_name_short: printer2_name_long }.get(name_short, "default") def btn_add_printer(self): network_printer = get_network_printer(self.ui.comb...
Alternatively you can define a dict outside the function, much more compact. ``` def btn_add_printer(self): printer = str(self.ui.comboBox.currentText()) if printer in self.printers: network_printer = printers[printer] def btn_remove_printer(self): printer = str(self.ui.comboBox.currentText()) if prin...
28,225,704
I presented the following problem. when done click the button located in the dialog (pop -up ), the actionListener attribute does not work , ie not call the Backingbean. The strange thing is that in the version PrimeFaces showcase this code works perfectly , only mobile fails. Another curiosity is that the javascript ...
2015/01/29
[ "https://Stackoverflow.com/questions/28225704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3140724/" ]
Just modify your selector... ``` $('#1').css('whatever', 'yep'); ``` Please see the comments section to see why this works *in this scenario*, but you're gonna have bad time if selecting it in a stylesheet. I'd recommend using the method in [T.J.'s answer](https://stackoverflow.com/a/28225809/31671), because of jQue...
With CSS, it's awkward to use `id` values starting with a digit; the simplest thing is to avoid using them. But with what you have, you can do this: ``` $(".item[id='1']").css(/*...*/); ``` Just using `#1` as a selector may work in certain select situations provided they don't rely in CSS parsing, but is [invalid](...
29,654,418
I want to have a function with unlimited number of parameters but I want also make sure that those are all pointers of the same type. Something like this: ``` void myFunc(float value, MyClass* ....) { // take all pointers of type MyClass and call function `f` like this: a->(value); // store pointer in a vector...
2015/04/15
[ "https://Stackoverflow.com/questions/29654418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/163394/" ]
``` void myFunc(float value, std::initializer_list<MyClass*> il){ for(auto* p:il) p->f(value); } ``` no heap/free store allocation will occur. Use is `myFunc(3.14, {ptr1,ptr2,ptr3});` If you really hate `{}` you can forward to the above with an unrestricted template. At the point of forwarding there will be t...
You could do the following, then you can stick to your existing syntax.. ``` #include <iostream> #include <type_traits> using namespace std; struct V { int a; int b; }; // Little test function to ensure that it's the type we're expecting.. template <typename T> int test(T*) { static_assert(is_same<T, V>...
9,958,166
I am trying to show a Dialog box on onPostExecute method of an AsyncTask ``` @Override protected void onPostExecute(HttpResponse response) { if (response == null) { Log.d(TAG, "onPostExecute, response == null"); AlertDialog.Builder builder = new AlertDialog.Builder(ConfirmPhoneNoCode.this); ...
2012/03/31
[ "https://Stackoverflow.com/questions/9958166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/932307/" ]
`alert.show();` I think you have to add it... ``` AlertDialog alert = builder.create(); alert.show(); ```
Looks OK to me. Are you calling `alert.show()` ?
6,231,868
Using [ColorZilla](http://www.colorzilla.com/) I found an interesting feature. If I pick a color from firefox (bars,tabs or anything else of the browser) and then go to: > > ColorZilla > Inspect Last Element > In > Firebug > > > Then I can see the markup,css,js that firefox uses in the firebug panel just like a...
2011/06/03
[ "https://Stackoverflow.com/questions/6231868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407382/" ]
It sounds like you're after [Chromebug](http://blog.getfirebug.com/category/chromebug/). > > Chromebug is the Firebug code adapted > for XUL applications. It is the > debugger that Firebug developers use > to develop Firebug. > > > So you can debug your debugger, you know? Instructions: <http://getfirebug.com...
There is actually a dedicated version of Firebug for that called [Chromebug](http://blog.getfirebug.com/2009/10/12/chromebug-1-5a4/) (Named after the chrome of Firefox, not Google's chrome)
6,231,868
Using [ColorZilla](http://www.colorzilla.com/) I found an interesting feature. If I pick a color from firefox (bars,tabs or anything else of the browser) and then go to: > > ColorZilla > Inspect Last Element > In > Firebug > > > Then I can see the markup,css,js that firefox uses in the firebug panel just like a...
2011/06/03
[ "https://Stackoverflow.com/questions/6231868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407382/" ]
As mentioned in the comments, Chromebug is no longer working with current Firefox versions. Instead of opening the limited `chrome://browser/content/browser.xul` page, you can make the browser chrome accessible to the scratchpad. Open the `about:config` page and set `devtools.chrome.enabled` to `true`, as described in ...
There is actually a dedicated version of Firebug for that called [Chromebug](http://blog.getfirebug.com/2009/10/12/chromebug-1-5a4/) (Named after the chrome of Firefox, not Google's chrome)
22,836,255
Suppose my app doesn't use the Action Bar, does anyone know how I could show the 3-dots option menu when the current device hasn't got a hardware menu button? I've seen code snippets like that below, but it's for use with Action Bar, right? ``` <!-- list_menu.xml --> ?xml version="1.0" encoding="utf-8"?> <menu xmlns:a...
2014/04/03
[ "https://Stackoverflow.com/questions/22836255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/233798/" ]
Just to clear things up: You dont want an action bar in your app. If the device has a hardware menu button, you don't want to show the overflow icon (the three dots). And if the device has no hardware menu button, you want to show an seperate overflow, right? You can check for a hardware menu button with ``` ViewConf...
The menu appears in the `ActionBar` with >=3.0 devices. Without actionbar it won't work. For older <3.0 devices you can use [ActioBarSherlock](http://actionbarsherlock.com/) library to create `ActionBar`.
22,836,255
Suppose my app doesn't use the Action Bar, does anyone know how I could show the 3-dots option menu when the current device hasn't got a hardware menu button? I've seen code snippets like that below, but it's for use with Action Bar, right? ``` <!-- list_menu.xml --> ?xml version="1.0" encoding="utf-8"?> <menu xmlns:a...
2014/04/03
[ "https://Stackoverflow.com/questions/22836255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/233798/" ]
Just to clear things up: You dont want an action bar in your app. If the device has a hardware menu button, you don't want to show the overflow icon (the three dots). And if the device has no hardware menu button, you want to show an seperate overflow, right? You can check for a hardware menu button with ``` ViewConf...
You can check whether the hardware menu key is present or not in the device using ``` ViewConfiguration.get(context).hasPermanentMenuKey() ``` And show your icon based on that
40,477,840
`Iterable` has a `forEach` default method <https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html> Why does it not have a `map` method? For example, `Map` has a `map` method.
2016/11/08
[ "https://Stackoverflow.com/questions/40477840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283271/" ]
Think about this part: ``` str.substring(i, i+2) ``` When `i` is equal to the length of the string, `i + 2` will overshoot the end of the string by 1, giving you an out of bounds error.
It is because you have used i+2 in str.substring(i, i+2), which causes the out of bound exception.
40,477,840
`Iterable` has a `forEach` default method <https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html> Why does it not have a `map` method? For example, `Map` has a `map` method.
2016/11/08
[ "https://Stackoverflow.com/questions/40477840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/283271/" ]
Think about this part: ``` str.substring(i, i+2) ``` When `i` is equal to the length of the string, `i + 2` will overshoot the end of the string by 1, giving you an out of bounds error.
When you use `str.length()` it gives you the length of the string, while the max index of string that is accessible is given by `str.length() - 1`. For example, `"String"` will have length of 6. So, when you try to do this `str.substring(5 , (5+ 2))` it will try to access the index which is out of the bound and hence i...
34,533,073
I have a text file which includes lines like this: ``` <pattern number=1 theme=pseudo> <pattern number=2 theme=foo> <pattern number=3 theme=bar> ``` I'm selecting a random line with this function: ``` def find_random_pattern(theme): found_lines = [] pattern = open('poempatterns.txt','r') for line in pat...
2015/12/30
[ "https://Stackoverflow.com/questions/34533073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2955896/" ]
You are expecting that `re.findall` returns the whole line but it returns the matched part: ``` >>> line = "<pattern number=1 theme=pseudo>" >>> import re >>> re.findall("theme=pseudo", line) ['theme=pseudo'] ``` I suggest you use a pattern that matches the whole line, for example: ``` >>> re.findall(".*theme=pseud...
`re.findall` does return the match only not the whole `line`. Quoting from [Python Docs.](https://docs.python.org/3/library/re.html?highlight=re#module-re) : > > re.findall(pattern, string, flags=0) Return all non-overlapping > matches of pattern in string, as a list of strings. The string is > scanned left-to-rig...
37,086,955
It's my first time posting on Stack Overflow so bear with me. I've been trying to make a design responsive and I've found a couple of irritating issues. I'll chuck a link to the page I'm talking about and if you're up for a challenge you can check it out: <http://www.rattlingskeleton.tk/> The first one being how when ...
2016/05/07
[ "https://Stackoverflow.com/questions/37086955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6303174/" ]
> > How should I add source string at the end of destination ? > > > If this is what you need then you should look for the terminating zero in the **destination** (and not in the source as your code does!). Once the terminating zero is found, your `EDI` register will be past its location and thus you need to ba...
Here is the pseudo code for string concatenation: ``` t1 = get string length of str1 ; find length not including zero terminate t2 = get string length of str2 ; find length not including zero terminate ct = (t1 + t2) + 1 ; total length + 1 for zero terminate dest = allocate memory f...
15,646,834
I'm working on small WPF desktop app to track a robot. I have a Kinect for Windows on my desk and I was able to do the basic features and run the Depth camera stream and the RGB camera stream. What I need is to track a robot on the floor but I have no idea where to start. I found out that I should use EMGU (OpenCV wra...
2013/03/26
[ "https://Stackoverflow.com/questions/15646834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Robot localization is a very tricky problem and I myself have been struggling for months now, I can tell you what I have achieved But you have a number of options: * **Optical Flow Based Odometery**: (Also known as visual odometry): 1. Extract keypoints from one image or features (I used Shi-Tomashi, or cvGoodFeature...
Not sure if is would help you or not...but I put together a Python module that might help. <http://letsmakerobots.com/node/38883#comments>
73,847,501
I am trying to figure out the correct way to limit access to an `API` endpoint using `IP address`. I went through the docs, blocking is mentioned but limiting the call to `API` endpoint is not. What is the correct way to do this?
2022/09/25
[ "https://Stackoverflow.com/questions/73847501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6387095/" ]
Depending of your server architecture you can achieve it clearly programmatically, by: ``` def retrieve_user_ip(request): user_ip = request.META.get('HTTP_X_FORWARDED_FOR') if user_ip: ip = user_ip.split(',')[-1] # According to Wiki, have to grab last element from HTTP_X_FORWARDED_FOR header else: ...
You can make a custom permission to check if the ip address is in the list of safe ip addresses and set it in the DEFAULT\_PERMISSION\_CLASSES. Something like: ``` class SafeIPPermission(permissions.BasePermission): def has_permission(self, request, view): if ip := request.META.get('HTTP_X_FORWARDED_FOR')...
34,398,650
I can get a list of installed apps (both user and system apps). I am also able to uninstall user apps, however, not able to uninstall system apps. Is there any way to uninstall system app? If the phone is already rooted, will the following code work? ``` Intent intent = new Intent(Intent.ACTION_DELETE); intent.setDat...
2015/12/21
[ "https://Stackoverflow.com/questions/34398650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2043825/" ]
you can execute root commands with: ``` runCommand("su"); runCommand("rm /data/system/application.package.apk"); runCommand("rm /data/data/application.package"); //when this doesn´t work try runCommand("rm -r /data/system/application.package.apk"); runCommand("rm -r /data/data/application.package"); public static v...
You need to have `root` access in order to remove `system` or `vendor` apps. ``` $ su # rm /data/system/application.package.apk # rm /data/data/application.package ```
34,398,650
I can get a list of installed apps (both user and system apps). I am also able to uninstall user apps, however, not able to uninstall system apps. Is there any way to uninstall system app? If the phone is already rooted, will the following code work? ``` Intent intent = new Intent(Intent.ACTION_DELETE); intent.setDat...
2015/12/21
[ "https://Stackoverflow.com/questions/34398650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2043825/" ]
you can execute root commands with: ``` runCommand("su"); runCommand("rm /data/system/application.package.apk"); runCommand("rm /data/data/application.package"); //when this doesn´t work try runCommand("rm -r /data/system/application.package.apk"); runCommand("rm -r /data/data/application.package"); public static v...
Try this on Rooted Device...it works ``` Process reboot = Runtime.getRuntime().exec("su"); DataOutputStream os = new DataOutputStream(reboot.getOutputStream()); os.writeBytes("pm uninstall co.example.demo\n"); os.flush(); os.writeBytes("exit\n"); os.flush(); rebo...
20,115,403
Is there a way I can automatically print a stack trace when Exception occurs? I understand I can do so by manually surrounding a block with a try-catch statement, but there's no prior-knowledge where an exception would happen in a program, and doing it in suspicious region block by block would be super inefficient, sin...
2013/11/21
[ "https://Stackoverflow.com/questions/20115403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1261909/" ]
Define a global exception handler in your `Application` class and add any code you need to it. ``` Thread.setDefaultUncaughtExceptionHandler( new DefaultExceptionHandler(this)); ``` It is recommended that you still re-throw caught exceptions so that the app stops running, because it will be in an un...
``` catch (Exception e) {e.printStackTrace();} ``` The highest level is the Application level I believe. But in general just catch it at the usual activity lifecycle should be sufficient.
20,115,403
Is there a way I can automatically print a stack trace when Exception occurs? I understand I can do so by manually surrounding a block with a try-catch statement, but there's no prior-knowledge where an exception would happen in a program, and doing it in suspicious region block by block would be super inefficient, sin...
2013/11/21
[ "https://Stackoverflow.com/questions/20115403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1261909/" ]
Define a global exception handler in your `Application` class and add any code you need to it. ``` Thread.setDefaultUncaughtExceptionHandler( new DefaultExceptionHandler(this)); ``` It is recommended that you still re-throw caught exceptions so that the app stops running, because it will be in an un...
Extend Exception and do whatever you want in your custom Exception class.
20,115,403
Is there a way I can automatically print a stack trace when Exception occurs? I understand I can do so by manually surrounding a block with a try-catch statement, but there's no prior-knowledge where an exception would happen in a program, and doing it in suspicious region block by block would be super inefficient, sin...
2013/11/21
[ "https://Stackoverflow.com/questions/20115403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1261909/" ]
Define a global exception handler in your `Application` class and add any code you need to it. ``` Thread.setDefaultUncaughtExceptionHandler( new DefaultExceptionHandler(this)); ``` It is recommended that you still re-throw caught exceptions so that the app stops running, because it will be in an un...
There are two major kinds of exceptions: 1. Exceptions caused by programming errors (e.g. dereferencing a null reference, ...) 2. Exceptions caused by the environment (e.g. user enters 'abc' in a numeric field, network cable was unplugged, ...) In most of the cases you can't really recover from the first ones. (If so...
632,815
The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced? Of course, we know that voltage is created by the derivative of flux, but what does it mean?
2022/08/28
[ "https://electronics.stackexchange.com/questions/632815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267682/" ]
The reason we cannot use a transformer at DC is that a DC voltage would cause a linearly increasing flux in the core: \$\Phi\sim\frac{\mathrm d V}{\mathrm d t}\$. In reality, the core will [saturate](https://en.wikipedia.org/wiki/Saturation_(magnetic)) quickly, and the flux stops increasing. Then, also the current in t...
> > *but if the voltage is DC, why is no voltage induced?* > > > It's all a matter of timing, idealities, definitions and perspective. If you take a regular AC mains transformer of primary inductance circa 10 henry and turns ratio (say) 10:1 then, apply 1 volt to the primary terminals, you will see 0.1 volts indu...
632,815
The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced? Of course, we know that voltage is created by the derivative of flux, but what does it mean?
2022/08/28
[ "https://electronics.stackexchange.com/questions/632815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267682/" ]
The reason we cannot use a transformer at DC is that a DC voltage would cause a linearly increasing flux in the core: \$\Phi\sim\frac{\mathrm d V}{\mathrm d t}\$. In reality, the core will [saturate](https://en.wikipedia.org/wiki/Saturation_(magnetic)) quickly, and the flux stops increasing. Then, also the current in t...
It seems like you might not understand a basic property of transformers, related to the term `Flux`. Flux is `change`. An AC voltage is one that changes. A DC voltage is one that stays steady (does not change). If you apply a changing AC voltage to one winding, the flux (change) in the voltage allows the transformer t...
632,815
The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced? Of course, we know that voltage is created by the derivative of flux, but what does it mean?
2022/08/28
[ "https://electronics.stackexchange.com/questions/632815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267682/" ]
The reason we cannot use a transformer at DC is that a DC voltage would cause a linearly increasing flux in the core: \$\Phi\sim\frac{\mathrm d V}{\mathrm d t}\$. In reality, the core will [saturate](https://en.wikipedia.org/wiki/Saturation_(magnetic)) quickly, and the flux stops increasing. Then, also the current in t...
Mathematically speaking, "derivative" means "rate of change". In *steady state*, DC does not change, the magnitude of the flux does not change, and the "derivative" = 0, so induced voltage is zero, and the "transformer" is reduced to the role of an electromagnet.
632,815
The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced? Of course, we know that voltage is created by the derivative of flux, but what does it mean?
2022/08/28
[ "https://electronics.stackexchange.com/questions/632815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267682/" ]
> > *but if the voltage is DC, why is no voltage induced?* > > > It's all a matter of timing, idealities, definitions and perspective. If you take a regular AC mains transformer of primary inductance circa 10 henry and turns ratio (say) 10:1 then, apply 1 volt to the primary terminals, you will see 0.1 volts indu...
It seems like you might not understand a basic property of transformers, related to the term `Flux`. Flux is `change`. An AC voltage is one that changes. A DC voltage is one that stays steady (does not change). If you apply a changing AC voltage to one winding, the flux (change) in the voltage allows the transformer t...
632,815
The voltage generated in the transformer must be due to the change in the flux in the coils, but if the voltage is DC, why is no voltage induced? Of course, we know that voltage is created by the derivative of flux, but what does it mean?
2022/08/28
[ "https://electronics.stackexchange.com/questions/632815", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/267682/" ]
Mathematically speaking, "derivative" means "rate of change". In *steady state*, DC does not change, the magnitude of the flux does not change, and the "derivative" = 0, so induced voltage is zero, and the "transformer" is reduced to the role of an electromagnet.
It seems like you might not understand a basic property of transformers, related to the term `Flux`. Flux is `change`. An AC voltage is one that changes. A DC voltage is one that stays steady (does not change). If you apply a changing AC voltage to one winding, the flux (change) in the voltage allows the transformer t...
63,850,924
I have the number, say 900. I extract a string with the format `"x <= int (int, int)"` for example. `"x <= 900 (4, 7)"` I want to verify that it matches the format `"x <= 900 (int, int)"` How can I do it using String pattern matchers? I have tried the following so far, the result is false. ``` 1) Pattern patt...
2020/09/11
[ "https://Stackoverflow.com/questions/63850924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1570906/" ]
I commented above about having the same problem. Meanwhile I came across this [project](https://github.com/osorina/3d-headphones) and wondered why it works. **Long story short, it's configured as a SPA. I tried the same with my project and it works.** So in *nuxt.config.js* ``` export default { mode: "spa", .. `...
I don't know the structure of the file where you want to import from, but are you trying to import a default or just a module? Because the default syntax does not have `{}`. Much like your first import. If what you're trying to import is set as a default export, you need to remove those brackets. Read about [import i...
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
Have a look at the [textbox events](http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox_events.aspx) such as [KeyUp](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keyup%28v=vs.80%29.aspx), KeyPress etc. For example: ``` private void textbox_KeyUp(object sender, KeyEventArgs e) {...
Even with the older .net fw 2.0 you should still have the new and old value in the eventArgs if not in the textbox.text property itself since the event is fired after and not during the text changing. If you want to do stuff while the text is being changed then try the KeyUp event rather then the Changed.
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
**Getting the NEW value** You can just use the `Text` property of the `TextBox`. If this event is used for multiple text boxes then you will want to use the `sender` parameter to get the correct `TextBox` control, like so... ``` private void textChanged(object sender, EventArgs e) { TextBox textBox = sender as Te...
Have a look at the [textbox events](http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox_events.aspx) such as [KeyUp](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keyup%28v=vs.80%29.aspx), KeyPress etc. For example: ``` private void textbox_KeyUp(object sender, KeyEventArgs e) {...
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
Have a look at the [textbox events](http://msdn.microsoft.com/en-us/library/system.windows.forms.textbox_events.aspx) such as [KeyUp](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keyup%28v=vs.80%29.aspx), KeyPress etc. For example: ``` private void textbox_KeyUp(object sender, KeyEventArgs e) {...
``` private void stIDTextBox_TextChanged(object sender, EventArgs e) { if (stIDTextBox.TextLength == 6) { studentId = stIDTextBox.Text; // Here studentId is a variable. // this process is used to read textbox value automatically. // In this case I can read textbox until the char...
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
**Getting the NEW value** You can just use the `Text` property of the `TextBox`. If this event is used for multiple text boxes then you will want to use the `sender` parameter to get the correct `TextBox` control, like so... ``` private void textChanged(object sender, EventArgs e) { TextBox textBox = sender as Te...
Even with the older .net fw 2.0 you should still have the new and old value in the eventArgs if not in the textbox.text property itself since the event is fired after and not during the text changing. If you want to do stuff while the text is being changed then try the KeyUp event rather then the Changed.
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
Even with the older .net fw 2.0 you should still have the new and old value in the eventArgs if not in the textbox.text property itself since the event is fired after and not during the text changing. If you want to do stuff while the text is being changed then try the KeyUp event rather then the Changed.
``` private void stIDTextBox_TextChanged(object sender, EventArgs e) { if (stIDTextBox.TextLength == 6) { studentId = stIDTextBox.Text; // Here studentId is a variable. // this process is used to read textbox value automatically. // In this case I can read textbox until the char...
14,337,057
In a TextBox I'm monitoring the text changes. I need to check the text before doing some stuff. But I can only check the old text in the moment. How can I get the new Text ? ``` private void textChanged(object sender, EventArgs e) { // need to check the new text } ``` I know .NET Framework 4.5 has the new `TextC...
2013/01/15
[ "https://Stackoverflow.com/questions/14337057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1442225/" ]
**Getting the NEW value** You can just use the `Text` property of the `TextBox`. If this event is used for multiple text boxes then you will want to use the `sender` parameter to get the correct `TextBox` control, like so... ``` private void textChanged(object sender, EventArgs e) { TextBox textBox = sender as Te...
``` private void stIDTextBox_TextChanged(object sender, EventArgs e) { if (stIDTextBox.TextLength == 6) { studentId = stIDTextBox.Text; // Here studentId is a variable. // this process is used to read textbox value automatically. // In this case I can read textbox until the char...
36,866,609
[![enter image description here](https://i.stack.imgur.com/F4EBA.png)](https://i.stack.imgur.com/F4EBA.png) ``` ( ( "http://sportsromio.aiminfotechs.com/WEBSERVICES/available_sports/volleyball.png", "http://sportsromio.aiminfotechs.com/WEBSERVICES/available_sports/football.png" ), ( "http:/...
2016/04/26
[ "https://Stackoverflow.com/questions/36866609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5638698/" ]
Put this code in **'cellForRowIndexPath'** ``` int x = 0; for (NSURL * url in yourArrayName) { UIImageView *yourImageView =[[UIImageView alloc] initWithFrame:CGRectMake(x,50,20,20)]; yourImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:url]]; [cell add...
add in cell for Row ``` int x = 0; for (NSString * stringurl in [imgs objectAtIndex:indexPath.row]) { UIImageView *yourImageView =[[UIImageView alloc] initWithFrame:CGRectMake(x,10,40,40)]; NSURL *url=[NSURL URLWithString:stringurl]; __block UIActivityIndicatorView *activityIndicator; ...
48,556,861
I'm loading some HTML content by updating `innerHTML` of an element(loading some content after an api call). Everything works except one thing, which removes `id` attribute from the content loaded. Component code: ``` content: string; @ViewChild('div') divContainer: ElementRef; constructor(private cd: ChangeDete...
2018/02/01
[ "https://Stackoverflow.com/questions/48556861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037257/" ]
try this <http://plnkr.co/edit/JfG6qGdVEqbWxV6ax3BA?p=preview> use a `safeHtml` pipe with `.sanitized.bypassSecurityTrustHtml` ``` @Pipe({ name: 'safeHtml'}) export class SafeHtmlPipe implements PipeTransform { constructor(private sanitized: DomSanitizer) {} transform(value) { return this.sanitized.bypassSec...
If you are not using innerHtml at multiple places **In your TS** ``` content = "<a href='#' id='cafeteria' class='cafeteria'>Cafeteria</a>"; newContent:any; constructor(private sanitized: DomSanitizer) { this.newContent = this.sanitized.bypassSecurityTrustHtml(content) } ``` **In your Html** ``` ...
3,445,132
> > Solve: > $$\tan 2x=1+2\sin 4x$$ > > > My work: $$\left(\frac{\sin2x}{\cos2x}\right)(1+2\cos2x)(1-2\cos2x)=1$$ $$\frac{(\sin2x+\sin4x)(\sin2x-\sin4x)}{\cos2x}=1$$ $$\frac{-6\sin x \sin2x}{\cos2x}=1$$ $$\tan2x+\csc6x=0$$ How to proceed after this?
2019/11/21
[ "https://math.stackexchange.com/questions/3445132", "https://math.stackexchange.com", "https://math.stackexchange.com/users/655037/" ]
By [tangent half angle identities](https://en.wikipedia.org/wiki/Tangent_half-angle_formula) we have that by $t=\tan (2x)$ $$\tan 2x=1+2\sin 4x \iff t=1+\frac{4t}{1+t^2} \iff t^3-t^2-3t-1=0$$ $$ \iff (t+1)(t^2-2t-1)=0$$
Hint: $$\sin2x=\cos2x(1+2\sin4x)=\cos2x+\sin6x+\sin2x$$ using [Werner Formulas](http://mathworld.wolfram.com/WernerFormulas.html) $$\implies\cos2x=-\sin6x=\cos\left(\dfrac\pi2+6x\right)$$ as $\cos\left(\dfrac\pi2+y\right)=-\sin y$ $$\implies2x=2m\pi\pm\left(\dfrac\pi2+6x\right)$$ $'+'\implies x=-(4m+1)\dfrac\pi8$ ...
3,445,132
> > Solve: > $$\tan 2x=1+2\sin 4x$$ > > > My work: $$\left(\frac{\sin2x}{\cos2x}\right)(1+2\cos2x)(1-2\cos2x)=1$$ $$\frac{(\sin2x+\sin4x)(\sin2x-\sin4x)}{\cos2x}=1$$ $$\frac{-6\sin x \sin2x}{\cos2x}=1$$ $$\tan2x+\csc6x=0$$ How to proceed after this?
2019/11/21
[ "https://math.stackexchange.com/questions/3445132", "https://math.stackexchange.com", "https://math.stackexchange.com/users/655037/" ]
By [tangent half angle identities](https://en.wikipedia.org/wiki/Tangent_half-angle_formula) we have that by $t=\tan (2x)$ $$\tan 2x=1+2\sin 4x \iff t=1+\frac{4t}{1+t^2} \iff t^3-t^2-3t-1=0$$ $$ \iff (t+1)(t^2-2t-1)=0$$
$$tan2x=1+2sin4x$$ $$=>tan2x=1+2\cdot\frac{2tan2x}{1+tan^2 2x}$$ $$=>tan^3 2x - tan^2 2x-3tan2x-1=0$$ $$(tan2x+1)(tan^ 2x-2tan2x-1)=0$$ One solution is $tan2x+1=0 => x=-\pi/8$ Other is $$tan^2 2x-2tan2x-1=0$$ $$=>tan2x=1\pm \sqrt{2}$$ $$=>x=\frac{-1}{16}\pi,\frac{3}{16}\pi$$ Therefore, $$x=-\frac{1}{16}\pi,\frac{3}{...
181,467
I'm new in Magento 2 and I learning it now. I am trying to customize email templates by editing default **/app/design/frontend/Vendor/Theme/web/css/email-inline.less** file in my theme, but I not understand one thing. When I commented all lines in this file (and deleted @magento\_import), I clear cache and deploy stat...
2017/06/30
[ "https://magento.stackexchange.com/questions/181467", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55971/" ]
This Works for me if you want to print arrays in log ``` $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/express.log'); $logger = new \Zend\Log\Logger(); $logger->addWriter($writer); $logger->info(print_r($quoteItems, true)); ``` If you are using windows make sure you change slash for path you define ``` \var\...
You can use like below code. ``` $writer_fail = new \Zend\Log\Writer\Stream(BP . '/var/log/express.log'); $logger_fail = new \Zend\Log\Logger(); $logger_fail->addWriter($writer_fail); $fail = "you can set your error here"; $logger_fail->info($fail); ``` please make ensure the log file is proper permission is to be s...
181,467
I'm new in Magento 2 and I learning it now. I am trying to customize email templates by editing default **/app/design/frontend/Vendor/Theme/web/css/email-inline.less** file in my theme, but I not understand one thing. When I commented all lines in this file (and deleted @magento\_import), I clear cache and deploy stat...
2017/06/30
[ "https://magento.stackexchange.com/questions/181467", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55971/" ]
`print_r` with Magento models often results in exhausting the memory limit because it prints all the dependencies which can be hundreds of complex objects, sometimes even in circular dependencies. Instead, use `print_r($object->debug())`, the `debug` method only returns the `_data` array instead of all properties and ...
You can use like below code. ``` $writer_fail = new \Zend\Log\Writer\Stream(BP . '/var/log/express.log'); $logger_fail = new \Zend\Log\Logger(); $logger_fail->addWriter($writer_fail); $fail = "you can set your error here"; $logger_fail->info($fail); ``` please make ensure the log file is proper permission is to be s...
181,467
I'm new in Magento 2 and I learning it now. I am trying to customize email templates by editing default **/app/design/frontend/Vendor/Theme/web/css/email-inline.less** file in my theme, but I not understand one thing. When I commented all lines in this file (and deleted @magento\_import), I clear cache and deploy stat...
2017/06/30
[ "https://magento.stackexchange.com/questions/181467", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/55971/" ]
`print_r` with Magento models often results in exhausting the memory limit because it prints all the dependencies which can be hundreds of complex objects, sometimes even in circular dependencies. Instead, use `print_r($object->debug())`, the `debug` method only returns the `_data` array instead of all properties and ...
This Works for me if you want to print arrays in log ``` $writer = new \Zend\Log\Writer\Stream(BP . '/var/log/express.log'); $logger = new \Zend\Log\Logger(); $logger->addWriter($writer); $logger->info(print_r($quoteItems, true)); ``` If you are using windows make sure you change slash for path you define ``` \var\...
5,139,253
Example Page: <http://kian02.comlu.com/kian3.html> I want the Navi in the example page to have mouseover and also be a link. It's been going crazy as a result of me trying as you can see lol.
2011/02/28
[ "https://Stackoverflow.com/questions/5139253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/637303/" ]
You may want to have a look at the [PDF Converter for SharePoint](http://www.muhimbi.com/Products/PDF-Converter-for-SharePoint/summary.aspx). It supports all the formats you are interested in and more. In addition to a SharePoint GUI it has full support for workflows and comes with watermarking, PDF Security and a frie...
Have you considered using [Google Docs Viewer](http://docs.google.com/viewer)? It may not cover all of your requirements but might still be an alternative.
47,071,622
I am trying to calculate the eigenspectrum for a number of large matrices using Scalapack, but rather than distribute each matrix across all 32 processes. I'd rather distribute each matrix across 4 processes and calculate 8 matrices in parallel. I know how to subdivide an MPI Grid using MPI\_Comm\_split, but I it seems...
2017/11/02
[ "https://Stackoverflow.com/questions/47071622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2094707/" ]
I was searching for the answer to this as well. I ended up having to engage Azure support. Unlike App Services and IIS, CDN doesn't have a way to rewrite the URL when a file doesn't exist. However, so long as your SPA's routes don't contain a `.`, you can create a rewrite rule that only acts on URL paths that don't c...
So it seems like your issue is: > > these requests for files are all failing with a 404 because I guess the rewrite rule is acting on these as well > > > And if your assumption is correct, it seems like you would need to request files using their relative path instead of the fully qualified one. Have you tried it...
47,071,622
I am trying to calculate the eigenspectrum for a number of large matrices using Scalapack, but rather than distribute each matrix across all 32 processes. I'd rather distribute each matrix across 4 processes and calculate 8 matrices in parallel. I know how to subdivide an MPI Grid using MPI\_Comm\_split, but I it seems...
2017/11/02
[ "https://Stackoverflow.com/questions/47071622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2094707/" ]
I have an addendum to Justin Gould's answer. With "IF Always" you will break purge requests from Azure. Fortunately, they have a specific User-Agent so you can match on that. In addition, it will break HTTP → HTTPS redirection if you do that with another rule. Verizon won't let you match on "Request Scheme" to filter ...
So it seems like your issue is: > > these requests for files are all failing with a 404 because I guess the rewrite rule is acting on these as well > > > And if your assumption is correct, it seems like you would need to request files using their relative path instead of the fully qualified one. Have you tried it...
47,071,622
I am trying to calculate the eigenspectrum for a number of large matrices using Scalapack, but rather than distribute each matrix across all 32 processes. I'd rather distribute each matrix across 4 processes and calculate 8 matrices in parallel. I know how to subdivide an MPI Grid using MPI\_Comm\_split, but I it seems...
2017/11/02
[ "https://Stackoverflow.com/questions/47071622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2094707/" ]
I was searching for the answer to this as well. I ended up having to engage Azure support. Unlike App Services and IIS, CDN doesn't have a way to rewrite the URL when a file doesn't exist. However, so long as your SPA's routes don't contain a `.`, you can create a rewrite rule that only acts on URL paths that don't c...
I have an addendum to Justin Gould's answer. With "IF Always" you will break purge requests from Azure. Fortunately, they have a specific User-Agent so you can match on that. In addition, it will break HTTP → HTTPS redirection if you do that with another rule. Verizon won't let you match on "Request Scheme" to filter ...
8,740,714
I need a **regular expression to match the paragraph name while reading a COBOL file** in java. following are the example for paragraph name.. ``` 9800-WRITE-SCREEN-A. C70-WRITE-ABFGRPPARM. FGH0-REWRITE-ABFGRPPARM. 8100-FILE-ERROR. ``` thanks
2012/01/05
[ "https://Stackoverflow.com/questions/8740714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099638/" ]
Many think that because COBOL is old it must be simple... Bad assumption. In fact parsing COBOL is anything but trivial. You might think scanning a COBOL program to identify only `PARAGRAPH` names should not require a full blown parser --- but it will have its challenges. Regex alone is not up to the task. **Here are...
``` "^[ ]{7,10}([-\\w]+)" ``` Paragraph names begin in columns 8-11. $1 will be the name.
8,740,714
I need a **regular expression to match the paragraph name while reading a COBOL file** in java. following are the example for paragraph name.. ``` 9800-WRITE-SCREEN-A. C70-WRITE-ABFGRPPARM. FGH0-REWRITE-ABFGRPPARM. 8100-FILE-ERROR. ``` thanks
2012/01/05
[ "https://Stackoverflow.com/questions/8740714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099638/" ]
``` "^[ ]{7,10}([-\\w]+)" ``` Paragraph names begin in columns 8-11. $1 will be the name.
Some rules: 1. Paragraph names begin in Area A (columns 8-11). 2. Can contain characters, numbers or hyphens. 3. Ends with a dot(.). 4. No whitespace character. Regex = ^[ ]{7,10}([-\w]+\.\n)
8,740,714
I need a **regular expression to match the paragraph name while reading a COBOL file** in java. following are the example for paragraph name.. ``` 9800-WRITE-SCREEN-A. C70-WRITE-ABFGRPPARM. FGH0-REWRITE-ABFGRPPARM. 8100-FILE-ERROR. ``` thanks
2012/01/05
[ "https://Stackoverflow.com/questions/8740714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1099638/" ]
Many think that because COBOL is old it must be simple... Bad assumption. In fact parsing COBOL is anything but trivial. You might think scanning a COBOL program to identify only `PARAGRAPH` names should not require a full blown parser --- but it will have its challenges. Regex alone is not up to the task. **Here are...
Some rules: 1. Paragraph names begin in Area A (columns 8-11). 2. Can contain characters, numbers or hyphens. 3. Ends with a dot(.). 4. No whitespace character. Regex = ^[ ]{7,10}([-\w]+\.\n)
557,442
I would like to get better control over my deployment environments, but I share the system administration responsibility with an IT department that has their own (not fully automated) processes for bootstrapping VM-instances, managing organization users and performing security updates. Can I still benefit from using C...
2013/11/26
[ "https://serverfault.com/questions/557442", "https://serverfault.com", "https://serverfault.com/users/24289/" ]
I'd say you have even more use for Chef than in the case where you control everything. I think you have the wrong idea about what Chef is there to do for you. Chef isn't about controlling the entire environment. In fact there are things that you probably shouldn't attempt to provide with Chef. Provisioning ( which is...
Besides it not being "best practice" i would say that there could be some benefit with using chef(-solo). Given you really "own" the application-stack that you would like manage you could manage it with chef. Security-updates should - AFAIK - not interfere with that since they are usually updates of the application(-b...
373,084
To be clear I'm not looking for any myself, but I had thought there were no PS4 cheats and yesterday a friend and I were playing, and a player was griefing us. We shot him endlessly with rockets, grenades, mines, you name it... no effect. I even hit his avatar directly (so not in a vehicle) with an RPG and he went flyi...
2020/07/29
[ "https://gaming.stackexchange.com/questions/373084", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/184913/" ]
Yes, it was a cheat. More specifically it was a cheat as a result of a mod, there are normally no cheats in the game. No secret passwords or konami-code type sequence of button presses that will enable god-mode. Modding on consoles is more uncommon than PC, because it usually requires altering the console's hardware i...
If you are on the PS4, it was most likely a godmode exploit, as modding was made incredibly difficult on this generation of consoles, as compared to the Ps3/Xbox360. An example of an exploit that worked on patch 1.50 is [this one](https://www.youtube.com/watch?v=rjKRYO50Wfo).
225,394
I have a List of strings that is regenerated every 5 seconds. I want to create a Context Menu and set its items dynamically using this list. The problem is that I don't have even a clue how to do that and manage the Click action for every item generated (which should use the same method with different parameter DoSomet...
2008/10/22
[ "https://Stackoverflow.com/questions/225394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386/" ]
So, you can clear the items from the context menu with: ``` myContextMenuStrip.Items.Clear(); ``` You can add an item by calling: ``` myContextMenuStrip.Items.Add(myString); ``` The context menu has an ItemClicked event. Your handler could look like so: ``` private void myContextMenuStrip_ItemClicked(object send...
Another alternative using a `ToolStripMenuItem` object: ``` //////////// Create a new "ToolStripMenuItem" object: ToolStripMenuItem newMenuItem= new ToolStripMenuItem(); //////////// Set a name, for identification purposes: newMenuItem.Name = "nameOfMenuItem"; //////////// Sets the text that will appear in the new c...
13,608,712
I am using Visual Studio to build my report and I have tried to use those three expressions: ``` =IIF(Fields!A.Value = 0 or Fields!B.Value = 0, 0,SUM(Fields!A.Value)/SUM(Fields!A.Value) =IIF(SUM(Fields!A.Value) = 0 or SUM(Fields!B.Value =0),0,SUM(Fields!A.Value)/SUM(Fields!A.Value) =Replace(Round((((SUM(Fields!A.Val...
2012/11/28
[ "https://Stackoverflow.com/questions/13608712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827866/" ]
At first, you need to be sure that the fields you are using to calculate your value are really numbers. Normally, you get `NaN` when trying to divide 0 / 0 or `Infinity` when you are dividing any number by 0. So, a **generic resolution** for `NaN`, `Infinity` or even `#Error` (that happens when a null value is passed...
If you're getting 0% and NaN I'd check check your field data types. You should have at least one non-integer, and both need to be numeric. I'd still expect to see some 1s, but this is a start at the 0% and NaN. In terms of your check, you only need to check the denominator to avoid a calculation error. Try: ``` =IIF(S...
27,739,209
I have a spinner with custom text view: Below is the code : ``` <Spinner android:id="@+id/spnr" android:layout_width="fill_parent" android:layout_height="30dp" android:prompt="@string/list" /> <TextView xmlns:android="http://schemas.android.com/apk/res/...
2015/01/02
[ "https://Stackoverflow.com/questions/27739209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1817337/" ]
You have only the stub method when you use `Meteor.methods` you *need* a method on the server side, whereas the client side is optional to simulate latency compensation. The way a Meteor call works is when you run a call it will immediately fire the client side one to simulate some UI effect while a response is return...
I notice that the alphabetical names its important to load three calls method. I had the same problem when I have the next structure ``` server |----- dht-setup.js |----- methods.js ``` Then, dht-setup dont see the methods.js methods. Instead, I change the name of the file: ``` server |---- _methods.js |---...
31,617,284
I've got four variables, and if any two or more of them return true, I need to throw an error. I could technically do something like this: `if (($var1 && $var 2) || ($var1 && $var3) || ($var1 && $var 4) ... || ($var4 && $var3))`, but that gets super complex and hard to manage. I imagine there's got to be a better way ...
2015/07/24
[ "https://Stackoverflow.com/questions/31617284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654480/" ]
Beste way is to use an array and loop through the array. ``` $my_vars = array($var1, $var2, $var3, ...); $test_var = 'something'; $hits = 0; foreach($my_vars as $var) { $hits = $var == $test_var ? $hits++: $hits; if($hits >= 2) { throw new Exception('This is bad dude...); } } ```
How about this? ``` <?php $count = 0; foreach(array($var1, $var2, $var3, $var4) as $value) { $count += (int) (bool) $value; if($count >= 2) { throw new Exception('an error'); } } ```
31,617,284
I've got four variables, and if any two or more of them return true, I need to throw an error. I could technically do something like this: `if (($var1 && $var 2) || ($var1 && $var3) || ($var1 && $var 4) ... || ($var4 && $var3))`, but that gets super complex and hard to manage. I imagine there's got to be a better way ...
2015/07/24
[ "https://Stackoverflow.com/questions/31617284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654480/" ]
Edit: `array_filter` with only the array passed will return an array with whatever values in the given array juggle to `true` still in it. So the simplest and most foolproof way to implement what I described in earlier edits is probably just ``` if (count(array_filter([$a, $b, $c, $d])) >= 2) { // error } ``` --...
Beste way is to use an array and loop through the array. ``` $my_vars = array($var1, $var2, $var3, ...); $test_var = 'something'; $hits = 0; foreach($my_vars as $var) { $hits = $var == $test_var ? $hits++: $hits; if($hits >= 2) { throw new Exception('This is bad dude...); } } ```
31,617,284
I've got four variables, and if any two or more of them return true, I need to throw an error. I could technically do something like this: `if (($var1 && $var 2) || ($var1 && $var3) || ($var1 && $var 4) ... || ($var4 && $var3))`, but that gets super complex and hard to manage. I imagine there's got to be a better way ...
2015/07/24
[ "https://Stackoverflow.com/questions/31617284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654480/" ]
Beste way is to use an array and loop through the array. ``` $my_vars = array($var1, $var2, $var3, ...); $test_var = 'something'; $hits = 0; foreach($my_vars as $var) { $hits = $var == $test_var ? $hits++: $hits; if($hits >= 2) { throw new Exception('This is bad dude...); } } ```
Type casting & simple summation of four variables ``` $a = "aaa"; $b = true; $c = false; $d = 1; if((bool)$a + (bool)$b + (bool)$c + (bool)$d > 2) print "Error!"; ```
31,617,284
I've got four variables, and if any two or more of them return true, I need to throw an error. I could technically do something like this: `if (($var1 && $var 2) || ($var1 && $var3) || ($var1 && $var 4) ... || ($var4 && $var3))`, but that gets super complex and hard to manage. I imagine there's got to be a better way ...
2015/07/24
[ "https://Stackoverflow.com/questions/31617284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654480/" ]
Edit: `array_filter` with only the array passed will return an array with whatever values in the given array juggle to `true` still in it. So the simplest and most foolproof way to implement what I described in earlier edits is probably just ``` if (count(array_filter([$a, $b, $c, $d])) >= 2) { // error } ``` --...
How about this? ``` <?php $count = 0; foreach(array($var1, $var2, $var3, $var4) as $value) { $count += (int) (bool) $value; if($count >= 2) { throw new Exception('an error'); } } ```
31,617,284
I've got four variables, and if any two or more of them return true, I need to throw an error. I could technically do something like this: `if (($var1 && $var 2) || ($var1 && $var3) || ($var1 && $var 4) ... || ($var4 && $var3))`, but that gets super complex and hard to manage. I imagine there's got to be a better way ...
2015/07/24
[ "https://Stackoverflow.com/questions/31617284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654480/" ]
Edit: `array_filter` with only the array passed will return an array with whatever values in the given array juggle to `true` still in it. So the simplest and most foolproof way to implement what I described in earlier edits is probably just ``` if (count(array_filter([$a, $b, $c, $d])) >= 2) { // error } ``` --...
Type casting & simple summation of four variables ``` $a = "aaa"; $b = true; $c = false; $d = 1; if((bool)$a + (bool)$b + (bool)$c + (bool)$d > 2) print "Error!"; ```
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
Yes. Spinors are elements of representation spaces of objects known as a [Clifford algebras](https://en.wikipedia.org/wiki/Clifford_algebra). A Clifford algebra is basically a vector space turned into an algebra via the product rule $$ v\cdot w=2g(v,w)\Bbb{1} $$ where $g$ is some metric on the vector space itself. T...
Well, you should look at (irreducible) representations of the Lorentz group. Basically you want all of your ingredients to have correct and consistent transformations under the Lorentz group. **The Weyl and Dirac spinors are the most basic objects satisfying that requirement.** Starting from those you can build vect...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
The proper analogous formalization of spinors is not to view them as some sort of different functions from tensors on the same underlying vector space $V$, but instead to expand our idea of the underlying geometry: Where tensors are multilinear functions on vector spaces, tensors with "spinor" and "vector" parts are mu...
Well, you should look at (irreducible) representations of the Lorentz group. Basically you want all of your ingredients to have correct and consistent transformations under the Lorentz group. **The Weyl and Dirac spinors are the most basic objects satisfying that requirement.** Starting from those you can build vect...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
I think you're asking for intuition in the wrong direction here. Suppose that somebody is already familiar with vectors, and wants to understand tensors. That's possible, because tensor representations are built out of vectors, i.e. the rank $2$ tensor representation is just the product of two vector representations, ...
Well, you should look at (irreducible) representations of the Lorentz group. Basically you want all of your ingredients to have correct and consistent transformations under the Lorentz group. **The Weyl and Dirac spinors are the most basic objects satisfying that requirement.** Starting from those you can build vect...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
Well, you should look at (irreducible) representations of the Lorentz group. Basically you want all of your ingredients to have correct and consistent transformations under the Lorentz group. **The Weyl and Dirac spinors are the most basic objects satisfying that requirement.** Starting from those you can build vect...
I'm taking the Clifford algebra route as pointed out by non-user38741 and Giorgio Comitini, but I'll try to justify intuitively how to end up there and how the spinor transformation law appears inevitable. So I start with geometric algebra, which is simply another name for Clifford algebra when used in a physics contex...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
The proper analogous formalization of spinors is not to view them as some sort of different functions from tensors on the same underlying vector space $V$, but instead to expand our idea of the underlying geometry: Where tensors are multilinear functions on vector spaces, tensors with "spinor" and "vector" parts are mu...
Yes. Spinors are elements of representation spaces of objects known as a [Clifford algebras](https://en.wikipedia.org/wiki/Clifford_algebra). A Clifford algebra is basically a vector space turned into an algebra via the product rule $$ v\cdot w=2g(v,w)\Bbb{1} $$ where $g$ is some metric on the vector space itself. T...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
Yes. Spinors are elements of representation spaces of objects known as a [Clifford algebras](https://en.wikipedia.org/wiki/Clifford_algebra). A Clifford algebra is basically a vector space turned into an algebra via the product rule $$ v\cdot w=2g(v,w)\Bbb{1} $$ where $g$ is some metric on the vector space itself. T...
I'm taking the Clifford algebra route as pointed out by non-user38741 and Giorgio Comitini, but I'll try to justify intuitively how to end up there and how the spinor transformation law appears inevitable. So I start with geometric algebra, which is simply another name for Clifford algebra when used in a physics contex...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
The proper analogous formalization of spinors is not to view them as some sort of different functions from tensors on the same underlying vector space $V$, but instead to expand our idea of the underlying geometry: Where tensors are multilinear functions on vector spaces, tensors with "spinor" and "vector" parts are mu...
I think you're asking for intuition in the wrong direction here. Suppose that somebody is already familiar with vectors, and wants to understand tensors. That's possible, because tensor representations are built out of vectors, i.e. the rank $2$ tensor representation is just the product of two vector representations, ...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
The proper analogous formalization of spinors is not to view them as some sort of different functions from tensors on the same underlying vector space $V$, but instead to expand our idea of the underlying geometry: Where tensors are multilinear functions on vector spaces, tensors with "spinor" and "vector" parts are mu...
I'm taking the Clifford algebra route as pointed out by non-user38741 and Giorgio Comitini, but I'll try to justify intuitively how to end up there and how the spinor transformation law appears inevitable. So I start with geometric algebra, which is simply another name for Clifford algebra when used in a physics contex...
554,269
It's common for students to be introduced to tensors as "things that transform like tensors" - that is, their components must transform in a certain way when we change coordinates. However, we can do better by defining a tensor as a multilinear map from $ V\times...\times V\times V^\ast\times ...\times V^\ast\to \mathb...
2020/05/23
[ "https://physics.stackexchange.com/questions/554269", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/263058/" ]
I think you're asking for intuition in the wrong direction here. Suppose that somebody is already familiar with vectors, and wants to understand tensors. That's possible, because tensor representations are built out of vectors, i.e. the rank $2$ tensor representation is just the product of two vector representations, ...
I'm taking the Clifford algebra route as pointed out by non-user38741 and Giorgio Comitini, but I'll try to justify intuitively how to end up there and how the spinor transformation law appears inevitable. So I start with geometric algebra, which is simply another name for Clifford algebra when used in a physics contex...
15,601,874
I have a menu in which onHover apears a infobox, telling what the button does. How can I apply a delay so that the box apears let's say one second after i put my mouse over the button? **HTML:** ``` <td class="info"><a id="login-edit_account" href="../login-edit_account.php">Edit account<span><div id="pointer"></div>...
2013/03/24
[ "https://Stackoverflow.com/questions/15601874", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2120879/" ]
It's really pretty simple. Example: ``` a { -webkit-transition: 1s 3s; } a:hover { background-color: red; } ``` When the user hovers the link, the browser waits 3 seconds. Only when those seconds have passed does the background transition to red (in this case with a 1s transition time). Here's a fiddle: <h...
Yes, you can use CSS3's [transitions](http://www.w3schools.com/css3/css3_transitions.asp) to delay the `:hover` effect. > > CSS transitions, which are part of the CSS3 set of specifications, > provide a way to control animation speed when changing CSS properties. > Instead of having property changes take effect imm...
901,251
I am using AES/CBC/PKCS5Padding cipher instance for AES encryption and decryption in java How can I decrypt the data using blackberry encrypted by above in java. decrypting data with AES/CBC/PKCS5Padding using blackberry Thanks Bapi
2009/05/23
[ "https://Stackoverflow.com/questions/901251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I think the [Bouncy Castle Library](http://www.bouncycastle.org/java.html) supports that. They provide some short tutorials too.
Bouncy castle has a fantastic library for doing this. The main problem will be how to get the key there in a secure way. I found that .NET and Java serialize the keys in incompatible ways, so I ended up using Bouncy Castle on both sides in order to facilitate key transfer, as it was transferred using RSA, for security ...
901,251
I am using AES/CBC/PKCS5Padding cipher instance for AES encryption and decryption in java How can I decrypt the data using blackberry encrypted by above in java. decrypting data with AES/CBC/PKCS5Padding using blackberry Thanks Bapi
2009/05/23
[ "https://Stackoverflow.com/questions/901251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I recommend using the BlackBerry API (Bouncy Castle will work, but why complicate things?). Use the net.rim.crypto package - you're using all symmetric encryption so you'll only need the standard [RIM signing keys](https://www.blackberry.com/SignedKeys/) to run on a device ($20 and 2-3 days to get) - in the meantime y...
I think the [Bouncy Castle Library](http://www.bouncycastle.org/java.html) supports that. They provide some short tutorials too.
901,251
I am using AES/CBC/PKCS5Padding cipher instance for AES encryption and decryption in java How can I decrypt the data using blackberry encrypted by above in java. decrypting data with AES/CBC/PKCS5Padding using blackberry Thanks Bapi
2009/05/23
[ "https://Stackoverflow.com/questions/901251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I recommend using the BlackBerry API (Bouncy Castle will work, but why complicate things?). Use the net.rim.crypto package - you're using all symmetric encryption so you'll only need the standard [RIM signing keys](https://www.blackberry.com/SignedKeys/) to run on a device ($20 and 2-3 days to get) - in the meantime y...
Bouncy castle has a fantastic library for doing this. The main problem will be how to get the key there in a secure way. I found that .NET and Java serialize the keys in incompatible ways, so I ended up using Bouncy Castle on both sides in order to facilitate key transfer, as it was transferred using RSA, for security ...