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
57,977,960
I know it may seem like this question has already been asked, but I've tried searching and using the other answers for my example but for some reason, I can't seem to get it working. I have the text: ``` ['root(ROOT-0, love-2) s1', 'amod(perve-5, good-4) s2', 'advmod(love-2, thanks-12) s3', 'amod(mags-16, glo...
2019/09/17
[ "https://Stackoverflow.com/questions/57977960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11853514/" ]
You may use: ``` >>> test_str = (" ['root(ROOT-0, love-2) s1', 'amod(perve-5, good-4) s2',\n" ... " 'advmod(love-2, thanks-12) s3', 'amod(mags-16, glossy-15) s4']") >>> >>> print ( re.findall(r"amod\(([^-]*)-", test_str) ) ['perve', 'mags'] ``` [RegEx Demo](https://regex101.com/r/kBYGe8/1) **RegEx Details...
This seems to do the trick as regex : `(?<=amod\().+?(?=-)` [Regex demo](https://regex101.com/r/kNkz1j/2)
57,977,960
I know it may seem like this question has already been asked, but I've tried searching and using the other answers for my example but for some reason, I can't seem to get it working. I have the text: ``` ['root(ROOT-0, love-2) s1', 'amod(perve-5, good-4) s2', 'advmod(love-2, thanks-12) s3', 'amod(mags-16, glo...
2019/09/17
[ "https://Stackoverflow.com/questions/57977960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11853514/" ]
You may use: ``` >>> test_str = (" ['root(ROOT-0, love-2) s1', 'amod(perve-5, good-4) s2',\n" ... " 'advmod(love-2, thanks-12) s3', 'amod(mags-16, glossy-15) s4']") >>> >>> print ( re.findall(r"amod\(([^-]*)-", test_str) ) ['perve', 'mags'] ``` [RegEx Demo](https://regex101.com/r/kBYGe8/1) **RegEx Details...
When I want to find an arbitrary substring between two known substrings, I usually rely on a combination of a lookahead and lookbehind assertion. ```py for string in List: match = re.search(r'(?<=amod\()[^-]+(?=-)',string).group() print(match) ``` Note, that you have to use `[^-]` (everything except minus), ...
2,166,523
Let $A = \{1,2,3,4\}$ and $B = \{3,4,5,6\}$, and let $X = A\,\triangle\,B$, the symmetric difference of $A$ and $B$. Then A. $X = \emptyset$ B. $X = \{1,2\}$ C. $X = \{3,4\}$ D. $X = \{1,2,5,6\}$ I want to confirm if the answer is D, is it correct? Thanks
2017/03/01
[ "https://math.stackexchange.com/questions/2166523", "https://math.stackexchange.com", "https://math.stackexchange.com/users/413861/" ]
In order to avoid any confusion with edits, there are two common interpretations to what you were asking. With $A=\{1,2,3,4\}$ and $B=\{3,4,5,6\}$ *The symmetric difference of $B$ with the union of $A$ and $B$* * $(A\cup B)\triangle B = (\{1,2,3,4\}\cup \{3,4,5,6\})\triangle \{3,4,5,6\} = \{1,2,\color{red}{3},\color...
D is indeed correct, as $A \cup B = \{1,2,3,4,5,6\}$, $A \cap B = \{3,4\}$ and their difference is set D. It's also the set of elements that occur exactly once among the elements of $A$ and $B$
98,879
I have a brand new HP p6230y. My first step after booting it up was to install Master Collection. It installs fine, but when I go to run each of the applications, and they all behave differently. I have re-installed twice already. Photoshop opens, but freezes. Acrobat tells me that I need to reinstall. Nothing else ev...
2010/01/21
[ "https://superuser.com/questions/98879", "https://superuser.com", "https://superuser.com/users/21517/" ]
Tried XP mode? (I know, I know, less RAM in virtualized OS's) Try using "running as" as an older version of windows. (Right click> properties) Remember, these programs are only certified for 32-bit OS's. Also, before reinstalling, uninstall completely and clear the temporary files and low-level licensing files.
You may want to see this question: [Fireworks CS3 crashes when I try to open it on Windows 7](https://superuser.com/questions/70044/fireworks-cs3-crashes-when-i-try-to-open-it-on-windows-7) Additionally CS3 uses your graphics card to perform functions, might be worth ensuring you have the latest drivers in-case some ...
98,879
I have a brand new HP p6230y. My first step after booting it up was to install Master Collection. It installs fine, but when I go to run each of the applications, and they all behave differently. I have re-installed twice already. Photoshop opens, but freezes. Acrobat tells me that I need to reinstall. Nothing else ev...
2010/01/21
[ "https://superuser.com/questions/98879", "https://superuser.com", "https://superuser.com/users/21517/" ]
Did you update the programs after installation? There are several hundred megabytes of updates for CS3. After a round of updates, reboot, and then check for updates again. Repeat this process until all updates are installed. I have CS3 Design Premium on Windows 7 Pro (64-bit) and it seems to be running flawlessly sin...
You may want to see this question: [Fireworks CS3 crashes when I try to open it on Windows 7](https://superuser.com/questions/70044/fireworks-cs3-crashes-when-i-try-to-open-it-on-windows-7) Additionally CS3 uses your graphics card to perform functions, might be worth ensuring you have the latest drivers in-case some ...
13,387,706
I've seen several answers on this question on how to one can move the `model.tt` (which contains the POCO entity classes ) file to a separate project in Vs2010 This doesn't seem to work in EF5 and it seems like the reason is that the `model.tt` file is a subitem of the edmx file. How can I achieve the same in Entity...
2012/11/14
[ "https://Stackoverflow.com/questions/13387706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/695046/" ]
Best answer that I know of is to simply cut the model.tt (insert appropriate name) file from the current project and add it to the desired project. I have gone so far as to rewrite the .tt files that EF uses for exactly that reason. I am a fan of separation of concerns and put appropriate .tt files in the following p...
If you mean that the code is not generated it is a bug. This is the bug we use for tracking it <http://entityframework.codeplex.com/workitem/453> - it contains some workarounds. Another option is enforce code generation by right-clicking the tt file and selecting "Run Custom Tool"
1,662,379
What is the summation of the mathematical series $$\log n + \log \frac{n}{2} + \log\frac{n}{4} + \dotsb + \text{last term}?$$ and what is it called please? Thank you.
2016/02/19
[ "https://math.stackexchange.com/questions/1662379", "https://math.stackexchange.com", "https://math.stackexchange.com/users/298024/" ]
Assuming the sum is finite and using $\log(a)+\log(b) = \log(ab)$, we get $$\log(n)+\log(n/2)+\cdots+\log(n/2^k) = \log \left( \prod \_{j=0}^k \frac{n}{2^j} \right) = \log \left( \frac{n^{k+1}}{2^{1+2+\cdots +k}} \right).$$ Now use $$\sum\_{j=1}^k j = \frac{k(k+1)}{2}$$ to add up the powers of $2$.
$$\begin{align} \sum\_{\ell = 0 }^N\log(n/2^{\ell})&=\sum\_{\ell = 0 }^N(\log(n)-\ell \log(2))\\\\ &=(N+1)\log(n)-\frac{N(N+1)}{2}\log(2) \end{align}$$
73,445,021
I am trying to get the last sign in logs in the past 7 days in the azure runbook, I have tried this code: ``` $SetDate = (Get-Date).AddDays(-7); $SetDate = Get-Date($SetDate) -format yyyy-MM-dd $array = Get-AzureADAuditSignInLogs -Filter "createdDateTime gt $SetDate" | select userDisplayName, userPrincipalName, appDis...
2022/08/22
[ "https://Stackoverflow.com/questions/73445021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19584876/" ]
You can use recursion and `Array.reduce`,.. eg. ```js const data=[{id:1,children:[{id:2,children:[{id:3,children:[{id:4,children:[]},{id:5,children:[]}]},]},]},{id:8,children:[{id:9,children:[{id:10,children:[]},]},]},] function removeId(data, id) { return data.reduce((a,v) => { if (v.id !== id) a.push...
You can use a combination of `JSON.parse` and `JSON.stringify` to reach each node of the object: ``` JSON.parse(JSON.stringify(data, (key, value) => { // If children is an array and it contains an id equal to 3, we filter out that child if (key === 'children' && value instanceof Array) return value.filter(x=>x.i...
71,144
``` מַגִּ֤יד מֵֽרֵאשִׁית֙ אַחֲרִ֔ית וּמִקֶּ֖דֶם אֲשֶׁ֣ר לֹא־נַעֲשׂ֑וּ אֹמֵר֙ עֲצָתִ֣י תָק֔וּם וְכָל־חֶפְצִ֖י אֶעֱשֶֽׂה׃ (Isa. 46:10, MT) ``` מֵֽרֵאשִׁית֙ - from the beginning -- בְּרֵאשִׁ֖ית -- in the beginning (Gen. 1:1) וּמִקֶּ֖דֶם - and from ancient times -- מִקֶּ֗דֶם -- from everlast...
2021/11/14
[ "https://hermeneutics.stackexchange.com/questions/71144", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/22715/" ]
Isa. 46: > > 10a declaring the end from the beginning > > and from ancient times things not yet done, > > > This is an incredible statement. Only God can say it truthfully in the absolute sense. It shows the speaker of a being standing outside of the space-time dimensions. He saw the totality of the 4-dimensio...
While Isa. 46:10 does not specifically reference the beginning of time and end of time, it implies God's attributes are such that he created the totality of time as well as matter at creation. You are so right that God did create time as part of creation. God did make periods of time called ages. He made them through...
51,940
I am curious of what role electrical current plays in a processor. When I asked this back in school a couple years ago, my teacher only replied that the processor executes instructions in response to a series of 0:s and 1:s. However, I cannot grasp how something as seemingly random and unpredictable as an electrical cu...
2012/12/21
[ "https://electronics.stackexchange.com/questions/51940", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/17151/" ]
Simply put, current is used to charge capacitors to a given voltage. It is then this voltage that is representative of a "1" or a "0". The voltage is the state, the current is the juice that gets you to that state. THis applies to CMOS processors, but since there are few other kinds around this is probably general enou...
The processor will do its job by taking the binaries (0's and 1's) in the electrical current to assembly language, and execute the instructions needed.
54,639,564
[![Main screen showing the problem](https://i.stack.imgur.com/JrhD2.png)](https://i.stack.imgur.com/JrhD2.png)[![At a certain screen size they just change height and don't stack](https://i.stack.imgur.com/W12DB.png)](https://i.stack.imgur.com/W12DB.png)I have placed two jumbotrons side-by-side using auto layout columns...
2019/02/11
[ "https://Stackoverflow.com/questions/54639564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11008907/" ]
Assuming that your two files are sorted by DATE then just MERGE them. ``` data want; merge A B ; by date; run; ``` PS Don't use two digit years. Remember Y2K.
Write a Proc Sql. ``` proc sql; create table DesiredTable as select * From TableA a Full join TableB b on a.Date = b.Date; quit; ```
4,834,115
Is it possible to use a custom WSDL with a .NET WebService? I would like to use a custom WSDL with my .NET WebService instead of the one generated by .NET as part of my WebService.
2011/01/28
[ "https://Stackoverflow.com/questions/4834115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192508/" ]
Actually there is a way to do this: You can create your own WSDL (i.e. removing methods you don't want to publish) and then make it available at a dedicated spot, this allows users to bind to it as normal. To prevent users from just retrieving the default WSDL (`foo.asmx?wsdl`) you have to flip a switch in the web.co...
I presume that what you want is to replace the file generated by .NET when your service is hit with the "?wsdl" query string on it. No, there is no direct way to do this. Instead, simply place your .wsdl on a web site, and tell the consumers of your service to get it from there. There is no standard saying that "?wsdl...
23,330,970
I am trying to fade out a clicked `ul` element. Here is the thing, I have multiple `ul` elements that contain the same class name for when selecting. To handle that I am phasing out a `id` for each specific `ul` to know which element to fade out. My issue is though, when trying to fade out the `ul` element. Nothing hap...
2014/04/28
[ "https://Stackoverflow.com/questions/23330970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3428077/" ]
Don't use its selector, just use the element object: ``` $(".start-dropdownClose").click(function(event){ event.stopPropagation(); $(this).parent().parent().fadeOut(); }); ```
Try these two approaches: ``` $(".start-dropdownClose").click(function(event){ event.stopPropagation(); $thisOne = $(this).parent().parent(); $thisOne.fadeOut(); }); ``` or ``` $(".start-dropdownClose").click(function(event){ event.stopPropagation(); $thisOne = $($(this).parent()....
67,835,845
CODE: ``` import textwrap def wrap(string, max_width): m=0 x=[] wrapper = textwrap.TextWrapper(width=max_width) word_list = wrapper.wrap(text=string) for element in word_list: print(element) if __name__ == '__main__': string, max_width = input(), int(input()) result = wrap(string,...
2021/06/04
[ "https://Stackoverflow.com/questions/67835845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14352685/" ]
The problem with your benchmark, you testing different logic code: `2 ^ (integer value)` and `2 ^ (float value)` But the most crucial part, if `a` and `b` is not defined before the loop, Julia compiler may remove the block. Your performance very much depends was the `a` and `b` defined before and were defined in the ...
This is benchmarking problem. The `@time` macro is not suitable for microbenchmarks. Use the BenchmarkTools.jl package, and read the user manual. It is easy to make mistakes when benchmarking. Here's how to do it: ``` jl> using BenchmarkTools jl> @btime 2^(positive(-n) + 1) setup=(n=rand(1:10^8)) 6.507 ns (0 alloc...
67,835,845
CODE: ``` import textwrap def wrap(string, max_width): m=0 x=[] wrapper = textwrap.TextWrapper(width=max_width) word_list = wrapper.wrap(text=string) for element in word_list: print(element) if __name__ == '__main__': string, max_width = input(), int(input()) result = wrap(string,...
2021/06/04
[ "https://Stackoverflow.com/questions/67835845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14352685/" ]
This is benchmarking problem. The `@time` macro is not suitable for microbenchmarks. Use the BenchmarkTools.jl package, and read the user manual. It is easy to make mistakes when benchmarking. Here's how to do it: ``` jl> using BenchmarkTools jl> @btime 2^(positive(-n) + 1) setup=(n=rand(1:10^8)) 6.507 ns (0 alloc...
The problem, as Vitaliy said, is that powers in floating point done with logs can be faster than the integer ones that can be done as loop multiplies: ``` using BenchmarkTools # type-unstable vs type-unstable # type-unstable function positive_float_unstable(x) if x < 0 return 0.0 else return x...
67,835,845
CODE: ``` import textwrap def wrap(string, max_width): m=0 x=[] wrapper = textwrap.TextWrapper(width=max_width) word_list = wrapper.wrap(text=string) for element in word_list: print(element) if __name__ == '__main__': string, max_width = input(), int(input()) result = wrap(string,...
2021/06/04
[ "https://Stackoverflow.com/questions/67835845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14352685/" ]
The problem with your benchmark, you testing different logic code: `2 ^ (integer value)` and `2 ^ (float value)` But the most crucial part, if `a` and `b` is not defined before the loop, Julia compiler may remove the block. Your performance very much depends was the `a` and `b` defined before and were defined in the ...
The problem, as Vitaliy said, is that powers in floating point done with logs can be faster than the integer ones that can be done as loop multiplies: ``` using BenchmarkTools # type-unstable vs type-unstable # type-unstable function positive_float_unstable(x) if x < 0 return 0.0 else return x...
487,081
I am restoring a Japanese Teisco mixing amplifier from the 1970s. It's a solid state 5-channel mixer with 16ohm speaker outs and a line out. Amongst other problems, I have discovered a couple of the bridge rectifier diodes have shorted out. Here is a photo of the diode bridge: [![unkowndiodes](https://i.stack.imgur.c...
2020/03/20
[ "https://electronics.stackexchange.com/questions/487081", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/91174/" ]
Those were a very common diode at one time. My very strong recollection is that they were rated at one Amp. 1N4005 should replace them just fine. Be sure to replace all four diodes.
Put in the highest peak-repetitive forward current diodes you can. And install a small fan. The only way for heat to exit is by the PCB foil, and there is very little of that.
487,081
I am restoring a Japanese Teisco mixing amplifier from the 1970s. It's a solid state 5-channel mixer with 16ohm speaker outs and a line out. Amongst other problems, I have discovered a couple of the bridge rectifier diodes have shorted out. Here is a photo of the diode bridge: [![unkowndiodes](https://i.stack.imgur.c...
2020/03/20
[ "https://electronics.stackexchange.com/questions/487081", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/91174/" ]
1A is a bit wimpy for an audio amplifier; 1A into 8 ohms is only 8W. I would concur with Mattman that these were probably 3A (1N5403 rings a bell, or 5405 for higher voltage) in that case shape. A Google image search for "3A diode" shows several in this case shape (merely illustrating my confirmation bias; "1A diode" ...
Those were a very common diode at one time. My very strong recollection is that they were rated at one Amp. 1N4005 should replace them just fine. Be sure to replace all four diodes.
487,081
I am restoring a Japanese Teisco mixing amplifier from the 1970s. It's a solid state 5-channel mixer with 16ohm speaker outs and a line out. Amongst other problems, I have discovered a couple of the bridge rectifier diodes have shorted out. Here is a photo of the diode bridge: [![unkowndiodes](https://i.stack.imgur.c...
2020/03/20
[ "https://electronics.stackexchange.com/questions/487081", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/91174/" ]
1A is a bit wimpy for an audio amplifier; 1A into 8 ohms is only 8W. I would concur with Mattman that these were probably 3A (1N5403 rings a bell, or 5405 for higher voltage) in that case shape. A Google image search for "3A diode" shows several in this case shape (merely illustrating my confirmation bias; "1A diode" ...
Put in the highest peak-repetitive forward current diodes you can. And install a small fan. The only way for heat to exit is by the PCB foil, and there is very little of that.
12,999,646
I am new to SQL and was trying to create a basic emp table to learn a bit. When I write the query and try to execute it, I keep getting the message "ORA-00907: missing right parenthesis". However I feel that I have included a pair of braces for each function. Could anyone please help me to figure out the issue and if p...
2012/10/21
[ "https://Stackoverflow.com/questions/12999646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763318/" ]
You have a start parenthesis at line 2; ``` (emp id number(4), ^ ``` that is not closed on line 10; ``` manager id number (4); ^missing ``` Also, you can't have spaces in your column names without quoting them. I'd recommend replacing spaces with `_` not to have to quote them everywhere. ```...
your column has spaces on it, if you want to leave the spaces on your table, wrap it with double quotes `"` ``` create table emp ( "emp id" number(4), "first name" varchar2(25), ..... ); ``` but the best way is to create column names without adding space on it. ``` create table emp ( empID number(4), ...
12,999,646
I am new to SQL and was trying to create a basic emp table to learn a bit. When I write the query and try to execute it, I keep getting the message "ORA-00907: missing right parenthesis". However I feel that I have included a pair of braces for each function. Could anyone please help me to figure out the issue and if p...
2012/10/21
[ "https://Stackoverflow.com/questions/12999646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763318/" ]
You have a start parenthesis at line 2; ``` (emp id number(4), ^ ``` that is not closed on line 10; ``` manager id number (4); ^missing ``` Also, you can't have spaces in your column names without quoting them. I'd recommend replacing spaces with `_` not to have to quote them everywhere. ```...
I found 3 mistakes in here. 1. in SQL you must use `numeric` instead of number. 2. you can't keep spaces in field. 3. you need to close the brace end of the query, Code: ``` create table emp (emp_id numeric(4), first_name varchar(25), lastname varchar(25), phone_number numeric (10), ...
41,633,896
I am having a display button in my GUI that shows the connection status (Button with Green check means connection is established and with Red cross means no connection) I have to check the status using my code. I am parsing the content of that particular title-bar class name (container-fluid). And from this, I am parsi...
2017/01/13
[ "https://Stackoverflow.com/questions/41633896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7240382/" ]
DI *should* resolve `MyContext` with code you provided. Resolved instance will not work (see @Nikosi answer about [DbContextOptions](https://learn.microsoft.com/en-us/ef/core/miscellaneous/configuring-dbcontext#using-dbcontext-with-dependency-injection)), but it should be resolved/created. Check your project for other...
Documentation: [Using DbContext with dependency injection](https://learn.microsoft.com/en-us/ef/core/miscellaneous/configuring-dbcontext#using-dbcontext-with-dependency-injection) > > EF supports using `DbContext` with a dependency injection container. > Your DbContext type can be added to the service container by u...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
There are really two things here: 1. Client side validation 2. Server side validation Both should use the same format for this to work. Let's first deal with the server side validation. You could write a custom model binder for the DateTime fields which will use the format specified for displaying when binding them b...
For my case, I use the text field for the date, so it didnt cause problem for jquery validation: ``` <div class="editor-field"> @Html.TextBox("ExpiryDate", String.Format("{0:ddd, dd MMM yyyy}", DateTime.Now), new { id = "expirydate" }) @Html.ValidationMessageFor(model => model.ExpiryDate) </div> ``` So why ...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
For my case, I use the text field for the date, so it didnt cause problem for jquery validation: ``` <div class="editor-field"> @Html.TextBox("ExpiryDate", String.Format("{0:ddd, dd MMM yyyy}", DateTime.Now), new { id = "expirydate" }) @Html.ValidationMessageFor(model => model.ExpiryDate) </div> ``` So why ...
Quite old this thread. Just landed here having similar issues. In another thread I read that there could be an issue with Version incompatibility by all these \*.js libraries involfed somehow in the Validation. Perhaps the following link can help other Readers landig here: <https://stackoverflow.com/a/16551039> Hope t...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
So it looks like **jquery.validate.unobtrusive** has a problem with `input type="date"`. This must be a bug that only occurs in IE and Safari. When i removed the unobtrusive js file, it submitted the form fine. When i added the unobtrusive js file back in and changed the input type to text, it worked. Annoying bug. ...
Quite old this thread. Just landed here having similar issues. In another thread I read that there could be an issue with Version incompatibility by all these \*.js libraries involfed somehow in the Validation. Perhaps the following link can help other Readers landig here: <https://stackoverflow.com/a/16551039> Hope t...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
Actually it is not bug in browser, client validation issues can occur because of MVC bug (even in MVC 5) in *jquery.validate.unobtrusive.min.js* which **does not accept date/datetime format in any way**. Unfortunately you have to solve it manually. **My finally working solution:** You have to include before: ``` @S...
I was having the same issue, it was driving me bananas! Basically, mvc validation will always render DateTime objects to require a value on the textbox. Why? Because it is directly associated with a `DateTime` object. If you declare your `ViewModel` with a ? symbol, you will make it nullable. This way it won't bother y...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
So it looks like **jquery.validate.unobtrusive** has a problem with `input type="date"`. This must be a bug that only occurs in IE and Safari. When i removed the unobtrusive js file, it submitted the form fine. When i added the unobtrusive js file back in and changed the input type to text, it worked. Annoying bug. ...
I think there is a problem with hyphen ("-") in your format string: ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] ``` It seems that unobtrusive validation does not accept hyphen for date formatting by default. In my case I had to add custom client-side method: ``` $.valida...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
Just wanted to make a little comment on this line if someone else has trouble with this later: ``` <input type="date" id="TestDate" value="@Model.TestDate.Value.ToString("dd/MMM/yyyy")" /> ``` In some cases (at least my case earlier) this would translate into this format: "01.01.2012", because with some cultures you...
I was having the same issue, it was driving me bananas! Basically, mvc validation will always render DateTime objects to require a value on the textbox. Why? Because it is directly associated with a `DateTime` object. If you declare your `ViewModel` with a ? symbol, you will make it nullable. This way it won't bother y...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
For my case, I use the text field for the date, so it didnt cause problem for jquery validation: ``` <div class="editor-field"> @Html.TextBox("ExpiryDate", String.Format("{0:ddd, dd MMM yyyy}", DateTime.Now), new { id = "expirydate" }) @Html.ValidationMessageFor(model => model.ExpiryDate) </div> ``` So why ...
Have you tried simply changing the type to: ``` @Html.TextBoxFor(model => model.startDate, new { @class = "date" }) ``` I was having the same issue with EditorFor... so I changed it to this and then applied my jquery datepicker to the 'date' class added to the textbox.
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
I think there is a problem with hyphen ("-") in your format string: ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] ``` It seems that unobtrusive validation does not accept hyphen for date formatting by default. In my case I had to add custom client-side method: ``` $.valida...
As lukyer posted, there can be issues relating to the *jquery.validate\*.min.js* files, especially if you have added your own validation in to those files. The simple answer I found that worked for me when the final release system failed to validate dates in IE (Chrome worked without issue) was to simply remove the pre...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
I think there is a problem with hyphen ("-") in your format string: ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] ``` It seems that unobtrusive validation does not accept hyphen for date formatting by default. In my case I had to add custom client-side method: ``` $.valida...
I was having the same issue, it was driving me bananas! Basically, mvc validation will always render DateTime objects to require a value on the textbox. Why? Because it is directly associated with a `DateTime` object. If you declare your `ViewModel` with a ? symbol, you will make it nullable. This way it won't bother y...
8,059,093
I have a date field (i'm using the jquery ui datepicker) in a form that I've formatted, like so: **ViewModel** ``` [DisplayFormat(DataFormatString = "{0:dd-MMM-yyyy}", ApplyFormatInEditMode = true)] public DateTime FooDate { get; set; } ``` **View** ``` @Html.EditorFor(m => m.FooDate) ``` This correctly shows th...
2011/11/09
[ "https://Stackoverflow.com/questions/8059093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769083/" ]
For my case, I use the text field for the date, so it didnt cause problem for jquery validation: ``` <div class="editor-field"> @Html.TextBox("ExpiryDate", String.Format("{0:ddd, dd MMM yyyy}", DateTime.Now), new { id = "expirydate" }) @Html.ValidationMessageFor(model => model.ExpiryDate) </div> ``` So why ...
I was having the same issue, it was driving me bananas! Basically, mvc validation will always render DateTime objects to require a value on the textbox. Why? Because it is directly associated with a `DateTime` object. If you declare your `ViewModel` with a ? symbol, you will make it nullable. This way it won't bother y...
7,047,181
I want to share a folder between two web applications, so I tried to do the following: ``` <add key="SharedFolder" value="D:\tfs\PlacasV1\Aplicacion Placas DataCenter\Integracion.Reclamos\Web-PRbranch1\"/> <add key="Claims.ControlGen.OutputDir" value="SharedFolder\restricted\controls\generated\"/> <add key="Claims.Con...
2011/08/12
[ "https://Stackoverflow.com/questions/7047181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388553/" ]
You can create a custom configuration section, and design it to do what you're looking for, in some way or the other. See this article for details on how to create custom configuration sections: <http://msdn.microsoft.com/en-us/library/2tw134k3.aspx> Here is an example of a custom configuration section that I create...
You can read the values from a xml file that can be accessed by both applications
7,047,181
I want to share a folder between two web applications, so I tried to do the following: ``` <add key="SharedFolder" value="D:\tfs\PlacasV1\Aplicacion Placas DataCenter\Integracion.Reclamos\Web-PRbranch1\"/> <add key="Claims.ControlGen.OutputDir" value="SharedFolder\restricted\controls\generated\"/> <add key="Claims.Con...
2011/08/12
[ "https://Stackoverflow.com/questions/7047181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388553/" ]
You can create a custom configuration section, and design it to do what you're looking for, in some way or the other. See this article for details on how to create custom configuration sections: <http://msdn.microsoft.com/en-us/library/2tw134k3.aspx> Here is an example of a custom configuration section that I create...
You can't do this out of the box. I would suggest you to have look at [DslConfig](https://github.com/johannes-brunner/DslConfig). With [DslConfig](https://github.com/johannes-brunner/DslConfig) you can configure something like: ``` sharedFolder = "D:\tfs\PlacasV1\Aplicacion Placas DataCenter\Integracion.Reclamos\Web-...
7,047,181
I want to share a folder between two web applications, so I tried to do the following: ``` <add key="SharedFolder" value="D:\tfs\PlacasV1\Aplicacion Placas DataCenter\Integracion.Reclamos\Web-PRbranch1\"/> <add key="Claims.ControlGen.OutputDir" value="SharedFolder\restricted\controls\generated\"/> <add key="Claims.Con...
2011/08/12
[ "https://Stackoverflow.com/questions/7047181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388553/" ]
You can't do this out of the box. I would suggest you to have look at [DslConfig](https://github.com/johannes-brunner/DslConfig). With [DslConfig](https://github.com/johannes-brunner/DslConfig) you can configure something like: ``` sharedFolder = "D:\tfs\PlacasV1\Aplicacion Placas DataCenter\Integracion.Reclamos\Web-...
You can read the values from a xml file that can be accessed by both applications
38,298,208
I have a Bash script that takes in a directory as a parameter, and after some processing will do some output based on the files in that directory. The command would be like the following, where `dir` is a directory with the following structure inside ``` dir/foo dir/bob dir/haha dir/bar dir/sub-dir dir/sub-dir/joe ...
2016/07/11
[ "https://Stackoverflow.com/questions/38298208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940394/" ]
Here's the documentation from `man bash` under "Parameter Expansion": ``` ${parameter#word} ${parameter##word} Remove matching prefix pattern. The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches the beginning of the v...
I suggested you change `files` to an array which is a possible workaround for non-standard filenames that may contain spaces. ``` files=("dir/A/B" "dir/B" "dir/C") for filename in "${files[@]}" do echo ${filename##dir/} #replace dir/ with your param. done ``` **Output** ``` A/B B C ```
38,298,208
I have a Bash script that takes in a directory as a parameter, and after some processing will do some output based on the files in that directory. The command would be like the following, where `dir` is a directory with the following structure inside ``` dir/foo dir/bob dir/haha dir/bar dir/sub-dir dir/sub-dir/joe ...
2016/07/11
[ "https://Stackoverflow.com/questions/38298208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1940394/" ]
Here's the documentation from `man bash` under "Parameter Expansion": ``` ${parameter#word} ${parameter##word} Remove matching prefix pattern. The word is expanded to produce a pattern just as in pathname expansion. If the pattern matches the beginning of the v...
[that other guy's helpful answer](https://stackoverflow.com/a/38298691/45375) solves your immediate problem, but there are two things worth nothing: * enumerating filenames with an unquoted string variable (`for file in $files`) is ill-advised, as [sjsam's helpful answer](https://stackoverflow.com/a/38298621/45375) po...
18,195,204
In my TCL script I am running a process which can be rerun after the test completes. However, there is a 40 second wait period to allow enough time for the program to start up. If the program is running I do not want to have this 40 second waiting period. Is there anyway to search and read the tasklist to determine if ...
2013/08/12
[ "https://Stackoverflow.com/questions/18195204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301128/" ]
If you don't have twapi, here is an alternative: use `tasklist.exe`: ``` package require csv proc getPids {imageName} { set noTaskMessage "INFO: No tasks are running which match the specified criteria." set output [exec tasklist.exe /fi "imagename eq $imageName" /fo csv /nh] set pidList {} if {$output...
Yes, it is possible, but you need a Tcl extension: [Twapi](http://twapi.magicsplat.com/). To check if a process is running, you could try to find a process with a specific name. you could use the this: ``` package require twapi if {[llength [twapi::get_process_ids -name YOUR_EXECUTABLE.EXE]]} { puts "Process is cu...
18,195,204
In my TCL script I am running a process which can be rerun after the test completes. However, there is a 40 second wait period to allow enough time for the program to start up. If the program is running I do not want to have this 40 second waiting period. Is there anyway to search and read the tasklist to determine if ...
2013/08/12
[ "https://Stackoverflow.com/questions/18195204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301128/" ]
Yes, it is possible, but you need a Tcl extension: [Twapi](http://twapi.magicsplat.com/). To check if a process is running, you could try to find a process with a specific name. you could use the this: ``` package require twapi if {[llength [twapi::get_process_ids -name YOUR_EXECUTABLE.EXE]]} { puts "Process is cu...
in the special case, where you have the chance, to read from the started program (or write to the program if that reads from its stdin) you can start the process with open ``` set descriptor [open "|myprogram" r] ``` and then detect with 'eof' when the pipe closes (that implies that you must read the data from this ...
18,195,204
In my TCL script I am running a process which can be rerun after the test completes. However, there is a 40 second wait period to allow enough time for the program to start up. If the program is running I do not want to have this 40 second waiting period. Is there anyway to search and read the tasklist to determine if ...
2013/08/12
[ "https://Stackoverflow.com/questions/18195204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2301128/" ]
If you don't have twapi, here is an alternative: use `tasklist.exe`: ``` package require csv proc getPids {imageName} { set noTaskMessage "INFO: No tasks are running which match the specified criteria." set output [exec tasklist.exe /fi "imagename eq $imageName" /fo csv /nh] set pidList {} if {$output...
in the special case, where you have the chance, to read from the started program (or write to the program if that reads from its stdin) you can start the process with open ``` set descriptor [open "|myprogram" r] ``` and then detect with 'eof' when the pipe closes (that implies that you must read the data from this ...
217,269
I'm looking for a similar tool to thesaurus.com, but one where you can enter multiple words. For example, I'm looking for a word that describes something between `match` and `race`. Or one that captures (or relates most to) `family`, `company` and `sports club`.
2014/12/28
[ "https://english.stackexchange.com/questions/217269", "https://english.stackexchange.com", "https://english.stackexchange.com/users/51479/" ]
Try the [reverse dictionary feature](http://www.onelook.com/reverse-dictionary.shtml) of [OneLook.com.](http://www.onelook.com/)
I couldn't find an easily accessible live online demo of this, but if you're technically inclined, you could adapt a [Jupyter Notebook of automated wordsmithing](https://github.com/danielfrg/word2vec/blob/main/examples/word2vec.ipynb) to: 1. Convert some words to vectors 2. Average the vectors with varying weights to ...
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
``` [[NSFontManager sharedFontManager] availableFontFamilies] ``` (previously, I had written `-[NSFontManager availableFontFamilies]`, which is a conventional way of writing a method name, but could be confusing if interpreted as sample code.)
``` #import <Cocoa/Cocoa.h> @interface FontController : NSObject { IBOutlet NSTextField *text; } - (IBAction)takeFontFamilyFrom: (id)sender; - (IBAction)takeFontSizeFrom: (id)sender; - (IBAction)takeFontAttributeFrom: (id)sender; @end #import "FontController.h" NSFontManager *fm; @implementation FontController ...
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
**Swift 5** ``` for family in NSFontManager.shared.availableFontFamilies { print(family) } ```
Check Apple's documentation, for instance: <http://support.apple.com/kb/HT5379>. -[NSFontManager availableFontFamilies] may reveal fonts that are not a part of the version of OS X you are targeting (I think this is beacause they were loaded with other applications, for example Adobe Illustrator).
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
Here's how it can be done for Swift: ``` let fontFamilyNames = NSFontManager.sharedFontManager().availableFontFamilies print("avaialble fonts is \(fontFamilyNames)") ```
``` #import <Cocoa/Cocoa.h> @interface FontController : NSObject { IBOutlet NSTextField *text; } - (IBAction)takeFontFamilyFrom: (id)sender; - (IBAction)takeFontSizeFrom: (id)sender; - (IBAction)takeFontAttributeFrom: (id)sender; @end #import "FontController.h" NSFontManager *fm; @implementation FontController ...
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
Check Apple's documentation, for instance: <http://support.apple.com/kb/HT5379>. -[NSFontManager availableFontFamilies] may reveal fonts that are not a part of the version of OS X you are targeting (I think this is beacause they were loaded with other applications, for example Adobe Illustrator).
``` #import <Cocoa/Cocoa.h> @interface FontController : NSObject { IBOutlet NSTextField *text; } - (IBAction)takeFontFamilyFrom: (id)sender; - (IBAction)takeFontSizeFrom: (id)sender; - (IBAction)takeFontAttributeFrom: (id)sender; @end #import "FontController.h" NSFontManager *fm; @implementation FontController ...
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
``` NSLog(@"%@",[[[NSFontManager sharedFontManager] availableFontFamilies] description]); ``` Gives: ``` "Abadi MT Condensed Extra Bold", "Abadi MT Condensed Light", "Academy Engraved LET", "Al Bayan", "American Typewriter", "Andale Mono", Arial, "Arial Black", "Arial Hebrew", "Arial Narrow", "Arial Rounded MT Bold"...
**Swift 5** ``` for family in NSFontManager.shared.availableFontFamilies { print(family) } ```
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
**Swift 5** ``` for family in NSFontManager.shared.availableFontFamilies { print(family) } ```
``` #import <Cocoa/Cocoa.h> @interface FontController : NSObject { IBOutlet NSTextField *text; } - (IBAction)takeFontFamilyFrom: (id)sender; - (IBAction)takeFontSizeFrom: (id)sender; - (IBAction)takeFontAttributeFrom: (id)sender; @end #import "FontController.h" NSFontManager *fm; @implementation FontController ...
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
``` NSLog(@"%@",[[[NSFontManager sharedFontManager] availableFontFamilies] description]); ``` Gives: ``` "Abadi MT Condensed Extra Bold", "Abadi MT Condensed Light", "Academy Engraved LET", "Al Bayan", "American Typewriter", "Andale Mono", Arial, "Arial Black", "Arial Hebrew", "Arial Narrow", "Arial Rounded MT Bold"...
Here's how it can be done for Swift: ``` let fontFamilyNames = NSFontManager.sharedFontManager().availableFontFamilies print("avaialble fonts is \(fontFamilyNames)") ```
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
Here's how it can be done for Swift: ``` let fontFamilyNames = NSFontManager.sharedFontManager().availableFontFamilies print("avaialble fonts is \(fontFamilyNames)") ```
Check Apple's documentation, for instance: <http://support.apple.com/kb/HT5379>. -[NSFontManager availableFontFamilies] may reveal fonts that are not a part of the version of OS X you are targeting (I think this is beacause they were loaded with other applications, for example Adobe Illustrator).
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
``` NSLog(@"%@",[[[NSFontManager sharedFontManager] availableFontFamilies] description]); ``` Gives: ``` "Abadi MT Condensed Extra Bold", "Abadi MT Condensed Light", "Academy Engraved LET", "Al Bayan", "American Typewriter", "Andale Mono", Arial, "Arial Black", "Arial Hebrew", "Arial Narrow", "Arial Rounded MT Bold"...
``` [[NSFontManager sharedFontManager] availableFontFamilies] ``` (previously, I had written `-[NSFontManager availableFontFamilies]`, which is a conventional way of writing a method name, but could be confusing if interpreted as sample code.)
2,977,915
How can I get a list of the available NSFont families, preferably with the fontName: equivalents.
2010/06/04
[ "https://Stackoverflow.com/questions/2977915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/285694/" ]
``` NSLog(@"%@",[[[NSFontManager sharedFontManager] availableFontFamilies] description]); ``` Gives: ``` "Abadi MT Condensed Extra Bold", "Abadi MT Condensed Light", "Academy Engraved LET", "Al Bayan", "American Typewriter", "Andale Mono", Arial, "Arial Black", "Arial Hebrew", "Arial Narrow", "Arial Rounded MT Bold"...
Check Apple's documentation, for instance: <http://support.apple.com/kb/HT5379>. -[NSFontManager availableFontFamilies] may reveal fonts that are not a part of the version of OS X you are targeting (I think this is beacause they were loaded with other applications, for example Adobe Illustrator).
1,161,729
After updating to the latest 19.04 my desktop, normally clear except for the launcher, filled with icons representing every file in my home directory. Furthermore these 100+ files appear to be completely disordered. Where are the controls for this?
2019/07/28
[ "https://askubuntu.com/questions/1161729", "https://askubuntu.com", "https://askubuntu.com/users/216176/" ]
With the help of Ubuntu Launchpad, I managed to fix the issue - the problem was that in *~/.config/user-dirs.dirs*, the path of my desktop automatically changed to my home folder. Try to edit the file and see what location points the *XDG\_DESKTOP\_DIR* constant to.
Thanks, Somehow ~/Desktop had disappeared. So some software obligingly changed the contents of XDG\_DESKTOP\_DIR to only $HOME/. Restored the directory, fixed ~/.config/user-dirs.dirs,logged off and on and all was fine again. Keith
67,527,947
I want to render my local machine image using props. am a beginner so please help me with the simplest method. Thanks in advance. I exporting my card.js and rendering in App.js App.js code below > > import React from "react"; > import Card from "./card"; > import logo from "./img/imge.jpg"; > > > > ``` > con...
2021/05/14
[ "https://Stackoverflow.com/questions/67527947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10934516/" ]
This has been explained in [PEP-526](https://www.python.org/dev/peps/pep-0526/#global-and-local-variable-annotations): > > It is illegal to attempt to annotate variables subject to `global` or > `nonlocal` in the same function scope: > > > ``` def f(): global x: int # SyntaxError def g(): x: int # Also...
The given explanation of the accepted answer actually makes zero sense whatsoever, moreover it seems `annotating global variables` been the consensus as `should be allowed` in this discussion: <https://bugs.python.org/issue34939>, however as of yet - Python 3.8 - it hasn't been implemented. The problem must be in the ...
67,527,947
I want to render my local machine image using props. am a beginner so please help me with the simplest method. Thanks in advance. I exporting my card.js and rendering in App.js App.js code below > > import React from "react"; > import Card from "./card"; > import logo from "./img/imge.jpg"; > > > > ``` > con...
2021/05/14
[ "https://Stackoverflow.com/questions/67527947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10934516/" ]
This has been explained in [PEP-526](https://www.python.org/dev/peps/pep-0526/#global-and-local-variable-annotations): > > It is illegal to attempt to annotate variables subject to `global` or > `nonlocal` in the same function scope: > > > ``` def f(): global x: int # SyntaxError def g(): x: int # Also...
So, as is often the case with very *old language features*, this is confusing. **`global`** in python is a statement that declares a ***name*** to be matching a key in the `globals()` dictionary-like container. If the key is not *already* in the `globals()` dictionary-like container, it will be added. It will default t...
67,527,947
I want to render my local machine image using props. am a beginner so please help me with the simplest method. Thanks in advance. I exporting my card.js and rendering in App.js App.js code below > > import React from "react"; > import Card from "./card"; > import logo from "./img/imge.jpg"; > > > > ``` > con...
2021/05/14
[ "https://Stackoverflow.com/questions/67527947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10934516/" ]
So, as is often the case with very *old language features*, this is confusing. **`global`** in python is a statement that declares a ***name*** to be matching a key in the `globals()` dictionary-like container. If the key is not *already* in the `globals()` dictionary-like container, it will be added. It will default t...
The given explanation of the accepted answer actually makes zero sense whatsoever, moreover it seems `annotating global variables` been the consensus as `should be allowed` in this discussion: <https://bugs.python.org/issue34939>, however as of yet - Python 3.8 - it hasn't been implemented. The problem must be in the ...
27,735,576
I have a form application in C#. I need to take radiobutton values in textbox.i know the methods are private, i change public but it didnt work. i need to take value1,value2,value3 and value4 with button press. Can anybody tell me a way for getting values in textboxs.... ``` private void groupBox1_Enter(object sender,...
2015/01/01
[ "https://Stackoverflow.com/questions/27735576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3159251/" ]
You can either move the variables (`value1` etc.) to the class scope or put everything in the `button1_Click` event handler like @SteveDanner has suggested or you may write a more generic solution. It can be very easily extendend if you create more options (`RadioButtons`). ``` // Store values for each RadioButton in ...
The problem is that your values being created from the `RadioButtons` are local variables to the method handlers. You need to remove your `groupBox_Enter` handlers and just handle the `button1_Click` event like so: ``` private void button1_Click(object sender, EventArgs e) { double value1; if (radioButton1.Che...
66,947,723
I have a simple accordion: ```html <div> <button aria-expanded='false' aria-controls='content'> Open accordion </button> <div id='content' aria-hidden='true'> This the accordion's hidden content. </div> </div> ``` I use Javascript to open/close the accordion and set the `aria-*` tags. Everything wor...
2021/04/05
[ "https://Stackoverflow.com/questions/66947723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11628938/" ]
Why are you getting this warning? --------------------------------- This warning shows despite your use of `aria-hidden="true"` the majority of screen readers will ignore `aria-hidden="true"` on a parent item if the children can receive focus (to account for developer mistakes, JavaScript not loading correctly etc.). ...
Simple solution, use CSS `display:none` property to remove the element from being focusable : ``` #content[aria-hidden=true] { display:none; } ``` That's not only useful but quite necessary as we don't want screenreaders to announce non visible things.
24,530,790
Please explain the output when the entered string is longer than the size specified ``` #include<stdio.h> int main() { char name[21],address[31]; puts("enter a name(max 21 characters)"); gets(name); fflush(stdin); puts("enter an address(max 31 characters)"); gets(address); fflush(stdin); puts("your na...
2014/07/02
[ "https://Stackoverflow.com/questions/24530790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3672255/" ]
As far as I can tell, there is currently no solution to reopening the application after going to the home screen *without clearing the app from cache.* In past versions of iOS/Appium, the solution was to do: ``` from appium import webdriver driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps) driver....
As I known, Appium by default runs in *fast reset mode*, and it tries to clear app's data when the session ends (as a result of the invocation of `quit()` in this case). If your want to keep app's data, the option `--no-reset` should work for you.
24,530,790
Please explain the output when the entered string is longer than the size specified ``` #include<stdio.h> int main() { char name[21],address[31]; puts("enter a name(max 21 characters)"); gets(name); fflush(stdin); puts("enter an address(max 31 characters)"); gets(address); fflush(stdin); puts("your na...
2014/07/02
[ "https://Stackoverflow.com/questions/24530790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3672255/" ]
The Appium help page says that it only supports multiple app testing in a single test session for Android without Selendroid: > > **iOS**: Support for automating multiple apps in one session: No > > > **Android**:Support for automating multiple apps in one session: Yes (but not when using the Selendroid backend) > ...
As I known, Appium by default runs in *fast reset mode*, and it tries to clear app's data when the session ends (as a result of the invocation of `quit()` in this case). If your want to keep app's data, the option `--no-reset` should work for you.
24,530,790
Please explain the output when the entered string is longer than the size specified ``` #include<stdio.h> int main() { char name[21],address[31]; puts("enter a name(max 21 characters)"); gets(name); fflush(stdin); puts("enter an address(max 31 characters)"); gets(address); fflush(stdin); puts("your na...
2014/07/02
[ "https://Stackoverflow.com/questions/24530790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3672255/" ]
I was able to relaunch the same app without it resetting its state with Appium 1.3.1 running with Xcode 6.1 on a Mac Mini running Mavericks. I did not try launching another app in between launches. I'm driving the automation from C#. ``` protected AppiumDriver GetAppiumDriver(bool forRestart = false) { ...
As I known, Appium by default runs in *fast reset mode*, and it tries to clear app's data when the session ends (as a result of the invocation of `quit()` in this case). If your want to keep app's data, the option `--no-reset` should work for you.
3,240,263
I have a library that consists of three parts. First is native C++, which provides the actual functionality. Second is a C++/CLI wrapper/adaptor for the C++ library, to simplify the C# to C++ transition. Finally I have a C# library, which invokes the C++ library through the C++/CLI adaptor. Right now there I have two ...
2010/07/13
[ "https://Stackoverflow.com/questions/3240263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284758/" ]
Even if you include the C# enum in your native C++ (as suggested in your [first link](http://blogs.msdn.com/b/abhinaba/archive/2007/08/27/sharing-enums-across-c-and-c.aspx)), both enums are not "the same", the C++ enum is nothing but a list of named integers, while the C# enum is derived from Enum. As a consequence, yo...
Consider writing code generator program, which reads native h-file file with enumerations and generates another h-file, converting enum to C++/CLI enum class. Such code generator can be used in C++/CLI project on the Custom Build Step, producing required CLI enumerations. I use this approach to generate native wrapper...
3,240,263
I have a library that consists of three parts. First is native C++, which provides the actual functionality. Second is a C++/CLI wrapper/adaptor for the C++ library, to simplify the C# to C++ transition. Finally I have a C# library, which invokes the C++ library through the C++/CLI adaptor. Right now there I have two ...
2010/07/13
[ "https://Stackoverflow.com/questions/3240263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284758/" ]
Even if you include the C# enum in your native C++ (as suggested in your [first link](http://blogs.msdn.com/b/abhinaba/archive/2007/08/27/sharing-enums-across-c-and-c.aspx)), both enums are not "the same", the C++ enum is nothing but a list of named integers, while the C# enum is derived from Enum. As a consequence, yo...
Just put your `#include "Enum.cs"` directive inside an outer namespace to resolve the naming collision. EDIT: A variation suggested by Brent is to use `#define` to substitute one of the namespaces (or even the enum name itself) declared in the .cs file. This also avoids the naming collision, without making the namespa...
3,240,263
I have a library that consists of three parts. First is native C++, which provides the actual functionality. Second is a C++/CLI wrapper/adaptor for the C++ library, to simplify the C# to C++ transition. Finally I have a C# library, which invokes the C++ library through the C++/CLI adaptor. Right now there I have two ...
2010/07/13
[ "https://Stackoverflow.com/questions/3240263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284758/" ]
Just put your `#include "Enum.cs"` directive inside an outer namespace to resolve the naming collision. EDIT: A variation suggested by Brent is to use `#define` to substitute one of the namespaces (or even the enum name itself) declared in the .cs file. This also avoids the naming collision, without making the namespa...
Consider writing code generator program, which reads native h-file file with enumerations and generates another h-file, converting enum to C++/CLI enum class. Such code generator can be used in C++/CLI project on the Custom Build Step, producing required CLI enumerations. I use this approach to generate native wrapper...
17,325,333
On **domain1.com** I have a simple html page: ``` <h1 class="hello-world">Hello World!</h1> ``` This page references an *external* CSS file which is hosted over on **domain2.com**. All of the images within that CSS file are referenced using relative paths. E.g: ``` h1.hello-world { background-image:url(/images/cut...
2013/06/26
[ "https://Stackoverflow.com/questions/17325333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2524859/" ]
According to the [CSS Level 2 specification document](http://www.w3.org/TR/CSS2/syndata.html#uri), relative URIs are always resolved using the URI of the stylesheet which includes the path. > > In order to create modular style sheets that are not dependent on the > absolute location of a resource, authors may use re...
As per [CSS spec](http://www.w3.org/TR/REC-CSS1/#url): > > Partial URLs are interpreted relative to the source of the style > sheet, not relative to the document > > > In your example, the URI would result in `domain2.com/images/cute-kitten.gif`.
16,642,925
Is there any possible to add new row after 2nd/3rd/...nth row in Jquery datatable? I used this method fnAddData([...]). It works as expected. But I need to add record inbetween two rows. Please anyone help me..
2013/05/20
[ "https://Stackoverflow.com/questions/16642925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482231/" ]
I share with You what I've done: ``` // for example you want to insert after the 2nd row var numberOfRowAfterYouWantToInsert = 2; var rowAfterYouWantToInsert = $("#yourTableId tr").eq( numberOfRowAfterYouWantToInsert ); var rowsAfter_rowAfterYouWantToInsert = rowAfterYouWantToInsert.nextAll(); var standbyTable = $("<t...
This works for me. Grab the array from the datatable, splice in the value at the index you want, then redraw the datatable. This way if you ever have to do a redraw - the values you appended will still be in the table. ``` var newRow = [1, 2, 3]; // new row in the datatable var index = 4; // index for the new row to b...
16,642,925
Is there any possible to add new row after 2nd/3rd/...nth row in Jquery datatable? I used this method fnAddData([...]). It works as expected. But I need to add record inbetween two rows. Please anyone help me..
2013/05/20
[ "https://Stackoverflow.com/questions/16642925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482231/" ]
I share with You what I've done: ``` // for example you want to insert after the 2nd row var numberOfRowAfterYouWantToInsert = 2; var rowAfterYouWantToInsert = $("#yourTableId tr").eq( numberOfRowAfterYouWantToInsert ); var rowsAfter_rowAfterYouWantToInsert = rowAfterYouWantToInsert.nextAll(); var standbyTable = $("<t...
Add row to your table (where tr it the DOM reference to the table wot you want to insert before your row): ``` var html = "<tr><td>a</td><td>b</td></tr>"; $(tr).after(html); ``` Next, reset table using this function (where tbServer is the table id): ``` function ResetDataTable() { $("#tbServer thead tr").remove...
2,122,181
I've tried to add NSPopupButton + CustomView, but it's not what I wanted. I would like to mimic "Tasks" on Xcode's toolbar.
2010/01/23
[ "https://Stackoverflow.com/questions/2122181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/193431/" ]
Can you try File->Import and then choose Existing Projects into Workspace and then select the directory with your HelloWorld project?
Looks like I had it checked not to show closed projects.
2,122,181
I've tried to add NSPopupButton + CustomView, but it's not what I wanted. I would like to mimic "Tasks" on Xcode's toolbar.
2010/01/23
[ "https://Stackoverflow.com/questions/2122181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/193431/" ]
Can you try File->Import and then choose Existing Projects into Workspace and then select the directory with your HelloWorld project?
Eclipse will look into the .project file in your project directory and see the original project name, which may be the same as another project. This can happen if you build a new project using some old code.
40,744,663
I am trying to get a variable, put that in between two set strings and finally open the concatenated string in Chrome. There is, however, part of the string that I am having issues with which I am presuming is due to the usage of special characters. ``` @echo off set loc=%1 set link1=https://query.yahooapis.com/v1/pub...
2016/11/22
[ "https://Stackoverflow.com/questions/40744663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394131/" ]
To properly quote the argument to `set` you have to quote the *entire* argument, this includes the variable name: ``` set "link2='&format=json" ``` Note also that normal variable expansion is simple text substitution while a command is parsed, so you will have to properly escape every occurrence of that variable aft...
``` set "link2='^&format=json" ``` should set `link2` as you require (you don't say...) With an argument of `hello`, `echo`ing the "chrome" line produces > > > ``` > "chrome.exe" "https://query.yahooapis.com/v1/public/yql?q=select * from geo.places where text='hello'&format=json" > > ``` > > for me - and prod...
40,744,663
I am trying to get a variable, put that in between two set strings and finally open the concatenated string in Chrome. There is, however, part of the string that I am having issues with which I am presuming is due to the usage of special characters. ``` @echo off set loc=%1 set link1=https://query.yahooapis.com/v1/pub...
2016/11/22
[ "https://Stackoverflow.com/questions/40744663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394131/" ]
To properly quote the argument to `set` you have to quote the *entire* argument, this includes the variable name: ``` set "link2='&format=json" ``` Note also that normal variable expansion is simple text substitution while a command is parsed, so you will have to properly escape every occurrence of that variable aft...
Escaping the `&` in a `set` command has failed for me and I confess I don't know why So I propose a workaround for this. Use `__amp__` to replace `&` in the `set`. Replace it by the actual `&` afterwards (here escaping works!) ``` @echo off set loc=%1 set link1=https://query.yahooapis.com/v1/public/yql?q=select * fro...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Simple answer: make them brighter / bring them closer. It's already possible to see Venus during daytime (if it's not too close to the Sun, and well above the horizon); the main problem is that you need to know where to look. Venus has a magnitude of about -4; the brightest star in the night sky, Sirius, is about -1....
By filtering out the wavelength of light refracted by the sky. Either mechanically by sunglasses or organically by a protein in the lenses or viscous jelly of the eye. The objects in the world will still be mostly visible since they aren't the same color as the sky. [![enter image description here](https://i.stack.imgu...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Use the sun during the day to power a low level filtration/polarisation spell to block out the local sun rays. Then power up with your multiple distant stars. Why you need distant stars to power you spells, when you have a major source of solar power right next door, I don't know. You will have to address this somehow...
Replace the Sun with a Red dwarf -------------------------------- Since removing your atmosphere posses significant problems to complex organisms, you could go the other route and choose a star that emits less short-wavelength light. In general, an Earth like atmosphere absorbs more light in the red/orange spectrum an...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Simple answer: make them brighter / bring them closer. It's already possible to see Venus during daytime (if it's not too close to the Sun, and well above the horizon); the main problem is that you need to know where to look. Venus has a magnitude of about -4; the brightest star in the night sky, Sirius, is about -1....
As [this answer](https://astronomy.stackexchange.com/a/39455/16392) states, it is possible in infrared - since the Earth like atmosphere scatters mostly blue light. So either 1) the eyes of your species evolved to see longer wavelengths, or 2) there is a spell that alters your pupil/retina (either permanently or tempor...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
The long and the short of it is: get rid of the atmosphere. On the moon, stars are visible all the time, no matter where the sun is, because there is no atmospere to scatter the sunlight.
As [this answer](https://astronomy.stackexchange.com/a/39455/16392) states, it is possible in infrared - since the Earth like atmosphere scatters mostly blue light. So either 1) the eyes of your species evolved to see longer wavelengths, or 2) there is a spell that alters your pupil/retina (either permanently or tempor...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
By filtering out the wavelength of light refracted by the sky. Either mechanically by sunglasses or organically by a protein in the lenses or viscous jelly of the eye. The objects in the world will still be mostly visible since they aren't the same color as the sky. [![enter image description here](https://i.stack.imgu...
Replace the Sun with a Red dwarf -------------------------------- Since removing your atmosphere posses significant problems to complex organisms, you could go the other route and choose a star that emits less short-wavelength light. In general, an Earth like atmosphere absorbs more light in the red/orange spectrum an...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
There're multiple problems, following the other answer you must have a world with less dense atmosphere, stars more near the planet, but I think the biggest problem is the weather condition, in a foggy or cloudy day or night you can't see the sky, in this way it's not possible to see your linked star and you can't use ...
Replace the Sun with a Red dwarf -------------------------------- Since removing your atmosphere posses significant problems to complex organisms, you could go the other route and choose a star that emits less short-wavelength light. In general, an Earth like atmosphere absorbs more light in the red/orange spectrum an...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Simple answer: make them brighter / bring them closer. It's already possible to see Venus during daytime (if it's not too close to the Sun, and well above the horizon); the main problem is that you need to know where to look. Venus has a magnitude of about -4; the brightest star in the night sky, Sirius, is about -1....
Part One of Five: Spells to See Stars in the Day Sky. As the planet orbits its star (if your world is a planet orbiting a star) the stars visible during the night will slowly shift to the day side, and stars on the day side will slowly shift to the night side in a seasonal cycle. Someone who uses a star for magic dur...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
The long and the short of it is: get rid of the atmosphere. On the moon, stars are visible all the time, no matter where the sun is, because there is no atmospere to scatter the sunlight.
There're multiple problems, following the other answer you must have a world with less dense atmosphere, stars more near the planet, but I think the biggest problem is the weather condition, in a foggy or cloudy day or night you can't see the sky, in this way it's not possible to see your linked star and you can't use ...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Simple answer: make them brighter / bring them closer. It's already possible to see Venus during daytime (if it's not too close to the Sun, and well above the horizon); the main problem is that you need to know where to look. Venus has a magnitude of about -4; the brightest star in the night sky, Sirius, is about -1....
There're multiple problems, following the other answer you must have a world with less dense atmosphere, stars more near the planet, but I think the biggest problem is the weather condition, in a foggy or cloudy day or night you can't see the sky, in this way it's not possible to see your linked star and you can't use ...
184,562
In my world each person has the ability to call upon the power of a star; using it to further whatever end they’d want—i.e. *using the sun’s energy to power a spell.* However, they can **ONLY** call upon the power of the visible stars in the sky and once the stars are on the other side of the planet they cannot call on...
2020/08/29
[ "https://worldbuilding.stackexchange.com/questions/184562", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/79095/" ]
Simple answer: make them brighter / bring them closer. It's already possible to see Venus during daytime (if it's not too close to the Sun, and well above the horizon); the main problem is that you need to know where to look. Venus has a magnitude of about -4; the brightest star in the night sky, Sirius, is about -1....
**Clear "line of sight" does not necessitate you see.** Line of sight means no obstructions in the way. On a very dark night, I may not see my friend on the other side of a field. But I know he is there; I saw him head that way and he just now turned off his flashlight. If I call him he will hear me. He is in my line ...
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
[![enter image description here](https://i.stack.imgur.com/4PGGM.jpg)](https://i.stack.imgur.com/4PGGM.jpg) As you note, charts typically show the value at expiration. My broker will also show a midpoint along with the current price curve. This seems to be what you want. As Bob notes, these values can all be calculate...
You can do it quickly yourself if you have a little knowledge of computer programming. For example, Julia's charting capabilities are very good and you can quickly produce interactive figures. The below defines Black Scholes which is sufficient to match Bloomberg as shown [here](https://money.stackexchange.com/a/154964...
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
> > How do we create a chart modeling all that? > > > You could create a contour (3-D) plot with the following axes: * Time to maturity * Underlying Price * Extrinsic value. Since option value is easy to compute with the Black-Scholes model for various strikes and TTMs (keeping other inputs constant), it should ...
I've been using ThinkorSwim for about a decade. It's "analysis" tab lets you model prices at dates, multiple dates, and multiple expirations for multi leg strategies amongst many other combinations It is also free.
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
You can do it quickly yourself if you have a little knowledge of computer programming. For example, Julia's charting capabilities are very good and you can quickly produce interactive figures. The below defines Black Scholes which is sufficient to match Bloomberg as shown [here](https://money.stackexchange.com/a/154964...
I've been using ThinkorSwim for about a decade. It's "analysis" tab lets you model prices at dates, multiple dates, and multiple expirations for multi leg strategies amongst many other combinations It is also free.
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
[![enter image description here](https://i.stack.imgur.com/4PGGM.jpg)](https://i.stack.imgur.com/4PGGM.jpg) As you note, charts typically show the value at expiration. My broker will also show a midpoint along with the current price curve. This seems to be what you want. As Bob notes, these values can all be calculate...
> > How do we create a chart modeling all that? > > > You could create a contour (3-D) plot with the following axes: * Time to maturity * Underlying Price * Extrinsic value. Since option value is easy to compute with the Black-Scholes model for various strikes and TTMs (keeping other inputs constant), it should ...
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
> > ATM options have the most theta, theta does not change linearly with time, and rate of change of intrinsic value decreases the further away from ATM the option is (an option $10 ITM may only have $7 intrinsic value). > > > An option $10 ITM will have $10 of intrinsic value. Delta will depict the rate of chan...
I've been using ThinkorSwim for about a decade. It's "analysis" tab lets you model prices at dates, multiple dates, and multiple expirations for multi leg strategies amongst many other combinations It is also free.
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
[![enter image description here](https://i.stack.imgur.com/4PGGM.jpg)](https://i.stack.imgur.com/4PGGM.jpg) As you note, charts typically show the value at expiration. My broker will also show a midpoint along with the current price curve. This seems to be what you want. As Bob notes, these values can all be calculate...
The interactive charts I created here (<https://www.5minutefinance.org/concepts/the-greeks>) will allow you to plot any of the Greeks as a function of the option pricing model inputs (Black-Scholes). If you just want to see how the option's time value changes given changes in the Black-Scholes inputs you can see these...
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
The interactive charts I created here (<https://www.5minutefinance.org/concepts/the-greeks>) will allow you to plot any of the Greeks as a function of the option pricing model inputs (Black-Scholes). If you just want to see how the option's time value changes given changes in the Black-Scholes inputs you can see these...
I've been using ThinkorSwim for about a decade. It's "analysis" tab lets you model prices at dates, multiple dates, and multiple expirations for multi leg strategies amongst many other combinations It is also free.
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
[![enter image description here](https://i.stack.imgur.com/4PGGM.jpg)](https://i.stack.imgur.com/4PGGM.jpg) As you note, charts typically show the value at expiration. My broker will also show a midpoint along with the current price curve. This seems to be what you want. As Bob notes, these values can all be calculate...
I've been using ThinkorSwim for about a decade. It's "analysis" tab lets you model prices at dates, multiple dates, and multiple expirations for multi leg strategies amongst many other combinations It is also free.
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
> > ATM options have the most theta, theta does not change linearly with time, and rate of change of intrinsic value decreases the further away from ATM the option is (an option $10 ITM may only have $7 intrinsic value). > > > An option $10 ITM will have $10 of intrinsic value. Delta will depict the rate of chan...
The interactive charts I created here (<https://www.5minutefinance.org/concepts/the-greeks>) will allow you to plot any of the Greeks as a function of the option pricing model inputs (Black-Scholes). If you just want to see how the option's time value changes given changes in the Black-Scholes inputs you can see these...
112,834
Typical option graphs are only valid at the time of expiration: [![short put option](https://i.stack.imgur.com/eso7i.png)](https://i.stack.imgur.com/eso7i.png) This only expresses what happens at the moment of expiration (and ignores trading costs). But what about extrinsic value (theta and implied volatility)? Befo...
2019/08/22
[ "https://money.stackexchange.com/questions/112834", "https://money.stackexchange.com", "https://money.stackexchange.com/users/86892/" ]
> > ATM options have the most theta, theta does not change linearly with time, and rate of change of intrinsic value decreases the further away from ATM the option is (an option $10 ITM may only have $7 intrinsic value). > > > An option $10 ITM will have $10 of intrinsic value. Delta will depict the rate of chan...
> > How do we create a chart modeling all that? > > > You could create a contour (3-D) plot with the following axes: * Time to maturity * Underlying Price * Extrinsic value. Since option value is easy to compute with the Black-Scholes model for various strikes and TTMs (keeping other inputs constant), it should ...
56,604,081
I'm practicing with regular expressions. I found a great answer here on StackOverflow: [How do I retrieve all matches for a regular expression in JavaScript?](https://stackoverflow.com/a/6323598/10187723) I copied the code from the checked answer and pasted it into an editor and then wrote my own function using it. S...
2019/06/14
[ "https://Stackoverflow.com/questions/56604081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10187723/" ]
You first two functions return promices, not actual data. You should try something like this: ``` async function get_user(value){ return (await axios.get( "https://apicall/" + value )).data; } async function get_user_posts(username){ return (await axios.get("https://apicall/" + username)).data; } ``` Or, if you...
I think you need to look on this link. <https://javascript.info/async-await> In your case you can use the .then() but I still prefer to use async await By using await in async function you can chain some different actions and use the last call in your current
46,403,498
I have an Array (dict1) that i want to paste from cells T1-Z1 using the following code ``` With Sheets("Raw_Data") .Range(.Cells(1, 20), .Cells(1, 26)).Resize(dict1.Count).Value = Application.Transpose(dict1.keys) End With ``` When i use this however, it pastes the values in the Array from T1-T7, and then copies t...
2017/09/25
[ "https://Stackoverflow.com/questions/46403498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5244615/" ]
Instead of ``` .Range(.Cells(1, 20), .Cells(1, 26)).Resize(dict1.Count).Value = Application.Transpose(dict1.keys) ``` use ``` .Range("T1").Resize(1, UBound(Application.Transpose(dict1.keys))) = dict1.keys ``` Try following code ``` Sub Demo() Dim dict1 As Object Set dict1 = CreateObject("Scripting.Dicti...
The original array was loaded from a vertical range ``` avarPercentValues() = .Range(cstrColTotals & clngAverageSpread & ":" & cstrColTotals & clngValidGain).Value2 ``` The easiest and fastest way to save it horizontally: ``` .Range(cstrColTAvgSpread & lngDataRow & ":" & cstrColTValidGain & lngDataRow).Value2 = App...
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
``` global $wp_query; $page_id = $wp_query->get_queried_object_id(); ``` but if you're using a custom page for posts, where are you adding this code?
There's two methods, depending on if you're doing this inside or outside the loop. Inside: $page\_id = $post->ID; (which you've mentioned, with no success, so I'll assume you're try for the alternative which is...) Outside: $page\_id = $wp\_query->post->ID;
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
From quick test `$wp_query->get_queried_object_id()` should get page's ID when that page is set to be posts page. This is likely the issue of timing it late enough that it is available, but early enough so that loop of posts doesn't interfere. I'd try to capture it early (in `template_redirect` hook or around that) an...
There's two methods, depending on if you're doing this inside or outside the loop. Inside: $page\_id = $post->ID; (which you've mentioned, with no success, so I'll assume you're try for the alternative which is...) Outside: $page\_id = $wp\_query->post->ID;
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
There's two methods, depending on if you're doing this inside or outside the loop. Inside: $page\_id = $post->ID; (which you've mentioned, with no success, so I'll assume you're try for the alternative which is...) Outside: $page\_id = $wp\_query->post->ID;
For those of you who this still isn't working for, you will need to use some sort of add\_action (you can choose which one you want to use). For my example, this will return the current page ID without any problems, regardless of whether in a plugin folder, functions php, or elsewhere. ``` add_action('template_redirec...
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
``` global $wp_query; $page_id = $wp_query->get_queried_object_id(); ``` but if you're using a custom page for posts, where are you adding this code?
I replaced: ``` $page_id = [id of post]; ``` with: ``` $page_id = $wp_query->get_queried_object_id(); ``` Worked for me!
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
``` global $wp_query; $page_id = $wp_query->get_queried_object_id(); ``` but if you're using a custom page for posts, where are you adding this code?
For those of you who this still isn't working for, you will need to use some sort of add\_action (you can choose which one you want to use). For my example, this will return the current page ID without any problems, regardless of whether in a plugin folder, functions php, or elsewhere. ``` add_action('template_redirec...
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
From quick test `$wp_query->get_queried_object_id()` should get page's ID when that page is set to be posts page. This is likely the issue of timing it late enough that it is available, but early enough so that loop of posts doesn't interfere. I'd try to capture it early (in `template_redirect` hook or around that) an...
I replaced: ``` $page_id = [id of post]; ``` with: ``` $page_id = $wp_query->get_queried_object_id(); ``` Worked for me!
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
From quick test `$wp_query->get_queried_object_id()` should get page's ID when that page is set to be posts page. This is likely the issue of timing it late enough that it is available, but early enough so that loop of posts doesn't interfere. I'd try to capture it early (in `template_redirect` hook or around that) an...
For those of you who this still isn't working for, you will need to use some sort of add\_action (you can choose which one you want to use). For my example, this will return the current page ID without any problems, regardless of whether in a plugin folder, functions php, or elsewhere. ``` add_action('template_redirec...
7,805
Example of the code: ``` $page_id = 116; // 123 should be replaced with a specific Page's id from your site, which you can find by mousing over the link to edit that Page on the Manage Pages admin page. The id will be embedded in the query string of the URL, e.g. page.php?action=edit&post=123. $page_data = get_page( $...
2011/01/26
[ "https://wordpress.stackexchange.com/questions/7805", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/781/" ]
I replaced: ``` $page_id = [id of post]; ``` with: ``` $page_id = $wp_query->get_queried_object_id(); ``` Worked for me!
For those of you who this still isn't working for, you will need to use some sort of add\_action (you can choose which one you want to use). For my example, this will return the current page ID without any problems, regardless of whether in a plugin folder, functions php, or elsewhere. ``` add_action('template_redirec...