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
13,368,452
I want to set an unsorted list as a "background". To do that, I have assigned it to be very wide so it matches whatever screen opens the page including 2560px width. But I can't make it center completely with CSS unless there is a trick or something. I am willing to go jquery way. Technically the ul will have the same ...
2012/11/13
[ "https://Stackoverflow.com/questions/13368452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004105/" ]
Is [this fiddle](http://jsfiddle.net/wpnFZ/) what you want? I think you didn't explain correctly when you said "background" CSS ``` ul{ list-style-type: none; margin: 0; position: relative; text-align: center; width: 100%; background:#FF0000; } ul li { display: inline-block; height: 6...
Are you looking to accomplish something like this? You can absolutely position the `<ul>` in the middle of the screen using `top: 50%;` as long as you set the `margin-top` to negative half the height of the `<ul>`. For instance, if the `<ul>` height is `100px`, you'll need to set the `margin-top: -50px;` along with `t...
13,368,452
I want to set an unsorted list as a "background". To do that, I have assigned it to be very wide so it matches whatever screen opens the page including 2560px width. But I can't make it center completely with CSS unless there is a trick or something. I am willing to go jquery way. Technically the ul will have the same ...
2012/11/13
[ "https://Stackoverflow.com/questions/13368452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004105/" ]
Is [this fiddle](http://jsfiddle.net/wpnFZ/) what you want? I think you didn't explain correctly when you said "background" CSS ``` ul{ list-style-type: none; margin: 0; position: relative; text-align: center; width: 100%; background:#FF0000; } ul li { display: inline-block; height: 6...
Just for FYI, the solution lies on display:block-inline. :) thanks for all your help
13,368,452
I want to set an unsorted list as a "background". To do that, I have assigned it to be very wide so it matches whatever screen opens the page including 2560px width. But I can't make it center completely with CSS unless there is a trick or something. I am willing to go jquery way. Technically the ul will have the same ...
2012/11/13
[ "https://Stackoverflow.com/questions/13368452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1004105/" ]
Are you looking to accomplish something like this? You can absolutely position the `<ul>` in the middle of the screen using `top: 50%;` as long as you set the `margin-top` to negative half the height of the `<ul>`. For instance, if the `<ul>` height is `100px`, you'll need to set the `margin-top: -50px;` along with `t...
Just for FYI, the solution lies on display:block-inline. :) thanks for all your help
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
* You can only post text from a form. * PHP doesn't care if a variable contains a string or a number, it will convert between them. * **PHP won't resolve text that looks like equations.** You could do something along the lines of: ``` function simple_fractions ($value) { if (is_numeric($value)) { retu...
Your two expressions: ``` $my_inverse=1/($_POST[inverse_num]); // array keys shall be quoted $my_inverse=1/(1/2); ``` Are actually: ``` $my_inverse=1/"1/2"; $my_inverse=1/(1/2); ``` Which does explain the outcome. If you were to send the string `0.5` instead, then PHP would process it as expected, btw.
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
* You can only post text from a form. * PHP doesn't care if a variable contains a string or a number, it will convert between them. * **PHP won't resolve text that looks like equations.** You could do something along the lines of: ``` function simple_fractions ($value) { if (is_numeric($value)) { retu...
What about posting decimals instead of fractions? e.g. 0.5
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
* You can only post text from a form. * PHP doesn't care if a variable contains a string or a number, it will convert between them. * **PHP won't resolve text that looks like equations.** You could do something along the lines of: ``` function simple_fractions ($value) { if (is_numeric($value)) { retu...
Quentin has a possible solution. However, another one is even better in my opinion: ``` <select name="inverse_num"> <option value="a">2 </option> <option value="b">1 </option> <option value="c">1/2 </option> <option value="d">1/3 </option> </select> ``` Then in your submission script: ``` if($_POST['inverse_num'] ...
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
Your two expressions: ``` $my_inverse=1/($_POST[inverse_num]); // array keys shall be quoted $my_inverse=1/(1/2); ``` Are actually: ``` $my_inverse=1/"1/2"; $my_inverse=1/(1/2); ``` Which does explain the outcome. If you were to send the string `0.5` instead, then PHP would process it as expected, btw.
What about posting decimals instead of fractions? e.g. 0.5
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
Your two expressions: ``` $my_inverse=1/($_POST[inverse_num]); // array keys shall be quoted $my_inverse=1/(1/2); ``` Are actually: ``` $my_inverse=1/"1/2"; $my_inverse=1/(1/2); ``` Which does explain the outcome. If you were to send the string `0.5` instead, then PHP would process it as expected, btw.
Quentin has a possible solution. However, another one is even better in my opinion: ``` <select name="inverse_num"> <option value="a">2 </option> <option value="b">1 </option> <option value="c">1/2 </option> <option value="d">1/3 </option> </select> ``` Then in your submission script: ``` if($_POST['inverse_num'] ...
7,808,035
I'm trying to get the inverse of the number thats POSTED from a form. ``` <select name="inverse_num"> <option value="2">2 </option> <option value="1">1 </option> <option value="1/2">1/2 </option> <option value="1/3">1/3 </option> </select> ``` In the php file which gets the value, say "1/2", ``` $my_inverse=1/($_PO...
2011/10/18
[ "https://Stackoverflow.com/questions/7808035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/996944/" ]
Quentin has a possible solution. However, another one is even better in my opinion: ``` <select name="inverse_num"> <option value="a">2 </option> <option value="b">1 </option> <option value="c">1/2 </option> <option value="d">1/3 </option> </select> ``` Then in your submission script: ``` if($_POST['inverse_num'] ...
What about posting decimals instead of fractions? e.g. 0.5
47,242,861
I have `ul` , i want to know number of any of these list items(For example: Tomatoe's number is 3). ``` <li>Apple</li> <li>Orange</li> <li>Tomato</li> <li>Potato</li> ``` How can i do this? UPD Also I am using vue js and v-for for list rendering. UPD2 What i really want it is a get array of numbers of active list...
2017/11/11
[ "https://Stackoverflow.com/questions/47242861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7804238/" ]
You can use `querySelectorAll()` to get the elements, and use `forEach()` to display the elements along with their indexes (numbers): ``` var list = document.getElementById("myList"); var elements = Array.from(list.querySelectorAll("li")); elements.forEach(function(li, index) { console.log(li.innerText + " is numbe...
You can find the index of any element, please check the example. ```js var findIndex = "Tomato"; $("ul li").each(function(index, item) { if($(item).text() == findIndex){ console.log("Index of " + findIndex + " is: " + (index + 1)); } }); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jque...
47,242,861
I have `ul` , i want to know number of any of these list items(For example: Tomatoe's number is 3). ``` <li>Apple</li> <li>Orange</li> <li>Tomato</li> <li>Potato</li> ``` How can i do this? UPD Also I am using vue js and v-for for list rendering. UPD2 What i really want it is a get array of numbers of active list...
2017/11/11
[ "https://Stackoverflow.com/questions/47242861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7804238/" ]
You can use `querySelectorAll()` to get the elements, and use `forEach()` to display the elements along with their indexes (numbers): ``` var list = document.getElementById("myList"); var elements = Array.from(list.querySelectorAll("li")); elements.forEach(function(li, index) { console.log(li.innerText + " is numbe...
In case you're trying to render the index in your `v-for` loop, you could use `v-for="(item, index) of items"` and then access `{{index}}`: ```js new Vue({ el: '#app', data() { return { items: [ 'Apple', 'Orange', 'Tomato', 'Potato' ], } } }) ``` ```html <script src="https://unpkg.com/vue@2.5.2"><...
47,242,861
I have `ul` , i want to know number of any of these list items(For example: Tomatoe's number is 3). ``` <li>Apple</li> <li>Orange</li> <li>Tomato</li> <li>Potato</li> ``` How can i do this? UPD Also I am using vue js and v-for for list rendering. UPD2 What i really want it is a get array of numbers of active list...
2017/11/11
[ "https://Stackoverflow.com/questions/47242861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7804238/" ]
You can use `querySelectorAll()` to get the elements, and use `forEach()` to display the elements along with their indexes (numbers): ``` var list = document.getElementById("myList"); var elements = Array.from(list.querySelectorAll("li")); elements.forEach(function(li, index) { console.log(li.innerText + " is numbe...
No need any javascript code. [v-for](https://v2.vuejs.org/v2/guide/list.html) can handle what you want. If you define your `v-for` like this: `<li v-for="(fruit, index) in fruits">`, `index` gives you the index number and you can print it out as `{{ index + 1 }}` [an example](https://v2.vuejs.org/v2/guide/list.html#e...
47,242,861
I have `ul` , i want to know number of any of these list items(For example: Tomatoe's number is 3). ``` <li>Apple</li> <li>Orange</li> <li>Tomato</li> <li>Potato</li> ``` How can i do this? UPD Also I am using vue js and v-for for list rendering. UPD2 What i really want it is a get array of numbers of active list...
2017/11/11
[ "https://Stackoverflow.com/questions/47242861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7804238/" ]
No need any javascript code. [v-for](https://v2.vuejs.org/v2/guide/list.html) can handle what you want. If you define your `v-for` like this: `<li v-for="(fruit, index) in fruits">`, `index` gives you the index number and you can print it out as `{{ index + 1 }}` [an example](https://v2.vuejs.org/v2/guide/list.html#e...
You can find the index of any element, please check the example. ```js var findIndex = "Tomato"; $("ul li").each(function(index, item) { if($(item).text() == findIndex){ console.log("Index of " + findIndex + " is: " + (index + 1)); } }); ``` ```html <script src="https://ajax.googleapis.com/ajax/libs/jque...
47,242,861
I have `ul` , i want to know number of any of these list items(For example: Tomatoe's number is 3). ``` <li>Apple</li> <li>Orange</li> <li>Tomato</li> <li>Potato</li> ``` How can i do this? UPD Also I am using vue js and v-for for list rendering. UPD2 What i really want it is a get array of numbers of active list...
2017/11/11
[ "https://Stackoverflow.com/questions/47242861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7804238/" ]
No need any javascript code. [v-for](https://v2.vuejs.org/v2/guide/list.html) can handle what you want. If you define your `v-for` like this: `<li v-for="(fruit, index) in fruits">`, `index` gives you the index number and you can print it out as `{{ index + 1 }}` [an example](https://v2.vuejs.org/v2/guide/list.html#e...
In case you're trying to render the index in your `v-for` loop, you could use `v-for="(item, index) of items"` and then access `{{index}}`: ```js new Vue({ el: '#app', data() { return { items: [ 'Apple', 'Orange', 'Tomato', 'Potato' ], } } }) ``` ```html <script src="https://unpkg.com/vue@2.5.2"><...
12,389
I live in Jacksonville, FL and my insurance premium went up by about $500/yr. I was told that the biggest reason was because my house isn't up to current code for hurricane/wind mitigation. I'm a fairly handy guy and was considering adding hurricane clips on my own. I will also need a new roof in the next few years and...
2012/02/21
[ "https://diy.stackexchange.com/questions/12389", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/2933/" ]
You neeed a permit for the roofing, and the Florida Building Code also requires you to re-nail the decking to code. There are several other items you need to address. Sealed Roof Deck, Roof to Wall Connections, Porch Column tie-downs, Gable Overhangs, gable Sheathing, and if you have vinyl soffits and ceilings, these a...
It's best to do the clips at the time of the new roof. Also have the decking renailed and install a Secondary Water Resistance (SWR) barrier. You need a permit for the roof only.
12,389
I live in Jacksonville, FL and my insurance premium went up by about $500/yr. I was told that the biggest reason was because my house isn't up to current code for hurricane/wind mitigation. I'm a fairly handy guy and was considering adding hurricane clips on my own. I will also need a new roof in the next few years and...
2012/02/21
[ "https://diy.stackexchange.com/questions/12389", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/2933/" ]
Had a new roof put on and the roofer informed me that I already had hurricane clips.
It's best to do the clips at the time of the new roof. Also have the decking renailed and install a Secondary Water Resistance (SWR) barrier. You need a permit for the roof only.
2,587,284
How would I be able to use the Drupal Fivestar voting module for voting on photos in a gallery without each photo being a separate node. I've used the Fivestar module for voting on seperate nodes, but making each photo in a gallery a node doeasn't seem logical.
2010/04/06
[ "https://Stackoverflow.com/questions/2587284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/183361/" ]
I'm afraid that there is no special exception for that. You will have to catch ADO NET exceptions and look on the inner exception text. IMHO your approach is not the more appropriate. You should query the DB in order to check BEFORE the insert if the data will violate the unique constraint. If it does, then you don't ...
You need to implement `ISQLExceptionConverter`. Check [Custom exception using NHibernate ISqlExceptionConverter](https://stackoverflow.com/questions/1524167/custom-exception-using-nhibernate-isqlexceptionconverter) and <http://fabiomaulo.blogspot.com/2009/06/improving-ado-exception-management-in.html> for examples.
25,830
I've just started learning assembly yesterday, and the first useful thing I've written is a `clearmem` function. I'm looking for general feedback regarding my coding of this function, whether there any flaws with it other than the obvious one of a user passing a value <= 0 to the `size` argument, or an invalid pointer...
2013/05/05
[ "https://codereview.stackexchange.com/questions/25830", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/12437/" ]
I can't say I particularly like this code as it is right now. It seems to me that there are two reasonable approaches: if you think most of what you zero will be in main memory, then you probably just want the most compact code possible for the job. If you think it'll be used to zero data that might be in the cache a n...
* The comments in the `clearmem` procedure for the Linux block look a bit confusing. You could just have a summary of the procedure commented above, and have the individual comments for each line specify the meaning of the assembly instructions. Specifically, the lines that describe the C++ code don't quite reflect on...
28,339,327
I was fixing some non-working css style and found that non-breaking space (\u00A0) is not allowed in the css declarations and having it breaks parsing. It breaks reliably in all browsers, so it seems that such behavior is expected. Does anybody know why it is so? [Fiddle here](http://jsfiddle.net/tma6ya51/) Text shoul...
2015/02/05
[ "https://Stackoverflow.com/questions/28339327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4531980/" ]
In CSS, U+00A0 NO-BREAK SPACE is not whitespace. Only ASCII spaces, tabs, line breaks and form feeds count as whitespace. From the [spec](http://www.w3.org/TR/CSS21/syndata.html): > > Only the characters "space" (U+0020), "tab" (U+0009), "line feed" (U+000A), "carriage return" (U+000D), and "form feed" (U+000C) can o...
That's because a non breaking space is a character like any other character. It *happens* to look like a space, but it's no different from "a" or "4" or "♥". ```js var css = document.createElement("style"); css.type = "text/css"; css.innerHTML = ".text\u00A0{ color: red}"; document.head.appendChild(css); ``` ```ht...
70,114,392
I have an input field with type number, my issue is when using Firefox and safari with Arabic keyboard the number are written ٨٦٥ like that, how can I convert this format to 8754 (English format) while the user typing in the filed? Or i prevent it from typing non English format.
2021/11/25
[ "https://Stackoverflow.com/questions/70114392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10659300/" ]
The following function will change the field key pressed value of the numbers 0123456789 to the Arabic-Eastern form "٠١٢٣٤٥٦٧٨٩". if you type 1 it will show ١, if you type 2 it will show ٢, and so on. It will not affect the other characters. It can be improved. ```js document.getElementById('myTextFieldId').addEve...
you can try this: ``` function arabicToLatinNumbers(arabicNumber){ let result = ""; const arabic1 = '١'.charCodeAt(0); const english1 = '1'.charCodeAt(0); for(i = 0; i < arabicNumber.length; i++){ result += String.fromCharCode(arabicNumber.charCodeAt(i) - arabic1 + english1); } return result; ...
50,993,705
We have a legacy Delphi 7 application that launches the Windows Defrag and On-screen Keyboard applications as follows: ``` // Defragmentation application ShellExecute(0, 'open', PChar('C:\Windows\System32\dfrg.msc'), nil, nil, SW_SHOWNORMAL); // On-screen keyboard ShellExecute(0, 'open', PChar('C:\Windows\System32\os...
2018/06/22
[ "https://Stackoverflow.com/questions/50993705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2377399/" ]
Delphi 7 produces only 32-bit apps, there is no option to produce 64-bit apps (that was added in XE2). Accessing a path under `%WINDIR%\System32` from a 32-bit app running on a 64-bit system is subject to WOW64's [File System Redirector](https://msdn.microsoft.com/en-us/library/windows/desktop/aa384187.aspx), which w...
A small addition to Remy Lebeau's answer: If `Wow64DisableWow64FsRedirection` is not available in your Delphi version, and/or if you are not sure if your target platform will support this API, you could use following code sample that calls the function dynamically: <https://www.delphipraxis.net/155861-windows-7-64bit...
20,243
How do I remove an event from My Events? I can't find the old "Remove This Event" link anymore. ![enter image description here](https://i.stack.imgur.com/Wx7LK.png)
2011/10/31
[ "https://webapps.stackexchange.com/questions/20243", "https://webapps.stackexchange.com", "https://webapps.stackexchange.com/users/8269/" ]
**To remove yourself from the guest list (as opposed to simply declining).** 1. Decline the event. 2. Go to the event page. 3. Bring up the guest list. (Click on "Going" "Maybe" or "Invited") 4. Switch the view to **Declined** using the drop-down. 5. Find your name. 6. Hover over your name and notice the X to the righ...
Facebook used to have a "Remove from my events" link at the sidebar of an event page. Now, you just say "Not attending" and it is removed from your list.
20,243
How do I remove an event from My Events? I can't find the old "Remove This Event" link anymore. ![enter image description here](https://i.stack.imgur.com/Wx7LK.png)
2011/10/31
[ "https://webapps.stackexchange.com/questions/20243", "https://webapps.stackexchange.com", "https://webapps.stackexchange.com/users/8269/" ]
**To remove yourself from the guest list (as opposed to simply declining).** 1. Decline the event. 2. Go to the event page. 3. Bring up the guest list. (Click on "Going" "Maybe" or "Invited") 4. Switch the view to **Declined** using the drop-down. 5. Find your name. 6. Hover over your name and notice the X to the righ...
Just discovered how to do it after coming here for help. Just go to the event and look for your name under "Invited"—there is the little `X` you can use to remove it from your events. You don't have to do all the declining, etc. first. This means you don't appear as *Declined* on the event, and don't receive all the n...
17,727,142
I have this error in a Component in Joomla That's my code (the error is in line 263): ``` <?php /** * @package Joomla.Platform * @subpackage Database * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LI...
2013/07/18
[ "https://Stackoverflow.com/questions/17727142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2596095/" ]
Function names must be unique in MATLAB. If they are not, so there are duplicate names, then MATLAB uses the first one it finds on your search path. Having said that, there are a few options open to you. Option 1. Use @ directories, putting each version in a separate directory. Essentially you are using the ability o...
EDIT: Old answer no longer good The run command won't work because its a function, not a script. Instead, your best approach would be honestly just figure out which of the functions need to be run, get the current dir, change it to the one your function is in, run it, and then change back to your start dir. This a...
17,727,142
I have this error in a Component in Joomla That's my code (the error is in line 263): ``` <?php /** * @package Joomla.Platform * @subpackage Database * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LI...
2013/07/18
[ "https://Stackoverflow.com/questions/17727142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2596095/" ]
Function names must be unique in MATLAB. If they are not, so there are duplicate names, then MATLAB uses the first one it finds on your search path. Having said that, there are a few options open to you. Option 1. Use @ directories, putting each version in a separate directory. Essentially you are using the ability o...
OK, so a messy answer, but it should do it. My test function was 'echo' ``` funcstr='echo'; % string representation of function Fs=which('-all',funcstr); for v=1:length(Fs) if (strcmp(Fs{v}(end-1:end),'.m')) % Don''t move built-ins, they will be shadowed anyway movefile(Fs{v},[Fs{v} '_BK']); end end f...
17,727,142
I have this error in a Component in Joomla That's my code (the error is in line 263): ``` <?php /** * @package Joomla.Platform * @subpackage Database * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LI...
2013/07/18
[ "https://Stackoverflow.com/questions/17727142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2596095/" ]
Function names must be unique in MATLAB. If they are not, so there are duplicate names, then MATLAB uses the first one it finds on your search path. Having said that, there are a few options open to you. Option 1. Use @ directories, putting each version in a separate directory. Essentially you are using the ability o...
You can also create a function handle for the shadowed function. The problem is that the first function is higher on the matlab path, but you can circumvent that by (temporarily) changing the current directory. Although it is not nice imo to change that current directory (actually I'd rather never change it while exec...
17,727,142
I have this error in a Component in Joomla That's my code (the error is in line 263): ``` <?php /** * @package Joomla.Platform * @subpackage Database * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LI...
2013/07/18
[ "https://Stackoverflow.com/questions/17727142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2596095/" ]
OK, so a messy answer, but it should do it. My test function was 'echo' ``` funcstr='echo'; % string representation of function Fs=which('-all',funcstr); for v=1:length(Fs) if (strcmp(Fs{v}(end-1:end),'.m')) % Don''t move built-ins, they will be shadowed anyway movefile(Fs{v},[Fs{v} '_BK']); end end f...
EDIT: Old answer no longer good The run command won't work because its a function, not a script. Instead, your best approach would be honestly just figure out which of the functions need to be run, get the current dir, change it to the one your function is in, run it, and then change back to your start dir. This a...
17,727,142
I have this error in a Component in Joomla That's my code (the error is in line 263): ``` <?php /** * @package Joomla.Platform * @subpackage Database * * @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. * @license GNU General Public License version 2 or later; see LI...
2013/07/18
[ "https://Stackoverflow.com/questions/17727142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2596095/" ]
You can also create a function handle for the shadowed function. The problem is that the first function is higher on the matlab path, but you can circumvent that by (temporarily) changing the current directory. Although it is not nice imo to change that current directory (actually I'd rather never change it while exec...
EDIT: Old answer no longer good The run command won't work because its a function, not a script. Instead, your best approach would be honestly just figure out which of the functions need to be run, get the current dir, change it to the one your function is in, run it, and then change back to your start dir. This a...
16,760,369
Is it possible to change the top image on a wizard form depending on the wizard form. I can change the left side image but would like to change the top (small image). ```pascal procedure CurPageChanged(CurPageID: Integer); begin if CurPageID = 4 then filename:= 'babylontoolbar.bmp' else filename:= 'label2-c...
2013/05/26
[ "https://Stackoverflow.com/questions/16760369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2047180/" ]
The [`WizardSmallImageFile`](http://jrsoftware.org/ishelp/topic_setup_wizardsmallimagefile.htm) directive is mapped to the [`WizardSmallBitmapImage`](http://jrsoftware.org/ishelp/topic_scriptclasses.htm#TWizardForm) control of the `WizardForm`, so in code you can access it this way (anyway, do not hardcode page ID numb...
Once again TLama has the answers, just have to keep googling. For those trying to do something similar to this and having problems finding the answer check out [Skipping custom pages based on optional components in Inno Setup](https://stackoverflow.com/questions/13921535/skipping-custom-pages-based-on-optional-componen...
47,163,679
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the texttabs dont get any data, The REST API Documentation <https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request> says: that the row field is the "Spec...
2017/11/07
[ "https://Stackoverflow.com/questions/47163679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8901551/" ]
Move your return out and just return the array ```js function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= 10; i++) { fib[i] = fib[i - 2] + fib[i - 1]; } return fib; } alert(fibonacci()); ```
You want to make sure you dont return from the function inside the loop. Move the return line outside the loop but still within the function. ```js function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= ...
47,163,679
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the texttabs dont get any data, The REST API Documentation <https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request> says: that the row field is the "Spec...
2017/11/07
[ "https://Stackoverflow.com/questions/47163679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8901551/" ]
Also, you can minimise the code and do something like: ```js function fibonacci() { for (var n = [0, 1], r = 2; r <= 10; r++) n[r] = n[r - 2] + n[r - 1]; return n } console.log(fibonacci()); ```
Move your return out and just return the array ```js function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= 10; i++) { fib[i] = fib[i - 2] + fib[i - 1]; } return fib; } alert(fibonacci()); ```
47,163,679
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the texttabs dont get any data, The REST API Documentation <https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request> says: that the row field is the "Spec...
2017/11/07
[ "https://Stackoverflow.com/questions/47163679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8901551/" ]
Also, you can minimise the code and do something like: ```js function fibonacci() { for (var n = [0, 1], r = 2; r <= 10; r++) n[r] = n[r - 2] + n[r - 1]; return n } console.log(fibonacci()); ```
You want to make sure you dont return from the function inside the loop. Move the return line outside the loop but still within the function. ```js function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= ...
47,163,679
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the texttabs dont get any data, The REST API Documentation <https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request> says: that the row field is the "Spec...
2017/11/07
[ "https://Stackoverflow.com/questions/47163679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8901551/" ]
``` function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= 10; i++) { fib[i] = fib[i - 2] + fib[i - 1]; } return (fib); } alert(fibonacci()); ```
You want to make sure you dont return from the function inside the loop. Move the return line outside the loop but still within the function. ```js function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= ...
47,163,679
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the texttabs dont get any data, The REST API Documentation <https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request> says: that the row field is the "Spec...
2017/11/07
[ "https://Stackoverflow.com/questions/47163679", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8901551/" ]
Also, you can minimise the code and do something like: ```js function fibonacci() { for (var n = [0, 1], r = 2; r <= 10; r++) n[r] = n[r - 2] + n[r - 1]; return n } console.log(fibonacci()); ```
``` function fibonacci() { var i; var fib = []; fib[0] = 0; fib[1] = 1; for (i = 2; i <= 10; i++) { fib[i] = fib[i - 2] + fib[i - 1]; } return (fib); } alert(fibonacci()); ```
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
Since the method returns an int, not a string, it adds the numbers, not concatenates as characters/strings. ie ``` 0+1+0+0+0+0+0+0+1+0+0+1+0+0+0+0+0+0+1+0 == 4 ``` not ``` "0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0"+"0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0" == "01000000100100000010" ``` below returns an int, since cou...
``` (s.charAt(0) == ' ' ? 1 : 0) + countspaces(s.substring(1)) ``` This one basically sums up the `0`s and `1`s. Take note of the return value of the method which is an `int`. The return value of `4` is perfectly fine. To put in other words: > > 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + ...
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
``` (s.charAt(0) == ' ' ? 1 : 0) + countspaces(s.substring(1)) ``` This one basically sums up the `0`s and `1`s. Take note of the return value of the method which is an `int`. The return value of `4` is perfectly fine. To put in other words: > > 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + ...
Here's an attempt to write the function in "English" in case that helps you understand it: ``` int countspaces( string ) { if string has no characters { return 0 } else { if first character in string is a space add 1 otherwise add 0 to result of count...
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
``` (s.charAt(0) == ' ' ? 1 : 0) + countspaces(s.substring(1)) ``` This one basically sums up the `0`s and `1`s. Take note of the return value of the method which is an `int`. The return value of `4` is perfectly fine. To put in other words: > > 0 + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + ...
The point of recursion is that the function is called over and over again, you could roughly say it's some sort of loop. ``` if (s.length() == 0) return 0; ``` This code is stopping condition (because the recursion stops at this point) of your recursive function, it will return 0 when the length of provided stri...
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
Since the method returns an int, not a string, it adds the numbers, not concatenates as characters/strings. ie ``` 0+1+0+0+0+0+0+0+1+0+0+1+0+0+0+0+0+0+1+0 == 4 ``` not ``` "0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0"+"0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0" == "01000000100100000010" ``` below returns an int, since cou...
Here's an attempt to write the function in "English" in case that helps you understand it: ``` int countspaces( string ) { if string has no characters { return 0 } else { if first character in string is a space add 1 otherwise add 0 to result of count...
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
Since the method returns an int, not a string, it adds the numbers, not concatenates as characters/strings. ie ``` 0+1+0+0+0+0+0+0+1+0+0+1+0+0+0+0+0+0+1+0 == 4 ``` not ``` "0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0"+"0"+"1"+"0"+"0"+"0"+"0"+"0"+"0"+"1"+"0" == "01000000100100000010" ``` below returns an int, since cou...
The point of recursion is that the function is called over and over again, you could roughly say it's some sort of loop. ``` if (s.length() == 0) return 0; ``` This code is stopping condition (because the recursion stops at this point) of your recursive function, it will return 0 when the length of provided stri...
23,869,016
I'm trying to fully understand how the method works, see the code below: ``` public static void main(String[] args) { System.out.println(countspaces("a number of spaces ")); } public static int countspaces(String s) { if (s.length() == 0) return 0; else return (s.charAt(0) == ' ' ? 1 : 0) ...
2014/05/26
[ "https://Stackoverflow.com/questions/23869016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3274207/" ]
Here's an attempt to write the function in "English" in case that helps you understand it: ``` int countspaces( string ) { if string has no characters { return 0 } else { if first character in string is a space add 1 otherwise add 0 to result of count...
The point of recursion is that the function is called over and over again, you could roughly say it's some sort of loop. ``` if (s.length() == 0) return 0; ``` This code is stopping condition (because the recursion stops at this point) of your recursive function, it will return 0 when the length of provided stri...
66,419,484
Is there any list of sample utterances to the google smart home device types/traits? Since, google smarthome action device types/traits are pre-built, It's terrible not stating some sample utterances under each device type/trait in the google action developer documentation. Otherwise, developer has no clue what are sup...
2021/03/01
[ "https://Stackoverflow.com/questions/66419484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8886366/" ]
> > he compiler suggests that `let &x = &foo` moves the string hello, which I'm aware of and don't see where the problem is > > > The problem is that you've given the compiler an immutable reference to a variable (`&foo`) and then asked it to move away the underlying data. Which is not an operation that is permitt...
``` fn pattern_matching_3() { let foo = String::from("hello"); let x = foo; println!("{}", x); } ``` This works because `foo` is moved into `x`, so `foo` is no longer a usable variable. It's ok to move data from the variable that owns it, as long as that variable is never used again. ``` fn pattern_match...
45,072,531
I am building a console application which runs on timer, it is a scheduler SMS sending application the methods are included in main method. How can i make sure that user can't input any character so that the application continues until the machine stops. Together i want to view the Information regarding the execution o...
2017/07/13
[ "https://Stackoverflow.com/questions/45072531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'd suggest building a Windows Service for this purpose, you can ensure it will start (if desired) on machine startup and will run in the background. You can log information to log files, the Event log etc. to ensure everything is working correctly. Visual Studio has templates for services that make is very easy to bu...
Reference this answer <https://stackoverflow.com/a/32532767/6611487> ``` class Writer { public void WriteLine(string myText) { for (int i = 0; i < myText.Length; i++) { if (Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Enter) { Console.Write(myText.Substring(i, m...
45,072,531
I am building a console application which runs on timer, it is a scheduler SMS sending application the methods are included in main method. How can i make sure that user can't input any character so that the application continues until the machine stops. Together i want to view the Information regarding the execution o...
2017/07/13
[ "https://Stackoverflow.com/questions/45072531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
There are two solutions of this problem. 1. When you want something to run continuously you should create windows service. 2. if you want to change your existing code then try following code. I have added while loop. ``` public class Program { private const int MF_BYCOMMAND = 0x00000000; publi...
Reference this answer <https://stackoverflow.com/a/32532767/6611487> ``` class Writer { public void WriteLine(string myText) { for (int i = 0; i < myText.Length; i++) { if (Console.KeyAvailable && Console.ReadKey(true).Key == ConsoleKey.Enter) { Console.Write(myText.Substring(i, m...
27,108
> > Hallo Steffi, wie geht es dir heute? > > > Fein, und dir? > > > Sehr gut, danke. > > > Kann man *fein* in diesem Kontext verwenden?
2015/12/11
[ "https://german.stackexchange.com/questions/27108", "https://german.stackexchange.com", "https://german.stackexchange.com/users/3480/" ]
**Ja**, man kann auch mit *fein* antworten. Fein ist einerseits das Gegenteil von grob, wie in *fein gemahlenes Mehl, feiner Zucker, feine Handarbeit, feiner Humor, feinste Brüsseler Spitze* aber ist wohl, weil so oft ein Qualitätsmerkmal, auch als allgemeines Wort für *gut* auf Bereiche adaptiert worden, in denen es...
**Nein**. Ich habe es noch nie in diesem Zusammenhang gehört. Es klingt als würde jemand versuchen das englische "fine" einzudeutschen. Wenn "fein" im Sinn von "gut" verwendet wird, passiert das meist bezogen auf Qualität (fein gemacht, feine Handwerksarbeit, ...) im Gegensatz zu grob/schlecht ausgeführter Arbeit. Ni...
27,108
> > Hallo Steffi, wie geht es dir heute? > > > Fein, und dir? > > > Sehr gut, danke. > > > Kann man *fein* in diesem Kontext verwenden?
2015/12/11
[ "https://german.stackexchange.com/questions/27108", "https://german.stackexchange.com", "https://german.stackexchange.com/users/3480/" ]
Das ist möglicherweise auch örtlich bedingt, aber wenn ich es höre kommt es komisch rüber. Also keiner wird sich beschweren und alle werden es verstehen, aber es ist eher ungewöhnlich.
**Nein**. Ich habe es noch nie in diesem Zusammenhang gehört. Es klingt als würde jemand versuchen das englische "fine" einzudeutschen. Wenn "fein" im Sinn von "gut" verwendet wird, passiert das meist bezogen auf Qualität (fein gemacht, feine Handwerksarbeit, ...) im Gegensatz zu grob/schlecht ausgeführter Arbeit. Ni...
6,000,030
I have an object which contains 7 items. ``` $obj.gettype().name Object[] $obj.length 7 ``` I want to loop through in batches of 3. I do NOT want to use the modulus function, I actually want to be able to create a new object with just the 3 items from that batch. Pseudo code: ``` $j=0 $k=1 for($i=0;$i<$obj.length;...
2011/05/14
[ "https://Stackoverflow.com/questions/6000030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/737490/" ]
Your pseudo code is almost real. I have just changed its syntax and used the range operator (`..`): ``` # demo input (btw, also uses ..) $obj = 1..7 $k = 1 for($i = 0; $i -lt $obj.Length; $i += 3) { # end index $j = $i + 2 if ($j -ge $obj.Length) { $j = $obj.Length - 1 } # create tmpObj ...
See if this one may work as required (I assume your *item n* is an element of `$obj`) ``` $obj | % {$i=0;$j=0;$batches=@{}} if($i!=3 and $batches["Batch $j"]) { $batches["Batch $j"]+=$_; $i+=1 } else {$i=1;$j+=1;$batches["Batch $j"]=@($_)} } {$batches} ``` Should return an HashTable (`$batches`) with keys such as...
51,175,514
I am importing value from store ``` import {store} from '../../store/store' ``` and I have Variable:- ``` let Data = { textType: '', textData: null }; ``` When i use `console.log(store.state.testData)` Getting Below result in console:- ``` {__ob__: Observer} counters:Array(4) testCounters:Array(0) __ob__:O...
2018/07/04
[ "https://Stackoverflow.com/questions/51175514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6590125/" ]
If I understand your question correctly, you're trying to access `store.state.testData.testCounters` once it's set. the way you could do that is to use a computed and a watch ``` computed: { testData() { return this.$store.state.testData; } }, watch: { testData: { immediate: true, ...
As it returns observable you should subscribe the store. ``` store.subscribe(res => { console.log(res) //all state values are available in payload }) ```
51,175,514
I am importing value from store ``` import {store} from '../../store/store' ``` and I have Variable:- ``` let Data = { textType: '', textData: null }; ``` When i use `console.log(store.state.testData)` Getting Below result in console:- ``` {__ob__: Observer} counters:Array(4) testCounters:Array(0) __ob__:O...
2018/07/04
[ "https://Stackoverflow.com/questions/51175514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6590125/" ]
If I understand your question correctly, you're trying to access `store.state.testData.testCounters` once it's set. the way you could do that is to use a computed and a watch ``` computed: { testData() { return this.$store.state.testData; } }, watch: { testData: { immediate: true, ...
This worked for me ``` computed: { audioPlayerStatus() { return this.$store.getters.loadedAudioPlayer; } }, watch: { '$store.state.loadedAudioPlayer.isTrackPlaying': function() { ... } }, ```
51,175,514
I am importing value from store ``` import {store} from '../../store/store' ``` and I have Variable:- ``` let Data = { textType: '', textData: null }; ``` When i use `console.log(store.state.testData)` Getting Below result in console:- ``` {__ob__: Observer} counters:Array(4) testCounters:Array(0) __ob__:O...
2018/07/04
[ "https://Stackoverflow.com/questions/51175514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6590125/" ]
As it returns observable you should subscribe the store. ``` store.subscribe(res => { console.log(res) //all state values are available in payload }) ```
This worked for me ``` computed: { audioPlayerStatus() { return this.$store.getters.loadedAudioPlayer; } }, watch: { '$store.state.loadedAudioPlayer.isTrackPlaying': function() { ... } }, ```
71,846,744
I have some recycler view code in a function that gets called several times as bluetooth devices are scanned. My code is working but I am wondering what unseen effects are occurring from having my recycler view initialization code in a function that gets repeated a lot? I eventually want to update the list rather than ...
2022/04/12
[ "https://Stackoverflow.com/questions/71846744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17987933/" ]
Setting a new adapter makes the `RecyclerView` reinitialise itself, and it'll create all the `ViewHolder`s again, etc. You'd want to avoid that really. This is generally how you'd make it update: ``` class CustomAdapter( private var data: List<Thing> ... ) { fun setData(data: List<Thing>) { // sto...
Setting the adapter multiple times should be avoided. Doing so causes its scroll position to be lost and reset to the top, and causes it to have to reinflate all of its views and ViewHolders. Instead, you should update the model your adapter points at and notifyDataSetChanged() on it (or better yet, use DiffUtil to upd...
71,846,744
I have some recycler view code in a function that gets called several times as bluetooth devices are scanned. My code is working but I am wondering what unseen effects are occurring from having my recycler view initialization code in a function that gets repeated a lot? I eventually want to update the list rather than ...
2022/04/12
[ "https://Stackoverflow.com/questions/71846744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17987933/" ]
Setting the adapter multiple times should be avoided. Doing so causes its scroll position to be lost and reset to the top, and causes it to have to reinflate all of its views and ViewHolders. Instead, you should update the model your adapter points at and notifyDataSetChanged() on it (or better yet, use DiffUtil to upd...
I finished updating my code and it works great! The data no longer jumps to the top when new data is added. Thought I would post the code for anyone who is interested. Here is my adapter: ``` class CustomAdapter( private val bluetoothManager: BluetoothManager ) : RecyclerView.Adapter<CustomAdapter.ViewHolder>...
71,846,744
I have some recycler view code in a function that gets called several times as bluetooth devices are scanned. My code is working but I am wondering what unseen effects are occurring from having my recycler view initialization code in a function that gets repeated a lot? I eventually want to update the list rather than ...
2022/04/12
[ "https://Stackoverflow.com/questions/71846744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17987933/" ]
Setting a new adapter makes the `RecyclerView` reinitialise itself, and it'll create all the `ViewHolder`s again, etc. You'd want to avoid that really. This is generally how you'd make it update: ``` class CustomAdapter( private var data: List<Thing> ... ) { fun setData(data: List<Thing>) { // sto...
I finished updating my code and it works great! The data no longer jumps to the top when new data is added. Thought I would post the code for anyone who is interested. Here is my adapter: ``` class CustomAdapter( private val bluetoothManager: BluetoothManager ) : RecyclerView.Adapter<CustomAdapter.ViewHolder>...
9,526,725
I am currently trying to create a program that takes two inputs a base and an exponent, so basically im going to ask for those two things for example if the user of Prolog inputs base 2 and exponent 3, I want it to return 8.., Here is what I got so far, and doesnt work: ``` base:- write('Input the base: '),read(X),exp...
2012/03/02
[ "https://Stackoverflow.com/questions/9526725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1187813/" ]
* You've defined `expo/2` (i.e. a predicate `expo` with two arguments), but you're calling `expo/1`. * The way you've split up your `read/1` calls into different predicates means `X` and `Y` are in different scopes; you'll never be able to call `expo(X,Y)` unless you put `read(X)` and `read(Y)` within the same rule. * ...
See [this question](https://stackoverflow.com/questions/8240952/rule-to-calculate-power-of-a-number-when-the-exponent-is-negative-in-prolog) to see how to implement pow correctly. For the input part, you might want to consider not to bother implementing it until your `pow/ 3` predicate works. To test this predicate, yo...
18,345,299
I'm working on making a walker in Wordpress. I saw some example code and it had the following syntax on one of it's lines: ``` !empty($item->attr_title) and $attributes .= ' title="'.esc_attr($item->attr_title).'"'; ``` What does this do? I would assume that if the object attributes are not empty it appends the titl...
2013/08/20
[ "https://Stackoverflow.com/questions/18345299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701495/" ]
That's a shorthand for: ``` if (!empty($item->attr_title)) { $attributes .= ' title="'.esc_attr($item->attr_title).'"'; } ```
This is an example of "[short-circuit evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation)". This is basically a short hand way of writing: ``` if(!empty($item->attr_title)) { $attributes .= ... } ``` It works because the boolean operation `and` stops evaluation if the first term is falsy. If it's...
18,345,299
I'm working on making a walker in Wordpress. I saw some example code and it had the following syntax on one of it's lines: ``` !empty($item->attr_title) and $attributes .= ' title="'.esc_attr($item->attr_title).'"'; ``` What does this do? I would assume that if the object attributes are not empty it appends the titl...
2013/08/20
[ "https://Stackoverflow.com/questions/18345299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701495/" ]
That's a shorthand for: ``` if (!empty($item->attr_title)) { $attributes .= ' title="'.esc_attr($item->attr_title).'"'; } ```
The `and` keyword (in this case the same as `&&`) checks if the condition left of it **and** the one right of it are true. There is an optimation that if the left hand condition is false the right hand one will not be checked or executed. So your code would be the same as: ``` if(!empty($item->attr_title) { $attri...
18,345,299
I'm working on making a walker in Wordpress. I saw some example code and it had the following syntax on one of it's lines: ``` !empty($item->attr_title) and $attributes .= ' title="'.esc_attr($item->attr_title).'"'; ``` What does this do? I would assume that if the object attributes are not empty it appends the titl...
2013/08/20
[ "https://Stackoverflow.com/questions/18345299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701495/" ]
PHP does short circuit evaluation of boolean expressions, that is, only as many terms are evaluated until the result is definite. ``` true and something() ``` will evaluate `something()` (the complete expression could still eval to false), whereas ``` false and something() ``` will stop evaluating after the `fals...
This is an example of "[short-circuit evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation)". This is basically a short hand way of writing: ``` if(!empty($item->attr_title)) { $attributes .= ... } ``` It works because the boolean operation `and` stops evaluation if the first term is falsy. If it's...
18,345,299
I'm working on making a walker in Wordpress. I saw some example code and it had the following syntax on one of it's lines: ``` !empty($item->attr_title) and $attributes .= ' title="'.esc_attr($item->attr_title).'"'; ``` What does this do? I would assume that if the object attributes are not empty it appends the titl...
2013/08/20
[ "https://Stackoverflow.com/questions/18345299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701495/" ]
PHP does short circuit evaluation of boolean expressions, that is, only as many terms are evaluated until the result is definite. ``` true and something() ``` will evaluate `something()` (the complete expression could still eval to false), whereas ``` false and something() ``` will stop evaluating after the `fals...
The `and` keyword (in this case the same as `&&`) checks if the condition left of it **and** the one right of it are true. There is an optimation that if the left hand condition is false the right hand one will not be checked or executed. So your code would be the same as: ``` if(!empty($item->attr_title) { $attri...
18,345,299
I'm working on making a walker in Wordpress. I saw some example code and it had the following syntax on one of it's lines: ``` !empty($item->attr_title) and $attributes .= ' title="'.esc_attr($item->attr_title).'"'; ``` What does this do? I would assume that if the object attributes are not empty it appends the titl...
2013/08/20
[ "https://Stackoverflow.com/questions/18345299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701495/" ]
This is an example of "[short-circuit evaluation](http://en.wikipedia.org/wiki/Short-circuit_evaluation)". This is basically a short hand way of writing: ``` if(!empty($item->attr_title)) { $attributes .= ... } ``` It works because the boolean operation `and` stops evaluation if the first term is falsy. If it's...
The `and` keyword (in this case the same as `&&`) checks if the condition left of it **and** the one right of it are true. There is an optimation that if the left hand condition is false the right hand one will not be checked or executed. So your code would be the same as: ``` if(!empty($item->attr_title) { $attri...
25,304,237
I am newbie at android , I am creating an application which I want login screen to appear on first use after installation of app , but I am not figuring out how to kill that activity , when user opens app again next time. I mean that I don't want login screen activity to appear again. I googled a lot but didn't got any...
2014/08/14
[ "https://Stackoverflow.com/questions/25304237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3884000/" ]
You're supposed to store data in the `SharedPreferences` ([How to use SharedPreferences in Android to store, fetch and edit values](https://stackoverflow.com/questions/3624280/how-to-use-sharedpreferences-in-android-to-store-fetch-and-edit-values)) that indicate for your application that you have already provided persi...
You will have to [save a value](http://developer.android.com/training/basics/data-storage/files.html) somewhere on your phone. On every start up, you have to check that value. If it is true, you launch the login screen and save the value as false. If it is false, you skip login screen. Another way to do it is to check ...
36,260,948
``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DOUBLE(20,10), mypercentage DOUBLE(25,20), Modifikation INT(10) UNSIGNED, ) ``` I get the error: Error creating table: You have an error in your SQL syntax; check the manual ...
2016/03/28
[ "https://Stackoverflow.com/questions/36260948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5751841/" ]
First, remove the comma at the end of the last column definition. Then, if you want to specify scale and precision, use `DECIMAL`: ``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DECIMAL(20,10), mypercentage DECIMAL(25,20), ...
Remove , from last column for fixing the query error. Here is correct syntax of query ``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DOUBLE(20,10), mypercentage DOUBLE(25,20), Modifikation INT(10) UNSIGNED ) ```
36,260,948
``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DOUBLE(20,10), mypercentage DOUBLE(25,20), Modifikation INT(10) UNSIGNED, ) ``` I get the error: Error creating table: You have an error in your SQL syntax; check the manual ...
2016/03/28
[ "https://Stackoverflow.com/questions/36260948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5751841/" ]
First, remove the comma at the end of the last column definition. Then, if you want to specify scale and precision, use `DECIMAL`: ``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DECIMAL(20,10), mypercentage DECIMAL(25,20), ...
Its all because of the comma before the ')'
36,260,948
``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DOUBLE(20,10), mypercentage DOUBLE(25,20), Modifikation INT(10) UNSIGNED, ) ``` I get the error: Error creating table: You have an error in your SQL syntax; check the manual ...
2016/03/28
[ "https://Stackoverflow.com/questions/36260948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5751841/" ]
First, remove the comma at the end of the last column definition. Then, if you want to specify scale and precision, use `DECIMAL`: ``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DECIMAL(20,10), mypercentage DECIMAL(25,20), ...
Here try this: ``` CREATE TABLE my_table ( Nr INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY, Datum TIMESTAMP, Name VARCHAR(20), Mymoney DOUBLE(20,10), mypercentage DOUBLE(25,20), Modifikation INT(10) UNSIGNED ); ```
31,210,485
Thanks for taking the time to read this SQL rookie's belated plea; it's much appreciated. I'm trying to run an update statement in Server Management Studio 2012 using code that I thought I'd used hundreds of times, but for some reason, it's throwing an error back at me. So maybe I haven't. I've been looking at this o...
2015/07/03
[ "https://Stackoverflow.com/questions/31210485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3805339/" ]
Reading the [react-router 0.13 -> 1.0 Upgrade Guide](https://github.com/rackt/react-router/blob/master/UPGRADE_GUIDE.md) and [this example](https://github.com/rackt/react-router/tree/master/examples/passing-props-to-children) led me to the following: ``` { this.props.children && React.cloneElement(this.props.chi...
The easy way is to just use `this.state`, but if you absolutely have to use `this.props` then you should probably extend `Router.createElement`. First add the `createElement` prop to your `Router` render. ```js React.render( <Router history={history} children={Routes} createElement={createElement} />, document.ge...
10,145,291
Currently, I'm stuck with some code like `fooA()` (don't mind the body) which expects a specific container, say `vector<double>`, as argument. ``` double fooA(std::vector<double> const& list) { return list[0]; } ``` Now, I want to generalize and use iterators instead: ``` template<typename InputIterator> double...
2012/04/13
[ "https://Stackoverflow.com/questions/10145291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1332092/" ]
For C++03: ``` #include <iterator> #include <boost/type_traits/is_same.hpp> #include <boost/type_traits/remove_cv.hpp> #include <boost/utility/enable_if.hpp> template<typename InputIterator> typename boost::enable_if< boost::is_same< typename boost::remove_cv< typename std::iterator_traits<Inp...
If you don't want to use Boost/C++11, you might be able to get away with this approach: ``` template<typename B, template<typename A1, typename B1> class Container> double fooB(typename Container<int, B>::iterator first, typename Container<int, B>::iterator last) { return 0; } ``` to call: ``` vector<int> a; f...
66,445,821
Let's take this object : ``` "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsum dolor sit amet" ``` I need to pass to every property, including elements of all arr...
2021/03/02
[ "https://Stackoverflow.com/questions/66445821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7246752/" ]
Like this? ```js function mapRec(x, fn) { if (Array.isArray(x)) return x.map(v => mapRec(v, fn)); if (x && typeof x === 'object') return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, mapRec(v, fn)])); return fn(x); } // obj = { "date": "1983-09-24", "values": [ ...
Use an algorithm that recursively iterates the object properties and call the `str.toUpperCase()` function to all strings found. Working example: ```js const input = { date: "1983-09-24", values: [{ shares: 500, accountType: 1, }, { options: { "hey": "this is a string" } ...
66,445,821
Let's take this object : ``` "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsum dolor sit amet" ``` I need to pass to every property, including elements of all arr...
2021/03/02
[ "https://Stackoverflow.com/questions/66445821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7246752/" ]
Like this? ```js function mapRec(x, fn) { if (Array.isArray(x)) return x.map(v => mapRec(v, fn)); if (x && typeof x === 'object') return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, mapRec(v, fn)])); return fn(x); } // obj = { "date": "1983-09-24", "values": [ ...
You can recursively call the function below if they incoming value is an array or the value is not a string. If it is a string, assign the value as the uppercase version. This modifies the object in-place. ```js const obj = { "date": "1983-09-24", "values": [{ "shares": 500, "accountType": 1, }, { "...
66,445,821
Let's take this object : ``` "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsum dolor sit amet" ``` I need to pass to every property, including elements of all arr...
2021/03/02
[ "https://Stackoverflow.com/questions/66445821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7246752/" ]
Like this? ```js function mapRec(x, fn) { if (Array.isArray(x)) return x.map(v => mapRec(v, fn)); if (x && typeof x === 'object') return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, mapRec(v, fn)])); return fn(x); } // obj = { "date": "1983-09-24", "values": [ ...
You could use reduce with a recursive transformation function to walk all the values: ```js const input = { "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsu...
66,445,821
Let's take this object : ``` "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsum dolor sit amet" ``` I need to pass to every property, including elements of all arr...
2021/03/02
[ "https://Stackoverflow.com/questions/66445821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7246752/" ]
Like this? ```js function mapRec(x, fn) { if (Array.isArray(x)) return x.map(v => mapRec(v, fn)); if (x && typeof x === 'object') return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, mapRec(v, fn)])); return fn(x); } // obj = { "date": "1983-09-24", "values": [ ...
here you go ``` let a = { "date": "1983-09-24", "values": [ { "shares": 500, "accountType": 1, }, { "options": { "hey": "this is a string" } } ], "comments": "Lorem ipsum dolor sit amet" } function upperAllProps(inObj){ for (const...
12,582,002
I'm trying to make a query like so: ``` UPDATE table1 SET col1 = 'foo', col2 = 'bar'; UPDATE table2 SET hi = 'bye', bye = 'hi'; ``` But when I go to save, Access errors with: > > Characters found after end of SQL statement > > > After some searching, it would appear this is because Access can only do one query...
2012/09/25
[ "https://Stackoverflow.com/questions/12582002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1563422/" ]
Where are you working? You can run multiple queries in VBA or via macros. Some examples: ``` CurrentDB.Execute "UPDATE table1 SET col1 = 'foo', col2 = 'bar';", dbFailOnError CurrentDB.Execute "UPDATE table2 SET hi = 'bye', bye = 'hi';", dbFailOnError ``` Saved query: ``` CurrentDb.Execute "Query5", dbFailOnError `...
I found this sample: [MS ACCESS 2007: UPDATE QUERY THAT UPDATES VALUES IN ONE TABLE WITH VALUES FROM ANOTHER TABLE](http://www.techonthenet.com/access/queries/update2_2007.php) uses the designer to create the query easily: ``` UPDATE Big INNER JOIN Bot ON Big.PART = Bot.PART SET Bot.MFG = [Big].[MFG]; ```
50,695,594
i wrote a program that saves 3 different positions of my sensor. I want the backroundcolor of my textboxes green if the Sensor is back in the saved position. Becaus the values are changing realy fast and precise i decided just to compare the first 3 values. So i started my program and saved a position by clicking. The ...
2018/06/05
[ "https://Stackoverflow.com/questions/50695594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9841493/" ]
I have made similar (not the same - you should understand not copy paste) situation for you. on button click I am creating 3 threads which are updating text of Textboxes (which were created in UI thread) ``` private void btnStart_Click(object sender, EventArgs e) { Thread t1 = new Thread(() => ThreadRunner(1)); ...
As Matthew has commented You have to write return statement after every BeginInvoke(). This code throws an exception because after Your method returns from BeginInvoke() it goes deeper into the code.
2,940,289
The question is: You own 6 songs by Adele, 4 by Katy Perry, and 5 by Lady Gaga. How many different playlists can you make that consist of 4 Adele songs, 3 Perry songs, and 2 Gaga songs, if you do allow repeated songs? One method I tried is 4^6 \* 3^4 \* 2^5. I also tried C(6,4) \* C(4,3) \* C(5\*2). Both of these a...
2018/10/03
[ "https://math.stackexchange.com/questions/2940289", "https://math.stackexchange.com", "https://math.stackexchange.com/users/594549/" ]
If you look only at the order of the artists being played, then there are $$\frac{9!}{4!3!2!} = \frac{362880}{24\*6\*2} = 1260$$ possible orderings. This is because there are $9$ songs, which would have $9!$ orderings if all songs were different, but for now we treat the the songs by each artist as the same so we divid...
For Adele there are $\binom{6}{4} = 15$ four song combinations where all songs are different plus $\binom{6}{3}\cdot 3 = 60$ where $2$ are the same, plus $\binom{6}{2} = 15$ where $2$ pairs are the same, plus $\binom{6}{2}\cdot 2 = 30$ where $3$ are the same and $6$ where all $4$ are the same. This makes a sequence of ...
3,439,291
Natural deduction has "natural" rules of deduction but has very "unnatural" and inpractical way of writing proofs as a trees. Is there some decently formalized way of writing natural deduction proofs that is useful in structuring everyday mathematical proofs?
2019/11/17
[ "https://math.stackexchange.com/questions/3439291", "https://math.stackexchange.com", "https://math.stackexchange.com/users/23730/" ]
What's unnatural about trees? They're an elegant way of capturing the structure of the proof: each node of the tree is labeled by a sentence and the deduction rule used to conclude that sentence, and the children of the node are the premises used by the rule. If you just want to be able to arrange your proof on paper ...
I find the [Fitch notation](https://en.wikipedia.org/wiki/Fitch_notation) that has very explicit subproof structures, and that have to be strictly nested inside each other to be most like 'natural' deduction. It certainly looks very different from [the Wikipedia page on Natural Deduction](https://en.wikipedia.org/wiki/...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
This sounds like a good time to take advantage of EFS (Encrypting File System). Any files encrypted using EFS will be inaccessible after the account password has been forcefully reset. <http://support.microsoft.com/kb/290260> Set up your browser so that it stores your profile in an encrypted directory, and you're goo...
For the particular example (saved passwords in a browser) I would recommend using the master password provided by Firefox. It encrypts the password cache. In KDE (and Gnome) there are tools like Wallet, which also provide a secure storage for credentials (e.g. for browser, mail app, chat client, etc) using a separate ...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
While I'd generally agree with the comments that if you can't trust your Domain Admins there is something that needs to be fixed in your environment I can see some good arguments for providing an additional layer of access control under some circumstances. In any case even if you are just being personally paranoid I w...
For the particular example (saved passwords in a browser) I would recommend using the master password provided by Firefox. It encrypts the password cache. In KDE (and Gnome) there are tools like Wallet, which also provide a secure storage for credentials (e.g. for browser, mail app, chat client, etc) using a separate ...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
If you can't trust the other domain admins then they shouldn't be domain admins, for the same reason that if you couldn't be trusted you shouldn't be one either. If someone were to change your password this would be logged, the person found and terminated (I'm assuming you have auditing enabled). Personally I wouldn'...
Another option for saving your password is using [this UPEK fingerprint reader](http://www.upek.com/solutions/eikon/default.asp) to remember them. It's not free but it's pretty cheap. You'll need to authenticate with your finger every time you want it to log you in to your saved websites. I've been using it for a coupl...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
While I'd generally agree with the comments that if you can't trust your Domain Admins there is something that needs to be fixed in your environment I can see some good arguments for providing an additional layer of access control under some circumstances. In any case even if you are just being personally paranoid I w...
Why would someone change your password without telling you? Is this something that has happened in the past?
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
This sounds like a good time to take advantage of EFS (Encrypting File System). Any files encrypted using EFS will be inaccessible after the account password has been forcefully reset. <http://support.microsoft.com/kb/290260> Set up your browser so that it stores your profile in an encrypted directory, and you're goo...
If you can't trust the other domain admins then they shouldn't be domain admins, for the same reason that if you couldn't be trusted you shouldn't be one either. If someone were to change your password this would be logged, the person found and terminated (I'm assuming you have auditing enabled). Personally I wouldn'...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
This sounds like a good time to take advantage of EFS (Encrypting File System). Any files encrypted using EFS will be inaccessible after the account password has been forcefully reset. <http://support.microsoft.com/kb/290260> Set up your browser so that it stores your profile in an encrypted directory, and you're goo...
If you are saving passwords in Internet Explore the passwords are encrypted against your logon password using [Protected Storage](http://msdn.microsoft.com/en-us/library/bb432403%28VS.85%29.aspx). If someone else changes your password they will not gain anything. (<http://support.microsoft.com/kb/290260>) If you are u...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
If you are saving passwords in Internet Explore the passwords are encrypted against your logon password using [Protected Storage](http://msdn.microsoft.com/en-us/library/bb432403%28VS.85%29.aspx). If someone else changes your password they will not gain anything. (<http://support.microsoft.com/kb/290260>) If you are u...
While I'd generally agree with the comments that if you can't trust your Domain Admins there is something that needs to be fixed in your environment I can see some good arguments for providing an additional layer of access control under some circumstances. In any case even if you are just being personally paranoid I w...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
This sounds like a good time to take advantage of EFS (Encrypting File System). Any files encrypted using EFS will be inaccessible after the account password has been forcefully reset. <http://support.microsoft.com/kb/290260> Set up your browser so that it stores your profile in an encrypted directory, and you're goo...
Another option for saving your password is using [this UPEK fingerprint reader](http://www.upek.com/solutions/eikon/default.asp) to remember them. It's not free but it's pretty cheap. You'll need to authenticate with your finger every time you want it to log you in to your saved websites. I've been using it for a coupl...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
If you are saving passwords in Internet Explore the passwords are encrypted against your logon password using [Protected Storage](http://msdn.microsoft.com/en-us/library/bb432403%28VS.85%29.aspx). If someone else changes your password they will not gain anything. (<http://support.microsoft.com/kb/290260>) If you are u...
Another option for saving your password is using [this UPEK fingerprint reader](http://www.upek.com/solutions/eikon/default.asp) to remember them. It's not free but it's pretty cheap. You'll need to authenticate with your finger every time you want it to log you in to your saved websites. I've been using it for a coupl...
74,316
Lets say you don't want anyone to be able to log into your windows profile. I like to save passwords in my web browser. However, I'm not the only one who has a domain admin account. Someone else can just reset the password in AD and then he/she would be able to log into my machine. How can I prevent this? Is t...
2009/10/14
[ "https://serverfault.com/questions/74316", "https://serverfault.com", "https://serverfault.com/users/4694/" ]
This sounds like a good time to take advantage of EFS (Encrypting File System). Any files encrypted using EFS will be inaccessible after the account password has been forcefully reset. <http://support.microsoft.com/kb/290260> Set up your browser so that it stores your profile in an encrypted directory, and you're goo...
Why would someone change your password without telling you? Is this something that has happened in the past?
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
From: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.innerhtml%28VS.80%29.aspx> Do not read from or assign a value to this property. Otherwise, a System.NotSupportedException exception is thrown. This property is inherited from the HtmlContainerControl class and is not applicable to the ...
A HtmlTable does have the InnerHtml property: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.aspx> You are missing a caps: ``` string resutlt=baseCalendar.innerHtml.Tostring(); // note innerHtml -> InnerHtml ``` However, even though it will compile, you must note that: > > ### Caut...
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
I hope you want the HTML code for the table you created which cannot be achieved by innerHTML those are valid in case of div, here you should rather use `RenderControl` something on these lines ``` StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); baseCalendar.RenderControl(htw) ```
A HtmlTable does have the InnerHtml property: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.aspx> You are missing a caps: ``` string resutlt=baseCalendar.innerHtml.Tostring(); // note innerHtml -> InnerHtml ``` However, even though it will compile, you must note that: > > ### Caut...
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
Here you have to use manually write a Table instead of using HtmlTable ``` string str = "<table>"; for (int i = 0; i < 6; i++) { str += "<tr><td style='color:red'>" + i.ToString() + "</td></tr>"; } str += "</table>"; m...
A HtmlTable does have the InnerHtml property: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.aspx> You are missing a caps: ``` string resutlt=baseCalendar.innerHtml.Tostring(); // note innerHtml -> InnerHtml ``` However, even though it will compile, you must note that: > > ### Caut...
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
I hope you want the HTML code for the table you created which cannot be achieved by innerHTML those are valid in case of div, here you should rather use `RenderControl` something on these lines ``` StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); baseCalendar.RenderControl(htw) ```
From: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.innerhtml%28VS.80%29.aspx> Do not read from or assign a value to this property. Otherwise, a System.NotSupportedException exception is thrown. This property is inherited from the HtmlContainerControl class and is not applicable to the ...
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
From: <http://msdn.microsoft.com/en-us/library/system.web.ui.htmlcontrols.htmltable.innerhtml%28VS.80%29.aspx> Do not read from or assign a value to this property. Otherwise, a System.NotSupportedException exception is thrown. This property is inherited from the HtmlContainerControl class and is not applicable to the ...
Here you have to use manually write a Table instead of using HtmlTable ``` string str = "<table>"; for (int i = 0; i < 6; i++) { str += "<tr><td style='color:red'>" + i.ToString() + "</td></tr>"; } str += "</table>"; m...
6,789,640
I want to create control, which uploads file to the server using JavaScript, with the following features 1. Drag drop support 2. Use only HTML and JavaScript(without any server side code)
2011/07/22
[ "https://Stackoverflow.com/questions/6789640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/207565/" ]
I hope you want the HTML code for the table you created which cannot be achieved by innerHTML those are valid in case of div, here you should rather use `RenderControl` something on these lines ``` StringWriter sw = new StringWriter(); HtmlTextWriter htw = new HtmlTextWriter(sw); baseCalendar.RenderControl(htw) ```
Here you have to use manually write a Table instead of using HtmlTable ``` string str = "<table>"; for (int i = 0; i < 6; i++) { str += "<tr><td style='color:red'>" + i.ToString() + "</td></tr>"; } str += "</table>"; m...
24,082
When using a yeast cake from another brew, is it possible to use too much? If so, what is the limit for a 5 gallon keg?
2019/04/03
[ "https://homebrew.stackexchange.com/questions/24082", "https://homebrew.stackexchange.com", "https://homebrew.stackexchange.com/users/17215/" ]
General advice is to use about a cup of slurry, but less would be fine depending on the beer. You don't want to use way too much, as a lot of the flavour compounds you're after occur during the growth phase, which you would truncate or skip by massively overpitching.
There is not really any hard and fast rule, I would say it depends on a number of factors. 1. Age of yeast cake 2. Gravity of last brew 3. how rapidly you want to get this one going In a professional setting you would check cell count, viability and a number of other factors. But unless you have stain and a microscop...
65,294
We have a small movie of iPhone screen . We would like to show that movie as if its inside an `iPhone` device. So i would like to take an iPhone image, and play the movie inside its screen. Using a `mac`, till now i just couldn't find any solution on how to do that . With `iMovie` it seems bad and very hard for editi...
2016/01/11
[ "https://graphicdesign.stackexchange.com/questions/65294", "https://graphicdesign.stackexchange.com", "https://graphicdesign.stackexchange.com/users/55698/" ]
Since you mention a simple solution, if you are preparing this for a presentation you could use Powerpoint or Keynote. Just: * Add a layer with the photo (cropped in the center if it goes on top) * Add [a layer with the video](http://www.wikihow.com/Embed-Video-in-PowerPoint) (cropped to the exact screen size if it ...
I wrote a How-to guide that explains how to play a YouTube video inside an iPhone frame, using AppDemoStore platform: [HOW TO: Play a YouTube Video Inside an iPhone Device Image](http://blog.appdemostore.com/2016/02/how-to-play-youtube-video-inside-iphone.html). The result looks like this: [Starbucks iPhone App Demo V...
20,125,403
Yes, it's [Euler problem 5](http://projecteuler.net/problem=5). I'm new to python and I'm trying to solve a couple of problems to get used to the syntax. And yes I know that there are other question regarding the same problem, but I have to know why my code is not working: ``` import sys def IsEvDivBy1to20(n): fo...
2013/11/21
[ "https://Stackoverflow.com/questions/20125403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1806838/" ]
`range()` by default starts at 0. The first time through your loop, then, `i` is 0: and so the first time through your (horribly-named) function, the values being compared against are 0.
Your code fails because, ``` range(sys.maxsize**10) ``` The first value returned by `range` is 0 and every number between 1 and 21 divides 0 without leaving any remainder. So, 0 is considered as the solution.
20,125,403
Yes, it's [Euler problem 5](http://projecteuler.net/problem=5). I'm new to python and I'm trying to solve a couple of problems to get used to the syntax. And yes I know that there are other question regarding the same problem, but I have to know why my code is not working: ``` import sys def IsEvDivBy1to20(n): fo...
2013/11/21
[ "https://Stackoverflow.com/questions/20125403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1806838/" ]
`range()` by default starts at 0. The first time through your loop, then, `i` is 0: and so the first time through your (horribly-named) function, the values being compared against are 0.
Also: Euler problems are not about brute forcing, it's also about finding an efficient solution. For example, if a number is evenly divisible by the numbers 1 - 20 you can simply multiply 1 \* 2 \* ... \* 20 = ... to find an upper bound. This number would clearly satisfy the conditions but it's likely not the smallest...
20,125,403
Yes, it's [Euler problem 5](http://projecteuler.net/problem=5). I'm new to python and I'm trying to solve a couple of problems to get used to the syntax. And yes I know that there are other question regarding the same problem, but I have to know why my code is not working: ``` import sys def IsEvDivBy1to20(n): fo...
2013/11/21
[ "https://Stackoverflow.com/questions/20125403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1806838/" ]
Your code fails because, ``` range(sys.maxsize**10) ``` The first value returned by `range` is 0 and every number between 1 and 21 divides 0 without leaving any remainder. So, 0 is considered as the solution.
Also: Euler problems are not about brute forcing, it's also about finding an efficient solution. For example, if a number is evenly divisible by the numbers 1 - 20 you can simply multiply 1 \* 2 \* ... \* 20 = ... to find an upper bound. This number would clearly satisfy the conditions but it's likely not the smallest...
56,480,837
I am looking for a way to get the output of the `cat()` command as a string (instead of having it printed to the screen). I thought that `paste()` would do this, but there are differences: ``` > cat("A", c(1,2,3), sep=",") A,1,2,3 > paste("A", c(1,2,3), sep=",") [1] "A,1" "A,2" "A,3" > paste("A", c(1,2,3), collapse=",...
2019/06/06
[ "https://Stackoverflow.com/questions/56480837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/648741/" ]
You might also adapt your current code: ``` paste(c("A", c(1,2,3)), collapse = ",") ↑↑ ↑ [1] "A,1,2,3" ```
If we specifically want to do this with `cat` (`How to get the output of cat as a string instead of printing it?`), then capture the output with `capture.output`. The `print/cat` returns `NULL` ``` capture.output(cat("A", c(1,2,3), sep=",")) #[1] "A,1,2,3" ``` If we want to get the output written, it has the option ...
47,899,714
The moment I place div2 within div1, div1 just drops by some random degree. Not sure what's going on here since I just placed div3 within div1 and it's working just fine. ```css .propertyOverview { height: 430px; width: 357px; margin-right: 10px; margin-top: 15px; background-color: white; ...
2017/12/20
[ "https://Stackoverflow.com/questions/47899714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9012921/" ]
Apply `vertical-align:top` for `inline-block` element, because the default alignment is baseline. It will resolve the issue. ``` .propertyOverview { height: 430px; width: 357px; margin-right: 10px; margin-top: 15px; background-color: white; display: inline-block; vertical-align:top; /* Added this ...
This might help you: ``` .propertyOverview{ height: 430px; width: 357px; margin-right: 10px; margin-top: 15px; background-color: white; display: inline-block; vertical-align:top; border: solid 1px #E8E8E8; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; } .pro...
19,079,687
I have written a HTML 5 application that uses AngularJS and interfaces with a Java REST backend running on Tomcat. I use Spring Security to handle login and security. When the user enters the website he is forwarded to a login page which creates a session and redirects to the index page. The REST calls that loads fur...
2013/09/29
[ "https://Stackoverflow.com/questions/19079687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/474034/" ]
I finally found the solution for this. As I mentioned in my update the reason is, that the response contains the `WWW-Authenticate` header field. My solution was then to change the configuration of spring security to return a different header: ``` WWW-Authenticate: FormBased ``` To do this I had to implement the `Au...
If you want to avoid changing the server and make it return `WWW-Authenticate` header for all other callers, you can change your client to send its request with `X-Requested-With` header with `XMLHttpRequest` value. By default, Spring Security will not to send `WWW-Authenticate` for such requests. (see [Spring source](...
17,172
What is the first example of a Western government passing a [sin or vice tax](http://en.wikipedia.org/wiki/Sin_tax) -- that is, a tax passed primarily to discourage consumption of certain goods due to moral, not economic, concerns? Protective tariffs and mercantilist policies therefore don't count. States have a long...
2014/11/19
[ "https://history.stackexchange.com/questions/17172", "https://history.stackexchange.com", "https://history.stackexchange.com/users/8341/" ]
Not sure they were the first laws primarily motivated by "moral outrage" but the the effects on the poor of cheap, low quality gin certainly was a factor in passing the British Gin Acts of 1736 and 1751 - cf Hogarth's Gin Lane and Beer Street. <http://en.m.wikipedia.org/wiki/Gin_Craze#Increased_Consumption_of_Gin>
The issuance of fines or taxes on luxury goods is part of the general phenomenon known as [**sumptuary laws**](https://en.wikipedia.org/wiki/Sumptuary_law). The Wikipedia article gives a good history. Also, note that [Roman censors](https://en.wikipedia.org/wiki/Roman_censor) had the power to fine anybody they thought ...
3,582,011
In natural deduction there is a rule that says given a contradiction you can assume p i.e., $\frac{\bot}{p}$. I know that is a case when you show the soundness of the natural deduction system. I tried to use induction to prove it. Here is my idea: Suppose that $\forall j<i, \alpha\_1, ...,\alpha\_n \models \gamma\_j ...
2020/03/15
[ "https://math.stackexchange.com/questions/3582011", "https://math.stackexchange.com", "https://math.stackexchange.com/users/711706/" ]
We can use a truth table to prove that for any logical propositions $A$ and $B$ (they need not be related in any way), we have: $A\land \neg A \implies B$. [![enter image description here](https://i.stack.imgur.com/aNHxI.png)](https://i.stack.imgur.com/aNHxI.png) Using a form of natural deduction, we have: [![enter...
Short answer : the inference rule holds because, from a semantic point of view , the conditional (contradictory antecedent) $\rightarrow$( whatever consequent ) is always a tautology. --- * Consider this reasoning. Premise 1 : P&Q Premise 2 : ~P Conclusion : R. Note that here, proposition R is chosen arbitra...
15,344,397
I am about to start developing a classified web application. but I am facing certain difficulties while building the DB design: User can post their advertisements under different types of pre-existing catagories (like Vehicles, Real Estate, Computers, Education etc). But each category have their certain specific fiel...
2013/03/11
[ "https://Stackoverflow.com/questions/15344397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1619751/" ]
I usually like classify these data into 2 groups (1) searchable data which will be saved in some column/mapped to column and (2) junk data( i call that additional\_info) saved in a text column in json\_encoded format. For searchable columns, you can add another table category\_values table, which has (category\_id, c...
I did something close to this Once. And I can see 2 options: Something you shouldn't do - Implement lots of tables for the required Goods (Houses, Cars, Bikes,..) which is not a very good idea because work would never end and it wouldn't be extensible. My suggestion: Add 3 more tables: CustomField (To set a list of...
23,891,491
I am trying to populate a spinner with data pulled from the web, which I have stored in an ArrayList. The trouble is, I tried to put the data in an ArrayAdapter, and then use that to populate the spinner. But my app keeps crashing, and the logcat is telling me that there's a null pointer exception at company.setAdapter...
2014/05/27
[ "https://Stackoverflow.com/questions/23891491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3323662/" ]
`LinkedListIterator iter = <some other LinkedListIterator>` is called *copy initialization* and calls a "hidden" constructor: the copy constructor (C++03) resp. move constructor (if present, and if the initializer is a temporary, in C++11). These two constructors are not provided in your code, yet they exist: They are ...
There's no compilation error because the constructor is called from (i.e. "the object is created in") the `LinkedList` class (in particular from its `begin()` member function), which is a `friend`. No one else can instantiate that class, so the second line fails. --- Specifically, looking at `begin()`: ``` inline Li...