qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
24,503,556
In master page ``` <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat=...
2014/07/01
[ "https://Stackoverflow.com/questions/24503556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3494471/" ]
This will Work for you... ``` <script type="text/javascript"> $(document).ready(function() { $("input[id$='TextBox1']").datepicker(); }); </script> ``` You could also give it a class of something like `CssClass="datePicker"` and use that to grab it with jQuery: ``` $(".datePicker").datepicker(); ```
change ur content page code to this, remove datepicker style from master page ``` <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> <style type="text/css"> .ui-datepicker { font-size:8pt !important} </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" ...
24,503,556
In master page ``` <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat=...
2014/07/01
[ "https://Stackoverflow.com/questions/24503556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3494471/" ]
Use Like, In Your Page where Datepicker is Located Place it at bottom of Page where you Datpicker is located, Put This [Jquery](https://code.google.com/p/simile-widgets/source/browse/exhibit/trunk/src/webapp/api/extensions/dataeditor/jquery_ui/js/jquery-ui-1.8.16.custom.min.js?r=2176) ``` <script src="js/jquery-ui-1....
change ur content page code to this, remove datepicker style from master page ``` <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server"> <style type="text/css"> .ui-datepicker { font-size:8pt !important} </style> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" ...
1,887,999
I'd like to compare the "state" of two components, say `Comp1: TSomeComponent` and `Comp2: TSomeComponent`, i.e. I want to compare the values of all the published properties of the two components. Some of the properties are indexed, like the TListBox.Items property. Is there an easy way to do this? Do I have to invoke ...
2009/12/11
[ "https://Stackoverflow.com/questions/1887999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182048/" ]
An easy way would be to serialize them both with `WriteComponent` and compare the resulting strings. Note, however, that this would compare only `published`, not `public`, properties. But that is what you say you need, so... Note that this would make, say, the *order* of the indexed properties significant. That may or...
Unfortunately, there's no simple compare function in Delphi as far as I know. (I've stopped at D2007.) You could add a method "Compare" to the base class and build the comparison of all fields inside this method. (It should accept one parameter of the same base class.) With D2007 you could build this as a helper class,...
1,887,999
I'd like to compare the "state" of two components, say `Comp1: TSomeComponent` and `Comp2: TSomeComponent`, i.e. I want to compare the values of all the published properties of the two components. Some of the properties are indexed, like the TListBox.Items property. Is there an easy way to do this? Do I have to invoke ...
2009/12/11
[ "https://Stackoverflow.com/questions/1887999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/182048/" ]
An easy way would be to serialize them both with `WriteComponent` and compare the resulting strings. Note, however, that this would compare only `published`, not `public`, properties. But that is what you say you need, so... Note that this would make, say, the *order* of the indexed properties significant. That may or...
A trick I use (but I would like to have something like this integrated in the IDE) is to copy the dfm part related to the 2 components (using ALT+F12) to access dfm and then I paste the 2 components in [NotePad++](http://notepad-plus-plus.org/) and I use the Compare Plugin to compare the 2. It gives a nice visual outpu...
39,354
What is the sutta where Buddha says about the order of merits as in for example "Observing the 5 precepts gives more merit than offering alms" and such.
2020/06/07
[ "https://buddhism.stackexchange.com/questions/39354", "https://buddhism.stackexchange.com", "https://buddhism.stackexchange.com/users/13157/" ]
I believe you're looking for **Velāma Sutta** (AN 9:20). Here's Ṭhānissaro Bhikkhu's translation: <https://www.dhammatalks.org/suttas/AN/AN9_20.html>
> > What is the sutta where Buddha says about the order of merits as in for example "Observing the 5 precepts gives more merit than offering alms" and such. > > > The category of doing merits by itself doesn't decide the weight of the merit, instead it's the quality/purity/sincerity of one's body/speech/and mind w...
21,497,075
I have this line of javascript in an event handler: ``` var value = event.currentTarget.value; //example: 9 ``` which I then use in a switch statement. ``` switch (value) { case 9: return 12; case 12: return 9; } ``` The problem is that "value" is a string instead of an int. Should I ju...
2014/02/01
[ "https://Stackoverflow.com/questions/21497075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/425823/" ]
Simple use `+value`, Notice `+` in front of a variable with converts the variable to a number ``` switch (+value) { case 9: return 12; case 12: return 9; } ```
Try this one. `parseInt()` function does parse a string and returns an integer. ``` var value = parseInt(event.currentTarget.value, 10); ```
21,497,075
I have this line of javascript in an event handler: ``` var value = event.currentTarget.value; //example: 9 ``` which I then use in a switch statement. ``` switch (value) { case 9: return 12; case 12: return 9; } ``` The problem is that "value" is a string instead of an int. Should I ju...
2014/02/01
[ "https://Stackoverflow.com/questions/21497075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/425823/" ]
> > Or is there a way to get the value as an int, like say with jQuery()? > > > Of course, this is almost always a feature provided in a language or environment. In JavaScript, there are four ways: 1. `parseInt` will parse the string as a whole number. `value = parseInt(value, 10)` will parse it as decimal (e.g.,...
Simple use `+value`, Notice `+` in front of a variable with converts the variable to a number ``` switch (+value) { case 9: return 12; case 12: return 9; } ```
21,497,075
I have this line of javascript in an event handler: ``` var value = event.currentTarget.value; //example: 9 ``` which I then use in a switch statement. ``` switch (value) { case 9: return 12; case 12: return 9; } ``` The problem is that "value" is a string instead of an int. Should I ju...
2014/02/01
[ "https://Stackoverflow.com/questions/21497075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/425823/" ]
> > Or is there a way to get the value as an int, like say with jQuery()? > > > Of course, this is almost always a feature provided in a language or environment. In JavaScript, there are four ways: 1. `parseInt` will parse the string as a whole number. `value = parseInt(value, 10)` will parse it as decimal (e.g.,...
Try this one. `parseInt()` function does parse a string and returns an integer. ``` var value = parseInt(event.currentTarget.value, 10); ```
1,596,481
Greetings all, I have a question. On my MOSS 2007 dev box, I created a new sharepoint site using the **Publishing -> Publishing Site** template. Now, On this site, I can create pages, check them in, publish them, etc. What I want to do is create a scope that I can do searches on. However, one of the filters I want...
2009/10/20
[ "https://Stackoverflow.com/questions/1596481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15952/" ]
By default, when you view pages in a SharePoint site, and you're not signed in (eg your a anon user) then you will only see the last published version of that page. You won't see the version currently being edited (if it is checked out). Now, if you want to stop users who are signed in from searching any pages which a...
Yes, the "Approval Status" field is what you're looking for. The property you need to map to is "\_ModerationStatus" within your SSP search configuration.
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You are not allowed to use a `div` within an anchor tag. Use `span` instead - <http://jsfiddle.net/fqnGT/1/> **Update:** Set the `display: inline-block` for nested span - <http://jsfiddle.net/fqnGT/8/>
The most easy way Edit ``` <a href="newgame.html" class="startnewgame">START NEW GAME</a> ``` <http://jsfiddle.net/fqnGT/4/>
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As per W3C standrads, you should not put `div` inside `a` tag. Proper way of doing is, ``` <div><a href="newgame.html" class="startnewgame">START NEW GAME</a></div> ``` Check out your demo, <http://jsfiddle.net/fqnGT/2/>
The most easy way Edit ``` <a href="newgame.html" class="startnewgame">START NEW GAME</a> ``` <http://jsfiddle.net/fqnGT/4/>
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You are not allowed to use a `div` within an anchor tag. Use `span` instead - <http://jsfiddle.net/fqnGT/1/> **Update:** Set the `display: inline-block` for nested span - <http://jsfiddle.net/fqnGT/8/>
add class to your link: ``` <a href="newgame.html" class="link"> ``` add this: ``` a.link{ display: block; float: left; margin-left:100px; } ``` and edit this: ``` .startnewgame { width: 298px; padding: 20px; color: white; background: blue; font-family: Arial; font-size: 32px; font-weight: 900; } ```
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You are not allowed to use a `div` within an anchor tag. Use `span` instead - <http://jsfiddle.net/fqnGT/1/> **Update:** Set the `display: inline-block` for nested span - <http://jsfiddle.net/fqnGT/8/>
As per W3C standrads, you should not put `div` inside `a` tag. Proper way of doing is, ``` <div><a href="newgame.html" class="startnewgame">START NEW GAME</a></div> ``` Check out your demo, <http://jsfiddle.net/fqnGT/2/>
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You are not allowed to use a `div` within an anchor tag. Use `span` instead - <http://jsfiddle.net/fqnGT/1/> **Update:** Set the `display: inline-block` for nested span - <http://jsfiddle.net/fqnGT/8/>
On `startnewgame` style class override the `display` ``` display: inherit ``` Edit: (on the original source with the div)
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You are not allowed to use a `div` within an anchor tag. Use `span` instead - <http://jsfiddle.net/fqnGT/1/> **Update:** Set the `display: inline-block` for nested span - <http://jsfiddle.net/fqnGT/8/>
You can change markup and css little bit: html markup: ------------ ``` <div class="startnewgame"> <a href="newgame.html">START NEW GAME</a> </div> ``` CSS: ---- ``` .startnewgame { width: 298px; padding: 20px; margin-left: 100px; background: blue; font-family: Arial; font-size: ...
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As per W3C standrads, you should not put `div` inside `a` tag. Proper way of doing is, ``` <div><a href="newgame.html" class="startnewgame">START NEW GAME</a></div> ``` Check out your demo, <http://jsfiddle.net/fqnGT/2/>
add class to your link: ``` <a href="newgame.html" class="link"> ``` add this: ``` a.link{ display: block; float: left; margin-left:100px; } ``` and edit this: ``` .startnewgame { width: 298px; padding: 20px; color: white; background: blue; font-family: Arial; font-size: 32px; font-weight: 900; } ```
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As per W3C standrads, you should not put `div` inside `a` tag. Proper way of doing is, ``` <div><a href="newgame.html" class="startnewgame">START NEW GAME</a></div> ``` Check out your demo, <http://jsfiddle.net/fqnGT/2/>
On `startnewgame` style class override the `display` ``` display: inherit ``` Edit: (on the original source with the div)
18,848,756
**<http://jsfiddle.net/fqnGT/>** in my fiddle above, my mouse cursor gets horizontal unidentified hyperlink to the right and left side of the button, I don't know why. ``` <a href="newgame.html"><div class="startnewgame">START NEW GAME</div></a> ``` ![enter image description here](https://i.stack.imgur.com/sJZb3.pn...
2013/09/17
[ "https://Stackoverflow.com/questions/18848756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As per W3C standrads, you should not put `div` inside `a` tag. Proper way of doing is, ``` <div><a href="newgame.html" class="startnewgame">START NEW GAME</a></div> ``` Check out your demo, <http://jsfiddle.net/fqnGT/2/>
You can change markup and css little bit: html markup: ------------ ``` <div class="startnewgame"> <a href="newgame.html">START NEW GAME</a> </div> ``` CSS: ---- ``` .startnewgame { width: 298px; padding: 20px; margin-left: 100px; background: blue; font-family: Arial; font-size: ...
154,025
Here is a group theoretic phrasing of a special case of the union closed conjecture: > > **Question:** Given a finite group $G$, is there an element of prime power order which is contained in *at most* half the subgroups of $G$? > > > **Motivation**: Frankl's [union closed sets conjecture](http://en.wikipedia.or...
2014/01/09
[ "https://mathoverflow.net/questions/154025", "https://mathoverflow.net", "https://mathoverflow.net/users/2384/" ]
In a somewhat different direction from Alireza: the conjecture is true for a large family of groups, including all abelian groups and many supersolvable groups. Let me start with the abelian case. Pick an element $g$ of highest possible prime-power order in an abelian group $G$. Then $\langle g \rangle$ has a *complem...
If $G$ is a non-trivial finite group which can be generated by two non-trivial elements of prime power orders, then the answer to the question is affirmative. Let $\mathcal{G}$ be the set of all subgroups of $G$ and let $G=\langle x,y\rangle$, where $x$ and $y$ are non-trivial elements of $G$ of prime power oders. Assu...
242,884
I am struggling with architecture on a new project. I am using the following patterns/technology. * CQRS - anything going in goes through a command * REST - using WebAPI * MVC - asp.net mvc * Angular - building a spa * nhibernate I belive this provides some great separation and should help keep a very complex domain ...
2014/06/03
[ "https://softwareengineering.stackexchange.com/questions/242884", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/115612/" ]
* REST works OK with a command model... the commands basically become nouns, or worker resources. So instead of using > > /blah/blah/SearchByName > > > You'd have a "search" (noun) resource > > /blah/blah/search?Name= > > > I've always felt that's kind of a word game, but it does has the benefit of keeping...
You probably need Event Sourcing then. Basically you store each event in something that resembles a serial queue and have some service process pick up the events on the queue and execute them. That way you can separate the code that submits the events from the code that executes their effects. You also get the benefit ...
5,530,904
``` void childSignalHandler(int signo) { int status; pid_t pid = wait(&status); struct PIDList* record = getRecordForPID(childlist, pid); if (record != NULL) record->returnValue = status; } ``` Quick question: I want this handler to, when a child dies (this app spawns lots of children), get...
2011/04/03
[ "https://Stackoverflow.com/questions/5530904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/280698/" ]
If this is SQL Server you could use the [`GETDATE()`](http://msdn.microsoft.com/en-us/library/ms188383.aspx) function to return the current date and compare against it: ``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price, Accom_ID FROM Schedule WHERE (Schd_Avaliable = 'Yes') AND ...
``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price, Accom_ID FROM Schedule WHERE (Schd_Avaliable = 'Yes') AND (Accom_ID = Accom_ID) AND (GETDATE() < Schd_Date) ``` This should work
5,530,904
``` void childSignalHandler(int signo) { int status; pid_t pid = wait(&status); struct PIDList* record = getRecordForPID(childlist, pid); if (record != NULL) record->returnValue = status; } ``` Quick question: I want this handler to, when a child dies (this app spawns lots of children), get...
2011/04/03
[ "https://Stackoverflow.com/questions/5530904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/280698/" ]
If this is SQL Server you could use the [`GETDATE()`](http://msdn.microsoft.com/en-us/library/ms188383.aspx) function to return the current date and compare against it: ``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price, Accom_ID FROM Schedule WHERE (Schd_Avaliable = 'Yes') AND ...
I guess this expression can be used as a date representing the current date on the format *yyyy-mm-dd* (without the hours,minutes and seconds). `(Datepart('yyyy',getdate())+ '-' +Datepart('m',getdate())+ '-' + Datepart('d',getdate()))` therefore ``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price,...
5,530,904
``` void childSignalHandler(int signo) { int status; pid_t pid = wait(&status); struct PIDList* record = getRecordForPID(childlist, pid); if (record != NULL) record->returnValue = status; } ``` Quick question: I want this handler to, when a child dies (this app spawns lots of children), get...
2011/04/03
[ "https://Stackoverflow.com/questions/5530904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/280698/" ]
Assuming SQL Server, the GETDATE() function returns the date **and time** the statement was run at: ``` WHERE Schd_Date > GETDATE() ``` Use the following for finding dates greater than the current date at midnight: ``` WHERE Schd_Date > DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) ``` However, `CURRENT_TIMESTAMP` i...
``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price, Accom_ID FROM Schedule WHERE (Schd_Avaliable = 'Yes') AND (Accom_ID = Accom_ID) AND (GETDATE() < Schd_Date) ``` This should work
5,530,904
``` void childSignalHandler(int signo) { int status; pid_t pid = wait(&status); struct PIDList* record = getRecordForPID(childlist, pid); if (record != NULL) record->returnValue = status; } ``` Quick question: I want this handler to, when a child dies (this app spawns lots of children), get...
2011/04/03
[ "https://Stackoverflow.com/questions/5530904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/280698/" ]
Assuming SQL Server, the GETDATE() function returns the date **and time** the statement was run at: ``` WHERE Schd_Date > GETDATE() ``` Use the following for finding dates greater than the current date at midnight: ``` WHERE Schd_Date > DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE())) ``` However, `CURRENT_TIMESTAMP` i...
I guess this expression can be used as a date representing the current date on the format *yyyy-mm-dd* (without the hours,minutes and seconds). `(Datepart('yyyy',getdate())+ '-' +Datepart('m',getdate())+ '-' + Datepart('d',getdate()))` therefore ``` SELECT Schd_ID, Schd_Date, Schd_Avaliable, Schd_Nights, Schd_Price,...
63,376,226
I have a whole bunch of large XML files that contain thousands of records that look like this: **XML Sample:** ``` <Report:Report xmlns:Report ="http://someplace.com"> <Id root="1234567890"/> <Records value="10"/> <ReportDate>2020-06-20</ReportDate> <Record> <Id root="001"/> <Site> <SiteData> <SiteData...
2020/08/12
[ "https://Stackoverflow.com/questions/63376226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14092653/" ]
See below ``` import xml.etree.ElementTree as ET xml = '''<Report:Report xmlns:Report ="http://someplace.com"> <Id root="1234567890"/> <Records value="10"/> <ReportDate>2020-06-20</ReportDate> <Record> <Id root="001"/> <Site> <SiteData> <SiteDataInfo1> <Name code="12345"/> <Status code="1"/> ...
My normal approach is use [xmlplain](https://pypi.org/project/xmlplain/) and then [json\_normalize](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.json_normalize.html) *so.xml* is just your sample xml saved to a file. ``` import pandas as pd import xmlplain from collections import OrderedDict wit...
4,692,302
Every once in awhile I am programming something in Magento and I get a MySQL error. When the exception displays on the screen it only displays the first few characters of the query that it was trying to execute. Is there a way to get Magento to display the entire query in the stack trace?
2011/01/14
[ "https://Stackoverflow.com/questions/4692302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365709/" ]
You can set on the debug mode in mysql adapter (Varien\_Db\_Adapter\_Pdo\_Mysql) ``` /** * Write SQL debug data to file * * @var bool */ protected $_debug = true; ``` Go to file (var/debug/sql.txt), find the exception get query and execute it in mysql tool. The problem is the PDO returns only part ...
Edit `Zend_Db_Statement_Pdo#_execute` method to include `$this->_stmt->queryString` in the thrown exception message.
4,692,302
Every once in awhile I am programming something in Magento and I get a MySQL error. When the exception displays on the screen it only displays the first few characters of the query that it was trying to execute. Is there a way to get Magento to display the entire query in the stack trace?
2011/01/14
[ "https://Stackoverflow.com/questions/4692302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365709/" ]
You can set on the debug mode in mysql adapter (Varien\_Db\_Adapter\_Pdo\_Mysql) ``` /** * Write SQL debug data to file * * @var bool */ protected $_debug = true; ``` Go to file (var/debug/sql.txt), find the exception get query and execute it in mysql tool. The problem is the PDO returns only part ...
Here's a module that pretty prints the SQL as well: <https://github.com/kalenjordan/pretty-sql-exception>
4,692,302
Every once in awhile I am programming something in Magento and I get a MySQL error. When the exception displays on the screen it only displays the first few characters of the query that it was trying to execute. Is there a way to get Magento to display the entire query in the stack trace?
2011/01/14
[ "https://Stackoverflow.com/questions/4692302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365709/" ]
Edit `Zend_Db_Statement_Pdo#_execute` method to include `$this->_stmt->queryString` in the thrown exception message.
Here's a module that pretty prints the SQL as well: <https://github.com/kalenjordan/pretty-sql-exception>
19,047
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no longer available. When attempting to run it manually, I get this error: ``` The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail ``` Th...
2008/08/20
[ "https://Stackoverflow.com/questions/19047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/234/" ]
I remembered I'd seen this thing before just after posting to SO It seems that later versions of TortoiseSVN are built with Visual Studio 2008 SP1 (hence the 9.0.30411.0 build number) Installing the [VC2008 SP1 Redistributable](http://www.microsoft.com/downloads/details.aspx?familyid=A5C84275-3B97-4AB7-A40D-3802B2AF5...
Confirmed working on windows 7 x64.
22,408,418
I currently have a block with a number centered in it, and on hover I want to increase the number, however, with the Google webfont I am using (Montserrat), the characters seem to have different widths, and when you hover the entire number shifts slightly to be centered. Here is a quick JSFiddle to illustrate the prob...
2014/03/14
[ "https://Stackoverflow.com/questions/22408418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245789/" ]
Instead of using `text-align:center` and setting the divs to `display:inline-block`, give them a width and use `margin:0 auto` to center them. ``` .one,.two { width:80px; margin:0 auto; } ``` **[jsFiddle example](http://jsfiddle.net/j08691/r4QHg/)**
You want the characters to have the same width, with a monospaced font this is easy, but you can't really force a font into monospace using CSS only. A solution is to place the characters in separate elements and give them a fixed width. ``` <div class="block"> <div class="one"><span class="char">4</span><span cl...
22,408,418
I currently have a block with a number centered in it, and on hover I want to increase the number, however, with the Google webfont I am using (Montserrat), the characters seem to have different widths, and when you hover the entire number shifts slightly to be centered. Here is a quick JSFiddle to illustrate the prob...
2014/03/14
[ "https://Stackoverflow.com/questions/22408418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3245789/" ]
Instead of using `text-align:center` and setting the divs to `display:inline-block`, give them a width and use `margin:0 auto` to center them. ``` .one,.two { width:80px; margin:0 auto; } ``` **[jsFiddle example](http://jsfiddle.net/j08691/r4QHg/)**
This works for me [DEMO](http://jsfiddle.net/ehpv2/5/) ``` @import url(http://fonts.googleapis.com/css?family=Montserrat); .block { font-size: 4em; font-family: 'Montserrat', sans-serif; width:100%; height: 100px; text-align: center; } .one { display: inline-block;width:60px; } .two { display: none; wi...
2,766,885
I've got transactional replication configured from a database called DBProd to another database called DBWarehouse ; everything works fine, and transaction are usually replicated instantaneously to the warehouse .... which is my problem. I'd like to add a slight delay to the replication (something like 10 minutes), so...
2010/05/04
[ "https://Stackoverflow.com/questions/2766885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47341/" ]
There is not a way to add a delay per transaction. You can change the pollinginterval parameter for the distribution agent (http://technet.microsoft.com/en-us/library/ms147328.aspx) to be longer, but all transactions made up until the polling time would be moved. Note that delaying the polling interval also delays the...
You should be able to do this in the Subscriber Scheduling options.
68,713
According to the laws of Shariya, a woman should put on a headcover at home or not? (in front of the family only: husband, sons, and daughters).
2021/05/21
[ "https://islam.stackexchange.com/questions/68713", "https://islam.stackexchange.com", "https://islam.stackexchange.com/users/14379/" ]
No, the husband, sons, brothers etc. of a woman are her mahrams. She does not need to cover her head in front of them. > > قل للمؤمنات ... لا يبدين زينتهن إلا لبعولتهن أو آبائهن أو آباء بعولتهن أو أبنائهن أو أبناء بعولتهن أو إخوانهن أو بني إخوانهن أو بني أخواتهن أو نسائهن أو ما ملكت أيمانهن أو التابعين غير أولي الإرب...
***NOTE: This is my own answer based upon my own translations and research, before any moderator wishes to delete it.*** It is not obligatory for a woman to cover her head at home before Maĥrams, however it is good to do so out of modesty. Imām Sayyid Muĥammad Amīn Ibn Áābidīn al-Ĥanafī al-Shāmī [1198-1252 AH / 1784-...
68,713
According to the laws of Shariya, a woman should put on a headcover at home or not? (in front of the family only: husband, sons, and daughters).
2021/05/21
[ "https://islam.stackexchange.com/questions/68713", "https://islam.stackexchange.com", "https://islam.stackexchange.com/users/14379/" ]
No, the husband, sons, brothers etc. of a woman are her mahrams. She does not need to cover her head in front of them. > > قل للمؤمنات ... لا يبدين زينتهن إلا لبعولتهن أو آبائهن أو آباء بعولتهن أو أبنائهن أو أبناء بعولتهن أو إخوانهن أو بني إخوانهن أو بني أخواتهن أو نسائهن أو ما ملكت أيمانهن أو التابعين غير أولي الإرب...
A woman is not obliged to cover her hair in front of her husband, sons, daughters etc. (Reference: Surah An-Nur 24:31). There is neither thawab for covering her hair nor sin for uncovering it in the presence of her husband and Mahrams. The assertions by ulemas of Indian subcontinent, that a woman should cover her hair...
47,644,950
I am now execution a sql similar to below: ``` select * from table_name where num in (123,124....,210) and type='a' ``` the records of the table\_name is around 1500000, so the execution time is very long, is there any idea that I could improve the efficiency? Thanks.
2017/12/05
[ "https://Stackoverflow.com/questions/47644950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For your query, you want an index on `table_name(type, num)`.
Yes, you should add index on `type and num` column
53,425,898
hi I want to make a local notification from string time, I want the notification launch 10 minute before given time. I have trouble how to make the time from 4:01 into 3:51, please help. this is my code ``` let a = "4:01" func startNoftification(prayer: String) { let time = prayer.split(separator: ":").map { (x) ...
2018/11/22
[ "https://Stackoverflow.com/questions/53425898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8907890/" ]
Is this what you need? ``` let time = "4:01" let dateFormatter = DateFormatter() dateFormatter.dateFormat = "hh:mm" guard let date = dateFormatter.date(from: time) else { return } let targetTime = Date(timeInterval: -(10 * 60), since: date) // Change time interval to required value in seconds let targetTimeSt...
Here I have solution combine with rakesha Shastri answer, hopefully it can helps others. First import UserNotification in appDelegate and in your controller ``` import UserNotification ``` and add code for didFinishWithLaunchingWithOptions ``` func application(_ application: UIApplication, didFinishLaunchingWithOp...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
**EDIT**: I don't think this solution is thorough enough. This answer is kept for historical reasons. See my **newest answer** here: <https://stackoverflow.com/a/19687115/202451> --- You've got to do KVO on the frame-property. "self" is in thise case a UIViewController. adding the observer (typically done in viewDid...
Updated @hfossli answer for **RxSwift** and **Swift 5**. With RxSwift you can do ``` Observable.of(rx.observe(CGRect.self, #keyPath(UIView.frame)), rx.observe(CGRect.self, #keyPath(UIView.layer.bounds)), rx.observe(CGRect.self, #keyPath(UIView.layer.transform)), rx.observe(CG...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
Currently it's not possible to use KVO to observe a view's frame. Properties have to be *KVO compliant* to be observable. Sadly, properties of the UIKit framework are generally not observable, as with any other system framework. From the [documentation](https://developer.apple.com/library/ios/documentation/general/con...
Updated @hfossli answer for **RxSwift** and **Swift 5**. With RxSwift you can do ``` Observable.of(rx.observe(CGRect.self, #keyPath(UIView.frame)), rx.observe(CGRect.self, #keyPath(UIView.layer.bounds)), rx.observe(CGRect.self, #keyPath(UIView.layer.transform)), rx.observe(CG...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
**EDIT**: I don't think this solution is thorough enough. This answer is kept for historical reasons. See my **newest answer** here: <https://stackoverflow.com/a/19687115/202451> --- You've got to do KVO on the frame-property. "self" is in thise case a UIViewController. adding the observer (typically done in viewDid...
If I might contribute to the conversation: as others have pointed out, `frame` is not guaranteed to be key-value observable itself and neither are the `CALayer` properties even though they appear to be. What you can do instead is create a custom `UIView` subclass that overrides `setFrame:` and announces that receipt t...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
There are usually notifications or other observable events where KVO isn't supported. Even though the docs says *'no'*, it is ostensibly safe to observe the CALayer backing the UIView. Observing the CALayer works in practice because of its extensive use of KVO and proper accessors (instead of ivar manipulation). It's n...
There is a way to achieve this without using KVO at all, and for the sake of others finding this post, I'll add it here. <http://www.objc.io/issue-12/animating-custom-layer-properties.html> This excellent tutorial by Nick Lockwood describes how to use core animations timing functions to drive anything. It's far super...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
There are usually notifications or other observable events where KVO isn't supported. Even though the docs says *'no'*, it is ostensibly safe to observe the CALayer backing the UIView. Observing the CALayer works in practice because of its extensive use of KVO and proper accessors (instead of ivar manipulation). It's n...
Updated @hfossli answer for **RxSwift** and **Swift 5**. With RxSwift you can do ``` Observable.of(rx.observe(CGRect.self, #keyPath(UIView.frame)), rx.observe(CGRect.self, #keyPath(UIView.layer.bounds)), rx.observe(CGRect.self, #keyPath(UIView.layer.transform)), rx.observe(CG...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
Currently it's not possible to use KVO to observe a view's frame. Properties have to be *KVO compliant* to be observable. Sadly, properties of the UIKit framework are generally not observable, as with any other system framework. From the [documentation](https://developer.apple.com/library/ios/documentation/general/con...
As mentioned, if KVO doesn't work and you just want to observe your own views which you have control over, you can create a custom view that overrides either setFrame or setBounds. A caveat is that the final, desired frame value may not be available at the point of invocation. Thus I added a GCD call to the next main t...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
**EDIT**: I don't think this solution is thorough enough. This answer is kept for historical reasons. See my **newest answer** here: <https://stackoverflow.com/a/19687115/202451> --- You've got to do KVO on the frame-property. "self" is in thise case a UIViewController. adding the observer (typically done in viewDid...
It's not safe to use KVO in some UIKit properties like `frame`. Or at least that's what Apple says. I would recommend using [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa), this will help you listen to changes in any property without using KVO, it's very easy to start *observing* something using Signal...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
Updated @hfossli answer for **RxSwift** and **Swift 5**. With RxSwift you can do ``` Observable.of(rx.observe(CGRect.self, #keyPath(UIView.frame)), rx.observe(CGRect.self, #keyPath(UIView.layer.bounds)), rx.observe(CGRect.self, #keyPath(UIView.layer.transform)), rx.observe(CG...
It's not safe to use KVO in some UIKit properties like `frame`. Or at least that's what Apple says. I would recommend using [ReactiveCocoa](https://github.com/ReactiveCocoa/ReactiveCocoa), this will help you listen to changes in any property without using KVO, it's very easy to start *observing* something using Signal...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
There are usually notifications or other observable events where KVO isn't supported. Even though the docs says *'no'*, it is ostensibly safe to observe the CALayer backing the UIView. Observing the CALayer works in practice because of its extensive use of KVO and proper accessors (instead of ivar manipulation). It's n...
Currently it's not possible to use KVO to observe a view's frame. Properties have to be *KVO compliant* to be observable. Sadly, properties of the UIKit framework are generally not observable, as with any other system framework. From the [documentation](https://developer.apple.com/library/ios/documentation/general/con...
4,874,288
I want to watch for changes in a `UIView`'s `frame`, `bounds` or `center` property. How can I use Key-Value Observing to achieve this?
2011/02/02
[ "https://Stackoverflow.com/questions/4874288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202451/" ]
As mentioned, if KVO doesn't work and you just want to observe your own views which you have control over, you can create a custom view that overrides either setFrame or setBounds. A caveat is that the final, desired frame value may not be available at the point of invocation. Thus I added a GCD call to the next main t...
There is a way to achieve this without using KVO at all, and for the sake of others finding this post, I'll add it here. <http://www.objc.io/issue-12/animating-custom-layer-properties.html> This excellent tutorial by Nick Lockwood describes how to use core animations timing functions to drive anything. It's far super...
550,571
There is this CD-RW which I always used to burn distros' CDs. All of a sudden it acts like a normal CD. When I mount it, it gets mounted this way: ``` - Proprietary: Root - Access: Read only - Group: Root - Access: Read only - Other: Read only ``` I thought I could manually mount it as Read-write. These are th...
2019/11/05
[ "https://unix.stackexchange.com/questions/550571", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/102257/" ]
Do you have the `lsscsi` command available, or can you install it? If possible, run `lsscsi -g` and identify your CD-RW drive from the listing. Your CD-RW drive is probably `/dev/sr0`, but it will also have a `/dev/sg*` device associated with it. This is the "generic SCSI device" that allows sending more specialized ...
After trying with several programs, guis, and even switching to Windows, I wondered if the issue might have been related to the drive. Aaaaand... it was. I just went to an other PC and was able to erase it in 30 seconds. Not sure why I can burn but can't erase through this one. Go figure. Thanks nonetheless to @telc...
4,694,396
I want to upload images to my server and it works fine and I have encrypted the name on the images. But now I want to update the user table in my database so I can show the image on the users' profile. My problem is that I can't find out how to insert the encrypted image name in the database table called "users" and ...
2011/01/14
[ "https://Stackoverflow.com/questions/4694396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/576019/" ]
You have to show us some code, but anyway you need to set the `encrypt_name` when uploading the file: ``` $config['encrypt_name'] = TRUE; ``` EDIT: Based on your update, your code should read: ``` $profilBilledNavn['profile_picture'] = $this->upload->data('file_name'); $this->db->where('username', $this->input...
Refer here for a better clarity <http://codeigniter.com/user_guide/libraries/file_uploading.html> Lets say that you have the upload data in an array called upload\_data. Load database class > > $this->load->database(); > > > then in model or controller .. inserts into the field called cryptedname in your tab...
44,028
大家好! 1.可以说种树,植树,栽树,为什么植树节只能说植树? 2.为什么说栽秧,种秧,而不说植秧? Thanks! :)
2021/05/24
[ "https://chinese.stackexchange.com/questions/44028", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/27270/" ]
You may try Chinese Wiktionary and English Wiktionary, each has its own merits. <https://zh.wiktionary.org/wiki/%E4%B8%8D%E5%AE%A2%E6%B0%94> <https://en.wiktionary.org/wiki/%E4%B8%8D%E5%AE%A2%E6%B0%A3#Chinese> When searching for the pronunciation of a specific dialect word (since it may not be listed in Wiktionary) yo...
Pleco has two separate dictionaries for Mandarin-Cantonese translations, some soley for character pronunciation and some for actual dictionary entries. There is also a Cross Straits add on for dictionary entries comparing Mainland Chinese and Taiwanese Chinese. [![enter image description here](https://i.stack.imgur.co...
60,064,647
I'm currently writing a C++ program that's rather math-involved. As such, I'm trying to denote some objects as having subscript numbers in a wstring member variable of their class. However, attempts at storing these characters in any capacity forces them into their non-subscript counterparts. By contrast, direct uses o...
2020/02/04
[ "https://Stackoverflow.com/questions/60064647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2376232/" ]
I find these things tricky and I'm never sure if it works for everyone on every Windows version and locale, but this does the trick for me: ``` #include <Windows.h> #include <io.h> // _setmode #include <fcntl.h> // _O_U16TEXT #include <clocale> // std::setlocale #include <iostream> // Unicode UTF-16, little e...
You should configure console and the program you open the file that it should interpret your string as its encoding (eg. utf32). for example in windows you can set your console code page with SetConsoleOutputCP function. to view file different encoding you can add your file to vs solution, right click/open with / sour...
25,564,749
I would like to get the address of a member function inside the same member function. The this pointer is acquired already so I know which object I am called from. Of course the compiler complains that I'm trying to use a pointer to this function while not calling it. I see the point for having this rule outside an obj...
2014/08/29
[ "https://Stackoverflow.com/questions/25564749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3514014/" ]
A pointer-to-member function is generally twice the size of a normal pointer like a `void*` so there is no direct conversion possible in standard C++. <https://gcc.gnu.org/onlinedocs/gcc/Bound-member-functions.html> documents a GCC extension which allows you to get a normal (non-member) function pointer by combining `...
There is no such thing as "this object's member function." The member functions are effectively *shared* by all objects of the same class - it's just code, not data. `this` is usually passed as an extra hidden parameter to these functions. In effect, the compiler transforms this: ``` struct Obj { int a; int foo(...
12,692
I had a MSSQL (MSSQL 2008 R2) cluster that failed in a way that I couldn't bring it back up (long story, servers ended up in BSOD loops, I'm blaming Broadcom and myself). I've SQL backups, and even better, I've got the detached MDF and LDF files as they were on the SAN before everything went wrong. I've now got the t...
2012/02/11
[ "https://dba.stackexchange.com/questions/12692", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3216/" ]
You will have to attach the MSDB DB under a different name like 'jobsdb' and pull the jobs out of jobsdb. The jobs will be stored under `jobsdb.dbo.sysjobs` and the job steps will be under `jobsdb.dbo.sysjobsteps`. They can be joined by the job\_id column. The schedules can be found under `jobsdb.dbo.sysjobschedules` ...
Assuming service has been restored and you're now attending to this without urgency, I'd be inclined to restore `msdb` to a separate instance if available. You are correct that the agent job definitions are stored in `msdb`, so following restore you can script the jobs you want to recover and re-create on the primary s...
43,311,258
I have a data frame `x`: ``` begin end 1 1 3 2 5 6 3 11 18 ``` and a vector `v <- c(1,2,5,9,10,11,17,20)` I'd like to find all values from vector that are elements of any of interval from data frame. So i would like to get a vector `c(1,2,5,11,17)`. How is it possible?
2017/04/09
[ "https://Stackoverflow.com/questions/43311258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7841684/" ]
To get row-wise values, use `apply` on `MARGIN` `1` with `intersect` ``` apply(df, 1, function(a) intersect(v, a[1]:a[2])) #[[1]] #[1] 1 2 #[[2]] #[1] 5 #[[3]] #[1] 11 17 ``` OR `unlist` to get a vector ``` unlist(apply(df, 1, function(a) intersect(v, a[1]:a[2]))) #OR intersect(v, unlist(apply(df, 1, function(a) ...
We can use `Map` to get the sequence between corresponding, `begin/end` values in a `list`, `unlist` the `list` and use `intersect` to get the elements common in both the `vector`s ``` intersect(unlist(Map(`:`, x$begin, x$end)), v) #[1] 1 2 5 11 17 ```
54,782,317
I wanted to run robot test for a duration of time, say for 1hr. No matter if the execution of all test cases in a test suite is completed. It should repeat the test cases until the given time reached. I tried to use **--prerunmodifier** and tried to write my own module, I used robot.api module **robot.running.context*...
2019/02/20
[ "https://Stackoverflow.com/questions/54782317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7181804/" ]
Try with '[Repeat Keyword](http://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Repeat%20Keyword)' keyword. It takes as argument for how long it should repeat given keyword. But in this case all your test cases should go to one keyword. Use 'Run Keyword And Ignore Error' inside of it so you ignore err...
As per the Robot framework user guide the robot framework test suite will be executed for a maximum time of 120 minutes i.e. 2hrs. Not we can overwrite this timeout by explicitly mentioning the test execution time in the test files Settings table as below ``` ***Setting*** Test Timeout 60 minutes ``` Further you ar...
44,015,439
I have code that produces a clickable box that changes colors from black --> green --> white by cycling through the shades of green whenever the mouse is clicked. I need to integrate code that allows the current selection (whatever shade is currently displayed) to be visible in an output when a button is pressed. So le...
2017/05/17
[ "https://Stackoverflow.com/questions/44015439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7691246/" ]
Do it like: Color value will be in rgb. With JS: ``` document.getElementById("myDiv").style.backgroundColor - will extract the background color ``` With jQuery: ``` jQuery('#myDiv').css("background-color"); ``` ```js var div = document.querySelector('#myDiv') div.dataset.color = 0; div.addEventListener('clic...
You can use getComputedStyle() to get the current style of a element: Please find an example here <https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_getcomputedstyle> ``` <!DOCTYPE html> <html> <body> <p>Click the button to get the computed background color for the test div.</p> <p><button onclick="myFun...
44,015,439
I have code that produces a clickable box that changes colors from black --> green --> white by cycling through the shades of green whenever the mouse is clicked. I need to integrate code that allows the current selection (whatever shade is currently displayed) to be visible in an output when a button is pressed. So le...
2017/05/17
[ "https://Stackoverflow.com/questions/44015439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7691246/" ]
Do it like: Color value will be in rgb. With JS: ``` document.getElementById("myDiv").style.backgroundColor - will extract the background color ``` With jQuery: ``` jQuery('#myDiv').css("background-color"); ``` ```js var div = document.querySelector('#myDiv') div.dataset.color = 0; div.addEventListener('clic...
``` var getColorOnClick = function(e) { e.preventDefault(); var elem = document.getElementById("mybutton"); var bgcolor = window.getComputedStyle(elem,null).getPropertyValue("background-color"); // do something with bgcolor } ```
11,466,297
I want to use this script but I can't make it work. They have a example on the web page but it is not working. Can someone see what is wrong with it? [JQUERY TRANSLATE](http://jsbin.com/ozenu/1007/edit#javascript,html,live) The reason why I need this is because I want to change language dynamically, for example wh...
2012/07/13
[ "https://Stackoverflow.com/questions/11466297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1182591/" ]
This isn't working because it depends on the now-closed Google Translate API. Google are releasing a paid-for API, but the old free API version linked to in that script has ceased to exist.
The response of the Ajax call is : google.language.callbacks.id101('22', null, 403, 'Please use Translate v2. See <http://code.google.com/apis/language/translate/overview.html>', 200) which turns back to what Jim said. --- From the `jquery-translate` code there is : ``` if (key.length < 40) --> Google else Microso...
6,351,927
I have a stored procedure that returns all fields of an object. ``` CREATE PROCEDURE getCustomer ( @CustomerId int OUTPUT ) AS BEGIN SELECT @CustomerId=CustomerId,FirstName,LastName FROM Customers END ``` I want to be able to return the id of the object as an output parameter, so that another sproc can use i...
2011/06/15
[ "https://Stackoverflow.com/questions/6351927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439213/" ]
When your `SELECT` statement assigns variable values, all fields in the SELECT must assign to a local variable. Change your SPROC to ``` CREATE PROCEDURE getCustomer ( @CustomerId int OUTPUT ) AS BEGIN DECLARE @FirstName VARCHAR(50) DECLARE @LastName VARCHAR(50) SELECT @CustomerId=CustomerId, @FirstName...
There is an error in the query: `FirstName` and `LastName` are redundant. ``` SELECT @CustomerId = CustomerId FROM Customers ``` Also I assume you have more than one customer in the Customers table. So this query will return the last CustomerId, which I assume is not what you want. So you need to add `WHERE` conditi...
16,355,937
Below is my code, which checks whether the selected file is a directory or a file. If it is a directory it changes into it. But how do I goes back to parent directory on back button press? I see somehwere in Stackflow a code which goes `root.parent` when backpress but now I did not found that code. ``` gridView =...
2013/05/03
[ "https://Stackoverflow.com/questions/16355937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289381/" ]
To prevent that all columns are resized to the `ScrollPane` size you can disable the auto resize: ``` table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); ``` Adding your `ScrollPane` to the center of the `BorderLayout` should set the maximum size to the screen size, because normally the JFrame can't become bigger. To ...
Add your `JTable` inside `JScrollPane` and set for scrollbars. ``` new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); ``` Code sample for `JTable` to fit the screen size ``` public class TestJTableFitsScreenWidth { public static void main(String... ar...
16,355,937
Below is my code, which checks whether the selected file is a directory or a file. If it is a directory it changes into it. But how do I goes back to parent directory on back button press? I see somehwere in Stackflow a code which goes `root.parent` when backpress but now I did not found that code. ``` gridView =...
2013/05/03
[ "https://Stackoverflow.com/questions/16355937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289381/" ]
Add your `JTable` inside `JScrollPane` and set for scrollbars. ``` new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED); ``` Code sample for `JTable` to fit the screen size ``` public class TestJTableFitsScreenWidth { public static void main(String... ar...
This may help you. ``` Dimension d = new Dimension(900, 800); tbl_transaction.setAutoResizeMode(tbl_transaction.AUTO_RESIZE_OFF); tbl_transaction.setPreferredSize(d); tbl_transaction.setPreferredScrollableViewportSize(d); ```
16,355,937
Below is my code, which checks whether the selected file is a directory or a file. If it is a directory it changes into it. But how do I goes back to parent directory on back button press? I see somehwere in Stackflow a code which goes `root.parent` when backpress but now I did not found that code. ``` gridView =...
2013/05/03
[ "https://Stackoverflow.com/questions/16355937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2289381/" ]
To prevent that all columns are resized to the `ScrollPane` size you can disable the auto resize: ``` table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); ``` Adding your `ScrollPane` to the center of the `BorderLayout` should set the maximum size to the screen size, because normally the JFrame can't become bigger. To ...
This may help you. ``` Dimension d = new Dimension(900, 800); tbl_transaction.setAutoResizeMode(tbl_transaction.AUTO_RESIZE_OFF); tbl_transaction.setPreferredSize(d); tbl_transaction.setPreferredScrollableViewportSize(d); ```
19,689,738
I am working with a jquery dropdown menu. It is almost done, but for some reason I can't get the onChange working. ``` <select id="cd-dropdown" class="cd-select" ONCHANGE="location = this.options[this.selectedIndex].value;" > <option value="-1" selected>Selecione uma categoria</option> <option value="1" class=...
2013/10/30
[ "https://Stackoverflow.com/questions/19689738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2904202/" ]
Use `location.href`: ``` <select id="cd-dropdown" class="cd-select" ONCHANGE="location.href = this.options[this.selectedIndex].value;" > ------------------^ ``` **Explanation** The keyword `location` is the Object. The `href` property of the `location` object says the URL. **Full Code:** ``` <select id="c...
I would prefer this simpler code: ``` onchange="location.href = this.value;" ``` Here ***this*** is the select object. Your code here: ``` <select id="cd-dropdown" class="cd-select" onchange="location.href = this.value;" > <option value="-1" selected>Selecione uma categoria</option> <option value="1" class...
19,689,738
I am working with a jquery dropdown menu. It is almost done, but for some reason I can't get the onChange working. ``` <select id="cd-dropdown" class="cd-select" ONCHANGE="location = this.options[this.selectedIndex].value;" > <option value="-1" selected>Selecione uma categoria</option> <option value="1" class=...
2013/10/30
[ "https://Stackoverflow.com/questions/19689738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2904202/" ]
HTML: ``` <select id="cd-dropdown"> <option disabled selected>Select</option> <option value="http://www.facebook.com">Facebook</option> <option value="http://www.google.com">Google</option> </select> ``` Jquery: ``` $("#cd-dropdown").on('change', function(){ var url = $("option:selected", this).val(...
I would prefer this simpler code: ``` onchange="location.href = this.value;" ``` Here ***this*** is the select object. Your code here: ``` <select id="cd-dropdown" class="cd-select" onchange="location.href = this.value;" > <option value="-1" selected>Selecione uma categoria</option> <option value="1" class...
29,559,601
in my scenario i need to bind Decimal? type property to Double? type property. Here is the simple code using Double? ``` public class Model { private double? id = null; public double? ID { get { return id; } set { id = value; } } } ``` and my Xaml ``...
2015/04/10
[ "https://Stackoverflow.com/questions/29559601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3026795/" ]
So, the reason is what's written in the exception: > > Null object cannot be converted to a value type > > > When it tries to make a double value (for the "Height" property) out of your decimal, the conversion method ("System.Convert.ChangeType") does not know how to deal with a null(able) value. Since this metho...
Add namespace `xmlns:sys="clr-namespace:System;assembly=mscorlib"` And use this: ``` <TextBox x:Name="db" Width="100" Height="{Binding ID, TargetNullValue={x:Static sys:String.Empty}}"/> ```
1,110,762
I have a web application (.NET 3.5) that has this code in Global.asax: ``` Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) LinkLoader() PathRewriter() PathAppender() End Sub ``` I want all those functions inside to get called except for when it's an AJAX call back. So, ideally ...
2009/07/10
[ "https://Stackoverflow.com/questions/1110762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/136405/" ]
John, Thanks for pointing me in the right direction. The solution is actually to check for Request.Form("\_\_ASYNCPOST"). It is set to "true" if it is a CallBack. Thanks so much for the help!
From my understanding all IsCallback does is check if the form has a post variable named \_\_CALLBACKARGUMENT. You could check the form yourself in Context.Request.Form and that should tell you the same thing as IsCallback.
1,110,762
I have a web application (.NET 3.5) that has this code in Global.asax: ``` Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) LinkLoader() PathRewriter() PathAppender() End Sub ``` I want all those functions inside to get called except for when it's an AJAX call back. So, ideally ...
2009/07/10
[ "https://Stackoverflow.com/questions/1110762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/136405/" ]
You should have access to the HttpContext.Current.Handler object which you can cast to a Page object and get Page.IsPostBack or Page.IsCallBack. Although in order to do this safely you need to first test that it is a Page object and not null: ``` With HttpContext.Current If TypeOf .Handler Is Page Then Dim pa...
From my understanding all IsCallback does is check if the form has a post variable named \_\_CALLBACKARGUMENT. You could check the form yourself in Context.Request.Form and that should tell you the same thing as IsCallback.
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
To create a global variable, you should do the following. Note that in the header, we mark the variable as `extern`, and we actually create the object in a `cpp` file. ### header.h ``` extern int globalVariable; ``` ### header.cpp ``` #include "header.h" int globalVariable; ``` ### main.cpp ``` #include "header...
Because BOTH sources #include your header, and thus it is DEFINED twice.
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
1. Move the declaration to a .cpp file. You can use a declaration in a header file by using: `extern int globalVariable; // declaration in header - can have as many as you need` But the .cpp file should have the definition: `int globalVariable; // definition in .cpp - only need one across all your files` C and C++ ...
To create a global variable, you should do the following. Note that in the header, we mark the variable as `extern`, and we actually create the object in a `cpp` file. ### header.h ``` extern int globalVariable; ``` ### header.cpp ``` #include "header.h" int globalVariable; ``` ### main.cpp ``` #include "header...
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
To create a global variable, you should do the following. Note that in the header, we mark the variable as `extern`, and we actually create the object in a `cpp` file. ### header.h ``` extern int globalVariable; ``` ### header.cpp ``` #include "header.h" int globalVariable; ``` ### main.cpp ``` #include "header...
In such situation,it is common to use some #define as follows: ``` //header.h #ifdef DEFINE_VARS #define DEFINE_OR_DECLARE #else #define DEFINE_OR_DECLARE extern #endif DEFINE_OR_DECLARE int globalVariable; //main.cpp #define DEFINE_VARS #include "header.h" ... //header.cpp #include "header.h" ... ```
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
1. Move the declaration to a .cpp file. You can use a declaration in a header file by using: `extern int globalVariable; // declaration in header - can have as many as you need` But the .cpp file should have the definition: `int globalVariable; // definition in .cpp - only need one across all your files` C and C++ ...
Because BOTH sources #include your header, and thus it is DEFINED twice.
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
Because BOTH sources #include your header, and thus it is DEFINED twice.
In such situation,it is common to use some #define as follows: ``` //header.h #ifdef DEFINE_VARS #define DEFINE_OR_DECLARE #else #define DEFINE_OR_DECLARE extern #endif DEFINE_OR_DECLARE int globalVariable; //main.cpp #define DEFINE_VARS #include "header.h" ... //header.cpp #include "header.h" ... ```
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
Put global variable in some .c or .cpp file, so that it can be defined only once and refer in header file using extern for example, **header.h** ``` extern int globalVariable; ``` **header.cpp** ``` int globalVariable = 0; ``` **source.cpp** ``` #include "header.h" ``` **main.cpp** ``` #include"header.h" in...
Because BOTH sources #include your header, and thus it is DEFINED twice.
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
1. Move the declaration to a .cpp file. You can use a declaration in a header file by using: `extern int globalVariable; // declaration in header - can have as many as you need` But the .cpp file should have the definition: `int globalVariable; // definition in .cpp - only need one across all your files` C and C++ ...
In such situation,it is common to use some #define as follows: ``` //header.h #ifdef DEFINE_VARS #define DEFINE_OR_DECLARE #else #define DEFINE_OR_DECLARE extern #endif DEFINE_OR_DECLARE int globalVariable; //main.cpp #define DEFINE_VARS #include "header.h" ... //header.cpp #include "header.h" ... ```
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
1. Move the declaration to a .cpp file. You can use a declaration in a header file by using: `extern int globalVariable; // declaration in header - can have as many as you need` But the .cpp file should have the definition: `int globalVariable; // definition in .cpp - only need one across all your files` C and C++ ...
Put global variable in some .c or .cpp file, so that it can be defined only once and refer in header file using extern for example, **header.h** ``` extern int globalVariable; ``` **header.cpp** ``` int globalVariable = 0; ``` **source.cpp** ``` #include "header.h" ``` **main.cpp** ``` #include"header.h" in...
26,311,194
``` Sub Select_Row() 'Activate Gantt Chart ViewApply Name:="&Gantt Chart" SelectRow Row:=3, RowRelative:=False, Height:=2, Add:=True End Sub ``` The above subroutine works fine in Project VBA, but when I try the same in VSTO. i get the error `SelectRow is not declared`. It may be inaccessible due to its protectio...
2014/10/11
[ "https://Stackoverflow.com/questions/26311194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3184654/" ]
Put global variable in some .c or .cpp file, so that it can be defined only once and refer in header file using extern for example, **header.h** ``` extern int globalVariable; ``` **header.cpp** ``` int globalVariable = 0; ``` **source.cpp** ``` #include "header.h" ``` **main.cpp** ``` #include"header.h" in...
In such situation,it is common to use some #define as follows: ``` //header.h #ifdef DEFINE_VARS #define DEFINE_OR_DECLARE #else #define DEFINE_OR_DECLARE extern #endif DEFINE_OR_DECLARE int globalVariable; //main.cpp #define DEFINE_VARS #include "header.h" ... //header.cpp #include "header.h" ... ```
45,289
This is the scenario: I have tickets booked for a 13:40 scheduled flight with Emirates. I need to check bags in so plan to be at the airport at the advised 2 hours before flight departure (11:40) but I look ahead and see my plane is delayed and not scheduled for departure until 16:40. Can I arrive at the airport at ...
2015/03/27
[ "https://travel.stackexchange.com/questions/45289", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/19694/" ]
**No you can't turn up late to check-in on a delayed flight**, unless the check-in closing time is delayed along with the departure time. Note that usually this is not the case. The check-in closing time is set relative to the scheduled departure, and usually remains the same, regardless of whether the flight is delay...
In your particular case you might know when the flight leaves because it's unlikely another plane materializes but in general you need to be quite vigilant: it happened to me that the delay was decreased! Say, you show up for a flight to leave at 1pm, the flight now shows at 3pm but then it boards at 2pm and leaves at ...
45,289
This is the scenario: I have tickets booked for a 13:40 scheduled flight with Emirates. I need to check bags in so plan to be at the airport at the advised 2 hours before flight departure (11:40) but I look ahead and see my plane is delayed and not scheduled for departure until 16:40. Can I arrive at the airport at ...
2015/03/27
[ "https://travel.stackexchange.com/questions/45289", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/19694/" ]
**No you can't turn up late to check-in on a delayed flight**, unless the check-in closing time is delayed along with the departure time. Note that usually this is not the case. The check-in closing time is set relative to the scheduled departure, and usually remains the same, regardless of whether the flight is delay...
The check-in time has no relation to the flight being delayed. The counter will close on time, even if the flight never departs on time. This is because there are other things that need to happen for the flight to leave that are dependent on the check-in desk: 1. Passenger manifest. 2. Seat reservations/upgrades/chan...
12,690,369
Right now I am running: ``` head -1274954 /path/to/dump.sql | tail -1 ``` This shows me one line, I'd like to see 10 lines above and 10 lines below it.
2012/10/02
[ "https://Stackoverflow.com/questions/12690369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/843900/" ]
Why not just: ``` $ head -1274964 /path/to/dump.sql | tail -20 ``` ?
Check `$ man head` ``` NAME head - output the first part of files ``` Check `$ man tail` ``` NAME tail - output the last part of files ``` You are piping `(|)` output of head command to tail command. That's why it is printing last line from first 1274954 lines. ``` $ head -1274964 /path/to/dump.sql | tail...
416,248
I am using [supervisord's [program:x]](http://supervisord.org/configuration.html#program-x-section-settings) to keep my background queue runners up and running. The amount of numprocs is set to a static number, but now I am looking for a solution to dynamically adjust the process count depending on the workload of the ...
2012/08/10
[ "https://serverfault.com/questions/416248", "https://serverfault.com", "https://serverfault.com/users/93574/" ]
At this time, I think the answer is no. Best to ask this on the [supervisor users list](http://lists.supervisord.org/mailman/listinfo/supervisor-users) to be sure. You can change the number of workers running by editing the config, then running "supervisorctl update" or the equivalent XMLRPC commands. The problem is t...
It is now possible to control the number of processes running through [XML-RPC API](https://supvisors.readthedocs.io/en/0.10/xml_rpc.html#supvisors.rpcinterface.RPCInterface.update_numprocs) Few clients are available, depending on language, some are referenced [on this section of the docs](https://supvisors.readthedoc...
33,550,844
I'm trying to create a custom XML map using Excel VBA. My XML file is `BookData.xml`: ``` <?xml version='1.0'?> <BookInfo> <Book> <ISBN>989-0-487-04641-2</ISBN> <Title>My World</Title> <Author>Nancy Davolio</Author> <Quantity>121</Quantity> </Book> <Book> <ISBN>981-0-776-05541-0<...
2015/11/05
[ "https://Stackoverflow.com/questions/33550844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Remove the spaces in `"</ BookInfo >"`
You have to remove the comma on line 2 (after **Dim StrMyXml As String** ) and put the rest of that line in it's own line with the command **Dim** in front of it. It should look like this: > > **Dim StrMyXml As String** > > > **Dim MyMap As XmlMap** > > >
33,550,844
I'm trying to create a custom XML map using Excel VBA. My XML file is `BookData.xml`: ``` <?xml version='1.0'?> <BookInfo> <Book> <ISBN>989-0-487-04641-2</ISBN> <Title>My World</Title> <Author>Nancy Davolio</Author> <Quantity>121</Quantity> </Book> <Book> <ISBN>981-0-776-05541-0<...
2015/11/05
[ "https://Stackoverflow.com/questions/33550844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Remove the spaces in `"</ BookInfo >"`
I have encountered the same error and the response of BruceWayne is fast correct ! I have removed spaces in </ BookInfo > (line 12) BUT ALSO in < BookInfo > (line 4) Removing only in </ BookInfo > is not sufficient.
33,550,844
I'm trying to create a custom XML map using Excel VBA. My XML file is `BookData.xml`: ``` <?xml version='1.0'?> <BookInfo> <Book> <ISBN>989-0-487-04641-2</ISBN> <Title>My World</Title> <Author>Nancy Davolio</Author> <Quantity>121</Quantity> </Book> <Book> <ISBN>981-0-776-05541-0<...
2015/11/05
[ "https://Stackoverflow.com/questions/33550844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You have to remove the comma on line 2 (after **Dim StrMyXml As String** ) and put the rest of that line in it's own line with the command **Dim** in front of it. It should look like this: > > **Dim StrMyXml As String** > > > **Dim MyMap As XmlMap** > > >
I have encountered the same error and the response of BruceWayne is fast correct ! I have removed spaces in </ BookInfo > (line 12) BUT ALSO in < BookInfo > (line 4) Removing only in </ BookInfo > is not sufficient.
44,763,554
I have an Excel Workbook where the user imports a text file by the click of a button. My code works exactly as I need it to but it is extremely slow when filling in column H, Reading Date. Here is what my Excel Workbook looks like when the text file has been imported to the excel sheet: [![enter image description here...
2017/06/26
[ "https://Stackoverflow.com/questions/44763554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8094573/" ]
Few things that I noticed 1. As mentioned by Chris in comments, you can turn off screen updating and set calculation to manual and switch them back on and set calculation to automatic at the end of the code. For Example ``` With Application .ScreenUpdating = False .Calculation = xlCalculationManual End With ...
Try this: ``` Application.ScreenUpdating = False Application.Calculation = xlCalculationManual Application.EnableEvents = False YOUR CODE HERE Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True Application.EnableEvents = True ```
44,763,554
I have an Excel Workbook where the user imports a text file by the click of a button. My code works exactly as I need it to but it is extremely slow when filling in column H, Reading Date. Here is what my Excel Workbook looks like when the text file has been imported to the excel sheet: [![enter image description here...
2017/06/26
[ "https://Stackoverflow.com/questions/44763554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8094573/" ]
Few things that I noticed 1. As mentioned by Chris in comments, you can turn off screen updating and set calculation to manual and switch them back on and set calculation to automatic at the end of the code. For Example ``` With Application .ScreenUpdating = False .Calculation = xlCalculationManual End With ...
The best solution depends on a few things, that aren't clear to me from provided data. The following change will speed it up a lot (selecting cells takes a lot of time), but its not the optimum. If its still to slow, please provide ~ number of rows and ~% of rows (in column H), that are filled before you get to the fol...
73,922,835
I'm trying to fit a curve to some data. When I evaluate the polynomial equation with one value, I get an expected float answer. When I evaluate the polynomial equation over an array, the for loop yields integer values when the intended result is floats. I think I'm close, but I'm not sure what I'm doing wrong. Please ...
2022/10/02
[ "https://Stackoverflow.com/questions/73922835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20140498/" ]
You don't need to use a dictionary. You can just use a list and it's indexes since your values are just incrementing numbers. To convert from a dictionary to a list of it's values, call: ``` value_list = list(dictionaryname.values()) ``` Then, simply call sort on the list: ``` value_list.sort() ``` Also, python...
Python dict doesn't have a order, it's implemented by `hash` and you can not sort it. You should convert it to another type then sort.
73,922,835
I'm trying to fit a curve to some data. When I evaluate the polynomial equation with one value, I get an expected float answer. When I evaluate the polynomial equation over an array, the for loop yields integer values when the intended result is floats. I think I'm close, but I'm not sure what I'm doing wrong. Please ...
2022/10/02
[ "https://Stackoverflow.com/questions/73922835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20140498/" ]
The easiest way is to create a new dictionary by combining the keys and the sorted values from the original `dict`. Assign that dict to the original variable, and you're done. ``` In [1]: orig = {1: [0, 0, 1, 1], 2: [0, 1, 1, 1], 3: [1, 1, 1, 1], 4: [1, 0, 1, 1]} Out[1]: {1: [0, 0, 1, 1], 2: [0, 1, 1, 1], 3: [1, 1, 1,...
You don't need to use a dictionary. You can just use a list and it's indexes since your values are just incrementing numbers. To convert from a dictionary to a list of it's values, call: ``` value_list = list(dictionaryname.values()) ``` Then, simply call sort on the list: ``` value_list.sort() ``` Also, python...
73,922,835
I'm trying to fit a curve to some data. When I evaluate the polynomial equation with one value, I get an expected float answer. When I evaluate the polynomial equation over an array, the for loop yields integer values when the intended result is floats. I think I'm close, but I'm not sure what I'm doing wrong. Please ...
2022/10/02
[ "https://Stackoverflow.com/questions/73922835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20140498/" ]
The easiest way is to create a new dictionary by combining the keys and the sorted values from the original `dict`. Assign that dict to the original variable, and you're done. ``` In [1]: orig = {1: [0, 0, 1, 1], 2: [0, 1, 1, 1], 3: [1, 1, 1, 1], 4: [1, 0, 1, 1]} Out[1]: {1: [0, 0, 1, 1], 2: [0, 1, 1, 1], 3: [1, 1, 1,...
Python dict doesn't have a order, it's implemented by `hash` and you can not sort it. You should convert it to another type then sort.
45,096,242
I want to get the image from the `ImageField` file input and then display the image in a template, and finally save the image to the model `imageField`. The `file_image = request.POST.get('image')` only gets the image name, how do I get the actual image. Do I need to upload the image to a `NamedTemporaryFile()` first?...
2017/07/14
[ "https://Stackoverflow.com/questions/45096242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6786744/" ]
To get the images inputted in your html file, use: ``` request.FILES["input name "] ```
To upload a file, you need to add `enctype='multipart/form-data'` to your HTML form. So your form should look like: ``` <form method="POST" action="" enctype='multipart/form-data'> {% csrf_token %} <input type="submit"></input> {{ form }} </form> ``` and in your views, you need to access `request.FIL...
7,063,338
> > **Possible Duplicate:** > > [Click source in JavaScript and jQuery, human or automated?](https://stackoverflow.com/questions/6982072/click-source-in-javascript-and-jquery-human-or-automated) > > > How can you check if a .click() is an actual mouse click or you just are calling .click()?
2011/08/15
[ "https://Stackoverflow.com/questions/7063338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/555222/" ]
I don't think you can. But you can instead use a different event, like `mousedown`, but that could also be called manually as well. Why do you need to differentiate between code-triggered and user-triggered events?
Set the action for the click event to call a function with the argument isClick=1. When you call the same function otherwise, call it with isClick = 0.
546,130
Is energy in this relation is only kinetic energy of the related particle or total energy of related particle containing both kinetic and intrinsic ($m\_0c^2$) energies?
2020/04/23
[ "https://physics.stackexchange.com/questions/546130", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/118357/" ]
Only relative phases are meaningful in quantum mechanics, not absolute phases. In nonrelativistic quantum mechanics, we don't create or destroy particles, so including a mass just means multiplying *all* of our phases by the same factor $e^{kmt}$, where $k$ is a constant. This has no effect on the physics. For example,...
$$E=\hbar \omega=\frac{mc^2}{\sqrt{1-\beta^2}}$$ This is total energy. When it expanded in Taylor series in $\beta$, $E-mc^2$ is considered as the kinetic energy. $$ \hbar \omega=mc^2+E\_k $$
546,130
Is energy in this relation is only kinetic energy of the related particle or total energy of related particle containing both kinetic and intrinsic ($m\_0c^2$) energies?
2020/04/23
[ "https://physics.stackexchange.com/questions/546130", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/118357/" ]
$$E=\hbar \omega=\frac{mc^2}{\sqrt{1-\beta^2}}$$ This is total energy. When it expanded in Taylor series in $\beta$, $E-mc^2$ is considered as the kinetic energy. $$ \hbar \omega=mc^2+E\_k $$
for a massless particle it is the kinetic energy.
546,130
Is energy in this relation is only kinetic energy of the related particle or total energy of related particle containing both kinetic and intrinsic ($m\_0c^2$) energies?
2020/04/23
[ "https://physics.stackexchange.com/questions/546130", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/118357/" ]
Only relative phases are meaningful in quantum mechanics, not absolute phases. In nonrelativistic quantum mechanics, we don't create or destroy particles, so including a mass just means multiplying *all* of our phases by the same factor $e^{kmt}$, where $k$ is a constant. This has no effect on the physics. For example,...
for a massless particle it is the kinetic energy.
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
There is no way to "ignore" any type of character with regex. You can ignore letter case, but that's about it. Your best bet is to use `\s+` where you would expect some type of whitespace. The `\s` class will match any whitespace, including newlines, carriage returns, tabs, and spaces, and this will make your regex pa...
do you need the tab/newline? You could always just replace the tab/newline character with an empty character to remove them. ``` string mystring = "\t\nhi\t\n"; string mystring_notabs = mystring.Replace("\t",""); //remove tabs mystring = mystring_notabs.Replace("\n",""); //remove newline and copy back to original ...
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
If you just want that regex to match that input, all you need to do is specify Singleline mode: ``` Regex.Matches(input, @"\[CustomToken).*?(/\])", RegexOptions.Singleline); ``` The dot metacharacter normally matches any character except linefeed (`\n`). Singleline mode, also known as "dot-matches-all" or "DOTALL" m...
do you need the tab/newline? You could always just replace the tab/newline character with an empty character to remove them. ``` string mystring = "\t\nhi\t\n"; string mystring_notabs = mystring.Replace("\t",""); //remove tabs mystring = mystring_notabs.Replace("\n",""); //remove newline and copy back to original ...
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
do you need the tab/newline? You could always just replace the tab/newline character with an empty character to remove them. ``` string mystring = "\t\nhi\t\n"; string mystring_notabs = mystring.Replace("\t",""); //remove tabs mystring = mystring_notabs.Replace("\n",""); //remove newline and copy back to original ...
I had an issue with a multi-line XML value. I wanted the data within a description field, and I did not want to change my C# code to use the single line option, as I was dynamically reading regular expressions from a database for parsing. This solved my issue, particularly the (?s) at the front: ``` (?s)(?<=<descript...
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
If you just want that regex to match that input, all you need to do is specify Singleline mode: ``` Regex.Matches(input, @"\[CustomToken).*?(/\])", RegexOptions.Singleline); ``` The dot metacharacter normally matches any character except linefeed (`\n`). Singleline mode, also known as "dot-matches-all" or "DOTALL" m...
There is no way to "ignore" any type of character with regex. You can ignore letter case, but that's about it. Your best bet is to use `\s+` where you would expect some type of whitespace. The `\s` class will match any whitespace, including newlines, carriage returns, tabs, and spaces, and this will make your regex pa...
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
There is no way to "ignore" any type of character with regex. You can ignore letter case, but that's about it. Your best bet is to use `\s+` where you would expect some type of whitespace. The `\s` class will match any whitespace, including newlines, carriage returns, tabs, and spaces, and this will make your regex pa...
I had an issue with a multi-line XML value. I wanted the data within a description field, and I did not want to change my C# code to use the single line option, as I was dynamically reading regular expressions from a database for parsing. This solved my issue, particularly the (?s) at the front: ``` (?s)(?<=<descript...
4,654,006
Is there any way to completely ignore line break and tab characters etc. in RegEx? For instance, the line break and tab characters could be found anywhere and in any order in the content string. ``` ... [CustomToken \t \r\n Type="User" \t \r\n Property="FirstName" \n /] ... [CT ... ``` The is the RegularExpression ...
2011/01/11
[ "https://Stackoverflow.com/questions/4654006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76028/" ]
If you just want that regex to match that input, all you need to do is specify Singleline mode: ``` Regex.Matches(input, @"\[CustomToken).*?(/\])", RegexOptions.Singleline); ``` The dot metacharacter normally matches any character except linefeed (`\n`). Singleline mode, also known as "dot-matches-all" or "DOTALL" m...
I had an issue with a multi-line XML value. I wanted the data within a description field, and I did not want to change my C# code to use the single line option, as I was dynamically reading regular expressions from a database for parsing. This solved my issue, particularly the (?s) at the front: ``` (?s)(?<=<descript...
59,082,715
I have two table, **rates** and **criterias**. parent\_id in **criterias** refers to id in **rates**. I need to select the rates where **ALL** children rows in table criterias WHERE criteria\_1 AND criteria\_2 equal to NULL. In the example below, only flat rate should be selected rates ``` id | name --------...
2019/11/28
[ "https://Stackoverflow.com/questions/59082715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1709251/" ]
**this.props.array.map is not a function** occurs when you are trying to map something that is not **Array** ``` axios.get('/api/users') .then(results =>{ this.setState({ users: results.data }); }) ``` make sure `results.data` is **Array**
`map()` method is just for **Array** and i think that the results from api you call don't return an Array. So, `this.props.users` won't be an Array and it throws that Error. I recommend checking your called api (/api/users) and see what the result is. It should be an Array Hope it helps [More info on map method](htt...
59,082,715
I have two table, **rates** and **criterias**. parent\_id in **criterias** refers to id in **rates**. I need to select the rates where **ALL** children rows in table criterias WHERE criteria\_1 AND criteria\_2 equal to NULL. In the example below, only flat rate should be selected rates ``` id | name --------...
2019/11/28
[ "https://Stackoverflow.com/questions/59082715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1709251/" ]
**this.props.array.map is not a function** occurs when you are trying to map something that is not **Array** ``` axios.get('/api/users') .then(results =>{ this.setState({ users: results.data }); }) ``` make sure `results.data` is **Array**
You need to always validate your data as this will ensure that your app doesn't suddenly break. Use [Array.isArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray) to check if users is indeed an array. ``` render(){ return<> <h1>Users rendered</h1> {Arr...