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
607,705
On Wikipedia, it is stated that the Biot-Savart law is a formula used for determining the magnetic field pseudovector **B**(**r**) at a position vector **r** due to a current-carrying wire, but that the formula only works for constant/steady electric currents. Wikipedia then states the law: [![enter image description ...
2021/01/14
[ "https://physics.stackexchange.com/questions/607705", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/272242/" ]
As you said, "A slow draw stores energy in the bow that is then released quickly." The speed of the string, and therefore the speed of the arrow, is much faster than the archer's arm can move. The arrow's kinetic energy is proportional to the square of its speed. Greater speed translates to greater range. Greater en...
These answers are missing the point. When you throw an arrow, most of the kinetic energy goes into your arm. When you draw it back with a bow, most of it goes to the bow and almost none goes to your arm. A truck has way more energy than a baseball, but it's still better for a human to throw a baseball than hit it wit...
607,705
On Wikipedia, it is stated that the Biot-Savart law is a formula used for determining the magnetic field pseudovector **B**(**r**) at a position vector **r** due to a current-carrying wire, but that the formula only works for constant/steady electric currents. Wikipedia then states the law: [![enter image description ...
2021/01/14
[ "https://physics.stackexchange.com/questions/607705", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/272242/" ]
Due to the physiology of the human arm, it's very difficult to throw an object much faster than 100mph. No matter what object is being thrown, it can't move faster than the hand that's holding it, so around 100mph is the upper speed limit of any thrown object. A bow gets around this by using the elastic potential of t...
When an archer pulls back on a bow, it is the bow that bends. The energy that is able to be stored and released depends a lot on by the elasticity and tensile strength of the bow, and also the size of the bow, as that determines how much advantage you can get from leverage. Leverage I would say is one of the main issu...
607,705
On Wikipedia, it is stated that the Biot-Savart law is a formula used for determining the magnetic field pseudovector **B**(**r**) at a position vector **r** due to a current-carrying wire, but that the formula only works for constant/steady electric currents. Wikipedia then states the law: [![enter image description ...
2021/01/14
[ "https://physics.stackexchange.com/questions/607705", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/272242/" ]
Due to the physiology of the human arm, it's very difficult to throw an object much faster than 100mph. No matter what object is being thrown, it can't move faster than the hand that's holding it, so around 100mph is the upper speed limit of any thrown object. A bow gets around this by using the elastic potential of t...
These answers are missing the point. When you throw an arrow, most of the kinetic energy goes into your arm. When you draw it back with a bow, most of it goes to the bow and almost none goes to your arm. A truck has way more energy than a baseball, but it's still better for a human to throw a baseball than hit it wit...
157,742
I was asked to check a small dataset (3 replicates for 5 treatments, each) for significant outcome differences. I give an example: ![enter image description here](https://i.stack.imgur.com/OLh0h.png) The variance within replicates in the data cannot be assumed equal, so i thought a pairwise t-test is not appropriate...
2015/06/19
[ "https://stats.stackexchange.com/questions/157742", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/53848/" ]
For a nonparametric approach for pairwise comparisons, I recommend using a Holm correction to the Wilcoxon Rank Sum (aka Mann-Whitney U) test. Please follow the assumptions for the Wilcoxon Rank Sum test. Reference: <https://statistics.laerd.com/spss-tutorials/mann-whitney-u-test-using-spss-statistics.php> The Holm co...
You can try nonparametric **Mann-Whitney U-test**, which is generally applicable for two samples of 8 and 8 elements (some handbooks recommend 20 and 20). It was described in *H. B. Mann and D. R. Whitney. 1947. On a test of whether one of two random variables is stochastically larger than the other. Annals of Mathemat...
42,780,444
I am creating one website using codeigniter with session. When i load the welcome page in codeigniter its showing the error like:- > > Error Number: 1054, Unknown column 'data' in 'field list', SELECT > data FROM ci\_sessions WHERE id = > '562a04f4kt6j4n6eehsob3vm3puuc3r5', Filename: > C:/xampp/htdocs/ci\_ecom/sys...
2017/03/14
[ "https://Stackoverflow.com/questions/42780444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7573617/" ]
I believe you'd experience this problem in CodeIgniter 3.X. To resolve it: Update the config.php to look like below. ``` $config['sess_driver'] = 'database'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = 'ci_session'; $config['sess_match_ip'] = FALSE; $confi...
Your `ci_sessions` `table` does not have a data field, yet, in a query not shown in the question you try to load it or write it.
42,780,444
I am creating one website using codeigniter with session. When i load the welcome page in codeigniter its showing the error like:- > > Error Number: 1054, Unknown column 'data' in 'field list', SELECT > data FROM ci\_sessions WHERE id = > '562a04f4kt6j4n6eehsob3vm3puuc3r5', Filename: > C:/xampp/htdocs/ci\_ecom/sys...
2017/03/14
[ "https://Stackoverflow.com/questions/42780444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7573617/" ]
A straight forward answer is to create the table in this format, ``` CREATE TABLE IF NOT EXISTS `ci_sessions` ( `id` varchar(40) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) unsigned DEFAULT 0 NOT NULL, `data` blob NOT NULL, PRIMARY KEY (id), KEY `ci_sessions_timestamp` (`timestamp`)); ``` and ev...
Your `ci_sessions` `table` does not have a data field, yet, in a query not shown in the question you try to load it or write it.
168,629
I have a log file with errors from a migration I am doing of mail systems. I need to take user migration error logs and make them readable for the end user. A log file might contain a hundred errors. Each error is in XML format. There is usually a great deal of extraneous text around the tags but the important stuff is...
2010/07/28
[ "https://superuser.com/questions/168629", "https://superuser.com", "https://superuser.com/users/28398/" ]
I don't know how you feel about Java, but if you're interested you could check these tutorials out. [Tutorial 1](http://www.java-samples.com/showtutorial.php?tutorialid=152) [Tutorial 2](http://www.totheriver.com/learn/xml/xmltutorial.html) If not, good keywords for Google are Sax parsing and DOM parsing. You can rea...
Many languages have xml-parsers built in. Depending on your language of choice, you might want to take a look and see what it has to offer.
168,629
I have a log file with errors from a migration I am doing of mail systems. I need to take user migration error logs and make them readable for the end user. A log file might contain a hundred errors. Each error is in XML format. There is usually a great deal of extraneous text around the tags but the important stuff is...
2010/07/28
[ "https://superuser.com/questions/168629", "https://superuser.com", "https://superuser.com/users/28398/" ]
I don't know how you feel about Java, but if you're interested you could check these tutorials out. [Tutorial 1](http://www.java-samples.com/showtutorial.php?tutorialid=152) [Tutorial 2](http://www.totheriver.com/learn/xml/xmltutorial.html) If not, good keywords for Google are Sax parsing and DOM parsing. You can rea...
Answer: [XSLT](http://www.xml.com/pub/a/2003/11/26/learnXSLT.html) You can write an XSLT or have one written for you that can transform any sourced XML file or text in general into a different text output. Typically XSLT is used to transform XML into a different XML format or into HTML/XHTML but can also be used to ge...
5,308,193
I am reading a Codeigniter book, it said like this, > > When using the keywords TRUE,FALSE, and NULL in your > application, you should always write > them in Uppercase letters. > > > Why does Codeigniter need all the keywords write as uppercase letters?
2011/03/15
[ "https://Stackoverflow.com/questions/5308193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215912/" ]
CodeIgniter/PHP does not require that you write those words in uppercase letters of not. However it is [CodeIgniter's Coding Style](http://codeigniter.com/user_guide/general/styleguide.html) to write them like this. CodeIgniter has been developing following that Coding Style, so if you want your code to look like Cod...
Sadly, CodeIgniter wrongly attributes TRUE, FALSE and NULL the status of keywords. While they may appear as such, they actually haven't been keywords since the official release of PHP3 except for an extremely brief period for PHP5.1. For nearly two decades the truth values and null have been bona fide constants, first ...
2,440,860
Is it possible that adding more import statements to your java code could slow down the time it takes to load your classes into the JVM?
2010/03/14
[ "https://Stackoverflow.com/questions/2440860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/243494/" ]
No, imports are only used in compilation to find class references. Add unused imports and they don't do anything. To put it another way: ``` import java.util.*; ``` simply means you can write: ``` Map map = new HashMap(); ``` instead of: ``` java.util.Map map = new java.util.HashMap(); ``` That's all it does.
No. Imports are purely a compile time construct ... syntactic sugar. The imports tell the Java compiler how to map identifiers in the source code to fully qualified class names. But if the source code does not use an imported class, the bytecode file will have no references to it. Hence, a redundant import does not (a...
2,440,860
Is it possible that adding more import statements to your java code could slow down the time it takes to load your classes into the JVM?
2010/03/14
[ "https://Stackoverflow.com/questions/2440860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/243494/" ]
No, imports are only used in compilation to find class references. Add unused imports and they don't do anything. To put it another way: ``` import java.util.*; ``` simply means you can write: ``` Map map = new HashMap(); ``` instead of: ``` java.util.Map map = new java.util.HashMap(); ``` That's all it does.
Imports can have an effect on *compilation* time, but not on loading time or running time. Basically, if you import classes that you don't need (typically by using wildcard imports when explicit imports would do), then you can slow the compiler a bit. However, even that effect is generally trivial unless you are compi...
2,440,860
Is it possible that adding more import statements to your java code could slow down the time it takes to load your classes into the JVM?
2010/03/14
[ "https://Stackoverflow.com/questions/2440860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/243494/" ]
No, imports are only used in compilation to find class references. Add unused imports and they don't do anything. To put it another way: ``` import java.util.*; ``` simply means you can write: ``` Map map = new HashMap(); ``` instead of: ``` java.util.Map map = new java.util.HashMap(); ``` That's all it does.
Don't confuse the word "import" with "class loading". The import statement does not cause any code to be loaded into memory. It's just a convenience that allows you to refer to classes using their short name instead of typing the full class name (e.g, "Connection" instead of "java.sql.Connection").
2,440,860
Is it possible that adding more import statements to your java code could slow down the time it takes to load your classes into the JVM?
2010/03/14
[ "https://Stackoverflow.com/questions/2440860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/243494/" ]
No. Imports are purely a compile time construct ... syntactic sugar. The imports tell the Java compiler how to map identifiers in the source code to fully qualified class names. But if the source code does not use an imported class, the bytecode file will have no references to it. Hence, a redundant import does not (a...
Don't confuse the word "import" with "class loading". The import statement does not cause any code to be loaded into memory. It's just a convenience that allows you to refer to classes using their short name instead of typing the full class name (e.g, "Connection" instead of "java.sql.Connection").
2,440,860
Is it possible that adding more import statements to your java code could slow down the time it takes to load your classes into the JVM?
2010/03/14
[ "https://Stackoverflow.com/questions/2440860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/243494/" ]
Imports can have an effect on *compilation* time, but not on loading time or running time. Basically, if you import classes that you don't need (typically by using wildcard imports when explicit imports would do), then you can slow the compiler a bit. However, even that effect is generally trivial unless you are compi...
Don't confuse the word "import" with "class loading". The import statement does not cause any code to be loaded into memory. It's just a convenience that allows you to refer to classes using their short name instead of typing the full class name (e.g, "Connection" instead of "java.sql.Connection").
56,558,409
I am getting a lot of widgets groups in the tree and wanted to start extracting them to their own widget. I tried with Ctrl-Alt-W, this command does nothing and shows no error when there is a problem. If you go to the top menu and click on refactor, extract, extract to widget the following error occurs: ``` Can only...
2019/06/12
[ "https://Stackoverflow.com/questions/56558409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5557126/" ]
I don't think this is a bug. Everyone says that you have to highlight all of the code to extract it, and it worked with them, but for me, I've made it like this. First I put the cursor at the specific widget. [![enter image description here](https://i.stack.imgur.com/Szp28.png)](https://i.stack.imgur.com/Szp28.png) ...
Ensure Two Steps: 1. Your Code is 'Dart Formatted' (if using AndroidStudio, else regular formatted with appropriate commas if using VSCode), and 2. Your Cursor is at the beginning of the widget code block that you want to extract as a widget. Cursor position is the only problem here. Even after selecting the entire co...
4,436,534
I have a TextBox control for search, and a TreeView control below it. What I need is when I press the "Down Key ↓" **while the focus on the search TextBox**, I need to tell the TreeView "**a Down Key has been pressed while the focus on you**" ... I don't need to raise a KeyUp event on the TreeView or something, I need ...
2010/12/14
[ "https://Stackoverflow.com/questions/4436534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/541564/" ]
Okay I think I figured it out. For anybody who created an app from an iPhone tempalte and then modified it for iPad, you need to add a line in your -info.plist file that says "Supported interface orientations" and enter all of the supported orientations as below. Then it seems to work as expected. ``` <key>UISuppo...
I have done something like this in my Apps: ``` if ([[UIDevice currentDevice] orientation]==UIInterfaceOrientationLandscapeRight){ [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight]; }else if ([[UIDevice currentDevice] orientation]==UIInterfaceOrientationLandscapeLeft){ ...
20,869,575
``` search_terms = ['word','cow','horse'] library = [['desk','chair','lamp'],['cow','horse','word 223','barn']] ``` I want to be able to print all list(s) in library that contain ALL of the terms in search\_terms. so using the above list of search\_terms would print the second sublist in library even though 'word ...
2014/01/01
[ "https://Stackoverflow.com/questions/20869575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3150759/" ]
To get your hits, use a list comprehension: ``` search_terms = ['word', 'cow', 'horse'] library = [['desk', 'chair', 'lamp'], ['cow', 'horse', 'word 223', 'barn']] hits = [l for l in library if all(any(t in s for s in l) for t in search_terms)] ``` This works as follows 1. `for` e...
``` >>> search_terms = ['word','cow','horse'] >>> library = [['desk','chair','lamp'],['cow','horse','word 223','barn']] >>> from itertools import chain >>> list(chain(*library)) ['desk', 'chair', 'lamp', 'cow', 'horse', 'word 223', 'barn'] >>> [word for word in search_terms if word in list(chain(*library))] ['cow', 'ho...
38,706,190
I have a column of time data formatted like this: `hh:mm:ss` I want to make an IF statement that returns 1, 2 or 3 corresponding to first, second or third shift if the times fall between certain values. ``` =IF(AND(E50>8,0,0,E50<16,0,0),"First",(IF(AND(E50>=16,0,0,E50<24,0,0), "Second", "Third"))) ``` That's what i...
2016/08/01
[ "https://Stackoverflow.com/questions/38706190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626603/" ]
If you put your three shift start times in cells and reference them, it is as simple as this: ``` =IF(AND(D13>=$D$11, D13<$E$11),"First",IF(AND(D13>=$E$11,D13<$F$11),"Second", "Third")) ``` [![enter image description here](https://i.stack.imgur.com/9657p.jpg)](https://i.stack.imgur.com/9657p.jpg)
I found this to be the simplest way to convert time into 3 shifts. The plus 1 allows for excel returning midnight to 00:59 as 0. (so in the formula below, the first six results of the choose function are `"C"` referring to night shift, then at 6am the shift changes to `"A"` day shift. and so on. `"R3"` is the cell i ha...
38,706,190
I have a column of time data formatted like this: `hh:mm:ss` I want to make an IF statement that returns 1, 2 or 3 corresponding to first, second or third shift if the times fall between certain values. ``` =IF(AND(E50>8,0,0,E50<16,0,0),"First",(IF(AND(E50>=16,0,0,E50<24,0,0), "Second", "Third"))) ``` That's what i...
2016/08/01
[ "https://Stackoverflow.com/questions/38706190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626603/" ]
As a short formula: ``` =CHOOSE(INT(1+MOD(E50,1)*3),"Third","First","Second") ``` will do what you want. If the time is just time (no date) then ``` =CHOOSE(INT(1+E50*3),"Third","First","Second") ``` also will do. Also this formulas should be very fast ;) **EDIT** To make it completely "variable" you would ne...
I found this to be the simplest way to convert time into 3 shifts. The plus 1 allows for excel returning midnight to 00:59 as 0. (so in the formula below, the first six results of the choose function are `"C"` referring to night shift, then at 6am the shift changes to `"A"` day shift. and so on. `"R3"` is the cell i ha...
38,706,190
I have a column of time data formatted like this: `hh:mm:ss` I want to make an IF statement that returns 1, 2 or 3 corresponding to first, second or third shift if the times fall between certain values. ``` =IF(AND(E50>8,0,0,E50<16,0,0),"First",(IF(AND(E50>=16,0,0,E50<24,0,0), "Second", "Third"))) ``` That's what i...
2016/08/01
[ "https://Stackoverflow.com/questions/38706190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6626603/" ]
Use the [CHOOSE function](https://support.office.com/en-us/article/CHOOSE-function-fce63190-b514-48cc-a7ff-c1cdaaec0907) with [HOUR](https://support.office.com/en-us/article/HOUR-function-a3afa879-86cb-4339-b1b5-2dd2d7310ac7). You should account for all possible results. ``` =choose(hour(e50)/8+1, "third", "first", "s...
I found this to be the simplest way to convert time into 3 shifts. The plus 1 allows for excel returning midnight to 00:59 as 0. (so in the formula below, the first six results of the choose function are `"C"` referring to night shift, then at 6am the shift changes to `"A"` day shift. and so on. `"R3"` is the cell i ha...
58,527,554
tab1 has details of marks published for students. now all the marks are not out yet , based on empid few are published. tab1 ``` subgrp,empid,sub,marks 1 ,4 ,phy, 90 1 ,4 ,ls , 44 1 ,5 ,eng, 80 1 ,5 ,eco, 66 ``` tab2 has details of all the subjects present in semester along with the ...
2019/10/23
[ "https://Stackoverflow.com/questions/58527554", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11261935/" ]
Use a `cross join` to generate the rows and a `left join` to bring in the data: ``` select t2.substr, e.empid, t2.subject, t.marks, t2.priority from (select distinct empid from tab1 ) e cross join tab2 t2 left join tab1 t on t.empid = e.empid and t.subgrp = t2.subgrp and t.sub = t2....
You can use `cross join` and then `group by` on it. ``` Select t1.subgrp, t1.empid, t2.subject, Max(t1.marks) as marks, t2.priority From tab1 t1 cross join tab2 t2 Group by t1.subgrp, t1.empid, t2.subject, t2.priority ``` Cheers!!
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
use php `rtrim()` function to remove the `,` from the right. The `rtrim()` function removes whitespace or other predefined characters from the right side of a string. ``` echo rtrim($rest,",");//remove all the , from right ``` or, use `substr()` function of php to remove the last character ``` echo substr($rest,0,s...
try this ``` $rest = ''; while($t= mysql_fetch_array($asd)){ $rest .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $rest = rtrim($rest,","); echo $rest; ```
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
From what i see is that you are trying to generate a json object, this is not the way to do that. ``` $data = []; while (($t = mysql_fetch_array($asd))) { $data[$t['a']] = $t['b']; } echo json_decode($data); ``` This will output a json string in the format you are trying to generate. --- Sidenote 1: The reas...
Besides rtrim you can use `substr()` to remove the last character: ``` while ($something) { //construct $str } $str = substr($str, 0, -1); ```
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
From what i see is that you are trying to generate a json object, this is not the way to do that. ``` $data = []; while (($t = mysql_fetch_array($asd))) { $data[$t['a']] = $t['b']; } echo json_decode($data); ``` This will output a json string in the format you are trying to generate. --- Sidenote 1: The reas...
**Just to throw in an alternative solution:** You could not attach the trailing comma in the first place instead of trimming it afterwards. Let's assume you have the number of results in `$num_rows`, then you could do: ``` $i = 1; while($t = mysql_fetch_array($asd)) { $rest = '"' . $t['a'] . '": "' . $t['b'] ...
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
From what i see is that you are trying to generate a json object, this is not the way to do that. ``` $data = []; while (($t = mysql_fetch_array($asd))) { $data[$t['a']] = $t['b']; } echo json_decode($data); ``` This will output a json string in the format you are trying to generate. --- Sidenote 1: The reas...
try this ``` $rest = ''; while($t= mysql_fetch_array($asd)){ $rest .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $rest = rtrim($rest,","); echo $rest; ```
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
You have to do on single string, but right now you are doing it on every string instance in while loop, ``` $str = ''; while($t= mysql_fetch_array($asd)){ $str .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $str = rtrim($str,","); ``` Give it a try, this will help.
**Just to throw in an alternative solution:** You could not attach the trailing comma in the first place instead of trimming it afterwards. Let's assume you have the number of results in `$num_rows`, then you could do: ``` $i = 1; while($t = mysql_fetch_array($asd)) { $rest = '"' . $t['a'] . '": "' . $t['b'] ...
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
use php `rtrim()` function to remove the `,` from the right. The `rtrim()` function removes whitespace or other predefined characters from the right side of a string. ``` echo rtrim($rest,",");//remove all the , from right ``` or, use `substr()` function of php to remove the last character ``` echo substr($rest,0,s...
**Just to throw in an alternative solution:** You could not attach the trailing comma in the first place instead of trimming it afterwards. Let's assume you have the number of results in `$num_rows`, then you could do: ``` $i = 1; while($t = mysql_fetch_array($asd)) { $rest = '"' . $t['a'] . '": "' . $t['b'] ...
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
Besides rtrim you can use `substr()` to remove the last character: ``` while ($something) { //construct $str } $str = substr($str, 0, -1); ```
**Just to throw in an alternative solution:** You could not attach the trailing comma in the first place instead of trimming it afterwards. Let's assume you have the number of results in `$num_rows`, then you could do: ``` $i = 1; while($t = mysql_fetch_array($asd)) { $rest = '"' . $t['a'] . '": "' . $t['b'] ...
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
You have to do on single string, but right now you are doing it on every string instance in while loop, ``` $str = ''; while($t= mysql_fetch_array($asd)){ $str .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $str = rtrim($str,","); ``` Give it a try, this will help.
try this ``` $rest = ''; while($t= mysql_fetch_array($asd)){ $rest .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $rest = rtrim($rest,","); echo $rest; ```
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
From what i see is that you are trying to generate a json object, this is not the way to do that. ``` $data = []; while (($t = mysql_fetch_array($asd))) { $data[$t['a']] = $t['b']; } echo json_decode($data); ``` This will output a json string in the format you are trying to generate. --- Sidenote 1: The reas...
You have to do on single string, but right now you are doing it on every string instance in while loop, ``` $str = ''; while($t= mysql_fetch_array($asd)){ $str .= ' "'.$t['a'].'": "'.$t['b'].'",'; } $str = rtrim($str,","); ``` Give it a try, this will help.
44,821,684
I'm working with the new [Google object\_detection api](https://github.com/tensorflow/models/tree/master/object_detection) on my own dataset In the config file there are fields `eval_config` and `eval_input_reader`, but I don't understand how to make them work. I've also found a file in tensorflow/models/object\_detec...
2017/06/29
[ "https://Stackoverflow.com/questions/44821684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805141/" ]
From what i see is that you are trying to generate a json object, this is not the way to do that. ``` $data = []; while (($t = mysql_fetch_array($asd))) { $data[$t['a']] = $t['b']; } echo json_decode($data); ``` This will output a json string in the format you are trying to generate. --- Sidenote 1: The reas...
use php `rtrim()` function to remove the `,` from the right. The `rtrim()` function removes whitespace or other predefined characters from the right side of a string. ``` echo rtrim($rest,",");//remove all the , from right ``` or, use `substr()` function of php to remove the last character ``` echo substr($rest,0,s...
2,687
Is it possible to define a content type, a custom column, a list instance and associate the contenttype to the list using xml, all within the same feature or do they need to be seperated into seperate features? All the best
2010/05/06
[ "https://sharepoint.stackexchange.com/questions/2687", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/-1/" ]
You should always use appropriate feature scoping. In your scenario you would need: * A Site Collection scoped feature which would deploy the Content Type and the Site Column * A Web scoped feature which would deploy the list instance and associate the content type. This is the best way and the best practice to achie...
It should work fine in a signle feature also.
11,322,024
I am writing a function in C that get a .tar.gz data transfer, when I got the data, I should do a check that whether the transfer is complete and the data is valid, so any tips about check the integrity of gzip data? regards
2012/07/04
[ "https://Stackoverflow.com/questions/11322024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/472858/" ]
`gunzip -t` checks the compressed file integrity.
If you are just downloading a tarball, then you can md5sum it on the other end and then check that.
29,425,940
I am having trouble viewing my jar files. All the jar files in the libs directory in my app module show sources not found and allow me the option to attach sources. What exactly should I attach to view these jars in their entirety without the annoying comment "compiled code"? This is the `build.gradle` file from the a...
2015/04/03
[ "https://Stackoverflow.com/questions/29425940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4726745/" ]
If anyone was wondering, I figured it out. All I had to do was download( in my case) the source files from github as a zip file. I extracted it with7-zip and then at the top right of the IDE where it says "attach sources" I clicked on the extracted folder. Now I can view all of the code.
Add this at the end of your gradle.build file: ``` dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) } ``` This will make your build take under consideration your .jar files
29,425,940
I am having trouble viewing my jar files. All the jar files in the libs directory in my app module show sources not found and allow me the option to attach sources. What exactly should I attach to view these jars in their entirety without the annoying comment "compiled code"? This is the `build.gradle` file from the a...
2015/04/03
[ "https://Stackoverflow.com/questions/29425940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4726745/" ]
If anyone was wondering, I figured it out. All I had to do was download( in my case) the source files from github as a zip file. I extracted it with7-zip and then at the top right of the IDE where it says "attach sources" I clicked on the extracted folder. Now I can view all of the code.
You need to add it to your gradle MODULE file. You probably added it to your PROJECT gradle file. See an example of mine of a gradle MODULE file: ``` apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "bruno.stackrest" ...
58,153,709
I learned that `new()` is how we structurally type a class constructor in TypeScript, so how can we type an object that has `new` method, like: ``` const k = { new() { return '123' } } ```
2019/09/29
[ "https://Stackoverflow.com/questions/58153709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4340261/" ]
There is no corresponding object literal syntax to define an object literal with `new`. You can use a class expression: ``` const k = class { constructor () { } } new k() ``` [play](https://www.typescriptlang.org/play/#code/MYewdgzgLgBA1jAvDYAbAhhCMDeBYAKBhXGgCcBXYKEMmACgEpdDjjWYBfQ7gwsAKYB3eEyA)
The keyword `new` is used to **instantiate** a class. ```js const k = new MyClass(); ``` To define the constructor of this class you have to use the `constructor` keyword. ```js class MyClass1 { constructor() { } } const MyClass2 = class { constructor() { } } interface MyClass3 { constructor(): Func...
7,303,035
I use jquery mobile to generate my buttons and I have a CSS code below to change its design but no matter what value i put in width and height the size of the button doesn't change, but it is relatively dependent on the font size of the label. How can I change this so I can change the button size irregardless of the fo...
2011/09/05
[ "https://Stackoverflow.com/questions/7303035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/842008/" ]
Made a small test for you, maybe it will help to start you off <http://jsfiddle.net/3EgrW/1/> just a input button and a little css **Updated** Added a example with JQuery 1.6.2 working fine aswell <http://jsfiddle.net/3EgrW/2/>
The button *might* be an `inline` element. Make it an `inline-block`: ``` display: inline-block; ```
7,303,035
I use jquery mobile to generate my buttons and I have a CSS code below to change its design but no matter what value i put in width and height the size of the button doesn't change, but it is relatively dependent on the font size of the label. How can I change this so I can change the button size irregardless of the fo...
2011/09/05
[ "https://Stackoverflow.com/questions/7303035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/842008/" ]
Live Example: * <http://jsfiddle.net/3EgrW/21/> (Width) * <http://jsfiddle.net/3EgrW/35/> (Height) JS: ``` // For all buttons use something like this $('.ui-btn').css('width','50%'); // For individual buttons use something like this $('#theButton1').parent().css('width', '75%'); // Or this for HREF data-role butto...
The button *might* be an `inline` element. Make it an `inline-block`: ``` display: inline-block; ```
7,303,035
I use jquery mobile to generate my buttons and I have a CSS code below to change its design but no matter what value i put in width and height the size of the button doesn't change, but it is relatively dependent on the font size of the label. How can I change this so I can change the button size irregardless of the fo...
2011/09/05
[ "https://Stackoverflow.com/questions/7303035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/842008/" ]
Live Example: * <http://jsfiddle.net/3EgrW/21/> (Width) * <http://jsfiddle.net/3EgrW/35/> (Height) JS: ``` // For all buttons use something like this $('.ui-btn').css('width','50%'); // For individual buttons use something like this $('#theButton1').parent().css('width', '75%'); // Or this for HREF data-role butto...
Made a small test for you, maybe it will help to start you off <http://jsfiddle.net/3EgrW/1/> just a input button and a little css **Updated** Added a example with JQuery 1.6.2 working fine aswell <http://jsfiddle.net/3EgrW/2/>
39,979,870
Write a method `changeBlue(weight)`. Do not change any color of the pixels in the first half of the picture. For the second half, change blue value of each pixel by `new blue=original blue * weight`. > > For example, if a pixel has values (200,100,100) and weight is 0.5, > then the new values will be (200,100,50). ...
2016/10/11
[ "https://Stackoverflow.com/questions/39979870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1729377/" ]
Why do you JSON.stringify your 'body'? You don't have to do that, it should work without JSON.stringify() -- And by that I mean that you should either just send 'patient' or do a "body = patient;" and then send body.
``` addBookWithObservable(book:Book): Observable<Book> { let headers = new Headers({ 'Content-Type': 'application/json' }); let options = new RequestOptions({ headers: headers }); return this.http.post(this.url, book, options) .map(this.extractData) .catch(this.handleErrorObservable); ``` <https...
1,705,010
I just pressed `Delete` on a file on one of my drives. It surprisingly didn't ask me whether I really wanted to move it to the trash bin, but just did it instantly. This is new behaviour, no? I have certainly not made any such changes. Just to make sure, I tried several times on my desktop, with both a text document a...
2022/02/15
[ "https://superuser.com/questions/1705010", "https://superuser.com", "https://superuser.com/users/1667955/" ]
> > This is new behaviour, no? > > > Well, it's new behaviour **since Windows 8.0**. I went through my collection of Mostly Legitimate Windows ISOs and installed all of them. The option to enable/disable confirmations when sending files to Recycle Bin has been *available* ever since Windows 95 introduced the fea...
I see the same exact behavior on my machine (19043.1526). I can only guess that they decided that the dialog was pointless because you can get the files back. I myself do not find the dialog pointless.. often.. I am like ***"OH SHOOT! -- WHOOPS -- CANCEL"..*** To put the behavior back the way it was, right click on ...
1,705,010
I just pressed `Delete` on a file on one of my drives. It surprisingly didn't ask me whether I really wanted to move it to the trash bin, but just did it instantly. This is new behaviour, no? I have certainly not made any such changes. Just to make sure, I tried several times on my desktop, with both a text document a...
2022/02/15
[ "https://superuser.com/questions/1705010", "https://superuser.com", "https://superuser.com/users/1667955/" ]
Windows Update is capable of changing settings without prior notice. If this setting was changed, here are the places to look, where this confirmation could have been disabled. * Right-click the Recycle Bin, select Properties and verify that "Display delete confirmation dialog" is set. [![enter image description her...
I see the same exact behavior on my machine (19043.1526). I can only guess that they decided that the dialog was pointless because you can get the files back. I myself do not find the dialog pointless.. often.. I am like ***"OH SHOOT! -- WHOOPS -- CANCEL"..*** To put the behavior back the way it was, right click on ...
1,705,010
I just pressed `Delete` on a file on one of my drives. It surprisingly didn't ask me whether I really wanted to move it to the trash bin, but just did it instantly. This is new behaviour, no? I have certainly not made any such changes. Just to make sure, I tried several times on my desktop, with both a text document a...
2022/02/15
[ "https://superuser.com/questions/1705010", "https://superuser.com", "https://superuser.com/users/1667955/" ]
> > This is new behaviour, no? > > > Well, it's new behaviour **since Windows 8.0**. I went through my collection of Mostly Legitimate Windows ISOs and installed all of them. The option to enable/disable confirmations when sending files to Recycle Bin has been *available* ever since Windows 95 introduced the fea...
Windows Update is capable of changing settings without prior notice. If this setting was changed, here are the places to look, where this confirmation could have been disabled. * Right-click the Recycle Bin, select Properties and verify that "Display delete confirmation dialog" is set. [![enter image description her...
1,705,010
I just pressed `Delete` on a file on one of my drives. It surprisingly didn't ask me whether I really wanted to move it to the trash bin, but just did it instantly. This is new behaviour, no? I have certainly not made any such changes. Just to make sure, I tried several times on my desktop, with both a text document a...
2022/02/15
[ "https://superuser.com/questions/1705010", "https://superuser.com", "https://superuser.com/users/1667955/" ]
> > This is new behaviour, no? > > > Well, it's new behaviour **since Windows 8.0**. I went through my collection of Mostly Legitimate Windows ISOs and installed all of them. The option to enable/disable confirmations when sending files to Recycle Bin has been *available* ever since Windows 95 introduced the fea...
Not sure about other folks, but for all of my windows machines the initial default setting has always been with no confirmation prompt if "deleting" a file i.e. moving to the Recycle Bin. The prompt can be turned on in the Recycle Bin properties. But I do always see a prompt for confirming if I select a file and press ...
1,705,010
I just pressed `Delete` on a file on one of my drives. It surprisingly didn't ask me whether I really wanted to move it to the trash bin, but just did it instantly. This is new behaviour, no? I have certainly not made any such changes. Just to make sure, I tried several times on my desktop, with both a text document a...
2022/02/15
[ "https://superuser.com/questions/1705010", "https://superuser.com", "https://superuser.com/users/1667955/" ]
Windows Update is capable of changing settings without prior notice. If this setting was changed, here are the places to look, where this confirmation could have been disabled. * Right-click the Recycle Bin, select Properties and verify that "Display delete confirmation dialog" is set. [![enter image description her...
Not sure about other folks, but for all of my windows machines the initial default setting has always been with no confirmation prompt if "deleting" a file i.e. moving to the Recycle Bin. The prompt can be turned on in the Recycle Bin properties. But I do always see a prompt for confirming if I select a file and press ...
47,322,486
``` SELECT @sqlText = @sqlText + ' SELECT * FROM ' + QUOTENAME(name) + CHAR(13) FROM sys.tables ```
2017/11/16
[ "https://Stackoverflow.com/questions/47322486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8919097/" ]
[![enter image description here](https://i.stack.imgur.com/206YC.png)](https://i.stack.imgur.com/206YC.png)If you are using phpmyadmin do the following steps: 1) select the database 2) Select search from the top links 3) Now you will get text box to enter what to search 4) Select the table in which you want...
You can't search like that. You can write a query as ``` SELECT * FROM tablename WHERE MATCH(`col1`, `col2`, `col3`) AGAINST ('$searchword') ```
69,192,781
I want to update Array initialState ``` const initialState = { name:'a', arrNames:[1,2,3,4]} ``` reducer ``` const userRuducer = createReducer(initialState,(builder)=>{ builder.addCase('UPDATE_ARRAY',(state,action)=>{ // how to add ' 12' in the arraay }) }) ``` component ``` <Button onClick...
2021/09/15
[ "https://Stackoverflow.com/questions/69192781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16460369/" ]
You are using redux-toolkits so it basically just push the new item to the object: ``` builder.addCase("UPDATE_ARRAY", (state, action) => { state.arrNames.push(action.payload) }; ``` Because redux-toolkits already included with [immerjs](https://redux-toolkit.js.org/usage/immer-reducers#immutable-updates-with-imme...
``` builder.addCase("UPDATE_ARRAY", (state, action) => { return { ...state, arrNames:[...state.arrNames,action.payload] }; }) ``` here the state is immutable and conceded as better practice
82,332
A Ger can mean a stranger, foreigner and many other things but what is the origin? I have heard the Ibn Ezra say that it comes from the Hebrew word Gargir meaning a certain type of berry because it is severed form the branch. Can anyone provide a source.
2017/05/03
[ "https://judaism.stackexchange.com/questions/82332", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/13518/" ]
The אבן עזרא in Bereishis (15:13) > > כי גר יהיה זרעך נקרא בלשון הקדש האיש שיש לו משפחה כסעיף שהוא דבק בשרש, > על כן נקרא אזרח, כי טעמו כאזרח רענן (תה' לז, לה). **וטעם גר כמו הגרגיר > שנכרת מן הסעיף**. ויש חסרי לב שזה הטעם רחוק בעיניהם. ואלו היו יודעים טעם > כל אות וצורתו אז יכירו האמת > > >
**What is the ger? A convert, an outsider, or a Jew?** Contrary to what many people think, the Torah does not consider the ger to be a convert. For example, while Numbers 15:15 gives the ger rights to bring gift offerings, the ger is more like a protected foreigner (נכר) living in the land of Israel. While the ger is ...
82,332
A Ger can mean a stranger, foreigner and many other things but what is the origin? I have heard the Ibn Ezra say that it comes from the Hebrew word Gargir meaning a certain type of berry because it is severed form the branch. Can anyone provide a source.
2017/05/03
[ "https://judaism.stackexchange.com/questions/82332", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/13518/" ]
The אבן עזרא in Bereishis (15:13) > > כי גר יהיה זרעך נקרא בלשון הקדש האיש שיש לו משפחה כסעיף שהוא דבק בשרש, > על כן נקרא אזרח, כי טעמו כאזרח רענן (תה' לז, לה). **וטעם גר כמו הגרגיר > שנכרת מן הסעיף**. ויש חסרי לב שזה הטעם רחוק בעיניהם. ואלו היו יודעים טעם > כל אות וצורתו אז יכירו האמת > > >
Rabbenu Bahya on Ex. 22:20: > > The word גר for a stranger is derived from גרגיר, an isolated berry at the far end of a solitary branch. > > >
82,332
A Ger can mean a stranger, foreigner and many other things but what is the origin? I have heard the Ibn Ezra say that it comes from the Hebrew word Gargir meaning a certain type of berry because it is severed form the branch. Can anyone provide a source.
2017/05/03
[ "https://judaism.stackexchange.com/questions/82332", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/13518/" ]
The אבן עזרא in Bereishis (15:13) > > כי גר יהיה זרעך נקרא בלשון הקדש האיש שיש לו משפחה כסעיף שהוא דבק בשרש, > על כן נקרא אזרח, כי טעמו כאזרח רענן (תה' לז, לה). **וטעם גר כמו הגרגיר > שנכרת מן הסעיף**. ויש חסרי לב שזה הטעם רחוק בעיניהם. ואלו היו יודעים טעם > כל אות וצורתו אז יכירו האמת > > >
The term ger means “stranger,” not a convert in the Bible. When the Israelites are called gerim in Egypt (the plural form), it means strangers, not converts in Egypt.
82,332
A Ger can mean a stranger, foreigner and many other things but what is the origin? I have heard the Ibn Ezra say that it comes from the Hebrew word Gargir meaning a certain type of berry because it is severed form the branch. Can anyone provide a source.
2017/05/03
[ "https://judaism.stackexchange.com/questions/82332", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/13518/" ]
Rabbenu Bahya on Ex. 22:20: > > The word גר for a stranger is derived from גרגיר, an isolated berry at the far end of a solitary branch. > > >
**What is the ger? A convert, an outsider, or a Jew?** Contrary to what many people think, the Torah does not consider the ger to be a convert. For example, while Numbers 15:15 gives the ger rights to bring gift offerings, the ger is more like a protected foreigner (נכר) living in the land of Israel. While the ger is ...
82,332
A Ger can mean a stranger, foreigner and many other things but what is the origin? I have heard the Ibn Ezra say that it comes from the Hebrew word Gargir meaning a certain type of berry because it is severed form the branch. Can anyone provide a source.
2017/05/03
[ "https://judaism.stackexchange.com/questions/82332", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/13518/" ]
The term ger means “stranger,” not a convert in the Bible. When the Israelites are called gerim in Egypt (the plural form), it means strangers, not converts in Egypt.
**What is the ger? A convert, an outsider, or a Jew?** Contrary to what many people think, the Torah does not consider the ger to be a convert. For example, while Numbers 15:15 gives the ger rights to bring gift offerings, the ger is more like a protected foreigner (נכר) living in the land of Israel. While the ger is ...
3,261,521
> > Does $S\_{10}$ have a subgroup that is isomorphic to $\Bbb{Z}/30\Bbb{Z}$? > > > I tried to use the fact that if such subgroup $H$ exists, then $|H|=|\Bbb{Z}/30\Bbb{Z}|=30$, however I don't see why such subgroup can't exist. Beyond that I really have no idea how to proceed. Can anyone give a hint?
2019/06/13
[ "https://math.stackexchange.com/questions/3261521", "https://math.stackexchange.com", "https://math.stackexchange.com/users/610064/" ]
**Hint:** What would the cycle type of a generator of such a subgroup be?
The question is equivalent to > > Does $S\_{10}$ have an element of order $30$ ? > > > Now, $30=2 \cdot 3 \cdot 5$ and $2+3+5 \le 10$, and so the answer is yes: just take a permutation with cycle structure $2-3-5$. The simplest one is $$ (1,2)(3,4,5)(6,7,8,9,10) $$ This permutation has order $30=\operatorname{lcm...
168,775
I find that of all the "close" reasons, "too localized" is the one with the highest ratio of "times it applies," to "times questions are closed because of it." Which leads me to believe that the community doesn't actually respect the description of this close-reason, which makes me think it needs an update. TL;DR ====...
2013/02/23
[ "https://meta.stackexchange.com/questions/168775", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/183887/" ]
> > You shall not muzzle the ox when it treads out the grain. > >                                                                     --Deut. 25:4 > > > For all the high-minded language we throw around here sometimes, the truth is that most of SO is built on some form of enlightened self-interest. People ask qu...
A middle way is to ask: "Is this person's situation likely to shed light on someone else?" One tricky aspect is that you can't always tell until an answer emerges. If dialog between the OP and others reveals some purely local issue, well, then it's too localized. *However*: A bit of editing can sometimes make a big di...
168,775
I find that of all the "close" reasons, "too localized" is the one with the highest ratio of "times it applies," to "times questions are closed because of it." Which leads me to believe that the community doesn't actually respect the description of this close-reason, which makes me think it needs an update. TL;DR ====...
2013/02/23
[ "https://meta.stackexchange.com/questions/168775", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/183887/" ]
Let me give you a counter example. Today I wanted to refresh my knowledge of named pipes. I searched and found [C++: Implementing Named Pipes using the Win32 API](https://stackoverflow.com/questions/2640642/c-implementing-named-pipes-using-the-win32-api) - this question was highly specific to someone who didn't know th...
A middle way is to ask: "Is this person's situation likely to shed light on someone else?" One tricky aspect is that you can't always tell until an answer emerges. If dialog between the OP and others reveals some purely local issue, well, then it's too localized. *However*: A bit of editing can sometimes make a big di...
168,775
I find that of all the "close" reasons, "too localized" is the one with the highest ratio of "times it applies," to "times questions are closed because of it." Which leads me to believe that the community doesn't actually respect the description of this close-reason, which makes me think it needs an update. TL;DR ====...
2013/02/23
[ "https://meta.stackexchange.com/questions/168775", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/183887/" ]
> > You shall not muzzle the ox when it treads out the grain. > >                                                                     --Deut. 25:4 > > > For all the high-minded language we throw around here sometimes, the truth is that most of SO is built on some form of enlightened self-interest. People ask qu...
Let me give you a counter example. Today I wanted to refresh my knowledge of named pipes. I searched and found [C++: Implementing Named Pipes using the Win32 API](https://stackoverflow.com/questions/2640642/c-implementing-named-pipes-using-the-win32-api) - this question was highly specific to someone who didn't know th...
7,908,215
I'm prototyping with FastMM powered Delphi 2010 and every time i allocate memory with `GetMem` resulting pointer is aligned to QWORD boundary. But should i rely on that?
2011/10/26
[ "https://Stackoverflow.com/questions/7908215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/759588/" ]
You can explicitly specify it: <http://docwiki.embarcadero.com/RADStudio/en/Configuring_the_Memory_Manager>
OK, findings: Quick test race revealed what default Borland heap manager shipped with D7 passes WORD and DWORD, but fails QWORD and PARA alignment testcases. Therefore either contributed MM or manual checks/adjustments is **required**. Thanks, everyone!
2,892,082
I have been reading about protobuf-net and it is amazing! Are there any tutorials that I could use? (More specifically for `Dictionary<TKey,TValue>` and contracts for generics) Are there any tips associated with it? Could I simply plug it into my current codebase or are there any changes I need to do?
2010/05/23
[ "https://Stackoverflow.com/questions/2892082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/296722/" ]
`Dictionary<TKey,TValue>` should largely just work (in "v1" at least; I haven't written that yet for "v2"). I fully admit that the documentation is... sparse. Things that leap to mind: * [Getting Started](http://code.google.com/p/protobuf-net/wiki/GettingStarted) (and there are a few other pages in the wiki) * there ...
Funnily enough, I just answered another question with a link to [protobuf-net](https://stackoverflow.com/questions/2891658/settings-file-as-dictionary-with-serialization/2891915#2891915). I found it relatively simple to do, and Marc is very responsive via email. (Hehe, sorry if I'm inviting people to spam you with que...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
Many things have been said here. I'll just give some other perspective. Imagine how these women have felt when working for the first time working with men. If you can relate to that, it may be less difficult to handle this situation. Maybe there are other people in your company with the same background. Ask them ho...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
I disagree with all the answers saying to treat them just like male colleagues. Treat them with the respect that is inherent in your cultural values. I work with many women. I don't treat them the same as male colleagues. I am much more careful with my language around them, and I make a conscious effort not to argue i...
> > In my college days ,we had group of only boys and I rarely speak/ interact with girls. > > > Personally I am very skeptical of gender-separated education for exactly this reason: It insufficiently prepares people for interactions with the other gender which will be necessary during their work-life. > > How s...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
> > In my college days ,we had group of only boys and I rarely speak/ interact with girls. > > > Personally I am very skeptical of gender-separated education for exactly this reason: It insufficiently prepares people for interactions with the other gender which will be necessary during their work-life. > > How s...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
As a fellow Indian, I'll offer this: Education here works in the way that till you're in middle school(fifth grade), boys and girls are made to sit on common benches, and interaction between them is normal, as is between people of the same sex(why are people shy of using this word? It's more appropriate than gender he...
Some of the comments suggest that treating your female coworkers the same way you would normally treat male coworkers might not be a great idea, assuming there are less-kind treatments that are acceptable in your society between men, but not from men to women. The fact that you are concerned with treating your coworke...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
Some of the comments suggest that treating your female coworkers the same way you would normally treat male coworkers might not be a great idea, assuming there are less-kind treatments that are acceptable in your society between men, but not from men to women. The fact that you are concerned with treating your coworke...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Just try to be "normal" as you are with your male friends or neighbors etc. DO not try to shy away. Speak with them casually , informally as friends. In about 2-3 weeks you will start feeling comfortable with them. in about 3-4 months , you will forget about all your shyness. Relax and do not put any pressure on yourse...
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
As a fellow Indian, I'll offer this: Education here works in the way that till you're in middle school(fifth grade), boys and girls are made to sit on common benches, and interaction between them is normal, as is between people of the same sex(why are people shy of using this word? It's more appropriate than gender he...
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Just try to be "normal" as you are with your male friends or neighbors etc. DO not try to shy away. Speak with them casually , informally as friends. In about 2-3 weeks you will start feeling comfortable with them. in about 3-4 months , you will forget about all your shyness. Relax and do not put any pressure on yourse...
> > In my college days ,we had group of only boys and I rarely speak/ interact with girls. > > > Personally I am very skeptical of gender-separated education for exactly this reason: It insufficiently prepares people for interactions with the other gender which will be necessary during their work-life. > > How s...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Just try to be "normal" as you are with your male friends or neighbors etc. DO not try to shy away. Speak with them casually , informally as friends. In about 2-3 weeks you will start feeling comfortable with them. in about 3-4 months , you will forget about all your shyness. Relax and do not put any pressure on yourse...
Some of the comments suggest that treating your female coworkers the same way you would normally treat male coworkers might not be a great idea, assuming there are less-kind treatments that are acceptable in your society between men, but not from men to women. The fact that you are concerned with treating your coworke...
65,771
I am a recently graduated engineer and have just joined a small software company in India. Our company is divided into project teams that are further divided into groups of three people. My first project is starting soon and I've been assigned to a group with two women. Unfortunately I'm come from a traditional backgr...
2016/04/23
[ "https://workplace.stackexchange.com/questions/65771", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/49295/" ]
Why does them being a woman have any bearing on how you interact with them in a professional workplace? To have a professional relationship, **you should interact with them in the same manner as you do with men in a professional setting - with respect.** Colleagues, irrespective of male or female, appreciate and expect...
**TL;DR** You're a human being. Human beings feel naturally uncomfortable when experiencing physical and or emotional attraction to another, and you're not wrong in asking this question or feeling the way you do. Keep it professional, respect the equality you share, and respect the differences between your genders. ...
672,032
I just switched to Fluent NHibernate and I've encountered an issue and did not find any information about it. Here's the case : ``` public class Field : DomainObject, IField { public Field() { } public virtual string Name { get; set; } public virtual string ContactPerson { get; set; } publi...
2009/03/23
[ "https://Stackoverflow.com/questions/672032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67342/" ]
I find that there are valid reasons for using an interface instead of a concrete class as a property. For example, if your Field class was in a seperate project to the Address class, and you didn't have a dependency on the Address class's project from the Field class's project. There are other ways of dealing with th...
On your Field object, you have an object of type IAddress. This could be implemented by any number of different implementations. With what you are asking, each implementation would have its own mapping, which would introduce any number of difficulties (impossibilities?) for NHibernate to handle. A simple example woul...
672,032
I just switched to Fluent NHibernate and I've encountered an issue and did not find any information about it. Here's the case : ``` public class Field : DomainObject, IField { public Field() { } public virtual string Name { get; set; } public virtual string ContactPerson { get; set; } publi...
2009/03/23
[ "https://Stackoverflow.com/questions/672032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67342/" ]
On your Field object, you have an object of type IAddress. This could be implemented by any number of different implementations. With what you are asking, each implementation would have its own mapping, which would introduce any number of difficulties (impossibilities?) for NHibernate to handle. A simple example woul...
If you are interested in decoupling your ORM entirely from your domain layer, and referencing interfaces throughout your data layer rather than specifying concrete classes, you can implement an EmptyInterceptor to map between the two. See my answer [here](https://stackoverflow.com/questions/2286691/how-to-map-an-inter...
672,032
I just switched to Fluent NHibernate and I've encountered an issue and did not find any information about it. Here's the case : ``` public class Field : DomainObject, IField { public Field() { } public virtual string Name { get; set; } public virtual string ContactPerson { get; set; } publi...
2009/03/23
[ "https://Stackoverflow.com/questions/672032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67342/" ]
I find that there are valid reasons for using an interface instead of a concrete class as a property. For example, if your Field class was in a seperate project to the Address class, and you didn't have a dependency on the Address class's project from the Field class's project. There are other ways of dealing with th...
If you are interested in decoupling your ORM entirely from your domain layer, and referencing interfaces throughout your data layer rather than specifying concrete classes, you can implement an EmptyInterceptor to map between the two. See my answer [here](https://stackoverflow.com/questions/2286691/how-to-map-an-inter...
12,844,963
After some reading, I found myself struggling with two different approaches to pass a list of arguments to a function. I read some indications. That's what I figured out so far: Actual code: file caller.py: ``` import worker worker.version_check(iserver,login,password,proxyUser,proxyPass, proxyServer,packageInfo) ...
2012/10/11
[ "https://Stackoverflow.com/questions/12844963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323826/" ]
I really don't recommend defining functions like `def version_check(*args):` unless you specifically *need* to. Quick, without reading the source: what order are the arguments in? How do you specify a default value for proxyServer? Remember, "explicit is better than implicit". The one time I routinely deviate from tha...
You can create instance an object or define a class. e.g. file caller.py: ``` import worker info=object() info.env=0 info.family='something' info.host='something' info.password='***' info.prefix='' info.proxyServer='' info.proxyUser='' info.proxyPass='' info.option='' info.jokerVar='' worker.version_check(info) wor...
12,844,963
After some reading, I found myself struggling with two different approaches to pass a list of arguments to a function. I read some indications. That's what I figured out so far: Actual code: file caller.py: ``` import worker worker.version_check(iserver,login,password,proxyUser,proxyPass, proxyServer,packageInfo) ...
2012/10/11
[ "https://Stackoverflow.com/questions/12844963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323826/" ]
There are many approaches, depending on what those arguments represent. 1. If they are just a grab-bag of arguments (especially if some are optional), use **keyword arguments**: ``` myargs = {'iserver':'server','login':'username','password':'Pa2230rd'} version_get(**myargs) ``` 2. If they represent some thing with ...
You can create instance an object or define a class. e.g. file caller.py: ``` import worker info=object() info.env=0 info.family='something' info.host='something' info.password='***' info.prefix='' info.proxyServer='' info.proxyUser='' info.proxyPass='' info.option='' info.jokerVar='' worker.version_check(info) wor...
12,844,963
After some reading, I found myself struggling with two different approaches to pass a list of arguments to a function. I read some indications. That's what I figured out so far: Actual code: file caller.py: ``` import worker worker.version_check(iserver,login,password,proxyUser,proxyPass, proxyServer,packageInfo) ...
2012/10/11
[ "https://Stackoverflow.com/questions/12844963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1323826/" ]
I really don't recommend defining functions like `def version_check(*args):` unless you specifically *need* to. Quick, without reading the source: what order are the arguments in? How do you specify a default value for proxyServer? Remember, "explicit is better than implicit". The one time I routinely deviate from tha...
There are many approaches, depending on what those arguments represent. 1. If they are just a grab-bag of arguments (especially if some are optional), use **keyword arguments**: ``` myargs = {'iserver':'server','login':'username','password':'Pa2230rd'} version_get(**myargs) ``` 2. If they represent some thing with ...
57,325,615
I'm attempting to use the Boolean logic to perform bitwise and operations between 2 numbers through iterations to find the number of 1s in the binary. ``` import string def main(): binary_1 = input("Enter a number in terms of binary: ") binary_1 = str(binary_1) denary_1 = int(binary_1, 2) denary_2 = ...
2019/08/02
[ "https://Stackoverflow.com/questions/57325615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Hooks cannot be initiated conditionally or on user actions. However what you are trying to do is call the state updater method on a user action which is correct and that is precisely why the updater method is available. Also there is no difference between your first and second approach apart from the fact that you are...
Yes, it's fine to call your `setCount` method inline like your example. All you're doing here is passing a function that will be called when the button is clicked - it's up to you whether you want to declare the function inline [your 2nd example], or refer to a variable that returns the constant [your 1st example]. ...
57,732,772
I have an existing EF Core 2.2 `DbContext` that works fine in an ASPNET Core application as well as LinqPad. Now I am trying to add it to an Azure function. In both ASPNET and the Azure function I am using dependency injection. The `DbContext` class has three constructors - an empty one, one that takes a connection st...
2019/08/30
[ "https://Stackoverflow.com/questions/57732772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3023077/" ]
You may refer to: [Service registration methods](https://github.com/aspnet/AspNetCore.Docs/blob/master/aspnetcore/fundamentals/dependency-injection.md#service-registration-methods) If there are multiple constructors, you can specify one as following: ``` Add{LIFETIME}<{SERVICE}>(sp => new {IMPLEMENTATION}) ``` For ...
Where are storing the connections string value? I would check the source. Out of the box asp.net core has the a application.settings.json file configured for injection. AZ Function does not do this. If you are using an application.settings.json then you have to configure it to load settings from that file. Here a samp...
9,890,074
In my activity oncreate method, i have called a service using OnStartCommand(). My requirement is when the user is on the same Activity (when the Activity is visible), a set of code should run repeatedly. (Example .. I should make a web service call and get the response and do some action based on it after regular inte...
2012/03/27
[ "https://Stackoverflow.com/questions/9890074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/623517/" ]
CountDownTimer.cancel() method seems to be not working. I would recommend you to use Timer instead. It's much more flexible and can be cancelled at any time. It may be something like that: ``` public class MainActivity extends Activity { TextView mTextField; long elapsed; final static long INTERVAL=10...
You can use Timer for the fixed-period execution of a method. See here is a tutorial on this: <http://steve.odyfamily.com/?p=12>
23,645,078
I want open all the links on a web page with a single click on Chrome Extensions. I try for that وbut I did not get any results. please help me ... my manifist.json file : ``` { "name": "Open Links in New Tabs", "version": "1.0", "description": "open all link in page on new tabs with one click", "background_p...
2014/05/14
[ "https://Stackoverflow.com/questions/23645078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3614975/" ]
When you access the `document` object in `background.js`, you're looking at background page, not the currently active tab. To access the DOM contents of the open page, you will need a content script. It can then send a message to the background script (which has access to `chrome.tabs`) with the list of links to open....
There are quite a few. 1. A background script doesn't have access to the page DOM of a tab. The only DOM it can access directly is the DOM of the background.html. You should use a content script and message passing. 2. `background_page` is an option of Manifest Version 1, you are using Manifest Version 2, for which th...
12,598,491
I am relatively new to working with PHP in an OOP way. In my newest project i am going to create a site which will load a lot of entries from SQL-database and then send these to the view for output. While fiddling with how to do this in the best way, I have created the code as listed below: ``` class entryHandler { ...
2012/09/26
[ "https://Stackoverflow.com/questions/12598491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/585548/" ]
It seems like what you're doing is throwing around the data. This might not necessarily be wrong, but you could do something else. Instead of storing all SQL entries in an array, how about: * Fetch data from the database. * Create an object that holds this data. ( Object relation mapping ) So instead of throwing arou...
I pretty much agree with answer from Kao. Anyway if you really want to do this yourself instead of using any DBAL, I would recommend you to read some [docs on ORMs](http://docs.doctrine-project.org/en/latest/reference/architecture.html). In your code, allowing construct to handle many things at a time is a bad idea. C...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Your code (A a = new A();) creates and initializes the struct. If it is a local variable, it is initialized on the stack. If it is a member variable, it is initialized on the heap as part of the object. Using "new" doesn't necessarily mean a heap allocation in C#/.NET. It depends on the context.
> > But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. > > > If `A` is a value type as you say, and `a` is a method local, it will be allocated on the stack. *Unless* `a` is used in a closure -- then it will be allocated as part of a heap-allo...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Value types are stored on the stack *sometimes*. It's a complex topic and usually the exact storage of a variable (stack or heap) is irrelevant for programming issues. The real difference between value and reference types lies in their *behaviour* (for example, value types are always copied *by value*). Eric Lippert c...
Your code (A a = new A();) creates and initializes the struct. If it is a local variable, it is initialized on the stack. If it is a member variable, it is initialized on the heap as part of the object. Using "new" doesn't necessarily mean a heap allocation in C#/.NET. It depends on the context.
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Where a local variable is stored is an implementation detail. Simple local variables are usually stored in the CPU-registers and/or the stack. If they are captured in a closure they'll be rewritten into members in a heap allocated object. That's because the lamda might outlive it's creating functions, and thus the ...
Your code (A a = new A();) creates and initializes the struct. If it is a local variable, it is initialized on the stack. If it is a member variable, it is initialized on the heap as part of the object. Using "new" doesn't necessarily mean a heap allocation in C#/.NET. It depends on the context.
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Value types are stored on the stack *sometimes*. It's a complex topic and usually the exact storage of a variable (stack or heap) is irrelevant for programming issues. The real difference between value and reference types lies in their *behaviour* (for example, value types are always copied *by value*). Eric Lippert c...
> > But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. > > > If `A` is a value type as you say, and `a` is a method local, it will be allocated on the stack. *Unless* `a` is used in a closure -- then it will be allocated as part of a heap-allo...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
The original assumption that value types live "on the stack" is not correct. However, **[The Truth About Value Types](http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx)** has been revealed by Eric Lippert: > > 1. It is usually stated *incorrectly*: the statement should be "value ...
> > But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. > > > If `A` is a value type as you say, and `a` is a method local, it will be allocated on the stack. *Unless* `a` is used in a closure -- then it will be allocated as part of a heap-allo...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Where a local variable is stored is an implementation detail. Simple local variables are usually stored in the CPU-registers and/or the stack. If they are captured in a closure they'll be rewritten into members in a heap allocated object. That's because the lamda might outlive it's creating functions, and thus the ...
> > But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. > > > If `A` is a value type as you say, and `a` is a method local, it will be allocated on the stack. *Unless* `a` is used in a closure -- then it will be allocated as part of a heap-allo...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Value types are stored on the stack *sometimes*. It's a complex topic and usually the exact storage of a variable (stack or heap) is irrelevant for programming issues. The real difference between value and reference types lies in their *behaviour* (for example, value types are always copied *by value*). Eric Lippert c...
The original assumption that value types live "on the stack" is not correct. However, **[The Truth About Value Types](http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx)** has been revealed by Eric Lippert: > > 1. It is usually stated *incorrectly*: the statement should be "value ...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Value types are stored on the stack *sometimes*. It's a complex topic and usually the exact storage of a variable (stack or heap) is irrelevant for programming issues. The real difference between value and reference types lies in their *behaviour* (for example, value types are always copied *by value*). Eric Lippert c...
Where a local variable is stored is an implementation detail. Simple local variables are usually stored in the CPU-registers and/or the stack. If they are captured in a closure they'll be rewritten into members in a heap allocated object. That's because the lamda might outlive it's creating functions, and thus the ...
4,430,190
I know that struct is a value type , that means it defined on stack . But I can do A a = new A(); (A my struct of course). and it defined on heap , and only the reference variable is on stack. Can you explain me this one please .
2010/12/13
[ "https://Stackoverflow.com/questions/4430190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140100/" ]
Where a local variable is stored is an implementation detail. Simple local variables are usually stored in the CPU-registers and/or the stack. If they are captured in a closure they'll be rewritten into members in a heap allocated object. That's because the lamda might outlive it's creating functions, and thus the ...
The original assumption that value types live "on the stack" is not correct. However, **[The Truth About Value Types](http://blogs.msdn.com/b/ericlippert/archive/2010/09/30/the-truth-about-value-types.aspx)** has been revealed by Eric Lippert: > > 1. It is usually stated *incorrectly*: the statement should be "value ...
247,323
**Question** How do I customise the columns that appear in the `Add Products` popup which appears if you click the `Add Products` button on the Products related list on the `Opportunities` record page? **What I've tried** Instructions I found online tell me to do this: > > You can select fields in `Mini Page Layou...
2019/01/20
[ "https://salesforce.stackexchange.com/questions/247323", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/45678/" ]
Follow given steps : 1. Go to the `Price Book Entry` object 2. Select `Search Layouts` 3. Edit `Search Results` 4. Change the fields 5. Press `Save`
I just went through the same issue and you need to add it to the "Multi-line" view. For instance we wanted to include a lookup to a partner account when adding the product and we then added "Partner" lookup field to the "Multi-Line" view (it's next to the mini console layout.) Hope this helps.
35,239,044
I'm researching for a week to find a simple and platform independent method to stream a mp4 file to any browser. In case of browser incompatibility progressive stream(direct download) method will be used. My scenario is like this: * single mp4 file (not segmented and multiplexed(Audio+Video) ) * HTTP Byte-Range servin...
2016/02/06
[ "https://Stackoverflow.com/questions/35239044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365229/" ]
I think all major browser support mp4. <http://caniuse.com/#feat=mpeg4>. You can stream it using just a good old http server. `MPEG-DASH` is required only if you require fancy stuff like adaptive bitrate streaming, multi language, drm and so. If you insist on using `MPEG-DASH` you can simply segment your mp4 files usi...
Yes there is a solution. dash.js only plays fragmented mp4s that have been packaged. However, this project from Cyril at Telecom Paristech will do what you want: <https://github.com/gpac/mp4box.js/> This is a js version of mp4box. What it can do is on-the-fly conversion of your non-fragmented mp4 in to media fragment...
35,239,044
I'm researching for a week to find a simple and platform independent method to stream a mp4 file to any browser. In case of browser incompatibility progressive stream(direct download) method will be used. My scenario is like this: * single mp4 file (not segmented and multiplexed(Audio+Video) ) * HTTP Byte-Range servin...
2016/02/06
[ "https://Stackoverflow.com/questions/35239044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365229/" ]
Yes there is a solution. dash.js only plays fragmented mp4s that have been packaged. However, this project from Cyril at Telecom Paristech will do what you want: <https://github.com/gpac/mp4box.js/> This is a js version of mp4box. What it can do is on-the-fly conversion of your non-fragmented mp4 in to media fragment...
You could serve dash player with single mp4 file. However you need to put index information in sidx box in this mp4 file. you could bento4 to do it. Actually for ondemand case, it's normally to use one single file to stream. You could also download this file locally. Dash streaming will not require more storage size if...
35,239,044
I'm researching for a week to find a simple and platform independent method to stream a mp4 file to any browser. In case of browser incompatibility progressive stream(direct download) method will be used. My scenario is like this: * single mp4 file (not segmented and multiplexed(Audio+Video) ) * HTTP Byte-Range servin...
2016/02/06
[ "https://Stackoverflow.com/questions/35239044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365229/" ]
Yes there is a solution. dash.js only plays fragmented mp4s that have been packaged. However, this project from Cyril at Telecom Paristech will do what you want: <https://github.com/gpac/mp4box.js/> This is a js version of mp4box. What it can do is on-the-fly conversion of your non-fragmented mp4 in to media fragment...
Maybe this would help you: ``` #!/bin/bash # THIS SCRIPT CONVERTS EVERY MP4 (IN THE CURRENT FOLDER AND SUBFOLDER) TO A MULTI-BITRATE VIDEO IN MP4-DASH # For each file "videoname.mp4" it creates a folder "dash_videoname" containing a dash manifest file "stream.mpd" and subfolders containing video segments. # Explanati...
35,239,044
I'm researching for a week to find a simple and platform independent method to stream a mp4 file to any browser. In case of browser incompatibility progressive stream(direct download) method will be used. My scenario is like this: * single mp4 file (not segmented and multiplexed(Audio+Video) ) * HTTP Byte-Range servin...
2016/02/06
[ "https://Stackoverflow.com/questions/35239044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365229/" ]
I think all major browser support mp4. <http://caniuse.com/#feat=mpeg4>. You can stream it using just a good old http server. `MPEG-DASH` is required only if you require fancy stuff like adaptive bitrate streaming, multi language, drm and so. If you insist on using `MPEG-DASH` you can simply segment your mp4 files usi...
You could serve dash player with single mp4 file. However you need to put index information in sidx box in this mp4 file. you could bento4 to do it. Actually for ondemand case, it's normally to use one single file to stream. You could also download this file locally. Dash streaming will not require more storage size if...
35,239,044
I'm researching for a week to find a simple and platform independent method to stream a mp4 file to any browser. In case of browser incompatibility progressive stream(direct download) method will be used. My scenario is like this: * single mp4 file (not segmented and multiplexed(Audio+Video) ) * HTTP Byte-Range servin...
2016/02/06
[ "https://Stackoverflow.com/questions/35239044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/365229/" ]
I think all major browser support mp4. <http://caniuse.com/#feat=mpeg4>. You can stream it using just a good old http server. `MPEG-DASH` is required only if you require fancy stuff like adaptive bitrate streaming, multi language, drm and so. If you insist on using `MPEG-DASH` you can simply segment your mp4 files usi...
Maybe this would help you: ``` #!/bin/bash # THIS SCRIPT CONVERTS EVERY MP4 (IN THE CURRENT FOLDER AND SUBFOLDER) TO A MULTI-BITRATE VIDEO IN MP4-DASH # For each file "videoname.mp4" it creates a folder "dash_videoname" containing a dash manifest file "stream.mpd" and subfolders containing video segments. # Explanati...
40,709,317
The code below is meant to show my visitors something like "Good Morning, Today is ------ and the time is -----" But I keep getting "Welcome" instead of the main greetings. Why is this? ``` <?php $hour = date ("G"); $minute = date ("i"); $second = date ("s"); $msg = " Today is " . date ("l, M. d, Y.") . " And the tim...
2016/11/20
[ "https://Stackoverflow.com/questions/40709317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7186617/" ]
Your problem is here ``` if ($hour = 00 && $hour <= 9 && $minute <= 59 && $second <= 59) ``` this way you assign 00 to $hour and all the other condition fails you need ``` if ($hour == 0 && $hour <= 9 && $minute <= 59 && $second <= 59) ``` solved the if problem there are others You should keep in mind th...
try this.... ``` <?php $hour = date ("G"); $minute = date ("i"); $second = date ("s"); $msg = " Today is " . date ("l, M. d, Y.") . " And the time is " . date ("g:i a"); if ($hour == 00 && $hour <= 9 && $minute <= 59 && $second <= 59){ $greet = "Good Morning,"; }else if ($hour >= 1...
40,903,317
I'm creating a Google Chrome extension that relies on knowing the current time of a video being played on 'youtube.com'. I know, in principle, that `document.getElementById('movie_player').getCurrentTime()` should return this, but invoking this in a content script injected into the page produces: > > Uncaught TypeErr...
2016/12/01
[ "https://Stackoverflow.com/questions/40903317", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3314063/" ]
Thanks to Charlie Dalsass (see comments below my question), I think I have an answer! test.js ``` video = document.getElementsByClassName('video-stream')[0]; console.log(video); console.log(video.currentTime); ```
This code works in 2020: ``` // 1. ytplayer code: https://developers.google.com/youtube/player_parameters#IFrame_Player_API var tag = document.createElement('script'); tag.src = "https://www.youtube.com/player_api"; var firstScriptTag = document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insert...
11,482,037
im a beginner trying to understand the reason why the GUI freezes after very few seconds here. Try run it and see what i mean.. Shouldn't it keep printing Hello1 Hello2 Hello3 Hello4 and Hello5 forever? To be clear: it is SetWindowText() that stops doing the job, so it is the GUI that freezes. What i mean is, the appli...
2012/07/14
[ "https://Stackoverflow.com/questions/11482037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1525236/" ]
`SELECT FROM your_table WHERE Text2 LIKE '%yourstring%';`
Try this:: If you need the wild search irrespective to the cases :: ``` SELECT FROM LOWER(mytable) WHERE LOWER(Text2) LIKE LOWER('%yourstring%'); ```
11,482,037
im a beginner trying to understand the reason why the GUI freezes after very few seconds here. Try run it and see what i mean.. Shouldn't it keep printing Hello1 Hello2 Hello3 Hello4 and Hello5 forever? To be clear: it is SetWindowText() that stops doing the job, so it is the GUI that freezes. What i mean is, the appli...
2012/07/14
[ "https://Stackoverflow.com/questions/11482037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1525236/" ]
`SELECT FROM your_table WHERE Text2 LIKE '%yourstring%';`
You can use `REGEXP` for this purpose too. ``` SELECT * FROM `tableName` WHERE `columnName` REGEXP 'ab cd'; ```
34,503,663
I wrote a simple `tcp/ip` connection between a client and a server in localhost in `c++`. It sends over tcp/ip an array of `unsigned char`. The size of this array is the following: ``` unsigned char *bytes = (unsigned char*)malloc(sizeof(unsigned char)*96000000); //array is filled ``` However when I write on the so...
2015/12/29
[ "https://Stackoverflow.com/questions/34503663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5615154/" ]
> > is there a limit in the number of bytes that I can write in a TCP /IP connection? How can I solve this problem? > > > Yes - your TCP stack (likely part of your Operating System) won't simply let your application enqueue an arbitrary amount of data, potentially taking up absurd amounts of buffer memory outside ...
> > Why? > > > There could be several reasons. There might be some sort of physical limitation (hardware). The client buffer could be full. Some sort of implementation limit could have been reached. Some sort of signal could have been received. > > is there a limit in the number of bytes that I can write in a T...
3,130,971
> > Let $n$ and $k$ be positive integers with $n \ge k$. > Give a combinatorial proof that $$n\_k = (n-1)\_k + k(n-1)\_{k-1},$$ where $n\_k$ is a falling factorial: $n\_k$ = $n(n-1)(n-2)\ldots(n-k+1)$. > > > I know $n\_k = n \cdot (n-1)\_{k-1}$. For example $10\_4 = 10 \cdot 9\_3$, which equates to: $10 \cdot 9 \...
2019/03/01
[ "https://math.stackexchange.com/questions/3130971", "https://math.stackexchange.com", "https://math.stackexchange.com/users/649512/" ]
$n\_k$ represents the number of arrangements of $n$ elements in groups of $k$ (the order is relevant here). Split those arrangements into two classes: those where one particular element is part of the group and those where this element is not part of the group. The number of the latter is $(n-1)\_k$ because you choose ...
I don't know the notation which you have used(I am still new in combinatorics). So I will use simple factorial notation. $$\frac{n!}{(n-k)!}$$ $$=\frac{{((n-k)+k)}\cdot{(n-1)!}}{(n-k)!}$$ $$=\frac{(n-1)!}{(n-k-1)!}+\frac{k(n-1)!}{(n-k)!}$$ $$=(n-1)\_k +k(n-1)\_{k-1}$$