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
72,078,543
i am learning zig and i have some simple code where i try to declare a method on a struct and try to call that method here is the code ``` pub fn main() void { const Example = struct { a: i8, b: i8, c: u6 = 5, fn prettyPrint(self: *Example) void { std.debug.print(" a -...
2022/05/01
[ "https://Stackoverflow.com/questions/72078543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6845084/" ]
The issue here is to do with how identifier lookup differs between types of scopes. The declaration of a variable at container/global scope is distinct from that of one at local scope, in that, in the former case, the identifier that is ultimately bound to is available within its definition, whereas in the latter case...
this is because `main` function is executed at runtime and hasn't computed when you define `prettyPrint`. to fix this, move `Example` to outside of your main function.
17,881,232
I persist my Python classes to JSON and write them to MongoDB. I'm using a JSON Encoder which has been presented [here](http://pymotw.com/2/json/). This results in a slight complex JSON structure which does not follow the simple "string" key/values in all the MongoDB tutorials. Here is an excerpt of a class written to ...
2013/07/26
[ "https://Stackoverflow.com/questions/17881232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1729210/" ]
To check if field exists [use`$exists` operator](http://docs.mongodb.org/manual/reference/operator/exists/). To access complex structures use dot notation. For example: ``` db.inventory.find( { "experiments.FOO": { $exists: true} } ) ```
This query should work: ``` db.collection.find({ "experiments.FOO": { $exists:true } }); ```
20,673,898
On my website, I have an unordered list that is originally unpopulated. After the page loads, I use jquery and ajax to call a php page that loads data in from a database. It then returns that data to the ajax call so that it can create a bunch of list items and append them to the unordered list. Each of these list it...
2013/12/19
[ "https://Stackoverflow.com/questions/20673898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2953697/" ]
It's the `<br>` tag. The `.next()` function gets the next sibling element, not the next `<li>` element. Besides it's not valid html to have a `<br>` between `<li>` elements. Even if you find the reason why you have to call `.next()` twice, is this really going to do what you want? There could be multiple items with th...
**[LIVE DEMO](http://jsbin.com/IBUJunEH/4/edit)** `.next()` or no `.next()`... The `<ul>` tag is not supposed to hold `<br>` but list tag `<li>`. Additionally I would suggest going like: This will also loop the selected `LI` element on buttons click. ``` var $ul = $('#unordered-list'); var liData = ""; // Popoulate ...
7,168
A long long time ago (.. I can still remember ♫) there were these old bottle caps. My parents still have 2 or 3 at home from soviet times. They look kinda like this: [![enter image description here](https://i.stack.imgur.com/kv6MK.jpg)](https://i.stack.imgur.com/kv6MK.jpg) What are those called? Ar there some keyword...
2018/01/28
[ "https://beer.stackexchange.com/questions/7168", "https://beer.stackexchange.com", "https://beer.stackexchange.com/users/174/" ]
Found what I was looking for: [WESTMARK 3 Flaschenverschlüsse, Flaschenstöpsel mit Hebel und Gummidichtung, 40 x 60 x 15 mm, farblich sortiert](https://www.danto.de/Wohnen-Einrichten/Barmoebel-accessoires/Flaschenhalter/WESTMARK-3-Flaschenverschluesse-Flaschenstoepsel-mit-Hebel-und-Gummidichtung-40-x-60-x-15-mm-farblic...
In the USA you can find this type of cap at most homebrew shops. These originated in Holland but now are popular for many breweries around the world. Here are the [caps](https://www.morebeer.com/products/flip-top-swing-cap.html)
14,516,534
So I have a .lib file with some of my own subroutines in it that I would like to make available to the entire Catalyst app. Right now I require the file in lib/myapp.pm and I have no issues. However, whenever I try to call that subroutine in a controller, I get this error: ``` "Undefined subroutine &myapp::Controller:...
2013/01/25
[ "https://Stackoverflow.com/questions/14516534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834140/" ]
``` use myapp; ``` is basically ``` BEGIN { require myapp; import myapp; } ``` `require myapp;` executes `myapp.pm` if it hasn't already been executed. In other words, no matter how many times you do `use myapp;` in a process, the file will only be executed ("loaded") once. `import myapp;` calls `myapp::imp...
The command `use myapp;` will only load your myapp.pm file once, even when called multiple times. But each time it will call the import routine makes my\_sub() available (Assuming you export it using Exporter or something else) without having to write myapp::my\_sub().
1,097,443
I have the following models: ``` class Person < ActiveRecord::Base has_many :accounts, :through => :account_holders has_many :account_holders end class AccountHolder < ActiveRecord::Base belongs_to :account belongs_to :people end class Account < ActiveRecord::Base has_many :people, :through => :account_ho...
2009/07/08
[ "https://Stackoverflow.com/questions/1097443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4787/" ]
belongs\_to requires the singular form. In `AccountHolder`: ``` belongs_to :person ```
I had the same issue and like the answer above indicates, it got fixed when I changed the belongs\_to symbol value in the junction table to singular (removed the 's' in the end of the name). In my exercise, I have: guy.rb ``` class Guy < ActiveRecord::Base attr_accessible :name has_many :junctions has_many :gi...
4,219,191
i hav a two dates of type nsdate and i want to calculate the diff b/w the two dates as a mins/seconds finally... how can i do it..
2010/11/18
[ "https://Stackoverflow.com/questions/4219191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365087/" ]
`NSDate` has a `-timeIntervalSinceDate:` method. --- ### EDIT Therefore: ``` NSTimeInterval tval = [date1 timeIntervalSinceDate: date2]; int sec = tval % 60, min = tval - 60*sec; ```
<http://iphonedevelopment.blogspot.com/2009/07/category-on-nsdate.html> as you get the days you can convert into time. But if you want exact difference , like if it is 1.5 days you have to convert date into timestamp then find the difference [iPhone: Convert date string to a relative time stamp](https://stackoverfl...
4,219,191
i hav a two dates of type nsdate and i want to calculate the diff b/w the two dates as a mins/seconds finally... how can i do it..
2010/11/18
[ "https://Stackoverflow.com/questions/4219191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365087/" ]
So Alexsander want to say you take this: ``` double difference = [date1 timeIntervalSinceDate:date2] / 60; The difference is now in minutes. ```
<http://iphonedevelopment.blogspot.com/2009/07/category-on-nsdate.html> as you get the days you can convert into time. But if you want exact difference , like if it is 1.5 days you have to convert date into timestamp then find the difference [iPhone: Convert date string to a relative time stamp](https://stackoverfl...
48,273,968
``` 1-A 2-B 3-C Etc etc ``` Please help me writing the function.
2018/01/16
[ "https://Stackoverflow.com/questions/48273968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8001392/" ]
One way to achieve this is to have a variable to store whether it is *clickable* or not. Please check snippet. ```js var canDoStuff = true; function disable() { canDoStuff = false; } function enable() { canDoStuff = true; } function doStuff(){ if ( !canDoStuff ) return; /* Do nothing if canDoStuff =...
To disable, you can use ``` document.getElementById(id).style.pointerEvents="none"; document.getElementById(id).style.cursor="default"; ``` To enable ``` document.getElementById(id).style.pointerEvents="auto"; document.getElementById(id).style.cursor="pointer"; ```
31,274,434
when I try to view my chart, all data on the x-axis are not displayed. Here an exemple: <http://jsfiddle.net/zn4y45pL/> ``` options.xAxis.categories.push(this.innerHTML); alert(this.innerHTML); ``` This shows me all the data. Any ideas on what's the problem? Thanks!
2015/07/07
[ "https://Stackoverflow.com/questions/31274434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090422/" ]
edit/update: **Xcode 11.5 • Swift 5.2** ``` extension FloatingPoint { func converting(from input: ClosedRange<Self>, to output: ClosedRange<Self>) -> Self { let x = (output.upperBound - output.lowerBound) * (self - input.lowerBound) let y = (input.upperBound - input.lowerBound) return x / y...
I translated this to Swift from [this answer here](https://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value) based on the [D3 library](https://en.wikipedia.org/wiki/D3.js). ``` struct Rescale { var range0: Double, range1: Double, domain0: Double, domain1: Double ...
31,274,434
when I try to view my chart, all data on the x-axis are not displayed. Here an exemple: <http://jsfiddle.net/zn4y45pL/> ``` options.xAxis.categories.push(this.innerHTML); alert(this.innerHTML); ``` This shows me all the data. Any ideas on what's the problem? Thanks!
2015/07/07
[ "https://Stackoverflow.com/questions/31274434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090422/" ]
edit/update: **Xcode 11.5 • Swift 5.2** ``` extension FloatingPoint { func converting(from input: ClosedRange<Self>, to output: ClosedRange<Self>) -> Self { let x = (output.upperBound - output.lowerBound) * (self - input.lowerBound) let y = (input.upperBound - input.lowerBound) return x / y...
Here is the Swift 3 compatible version, which also supports generics (to not bound Rescale just for Doubles). ``` struct Rescale<Type : BinaryFloatingPoint> { typealias RescaleDomain = (lowerBound: Type, upperBound: Type) var fromDomain: RescaleDomain var toDomain: RescaleDomain init(from: RescaleDom...
31,274,434
when I try to view my chart, all data on the x-axis are not displayed. Here an exemple: <http://jsfiddle.net/zn4y45pL/> ``` options.xAxis.categories.push(this.innerHTML); alert(this.innerHTML); ``` This shows me all the data. Any ideas on what's the problem? Thanks!
2015/07/07
[ "https://Stackoverflow.com/questions/31274434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5090422/" ]
Here is the Swift 3 compatible version, which also supports generics (to not bound Rescale just for Doubles). ``` struct Rescale<Type : BinaryFloatingPoint> { typealias RescaleDomain = (lowerBound: Type, upperBound: Type) var fromDomain: RescaleDomain var toDomain: RescaleDomain init(from: RescaleDom...
I translated this to Swift from [this answer here](https://stackoverflow.com/questions/5294955/how-to-scale-down-a-range-of-numbers-with-a-known-min-and-max-value) based on the [D3 library](https://en.wikipedia.org/wiki/D3.js). ``` struct Rescale { var range0: Double, range1: Double, domain0: Double, domain1: Double ...
7,922,353
The ModelInspector doesn't seem to provide the means to define Filter definitions . Any ideas/Workarounds? I need to generate the following with mappings by code: ``` <filter-def name="filterName" use-many-to-one="false"> <filter-param name="filterParamName" type="Int32"/> </filter-def> ```
2011/10/27
[ "https://Stackoverflow.com/questions/7922353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49881/" ]
I was able to achieve that using NHibernate.Cfg.Configuration: ``` var cfg = new Configuration(); var filterDef = new FilterDefinition( "filterName", null, // or your default condition new Dictionary<string, IType> { { "filterParamName", NHibernateUtil.Int32 } }, false); cfg.AddFilterDefinition(filter...
FYI, It is important to note that the call to `AddFilterDefinition` is before `AddMapping`, otherwise you will get an`ArgumentException("An item with the same key has already been added")`!
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
You do not need to call `d.keys()`, so ``` if key not in d: d[key] = value ``` is enough. There is no clearer, more readable method. You could update again with `dict.get()`, which would return an existing value if the key is already present: ``` d[key] = d.get(key, value) ``` but I strongly recommend agains...
Use [`dict.setdefault()`](https://docs.python.org/3/library/stdtypes.html#dict.setdefault): ``` >>> d = {'key1': 'one'} >>> d.setdefault('key1', 'some-unused-value') 'one' >>> d # d has not changed because the key already existed {'key1': 'one'} >>> d.setdefault('key2', 'two') 'two' >>> d {'key1': 'one', 'key2': 't...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
You do not need to call `d.keys()`, so ``` if key not in d: d[key] = value ``` is enough. There is no clearer, more readable method. You could update again with `dict.get()`, which would return an existing value if the key is already present: ``` d[key] = d.get(key, value) ``` but I strongly recommend agains...
With the following you can insert multiple values and also have default values but you're creating a new dictionary. ```py d = {**{ key: value }, **default_values} ``` I've tested it with the most voted answer and on average this is faster as it can be seen in the following example, . [![Speed test comparing a for...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
You do not need to call `d.keys()`, so ``` if key not in d: d[key] = value ``` is enough. There is no clearer, more readable method. You could update again with `dict.get()`, which would return an existing value if the key is already present: ``` d[key] = d.get(key, value) ``` but I strongly recommend agains...
Since **Python 3.9** you can use the *merge operator* `|` to merge two dictionaries. The dict on the right takes precedence: ```py new_dict = old_dict | { key: val } ``` For example: ```py new_dict = { 'a': 1, 'b': 2 } | { 'b': 42 } print(new_dict) # {'a': 1, 'b': 42} ``` Note: this creates a new dictionary with...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
You do not need to call `d.keys()`, so ``` if key not in d: d[key] = value ``` is enough. There is no clearer, more readable method. You could update again with `dict.get()`, which would return an existing value if the key is already present: ``` d[key] = d.get(key, value) ``` but I strongly recommend agains...
You can also use this solution in only one line of code: ``` dict[dict_key] = dict.get(dict_key,value) ``` The second argument of `dict.get` is the value you want to assign to the key in case the key does not exist. Since this evaluates before the assignment to `dict[dict_key] =` , we can be sure that they key will ...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
Use [`dict.setdefault()`](https://docs.python.org/3/library/stdtypes.html#dict.setdefault): ``` >>> d = {'key1': 'one'} >>> d.setdefault('key1', 'some-unused-value') 'one' >>> d # d has not changed because the key already existed {'key1': 'one'} >>> d.setdefault('key2', 'two') 'two' >>> d {'key1': 'one', 'key2': 't...
With the following you can insert multiple values and also have default values but you're creating a new dictionary. ```py d = {**{ key: value }, **default_values} ``` I've tested it with the most voted answer and on average this is faster as it can be seen in the following example, . [![Speed test comparing a for...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
Use [`dict.setdefault()`](https://docs.python.org/3/library/stdtypes.html#dict.setdefault): ``` >>> d = {'key1': 'one'} >>> d.setdefault('key1', 'some-unused-value') 'one' >>> d # d has not changed because the key already existed {'key1': 'one'} >>> d.setdefault('key2', 'two') 'two' >>> d {'key1': 'one', 'key2': 't...
Since **Python 3.9** you can use the *merge operator* `|` to merge two dictionaries. The dict on the right takes precedence: ```py new_dict = old_dict | { key: val } ``` For example: ```py new_dict = { 'a': 1, 'b': 2 } | { 'b': 42 } print(new_dict) # {'a': 1, 'b': 42} ``` Note: this creates a new dictionary with...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
Use [`dict.setdefault()`](https://docs.python.org/3/library/stdtypes.html#dict.setdefault): ``` >>> d = {'key1': 'one'} >>> d.setdefault('key1', 'some-unused-value') 'one' >>> d # d has not changed because the key already existed {'key1': 'one'} >>> d.setdefault('key2', 'two') 'two' >>> d {'key1': 'one', 'key2': 't...
You can also use this solution in only one line of code: ``` dict[dict_key] = dict.get(dict_key,value) ``` The second argument of `dict.get` is the value you want to assign to the key in case the key does not exist. Since this evaluates before the assignment to `dict[dict_key] =` , we can be sure that they key will ...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
Since **Python 3.9** you can use the *merge operator* `|` to merge two dictionaries. The dict on the right takes precedence: ```py new_dict = old_dict | { key: val } ``` For example: ```py new_dict = { 'a': 1, 'b': 2 } | { 'b': 42 } print(new_dict) # {'a': 1, 'b': 42} ``` Note: this creates a new dictionary with...
With the following you can insert multiple values and also have default values but you're creating a new dictionary. ```py d = {**{ key: value }, **default_values} ``` I've tested it with the most voted answer and on average this is faster as it can be seen in the following example, . [![Speed test comparing a for...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
With the following you can insert multiple values and also have default values but you're creating a new dictionary. ```py d = {**{ key: value }, **default_values} ``` I've tested it with the most voted answer and on average this is faster as it can be seen in the following example, . [![Speed test comparing a for...
You can also use this solution in only one line of code: ``` dict[dict_key] = dict.get(dict_key,value) ``` The second argument of `dict.get` is the value you want to assign to the key in case the key does not exist. Since this evaluates before the assignment to `dict[dict_key] =` , we can be sure that they key will ...
42,315,100
I got a query result in array `Array ( [0] => stdClass Object ( [model] => Peugeot 308 SW ) [1] => stdClass Object ( [model] => Citroen C-Elysee ) [2] => stdClass Object ( [model] => Nissan Evalia ) [3] => stdClass Object ( [model] => Renault Trafic 9-os ) )` And I want to make a single variable for every object like:...
2017/02/18
[ "https://Stackoverflow.com/questions/42315100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7560059/" ]
Since **Python 3.9** you can use the *merge operator* `|` to merge two dictionaries. The dict on the right takes precedence: ```py new_dict = old_dict | { key: val } ``` For example: ```py new_dict = { 'a': 1, 'b': 2 } | { 'b': 42 } print(new_dict) # {'a': 1, 'b': 42} ``` Note: this creates a new dictionary with...
You can also use this solution in only one line of code: ``` dict[dict_key] = dict.get(dict_key,value) ``` The second argument of `dict.get` is the value you want to assign to the key in case the key does not exist. Since this evaluates before the assignment to `dict[dict_key] =` , we can be sure that they key will ...
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
Fix for this Problem: Open up `Skype` and go to `Tools` and `select` Options. From the list that appears select `Advanced` and then `Connection`. There will probably be a check mark inside where it says `“Use port 80 and 443 as alternatives for incoming connections”` just unchecked that box and save your changes. `Sky...
Another solution without changing skype: ( for port 443 ) First, port 443 is the HTTPS default port. you need to change that on the server to something else ( ex 4433 ). But in this case , you must specify that new port every time you want to use HTTPS requests ex : ``` "https://localhost:4433" .just typing "http...
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
There are many tools which would let you know which program is using port 80 or 443 already. But I prefer a simple command to do so. Open up a command prompt then type. ``` netstat -a ``` It will let you know which program is using port 80 and for an explanation of all options. ``` netstat /? ``` Second Part of t...
type: ``` net stop was /y ``` in command prompt as administrator [![admin command prompt](https://i.stack.imgur.com/a2tR7.jpg)](https://i.stack.imgur.com/a2tR7.jpg)
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
There are many tools which would let you know which program is using port 80 or 443 already. But I prefer a simple command to do so. Open up a command prompt then type. ``` netstat -a ``` It will let you know which program is using port 80 and for an explanation of all options. ``` netstat /? ``` Second Part of t...
just go to apache directory and search to find 'httpd-ssl.conf' and open it then search to find 443, you find 3, edit all of them to another number, i edit to 886. then save file and try to run apache.
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
**Solution 1:** Close the programs running on port 80, it may be one like **SKYPE** For Command Line quit In Windows ``` for /f "tokens=5" %a in ('netstat -aon ^| find ":80" ^| find "LISTENING"') do taskkill /f /pid %a ``` In linux just use ``` sudo fuser -k 80/tcp ``` Install wamp(win), lamp(linux) or mamp(ma...
Fix for this Problem: Open up `Skype` and go to `Tools` and `select` Options. From the list that appears select `Advanced` and then `Connection`. There will probably be a check mark inside where it says `“Use port 80 and 443 as alternatives for incoming connections”` just unchecked that box and save your changes. `Sky...
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
Another solution without changing skype: ( for port 443 ) First, port 443 is the HTTPS default port. you need to change that on the server to something else ( ex 4433 ). But in this case , you must specify that new port every time you want to use HTTPS requests ex : ``` "https://localhost:4433" .just typing "http...
just go to apache directory and search to find 'httpd-ssl.conf' and open it then search to find 443, you find 3, edit all of them to another number, i edit to 886. then save file and try to run apache.
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
**Solution 1:** Close the programs running on port 80, it may be one like **SKYPE** For Command Line quit In Windows ``` for /f "tokens=5" %a in ('netstat -aon ^| find ":80" ^| find "LISTENING"') do taskkill /f /pid %a ``` In linux just use ``` sudo fuser -k 80/tcp ``` Install wamp(win), lamp(linux) or mamp(ma...
type: ``` net stop was /y ``` in command prompt as administrator [![admin command prompt](https://i.stack.imgur.com/a2tR7.jpg)](https://i.stack.imgur.com/a2tR7.jpg)
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
Another solution without changing skype: ( for port 443 ) First, port 443 is the HTTPS default port. you need to change that on the server to something else ( ex 4433 ). But in this case , you must specify that new port every time you want to use HTTPS requests ex : ``` "https://localhost:4433" .just typing "http...
type: ``` net stop was /y ``` in command prompt as administrator [![admin command prompt](https://i.stack.imgur.com/a2tR7.jpg)](https://i.stack.imgur.com/a2tR7.jpg)
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
Fix for this Problem: Open up `Skype` and go to `Tools` and `select` Options. From the list that appears select `Advanced` and then `Connection`. There will probably be a check mark inside where it says `“Use port 80 and 443 as alternatives for incoming connections”` just unchecked that box and save your changes. `Sky...
As it says - the port 80 and 443 are already in use. It means that the ports 80 and 443 are already in use by some other server or application. When i faced this issue, it was wamp server that was using these ports(not skype in my case). What i did to resolve this is that I changed the ports for xampp. How: 1. I co...
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
**Solution 1:** Close the programs running on port 80, it may be one like **SKYPE** For Command Line quit In Windows ``` for /f "tokens=5" %a in ('netstat -aon ^| find ":80" ^| find "LISTENING"') do taskkill /f /pid %a ``` In linux just use ``` sudo fuser -k 80/tcp ``` Install wamp(win), lamp(linux) or mamp(ma...
just go to apache directory and search to find 'httpd-ssl.conf' and open it then search to find 443, you find 3, edit all of them to another number, i edit to 886. then save file and try to run apache.
19,418,182
I have a question related to PHP. I am .net developer. I usually work on asp.net and c#.I installed Visual Studio and SQL Server in my laptop.Now I am trying to Install Xampp server on my system. Here I getting some problem.After Installation When it check for port. It show me message port 80 or 443 aleardy in use apac...
2013/10/17
[ "https://Stackoverflow.com/questions/19418182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2888931/" ]
Fix for this Problem: Open up `Skype` and go to `Tools` and `select` Options. From the list that appears select `Advanced` and then `Connection`. There will probably be a check mark inside where it says `“Use port 80 and 443 as alternatives for incoming connections”` just unchecked that box and save your changes. `Sky...
type: ``` net stop was /y ``` in command prompt as administrator [![admin command prompt](https://i.stack.imgur.com/a2tR7.jpg)](https://i.stack.imgur.com/a2tR7.jpg)
23,665
I've got an assignment to make some kind of alarm. When user presses the push button, 1kHz sound should be generated and outputted on some kind of speaker (I'll use buzzer). That part I know how to make. I can use NE 555 to make astable to generate 1kHz output. But other part of the assignment is the problem. Is says...
2011/12/14
[ "https://electronics.stackexchange.com/questions/23665", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5029/" ]
Personally I'd use a small microcontroller. Something like an ATTiny, or a PIC10F for example. Both incredibly cheap, and pretty much no external components needed other than some resistors, a button and a piezo transducer.
Have you considered multiple 555 timers? The first setting the variable duty cycle as an input to the 1khz generator?
23,665
I've got an assignment to make some kind of alarm. When user presses the push button, 1kHz sound should be generated and outputted on some kind of speaker (I'll use buzzer). That part I know how to make. I can use NE 555 to make astable to generate 1kHz output. But other part of the assignment is the problem. Is says...
2011/12/14
[ "https://electronics.stackexchange.com/questions/23665", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5029/" ]
Personally I'd use a small microcontroller. Something like an ATTiny, or a PIC10F for example. Both incredibly cheap, and pretty much no external components needed other than some resistors, a button and a piezo transducer.
This is actually pretty easy if you think about it the right way. You say making a 1 kHz oscillator driving a speaker is no problem. You already know how to enable and disable that. When free running, the duty cycle should be about 50% (a square wave) already. Now note that 0% duty cycle is the same as off. So intead o...
23,665
I've got an assignment to make some kind of alarm. When user presses the push button, 1kHz sound should be generated and outputted on some kind of speaker (I'll use buzzer). That part I know how to make. I can use NE 555 to make astable to generate 1kHz output. But other part of the assignment is the problem. Is says...
2011/12/14
[ "https://electronics.stackexchange.com/questions/23665", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5029/" ]
Is the duty cycle supposed to switch from 50% to 0%, or decay from 50% to 0%? Is there any particular precision required on the 50%? Is there any requirement regarding quiescent current? I would suggest that you start by using a 555 or similar chip to generate a symmetrical sawtooth-ish (doesn't have to have straight ...
Have you considered multiple 555 timers? The first setting the variable duty cycle as an input to the 1khz generator?
23,665
I've got an assignment to make some kind of alarm. When user presses the push button, 1kHz sound should be generated and outputted on some kind of speaker (I'll use buzzer). That part I know how to make. I can use NE 555 to make astable to generate 1kHz output. But other part of the assignment is the problem. Is says...
2011/12/14
[ "https://electronics.stackexchange.com/questions/23665", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/5029/" ]
Is the duty cycle supposed to switch from 50% to 0%, or decay from 50% to 0%? Is there any particular precision required on the 50%? Is there any requirement regarding quiescent current? I would suggest that you start by using a 555 or similar chip to generate a symmetrical sawtooth-ish (doesn't have to have straight ...
This is actually pretty easy if you think about it the right way. You say making a 1 kHz oscillator driving a speaker is no problem. You already know how to enable and disable that. When free running, the duty cycle should be about 50% (a square wave) already. Now note that 0% duty cycle is the same as off. So intead o...
4,650,817
I've been looking around for a definitive answer as to how to use LINQ to SQL with mySQL but can't seem to come up with anything. Does anyone have any experience / suggestions using the two together? In particular, I would like to avoid using string SQL statements. Cheers
2011/01/10
[ "https://Stackoverflow.com/questions/4650817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/558619/" ]
MySQL isn't directly supported by Microsoft's LINQ to SQL provider, but there are several alternative ways you can use LINQ against MySQL. Take a look at using [LINQ to nHibernate](http://ayende.com/Blog/archive/2007/03/16/Linq-for-NHibernate.aspx), or see [here](http://code2code.net/DB_Linq/) for LINQ providers agains...
Now (as of 2015) you can use the Connector/NET provided by MySQL. <http://dev.mysql.com/doc/connector-net/en/connector-net-tutorials.html>
215,895
Is there the possiblity to make a color gradient in the rectangular box in the following example from the bottom left to the top right corner (both in linear or radial shape)? ``` \documentclass{article} \usepackage{tikz} \usepackage{xcolor} \definecolor{left} {HTML}{001528} \begin{document} \begin{tikzpicture}[...
2014/12/07
[ "https://tex.stackexchange.com/questions/215895", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/18277/" ]
You can use `shading = axis` and `shading angle=135` ``` \documentclass{article} \usepackage{tikz} \definecolor{left} {HTML}{001528} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node [shading = axis,rectangle, left color=left, right color=left!30!white,shading angle=135, anchor=north, minim...
I hope this is what you mean: ![variant shadings and fadings](https://i.stack.imgur.com/mWf2J.png) ``` \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,fadings,through} \definecolor{left} {HTML}{001528} \begin{document} \begin{tikzpicture}[remember picture,overlay] \node [rectangle, left...
62,818,919
I have an array and I want to delete some elements. My array is `arrayAuxiliar`. My code is the following one: ``` for( var i = 0; i < arrayAuxiliar.length; i++) { if (arrayAuxiliar[i] == valueFirts) { arrayAuxiliar.splice(i,1); } else ...
2020/07/09
[ "https://Stackoverflow.com/questions/62818919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2037602/" ]
I think using `filter` would be more appropiate. You can try: ```js let arrayAuxiliar = [3, 2, 1] const valueFirst = 1 const value = 2 arrayAuxiliar = arrayAuxiliar.filter(i => i !== valueFirst && i !== value) console.log(arrayAuxiliar) ```
I would use [`Array.prototype.filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter): ```js const arr = [3,2,1]; const valueFirst = 1; const value = 2; console.log(arr.filter(item => ![value, valueFirst].includes(item))); ```
62,818,919
I have an array and I want to delete some elements. My array is `arrayAuxiliar`. My code is the following one: ``` for( var i = 0; i < arrayAuxiliar.length; i++) { if (arrayAuxiliar[i] == valueFirts) { arrayAuxiliar.splice(i,1); } else ...
2020/07/09
[ "https://Stackoverflow.com/questions/62818919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2037602/" ]
I would use [`Array.prototype.filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter): ```js const arr = [3,2,1]; const valueFirst = 1; const value = 2; console.log(arr.filter(item => ![value, valueFirst].includes(item))); ```
Also you can use reduce function ``` function test(arrayAuxiliar, valueFirts, value) { return arrayAuxiliar.reduce((acc,rec) => { if ((rec === value) || (rec === valueFirts)) { return [...acc] } return [...acc, rec] }, []) } console.log(test([3,2,1,4,1,2,2,3,1,4,5,8,2,5], 1, 2)) ```
62,818,919
I have an array and I want to delete some elements. My array is `arrayAuxiliar`. My code is the following one: ``` for( var i = 0; i < arrayAuxiliar.length; i++) { if (arrayAuxiliar[i] == valueFirts) { arrayAuxiliar.splice(i,1); } else ...
2020/07/09
[ "https://Stackoverflow.com/questions/62818919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2037602/" ]
Use `filter` and `includes` method ```js const array = [3, 2, 1] const remove_list = [2, 1] const res = array.filter(num => !remove_list.includes(num)) console.log(res) ```
I would use [`Array.prototype.filter()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter): ```js const arr = [3,2,1]; const valueFirst = 1; const value = 2; console.log(arr.filter(item => ![value, valueFirst].includes(item))); ```
62,818,919
I have an array and I want to delete some elements. My array is `arrayAuxiliar`. My code is the following one: ``` for( var i = 0; i < arrayAuxiliar.length; i++) { if (arrayAuxiliar[i] == valueFirts) { arrayAuxiliar.splice(i,1); } else ...
2020/07/09
[ "https://Stackoverflow.com/questions/62818919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2037602/" ]
I think using `filter` would be more appropiate. You can try: ```js let arrayAuxiliar = [3, 2, 1] const valueFirst = 1 const value = 2 arrayAuxiliar = arrayAuxiliar.filter(i => i !== valueFirst && i !== value) console.log(arrayAuxiliar) ```
Also you can use reduce function ``` function test(arrayAuxiliar, valueFirts, value) { return arrayAuxiliar.reduce((acc,rec) => { if ((rec === value) || (rec === valueFirts)) { return [...acc] } return [...acc, rec] }, []) } console.log(test([3,2,1,4,1,2,2,3,1,4,5,8,2,5], 1, 2)) ```
62,818,919
I have an array and I want to delete some elements. My array is `arrayAuxiliar`. My code is the following one: ``` for( var i = 0; i < arrayAuxiliar.length; i++) { if (arrayAuxiliar[i] == valueFirts) { arrayAuxiliar.splice(i,1); } else ...
2020/07/09
[ "https://Stackoverflow.com/questions/62818919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2037602/" ]
Use `filter` and `includes` method ```js const array = [3, 2, 1] const remove_list = [2, 1] const res = array.filter(num => !remove_list.includes(num)) console.log(res) ```
Also you can use reduce function ``` function test(arrayAuxiliar, valueFirts, value) { return arrayAuxiliar.reduce((acc,rec) => { if ((rec === value) || (rec === valueFirts)) { return [...acc] } return [...acc, rec] }, []) } console.log(test([3,2,1,4,1,2,2,3,1,4,5,8,2,5], 1, 2)) ```
12,068
Would it be possible to run StackOverflow without ASP.NET sessions?
2009/08/04
[ "https://meta.stackexchange.com/questions/12068", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/130023/" ]
The use of session was discussed in the [last podcast](https://blog.stackoverflow.com/2009/07/podcast-63/), in the context of adding more servers. IIRC, the summary is "session is used but not a lot and could probably be removed if desired". But in Jeff's words ;-p
I've noticed that stackoverflow doesn't use asp.net session cookie anymore , does it mean it doesn't use session anymore ?
31,460,939
let's say initially I am on page which has URL like "www.example.com/check/checkid now when I refresh page I want the URL to be changed how I can do that in angular Js .
2015/07/16
[ "https://Stackoverflow.com/questions/31460939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4910017/" ]
You can use $routeProvider, which is the provider of the $route service. This service makes it easy to wire together controllers, view templates, and the current URL location in the browser. I hope It will help. <http://viralpatel.net/blogs/angularjs-routing-and-views-tutorial-with-example/>
Maybe you can add a run block to do that, for example: ``` angular.module("myApp", []) .run(['$location', function($location) { // some logic $location.path("/somepath"); }]); ```
47,508,204
I tried to build an framework with its own image and it compiles fine. However, when I include my framework in another project, it crashes when loading the image, any idea? **ImageTest (my framework)** ``` public class ImageTest { open func getImage() { return #imageLiteral(resourceName: "IMG_0745") }...
2017/11/27
[ "https://Stackoverflow.com/questions/47508204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5571327/" ]
The image is in ImageTest framework. When you execute this code, `return #imageLiteral(resourceName: "IMG_0745")`, it looks at the Image.xcassets of ImageTest project and when it does not find the image there, it results in the crash. Change your code to use bundle param of [init function](https://developer.apple.com/...
In Swift 4 now it is ``` UIImage(named: "IMG_0745", in: Bundle(for:self), compatibleWith: nil) ```
47,508,204
I tried to build an framework with its own image and it compiles fine. However, when I include my framework in another project, it crashes when loading the image, any idea? **ImageTest (my framework)** ``` public class ImageTest { open func getImage() { return #imageLiteral(resourceName: "IMG_0745") }...
2017/11/27
[ "https://Stackoverflow.com/questions/47508204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5571327/" ]
The image is in ImageTest framework. When you execute this code, `return #imageLiteral(resourceName: "IMG_0745")`, it looks at the Image.xcassets of ImageTest project and when it does not find the image there, it results in the crash. Change your code to use bundle param of [init function](https://developer.apple.com/...
In **Swift 5**, ``` UIImage(named: "IMG_0745", in: Bundle(for: xxxYourViewController.self), compatibleWith: nil) ```
47,508,204
I tried to build an framework with its own image and it compiles fine. However, when I include my framework in another project, it crashes when loading the image, any idea? **ImageTest (my framework)** ``` public class ImageTest { open func getImage() { return #imageLiteral(resourceName: "IMG_0745") }...
2017/11/27
[ "https://Stackoverflow.com/questions/47508204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5571327/" ]
In **Swift 5**, ``` UIImage(named: "IMG_0745", in: Bundle(for: xxxYourViewController.self), compatibleWith: nil) ```
In Swift 4 now it is ``` UIImage(named: "IMG_0745", in: Bundle(for:self), compatibleWith: nil) ```
1,198,773
Using, Burnside's Lemma, how many ways are there to $3$-color the $n$ bands of a baton if adjacent bands must be a different color? Workings: The first band has $3$ choices for color, the next bands has only $2$ choices since it can not be the same color as adjacent bands. So $3 \times 2^{n-1}$ is the number of ways...
2015/03/20
[ "https://math.stackexchange.com/questions/1198773", "https://math.stackexchange.com", "https://math.stackexchange.com/users/138229/" ]
These batons represent the flip permutation group $F\_n$ on $n$ elements that contain two permutations. The cycle indices are $$Z(F\_n) = \frac{1}{2}(a\_1^n + a\_2^{n/2})$$ for $n$ even and $$Z(F\_n) = \frac{1}{2}(a\_1^n + a\_1 a\_2^{(n-1)/2})$$ for $n$ odd. In order to apply Burnside we ask how many colorings are...
The problem is that some colourings are invariant under reversal, so dividing by $2$ will under-count them. This is where Burnside comes in.
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
I would strongly suggest metadata in the connection in order to trace back to the application. In the connection string, there is an Application Name. There is also session data which can be used in the form of [CONTEXT\_INFO](http://msdn.microsoft.com/en-us/library/ms180125.aspx) <https://stackoverflow.com/questions/...
Typically, when a query is "interfering" with another query it is either blocking or deadlocking. Either of these would not be visible via a default SQL Profiler trace. If you are experiencing deadlocks, you will want trace flags 1204 and 1222 turned on in SQL Server so the deadlock output gets sent to the errorlogs. ...
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
Typically, when a query is "interfering" with another query it is either blocking or deadlocking. Either of these would not be visible via a default SQL Profiler trace. If you are experiencing deadlocks, you will want trace flags 1204 and 1222 turned on in SQL Server so the deadlock output gets sent to the errorlogs. ...
How about these techniques using ToTraceString? <http://blog.cincura.net/227674-how-to-show-sql-command-created-by-entity-framework/> http://www.dotnetcurry.com/ShowArticle.aspx?ID=647 Collect and correlate with your trace.
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
Typically, when a query is "interfering" with another query it is either blocking or deadlocking. Either of these would not be visible via a default SQL Profiler trace. If you are experiencing deadlocks, you will want trace flags 1204 and 1222 turned on in SQL Server so the deadlock output gets sent to the errorlogs. ...
I'm probably off-base here with my response, because I'm not really going to address finding the offending code, other than saying... Knowing the executed SQL from the trace, leads to knowing the associated ORM entity, which leads to Find All References in Visual Studio. Hopefully the code is [DRY](http://en.wikipedia....
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
I would strongly suggest metadata in the connection in order to trace back to the application. In the connection string, there is an Application Name. There is also session data which can be used in the form of [CONTEXT\_INFO](http://msdn.microsoft.com/en-us/library/ms180125.aspx) <https://stackoverflow.com/questions/...
How about these techniques using ToTraceString? <http://blog.cincura.net/227674-how-to-show-sql-command-created-by-entity-framework/> http://www.dotnetcurry.com/ShowArticle.aspx?ID=647 Collect and correlate with your trace.
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
I would strongly suggest metadata in the connection in order to trace back to the application. In the connection string, there is an Application Name. There is also session data which can be used in the form of [CONTEXT\_INFO](http://msdn.microsoft.com/en-us/library/ms180125.aspx) <https://stackoverflow.com/questions/...
I'm probably off-base here with my response, because I'm not really going to address finding the offending code, other than saying... Knowing the executed SQL from the trace, leads to knowing the associated ORM entity, which leads to Find All References in Visual Studio. Hopefully the code is [DRY](http://en.wikipedia....
25,465
I currently have (tables changed): **User** ``` UserID uniqueidentifier, CompanyID uniqueidentifier, (for future reference) .. more unrelated fields (PK: UserID) ``` **UserRating** ``` UserID uniqueidentifier, MovieID uniqueidentifier, RatingTypeID uniqueidentifier, Rating tinyint (PK: UserID, MovieID, RatingTyp...
2012/10/04
[ "https://dba.stackexchange.com/questions/25465", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/3832/" ]
I'm probably off-base here with my response, because I'm not really going to address finding the offending code, other than saying... Knowing the executed SQL from the trace, leads to knowing the associated ORM entity, which leads to Find All References in Visual Studio. Hopefully the code is [DRY](http://en.wikipedia....
How about these techniques using ToTraceString? <http://blog.cincura.net/227674-how-to-show-sql-command-created-by-entity-framework/> http://www.dotnetcurry.com/ShowArticle.aspx?ID=647 Collect and correlate with your trace.
1,142,609
I have a folder of 10 folders and I would like to change each folder to a different icon. Each of those icons is already made in another folder. (each folder will have a different icon) How would I automate or batch this task to save me having to do it indivually. As I will have more sets of icons to do.
2016/11/05
[ "https://superuser.com/questions/1142609", "https://superuser.com", "https://superuser.com/users/151013/" ]
This is 3 years late but here we go you can manually bulk change folders' icons by * applying read-only attribute to the folders. * applying read-only attribute to desktop.ini files inside the folders. * the desktop.ini should correctly refer to the icon we want. > > STEP 1: ACTIVATE POWERSHELL & CREATE POWERSHELL ...
Where are the actual icons you are going to apply to the folders? If they are not within a `.dll` file, you could make one using the free 30-day trial of [IcoFX](http://icofx.ro/index.html) or some similar software. Within each folder there is a hidden file called `desktop.ini`. They have the file system attributes o...
183,949
The spell Summon Greater Demon lets the caster summon a Demon and give it orders: > > You utter foul words, summoning one demon from the chaos of the Abyss.[...] When you summon it and on each of your turns thereafter, you can issue a verbal command to it (requiring no action on your part), telling it what it must do...
2021/04/15
[ "https://rpg.stackexchange.com/questions/183949", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/48603/" ]
It would appear so ------------------ It's hard to know if it's intended or not, but it is a consistent way to interpret the rules, depending on how you interpret p.54 of the Monster Manual, which tells us that: > > A demon can be forced to disclose its name if charmed > > > There are two ways of reading this in...
Game mechanics wise, forcing a caster to use TWO 4th level spell slots (SGD and Charm Monster) and TWO Turns to try to get the demon to follow orders longer (and thus not kill your team) when it has one turn in between these actions to save and break free is overly punitive. Most fights are over in a few rounds. Even i...
32,958,863
I'm presently moving back to C++ from Java. There are some areas of C++ where higher performance can be achieved by doing more computation on the stack.And some recursive algorithms operate more efficiently on the stack than on the heap. Obviously the stack is a resource, and if I am going to use it, I should ensure t...
2015/10/05
[ "https://Stackoverflow.com/questions/32958863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3170794/" ]
This has the same problem in Java as it does in c++. You are way over-committing to the stack. > > And some recursive algorithms operate more efficiently on the stack than on the heap. > > > Indeed, and they are commonly of the divide and conquer type. The usefulness of recursion is to reduce the computation to...
Your signal handler can't do much to fix the stack overflow. Setting your `interrupted` flag doesn't help. When your signal handler returns, the instruction that tried to write to an address beyond the end of the stack resumes and it's still going to attempt to write beyond the end of the stack. Your code won't get bac...
574,072
I need this for load balancing. For example, I've two azure storage accounts (say `a` and `b`) and the blob addresses for those are `a.blob.core.windows.net` and `b.blob.core.windows.net`. Both of them store identical data. Now I need to provide a single external name (say `example.com`) which points to both the storag...
2014/02/07
[ "https://serverfault.com/questions/574072", "https://serverfault.com", "https://serverfault.com/users/208588/" ]
Multiple CNAME records for the same fully-qualified domain name is a violation of the specs for DNS. Some versions of BIND would allow you to do this (some only if you specified the `multiple-cnames yes` option) and would round-robin load-balance between then but it's not technically legal. There are not supposed to ...
You cannot. A CNAME makes one record another name for another. If a record could have CNAMES for two names, it wouldn't be another name for either of them, but a name for something entirely new, making a CNAME entry inappropriate. There's likely a good way to solve your outer problem though. For example, you can have ...
28,670,126
I have a c# script in Unity and have an issue. I'm trying to check if two floats equal to zero for a countdown timer. once both reach zero, do something. when i do ``` if (minutes && seconds <= 0){ Debug.Log("countdown timer has finished"); } ``` I get the error; > > error CS0019: Operator `&&' cannot...
2015/02/23
[ "https://Stackoverflow.com/questions/28670126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1947560/" ]
You can't check more than one variables like that. You must change your code: ``` if (minutes <= 0 && seconds <= 0){ Debug.Log("countdown timer has finished"); } ``` Or, if you have many variables to check like that, then you can create new List and use `Any()` method from th `System.Linq` namespace. (**...
C# doesn't provide any syntax to combine application of single condition / operators on many variables directly in "if" condition (but of course you could do that with functions). You have to test separately each condition : ``` if (minutes <= 0 && seconds <= 0) { Debug.Log("countdown timer has finished"); } ```...
28,670,126
I have a c# script in Unity and have an issue. I'm trying to check if two floats equal to zero for a countdown timer. once both reach zero, do something. when i do ``` if (minutes && seconds <= 0){ Debug.Log("countdown timer has finished"); } ``` I get the error; > > error CS0019: Operator `&&' cannot...
2015/02/23
[ "https://Stackoverflow.com/questions/28670126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1947560/" ]
You can't check more than one variables like that. You must change your code: ``` if (minutes <= 0 && seconds <= 0){ Debug.Log("countdown timer has finished"); } ``` Or, if you have many variables to check like that, then you can create new List and use `Any()` method from th `System.Linq` namespace. (**...
In C# You cannot do float comparison like this. In C++, boolean true is treated as non-zero value and for false it's zero. That's why we can directly compare the float value with in if condition. But in C# you have to specify the full condition. ``` if (minutes <= 0 && seconds <= 0){ Debug.Log("countdown timer...
28,670,126
I have a c# script in Unity and have an issue. I'm trying to check if two floats equal to zero for a countdown timer. once both reach zero, do something. when i do ``` if (minutes && seconds <= 0){ Debug.Log("countdown timer has finished"); } ``` I get the error; > > error CS0019: Operator `&&' cannot...
2015/02/23
[ "https://Stackoverflow.com/questions/28670126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1947560/" ]
C# doesn't provide any syntax to combine application of single condition / operators on many variables directly in "if" condition (but of course you could do that with functions). You have to test separately each condition : ``` if (minutes <= 0 && seconds <= 0) { Debug.Log("countdown timer has finished"); } ```...
In C# You cannot do float comparison like this. In C++, boolean true is treated as non-zero value and for false it's zero. That's why we can directly compare the float value with in if condition. But in C# you have to specify the full condition. ``` if (minutes <= 0 && seconds <= 0){ Debug.Log("countdown timer...
5,640
The meaning of "social engineering" I am looking for is the one related to information security, as in the [Wikipedia article on social engineering](https://en.wikipedia.org/wiki/Social_engineering_(security)). I could not find anything at all, no clue anywhere. What comes up is the meaning related to social science: ...
2019/12/14
[ "https://esperanto.stackexchange.com/questions/5640", "https://esperanto.stackexchange.com", "https://esperanto.stackexchange.com/users/1892/" ]
"Social" in this context refers to psyche (or adjective psychic) as you found out with help of French. If one reads the Wikipedia article, one realises, that it's more a question of manipulating minds rather than mining ore, building and maintaining machines or other engineering activities. So I would say *psika manipu...
I like Juha's answer, but would like to propose another one. Given the meaning of *trompi* (Intence erarigi por sia profito aŭ pro nura malico) and *menso* (Tiu parto de vivanta estaĵo, kiu pritraktas informojn, konscie aŭ ne) I propose: ``` mensotrompa tekniko ``` I cannot explain why, but I find *mens* more adequa...
60,138,369
I want to calculate the time between the first and the last element in an array where they have the same sessionId I have the following array: ```js var arr = [ { createdAt: '2020-02-08 17:30:46.367 +00:00', SessionID: 10, Name: 'Name1' }, { createdAt: '2020-02-08 17:40:47.4...
2020/02/09
[ "https://Stackoverflow.com/questions/60138369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8343179/" ]
Use `reduce` and `Object.values` will simplify. ```js var arr = [ { createdAt: "2020-02-08 17:30:46.367 +00:00", SessionID: 10, Name: "Name1" }, { createdAt: "2020-02-08 17:40:47.465 +00:00", SessionID: 10, Name: "Name1" }, { createdAt: "2020-02-08 17:45:48.596 +00:00"...
You could collect the min and max values of `createdAt` grouped by `SessionID` and get the delta of time in minutes. ```js var array = [{ createdAt: '2020-02-08 17:30:46.367 +00:00', SessionID: 10, Name: 'Name1' }, { createdAt: '2020-02-08 17:40:47.465 +00:00', SessionID: 10, Name: 'Name1' }, { createdAt: '2020-02-08 ...
18,174,178
I am using MvcSitemapProvider in my MVC4 application. My controlleractions need parameters to resolve 1:n relations in a database. For example: Shop > Item > ItemDetails. Lets say the user watches details of ItemXYZ and clicks on Shop > **Item** > ItemDetails I want the application to display ItemXYZ again. So MvcSitem...
2013/08/11
[ "https://Stackoverflow.com/questions/18174178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1293906/" ]
I ran into something like this. I had to do 2 things: 1. Specify the `settlementID` route parameter of the parent node **Item** in the `preservedRouteParameters` attribute of the **ItemDetails** child node. As per the [docs](https://github.com/maartenba/MvcSiteMapProvider/wiki/Defining-sitemap-nodes-in-XML) inheritedR...
I am not sure what example you are following, but this configuration has some issues: 1. inheritedRouteParameters is for inheriting a parameter from the parent node (mvcSiteMapNode). Your example shows that the settlementID is part of the SectionController, not SettlementController so there is no need to inherit it. 2...
31,016,068
I am trying to make a function to help me debug. When I do the following: ``` s = traceback.format_stack()[-2] print(s) ``` I get a console output something like: ``` File "/home/path/to/dir/filename.py", line 888, in function_name ``` How can I extract `filename.py`, `888` and `function_name` into separate strin...
2015/06/24
[ "https://Stackoverflow.com/questions/31016068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4931929/" ]
Here is a working example of what you want to accomplish. ``` val rddMap = sc.parallelize(Map("A" -> ("v", "v"), "B" -> ("d","d")).toSeq) // Collects all the data in the RDD and converts the data to a Map val myMap = rddMap.collect().toMap myMap.foreach(println) ``` Output: ``` (A,(v,v)) (B,(d,d)) ``` Here is ...
What you are trying to do is not really supported in Spark today. Note that every user defined function (e.g., what you add inside a `map()`) is a closure that gets serialized and pushed to each executioner. Therefore everything you have inside this `map()` gets serialized and gets transferred around: ``` .map{ t ...
919,835
How do I find out which executables or processes are using my shared library objects in a Unix environment, specifically the AIX environment. Is there any command for it?
2009/05/28
[ "https://Stackoverflow.com/questions/919835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In linux, you would: ``` for i in /usr/bin /bin /usr/local/bin /sbin /...; do # edit: bug fix to display which filename has the library # the egrep component will extract line with your library # or line with ":::", which contains name of the binary find /usr/bin -printf '::: %p\n' -exec ldd \{\} \; | egrep 'y...
Not sure if it will help, but maybe you could [lsof](http://en.wikipedia.org/wiki/Lsof).
919,835
How do I find out which executables or processes are using my shared library objects in a Unix environment, specifically the AIX environment. Is there any command for it?
2009/05/28
[ "https://Stackoverflow.com/questions/919835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In linux, you would: ``` for i in /usr/bin /bin /usr/local/bin /sbin /...; do # edit: bug fix to display which filename has the library # the egrep component will extract line with your library # or line with ":::", which contains name of the binary find /usr/bin -printf '::: %p\n' -exec ldd \{\} \; | egrep 'y...
[fuser](http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.cmds/doc/aixcmds2/fuser.htm) might be what you want.
919,835
How do I find out which executables or processes are using my shared library objects in a Unix environment, specifically the AIX environment. Is there any command for it?
2009/05/28
[ "https://Stackoverflow.com/questions/919835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
In linux, you would: ``` for i in /usr/bin /bin /usr/local/bin /sbin /...; do # edit: bug fix to display which filename has the library # the egrep component will extract line with your library # or line with ":::", which contains name of the binary find /usr/bin -printf '::: %p\n' -exec ldd \{\} \; | egrep 'y...
In Solaris Open or otherwise: For example; some of the output supressed... mybox@myplace02:~$ pldd ``pgrep pidgin 5451: pidgin /usr/lib/libc/libc\_hwcap1.so.1 /usr/lib/libgdk-x11-2.0.so.0.1400.3 /usr/lib/libgdk\_pixbuf-2.0.so.0.1400.3 /usr/lib/libglib-2.0.so.0.1800.0 /usr/lib/libgobject-2.0.so.0.1...
3,268,694
I'm studying a pre-calculus textbook and it mentioned this: > > "It is important to note that not every relationship expressed by an > equation can also be expressed as a function with a formula." > > > Can someone help me understand this by giving examples?
2019/06/20
[ "https://math.stackexchange.com/questions/3268694", "https://math.stackexchange.com", "https://math.stackexchange.com/users/669022/" ]
The matrix is $A=\begin{bmatrix} -c & 6 & 2 \\ 3 & -c & 2 \\ 1 & 2 & c \end{bmatrix}$. The determinant is $\det A = -c(-c^2-4) -6 (3c-2)+2(6+c)$. Now factor and find values for $c$ for which the determinant is zero.
You have to solve the system $$c\lambda\_1+6\lambda\_2+\lambda\_3=0$$ $$6\lambda\_1-c\lambda\_2+2\lambda\_3=0$$ $$\lambda\_1+2\lambda\_2+c\lambda\_3=0$$ for $\lambda\_1,\lambda\_2,\lambda\_3$
664
If I add a notice to my user page that my answers are licensed under the GPL, in addition to the "standard" site-wide Creative Commons license, how does this affect posts by other users that I edit or other users that edit my posts? Personally, I don't mind if others can use my code to write useful plugins or contribu...
2011/06/06
[ "https://wordpress.meta.stackexchange.com/questions/664", "https://wordpress.meta.stackexchange.com", "https://wordpress.meta.stackexchange.com/users/8/" ]
I would imagine that edits (for clarification, grammatical or typographical errors) do not constitute copyrightable content. Thus, the original author of such Questions/Answers retains full copyright over the work in question. In which case, the copyright license remains whatever the original author applies.
*As always when it comes to licensing issues:* > > (Disclaimer) I'm no lawyer, so this is just my personal opinion. > > > Currently no one can tell if everything WP related inherits the license. There are (loads of) different opinions about it. One of the strongest arguments out there is > > that WordPress is...
664
If I add a notice to my user page that my answers are licensed under the GPL, in addition to the "standard" site-wide Creative Commons license, how does this affect posts by other users that I edit or other users that edit my posts? Personally, I don't mind if others can use my code to write useful plugins or contribu...
2011/06/06
[ "https://wordpress.meta.stackexchange.com/questions/664", "https://wordpress.meta.stackexchange.com", "https://wordpress.meta.stackexchange.com/users/8/" ]
A Word about Licensing ---------------------- Licensing via the GPL isn't so much to protect our rights as developers but to protect the rights of people receiving our code. In a nutshell, it guarantees that anyone using our stuff has permission to do so, permission to change what we wrote, and permission to distribut...
I would imagine that edits (for clarification, grammatical or typographical errors) do not constitute copyrightable content. Thus, the original author of such Questions/Answers retains full copyright over the work in question. In which case, the copyright license remains whatever the original author applies.
664
If I add a notice to my user page that my answers are licensed under the GPL, in addition to the "standard" site-wide Creative Commons license, how does this affect posts by other users that I edit or other users that edit my posts? Personally, I don't mind if others can use my code to write useful plugins or contribu...
2011/06/06
[ "https://wordpress.meta.stackexchange.com/questions/664", "https://wordpress.meta.stackexchange.com", "https://wordpress.meta.stackexchange.com/users/8/" ]
A Word about Licensing ---------------------- Licensing via the GPL isn't so much to protect our rights as developers but to protect the rights of people receiving our code. In a nutshell, it guarantees that anyone using our stuff has permission to do so, permission to change what we wrote, and permission to distribut...
*As always when it comes to licensing issues:* > > (Disclaimer) I'm no lawyer, so this is just my personal opinion. > > > Currently no one can tell if everything WP related inherits the license. There are (loads of) different opinions about it. One of the strongest arguments out there is > > that WordPress is...
22,981,199
We would like to replace an existing deployment of our app.war with curl. The post below gives a nice way to deploy a war file. This works well as long as there is no war file deployed with the same name. It fails, however, if there is already a deployment present. Is there any way we can replace the existing deploymen...
2014/04/10
[ "https://Stackoverflow.com/questions/22981199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/216011/" ]
We wrote a little Shell-Script to achieve this: ``` #!/bin/bash echo "Undeploy old war" curl -S -H "content-Type: application/json" -d '{"operation":"undeploy", "address":[{"deployment":"old.war"}]}' --digest http://user:password@hostname:9990/management echo "" echo "Remove old war" curl -S -H "content-Type: applica...
Take a look at documentation of whole management model at <http://wildscribe.github.io/> There is no direct operation that would replace deployment. [See](http://wildscribe.github.io/Wildfly/8.0.0.Final/deployment/index.html) possible attribute/operations for deployment resource So what you could do is remove deplo...
22,981,199
We would like to replace an existing deployment of our app.war with curl. The post below gives a nice way to deploy a war file. This works well as long as there is no war file deployed with the same name. It fails, however, if there is already a deployment present. Is there any way we can replace the existing deploymen...
2014/04/10
[ "https://Stackoverflow.com/questions/22981199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/216011/" ]
Many thanks to @nioe for the script! Here's a configurable version with silenced `curl` better suited for CI scripting: ```sh #!/bin/bash # Deploys given WAR to WildFly server, pass full path to WAR as argument set -e set -u [[ -f "$1" ]] || { >&2 echo "Usage: $0 WAR-filename ('$1' is not a file)"; exit 1; } WILDF...
Take a look at documentation of whole management model at <http://wildscribe.github.io/> There is no direct operation that would replace deployment. [See](http://wildscribe.github.io/Wildfly/8.0.0.Final/deployment/index.html) possible attribute/operations for deployment resource So what you could do is remove deplo...
22,981,199
We would like to replace an existing deployment of our app.war with curl. The post below gives a nice way to deploy a war file. This works well as long as there is no war file deployed with the same name. It fails, however, if there is already a deployment present. Is there any way we can replace the existing deploymen...
2014/04/10
[ "https://Stackoverflow.com/questions/22981199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/216011/" ]
We wrote a little Shell-Script to achieve this: ``` #!/bin/bash echo "Undeploy old war" curl -S -H "content-Type: application/json" -d '{"operation":"undeploy", "address":[{"deployment":"old.war"}]}' --digest http://user:password@hostname:9990/management echo "" echo "Remove old war" curl -S -H "content-Type: applica...
Many thanks to @nioe for the script! Here's a configurable version with silenced `curl` better suited for CI scripting: ```sh #!/bin/bash # Deploys given WAR to WildFly server, pass full path to WAR as argument set -e set -u [[ -f "$1" ]] || { >&2 echo "Usage: $0 WAR-filename ('$1' is not a file)"; exit 1; } WILDF...
59,385,099
I have a string like bellow: `str = "Test(a=10, b=100, c=1.0, d=2.0)"` and `Test` entity is: ``` data class Test( val a: int = 0, val b: Int = 0, val c: Double = 0.0, val d: Double = 0.0 ) ``` What should I do to convert string `str` to `Test` entity? Thankyou!!
2019/12/18
[ "https://Stackoverflow.com/questions/59385099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11123483/" ]
Regexes seem like an appropriate choice here: ``` data class Test(val a: Int = 0, val b: Int = 0, val c: Double = 0.0, val d: Double = 0.0) fun main() { val str = "Test(a=10, b=100, c=1.0, d=2.0)" print(getTest(str)) } fun getTest(str: String): Test { val regex = """Test\(a=(.+), b=(.+), c=(.+), d=(.+)\)""...
It works ``` data class Test( val a: Int = 0, val b: Int = 0, val c: Double = 0.0, val d: Double = 0.0 ) fun main() { val str = "Test(a=10, b=100, c=1.0, d=2.0)" val numbers = "([\\d.]+)".toRegex().findAll(str).map { it.value }.toList() val test = Test( numbers...
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
If you dont want to use overflow:hidden (worse look), you can add to your a node these attributes: ``` .portalItem a.go{ margin:15px; display:block; } ``` and, of course, add this class: ``` <a class='go' href=""><span class="viewMorePs">GO</span></a> ``` This way, your divs will have good height You ca...
add `overflow: hidden` to `.portalItem`
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
The reason your button is not "pushing down" your field is because it is inline element and limited by it's height to the line height. margin-bottom for inline (span) element should not have any effect by specification unless it is set to block. ``` span.viewMorePs { display:block; } ``` So the solution is to se...
add `overflow: hidden` to `.portalItem`
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
If you dont want to use overflow:hidden (worse look), you can add to your a node these attributes: ``` .portalItem a.go{ margin:15px; display:block; } ``` and, of course, add this class: ``` <a class='go' href=""><span class="viewMorePs">GO</span></a> ``` This way, your divs will have good height You ca...
Add the following style to your `span.viewmoreprefs` ``` position: relative; z-index: 100; bottom: 8px; ``` [JsFiddle](http://jsfiddle.net/cafebabe1991/y2j950t9/1/)
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
The reason your button is not "pushing down" your field is because it is inline element and limited by it's height to the line height. margin-bottom for inline (span) element should not have any effect by specification unless it is set to block. ``` span.viewMorePs { display:block; } ``` So the solution is to se...
Add the following style to your `span.viewmoreprefs` ``` position: relative; z-index: 100; bottom: 8px; ``` [JsFiddle](http://jsfiddle.net/cafebabe1991/y2j950t9/1/)
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
If you dont want to use overflow:hidden (worse look), you can add to your a node these attributes: ``` .portalItem a.go{ margin:15px; display:block; } ``` and, of course, add this class: ``` <a class='go' href=""><span class="viewMorePs">GO</span></a> ``` This way, your divs will have good height You ca...
``` .portalItem{ background-color: rgba(255, 255, 255, 0.8); border:1px solid blue; padding-bottom:15px; //give some padding here } ``` [Demo is here](http://jsfiddle.net/jn4144b9/14/)
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
The reason your button is not "pushing down" your field is because it is inline element and limited by it's height to the line height. margin-bottom for inline (span) element should not have any effect by specification unless it is set to block. ``` span.viewMorePs { display:block; } ``` So the solution is to se...
``` .portalItem{ background-color: rgba(255, 255, 255, 0.8); border:1px solid blue; padding-bottom:15px; //give some padding here } ``` [Demo is here](http://jsfiddle.net/jn4144b9/14/)
31,743,073
For some reason the content inside my divs are outside them. I have tried `overflow:hidden` and `overflow:auto` in the container, such a `height:auto`, but nothing seems to work. [Fiddle here](http://jsfiddle.net/jn4144b9/1/) html ---- ``` <div id="portalPage"> <div class="containerOfSites"> <div class="...
2015/07/31
[ "https://Stackoverflow.com/questions/31743073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4252529/" ]
The reason your button is not "pushing down" your field is because it is inline element and limited by it's height to the line height. margin-bottom for inline (span) element should not have any effect by specification unless it is set to block. ``` span.viewMorePs { display:block; } ``` So the solution is to se...
If you dont want to use overflow:hidden (worse look), you can add to your a node these attributes: ``` .portalItem a.go{ margin:15px; display:block; } ``` and, of course, add this class: ``` <a class='go' href=""><span class="viewMorePs">GO</span></a> ``` This way, your divs will have good height You ca...
66,902,154
I have a CSV file, which have 11 columns : Rank, Year, Name... It contains the best video games sales. I'm new to neo4j and cypher. I am trying to import it to neo4j with this cypher query : `LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE (:Vgsales {rank: toInteger(line.Rank), name: line.Name, platfor...
2021/04/01
[ "https://Stackoverflow.com/questions/66902154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15529337/" ]
Thanks for your answer. I'm posting back the query because there was an ']' that i forgot to remove : ``` LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE(v:Vgsales {rank: toInteger(line.Rank), name: line.Name, platform: line.Platform, year:toInteger(line.Year)}) WITH v MERGE (g:GENRE {genre: line.Genre...
From your code it seems like you have not created any relationship just a single node for each row in your csv. My suggesion is try to create a model first. you can use arrows.app to try and describe your model. Relationships are created by joining two nodes lets say ``` CREATE (:PERSON {name:"CHARLIE")-[:FOLLOWS]->(...
66,902,154
I have a CSV file, which have 11 columns : Rank, Year, Name... It contains the best video games sales. I'm new to neo4j and cypher. I am trying to import it to neo4j with this cypher query : `LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE (:Vgsales {rank: toInteger(line.Rank), name: line.Name, platfor...
2021/04/01
[ "https://Stackoverflow.com/questions/66902154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15529337/" ]
There is a syntax error on your script. You can remove this line below: ``` WITH v ``` I tried it on my neo4j browser and it works well: ``` LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE(v:Vgsales {rank: toInteger(line.Rank), name: line.Name, platform: line.Platform, year:toInteger(line.Year)}) ...
From your code it seems like you have not created any relationship just a single node for each row in your csv. My suggesion is try to create a model first. you can use arrows.app to try and describe your model. Relationships are created by joining two nodes lets say ``` CREATE (:PERSON {name:"CHARLIE")-[:FOLLOWS]->(...
66,902,154
I have a CSV file, which have 11 columns : Rank, Year, Name... It contains the best video games sales. I'm new to neo4j and cypher. I am trying to import it to neo4j with this cypher query : `LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE (:Vgsales {rank: toInteger(line.Rank), name: line.Name, platfor...
2021/04/01
[ "https://Stackoverflow.com/questions/66902154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15529337/" ]
There is a syntax error on your script. You can remove this line below: ``` WITH v ``` I tried it on my neo4j browser and it works well: ``` LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE(v:Vgsales {rank: toInteger(line.Rank), name: line.Name, platform: line.Platform, year:toInteger(line.Year)}) ...
Thanks for your answer. I'm posting back the query because there was an ']' that i forgot to remove : ``` LOAD CSV WITH HEADERS FROM 'file:///vgsales.csv' AS line CREATE(v:Vgsales {rank: toInteger(line.Rank), name: line.Name, platform: line.Platform, year:toInteger(line.Year)}) WITH v MERGE (g:GENRE {genre: line.Genre...
17,221,381
I need to round to nearest 0.5 if possible. 10.4999 = 10.5 Here is quick code: ``` import java.text.DecimalFormat; import java.math.RoundingMode; public class DecimalFormat { public static void main(String[] args) { DecimalFormat dFormat = new DecimalFormat("#.0"); dFormat.setRoundingMode(...
2013/06/20
[ "https://Stackoverflow.com/questions/17221381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Rather than try rounding to the nearest 0.5, double it, round to the nearest int, then divide by two. This way, 2.49 becomes 4.98, rounds to 5, becomes 2.5. 2.24 becomes 4.48, rounds to 4, becomes 2.
``` public class DecimalFormat { public static void main(String[] args) { double test = 10.4999; double round; int i = (int) test; double fraction = test - i; if (fraction < 0.25) { round = (double) i; } else if (fraction < 0.75) { ...
17,221,381
I need to round to nearest 0.5 if possible. 10.4999 = 10.5 Here is quick code: ``` import java.text.DecimalFormat; import java.math.RoundingMode; public class DecimalFormat { public static void main(String[] args) { DecimalFormat dFormat = new DecimalFormat("#.0"); dFormat.setRoundingMode(...
2013/06/20
[ "https://Stackoverflow.com/questions/17221381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Rather than try rounding to the nearest 0.5, double it, round to the nearest int, then divide by two. This way, 2.49 becomes 4.98, rounds to 5, becomes 2.5. 2.24 becomes 4.48, rounds to 4, becomes 2.
A more general solution to @RobWatt's answer in case you ever want to round to something else: ``` private static double roundTo(double v, double r) { return Math.round(v / r) * r; } System.out.println(roundTo(6.1, 0.5)); // 6.0 System.out.println(roundTo(10.4999, 0.5)); // 10.5 System.out.println(roundTo(1.33,...
17,221,381
I need to round to nearest 0.5 if possible. 10.4999 = 10.5 Here is quick code: ``` import java.text.DecimalFormat; import java.math.RoundingMode; public class DecimalFormat { public static void main(String[] args) { DecimalFormat dFormat = new DecimalFormat("#.0"); dFormat.setRoundingMode(...
2013/06/20
[ "https://Stackoverflow.com/questions/17221381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
A more general solution to @RobWatt's answer in case you ever want to round to something else: ``` private static double roundTo(double v, double r) { return Math.round(v / r) * r; } System.out.println(roundTo(6.1, 0.5)); // 6.0 System.out.println(roundTo(10.4999, 0.5)); // 10.5 System.out.println(roundTo(1.33,...
``` public class DecimalFormat { public static void main(String[] args) { double test = 10.4999; double round; int i = (int) test; double fraction = test - i; if (fraction < 0.25) { round = (double) i; } else if (fraction < 0.75) { ...
41,352,994
I am trying to store some data in a mysql database through a php script. The data that I am trying to store is encrypted and so this means that it stores something like this: ``` '$ñŠN4Åßv4ñ•ÜÅØµÙÜqÚö4Þ§ƒÑìèêù¬a+µºeN¶†)‰ož¥´™³¯BâPqt‡š3ÊØyGyŠí!¬‚ƒý`,È-SFn­…,˜EïÕ¬_¯ ÛÆ1y©aœ«#˜¼öe÷·2,¢‹éUËx‰0ý`ΪÄÅŒ1²ljìí -{6“6{Êܤ^3ùˆ-G...
2016/12/27
[ "https://Stackoverflow.com/questions/41352994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6141329/" ]
You can simply do a mysql escape which escapes special characters in a string for use in an SQL statement. Eg.. ``` <?php $con=mysqli_connect("localhost","my_user","my_password","my_db"); $encrypted = mysqli_real_escape_string($con, $encryptedText); $sql="INSERT INTO table (columnName) VALUES ($encrypted)"; mysqli...
I am thinking if that is how your data looks, you could declare the data type of your table's column to be a blob then if you are using PHP you could use pdo functions to do CRUD in your MySQL database. I hope this helps.
41,352,994
I am trying to store some data in a mysql database through a php script. The data that I am trying to store is encrypted and so this means that it stores something like this: ``` '$ñŠN4Åßv4ñ•ÜÅØµÙÜqÚö4Þ§ƒÑìèêù¬a+µºeN¶†)‰ož¥´™³¯BâPqt‡š3ÊØyGyŠí!¬‚ƒý`,È-SFn­…,˜EïÕ¬_¯ ÛÆ1y©aœ«#˜¼öe÷·2,¢‹éUËx‰0ý`ΪÄÅŒ1²ljìí -{6“6{Êܤ^3ùˆ-G...
2016/12/27
[ "https://Stackoverflow.com/questions/41352994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6141329/" ]
You can simply do a mysql escape which escapes special characters in a string for use in an SQL statement. Eg.. ``` <?php $con=mysqli_connect("localhost","my_user","my_password","my_db"); $encrypted = mysqli_real_escape_string($con, $encryptedText); $sql="INSERT INTO table (columnName) VALUES ($encrypted)"; mysqli...
Using prepared statements is the best way to go in my opinion but you should learn about escaping too, it is something you should know. Prepared statements are easy, basically ``` SELECT something FROM somewhere WHERE this = :that bind('that', $val) ``` You should look into PDO, this will help <https://phpdelusi...
53,062,145
I am using mvvm pattern and using integerupdown button in the WPF application. To invoke command currently I am using ValueChanged trigger as following - ``` <i:Interaction.Triggers> <i:EventTrigger EventName="ValueChanged"> <i:InvokeCommandAction Command="{Binding PercentChangedCommand}...
2018/10/30
[ "https://Stackoverflow.com/questions/53062145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3424858/" ]
Add an Onclick attribute on all Links and set it to `location.reload();` OR add an Event Listener and listen for `click` and then set it to perform `location.reload();`. Or you could add `location.reload();` at the end of the code that process the click. Note : `location.reload();` is JavaScript. EDIT : Thanks to th...
Use `window.location.reload()` instead location.reload() to refresh/reload the current page
53,062,145
I am using mvvm pattern and using integerupdown button in the WPF application. To invoke command currently I am using ValueChanged trigger as following - ``` <i:Interaction.Triggers> <i:EventTrigger EventName="ValueChanged"> <i:InvokeCommandAction Command="{Binding PercentChangedCommand}...
2018/10/30
[ "https://Stackoverflow.com/questions/53062145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3424858/" ]
Add an Onclick attribute on all Links and set it to `location.reload();` OR add an Event Listener and listen for `click` and then set it to perform `location.reload();`. Or you could add `location.reload();` at the end of the code that process the click. Note : `location.reload();` is JavaScript. EDIT : Thanks to th...
```js $(function(){ var url = "sites/erp/ajaxify/airtime_order_actions.php"; $(".order_action").click(function(){ var id = $(this).attr('data-id'); var action = $(this).attr('id'); if(action !=""){ $.post(url, {id:id,action:action}, function(response){ var data = JSON.parse(response); ...
71,406,254
I am using the Morris Bar Chart to display the number of times a user has logged in into the system. I would like to have dynamic label ( on hovering). I am getting the data through PHP. ``` <?php $conn = mysqli_connect("localhost", "root", "", "database_name"); $sql = "SELECT account, ...
2022/03/09
[ "https://Stackoverflow.com/questions/71406254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18416332/" ]
The basic statement you need is as follows. Using the *inserted* table which contains only the row(s) inserted for the current server process, join back to the table on its primary key and update only the inserted rows which are not blank (and implied also not NULL). ``` update s set s.email = Concat(s.FirstName, '...
I complete the answer with `ISNULL` function. ``` CREATE TRIGGER trg_assignEmail ON Studentinformation After INSERT AS UPDATE s SET Email = Isnull(i.Email, Concat(i.FirstName, '.', i.LastName,'@youremail.com')) FROM inserted i JOIN Studentinformation s on s.StudentId = i.StudentId ```
55,424
I feel like this may be already out there somewhere, but I really did think this up on my own. What does this rebus puzzle mean? > > GO GO GO GO GO GO GO GO > > > That's really it! No additional hints exist in any of the content not in block quotes. Hint: > > The answer has 5 words. > > >
2017/09/27
[ "https://puzzling.stackexchange.com/questions/55424", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/30254/" ]
Any Chance it'd be: > > Go Wait in a line > > > as in > > Go \* 8 in a line > > >
Is it > > Forgot to go > > > Implying > > 4 GO x 2 GO = 8 GO (Four-go-two-go) = forgot to go > > >
55,424
I feel like this may be already out there somewhere, but I really did think this up on my own. What does this rebus puzzle mean? > > GO GO GO GO GO GO GO GO > > > That's really it! No additional hints exist in any of the content not in block quotes. Hint: > > The answer has 5 words. > > >
2017/09/27
[ "https://puzzling.stackexchange.com/questions/55424", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/30254/" ]
I guess the answer you're after is: > > to forego > > > because indeed > > 2 \* GO GO GO GO = two (four GO) > > >
Probably > > **GO**es in line... > > > > with? > > > As in: > > Rhymes with. > > >
55,424
I feel like this may be already out there somewhere, but I really did think this up on my own. What does this rebus puzzle mean? > > GO GO GO GO GO GO GO GO > > > That's really it! No additional hints exist in any of the content not in block quotes. Hint: > > The answer has 5 words. > > >
2017/09/27
[ "https://puzzling.stackexchange.com/questions/55424", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/30254/" ]
Could it be: > > It takes two to tango? > > > Rather cryptically, the rebus puzzle depicts: > > It takes two (more go) to (get) ten go. > > >
I feel, (EDITED ANSWER): > > Goes online (that is LIVE!) > > > based on pronounciation mainly > > 8 GOs arranged in a line > > > a common phrase of usage.
55,424
I feel like this may be already out there somewhere, but I really did think this up on my own. What does this rebus puzzle mean? > > GO GO GO GO GO GO GO GO > > > That's really it! No additional hints exist in any of the content not in block quotes. Hint: > > The answer has 5 words. > > >
2017/09/27
[ "https://puzzling.stackexchange.com/questions/55424", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/30254/" ]
I guess the answer you're after is: > > to forego > > > because indeed > > 2 \* GO GO GO GO = two (four GO) > > >
I think the answer is > > Everything is a go > > > meaning > > All preparations are complete > > >