qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
12,780
I am designing a simple programmable LED screen system as an exercise, and I need a non-standard type of SRAM (16x5) so I am designing the memory circuits. I have looked everywhere (Digikey, TI, National Semiconductor, etc.) for a chip that is just a sense amplifier for SRAM and I haven't found anything. I called TI an...
2011/04/09
[ "https://electronics.stackexchange.com/questions/12780", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/3782/" ]
To answer your question, yes you can use a LM339 as a sense amp, and all you need to do is wire the + input to the non-inverting bit-line, and the - input to the inverting bit-line. BUT... Since we're talking about reading a SRAM, the basic sequence of events during a READ is: 1. Pre-charge both bit-lines to VDD. 2....
(a) Are you using an off-the-shelf SRAM IC chip? If so, it already includes the [sense amplifier](http://en.wikipedia.org/wiki/Register_file) -- the bitlines cannot be accessed from the outside, even if you wanted to. (b) Are you not using an SRAM IC chip? I.e., are you storing a few bits in a D latch or a shift regis...
14,195
Can I leave tap water to stand outside in order for the fluorine and other baddies in tap water to evaporate? Could I boil it for the same result?
2014/09/28
[ "https://gardening.stackexchange.com/questions/14195", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/7236/" ]
I'm going to go against the grain here, and say NO. I don't know what the lowest TDS of the water in your area is (average is 350ppm -- <http://www.tdsmeter.com/education?id=0018>), but 350ppm is entirely too high for VFTs. A VFT requires 50ppm or lower of TDS (<http://venusflytrap.info/gloss-tds.html>). If your water...
I'm assuming by "baddies" you mean intentionally added chemicals such as chlorine. Boiling it - or just leaving it out for a day or so - will remove/reduce the chlorine content of water but I don't think it does anything for the fluoride content. There are some filtration methods that can be used to remove fluoride but...
14,195
Can I leave tap water to stand outside in order for the fluorine and other baddies in tap water to evaporate? Could I boil it for the same result?
2014/09/28
[ "https://gardening.stackexchange.com/questions/14195", "https://gardening.stackexchange.com", "https://gardening.stackexchange.com/users/7236/" ]
I'm going to go against the grain here, and say NO. I don't know what the lowest TDS of the water in your area is (average is 350ppm -- <http://www.tdsmeter.com/education?id=0018>), but 350ppm is entirely too high for VFTs. A VFT requires 50ppm or lower of TDS (<http://venusflytrap.info/gloss-tds.html>). If your water...
No and no, unfortunately. Chlorine will boil out in a few hours but fluoride needs a carbon filter. There are other dissolved salts in most tap water that are fine for consumption but not good for a venus fly trap. If your filtration plant uses chloramine you could boil the water all day and there would still be a dete...
49,199,604
I'm coding a script for a spreadsheet. This script creates a menu. Then by choosing an option in this menu a function (which uses API) will run in order to filter some columns and hide others. The problem is: This sheet is protected (because shared with coworkers) but I want to allow people to run the script, which...
2018/03/09
[ "https://Stackoverflow.com/questions/49199604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9362373/" ]
This is a pain that I have not seen a good workaround. Google should know that in a collaborative environment that the owner would create script and want users to be able to run those scripts while at the same time not messing with formulas or cells that you desire to protect. The only way I have found to solve this on...
Are you the spreadsheet owner? If no, you are not authorized to bound an apps script on it. But you can make a copy of the spreadsheet by duplicate it and save in your drive. If the spreadsheet is created by you yourself, maybe you created it by another username. If it does, log in by that user and change the sharing...
36,336,117
I'm trying to keep the current div visible if I click inside it. I want to hide the div only if I click anywhere on the page but the current div. I already tried `e.stopPropagation();` but that breaks other click handlers I have inside the function. **[jsFiddle](https://jsfiddle.net/2pr3xtxf/23/)** ``` var filterCon...
2016/03/31
[ "https://Stackoverflow.com/questions/36336117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3734870/" ]
If you don't want to change the event propagation, you can check whether the click was within the element by traversing upwards from the event.target, i.e. `$(e.target).closest()`. (Checking just the event target itself would not work with sub-elements.) The sample shown here binds to a specific element rather than a d...
there is two way: The simplest: when clicking the div, call e.stopPropagation(), and copy all click handler you want (not the proper way, because you duplicate code...) Or on your onclick function, get the cursor position, and close the div only if it is not inside the div: ``` pageDocument.click(function(e) { //...
36,336,117
I'm trying to keep the current div visible if I click inside it. I want to hide the div only if I click anywhere on the page but the current div. I already tried `e.stopPropagation();` but that breaks other click handlers I have inside the function. **[jsFiddle](https://jsfiddle.net/2pr3xtxf/23/)** ``` var filterCon...
2016/03/31
[ "https://Stackoverflow.com/questions/36336117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3734870/" ]
I end up using with this solution: ``` $(document).mouseup(function (e) { if (!filterContainer.is(e.target) && filterContainer.has(e.target).length === 0) { filterContainer.hide(); } }); ``` [jsFiddle](https://jsfiddle.net/2pr3xtxf/32/)
there is two way: The simplest: when clicking the div, call e.stopPropagation(), and copy all click handler you want (not the proper way, because you duplicate code...) Or on your onclick function, get the cursor position, and close the div only if it is not inside the div: ``` pageDocument.click(function(e) { //...
36,336,117
I'm trying to keep the current div visible if I click inside it. I want to hide the div only if I click anywhere on the page but the current div. I already tried `e.stopPropagation();` but that breaks other click handlers I have inside the function. **[jsFiddle](https://jsfiddle.net/2pr3xtxf/23/)** ``` var filterCon...
2016/03/31
[ "https://Stackoverflow.com/questions/36336117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3734870/" ]
If you don't want to change the event propagation, you can check whether the click was within the element by traversing upwards from the event.target, i.e. `$(e.target).closest()`. (Checking just the event target itself would not work with sub-elements.) The sample shown here binds to a specific element rather than a d...
You can try this approach ``` $(document).on('click', '.js-show-filter', function(e) { $('.currentFilter').removeClass('currentFilter'); var currentFilter = $(this).next('.js-filter-container'); $('.js-filter-container:visible').hide(); currentFilter.addClass('currentFilter'); currentFilter.slideDo...
36,336,117
I'm trying to keep the current div visible if I click inside it. I want to hide the div only if I click anywhere on the page but the current div. I already tried `e.stopPropagation();` but that breaks other click handlers I have inside the function. **[jsFiddle](https://jsfiddle.net/2pr3xtxf/23/)** ``` var filterCon...
2016/03/31
[ "https://Stackoverflow.com/questions/36336117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3734870/" ]
I end up using with this solution: ``` $(document).mouseup(function (e) { if (!filterContainer.is(e.target) && filterContainer.has(e.target).length === 0) { filterContainer.hide(); } }); ``` [jsFiddle](https://jsfiddle.net/2pr3xtxf/32/)
You can try this approach ``` $(document).on('click', '.js-show-filter', function(e) { $('.currentFilter').removeClass('currentFilter'); var currentFilter = $(this).next('.js-filter-container'); $('.js-filter-container:visible').hide(); currentFilter.addClass('currentFilter'); currentFilter.slideDo...
36,336,117
I'm trying to keep the current div visible if I click inside it. I want to hide the div only if I click anywhere on the page but the current div. I already tried `e.stopPropagation();` but that breaks other click handlers I have inside the function. **[jsFiddle](https://jsfiddle.net/2pr3xtxf/23/)** ``` var filterCon...
2016/03/31
[ "https://Stackoverflow.com/questions/36336117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3734870/" ]
If you don't want to change the event propagation, you can check whether the click was within the element by traversing upwards from the event.target, i.e. `$(e.target).closest()`. (Checking just the event target itself would not work with sub-elements.) The sample shown here binds to a specific element rather than a d...
I end up using with this solution: ``` $(document).mouseup(function (e) { if (!filterContainer.is(e.target) && filterContainer.has(e.target).length === 0) { filterContainer.hide(); } }); ``` [jsFiddle](https://jsfiddle.net/2pr3xtxf/32/)
69,991,770
I tried to test sizeof in my programm but it doesn't work. ``` char toFind[100]; fgets(toFind, sizeof(toFind), stdin); printf(" %i", sizeof(toFind)); ``` And what ever I put in it prints out 100. What did I wrong.
2021/11/16
[ "https://Stackoverflow.com/questions/69991770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16485883/" ]
`toFind` is an array of 100 chars. Each char is 1 byte. So `toFind` is 100 bytes. Therefore `sizeof(toFind)`, which tells you how many bytes are in `toFind`, is 100. There is no problem. `sizeof` is working correctly. You might be interested in `strlen(toFind)` which tells you how many bytes are before the first 0 by...
`sizeof` returns the size of a variable. It has nothing to do with what it contains. In fact, it's calculated at compile-time. `fgets` populates the variable with a NUL-terminated string. As such, you can use `strlen` to find its length. Note that since this is the only way to know how much `fgets` read in, it makes i...
69,991,770
I tried to test sizeof in my programm but it doesn't work. ``` char toFind[100]; fgets(toFind, sizeof(toFind), stdin); printf(" %i", sizeof(toFind)); ``` And what ever I put in it prints out 100. What did I wrong.
2021/11/16
[ "https://Stackoverflow.com/questions/69991770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16485883/" ]
`toFind` is an array of 100 chars. Each char is 1 byte. So `toFind` is 100 bytes. Therefore `sizeof(toFind)`, which tells you how many bytes are in `toFind`, is 100. There is no problem. `sizeof` is working correctly. You might be interested in `strlen(toFind)` which tells you how many bytes are before the first 0 by...
For starters you have to use the conversion specifier `%zu` to output a value of the type `size_t` (the operator `sizeof` returns values of the type `size_t`) instead of the conversion specifier `%i` ``` printf(" %zu", sizeof(toFind)); ``` The operator `sizeof` returns the size of the array `toFind` that is declared...
16,901,339
I made an implementation of toUpper(). It doesn't work 100%. **Code :** ``` char* toUpper(char* string) { char* sv = string; while(*sv++ != '\0') { if( int(*sv) >= 97 || int(*sv) <= 122) //Only if it's a lower letter *sv = char( *sv - 32); } return string; } ``` I know that ...
2013/06/03
[ "https://Stackoverflow.com/questions/16901339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2420513/" ]
``` if( int(*sv) >= 97 || int(*sv) <= 122) ``` should be ``` if( int(*sv) >= 97 && int(*sv) <= 122) ``` or, preferably ``` if( *sv >= 'a' && *sv <= 'z') *sv = *sv - ('a' - 'A'); ``` You also need to move the point at which you increment `sv`. The current code skips checking the first character in `string` ...
Having ++ in the while makes you miss important cases. The int() things are unnecessary noise. You need && in the check condition. The action can be written with -=.
16,901,339
I made an implementation of toUpper(). It doesn't work 100%. **Code :** ``` char* toUpper(char* string) { char* sv = string; while(*sv++ != '\0') { if( int(*sv) >= 97 || int(*sv) <= 122) //Only if it's a lower letter *sv = char( *sv - 32); } return string; } ``` I know that ...
2013/06/03
[ "https://Stackoverflow.com/questions/16901339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2420513/" ]
``` if( int(*sv) >= 97 || int(*sv) <= 122) ``` should be ``` if( int(*sv) >= 97 && int(*sv) <= 122) ``` or, preferably ``` if( *sv >= 'a' && *sv <= 'z') *sv = *sv - ('a' - 'A'); ``` You also need to move the point at which you increment `sv`. The current code skips checking the first character in `string` ...
Here's a rewrite that uses a for loop and fixes your conditional as well as off-by-one increment: ``` char* toUpper(char* string) { for(char* p=string; *p != '\0'; p++) { if(*p >= 'a' && *p <= 'z') //Only if it's a lower letter *p -= 32; } return string; } ```
16,901,339
I made an implementation of toUpper(). It doesn't work 100%. **Code :** ``` char* toUpper(char* string) { char* sv = string; while(*sv++ != '\0') { if( int(*sv) >= 97 || int(*sv) <= 122) //Only if it's a lower letter *sv = char( *sv - 32); } return string; } ``` I know that ...
2013/06/03
[ "https://Stackoverflow.com/questions/16901339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2420513/" ]
Having ++ in the while makes you miss important cases. The int() things are unnecessary noise. You need && in the check condition. The action can be written with -=.
Here's a rewrite that uses a for loop and fixes your conditional as well as off-by-one increment: ``` char* toUpper(char* string) { for(char* p=string; *p != '\0'; p++) { if(*p >= 'a' && *p <= 'z') //Only if it's a lower letter *p -= 32; } return string; } ```
581,418
I'm currently planning an install for a computer lab and I had an idea that I'm not too sure will work... The computer lab is roughly 15' x 15', with a full-size server rack in the corner. My goal is to place all of the computer towers in the rack. Is there any technology that makes it possible to do this, having the ...
2014/03/11
[ "https://serverfault.com/questions/581418", "https://serverfault.com", "https://serverfault.com/users/212457/" ]
This would seem to be a solid use case for VDI. Both VMWare View and Citrix XenDesktop are pretty well known and stable products for this sort of thing. At the users' desks, they'd need a "Zero Client" or a "Thin Client" to actually do the remote desktop, but those can be bolted to the back of the monitor, and set up a...
If I understand what you're getting at, you want to put all the actual *computers* in a locked cabinet, and leave only a keyboard, mouse, and monitor at each "station" in the lab. That's just not going to happen with any reasonable technology (you could possibly do it with REALLY LONG CABLES, but that's decidedly unre...
141,158
I looked up size for #2 and it says just over a quarter inch. I'm concerned a 60amp breaker won't fit a #2. I have an older Bryant panel. Maybe breaker manufacturer makes a difference or I must order a special one? I have along run 100+ft which has forced me to use aluminium and a #2.
2018/06/26
[ "https://diy.stackexchange.com/questions/141158", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/85643/" ]
On the side or front of the breaker, there is a label that says what the maximum wire size is that you can use. This label is required by UL when the breaker is made. It may have fallen off however. If so, you can look on-line for a similar breaker. Bryant is now part of Cutler Hammer, their version of that breaker is ...
If in doubt, transition in the panel ------------------------------------ A proper electrical supply house will cheerfully sell you an inline insulated lug splice made of plated aluminum. Aluminum-bodied lugs play well with both aluminum (obviously) and copper, hence their broad use. You then continue with #6 copper f...
34,574,060
I am using Entity Framework version 6.0. I want to connect to a local SQL Server database. I am using the following connection string. But I cannot connect to the database. Please give me the solution. ``` <add name="dbecommerceEntities" connectionString="metadata=res://*/Models.dbEcommerceMode.csdl|res:...
2016/01/03
[ "https://Stackoverflow.com/questions/34574060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1413974/" ]
Check the usual suspects: * `data source=localhost` : this means, there **must be** a default, unnamed SQL Server instance on your local computer - is there? Or did you install SQL Server **Express** in default mode? Then you'd have to use `data source=(local)\SQLExpress` instead * `User ID=qaws;Password=1q2w!A@S` : d...
Here is what I do to test connection to database: 1. Create a .txt file somewhere in your computer. 2. Rename the file to .udl 3. Accept the change extension question and double click the file to open. 4. In your case, in the first tab, select SQL server and in the second tab, fill in the required fields. 5. Test the ...
34,574,060
I am using Entity Framework version 6.0. I want to connect to a local SQL Server database. I am using the following connection string. But I cannot connect to the database. Please give me the solution. ``` <add name="dbecommerceEntities" connectionString="metadata=res://*/Models.dbEcommerceMode.csdl|res:...
2016/01/03
[ "https://Stackoverflow.com/questions/34574060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1413974/" ]
my connection string was correct. one of the file was not uploaded to the server. now it is working correctly.
Here is what I do to test connection to database: 1. Create a .txt file somewhere in your computer. 2. Rename the file to .udl 3. Accept the change extension question and double click the file to open. 4. In your case, in the first tab, select SQL server and in the second tab, fill in the required fields. 5. Test the ...
10,261
I've used several recipes for making pizza dough, most recently one from [Delfina Pizza](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=10000001955929). My issue is that regardless of the recipe I use it is very difficult to work the dough into the pizza crust. It is usually very stic...
2010/12/18
[ "https://cooking.stackexchange.com/questions/10261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3724/" ]
That's just a bad pizza base recipe. My family recipe is totally different. Not sure if I can post recipes here, but anyway here's a link to something similar <http://www.recipepizza.com/doughs/pizza_dough.htm> You can use sugar or honey, it's just food for the yeast. You can use 2 or 3 times more olive oil to make a...
The flour/water ratio in the recipe you quote seems off. The "normal" bread ratio, which includes pizza, is 5 to 3 by weight. Your recipe has less than 17 ounces of liquid so the flour should be 28 ounces or less...2 ounces may not seem like much but it can make a huge difference. And, of course, I don't know that you ...
10,261
I've used several recipes for making pizza dough, most recently one from [Delfina Pizza](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=10000001955929). My issue is that regardless of the recipe I use it is very difficult to work the dough into the pizza crust. It is usually very stic...
2010/12/18
[ "https://cooking.stackexchange.com/questions/10261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3724/" ]
That's just a bad pizza base recipe. My family recipe is totally different. Not sure if I can post recipes here, but anyway here's a link to something similar <http://www.recipepizza.com/doughs/pizza_dough.htm> You can use sugar or honey, it's just food for the yeast. You can use 2 or 3 times more olive oil to make a...
I agree that the dough recipe for that pizza looks dodgy. You might be able to make it work out with a really soft flour, like Italian 00 style. You also complain, though of general problems with any recipe. I'm going to take them in reverse order. If it tears too easily, you need to knead it longer, or let it sit lo...
10,261
I've used several recipes for making pizza dough, most recently one from [Delfina Pizza](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=10000001955929). My issue is that regardless of the recipe I use it is very difficult to work the dough into the pizza crust. It is usually very stic...
2010/12/18
[ "https://cooking.stackexchange.com/questions/10261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3724/" ]
That's just a bad pizza base recipe. My family recipe is totally different. Not sure if I can post recipes here, but anyway here's a link to something similar <http://www.recipepizza.com/doughs/pizza_dough.htm> You can use sugar or honey, it's just food for the yeast. You can use 2 or 3 times more olive oil to make a...
My attempts at pizza dough have been damp affairs used the farina 00 flour blah blah hold back on the water is what to try next! Every attempt has been eaten! Last one so sticky mashed and pulled play dough style onto tray even cooked it a little before toppings yum! So I guess if its sticky and extra flour isn't worki...
10,261
I've used several recipes for making pizza dough, most recently one from [Delfina Pizza](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=10000001955929). My issue is that regardless of the recipe I use it is very difficult to work the dough into the pizza crust. It is usually very stic...
2010/12/18
[ "https://cooking.stackexchange.com/questions/10261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3724/" ]
The flour/water ratio in the recipe you quote seems off. The "normal" bread ratio, which includes pizza, is 5 to 3 by weight. Your recipe has less than 17 ounces of liquid so the flour should be 28 ounces or less...2 ounces may not seem like much but it can make a huge difference. And, of course, I don't know that you ...
My attempts at pizza dough have been damp affairs used the farina 00 flour blah blah hold back on the water is what to try next! Every attempt has been eaten! Last one so sticky mashed and pulled play dough style onto tray even cooked it a little before toppings yum! So I guess if its sticky and extra flour isn't worki...
10,261
I've used several recipes for making pizza dough, most recently one from [Delfina Pizza](http://find.myrecipes.com/recipes/recipefinder.dyn?action=displayRecipe&recipe_id=10000001955929). My issue is that regardless of the recipe I use it is very difficult to work the dough into the pizza crust. It is usually very stic...
2010/12/18
[ "https://cooking.stackexchange.com/questions/10261", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/3724/" ]
I agree that the dough recipe for that pizza looks dodgy. You might be able to make it work out with a really soft flour, like Italian 00 style. You also complain, though of general problems with any recipe. I'm going to take them in reverse order. If it tears too easily, you need to knead it longer, or let it sit lo...
My attempts at pizza dough have been damp affairs used the farina 00 flour blah blah hold back on the water is what to try next! Every attempt has been eaten! Last one so sticky mashed and pulled play dough style onto tray even cooked it a little before toppings yum! So I guess if its sticky and extra flour isn't worki...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
It sounds like the problem isn't with the method, but with the way you are hooking up the autocomplete to the method... Is your Extender similar to the following: ``` <cc1:AutoCompleteExtender ID="Result" runat="server" TargetControlID="txtSearch" ServiceMethod="YourMethodHere" ServicePath="~/Service/YourWebServic...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
updated my ajax kit to version 1.0.10920 then changed my code to the following: ``` foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } ``` Late friday nights with .net is not fun. I have no life. :-P
I've run into the same issue. I agree the issue definitely seems to be stemming around that we're using numbers here. As soon as I append an alpha to the end of a array item it works. I believe we've found a bug. this kicks out the undefineds.... ``` ... da.Fill(dt); string[] items = new string[dt.Rows.Count]...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
updated my ajax kit to version 1.0.10920 then changed my code to the following: ``` foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } ``` Late friday nights with .net is not fun. I have no life. :-P
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
The Problem that I am seeing is that the AJAX library is looking at the numbers as integers. It needs to be looking at them as strings. I have converted it to a string and still got nothing. I have to add some kind of character to the numbers to make their value now looked upon as a string. It is a horrible thing to d...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
updated my ajax kit to version 1.0.10920 then changed my code to the following: ``` foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } ``` Late friday nights with .net is not fun. I have no life. :-P
The Problem that I am seeing is that the AJAX library is looking at the numbers as integers. It needs to be looking at them as strings. I have converted it to a string and still got nothing. I have to add some kind of character to the numbers to make their value now looked upon as a string. It is a horrible thing to d...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
updated my ajax kit to version 1.0.10920 then changed my code to the following: ``` foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } ``` Late friday nights with .net is not fun. I have no life. :-P
There is a difference between toolkit dll versions. In the updated version, one does not need to insert the "'"+ +"'", and it works fine. In version 1.0.10920, it is needed.
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
I've run into the same issue. I agree the issue definitely seems to be stemming around that we're using numbers here. As soon as I append an alpha to the end of a array item it works. I believe we've found a bug. this kicks out the undefineds.... ``` ... da.Fill(dt); string[] items = new string[dt.Rows.Count]...
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
<http://www.asp.net/ajax> In this above link u will find AjaxControllToolkit just download it and add reference in ur application i am sure it will work fine. problem is u r working with very old AjaxControllToolkit so its not working ,work with AjaxControllToolkit 3.5 or 4.0.
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
updated my ajax kit to version 1.0.10920 then changed my code to the following: ``` foreach (DataRow dr in dt.Rows) { items.SetValue("\"" + dr["somenumber"].ToString() + "\"", i); i++; } ``` Late friday nights with .net is not fun. I have no life. :-P
<http://www.asp.net/ajax> In this above link u will find AjaxControllToolkit just download it and add reference in ur application i am sure it will work fine. problem is u r working with very old AjaxControllToolkit so its not working ,work with AjaxControllToolkit 3.5 or 4.0.
188,833
Why am I getting a textbox that returns undefined list of variables? When I run this code: ``` var query = (from tisa in db.TA_Info_Step_Archives where tisa.ta_Serial.ToString().StartsWith(prefixText) select tisa.TA_Serial.ToString()).Distinct().Take(Convert.ToInt32(count)); return ...
2008/10/09
[ "https://Stackoverflow.com/questions/188833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7644/" ]
I tried the code below and it worked for me: ``` items.SetValue("'"+dr["somenumber"]+"'", i); ```
There is a difference between toolkit dll versions. In the updated version, one does not need to insert the "'"+ +"'", and it works fine. In version 1.0.10920, it is needed.
45,514,295
I have a `foreach` loop to iterate through my log file. With what I have, it will only accept the first accepted instance of the Regular Expression before moving on to the next line. I am trying to count every instance of either Warning or Error and save the count to a hash table. As of right now I can only get 1 inst...
2017/08/04
[ "https://Stackoverflow.com/questions/45514295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8419064/" ]
You simply check for the presence of `warning` or `error`. If both can occur in `$_`, or if they can occur more than once, you will need to do more. ``` for (@logs) { ++$faultCodes{ WARNING } while /warning/gi; ++$faultCodes{ ERROR } while /error/gi; } ``` or ``` for (@logs) { $faultCodes{ WARNING } += (...
I think you're missing the "g" (global) modifier - have you tried (g in bold): if($\_ =~ /(warning|error)/**g**i){
441,849
I have found a lot of references on quadratic forms of Normal Random Variables but was not able to find any reference on quadratic forms of {+1,-1} random variables. Formally, let $X\_i$ be independent random variables taking values $1,-1$ with equal probability. A quadratic form on these is defined by $$A = \sum a\_...
2013/07/12
[ "https://math.stackexchange.com/questions/441849", "https://math.stackexchange.com", "https://math.stackexchange.com/users/72989/" ]
You may take a look at Proposition 8.13 in [*A Mathematical Introduction to Compressive Sensing*](http://link.springer.com/book/10.1007%2F978-0-8176-4948-7) by Simon Foucart and Holger Rauhut. Let $\mathbf x$ be a Rademacher vector. For a self-adjoint matrix $\mathbf M$ with zero diagonal we consider the homogeneous ...
See the paper *A Bound on Tail Probabilities for Quadratic Forms in Independent Random Variables* by D. L. Hanson and F. T. Wright, The Annals of Mathematical Statistics Vol. 42, No. 3 (Jun., 1971), pp. 1079-1083.
19,902,758
I am trying to subclass `UILabel`. The first try involves that my custom `UILabel` simply sets the property `adjustsFontSizeToFitWidth` to `YES`. The problem is that I am new to iOS programming and unsure about where to put this code. I tried the code below but they are never called. ``` - (id)initWithFrame:(CGRect)fr...
2013/11/11
[ "https://Stackoverflow.com/questions/19902758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1354603/" ]
When a label is used in interface builder is then the coded use the [`NSCoder`](https://developer.apple.com/library/iOS/documentation/Cocoa/Reference/Foundation/Classes/NSCoder_Class/Reference/NSCoder.html) protocol: ``` - (id)initWithCoder:(NSCoder *)aDecoder { NSLog(@"init custom label"); self = [super initW...
Calling only init on an UIView is the same as calling initWithFrame: with a zero-rect. So you should override initWithFrame or initWithCoder if you are using nib-files.
19,902,758
I am trying to subclass `UILabel`. The first try involves that my custom `UILabel` simply sets the property `adjustsFontSizeToFitWidth` to `YES`. The problem is that I am new to iOS programming and unsure about where to put this code. I tried the code below but they are never called. ``` - (id)initWithFrame:(CGRect)fr...
2013/11/11
[ "https://Stackoverflow.com/questions/19902758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1354603/" ]
I would personally stay away from `initWithCoder:` and instead use `awakeFromNib` instead. Here is why ([Apple UIKit Documentation](https://developer.apple.com/library/IOS/documentation/UIKit/Reference/NSObject_UIKitAdditions/Introduction/Introduction.html#//apple_ref/occ/instm/NSObject/awakeFromNib)): > > The nib-lo...
Calling only init on an UIView is the same as calling initWithFrame: with a zero-rect. So you should override initWithFrame or initWithCoder if you are using nib-files.
19,902,758
I am trying to subclass `UILabel`. The first try involves that my custom `UILabel` simply sets the property `adjustsFontSizeToFitWidth` to `YES`. The problem is that I am new to iOS programming and unsure about where to put this code. I tried the code below but they are never called. ``` - (id)initWithFrame:(CGRect)fr...
2013/11/11
[ "https://Stackoverflow.com/questions/19902758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1354603/" ]
When a label is used in interface builder is then the coded use the [`NSCoder`](https://developer.apple.com/library/iOS/documentation/Cocoa/Reference/Foundation/Classes/NSCoder_Class/Reference/NSCoder.html) protocol: ``` - (id)initWithCoder:(NSCoder *)aDecoder { NSLog(@"init custom label"); self = [super initW...
I would personally stay away from `initWithCoder:` and instead use `awakeFromNib` instead. Here is why ([Apple UIKit Documentation](https://developer.apple.com/library/IOS/documentation/UIKit/Reference/NSObject_UIKitAdditions/Introduction/Introduction.html#//apple_ref/occ/instm/NSObject/awakeFromNib)): > > The nib-lo...
2,721,385
I used Wolfram Alpha to estimate the sum of multiple Harmonic series. I was quite surprised that Wolfram Alpha came up with a closed form solution $$ \psi\big(\tfrac{3}{16}\big) + \psi\big(\tfrac{5}{16}\big) + \psi\big(\tfrac{11}{16}\big) + \psi\big(\tfrac{13}{16}\big) - \psi\big(\tfrac{1}{16}\big) - \psi\big(\tfrac{...
2018/04/04
[ "https://math.stackexchange.com/questions/2721385", "https://math.stackexchange.com", "https://math.stackexchange.com/users/404/" ]
Using $$\psi(z)=-\gamma+\sum\_{n=0}^\infty\left(\frac1{n+1}-\frac1{n+z}\right)$$ gives your expression as $$16\sum\_{n=0}^\infty\left(\frac1{16n+1}-\frac1{16n+3}-\frac1{16n+5}+\frac1{16n+7}+\frac1{16n+9}-\frac1{16n+11}-\frac1{16n+13}+\frac1{16n+15}\right).$$ That is $\int\_0^1f(x)\,dx$ where $$f(x)=16\sum\_{n=0}^\infty...
It is a straightfoward consequence of the [Gauss Digamma theorem](http://mathworld.wolfram.com/GausssDigammaTheorem.html), which on its turn is a consequence of the reflection formula for the $\Gamma$ function: $$ \Gamma(s)\Gamma(1-s)=\frac{\pi}{\sin(\pi s)},\qquad \log\Gamma(s)+\log\Gamma(1-s) = \log \pi-\log\sin(\pi ...
6,498,982
I was given following code snippet: ``` public class ThreadTest{ private static class Thread01 extends Thread{ private Thread02 _th2; public int foo = 0; public void setThrd02(Thread02 thrd2){ _th2 = thrd2; } public void run(){ try{ for(int i=0;i<10;i++) foo += i; ...
2011/06/27
[ "https://Stackoverflow.com/questions/6498982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445071/" ]
There is no guarantee of ordering in your threads. It's sufficient for Thread01 to go past `synchronized(this){this.notify();};` before Thread02 does `synchronized(_th1){_th1.wait();}` to have both threads waiting indefinitely. Note: The fact that you are calling `wait` and `notify` on \_th1 and \_th2 is irrelevant....
@Alex has already pointed out the problems with wait and notify not being called in the order the code expects them to be (+1). However, since this is an interview question there are several other things wrong with this code: 1. Horrible naming conventions and code formatting, 2. Public field accessors, 3. Synchronizi...
6,498,982
I was given following code snippet: ``` public class ThreadTest{ private static class Thread01 extends Thread{ private Thread02 _th2; public int foo = 0; public void setThrd02(Thread02 thrd2){ _th2 = thrd2; } public void run(){ try{ for(int i=0;i<10;i++) foo += i; ...
2011/06/27
[ "https://Stackoverflow.com/questions/6498982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445071/" ]
There is no guarantee of ordering in your threads. It's sufficient for Thread01 to go past `synchronized(this){this.notify();};` before Thread02 does `synchronized(_th1){_th1.wait();}` to have both threads waiting indefinitely. Note: The fact that you are calling `wait` and `notify` on \_th1 and \_th2 is irrelevant....
Following can be a better fix ``` public class ThreadTest{ private static volatile boolean updated = false; private static volatile boolean finished = false; private static class Thread01 extends Thread{ private Thread02 _th2; public int foo = 0; public void setThread2(Thread02 th2){ _th...
6,498,982
I was given following code snippet: ``` public class ThreadTest{ private static class Thread01 extends Thread{ private Thread02 _th2; public int foo = 0; public void setThrd02(Thread02 thrd2){ _th2 = thrd2; } public void run(){ try{ for(int i=0;i<10;i++) foo += i; ...
2011/06/27
[ "https://Stackoverflow.com/questions/6498982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445071/" ]
@Alex has already pointed out the problems with wait and notify not being called in the order the code expects them to be (+1). However, since this is an interview question there are several other things wrong with this code: 1. Horrible naming conventions and code formatting, 2. Public field accessors, 3. Synchronizi...
Following can be a better fix ``` public class ThreadTest{ private static volatile boolean updated = false; private static volatile boolean finished = false; private static class Thread01 extends Thread{ private Thread02 _th2; public int foo = 0; public void setThread2(Thread02 th2){ _th...
71,176,326
I have not looked at big O notation since about 1997 so I was hoping for a little sense check. Imagine a simple algorithm that brute force hacks Caesar Cipher encrypted text. It uses a simple Caesar Cipher algorithm that is nested inside a for 1 to 26 loop, using the loop counter as a key, and outputs all possible res...
2022/02/18
[ "https://Stackoverflow.com/questions/71176326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2614375/" ]
The answer becomes obvious as soon as you explicitly state the meaning of your `N` in `O(N)`. And the only plausible meaning for `N` in your case is the length of the input string. Big-O notation is about the asymptotic increase of run time (sometimes also applied to memory consumption) with increasing input size (how...
I think you're right: As you have a constant number of keys, this outer loop doesn't account for more complexity: `O(26*N) = O(N)`, as constants are ignored in Big O.
967,402
Do they? Or to speed up my program should I pass them by reference?
2009/06/08
[ "https://Stackoverflow.com/questions/967402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119501/" ]
They are passed by value (as are all parameters that are neither ref nor out), but the value *is* a reference to the object, so they are effectively passed by reference.
Yes, they are passed by reference by default in C#. All objects in C# are, except for value types. To be a little bit more precise, they're passed "by reference by value"; that is, the value of the variable that you see in your methods is a reference to the original object passed. This is a small semantic point, but on...
967,402
Do they? Or to speed up my program should I pass them by reference?
2009/06/08
[ "https://Stackoverflow.com/questions/967402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119501/" ]
The **reference** is passed *by value*. Arrays in .NET are object on the heap, so you have a reference. That reference is passed by value, meaning that changes to the **contents** of the array will be seen by the caller, but **reassigning** the array won't: ``` void Foo(int[] data) { data[0] = 1; // caller sees t...
Yes, they are passed by reference by default in C#. All objects in C# are, except for value types. To be a little bit more precise, they're passed "by reference by value"; that is, the value of the variable that you see in your methods is a reference to the original object passed. This is a small semantic point, but on...
967,402
Do they? Or to speed up my program should I pass them by reference?
2009/06/08
[ "https://Stackoverflow.com/questions/967402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119501/" ]
The **reference** is passed *by value*. Arrays in .NET are object on the heap, so you have a reference. That reference is passed by value, meaning that changes to the **contents** of the array will be seen by the caller, but **reassigning** the array won't: ``` void Foo(int[] data) { data[0] = 1; // caller sees t...
They are passed by value (as are all parameters that are neither ref nor out), but the value *is* a reference to the object, so they are effectively passed by reference.
967,402
Do they? Or to speed up my program should I pass them by reference?
2009/06/08
[ "https://Stackoverflow.com/questions/967402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119501/" ]
They are passed by value (as are all parameters that are neither ref nor out), but the value *is* a reference to the object, so they are effectively passed by reference.
(1) No one explicitly answered the OP's question, so here goes: * No. Explicitly passing the array or list as a reference will not affect performance. * What the OP feared might be happening is avoided because the function is already operating on a reference (which was passed by value). The top answer nicely explains ...
967,402
Do they? Or to speed up my program should I pass them by reference?
2009/06/08
[ "https://Stackoverflow.com/questions/967402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119501/" ]
The **reference** is passed *by value*. Arrays in .NET are object on the heap, so you have a reference. That reference is passed by value, meaning that changes to the **contents** of the array will be seen by the caller, but **reassigning** the array won't: ``` void Foo(int[] data) { data[0] = 1; // caller sees t...
(1) No one explicitly answered the OP's question, so here goes: * No. Explicitly passing the array or list as a reference will not affect performance. * What the OP feared might be happening is avoided because the function is already operating on a reference (which was passed by value). The top answer nicely explains ...
1,368,913
I'd like my router to have a different public IP network so I tried rebooting, restarting and my operator's support told me that I can try leaving the router off for 4 days, but I'm not sure if this is going to change anything. I'd like to know what free solutions I can use to do this: * maybe I can use a proxy serve...
2018/10/22
[ "https://superuser.com/questions/1368913", "https://superuser.com", "https://superuser.com/users/909793/" ]
The general answer isthat you can't just change your router's IP address. You may force your router to reconnect, and restarting the router includes a reconnect, but the router will just again request an IP address from your provider. That your provider's support suggested turning off the router indicates that they th...
1. Save MAC of router 2. Change router MAC to computer MAC 3. Router should automatically reboot 4. Reboot it from gateway 5. Give 5-10 mins for new IP
39,239,361
I wrote a script in Python for custom HTML page that finds a word within a string/line and highlights just that word with use of following tags where instance is the word that is searched for. ``` <b><font color=\"red\">"+instance+"</font></b> ``` With the following result: [![enter image description here](https://i...
2016/08/31
[ "https://Stackoverflow.com/questions/39239361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4342139/" ]
Ideally you should encapsulate your calculation in a class: ``` public class PI { private double estimate = 1.0; private int iteration = 0; public double getEstimate() { return 4 * estimate; } public void iterate() { double ratio = 1.0 / (iteration * 2 + 3); if (iteration ...
consider ``` String piStr = "3.14159"; Double pi=1.0; int s=1; double j=3.0; String lcl = ""; String upToNCharacters = ""; while (true) { if (s % 2 == 0) pi = pi + (1/j); else pi = pi - (1/j); ...
39,239,361
I wrote a script in Python for custom HTML page that finds a word within a string/line and highlights just that word with use of following tags where instance is the word that is searched for. ``` <b><font color=\"red\">"+instance+"</font></b> ``` With the following result: [![enter image description here](https://i...
2016/08/31
[ "https://Stackoverflow.com/questions/39239361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4342139/" ]
So there is presumably a way to make an a priori estimate of error using the alternating series theorem. But suppose you do not know the theorem or trust your math (if you do, just change 100.0 above to the right number. 800000.0 as estimated above would work, just barely). Here is something a little safer, perhaps, th...
consider ``` String piStr = "3.14159"; Double pi=1.0; int s=1; double j=3.0; String lcl = ""; String upToNCharacters = ""; while (true) { if (s % 2 == 0) pi = pi + (1/j); else pi = pi - (1/j); ...
39,239,361
I wrote a script in Python for custom HTML page that finds a word within a string/line and highlights just that word with use of following tags where instance is the word that is searched for. ``` <b><font color=\"red\">"+instance+"</font></b> ``` With the following result: [![enter image description here](https://i...
2016/08/31
[ "https://Stackoverflow.com/questions/39239361", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4342139/" ]
So there is presumably a way to make an a priori estimate of error using the alternating series theorem. But suppose you do not know the theorem or trust your math (if you do, just change 100.0 above to the right number. 800000.0 as estimated above would work, just barely). Here is something a little safer, perhaps, th...
Ideally you should encapsulate your calculation in a class: ``` public class PI { private double estimate = 1.0; private int iteration = 0; public double getEstimate() { return 4 * estimate; } public void iterate() { double ratio = 1.0 / (iteration * 2 + 3); if (iteration ...
15,821,485
I created the extension "unaccent" on the postgresql database but when I run a select using the "unaccent" it always return 1 row but with a blank line. ``` select ts_lexize('unaccent', 'Hôtel'); ts_lexize ----------- (1 row) ``` Expected according to [the documentation](http://www.postgresql.org/docs/9.1/static/un...
2013/04/04
[ "https://Stackoverflow.com/questions/15821485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/179372/" ]
I just discovered that the problem was that the database encoding, which was using the `SQL_ASCII` encoding, so I dropped the database, recreated it with `UTF-8` and then it started to worked fine. It seems that the `unaccent` doesn't work with `SQL_ASCII`.
It depends on Postgres editor or Operational System. Problably you're using MacOS or Linux to show the results. I agreed Tarantula. If you change encoding database to UTF-8, it will be much better. Try to execute this select in a Postgres Windows editor. With me worked. The "blank" result appered. Hgs =)
65,594,362
I have a set of styles that create a slim overlay scrollbar for Chromium/Webkit using `-webkit-scrollbar-track` (fallbacks in FX don't have this issue), something like: ```css #wrapper { height: 125px; display: flex; } .slim-scroll { flex: 1; overflow-y: overlay !important; padding-right: calc(8px * 1...
2021/01/06
[ "https://Stackoverflow.com/questions/65594362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905/" ]
First, can you try to do this without flexbox? Flex still has some issues, especially on special cases like this. Second I put all css on one div. As that is the div you want the scrollbar on. **Update: This fixes the original problem** Third: replace overflow-y: overlay with overflow-y: auto **Update: second quest...
It looks like styling the scrollbars should be done using the [`scrollbar-width`](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-width) and [`scrollbar-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-color) properties, (see [CSSWG draft](https://drafts.csswg.org/css-scrollbars-1/) and [is...
65,777,579
I created new Android project by selecting “Bottom Navigation Activity”. No other change. Only modify “fragment\_notifications.xml” by adding background attribute to set background to black. ![Screenshot](https://i.stack.imgur.com/SBGKb.png) My question is: * a) Why the fragment in black doesn't start right next to ...
2021/01/18
[ "https://Stackoverflow.com/questions/65777579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11893484/" ]
> > Why the fragment in black doesn't start right next to the blue title area > > > The reason: The `activity_main.xml` root layout (`ConstraintLayout`) has a `paddingTop` attribute that adds this top blank space which equals to the size of the `ActionBar` ``` android:paddingTop="?attr/actionBarSize" ``` The he...
Try by changing `textview` color ``` <TextView android:id="@+id/text_notifications" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="8dp" android:layout_marginTop="8dp" android:layout_marginEnd="8dp" android:textAlignment="center" android:textSize="20sp" app:layout_c...
34,498,943
I am asked to write a small HTTP based service that will accept requests that look like this: ``` [ { name: 'James Smith', address: '10 Lake Drive' } { name: 'Jones', phone_number: '999-123-4567' } { name: 'Mr. Lucas', address: 'Detroit, MI' } ] ``` (but with a larger number of requests) and to attempt to d...
2015/12/28
[ "https://Stackoverflow.com/questions/34498943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/180368/" ]
So it seems to that your LookUpRequests process is not RESTful. Its not a stateless transaction, it requires the information in the post to be stored and processed on the server then returned in a different request. I would do the \DoMatches but are you really "POSTING" anything your "GETTING" information right ? so w...
Neither one is RESTful. This is RPC, pure and simple. The RESTful approach would be treating each account as a resource, identified by an URI, and checking each one of them on a single request. If you don't want to have multiple requests like that, you can have a higher level interface as a workaround, where you subm...
54,875,687
I want integer input for the variable `x`, space separated. **User input example** `20 15 7 5 4 2`. This list should be entered into `x` and then split into two parts. The parts should be then substracted with each other and output the smallest possible difference. The below code splits the input already partially into...
2019/02/25
[ "https://Stackoverflow.com/questions/54875687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10294689/" ]
you need to add a condition so it exits the loop when x is no longer valid: ``` # User input, space separated ui = input() x = list(map(int, ui.split(' '))) half = sum(x)//2 # two empty lists to enter the x-values a = [] b = [] # while len(x) != 0: # while loop to divide the values while len(x) > 1: if sum(a) < ...
You need to split the user input into separate strings before mapping `int` onto it. Otherwise, it tries to convert the *whole* string of `20 15 7 5 4 2` into one integer value. To fix this, try adding a `split()` to the map input to convert it to a list of strings: ``` x = list(map(int, ui.split()) ``` EDIT: I was ...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
umm...there are (I think, too lazy to google it) nine relational operators (scan, jump, hash-merge, etc.) that are used to construct the execution plan of a SQL query. The choice of operators is based on the usage statistics of the target database tables, available indices, et al. It sounds like you're trying to recre...
This is a very old question by now, and I agree with most of the other answers that it is perhaps a bit misguided. But there is something to it. Have you read Gulutzan and Pelzer's "SQL Performance Tuning" (Addison-Wesley, 2003)? It compares a number of DBMSs and how equivalent but differently formulated queries impact...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
umm...there are (I think, too lazy to google it) nine relational operators (scan, jump, hash-merge, etc.) that are used to construct the execution plan of a SQL query. The choice of operators is based on the usage statistics of the target database tables, available indices, et al. It sounds like you're trying to recre...
Good luck - you've chosen to compete with such companies as Microsoft and Oracle, who live or die by how well their query optimizers do exactly what you propose. The first and primary way to compare one database product with another is with benchmark testing, where the same query workload is applied to each of them, ti...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
I'm surprised to hear you describe SQL as "close to the machine". SQL itself is declarative rather than procedural, and one of the interesting aspects of relational databases is the freedom implementers have to innovate, since SQL itself dictates very little about how the queries should be executed. I think for sheer ...
Good luck - you've chosen to compete with such companies as Microsoft and Oracle, who live or die by how well their query optimizers do exactly what you propose. The first and primary way to compare one database product with another is with benchmark testing, where the same query workload is applied to each of them, ti...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
I'm surprised to hear you describe SQL as "close to the machine". SQL itself is declarative rather than procedural, and one of the interesting aspects of relational databases is the freedom implementers have to innovate, since SQL itself dictates very little about how the queries should be executed. I think for sheer ...
umm...there are (I think, too lazy to google it) nine relational operators (scan, jump, hash-merge, etc.) that are used to construct the execution plan of a SQL query. The choice of operators is based on the usage statistics of the target database tables, available indices, et al. It sounds like you're trying to recre...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
I'm surprised to hear you describe SQL as "close to the machine". SQL itself is declarative rather than procedural, and one of the interesting aspects of relational databases is the freedom implementers have to innovate, since SQL itself dictates very little about how the queries should be executed. I think for sheer ...
Is your intent to write this for a single specific database engine? If not, I suspect that you'll have a rather difficult time of this. Optimization of database queries relies heavily on the exact specifics of the engine's implementation and internals, as well as the tables, indexes, primary/foreign key relations, type...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
Bramha, I'm not sure if you know what you are asking. SQL Optimization isn't simply a matter of making sure that query components are in the right order. You seem to recognize that you'll need to have intimate knowledge of the indices, data page layouts, etc. etc. but you'd still be left with just reording query clause...
Good luck - you've chosen to compete with such companies as Microsoft and Oracle, who live or die by how well their query optimizers do exactly what you propose. The first and primary way to compare one database product with another is with benchmark testing, where the same query workload is applied to each of them, ti...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
I'm surprised to hear you describe SQL as "close to the machine". SQL itself is declarative rather than procedural, and one of the interesting aspects of relational databases is the freedom implementers have to innovate, since SQL itself dictates very little about how the queries should be executed. I think for sheer ...
This is a very old question by now, and I agree with most of the other answers that it is perhaps a bit misguided. But there is something to it. Have you read Gulutzan and Pelzer's "SQL Performance Tuning" (Addison-Wesley, 2003)? It compares a number of DBMSs and how equivalent but differently formulated queries impact...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
Bramha, I'm not sure if you know what you are asking. SQL Optimization isn't simply a matter of making sure that query components are in the right order. You seem to recognize that you'll need to have intimate knowledge of the indices, data page layouts, etc. etc. but you'd still be left with just reording query clause...
umm...there are (I think, too lazy to google it) nine relational operators (scan, jump, hash-merge, etc.) that are used to construct the execution plan of a SQL query. The choice of operators is based on the usage statistics of the target database tables, available indices, et al. It sounds like you're trying to recre...
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
umm...there are (I think, too lazy to google it) nine relational operators (scan, jump, hash-merge, etc.) that are used to construct the execution plan of a SQL query. The choice of operators is based on the usage statistics of the target database tables, available indices, et al. It sounds like you're trying to recre...
You might find the patterns in "SQL Queries for Mere Mortals" useful as they work through a structured canonical format starting with English descriptions. Online at [Safari](http://my.safaribooksonline.com/9780321444431), if you want to take a quick peek.
437,723
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query tailored for the target system that will quickly optimize to a nearly ideal...
2009/01/13
[ "https://Stackoverflow.com/questions/437723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
Bramha, I'm not sure if you know what you are asking. SQL Optimization isn't simply a matter of making sure that query components are in the right order. You seem to recognize that you'll need to have intimate knowledge of the indices, data page layouts, etc. etc. but you'd still be left with just reording query clause...
You might find the patterns in "SQL Queries for Mere Mortals" useful as they work through a structured canonical format starting with English descriptions. Online at [Safari](http://my.safaribooksonline.com/9780321444431), if you want to take a quick peek.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can place it anywhere, as long is you include it in your classpath. See [Setting the Class Path](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) for how to include jars in the classpath. Have in mind that adding something in the JDK lib is almost never a good idea.
A simple solution will be to place the jar fiel inside the windows folder if you are doing it in a Windows machine.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can place it anywhere, as long is you include it in your classpath. See [Setting the Class Path](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) for how to include jars in the classpath. Have in mind that adding something in the JDK lib is almost never a good idea.
You need to let Java know that you want to include the jar in your classpath (the list of folders and jars it checks for classes). One way to do this is with the `-cp` command line argument, something like ``` java -cp ".;pathToMyJar\myJar.jar" MyClass ``` Another is to edit the CLASSPATH environment variable in you...
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You need to add the jar to the class path by doing the following... > > java -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar org.mypackage.HelloWorld > > > Please see [Wikipedia - Classpath\_(Java)](http://en.wikipedia.org/wiki/Classpath_%28Java%29#Basic_usage)
You need to let Java know that you want to include the jar in your classpath (the list of folders and jars it checks for classes). One way to do this is with the `-cp` command line argument, something like ``` java -cp ".;pathToMyJar\myJar.jar" MyClass ``` Another is to edit the CLASSPATH environment variable in you...
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can place it anywhere, as long is you include it in your classpath. See [Setting the Class Path](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) for how to include jars in the classpath. Have in mind that adding something in the JDK lib is almost never a good idea.
Unfortunately your question contains a lot of question signs and few information. If you are using java.io.File to open jar as a regular file this jar should not be in lib directory. You just have to provide correct path in file system. If however you are just trying to use jar as a part of your application it shoul...
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can make a `lib` folder in your application's directory and put `jar` files there, then make your application find them by adding `lib` to your application's classpath. And, don't put your `jar` files in JDK's `lib` folder. It's not good practise.
A simple solution will be to place the jar fiel inside the windows folder if you are doing it in a Windows machine.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You need to add the jar to the class path by doing the following... > > java -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar org.mypackage.HelloWorld > > > Please see [Wikipedia - Classpath\_(Java)](http://en.wikipedia.org/wiki/Classpath_%28Java%29#Basic_usage)
You can place it anywhere, as long is you include it in your classpath. See [Setting the Class Path](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) for how to include jars in the classpath. Have in mind that adding something in the JDK lib is almost never a good idea.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You need to add the jar to the class path by doing the following... > > java -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar org.mypackage.HelloWorld > > > Please see [Wikipedia - Classpath\_(Java)](http://en.wikipedia.org/wiki/Classpath_%28Java%29#Basic_usage)
You can make a `lib` folder in your application's directory and put `jar` files there, then make your application find them by adding `lib` to your application's classpath. And, don't put your `jar` files in JDK's `lib` folder. It's not good practise.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can make a `lib` folder in your application's directory and put `jar` files there, then make your application find them by adding `lib` to your application's classpath. And, don't put your `jar` files in JDK's `lib` folder. It's not good practise.
You need to let Java know that you want to include the jar in your classpath (the list of folders and jars it checks for classes). One way to do this is with the `-cp` command line argument, something like ``` java -cp ".;pathToMyJar\myJar.jar" MyClass ``` Another is to edit the CLASSPATH environment variable in you...
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You can place it anywhere, as long is you include it in your classpath. See [Setting the Class Path](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/classpath.html) for how to include jars in the classpath. Have in mind that adding something in the JDK lib is almost never a good idea.
You can make a `lib` folder in your application's directory and put `jar` files there, then make your application find them by adding `lib` to your application's classpath. And, don't put your `jar` files in JDK's `lib` folder. It's not good practise.
4,364,675
this will sound silly but i am executing my code from command prompt and have to use a jar in my class. I have placed my jar in lib folder of JDK.. but i am still getting error of file not found any explanation?? **EDITED** : guys tried all but still not working **EDIT 2** :i am trying to work as was told by this [...
2010/12/06
[ "https://Stackoverflow.com/questions/4364675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/519755/" ]
You need to add the jar to the class path by doing the following... > > java -classpath D:\myprogram;D:\myprogram\lib\supportLib.jar org.mypackage.HelloWorld > > > Please see [Wikipedia - Classpath\_(Java)](http://en.wikipedia.org/wiki/Classpath_%28Java%29#Basic_usage)
Unfortunately your question contains a lot of question signs and few information. If you are using java.io.File to open jar as a regular file this jar should not be in lib directory. You just have to provide correct path in file system. If however you are just trying to use jar as a part of your application it shoul...
18,199,776
Where is this 'http.sys' actually located in Windows? I can't find it in any Windows folder. Where is this 'http.sys' file? Where do I need to look? I tried to search 'http.sys' on Google, but I could not find the folder.
2013/08/13
[ "https://Stackoverflow.com/questions/18199776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2453180/" ]
It's located at `system32\drivers\http.sys`.
`Windows\system32\drivers\http.sys` its available only with XP SP2 and later.
18,199,776
Where is this 'http.sys' actually located in Windows? I can't find it in any Windows folder. Where is this 'http.sys' file? Where do I need to look? I tried to search 'http.sys' on Google, but I could not find the folder.
2013/08/13
[ "https://Stackoverflow.com/questions/18199776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2453180/" ]
It's located at `system32\drivers\http.sys`.
it's locate under `C:\Windows\System32\drivers` by name **http** but it's actually **http.sys** is kernel level layer of IIS, every request comes from client is first to **http.sys** and then it make a queue of every request based on application pool register number.
18,199,776
Where is this 'http.sys' actually located in Windows? I can't find it in any Windows folder. Where is this 'http.sys' file? Where do I need to look? I tried to search 'http.sys' on Google, but I could not find the folder.
2013/08/13
[ "https://Stackoverflow.com/questions/18199776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2453180/" ]
`Windows\system32\drivers\http.sys` its available only with XP SP2 and later.
it's locate under `C:\Windows\System32\drivers` by name **http** but it's actually **http.sys** is kernel level layer of IIS, every request comes from client is first to **http.sys** and then it make a queue of every request based on application pool register number.
43,101,403
In bash, running `set` will display all environment settings. I want to display my functions as a single line for each function. So instead of running `set` and getting this (for example): ``` gcm () { git commit -m "$@"; git --no-pager log -1 | grep --color ^commit } gcma () { git commit -a -m "$@"; g...
2017/03/29
[ "https://Stackoverflow.com/questions/43101403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1533046/" ]
In awk: ``` $ awk 'sub(/}/,"}\n")||$1=$1' ORS='' file ``` or remove `file` and pipe to it (in which case you need to `awk -v ORS=''...`). Result: ``` gcm (){git commit -m "$@";git --no-pager log -1 | grep --color ^commit} gcma (){git commit -a -m "$@";git --no-pager log -1 | grep --color ^commit} ``` * replace `}...
Try this - ``` awk '{gsub(/[[:space:]]+/," ") ;ORS=(/}/?RS:FS)}1' f gcm () { git commit -m "$@"; git --no-pager log -1 | grep --color ^commit } gcma () { git commit -a -m "$@"; git --no-pager log -1 | grep --color ^commit } ```
43,101,403
In bash, running `set` will display all environment settings. I want to display my functions as a single line for each function. So instead of running `set` and getting this (for example): ``` gcm () { git commit -m "$@"; git --no-pager log -1 | grep --color ^commit } gcma () { git commit -a -m "$@"; g...
2017/03/29
[ "https://Stackoverflow.com/questions/43101403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1533046/" ]
Small [sed](/questions/tagged/sed "show questions tagged 'sed'") script ----------------------------------------------------------------------- Try this: ``` declare -f gcm gcma dequote quote | sed '1h;1!H;/^}$/!d;s/.//;x;s/\n[ \o11]*//g;s/}$/;}/' ``` may render: ``` gcm () { git commit -m "$@";git --no-pager ...
Try this - ``` awk '{gsub(/[[:space:]]+/," ") ;ORS=(/}/?RS:FS)}1' f gcm () { git commit -m "$@"; git --no-pager log -1 | grep --color ^commit } gcma () { git commit -a -m "$@"; git --no-pager log -1 | grep --color ^commit } ```
43,101,403
In bash, running `set` will display all environment settings. I want to display my functions as a single line for each function. So instead of running `set` and getting this (for example): ``` gcm () { git commit -m "$@"; git --no-pager log -1 | grep --color ^commit } gcma () { git commit -a -m "$@"; g...
2017/03/29
[ "https://Stackoverflow.com/questions/43101403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1533046/" ]
Small [sed](/questions/tagged/sed "show questions tagged 'sed'") script ----------------------------------------------------------------------- Try this: ``` declare -f gcm gcma dequote quote | sed '1h;1!H;/^}$/!d;s/.//;x;s/\n[ \o11]*//g;s/}$/;}/' ``` may render: ``` gcm () { git commit -m "$@";git --no-pager ...
In awk: ``` $ awk 'sub(/}/,"}\n")||$1=$1' ORS='' file ``` or remove `file` and pipe to it (in which case you need to `awk -v ORS=''...`). Result: ``` gcm (){git commit -m "$@";git --no-pager log -1 | grep --color ^commit} gcma (){git commit -a -m "$@";git --no-pager log -1 | grep --color ^commit} ``` * replace `}...
105,809
I am playing the Final pursuit in NFS Most Wanted 2005, after beating Razor. But my system resources are a bit low. (1GB RAM, 2GHZ). So i find the pursuit difficult to evade. The game is going dull, the cars are moving slow on the roads and everytime i just get busted. It is due to the fact that the memory usage for ...
2013/02/16
[ "https://gaming.stackexchange.com/questions/105809", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/42497/" ]
Try looking at [this forum post](https://forums.tomshardware.com/threads/need-for-speed-most-wanted-graphics-settings.109378/) from 2010 with somebody who is in almost the exact same situation as you. It's worth noting their computer parts include 6GB RAM to your 1GB, as well as 2.4GHZ clock speed to your 2GHZ. In th...
It depends on your driving; speed breakers and pursuit breakers are a must. By now you'll know how to reach Rosewood. There's a bus station near that you can get on that and wait for 5 min. You'll get a call, and you have to head to the highway which is near the stadium. Now you'll be done with the orange symbol, the r...
27,844,128
I can't get a proper explain using the native mongodb driver for Node.js. When I use the mongo shell, everything is fine. Is my syntax wrong? Anything else I could be doing wrong? ``` db.user.find({},{explain:true}).toArray db.user.find({}).explain ``` I've tried both of these, there are two documents in the user t...
2015/01/08
[ "https://Stackoverflow.com/questions/27844128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2923448/" ]
Should be fixed in 2.0.13 of the driver after I did a bunch of low level profiling and optimizations.
Looks like a 2.0.x issue. Already submitted ticket. Seems to be a problem with the 2.0.x driver: here's a thread... I just ran the exact same query with 2.0.x and 1.4.x. When Limit = 1, both perform fast ~1ms. When Limit = 2, the 1.4.x version stays around 1ms but the 2.0.x version jumps to 25ms. So, it's not just an...
704,309
I'm having a classic developer-system admin battle where I am stating that there is an IO problem on the disk of the shared sql server while the system admin tells me that the capacity hasn't been reached at all. 1 thing I was able to point out is that the avg disk queue length on the SQL server is very high. The avg ...
2015/07/08
[ "https://serverfault.com/questions/704309", "https://serverfault.com", "https://serverfault.com/users/90447/" ]
*You're focusing a bit much on a single metric!* Diagnosing a bottleneck to a single component rarely ends with one counter giving a full explanation. There are [quite a few](http://blogs.msdn.com/b/askjay/archive/2011/07/08/troubleshooting-slow-disk-i-o-in-sql-server.aspx) [great](https://www.mssqltips.com/sqlserv...
Fairly new to Azure, but here's my offering: The more Azure disks you span the better your performance will be, this is true. I'm not sure about the equation though. Either way, I think you're barking up the wrong tree... Azure imposes artificial limits on metrics such as IOPS and Max reads/writes per second, so the ...
65,098,113
I have a dataset in long format with a column titled subject and wave. Each subject has up to two rows (one for wave 1 and one for wave 2). If they are missing a wave, then they only have one row. I only want to keep subjects in the dataset if they have both wave 1 and wave 2 data. Any ideas how to do this?
2020/12/01
[ "https://Stackoverflow.com/questions/65098113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14694400/" ]
We can use `which.max` to create a numeric index and subset the corresponding 'TIME' after grouping by 'ID' ``` library(dplyr) data %>% group_by(ID) %>% mutate(MAX = TIME[which.max(VALUE)]) # // if the column is not numeric, convert to numeric # mutate(MAX = TIME[which.max(as.numeric(VALUE))]) ...
If you just want to use dplyr: ``` library(dplyr) # Create reprex df <- tibble::tribble( ~ID, ~TIME, ~VALUE, 1, 10, 14, 1, 20, 34, 1, 30, 35, 2, 10, 15, 2, 20, 14, 2, 30, 11, 3, 10, 16, 3, 20, 64, 3, 30, 55, 4, 30, NA, 4, 20, NA, 5, 10, 10, 5, 20, 30 ) df_max <- df %>% group_by(ID) %>% mutate(rn = row...
5,554
The definition of "to build", in software, is: > > the process of converting source code files into standalone software artifact(s) that can be run on a computer > > > I'm working with a software development team and I'm struggling with specific software-related vocabulary. There are a few potential direct trans...
2014/01/12
[ "https://chinese.stackexchange.com/questions/5554", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3778/" ]
You can say: * build server: 编译服务器 * to build: 编译(编译整个工程) * a build: 一个版本的编译,编译的一个版本 * a code drop: 一个代码实现 (minor milestone)
BUILD SERVER 搭建服务器,for both hardware and software terms. A BUILD, depends on the context, can be translate as 一款软件建成的版本
5,554
The definition of "to build", in software, is: > > the process of converting source code files into standalone software artifact(s) that can be run on a computer > > > I'm working with a software development team and I'm struggling with specific software-related vocabulary. There are a few potential direct trans...
2014/01/12
[ "https://chinese.stackexchange.com/questions/5554", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3778/" ]
You can say: * build server: 编译服务器 * to build: 编译(编译整个工程) * a build: 一个版本的编译,编译的一个版本 * a code drop: 一个代码实现 (minor milestone)
Build means: 1. setup 搭建 2. compile 编译 Depending on the context: 1. if the server is a Linux distribution, such as Ubuntu or CentOS, build server should be "搭建服务器". 2. if the server is "MySQL" or other databases, we call it "搭建数据库服务器". 3. if the server is Tomcat (a Java application server), we call it "搭建应用服务器" or "...
5,554
The definition of "to build", in software, is: > > the process of converting source code files into standalone software artifact(s) that can be run on a computer > > > I'm working with a software development team and I'm struggling with specific software-related vocabulary. There are a few potential direct trans...
2014/01/12
[ "https://chinese.stackexchange.com/questions/5554", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/3778/" ]
Build means: 1. setup 搭建 2. compile 编译 Depending on the context: 1. if the server is a Linux distribution, such as Ubuntu or CentOS, build server should be "搭建服务器". 2. if the server is "MySQL" or other databases, we call it "搭建数据库服务器". 3. if the server is Tomcat (a Java application server), we call it "搭建应用服务器" or "...
BUILD SERVER 搭建服务器,for both hardware and software terms. A BUILD, depends on the context, can be translate as 一款软件建成的版本
21,901,001
I have two buttons in one view controller, they all push one view controller, the problem is when i click two buttons at the same time, the app will crash and give me the error: > > nested push animation can result in corrupted navigation bar > 2014-02-20 15:11:35.540 TestPush[1147:60b] Finishing up a navigation > ...
2014/02/20
[ "https://Stackoverflow.com/questions/21901001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1039374/" ]
Try again by adding this line in both buttons' `IBAction` methods: ``` [self.view setUserInteractionEnabled:NO]; ``` and in `viewWillAppear` of same class add this: ``` [self.view setUserInteractionEnabled:YES]; ``` It will block user interaction as any buttons get tapped.
If you pushed viewController is not same with current viewController class, add following code before do push: ``` if(![self.navigationController.topViewController isKindOfClass:[self class]]) { return; } ```
63,580,623
Right now I'm sitting on a blank file which consists only of the following: ``` import os import sys import shlex import subprocess import signal from time import monotonic as timer ``` I get this error when I try to run my file: ImportError: Cannot import name monotonic If it matters, I am on linux and my python v...
2020/08/25
[ "https://Stackoverflow.com/questions/63580623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10847907/" ]
You'll need to use regular Producer and execute the serialization functions yourself ``` from confluent_kafka import avro from confluent_kafka.avro import CachedSchemaRegistryClient from confluent_kafka.avro.serializer.message_serializer import MessageSerializer as AvroSerializer avro_serializer = AvroSerializer(sche...
`AvroProducer` assumes that both keys and values are encoded with the schema registry, prepending a magic byte and the schema id to the payload of both the key and the value. If you want to use a custom serialization for the key, you could use a `Producer` instead of an `AvroProducer`. But it will be your responsibili...
49,950,163
I have a c project compiled with GCC.When I run my test.exe program ends with "test.exe has stopped working" but compiled successfully.How can I debug my program and how can find where is my mistake? Technique 1: I tried to printf("Successful 1..."),printf("Successful 2...") on the beginning of every single line of c...
2018/04/20
[ "https://Stackoverflow.com/questions/49950163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9571514/" ]
Let `x` and `y` be boolean keras tensors of the same shape. To take elementwise or, do the following: ``` keras.backend.any(keras.backend.stack([x, y], axis=0), axis=0) ``` To take elementwise and, do the following: ``` keras.backend.all(keras.backend.stack([x, y], axis=0), axis=0) ``` Here `keras.backend.stack(...
My solution (perhaps not the best, because I haven't found others either), is: ``` A = K.cast(someBooleanTensor, K.floatx()) B = K.cast(anotherBooleanTensor, K.floatx()) A_and_B = A * B #this is also something I use a lot for gathering elements A_or_B = 1 -((1-A)*(1-B)) ``` But thinking about it now... I never test...
37,869,418
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: ``` @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawer_layout)) ...
2016/06/16
[ "https://Stackoverflow.com/questions/37869418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5780734/" ]
I had the same problem and solved it by using `IntentsTestRule` instead of `ActivityTestRule`. `IntentsTestRule` is a subclass of `ActivityTestRule`. Set up your `@Rule` which creates the activity like so: ``` @Rule public IntentsTestRule<MyActivity> mActivity = new IntentsTestRule<MyActivity>(MyActivity.class) { ...
If you are using a custom `ActivityTestRule`, you can add the proper `Intents.init(), Intents.release()` calls: ``` @Override protected void afterActivityLaunched() { Intents.init(); super.afterActivityLaunched(); } @Override protected void afterActivityFinished() { super.afterActivityFinished(); Inte...
37,869,418
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: ``` @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawer_layout)) ...
2016/06/16
[ "https://Stackoverflow.com/questions/37869418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5780734/" ]
I had the same problem and solved it by using `IntentsTestRule` instead of `ActivityTestRule`. `IntentsTestRule` is a subclass of `ActivityTestRule`. Set up your `@Rule` which creates the activity like so: ``` @Rule public IntentsTestRule<MyActivity> mActivity = new IntentsTestRule<MyActivity>(MyActivity.class) { ...
I had the same problem, however, switching to `IntentsTestRule` did not work, too. So I switch back to `ActivityTestRule` and called `Intents.init()` before and `Intents.release()` after the test which sent the Intent. For more information please see this [reference](https://collectiveidea.com/blog/archives/2015/06/1...
37,869,418
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: ``` @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawer_layout)) ...
2016/06/16
[ "https://Stackoverflow.com/questions/37869418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5780734/" ]
I had the same problem and solved it by using `IntentsTestRule` instead of `ActivityTestRule`. `IntentsTestRule` is a subclass of `ActivityTestRule`. Set up your `@Rule` which creates the activity like so: ``` @Rule public IntentsTestRule<MyActivity> mActivity = new IntentsTestRule<MyActivity>(MyActivity.class) { ...
Instead of using `IntentsTestRule` which is now `@deprecated` in java, you should use the recommended `activityScenarioRule` like so: ``` @RunWith(AndroidJUnit4::class) @MediumTest class YourActivityTest { @get:Rule val activityScenario = activityScenarioRule<YourActivity>() @Before fun setUp...
37,869,418
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: ``` @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawer_layout)) ...
2016/06/16
[ "https://Stackoverflow.com/questions/37869418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5780734/" ]
If you are using a custom `ActivityTestRule`, you can add the proper `Intents.init(), Intents.release()` calls: ``` @Override protected void afterActivityLaunched() { Intents.init(); super.afterActivityLaunched(); } @Override protected void afterActivityFinished() { super.afterActivityFinished(); Inte...
I had the same problem, however, switching to `IntentsTestRule` did not work, too. So I switch back to `ActivityTestRule` and called `Intents.init()` before and `Intents.release()` after the test which sent the Intent. For more information please see this [reference](https://collectiveidea.com/blog/archives/2015/06/1...
37,869,418
I'm learning android instrumentation testing with espresso. I have an app which has a drawer menu and there is a menu called About. I was testing click on that menu item and contents of activity. testfunction: ``` @Test public void testNavigationDrawerAboutMenu() { onView(withId(R.id.drawer_layout)) ...
2016/06/16
[ "https://Stackoverflow.com/questions/37869418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5780734/" ]
If you are using a custom `ActivityTestRule`, you can add the proper `Intents.init(), Intents.release()` calls: ``` @Override protected void afterActivityLaunched() { Intents.init(); super.afterActivityLaunched(); } @Override protected void afterActivityFinished() { super.afterActivityFinished(); Inte...
Instead of using `IntentsTestRule` which is now `@deprecated` in java, you should use the recommended `activityScenarioRule` like so: ``` @RunWith(AndroidJUnit4::class) @MediumTest class YourActivityTest { @get:Rule val activityScenario = activityScenarioRule<YourActivity>() @Before fun setUp...
27,084
I have an old book on shelf, published in, and copyright date of 1913 (US). Looking over a copyright law page on the subject, I am thinking the copyright has expired but am not 100% sure. What kind of research do I need to do to reasonably determine the copyright has expired? What I am considering doing is scanning ...
2018/03/24
[ "https://law.stackexchange.com/questions/27084", "https://law.stackexchange.com", "https://law.stackexchange.com/users/13303/" ]
Yes, if the book was published in 1913, the copyright has expired. You can freely scan it in and publish it. But note you have NO copyright to the material. You didn't write it. Copyright law gives rights to the AUTHOR of a work. It doesn't matter how much effort you went to scanning it in and formatting it. Nothing i...
Yes, [that book will be in the public domain because it was printed before 1923](https://copyright.cornell.edu/publicdomain).
31,797,177
When I was setting up my SourceTree I met an annoying problem that it kept reminding me the following error: git status fatal: bad numeric config value 'purper' for 'color.ui': invalid unit I'm a programming newbee and don't quite know how git works and how to solve this problem, can anyone give me a hand?
2015/08/03
[ "https://Stackoverflow.com/questions/31797177", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5187265/" ]
This command should fix it **`$ git config --global color.ui false`**
`color.ui` does not understand the value "purper" (I suppose you mean "purple", but either way, it's not a valid value). The [valid values](ftp://www.kernel.org/pub/software/scm/git/docs/git-config.html) are: > > false or never if you prefer Git commands not to use color unless enabled explicitly with some other conf...