qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
5,667,802
How can I know the IP address of my iPhone simulator?
2011/04/14
[ "https://Stackoverflow.com/questions/5667802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/418029/" ]
Jep, like Todd said, the same as your machines IP. You can also simply visit <http://www.whatismyip.com> with mobile Safari or your Mac's web browser ;-)
I think the by visiting the website <http://www.test-ipv6.com/> is also a good choice. As the site tells you both the ipv4 and ipv6 global-unicast address
13,735,566
I have a method in MyWebpage.aspx.cs lik so: ``` public partial class MyWebpage : PageBase { private readonly DataAccessLayer dataAccessLayer; protected string GetMyTitle(string myVar, string myId) { if (string.IsNullOrEmpty(myVar)) { return string.Empty; } ret...
2012/12/06
[ "https://Stackoverflow.com/questions/13735566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/665557/" ]
First thing is accessing DAL from your code behind or presentation layer generally is not a good practice. Because in this case you need to put your Business logic code in your code behind(Presentation Layer) which causes conflicting of concerns, high coupling, duplication and many other issues. So, if you're look for ...
I'm a fan of the [repository pattern](http://martinfowler.com/eaaCatalog/repository.html). Everybody has their own take on it but I like the idea of one sql table => one repository and share the name, just like ORM tools. Entity Framework might make quick work of your DAL and you can still implement a DAL pattern lik...
3,460,650
I am interested in taking an arbitrary dict and copying it into a new dict, mutating it along the way. One mutation I would like to do is swap keys and value. Unfortunately, some values are dicts in their own right. However, this generates a "unhashable type: 'dict'" error. I don't really mind just stringifying the va...
2010/08/11
[ "https://Stackoverflow.com/questions/3460650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
### Python 3.x Use [`collections.abc.Hashable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Hashable) or [`typing.Hashable`](https://docs.python.org/3/library/typing.html#typing.Hashable). ``` >>> import typing >>> isinstance({}, typing.Hashable) False >>> isinstance(0, typing.Hashable) Tru...
``` def hashable(v): """Determine whether `v` can be hashed.""" try: hash(v) except TypeError: return False return True ```
3,460,650
I am interested in taking an arbitrary dict and copying it into a new dict, mutating it along the way. One mutation I would like to do is swap keys and value. Unfortunately, some values are dicts in their own right. However, this generates a "unhashable type: 'dict'" error. I don't really mind just stringifying the va...
2010/08/11
[ "https://Stackoverflow.com/questions/3460650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
``` def hashable(v): """Determine whether `v` can be hashed.""" try: hash(v) except TypeError: return False return True ```
All hashable built in python objects have a `.__hash__()` method. You can check for that. ``` olddict = {"a":1, "b":{"test":"dict"}, "c":"string", "d":["list"] } for key in olddict: if(olddict[key].__hash__): print str(olddict[key]) + " is hashable" else: print str(olddict[key]) + " is NOT hashable...
3,460,650
I am interested in taking an arbitrary dict and copying it into a new dict, mutating it along the way. One mutation I would like to do is swap keys and value. Unfortunately, some values are dicts in their own right. However, this generates a "unhashable type: 'dict'" error. I don't really mind just stringifying the va...
2010/08/11
[ "https://Stackoverflow.com/questions/3460650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
``` def hashable(v): """Determine whether `v` can be hashed.""" try: hash(v) except TypeError: return False return True ```
Why not use duck typing? ``` for key in olddict: try: newdict[olddict[key]] = key except TypeError: newdict[str(olddict[key])] = key ```
3,460,650
I am interested in taking an arbitrary dict and copying it into a new dict, mutating it along the way. One mutation I would like to do is swap keys and value. Unfortunately, some values are dicts in their own right. However, this generates a "unhashable type: 'dict'" error. I don't really mind just stringifying the va...
2010/08/11
[ "https://Stackoverflow.com/questions/3460650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
### Python 3.x Use [`collections.abc.Hashable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Hashable) or [`typing.Hashable`](https://docs.python.org/3/library/typing.html#typing.Hashable). ``` >>> import typing >>> isinstance({}, typing.Hashable) False >>> isinstance(0, typing.Hashable) Tru...
All hashable built in python objects have a `.__hash__()` method. You can check for that. ``` olddict = {"a":1, "b":{"test":"dict"}, "c":"string", "d":["list"] } for key in olddict: if(olddict[key].__hash__): print str(olddict[key]) + " is hashable" else: print str(olddict[key]) + " is NOT hashable...
3,460,650
I am interested in taking an arbitrary dict and copying it into a new dict, mutating it along the way. One mutation I would like to do is swap keys and value. Unfortunately, some values are dicts in their own right. However, this generates a "unhashable type: 'dict'" error. I don't really mind just stringifying the va...
2010/08/11
[ "https://Stackoverflow.com/questions/3460650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26227/" ]
### Python 3.x Use [`collections.abc.Hashable`](https://docs.python.org/3/library/collections.abc.html#collections.abc.Hashable) or [`typing.Hashable`](https://docs.python.org/3/library/typing.html#typing.Hashable). ``` >>> import typing >>> isinstance({}, typing.Hashable) False >>> isinstance(0, typing.Hashable) Tru...
Why not use duck typing? ``` for key in olddict: try: newdict[olddict[key]] = key except TypeError: newdict[str(olddict[key])] = key ```
54,558,489
I am using a simple groupby query in scala spark where the objective is to get the first value in the group in a sorted dataframe. Here is my spark dataframe ``` +---------------+------------------------------------------+ |ID |some_flag |some_type | Timestamp | +---------------+------------------...
2019/02/06
[ "https://Stackoverflow.com/questions/54558489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5453723/" ]
Just out of curiosity: ``` hash = Hash.new do |h, k| h[k] = h.dup.clear.extend(Module.new do define_method(:level, ->{ h.level - 1 }) end).tap { |this| raise "" if this.level <= 0 } end.extend(Module.new { define_method(:level, ->{ 5 }) }) #⇒ {} hash["0"]["1"]["2"]["3"] #⇒ {} hash["0"]["1"]["2"]["3...
You can use [`default_proc`](http://ruby-doc.org/core-2.3.0/Hash.html#method-i-default_proc) for this. The best explanation is that given in the docs: > > If Hash::new was invoked with a block, return that block, otherwise return nil. > > > So in this case, each new hash key is instantiated with its parent hash's...
84,438
I am building a website which requires the feeds facility (like what you have in Facebook or Google Plus). Facebook uses single column feeds, Google uses multi column feeds which are card based. **My Question:** Which layout is best suited for a good UI where the user gets enough attention to most of the feed cont...
2015/09/11
[ "https://ux.stackexchange.com/questions/84438", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/74484/" ]
I would go with a facebook based scroll but keep in mind that Infinite scrolling can decline your bounce rate. Time.com’s bounce rate down 15 percentage points since adopting continuous scroll...you can read about it here: <https://blog.growth.supply/13-mind-blowing-statistics-on-user-experience-48c1e1ede755> I think ...
As a frequent user of Google plus, I'd say: let the user decide. Depending on screen size and window size one might like to use a three or more column layout and others prefer wide items in a single column. Just create a simple slider widget to let them choose for their own and set a sensible default like 2 columns.
655,479
I’m still pretty new to powershell and practical implementations of it… but I created a script to monitor disk health and have some very bizarre results on 2012 R2. Wondering if anyone has seen the likes of this and/or has a solution… Or is it a bug? The script in question is: ``` $OutputFile=$env:temp + "\~VMRepl-St...
2014/12/30
[ "https://serverfault.com/questions/655479", "https://serverfault.com", "https://serverfault.com/users/10010/" ]
Alright, your problem is the use of the [`Out-String` cmdlet](http://technet.microsoft.com/en-us/library/hh849952.aspx). It has a default value of 80, though you can change that by defining a different width, with the `-Width` switch. Looks like you're 25 characters over, so you should be able to fix it by changing lin...
The console window has a different width when run from the scheduled task (if you could see the window it would look more like a standard black command prompt than the blue Powershell window you're used to seeing). This matters because you're using `ft` (`Format-Table`), which is typically used for output to a screen ...
63,424,453
I have a list of Twitter hashtags named `li`. I want to make a new list `top_10` of the most frequent hashtags from that. So far I have done ([#](https://stackoverflow.com/a/3594640/7673979)): ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus',...] tag_counter = dict() for tag in li: if tag in...
2020/08/15
[ "https://Stackoverflow.com/questions/63424453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7673979/" ]
Use [`collections.Counter`](https://docs.python.org/3/library/collections.html#collections.Counter) from the standard library ```py from collections import Counter list_of_words = ['hello', 'hello', 'world'] lowercase_words = [w.lower() for w in list_of_words] Counter(lowercase_words).most_common(1) ``` Returns: ...
You can use `Counter` from collections library ``` from collections import Counter li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus'] print(Counter([i.lower() for i in li]).most_common(10)) ``` Output: ``` [('covid19', 3), ('coronavirus', 2)] ```
63,424,453
I have a list of Twitter hashtags named `li`. I want to make a new list `top_10` of the most frequent hashtags from that. So far I have done ([#](https://stackoverflow.com/a/3594640/7673979)): ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus',...] tag_counter = dict() for tag in li: if tag in...
2020/08/15
[ "https://Stackoverflow.com/questions/63424453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7673979/" ]
Use [`collections.Counter`](https://docs.python.org/3/library/collections.html#collections.Counter) from the standard library ```py from collections import Counter list_of_words = ['hello', 'hello', 'world'] lowercase_words = [w.lower() for w in list_of_words] Counter(lowercase_words).most_common(1) ``` Returns: ...
See below ``` from collections import Counter lst = ['Ab','aa','ab','Aa','Cct','aA'] lower_lst = [x.lower() for x in lst ] counter = Counter(lower_lst) print(counter.most_common(1)) ```
63,424,453
I have a list of Twitter hashtags named `li`. I want to make a new list `top_10` of the most frequent hashtags from that. So far I have done ([#](https://stackoverflow.com/a/3594640/7673979)): ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus',...] tag_counter = dict() for tag in li: if tag in...
2020/08/15
[ "https://Stackoverflow.com/questions/63424453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7673979/" ]
Normalize data first, with lower or upper. ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus'] li = [x.upper() for x in li] # OR, li = [x.lower() for x in li] tag_counter = dict() for tag in li: if tag in tag_counter: tag_counter[tag] += 1 else: tag_counter[tag] = 1 popu...
You can use `Counter` from collections library ``` from collections import Counter li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus'] print(Counter([i.lower() for i in li]).most_common(10)) ``` Output: ``` [('covid19', 3), ('coronavirus', 2)] ```
63,424,453
I have a list of Twitter hashtags named `li`. I want to make a new list `top_10` of the most frequent hashtags from that. So far I have done ([#](https://stackoverflow.com/a/3594640/7673979)): ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus',...] tag_counter = dict() for tag in li: if tag in...
2020/08/15
[ "https://Stackoverflow.com/questions/63424453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7673979/" ]
Normalize data first, with lower or upper. ``` li = ['COVID19', 'Covid19', 'covid19', 'coronavirus', 'Coronavirus'] li = [x.upper() for x in li] # OR, li = [x.lower() for x in li] tag_counter = dict() for tag in li: if tag in tag_counter: tag_counter[tag] += 1 else: tag_counter[tag] = 1 popu...
See below ``` from collections import Counter lst = ['Ab','aa','ab','Aa','Cct','aA'] lower_lst = [x.lower() for x in lst ] counter = Counter(lower_lst) print(counter.most_common(1)) ```
4,095,009
I've used VS2008 on my development machine for some years now, with windows SDK v7.1. I've installed VS2010, and it's using the Windows SDK v7.0a, but I need it to use the Windows 7.1 SDK (which I had installed prior to installing VS2010). When I run the Windows SDK 7.1 configuration tool, to switch the Windows SDK i...
2010/11/04
[ "https://Stackoverflow.com/questions/4095009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For all those using *Visual Studio Command Prompt* I mention you have to modify `VCVarsQueryRegistry.bat` file (it's being called (indirectly) by `%VSINSTALLDIR%\VC\vcvarsall.bat`) which is placed in `%VSINSTALLDIR%\Common7\Tools` folder (typicaly `C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools`) by ...
Take a look at this page guys. This is going to solve your problems -> [Building Applications that Use the Windows SDK](http://msdn.microsoft.com/en-us/library/ff660764.aspx)
4,095,009
I've used VS2008 on my development machine for some years now, with windows SDK v7.1. I've installed VS2010, and it's using the Windows SDK v7.0a, but I need it to use the Windows 7.1 SDK (which I had installed prior to installing VS2010). When I run the Windows SDK 7.1 configuration tool, to switch the Windows SDK i...
2010/11/04
[ "https://Stackoverflow.com/questions/4095009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In project properties -> Configuration Properties -> General, set Platform Toolkit to WindowsSDK7.1 (or whatever version you want to use). Remember when you do this to select all configurations (release, debug, etc.) and all platforms (win32, x64, etc.) as appropriate. The documentation says you can set this option in ...
Take a look at this page guys. This is going to solve your problems -> [Building Applications that Use the Windows SDK](http://msdn.microsoft.com/en-us/library/ff660764.aspx)
20,943,369
I am trying to calculate the grand total of columns I just created with a SUM (if). I have a table with several product numbers but I want to get totals for specific products only. This is my query: ``` Select date(orders.OrderDate) As Date, Sum(If((orders.ProductNumber = '1'), orders.Qty, 0)) As `Product 1`, Sum(If((...
2014/01/06
[ "https://Stackoverflow.com/questions/20943369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/241067/" ]
Try this: ``` SELECT DATE(o.OrderDate) AS date, SUM(IF(o.ProductNumber = '1', o.Qty, 0)) AS `Product 1`, SUM(IF(o.ProductNumber = '2', o.Qty, 0)) AS `Product 2`, SUM(IF(o.ProductNumber = '3', o.Qty, 0)) AS `Product 3`, SUM(IF(o.ProductNumber IN ('1', '2', '3'), o.Qty, 0)) AS `Total` FROM ...
Simply pre-cutting rows other than 1, 2, 3. This is faster when `ProductNumber` is INDEXed column. ``` SELECT DATE(orders.OrderDate) AS Date, SUM(IF((orders.ProductNumber = '1'), orders.Qty, 0)) AS `Product 1`, SUM(IF((orders.ProductNumber = '2'), orders.Qty, 0)) AS `Product 2`, SUM(IF((orders.ProductNumbe...
26,939
How do you import a GIMP XCF File into Blender when running it on windows 7? I see all this stuff for how to do it in Linux, but is there anyway to do it with windows? And what is this <http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/Import-Export/GIMPImageToScene> talking about?
2015/03/10
[ "https://blender.stackexchange.com/questions/26939", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/13088/" ]
There is an "import GIMP" addon currently available, but it doesn't look like it's very stable at this point. You can activate it under *User Preferences > Addons > Import GIMP to scene*. Use key search word GIMP to locate it. Then it just a matter of opening the import menu, selecting xcf and importing the file. like ...
Xcftools requires compiling, which it was designed for within a Unix environment. On windows 7/later. Also keep an eye on the console for any errors, and what line those errors appear on while using the *Import GIMP to scene* script. You can use Notepad++/blender's script editor to check these. An alternative however ...
38,229,947
Here is the html code I am using: ``` <div class="container"> <div class="row"> <div class='col-sm-6'> <div class="form-group"> <div class='input-group date' id='datetimepicker1'> <input type='text' class="form-control" data-ng-model="dateOfCal" /> ...
2016/07/06
[ "https://Stackoverflow.com/questions/38229947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6557260/" ]
Use this query only: ``` SELECT A,B,C AS LEN,D,E FROM TABLE1 ``` On your form, hide the textbox bound to LEN. Create a new unbound textbox, say, txtLEN. Now use code like this where SelectMetric is the checkbox to mark when using metric values: ``` Private Sub Form_Current() Dim Factor As Currency If Me...
Just change what is displayed in the textbox. Set up the text box to have a control source of ``` =Length*txtConversionFactor ``` Where `txtConversionFactor` is a hidden textbox which either has `1` in it if your units are to be displayed in feet or 0.3048 if they are to be displayed in meters. It could even be a co...
39,079,165
I have about 12 databases, each with 50 tables and most of them with 30+ columns; the db was running in strict mode as OFF, but now we had to migrate the db to cleardb service which by default has strict mode as ON. all the tables that had "Not Null" constraint, the inserts have stopped working, just because the defaul...
2016/08/22
[ "https://Stackoverflow.com/questions/39079165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1251674/" ]
You should consider using the `information_schema` tables to generate DDL statements to alter the tables. This kind of query will get you the list of offending columns. ``` SELECT CONCAT_WS('.',TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME) col FROM information_schema.COLUMNS WHERE IS_NULLABLE = 0 AND LENGTH(COLUMN_D...
This is what I came up with on the base of @Ollie-jones script <https://gist.github.com/brijrajsingh/efd3c273440dfebcb99a62119af2ecd5> ``` SELECT CONCAT_WS('.',TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME) col,CONCAT('alter table ',TABLE_NAME,' MODIFY COLUMN ', COLUMN_NAME,' ',DATA_TYPE,'(',CHARACTER_MAXIMUM_LENGTH,') NUL...
62,350
I wanted to speed up my rendering time, and I found that using GPU speed up a lot. But I don't have a very fast GPU (NVIDIA GeForce 320M 256 MB), so I want to know what do the difference between using GPU or CPU, so I would compare my CPU (2,66 GHz Intel Core 2 Duo) with my GPU (NVIDIA GeForce 320M 256 MB).
2016/09/04
[ "https://blender.stackexchange.com/questions/62350", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/29230/" ]
Gpu's have many cores (yours may have 72 cores) but they run at lower speed (frequency) .Gpu cores can understand simpier instructions that a cpu core can understand.Cpu has much less cores than gpu cores but they run at higher frequency and they understand complex set of instructions.These are some key differences.
A GPU can usually render faster than a CPU.Try rendering a single frame with your gpu and then your cpu and see witch one is faster.
29,431,694
``` import UIKit class ViewController: UIViewController { @IBOutlet weak var yourScore: UITextField! @IBOutlet weak var totalScore: UITextField! @IBOutlet weak var labelText: UILabel! @IBAction func buttonPressed(sender: AnyObject) { let score1: Int = yourScore.text.toInt()! let score2: Int = totalScore.text....
2015/04/03
[ "https://Stackoverflow.com/questions/29431694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3887815/" ]
jQuery can help: ``` <div id="my_div">image here</div> <script> $(function(){ $("#my_div").hover(function(){ // Put here some action for onMouseOver }, function(){ // Put here some action for onMouseOut }); }); </script> ``` Or even: ``` <div id="my_div">image here</div> <script> $( "#...
```html <html> <script language="javascript"> function chng() { alert("mouseout"); } </script> <body> <div onmouseout="chng()"> //Image Here </div> </body> </html> ```
3,014,004
chi-square test(principle used in C4.5's CVP Pruning), also called chi-square statistics, also called chi-square goodness-of fit How to prove **$\sum\_{i=1}^{i=r}\sum\_{j=1}^{j=c}\frac{(x\_{ij}-E\_{ij} )^2}{E\_{ij}} = \chi^2\_{(r-1)(c-1)}$** where $E\_{ij}=\frac{N\_i·N\_j}{N}$, $N$ is the total counts of the whol...
2018/11/26
[ "https://math.stackexchange.com/questions/3014004", "https://math.stackexchange.com", "https://math.stackexchange.com/users/553237/" ]
The proof uses $x\_{ij}\approx\operatorname{Poisson}(E\_{ij})\approx N(E\_{ij},\,E\_{ij})$. The reason for $k-1$ is that $\sum\_i N\_i=N$ removes a degree of freedom. The reason for $\Theta\le 1$ is because the $\theta\_i$ are probabilities.
<https://blog.csdn.net/appleyuchi/article/details/84567158> I try to prove it from multi-nominal distribution. The above link is my record,NOT very rigorous, If there are something wrong ,please let me know,thanks. If there are other proof which is much easier to understand ,please let me know,thanks. Many thanks f...
9,460,035
I have an excel file in which there are 10 columns with the data starting from: ``` Text1 | Text4 | Text7 Text2 | Text5 | Text8 Text3 | Text6 | Text9 ``` For my requirement, I have to remove the part `Text` from all these cells. How is this done in Excel? I am a complete newbie to this.
2012/02/27
[ "https://Stackoverflow.com/questions/9460035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/458790/" ]
You can do this directly with your data without formula **Manually** * Select the area of interest * Press Ctrl & F to bring up the Find and Replace dialog * Select the ‘Replace’ tab * Under ‘Find what’ put `Text`, leave ‘Replace With’ blank * Ensure ‘Match entire cell content’ is unchecked ![sample](https://i.stack...
Use a formula: ``` =VALUE(SUBSTITUTE(A1,"Text","")) ```
9,460,035
I have an excel file in which there are 10 columns with the data starting from: ``` Text1 | Text4 | Text7 Text2 | Text5 | Text8 Text3 | Text6 | Text9 ``` For my requirement, I have to remove the part `Text` from all these cells. How is this done in Excel? I am a complete newbie to this.
2012/02/27
[ "https://Stackoverflow.com/questions/9460035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/458790/" ]
You can do this directly with your data without formula **Manually** * Select the area of interest * Press Ctrl & F to bring up the Find and Replace dialog * Select the ‘Replace’ tab * Under ‘Find what’ put `Text`, leave ‘Replace With’ blank * Ensure ‘Match entire cell content’ is unchecked ![sample](https://i.stack...
Assuming the first cell is A1 type this in the formula bar = Mid(A1, 5, Len(A1) -4) you can fill series for the other cells.
9,460,035
I have an excel file in which there are 10 columns with the data starting from: ``` Text1 | Text4 | Text7 Text2 | Text5 | Text8 Text3 | Text6 | Text9 ``` For my requirement, I have to remove the part `Text` from all these cells. How is this done in Excel? I am a complete newbie to this.
2012/02/27
[ "https://Stackoverflow.com/questions/9460035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/458790/" ]
You can do this directly with your data without formula **Manually** * Select the area of interest * Press Ctrl & F to bring up the Find and Replace dialog * Select the ‘Replace’ tab * Under ‘Find what’ put `Text`, leave ‘Replace With’ blank * Ensure ‘Match entire cell content’ is unchecked ![sample](https://i.stack...
Find and replace tool works well, if the "text" varies though it will no longer work. For future people looking for a fix for a similar problem but where the text is different then you just place " \*" in the find what box then replace. (don't use the quote marks but do put in a space before the \*) This removes any e...
18,652,495
The question is simple. I have a lot of ajax functions all across my application. Some examples are - ``` $.ajax({ type: "POST", url: "http://www.dev.com/login/", data: data, success: function(result) { //success }, dataType: "json", }); $.ajax({ ...
2013/09/06
[ "https://Stackoverflow.com/questions/18652495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/478377/" ]
You can set `data-url` for DOM and make ajax request according to that `data-url` **Example** ``` <a data-url="http://somelocation/login" >login</a> <a data-url="http://somelocation/register" >Register</a> ``` Then you can get this data url into ajax url as below, ``` url: $(this).data('url'), ``` and you are do...
As what I understand you require this ``` $(document).bind("beforeSend", function(){ // this.url; do whatever you want to do with url }); ``` However I had not try with changing that url, you need to google for it.
18,652,495
The question is simple. I have a lot of ajax functions all across my application. Some examples are - ``` $.ajax({ type: "POST", url: "http://www.dev.com/login/", data: data, success: function(result) { //success }, dataType: "json", }); $.ajax({ ...
2013/09/06
[ "https://Stackoverflow.com/questions/18652495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/478377/" ]
You can use the `$.ajaxSetup()` to set the required extra data with all the Ajax call made by the page through jQuery. ``` $.ajaxSetup({ data: {apikey:"#####"} }); ``` Check the API over here <http://api.jquery.com/jQuery.ajaxSetup/> You can check the console to see the parameters send to url. <http://jsfiddle....
As what I understand you require this ``` $(document).bind("beforeSend", function(){ // this.url; do whatever you want to do with url }); ``` However I had not try with changing that url, you need to google for it.
82,791
Preface ======= I've installed gravity forms, created a form and users are submitting data to my site. What I want to do is show the data users are submitting to my site on one of my pages. I know there's the [Gravity Forms Directory](http://wordpress.org/extend/plugins/gravity-forms-addons/) plugin. But this gives o...
2013/01/23
[ "https://wordpress.stackexchange.com/questions/82791", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/15010/" ]
You can look at the docs, but you'll probably end up reading the *real* documentation: the source code. If you do, you'll find that: * `GFFormsModel::get_leads($form_id)` returns a list of entries for a form (maybe you know that one already), where each item in the array is itself an array, an "[Entry object](http://...
You could use a `gform_after_submission` hook to write everything you need to a custom post type, which might be easier to manipulate "out in the field", and will be safe from, say, someone deleting a single field and obliterating all the data associated with it. <http://www.gravityhelp.com/documentation/page/Gform_a...
82,791
Preface ======= I've installed gravity forms, created a form and users are submitting data to my site. What I want to do is show the data users are submitting to my site on one of my pages. I know there's the [Gravity Forms Directory](http://wordpress.org/extend/plugins/gravity-forms-addons/) plugin. But this gives o...
2013/01/23
[ "https://wordpress.stackexchange.com/questions/82791", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/15010/" ]
You can look at the docs, but you'll probably end up reading the *real* documentation: the source code. If you do, you'll find that: * `GFFormsModel::get_leads($form_id)` returns a list of entries for a form (maybe you know that one already), where each item in the array is itself an array, an "[Entry object](http://...
Thanks to webaware for their answer. Here's some copy/pasta for anyone looking for a quick start. This takes an entry ID and retrieves the lead and form from that. In this case I'm using the URL to pass the value. e.g. somedomain.com?entry=123. ``` <?php $lead_id = $_GET['entry']; $lead = RGFormsModel::get_...
82,791
Preface ======= I've installed gravity forms, created a form and users are submitting data to my site. What I want to do is show the data users are submitting to my site on one of my pages. I know there's the [Gravity Forms Directory](http://wordpress.org/extend/plugins/gravity-forms-addons/) plugin. But this gives o...
2013/01/23
[ "https://wordpress.stackexchange.com/questions/82791", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/15010/" ]
Thanks to webaware for their answer. Here's some copy/pasta for anyone looking for a quick start. This takes an entry ID and retrieves the lead and form from that. In this case I'm using the URL to pass the value. e.g. somedomain.com?entry=123. ``` <?php $lead_id = $_GET['entry']; $lead = RGFormsModel::get_...
You could use a `gform_after_submission` hook to write everything you need to a custom post type, which might be easier to manipulate "out in the field", and will be safe from, say, someone deleting a single field and obliterating all the data associated with it. <http://www.gravityhelp.com/documentation/page/Gform_a...
24,856,143
I'm trying to figure out the best way to take a json object which I'm storing as a scope, and filter/query it to display specific data from within it. For example: ``` $scope.myBook = {"bookName": "Whatever", "pages": [ {"pageid": 1, "pageBody": "html content for the page", "pageTitle": "Page 1"}, ...
2014/07/21
[ "https://Stackoverflow.com/questions/24856143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1165935/" ]
You can use this approach: template: ``` <div ng-repeat="page in myBook.pages | filter:pageMatch(pageid)"> {{ page.pageBody }} </div> ``` scope: ``` $scope.pageMatch = function(pageid) { return function(page) { return page.pageid === pageid; }; }; ``` Set `pageid` to needed value in `filter:p...
``` function getPage (id) { angular.forEach($scope.myBook.pages, function (page, pageIndex) { if (page.pageId == id) { console.log("Do something here."); return page; } }); } ``` Otherwise . . . ``` $scope.myBook.pages[1]; ```
24,856,143
I'm trying to figure out the best way to take a json object which I'm storing as a scope, and filter/query it to display specific data from within it. For example: ``` $scope.myBook = {"bookName": "Whatever", "pages": [ {"pageid": 1, "pageBody": "html content for the page", "pageTitle": "Page 1"}, ...
2014/07/21
[ "https://Stackoverflow.com/questions/24856143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1165935/" ]
You can use this approach: template: ``` <div ng-repeat="page in myBook.pages | filter:pageMatch(pageid)"> {{ page.pageBody }} </div> ``` scope: ``` $scope.pageMatch = function(pageid) { return function(page) { return page.pageid === pageid; }; }; ``` Set `pageid` to needed value in `filter:p...
I ended up asking the AngularJS IRC - And one of the guys put this plunker together with exactly what I was looking for. [Plnkr Example](http://plnkr.co/edit/7MT8hVDssf3CG1GfKrJW?p=preview) Props to <https://github.com/robwormald> for the answer. ``` /* See PLNKR Link Above for the answer */ ```
64,161,202
Using rxjs, I would like to make a group of http calls with the value returned from a previous call. I would like the inner calls to execute in parallel. I also need to return the value from the first call as soon as it is available. I need to be able to subscribe to the result and handle any errors. Errors produced by...
2020/10/01
[ "https://Stackoverflow.com/questions/64161202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140377/" ]
Because `std::move` is basically just a cast that doesn't actually move anything! You need to update the values in the other object yourself: ``` DemoVector(DemoVector&& rhs) { data_ = rhs.data_; size_ = rhs.size_; capacity_ = rhs.capacity_; rhs.data_ = nullptr; rhs.size_ = 0; rhs.capacity = 0;...
`std::move(rhs.data_)` doesn't actually move anything. `std::move` is nothing more than a named *cast*. It produces an rvalue reference that *allows* move semantics to occur. But for primitive types, it's just a copy operation. The pointer is being copied, and so you end up with two pointers that contain the same addre...
2,577,627
Using explode i have converted the string into array , But the array look like Array ( [0] => root) But i want i make my array somthing like Array ( [root] => root) How to make this manner.. Thanks
2010/04/05
[ "https://Stackoverflow.com/questions/2577627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/246963/" ]
``` $array = explode($separator, $some_string); $array = array_combine($array, $array); ```
You could make it an associative array like so: ``` $exploded = explode (.......); $exploded_associative = array(); foreach ($exploded as $part) if ($part) $exploded_associative[$part] = $part; print_r($exploded_associative); // Will output "root" => "root" .... ``` what exactly do you need this for?
21,070,555
I'm making Connect Four for computer science class as my CPT. SO far I've created the panels but I am having an issue. What I am trying to do is make one panel per slot on the board and fill it with a picture of an empty slot of a connect four board, and when every spot is combined, it'll look like a complete connect f...
2014/01/12
[ "https://Stackoverflow.com/questions/21070555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2871898/" ]
I think you want to and a new JPanel instead of just making it = to the empty panel. What's happening is that you are trying to add one component to a parent containter multiple times, which won't work. A component can only be added *once*. So you the result you're getting, is the only the gridPanel slot being added an...
You need to actually create 42 panels. Currently you have an array with 42 references to the same panel. Change the fillGrid method, so it calls the constructor of JPanel and set the necessary Label etc. (like you do above). Then add it to the GridLayout.
66,073,565
I'm trying to do a time calculator using the input type="time" value, but getting NaN as a result. Here's my code: ```js document.getElementById("MathButton").onclick = timeCalc; function timeCalc() { let startTime = document.getElementById("startTime").value; let endTime = document.getElementById("endTime")...
2021/02/06
[ "https://Stackoverflow.com/questions/66073565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15019190/" ]
Here you go ```js document.getElementById("MathButton").onclick = timeCalc; function timeCalc() { let startTime = document.getElementById("startTime").value; let endTime = document.getElementById("endTime").value; //create date format var timeStart = new Date("01/01/2007 " + startTime ); ...
You can't just subtract two string first you have to convert them to integers to apply mathematical operations to them. Just split them by ':' like- ``` startTime.split(":") endTime.split(":") diff = toString(startTime[0]- startTime[0])+":"+toString(startTime[1]- startTime[1]) `...
66,073,565
I'm trying to do a time calculator using the input type="time" value, but getting NaN as a result. Here's my code: ```js document.getElementById("MathButton").onclick = timeCalc; function timeCalc() { let startTime = document.getElementById("startTime").value; let endTime = document.getElementById("endTime")...
2021/02/06
[ "https://Stackoverflow.com/questions/66073565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15019190/" ]
Subtracting two strings will result into NaN. Here, I have converted both the strings to date first and then subtracted it. Since substracting two dates gives the result in millisecond, `result/ 60 /60 /1000` converts it to hours. ```js document.getElementById("MathButton").onclick = timeCalc; function timeCalc() ...
You can't just subtract two string first you have to convert them to integers to apply mathematical operations to them. Just split them by ':' like- ``` startTime.split(":") endTime.split(":") diff = toString(startTime[0]- startTime[0])+":"+toString(startTime[1]- startTime[1]) `...
389,850
I need to use a VPN on my mac from time to time. While I'm doing so, it interferes with the ability to use AirDrop and Sidecar. My VPN has the ability to whitelist certain apps, so is there a collection of 'apps' that AirPlay and/or Sidecar uses? I think Sidecar doesn't work with a wired connection when the VPN is on....
2020/04/29
[ "https://apple.stackexchange.com/questions/389850", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/189019/" ]
VPN can be set up to be compatible with both sidecar and airdrop. The process of installing some VPN also can and will break these both if desired or they are targeted for blocking. The details matter of the network setup since macOS can have multiple networks assigned to one physical interface and software like VPN a...
(This solved my similar issue with Airdrop, not tested Sidecar yet.) I do not have VPN at router but on individual devices, so VPN broke my iCloud copy/paste and airdrop. It may be because they were not "sharing" the same wifi network anymore, as in, they had two different data tunnels, and the only solution I found w...
60,340,394
**I'm learning reactjs I started with installing nodejs and then ran these commands inside my project folder "React"** ``` npx create-react-app hello-world cd hello-world npm start ``` **but then instead of going to the browser i receive error:** > > npm ERR! missing script: start > > > npm ERR! A complete log ...
2020/02/21
[ "https://Stackoverflow.com/questions/60340394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
npm scripts are missing inside your `package.json` file > > npm ERR! missing script: start > > > Edit your `package.json` as follows: ``` { "name": "hello-world", "version": "0.1.0", "private": true, "scripts": { "start": "react-scripts start", "build": "react-scripts build" }, "dependencies"...
I was also facing almost same type of problem. But then tried `yarn create react-app my-app` in power shell with admin privilege which seemed to do the trick. > > Also you’ll need to have Node >= 8.10, yarn >= 0.25+ on your machine > as the official doc suggests. > > >
48,006,138
I am trying to sort several datasets in SAS using a loop within a macro, using a list of numbers, some of which have leading zeros, within dataset names (eg., in the example code, a list of `01,02`), and this code will also guide some other loops I would like to build. I used the SAS guidance on looping through a non...
2017/12/28
[ "https://Stackoverflow.com/questions/48006138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3556010/" ]
The macro quoting is confusing the parser into thinking the macro quoting signals the start of a new token. You can either add `%unquote()` to remove the macro quoting. ``` proc sort data=%unquote(dir12&value) out=%unquote(dir12sorted&value) nodupkey; ``` Or just don't add the macro quoting to begin with. ``` %let ...
The macro declaration option `/PARMBUFF` is used to make the automatic macro variable `SYSPBUFF` available for scanning an arbitrary number of comma separated values passed as arguments. ``` %macro loops1/parmbuff; %local index token; %do index = 1 %to %length(&syspbuff); %let token=%scan(&syspbuff,&index); ...
48,006,138
I am trying to sort several datasets in SAS using a loop within a macro, using a list of numbers, some of which have leading zeros, within dataset names (eg., in the example code, a list of `01,02`), and this code will also guide some other loops I would like to build. I used the SAS guidance on looping through a non...
2017/12/28
[ "https://Stackoverflow.com/questions/48006138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3556010/" ]
The macro quoting is confusing the parser into thinking the macro quoting signals the start of a new token. You can either add `%unquote()` to remove the macro quoting. ``` proc sort data=%unquote(dir12&value) out=%unquote(dir12sorted&value) nodupkey; ``` Or just don't add the macro quoting to begin with. ``` %let ...
Since you're looping over dates, I think something like this may be more helpful in the long run: ``` %macro date_loop(start, end); %let start=%sysfunc(inputn(&start, anydtdte9.)); %let end=%sysfunc(inputn(&end, anydtdte9.)); %let dif=%sysfunc(intck(month, &start, &end)); %do i=0 %to &dif; %l...
48,006,138
I am trying to sort several datasets in SAS using a loop within a macro, using a list of numbers, some of which have leading zeros, within dataset names (eg., in the example code, a list of `01,02`), and this code will also guide some other loops I would like to build. I used the SAS guidance on looping through a non...
2017/12/28
[ "https://Stackoverflow.com/questions/48006138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3556010/" ]
The macro declaration option `/PARMBUFF` is used to make the automatic macro variable `SYSPBUFF` available for scanning an arbitrary number of comma separated values passed as arguments. ``` %macro loops1/parmbuff; %local index token; %do index = 1 %to %length(&syspbuff); %let token=%scan(&syspbuff,&index); ...
Since you're looping over dates, I think something like this may be more helpful in the long run: ``` %macro date_loop(start, end); %let start=%sysfunc(inputn(&start, anydtdte9.)); %let end=%sysfunc(inputn(&end, anydtdte9.)); %let dif=%sysfunc(intck(month, &start, &end)); %do i=0 %to &dif; %l...
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
You probably haven't installed GLUT: 1. Install GLUT If you do not have GLUT installed on your machine you can download it from: <http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip> (or whatever version) GLUT Libraries and header files are • glut32.lib • glut.h Source: <http://cacs.usc.edu/education/cs596/OGL_Setu...
Here you can find every thing you need: <http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/#win>
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
You probably haven't installed GLUT: 1. Install GLUT If you do not have GLUT installed on your machine you can download it from: <http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip> (or whatever version) GLUT Libraries and header files are • glut32.lib • glut.h Source: <http://cacs.usc.edu/education/cs596/OGL_Setu...
If you are using Visual Studio Community 2015 and trying to Install GLUT you should place the header file `glut.h` in `C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl`
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
You probably haven't installed GLUT: 1. Install GLUT If you do not have GLUT installed on your machine you can download it from: <http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip> (or whatever version) GLUT Libraries and header files are • glut32.lib • glut.h Source: <http://cacs.usc.edu/education/cs596/OGL_Setu...
Try to change `#include <gl/glut.h>` to `#include "gl/glut.h"` in Visual Studio 2013.
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
You probably haven't installed GLUT: 1. Install GLUT If you do not have GLUT installed on your machine you can download it from: <http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip> (or whatever version) GLUT Libraries and header files are • glut32.lib • glut.h Source: <http://cacs.usc.edu/education/cs596/OGL_Setu...
Visual Studio Community 2017 ============================ Go here : `C:\Program Files (x86)\Windows Kits\10` and do whatever you were supposed to go in the given directory for **VS 13**. in the lib folder, you will find some versions, I copied the **32-bit glut.lib** files in **amd** and **x86** and **64-bit glut.li...
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
If you are using Visual Studio Community 2015 and trying to Install GLUT you should place the header file `glut.h` in `C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl`
Here you can find every thing you need: <http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/#win>
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
Visual Studio Community 2017 ============================ Go here : `C:\Program Files (x86)\Windows Kits\10` and do whatever you were supposed to go in the given directory for **VS 13**. in the lib folder, you will find some versions, I copied the **32-bit glut.lib** files in **amd** and **x86** and **64-bit glut.li...
Here you can find every thing you need: <http://web.eecs.umich.edu/~sugih/courses/eecs487/glut-howto/#win>
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
If you are using Visual Studio Community 2015 and trying to Install GLUT you should place the header file `glut.h` in `C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl`
Try to change `#include <gl/glut.h>` to `#include "gl/glut.h"` in Visual Studio 2013.
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
If you are using Visual Studio Community 2015 and trying to Install GLUT you should place the header file `glut.h` in `C:\Program Files (x86)\Windows Kits\8.1\Include\um\gl`
Visual Studio Community 2017 ============================ Go here : `C:\Program Files (x86)\Windows Kits\10` and do whatever you were supposed to go in the given directory for **VS 13**. in the lib folder, you will find some versions, I copied the **32-bit glut.lib** files in **amd** and **x86** and **64-bit glut.li...
10,467,473
I was doing some OpenGL programming in C++. This is part of my code: ``` #include <time.h> #include <windows.h> #include <gl/gl.h> #include <gl/glu.h> #include <gl/glut.h> <<< Error here "Cannot open source file gl/glut.h" ``` How can I fix this? EDIT: I am using Microsoft Visual C++ Express Edition. Sorry forgot ...
2012/05/06
[ "https://Stackoverflow.com/questions/10467473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1369403/" ]
Visual Studio Community 2017 ============================ Go here : `C:\Program Files (x86)\Windows Kits\10` and do whatever you were supposed to go in the given directory for **VS 13**. in the lib folder, you will find some versions, I copied the **32-bit glut.lib** files in **amd** and **x86** and **64-bit glut.li...
Try to change `#include <gl/glut.h>` to `#include "gl/glut.h"` in Visual Studio 2013.
37,243
Following situation: * Application is only accessible via HTTPS/SPDY * nginx is sending the SSL session ID to the upstream server * Upon session start I'd like to use the first 128 characters of that string * In PHP: `$csrf_token = substr($_SERVER["SSL_SESSION_ID"], 0, 128);` * The CSRF token is stored on the server i...
2013/06/10
[ "https://security.stackexchange.com/questions/37243", "https://security.stackexchange.com", "https://security.stackexchange.com/users/27000/" ]
You can do this but the moment your app grows larger and needs ssl offloading it will break. Also take care about the length as you are exposing a part of the ssl session id which is responsible for protecting your CIA. If you would take a too large part of the Id or all of it and an attacker would be able to get it th...
Re-purposing crypto datapoints for other purposes is one of the capital sins of data security. There is no logical reason to do what you are suggesting. And whether or not a specific vulnerability for what you are suggesting is immediately available, it's still a bad idea. Just use a random value, which is the known,...
28,657
The common wisdom is to store all of your vegetable trimmings (cleaned) in the freezer, and then chuck everything into the stock pot when it's time to make stock. For a meat stock, it's common to throw the bones, giblets, neck and any other left-over bits into the stock pot as well. There must be some things which are...
2012/11/26
[ "https://cooking.stackexchange.com/questions/28657", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/1685/" ]
You want to avoid salt, until the time of use--especially after reduction. Similarly, unless you know the use for the stock in advance you might want to avoid strong herbs like sage or lemongrass. Tomatoes probably are not suitable in my opinion for most meat stocks. And no fingers. Definitely avoid the fingers in t...
The only avoidance I've ever heard is staying away from the Liver in your stock recipes, at least until the last few minutes of cooking. This can apparently make your stock bitter. Other than that, I'd say experiment with anything you want. The worst that can happen is you get a funny taste so long as you're cooking e...
28,657
The common wisdom is to store all of your vegetable trimmings (cleaned) in the freezer, and then chuck everything into the stock pot when it's time to make stock. For a meat stock, it's common to throw the bones, giblets, neck and any other left-over bits into the stock pot as well. There must be some things which are...
2012/11/26
[ "https://cooking.stackexchange.com/questions/28657", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/1685/" ]
There isn't anything that is necessarily "bad" or should always be avoided in stock, but some ingredients have qualities you won't always want. * Dark greens (spinach, kale, etc) can make a stock bitter and of course greenish in color. Cabbage also can impart a overwhelming bitterness. * Potatoes can cloud a stock fro...
The only avoidance I've ever heard is staying away from the Liver in your stock recipes, at least until the last few minutes of cooking. This can apparently make your stock bitter. Other than that, I'd say experiment with anything you want. The worst that can happen is you get a funny taste so long as you're cooking e...
28,657
The common wisdom is to store all of your vegetable trimmings (cleaned) in the freezer, and then chuck everything into the stock pot when it's time to make stock. For a meat stock, it's common to throw the bones, giblets, neck and any other left-over bits into the stock pot as well. There must be some things which are...
2012/11/26
[ "https://cooking.stackexchange.com/questions/28657", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/1685/" ]
There isn't anything that is necessarily "bad" or should always be avoided in stock, but some ingredients have qualities you won't always want. * Dark greens (spinach, kale, etc) can make a stock bitter and of course greenish in color. Cabbage also can impart a overwhelming bitterness. * Potatoes can cloud a stock fro...
You want to avoid salt, until the time of use--especially after reduction. Similarly, unless you know the use for the stock in advance you might want to avoid strong herbs like sage or lemongrass. Tomatoes probably are not suitable in my opinion for most meat stocks. And no fingers. Definitely avoid the fingers in t...
14,877,390
I have a user table that stores data about the user. Let's say one of those things I need to store is about all the widget manufacturers that the user uses. I need to get data about each of those manufacturers (from the manufacturers table) to present to the user. In the user table should I store the users manufacturer...
2013/02/14
[ "https://Stackoverflow.com/questions/14877390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631642/" ]
Do not put multiple values into a single column and then split them out. This is much slower for querying as each of the values cannot be indexed. You are much better off having a table with a separate record for each one. You can index this table and your queries will run much faster.
Separate table is the only the way to go. To order your results in descending order just add `DESC` keyword ``` SELECT manufacturer FROM user_man WHERE user=1 ORDER BY `order` DESC ```
14,877,390
I have a user table that stores data about the user. Let's say one of those things I need to store is about all the widget manufacturers that the user uses. I need to get data about each of those manufacturers (from the manufacturers table) to present to the user. In the user table should I store the users manufacturer...
2013/02/14
[ "https://Stackoverflow.com/questions/14877390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631642/" ]
Do not put multiple values into a single column and then split them out. This is much slower for querying as each of the values cannot be indexed. You are much better off having a table with a separate record for each one. You can index this table and your queries will run much faster.
The common approach would be to have a table user (like yours but without the widget\_man\_id): **user** ``` id | username | password | etc 1 | bob | **** | some data 2 | don | ***** | some more data ``` A manufacturer table: **manufacturer** ``` id | name | etc 1 | man1 | some data...
14,877,390
I have a user table that stores data about the user. Let's say one of those things I need to store is about all the widget manufacturers that the user uses. I need to get data about each of those manufacturers (from the manufacturers table) to present to the user. In the user table should I store the users manufacturer...
2013/02/14
[ "https://Stackoverflow.com/questions/14877390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631642/" ]
What you are trying to implement here is a [Many-to-Many](http://en.wikipedia.org/wiki/Many-to-many_%28data_model%29) relationship between your `Users` and `Manufacturers`. The only good way to do this in most RDBMS, such as MySQL, is through a [Junction Table](http://en.wikipedia.org/wiki/Junction_table). Although it...
Separate table is the only the way to go. To order your results in descending order just add `DESC` keyword ``` SELECT manufacturer FROM user_man WHERE user=1 ORDER BY `order` DESC ```
14,877,390
I have a user table that stores data about the user. Let's say one of those things I need to store is about all the widget manufacturers that the user uses. I need to get data about each of those manufacturers (from the manufacturers table) to present to the user. In the user table should I store the users manufacturer...
2013/02/14
[ "https://Stackoverflow.com/questions/14877390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/631642/" ]
What you are trying to implement here is a [Many-to-Many](http://en.wikipedia.org/wiki/Many-to-many_%28data_model%29) relationship between your `Users` and `Manufacturers`. The only good way to do this in most RDBMS, such as MySQL, is through a [Junction Table](http://en.wikipedia.org/wiki/Junction_table). Although it...
The common approach would be to have a table user (like yours but without the widget\_man\_id): **user** ``` id | username | password | etc 1 | bob | **** | some data 2 | don | ***** | some more data ``` A manufacturer table: **manufacturer** ``` id | name | etc 1 | man1 | some data...
21,477,011
I'm totally new to Java language. It is difficult for me to efficiently manipulate strings although I've learned many things about the String class and fIle I/O. After writing some codes, I found that the split method in the String class is not a panacea. I'd like to parse this text file like ``` 1 (201, <202,203>),...
2014/01/31
[ "https://Stackoverflow.com/questions/21477011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1889192/" ]
Since you want to extract the *numeric* values of each lines, I would recommend you take a look at the [`Pattern`](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) class. A simple piece of code like the one below: ``` String str = "1 (201, <202,203>), (203, <204,208>), (204, <>)"; Pattern...
``` 1 (201, <202,203>), (203, <204,208>), (204, <>) ``` Remove all of the `()` and `<>`. Then use `split()` to get the individual tokens, and finally parse them as `integers`. **Example** ``` String input = scanner.readLine(); // your input. input = input.replaceAll("\\(\\)", ""); input = input.replaceAll("<>"...
21,477,011
I'm totally new to Java language. It is difficult for me to efficiently manipulate strings although I've learned many things about the String class and fIle I/O. After writing some codes, I found that the split method in the String class is not a panacea. I'd like to parse this text file like ``` 1 (201, <202,203>),...
2014/01/31
[ "https://Stackoverflow.com/questions/21477011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1889192/" ]
You can use StringTokenizer class as well. Code is as simple as follows: import java.util.StringTokenizer; public class App { public static void main(String[] args) { ``` String str = "1 (201, <202,203>), (203, <204,208>), (204, <>)"; StringTokenizer st = new StringTokenizer( str, " ,()<>" ); while (...
``` 1 (201, <202,203>), (203, <204,208>), (204, <>) ``` Remove all of the `()` and `<>`. Then use `split()` to get the individual tokens, and finally parse them as `integers`. **Example** ``` String input = scanner.readLine(); // your input. input = input.replaceAll("\\(\\)", ""); input = input.replaceAll("<>"...
21,477,011
I'm totally new to Java language. It is difficult for me to efficiently manipulate strings although I've learned many things about the String class and fIle I/O. After writing some codes, I found that the split method in the String class is not a panacea. I'd like to parse this text file like ``` 1 (201, <202,203>),...
2014/01/31
[ "https://Stackoverflow.com/questions/21477011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1889192/" ]
Since you want to extract the *numeric* values of each lines, I would recommend you take a look at the [`Pattern`](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) class. A simple piece of code like the one below: ``` String str = "1 (201, <202,203>), (203, <204,208>), (204, <>)"; Pattern...
You can use StringTokenizer class as well. Code is as simple as follows: import java.util.StringTokenizer; public class App { public static void main(String[] args) { ``` String str = "1 (201, <202,203>), (203, <204,208>), (204, <>)"; StringTokenizer st = new StringTokenizer( str, " ,()<>" ); while (...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
If you want to share data between applications, make sure you sign with the same key: > > Code/data sharing through permissions – The Android system provides > signature-based permissions enforcement, so that an application can > expose functionality to another application that is signed with a > specified certifi...
1. using implicit intent and startActivityForResult. 2. Using Content provider [eg of content Providor:](http://content%20providor%20example)
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
**Send data from Application 1 (for ex:Application 1 package name is "com.sharedpref1" ).** ``` SharedPreferences prefs = getSharedPreferences("demopref", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("demostring", strShareValue); ...
Content provider is the android component, which has to be used if one application wants to share its data with other application. Note: Files, SqliteDatabases, Sharedpreference files created by an application is private to only that application. Other application can't directly access it. If programmer exposes databa...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
**Send data from Application 1 (for ex:Application 1 package name is "com.sharedpref1" ).** ``` SharedPreferences prefs = getSharedPreferences("demopref", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("demostring", strShareValue); ...
If you want to share data between applications, make sure you sign with the same key: > > Code/data sharing through permissions – The Android system provides > signature-based permissions enforcement, so that an application can > expose functionality to another application that is signed with a > specified certifi...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
I suspect they were likely looking for Android specific methods such as the content provider answer. Other alternatives... Android Specific - Remote services General - TCP/IP connections General - Writing to a location on the SD card Care to hear more about a specific method? Also stealing this question for an inter...
My requirement was to send a simple string from one app to another and get a string back. Like "user id" from App1 to App2 and get "username" back to App1. I was able to achieve this using **implicit intent** and **startActivityForResult**. If anyone is looking for the full process I posted my answer here [How to send ...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
[ContentProviders](http://developer.android.com/guide/topics/providers/content-providers.html) are a good approach to share data between applications.
My requirement was to send a simple string from one app to another and get a string back. Like "user id" from App1 to App2 and get "username" back to App1. I was able to achieve this using **implicit intent** and **startActivityForResult**. If anyone is looking for the full process I posted my answer here [How to send ...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
I suspect they were likely looking for Android specific methods such as the content provider answer. Other alternatives... Android Specific - Remote services General - TCP/IP connections General - Writing to a location on the SD card Care to hear more about a specific method? Also stealing this question for an inter...
Content provider is the android component, which has to be used if one application wants to share its data with other application. Note: Files, SqliteDatabases, Sharedpreference files created by an application is private to only that application. Other application can't directly access it. If programmer exposes databa...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
[ContentProviders](http://developer.android.com/guide/topics/providers/content-providers.html) are a good approach to share data between applications.
**Send data from Application 1 (for ex:Application 1 package name is "com.sharedpref1" ).** ``` SharedPreferences prefs = getSharedPreferences("demopref", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("demostring", strShareValue); ...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
**Send data from Application 1 (for ex:Application 1 package name is "com.sharedpref1" ).** ``` SharedPreferences prefs = getSharedPreferences("demopref", Context.MODE_PRIVATE); SharedPreferences.Editor editor = prefs.edit(); editor.putString("demostring", strShareValue); ...
I suspect they were likely looking for Android specific methods such as the content provider answer. Other alternatives... Android Specific - Remote services General - TCP/IP connections General - Writing to a location on the SD card Care to hear more about a specific method? Also stealing this question for an inter...
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
I suspect they were likely looking for Android specific methods such as the content provider answer. Other alternatives... Android Specific - Remote services General - TCP/IP connections General - Writing to a location on the SD card Care to hear more about a specific method? Also stealing this question for an inter...
1. using implicit intent and startActivityForResult. 2. Using Content provider [eg of content Providor:](http://content%20providor%20example)
5,745,243
Recently i had an interview in which the question was asked as "How would you be able to share the data between two installed apps or apk's?" I didn't have any answer for this question. Can anyone help me in determining an way to do so...
2011/04/21
[ "https://Stackoverflow.com/questions/5745243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/303155/" ]
If you want to share data between applications, make sure you sign with the same key: > > Code/data sharing through permissions – The Android system provides > signature-based permissions enforcement, so that an application can > expose functionality to another application that is signed with a > specified certifi...
My requirement was to send a simple string from one app to another and get a string back. Like "user id" from App1 to App2 and get "username" back to App1. I was able to achieve this using **implicit intent** and **startActivityForResult**. If anyone is looking for the full process I posted my answer here [How to send ...
21,229,887
I am new to Kinect.. I wanted to know how is it possible to get point cloud from kinect's depth data. I have tried getting the depth pixels and colorizing the near pixels based on depth. Now, my requirement is to get a 3d map based on the depth data. So, I guess first I need to have the point cloud. How should I procee...
2014/01/20
[ "https://Stackoverflow.com/questions/21229887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1652168/" ]
```js Add this to your jQuery **jQuery('.panel-collapse').removeClass("in");** This will close the accordion on page load ``` ```html `<div id="collapseOne" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne"> <div class="panel-body"> <div class="textwidget"> ...
Try to use [.collapse('hide')](http://getbootstrap.com/javascript/#collapse) method: ``` $(document).ready(function() { $('#yourAccordionId').collapse("hide"); // Rest of the code here }); ```
528,284
Please consider the following efficiency graphs of the exemplary [MP2384](https://www.monolithicpower.com/en/mp2384.html) buck sync converter: [![enter image description here](https://i.stack.imgur.com/qc9CG.png)](https://i.stack.imgur.com/qc9CG.png) What I am trying to understand is why is the efficiency at light lo...
2020/10/20
[ "https://electronics.stackexchange.com/questions/528284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/59894/" ]
The part of the chip that does the management (the comparator, the voltage reference, the PWM generator and various low-level interface circuits) take some amount of current i.e. they are not self-powering and that's basically the main clue. They require current and that current/power quite often is provided by a low-l...
The regulator itself consumes current. It has an internal linear LDO to drop input voltage to useful levels. And therefore, LDO losses are higher at higher input voltage, even if the circuitry powered by the LDO uses exactly same amount of power.
528,284
Please consider the following efficiency graphs of the exemplary [MP2384](https://www.monolithicpower.com/en/mp2384.html) buck sync converter: [![enter image description here](https://i.stack.imgur.com/qc9CG.png)](https://i.stack.imgur.com/qc9CG.png) What I am trying to understand is why is the efficiency at light lo...
2020/10/20
[ "https://electronics.stackexchange.com/questions/528284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/59894/" ]
The part of the chip that does the management (the comparator, the voltage reference, the PWM generator and various low-level interface circuits) take some amount of current i.e. they are not self-powering and that's basically the main clue. They require current and that current/power quite often is provided by a low-l...
As the others explained, the regulator draws some current from the input in order to function. This will be current to power internal circuitry plus a variable current to charge the FET gates that is roughly proportional to switching frequency. Let's call this total quiescent current Io. Since the internal LDO wastes ...
528,284
Please consider the following efficiency graphs of the exemplary [MP2384](https://www.monolithicpower.com/en/mp2384.html) buck sync converter: [![enter image description here](https://i.stack.imgur.com/qc9CG.png)](https://i.stack.imgur.com/qc9CG.png) What I am trying to understand is why is the efficiency at light lo...
2020/10/20
[ "https://electronics.stackexchange.com/questions/528284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/59894/" ]
The part of the chip that does the management (the comparator, the voltage reference, the PWM generator and various low-level interface circuits) take some amount of current i.e. they are not self-powering and that's basically the main clue. They require current and that current/power quite often is provided by a low-l...
Besides of the self-consumption mentioned in other answers (that probably dominates loses in a well-designed circuit), there is one more V\_IN dependence: switching capacitive loses. Output switch has internal capacity. It also probably has a snubber. Both of them charge at each switch either to 0 or to V\_IN. These ...
528,284
Please consider the following efficiency graphs of the exemplary [MP2384](https://www.monolithicpower.com/en/mp2384.html) buck sync converter: [![enter image description here](https://i.stack.imgur.com/qc9CG.png)](https://i.stack.imgur.com/qc9CG.png) What I am trying to understand is why is the efficiency at light lo...
2020/10/20
[ "https://electronics.stackexchange.com/questions/528284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/59894/" ]
Besides of the self-consumption mentioned in other answers (that probably dominates loses in a well-designed circuit), there is one more V\_IN dependence: switching capacitive loses. Output switch has internal capacity. It also probably has a snubber. Both of them charge at each switch either to 0 or to V\_IN. These ...
The regulator itself consumes current. It has an internal linear LDO to drop input voltage to useful levels. And therefore, LDO losses are higher at higher input voltage, even if the circuitry powered by the LDO uses exactly same amount of power.
528,284
Please consider the following efficiency graphs of the exemplary [MP2384](https://www.monolithicpower.com/en/mp2384.html) buck sync converter: [![enter image description here](https://i.stack.imgur.com/qc9CG.png)](https://i.stack.imgur.com/qc9CG.png) What I am trying to understand is why is the efficiency at light lo...
2020/10/20
[ "https://electronics.stackexchange.com/questions/528284", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/59894/" ]
Besides of the self-consumption mentioned in other answers (that probably dominates loses in a well-designed circuit), there is one more V\_IN dependence: switching capacitive loses. Output switch has internal capacity. It also probably has a snubber. Both of them charge at each switch either to 0 or to V\_IN. These ...
As the others explained, the regulator draws some current from the input in order to function. This will be current to power internal circuitry plus a variable current to charge the FET gates that is roughly proportional to switching frequency. Let's call this total quiescent current Io. Since the internal LDO wastes ...
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
It depends on what your are trying to achieve. In the first example you'll run the same code if one of them is true, and in the second example you'll run probably different lines of code for each equality. This is the difference between the two. So the efficiency in number of lines is not a factor here.
Your 2 examples serve 2 different purposes, the first is when each of the condition has the same outcome / code to be ran, whereas the second example, each condition has a different outcome / code to be ran
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
``` if (number === 1 || number === 2 || number === 3) { console.log('here') } ``` is different from ``` if (number === 1) { console.log('here',number) //here1 } else if (number === 2) { console.log('here',number) //here2 } else if (number === 3) { console.log('here',number) //here3 } ``` in first e...
Your 2 examples serve 2 different purposes, the first is when each of the condition has the same outcome / code to be ran, whereas the second example, each condition has a different outcome / code to be ran
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
Your 2 examples serve 2 different purposes, the first is when each of the condition has the same outcome / code to be ran, whereas the second example, each condition has a different outcome / code to be ran
the differnece is below:- first statement will going to print the same result every time if any one or "||" condition is true. Second statement will going to print the result on the basis of condition inside if and else if which one is true.
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
Your 2 examples serve 2 different purposes, the first is when each of the condition has the same outcome / code to be ran, whereas the second example, each condition has a different outcome / code to be ran
Most programming language supports short circuit. Meaning to if any of the earlier conditions are met, it will go into the block immediately without checking the the truth of latter conditions. In the case where you just need to check if number equals to either 1, 2 or 3, and do one action regardless of the value o...
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
It depends on what your are trying to achieve. In the first example you'll run the same code if one of them is true, and in the second example you'll run probably different lines of code for each equality. This is the difference between the two. So the efficiency in number of lines is not a factor here.
the differnece is below:- first statement will going to print the same result every time if any one or "||" condition is true. Second statement will going to print the result on the basis of condition inside if and else if which one is true.
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
It depends on what your are trying to achieve. In the first example you'll run the same code if one of them is true, and in the second example you'll run probably different lines of code for each equality. This is the difference between the two. So the efficiency in number of lines is not a factor here.
Most programming language supports short circuit. Meaning to if any of the earlier conditions are met, it will go into the block immediately without checking the the truth of latter conditions. In the case where you just need to check if number equals to either 1, 2 or 3, and do one action regardless of the value o...
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
``` if (number === 1 || number === 2 || number === 3) { console.log('here') } ``` is different from ``` if (number === 1) { console.log('here',number) //here1 } else if (number === 2) { console.log('here',number) //here2 } else if (number === 3) { console.log('here',number) //here3 } ``` in first e...
the differnece is below:- first statement will going to print the same result every time if any one or "||" condition is true. Second statement will going to print the result on the basis of condition inside if and else if which one is true.
60,667,536
I am working on python 3.7 and trying to scrape data from website, below is my code ``` import requests session = requests.session() session.headers= {'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46'} base_url="any_website" res=session.get(base_url, timeout=25) ``` The above c...
2020/03/13
[ "https://Stackoverflow.com/questions/60667536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462787/" ]
``` if (number === 1 || number === 2 || number === 3) { console.log('here') } ``` is different from ``` if (number === 1) { console.log('here',number) //here1 } else if (number === 2) { console.log('here',number) //here2 } else if (number === 3) { console.log('here',number) //here3 } ``` in first e...
Most programming language supports short circuit. Meaning to if any of the earlier conditions are met, it will go into the block immediately without checking the the truth of latter conditions. In the case where you just need to check if number equals to either 1, 2 or 3, and do one action regardless of the value o...
4,995,425
I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a > > [rsErrorLoadingCodeModule] Error > while loading code module: > ‘MyFile.MyClass.Code, Version=1.0.0.0, > Culture=neutral, PublicKeyToken=null’. > ...
2011/02/14
[ "https://Stackoverflow.com/questions/4995425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202728/" ]
I got a similar error on ssrs-2005. Just manually copy your dll to the following report server folder: "C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin" and everything should work fine.
You may need to add references to the assemblies that your MyFile assembly itself references. So, if MyFile references System.IO for example, you may need to add that dll reference explicitly to the report.
4,995,425
I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a > > [rsErrorLoadingCodeModule] Error > while loading code module: > ‘MyFile.MyClass.Code, Version=1.0.0.0, > Culture=neutral, PublicKeyToken=null’. > ...
2011/02/14
[ "https://Stackoverflow.com/questions/4995425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202728/" ]
Here is the actual correct answer.. I've had to fight with this twice now and did not document it well enough the first time thinking it was a one-time thing. Putting it in the SQL Server Bin folder is for the server. for DEVELOPMENT put a copy in the Visual Studio folder, something like: C:\Program Files\Microsoft V...
You may need to add references to the assemblies that your MyFile assembly itself references. So, if MyFile references System.IO for example, you may need to add that dll reference explicitly to the report.
4,995,425
I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a > > [rsErrorLoadingCodeModule] Error > while loading code module: > ‘MyFile.MyClass.Code, Version=1.0.0.0, > Culture=neutral, PublicKeyToken=null’. > ...
2011/02/14
[ "https://Stackoverflow.com/questions/4995425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202728/" ]
Here is the actual correct answer.. I've had to fight with this twice now and did not document it well enough the first time thinking it was a one-time thing. Putting it in the SQL Server Bin folder is for the server. for DEVELOPMENT put a copy in the Visual Studio folder, something like: C:\Program Files\Microsoft V...
I got a similar error on ssrs-2005. Just manually copy your dll to the following report server folder: "C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin" and everything should work fine.
4,995,425
I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a > > [rsErrorLoadingCodeModule] Error > while loading code module: > ‘MyFile.MyClass.Code, Version=1.0.0.0, > Culture=neutral, PublicKeyToken=null’. > ...
2011/02/14
[ "https://Stackoverflow.com/questions/4995425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202728/" ]
I got a similar error on ssrs-2005. Just manually copy your dll to the following report server folder: "C:\Program Files\Microsoft SQL Server\MSSQL.2\Reporting Services\ReportServer\bin" and everything should work fine.
For those who have been having trouble with custom dlls which import System.Data.SqlClient, I found the following tip absolutely essential in the rssrvpolicy.config file: Short and dirty answer: Change the PermissionSetName attribute from "Execution" to "FullTrust" for CodeGroup "Report\_Expressions\_Default\_Permissi...
4,995,425
I've been fighting with SSRS now for a while and it's beyond silly. When I add a reference to a dll (which is part of the same solution) it gives me nothing but a > > [rsErrorLoadingCodeModule] Error > while loading code module: > ‘MyFile.MyClass.Code, Version=1.0.0.0, > Culture=neutral, PublicKeyToken=null’. > ...
2011/02/14
[ "https://Stackoverflow.com/questions/4995425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/202728/" ]
Here is the actual correct answer.. I've had to fight with this twice now and did not document it well enough the first time thinking it was a one-time thing. Putting it in the SQL Server Bin folder is for the server. for DEVELOPMENT put a copy in the Visual Studio folder, something like: C:\Program Files\Microsoft V...
For those who have been having trouble with custom dlls which import System.Data.SqlClient, I found the following tip absolutely essential in the rssrvpolicy.config file: Short and dirty answer: Change the PermissionSetName attribute from "Execution" to "FullTrust" for CodeGroup "Report\_Expressions\_Default\_Permissi...
48,645,134
I been trying to access my Google calendar using the calendar api. On my development machine I am able to access the data and display the events on the calendar, but when I push it to the production server I get the following error after giving permission access to the calendar. Forbidden > > You don't have permissi...
2018/02/06
[ "https://Stackoverflow.com/questions/48645134", "https://Stackoverflow.com", "https://Stackoverflow.com/users/586071/" ]
Create a .NET Core console app. Add the references: **Microsoft.SharePoint.Client.Portable.dll**, **Microsoft.SharePoint.Client.Runtime.Portable.dll** and **Microsoft.SharePoint.Client.Runtime.Windows.dll**. Then check if it works. As a workaround, we can also use REST API or web service in .NET Core application curr...
I'm thinking you may have the URL incorrectly entered? You should use "<http://servername/>" instead of "<http://servername/sites/subfolder/default.aspx>"
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
You are definitely running a risk of freezing these lines in an unheated space. It is never wise to run water lines in an outside wall or above an insulated ceiling in an unheated space. Perhaps you can do one of the following: 1. Run the lines under the floor in the basement (not unheated crawl space) where freezing...
Additional information as this winter tests out badly routed plumbing. PEX that gets water frozen inside it stretches and expands over time. The weak point is fittings. Depending on the fitting, it can crack, the crimp rings can be stretched leading to a leak from the fitting or the PEX slipping off under pressure. Th...
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
You are definitely running a risk of freezing these lines in an unheated space. It is never wise to run water lines in an outside wall or above an insulated ceiling in an unheated space. Perhaps you can do one of the following: 1. Run the lines under the floor in the basement (not unheated crawl space) where freezing...
If you are using PEX, you can run it through your attic. PEX will NOT burst unless you live in a place that gets like 50 below. And it does not freeze as readily as metal pipe. We used PEX once and ended up replumbing our entire house with it. You can put foam insulation tubing on it to make you feel more secure, but y...
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
My research on topic: 1. Use PEX 'A' - it's better designed to flex; PEX is not guaranteed not to freeze or rupture; so use the better PEX grade; if possible avoid Grade 'B' and 'C'; use PEX 'A' if you have to go this method. 2. Will freeze and certainly can rupture, but less likely than copper pipes. 3. Make sure to...
If you are using PEX, you can run it through your attic. PEX will NOT burst unless you live in a place that gets like 50 below. And it does not freeze as readily as metal pipe. We used PEX once and ended up replumbing our entire house with it. You can put foam insulation tubing on it to make you feel more secure, but y...
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
You are definitely running a risk of freezing these lines in an unheated space. It is never wise to run water lines in an outside wall or above an insulated ceiling in an unheated space. Perhaps you can do one of the following: 1. Run the lines under the floor in the basement (not unheated crawl space) where freezing...
My research on topic: 1. Use PEX 'A' - it's better designed to flex; PEX is not guaranteed not to freeze or rupture; so use the better PEX grade; if possible avoid Grade 'B' and 'C'; use PEX 'A' if you have to go this method. 2. Will freeze and certainly can rupture, but less likely than copper pipes. 3. Make sure to...
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
Pex in the attic simply needs to be run BELOW the insulation. Put it against the ceiling drywall, and it will never get particularly cold. The problem is, lots of installers don't do this. My contractor actually went to some trouble to hang the pex up high. I had to go through and undo all the clamps and put it down b...
I have PEX in my attic and it was not properly secured to the rafters. This has caused some sections to rise above the blown in insulation. IT WILL FREEZE, mine freezes everyday if I don't use the fixtures in each bathroom at least sometime between dusk and dawn for a good while.
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
I have PEX in my attic and it was not properly secured to the rafters. This has caused some sections to rise above the blown in insulation. IT WILL FREEZE, mine freezes everyday if I don't use the fixtures in each bathroom at least sometime between dusk and dawn for a good while.
If you are using PEX, you can run it through your attic. PEX will NOT burst unless you live in a place that gets like 50 below. And it does not freeze as readily as metal pipe. We used PEX once and ended up replumbing our entire house with it. You can put foam insulation tubing on it to make you feel more secure, but y...
10,784
I plan on running PEX pipes both hot and cold across 16 feet of unheated attic space above a foyer. The foyer is 16' long and is off the kitchen, it isn't heated directly but is part of the house; it is usually colder than the rest of the house, mostly due to the cat door and slider the dogs go in and out of. There is ...
2011/12/20
[ "https://diy.stackexchange.com/questions/10784", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/4651/" ]
You are definitely running a risk of freezing these lines in an unheated space. It is never wise to run water lines in an outside wall or above an insulated ceiling in an unheated space. Perhaps you can do one of the following: 1. Run the lines under the floor in the basement (not unheated crawl space) where freezing...
Pex in the attic simply needs to be run BELOW the insulation. Put it against the ceiling drywall, and it will never get particularly cold. The problem is, lots of installers don't do this. My contractor actually went to some trouble to hang the pex up high. I had to go through and undo all the clamps and put it down b...