qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
54,885 | It's obviously good for creating dummy data; also can be used for generating passwords (although I believe you have to be careful here as to the true "randomness"). Any other useful uses that you've come across? | 2009/08/17 | [
"https://serverfault.com/questions/54885",
"https://serverfault.com",
"https://serverfault.com/users/10409/"
] | Contact Microsoft Support Services (PSS). Make sure the issue also happens on the most current version of your server (i.e. full updated service packs and patches). MS will gladly issue a patch free of charge for a production issue.
Regardless how you turn the table, a server should not crash on a RPC issue. Point. Th... | What's the error that is being returned? Check the mini dump files in the SQL Server Log folder to get more information about the actual reason for the crash.
You'll probably need to open a ticket with Microsoft and have look into the bugcheck that is causing the crash.
Before you call make sure you have the most rec... |
26,729,131 | I am making a demo to understand back stack and activity life-cycle.
I made:
* MainActivity
* MainActivityDialog (another activity theme as dialog)
* BActivity
I launched this app and Main Activity is shown. Then press a button to show the dialog, then MainActivityDialog is opened. Then I again press button on MainA... | 2014/11/04 | [
"https://Stackoverflow.com/questions/26729131",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2558284/"
] | The order of calls to `onStop()` and `onDestroy()` on multiple activities is indeterminate.
If you have multiple activities in your activity stack that are no longer visible on screen, Android may call `onStop()` on them whenever it wants to and in whatever order it wants to. This is only an indication to the activity... | Im not a pro at Android, but since nobody has answered yet, i will try my best. I want to help because i also learn android by doing something like you did (using log cat to see activiti's current state) for the first time.
>
> Why MainActivity get stopped after launching BActivity from
> MainActivityDialog?
>
>
>... |
59,493,625 | This code is part of a class module.
```
Private pImg As Image 'For example, pImg = U_Cursor.Img
Public Property Let ItemID(ID As Byte)
pImg.Picture = LoadPicture(ThisWorkbook.Path & "\Images\Img" & ID & ".gif")
*ParentUserform*.Repaint 'ParentUserform is the userform I'm looking for
End Property
```
I hav... | 2019/12/26 | [
"https://Stackoverflow.com/questions/59493625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12603289/"
] | Yes, in general it can.
First of all the operations that are customizable through the template arguments and that `std::accumulate` must perform can throw.
But even aside from that the standard does allow an implementation to throw implementation-defined exceptions if a standard library function does not have a non-t... | There are preconditions on `std::accumulate()`, e.g., that the end of the range is reachable from the begin of the range. So far the standard library hasn’t put `noexcept` on functions with preconditions (at least, not in general; there may be special cases) as a debugging implementation could assert that there is a pr... |
18,150,531 | I'm writing tests for my Node.js/Express/Mongoose project using Mocha and Should.js, and I'm testing out my functions that access my MongoDB. I'm want these tests to be completely independent from the actual records in my database, so I want to create an entry and then load it, and do all my tests on it, then delete it... | 2013/08/09 | [
"https://Stackoverflow.com/questions/18150531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653538/"
] | Use what is known as a `promise`
You can read more about it **[here](http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx)**.
There are lots of great libraries that can do this for you.
**[Q.js](https://github.com/kriskowal/q)** is one I personally like and it's wid... | This is definitely the kind of thing you want a callback for. Barring that, you're going to have to write some kind of callback wrapper that polls the database to determine when it has finished creating the relevant records, and then emits an event or does some other async thing to allow the test to continue. |
18,150,531 | I'm writing tests for my Node.js/Express/Mongoose project using Mocha and Should.js, and I'm testing out my functions that access my MongoDB. I'm want these tests to be completely independent from the actual records in my database, so I want to create an entry and then load it, and do all my tests on it, then delete it... | 2013/08/09 | [
"https://Stackoverflow.com/questions/18150531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653538/"
] | Use what is known as a `promise`
You can read more about it **[here](http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx)**.
There are lots of great libraries that can do this for you.
**[Q.js](https://github.com/kriskowal/q)** is one I personally like and it's wid... | Since the only native way to do asynchronous things are: `setTimeout`, `setInterval` and `addEventListener`, and they all take a callback you will eventually have to use a callback somewhere.
However, you can hide that by using Promises/A, also known as Deferreds.
Your code could look like this:
```
db.create_entry(... |
18,150,531 | I'm writing tests for my Node.js/Express/Mongoose project using Mocha and Should.js, and I'm testing out my functions that access my MongoDB. I'm want these tests to be completely independent from the actual records in my database, so I want to create an entry and then load it, and do all my tests on it, then delete it... | 2013/08/09 | [
"https://Stackoverflow.com/questions/18150531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653538/"
] | Use what is known as a `promise`
You can read more about it **[here](http://blogs.msdn.com/b/ie/archive/2011/09/11/asynchronous-programming-in-javascript-with-promises.aspx)**.
There are lots of great libraries that can do this for you.
**[Q.js](https://github.com/kriskowal/q)** is one I personally like and it's wid... | I found a solution that works. What I did was to add a callback to my function (`next`) and only call it if it's specified (i.e., for the tests):
```
//more stuff above
article.save(function(err){
if (!err) {
console.log(req.user.username + ' wrote ' + article.slug)
return next() || res.redirect('/... |
18,150,531 | I'm writing tests for my Node.js/Express/Mongoose project using Mocha and Should.js, and I'm testing out my functions that access my MongoDB. I'm want these tests to be completely independent from the actual records in my database, so I want to create an entry and then load it, and do all my tests on it, then delete it... | 2013/08/09 | [
"https://Stackoverflow.com/questions/18150531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653538/"
] | This is definitely the kind of thing you want a callback for. Barring that, you're going to have to write some kind of callback wrapper that polls the database to determine when it has finished creating the relevant records, and then emits an event or does some other async thing to allow the test to continue. | Since the only native way to do asynchronous things are: `setTimeout`, `setInterval` and `addEventListener`, and they all take a callback you will eventually have to use a callback somewhere.
However, you can hide that by using Promises/A, also known as Deferreds.
Your code could look like this:
```
db.create_entry(... |
18,150,531 | I'm writing tests for my Node.js/Express/Mongoose project using Mocha and Should.js, and I'm testing out my functions that access my MongoDB. I'm want these tests to be completely independent from the actual records in my database, so I want to create an entry and then load it, and do all my tests on it, then delete it... | 2013/08/09 | [
"https://Stackoverflow.com/questions/18150531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2653538/"
] | This is definitely the kind of thing you want a callback for. Barring that, you're going to have to write some kind of callback wrapper that polls the database to determine when it has finished creating the relevant records, and then emits an event or does some other async thing to allow the test to continue. | I found a solution that works. What I did was to add a callback to my function (`next`) and only call it if it's specified (i.e., for the tests):
```
//more stuff above
article.save(function(err){
if (!err) {
console.log(req.user.username + ' wrote ' + article.slug)
return next() || res.redirect('/... |
82,996 | A nightmare is あくむ, which in kanji seems straightforward: 悪夢 (bad dream); however, "to have a nightmare" is うなされる, which has its own special kanji, 魘, which apparently is a verb since it's followed by sareru.
Is there overlap between these two expressions for "nightmare", 悪夢 and 魘? Can 悪夢 be turned into a verb to have... | 2020/12/08 | [
"https://japanese.stackexchange.com/questions/82996",
"https://japanese.stackexchange.com",
"https://japanese.stackexchange.com/users/34142/"
] | >
> Can 悪夢 be turned into a verb to have the same meaning as うなされる, or is this unnatural?
>
>
>
In short, "no".
There is no verb form for 悪夢. The closest I can think of is 悪夢【あくむ】を見【み】る (literally "to see a bad dream").
Meanwhile, 魘【うな】される means "to groan in one's sleep as if in anguish". It doesn't actually hav... | うなされる just means "to suffer (and make noise or sleep-talk while sleeping)". Its cause (marked with に) is typically a nightmare, but it can be something else like high fever ([熱にうなされる](https://www.weblio.jp/content/%E7%86%B1%E3%81%AB%E3%81%86%E3%81%AA%E3%81%95%E3%82%8C%E3%82%8B)). There is nothing redundant about saying... |
26,422,598 | I am trying to upgrade my system from Openlayers 2 to Openlayers 3 and I have having one particular issue that I cannot seem to figure out.
My application has a grid and a map and when a user clicks on the grid I want to select the relevant point on the map.
In Openlayers 2 I used the following:
```
self.selectContr... | 2014/10/17 | [
"https://Stackoverflow.com/questions/26422598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/227466/"
] | To do this you need to do the following:
```
mySelectControl.getFeatures().clear() -> removes the selected items
mySelectControl.getFeatures().push(featureToSelect) -> selects the applied feature
``` | 1. Add a select interaction to your map.
```
var selectInteraction = new ol.interaction.Select();
map.addInteraction(selectInteraction);
```
2. Add any features you want to select to the select interaction's feature array.
```
selectInteractions.getFeatures().push(featureToSelect);
``` |
26,422,598 | I am trying to upgrade my system from Openlayers 2 to Openlayers 3 and I have having one particular issue that I cannot seem to figure out.
My application has a grid and a map and when a user clicks on the grid I want to select the relevant point on the map.
In Openlayers 2 I used the following:
```
self.selectContr... | 2014/10/17 | [
"https://Stackoverflow.com/questions/26422598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/227466/"
] | To do this you need to do the following:
```
mySelectControl.getFeatures().clear() -> removes the selected items
mySelectControl.getFeatures().push(featureToSelect) -> selects the applied feature
``` | ```
var selectInteraction = new ol.interaction.Select(});
map.addInteraction(selectInteraction);
function highlightFeature(feat){
selectInteraction.getFeatures().push(feat);
selectInteraction.dispatchEvent({
type: 'select',
selected: [feat],
deselected: []
});
}
```
works like a char on l... |
26,422,598 | I am trying to upgrade my system from Openlayers 2 to Openlayers 3 and I have having one particular issue that I cannot seem to figure out.
My application has a grid and a map and when a user clicks on the grid I want to select the relevant point on the map.
In Openlayers 2 I used the following:
```
self.selectContr... | 2014/10/17 | [
"https://Stackoverflow.com/questions/26422598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/227466/"
] | ```
var selectInteraction = new ol.interaction.Select(});
map.addInteraction(selectInteraction);
function highlightFeature(feat){
selectInteraction.getFeatures().push(feat);
selectInteraction.dispatchEvent({
type: 'select',
selected: [feat],
deselected: []
});
}
```
works like a char on l... | 1. Add a select interaction to your map.
```
var selectInteraction = new ol.interaction.Select();
map.addInteraction(selectInteraction);
```
2. Add any features you want to select to the select interaction's feature array.
```
selectInteractions.getFeatures().push(featureToSelect);
``` |
10,076,086 | I have a micropost/commenting system and each time a new micropost or comment is submitted the page refreshes in order to display it.
Since I've setup up ajax on my form I'd now like to have the micropost or added without the page refreshing.
So far I have:
```
if @micropost.save
format.js { render :post_on_wall... | 2012/04/09 | [
"https://Stackoverflow.com/questions/10076086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/439688/"
] | Based upon the assumptions that you
1. want posts ordered in descending chronological order
2. would like to minimize the amount of data you have to return for an update
I would recommend that you upon successful submission of a post, you initiate an AJAX call to the server to get all posts more recent than the last... | To answer the title question "Can JQuery detect new classes as they appear?": No.
There are events that fire when new elements are added to a page (`DOMNodeInsertedIntoDocument`), but thats absolutely inefficient (and deprecated).
Better fire a custom event with jQuery's [`.trigger()`](http://api.jquery.com/trigger/)... |
111,352 | I am new to material design and still learning.
Is it a good idea to have the primary color and the accent from similar palettes, e.g Blue 500 and Light Blue A200? Or is the whole idea of the primary/accent to create enough contrast and you should be using colors that are really different? | 2018/07/04 | [
"https://graphicdesign.stackexchange.com/questions/111352",
"https://graphicdesign.stackexchange.com",
"https://graphicdesign.stackexchange.com/users/-1/"
] | I am not sure about the material rules behind accent colours but as a digital designer I prefer to subscribe to a mix of brand, aesthetics and colour theory.
I start with the clients brand colours and work out how they appear on screen. Look at contrasts and complimentaries. Each have their place in the usability. I c... | I think doing like you said you are not following the right guidelines of the material design.
It's a good habit to use a primary and a secondary color and light and dark variants for each color that often are not more than two.
You can find more accurate answer [here](https://material.io/design/material-theming/overvi... |
53,915,295 | >
> excepted output : 1/4,1/2,3/4,1,5/4,3/2
> but my output is coming as in the decimal form . Please help how to print in the form of fraction only.
>
>
>
```
import java.util.*;
public class Hello {
public static void main(String[] args) {
//Your Code Here
Scanner s=new Scanner(System.in);
int n=s.... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53915295",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10242614/"
] | ```
public class NewClass {
public static void main(String[] args) {
System.out.println(convertype(0.75));
}
public static String convertype(double decimal){
int digitsAfterPoint = String.valueOf(decimal).length() - String.valueOf(decimal).indexOf('.')+1; // get the count of digits after the ... | Wrote a method where you can convert double numbers to fraction. Use this to convert it and print as below,
```
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
double d=1/4.0,sum=0;
for(int ... |
53,915,295 | >
> excepted output : 1/4,1/2,3/4,1,5/4,3/2
> but my output is coming as in the decimal form . Please help how to print in the form of fraction only.
>
>
>
```
import java.util.*;
public class Hello {
public static void main(String[] args) {
//Your Code Here
Scanner s=new Scanner(System.in);
int n=s.... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53915295",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10242614/"
] | take input in form of string so it will take input in required format and split it by "/" i.e someString.spit("/").
after that make one for loop and take two number and in two different variable store it.
and then take division for both and print it by using "/" in between them. | Wrote a method where you can convert double numbers to fraction. Use this to convert it and print as below,
```
import java.util.Scanner;
public class test {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
double d=1/4.0,sum=0;
for(int ... |
53,915,295 | >
> excepted output : 1/4,1/2,3/4,1,5/4,3/2
> but my output is coming as in the decimal form . Please help how to print in the form of fraction only.
>
>
>
```
import java.util.*;
public class Hello {
public static void main(String[] args) {
//Your Code Here
Scanner s=new Scanner(System.in);
int n=s.... | 2018/12/24 | [
"https://Stackoverflow.com/questions/53915295",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10242614/"
] | take input in form of string so it will take input in required format and split it by "/" i.e someString.spit("/").
after that make one for loop and take two number and in two different variable store it.
and then take division for both and print it by using "/" in between them. | ```
public class NewClass {
public static void main(String[] args) {
System.out.println(convertype(0.75));
}
public static String convertype(double decimal){
int digitsAfterPoint = String.valueOf(decimal).length() - String.valueOf(decimal).indexOf('.')+1; // get the count of digits after the ... |
14,161,826 | Related to Java and MySQL:
After I press the button and check my database, the row with ID 25 is still there. Why?
In QueryManager.java everything is set and working with the database.
This is in QueryManager.java:
```
public void removeGebruiker() {
String query;
query = "delete from gebruiker where ... | 2013/01/04 | [
"https://Stackoverflow.com/questions/14161826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/750200/"
] | You just construct a `String` and never execute the query that it contains.
In here:
```
String query;
query = "delete from gebruiker where gebruiker_ID = '25'";
```
Make sure you actually execute the query.
If the code really uses this [QueryManager](http://outfit4you2.googlecode.com/svn-history/r3/outfit4you2/sr... | without quotes around 25
```
delete from gebruiker where gebruiker_ID = 25
``` |
14,161,826 | Related to Java and MySQL:
After I press the button and check my database, the row with ID 25 is still there. Why?
In QueryManager.java everything is set and working with the database.
This is in QueryManager.java:
```
public void removeGebruiker() {
String query;
query = "delete from gebruiker where ... | 2013/01/04 | [
"https://Stackoverflow.com/questions/14161826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/750200/"
] | You just construct a `String` and never execute the query that it contains.
In here:
```
String query;
query = "delete from gebruiker where gebruiker_ID = '25'";
```
Make sure you actually execute the query.
If the code really uses this [QueryManager](http://outfit4you2.googlecode.com/svn-history/r3/outfit4you2/sr... | you need to execute the query
try this link <http://www.roseindia.net/jsp/execute-sql-query.shtml> |
41,661,102 | For example, if I have a class like this:
```
class Widget {
public:
virtual void Init(); // In this function, call some virtual function
// to construct the object
void Paint(); // Deprecated, use paintWidget instead
void PaintWidget(); // A new implementation of paint
... ... | 2017/01/15 | [
"https://Stackoverflow.com/questions/41661102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4862058/"
] | Part 1 of your question:
------------------------
No, there is no good way of giving a custom message on using a private method. What I would do is to make sure that you only have a public API which forwards to the private implementation. This can be done via some pimple pattern or by creating a facade.
As you did no... | You can use **#warning** directive, most of the widespread compilers (GCC, VC, Intels and Mac), support #warning message.
```
#warning "this is deprecated, use the Init() method instead"
```
A good practive is to not only show a warning (which people can ignore), but make the compiling fail, using the #error directi... |
50,027,138 | Let's say I have a simple trait called Constraint:
```
trait Constraint {
def description: String
def constraintValue: Int
def applyConstraint
}
```
... and two classes that extend this trait:
```
class ConstraintA(val constraintValue: Int) extends Constraint {
override def description: String = "CONSTR... | 2018/04/25 | [
"https://Stackoverflow.com/questions/50027138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6306927/"
] | The reason is that in your case `B` references (or as you will calls out to) `A`. There is no knowledge about `B` in `A`, so no arrow from A to B, but rather the other way around.
The UML entity diagram is not about who 'gets' what, but rather about who references/knows about who. | Well, that's the way UML had been designed. The arrow points to the general class. The special one inherits and adds/replaces functionality. |
50,601 | I created a block to generate a private message link to send a message to all the users of a group. I use the php code as the text format on the block body.
```
<?php
$group = og_context();
$og_id = $group->gid;
$query = db_select("og_membership", "ogm");
$query->condition("ogm.gid", $og_id, "=");
$query->fields("ogm... | 2012/11/15 | [
"https://drupal.stackexchange.com/questions/50601",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/5391/"
] | In this case, the problem is that [privatemsg\_get\_link()](http://drupalcontrib.org/api/drupal/contributions!privatemsg!privatemsg.module/function/privatemsg_get_link/7) uses `array()` as default value for `$account`, but then uses the following code.
```
if ($account == NULL) {
global $user;
$account = $us... | `privatemsg_get_link($recipients,$account = array(),$subject = NULL);` is not the proper way to call a function. You should be passing in values for $account and $subject, not using what the function defines as default values. Consider this:
```
<?php
$group = og_context();
$og_id = $group->gid;
... more code ...
gl... |
55,235,961 | How can I execute the onchange event handler on select when I change the option?
```js
document.getElementById('selct').value=2;
```
```html
<select id="selct" onchange="alert('change success')">
<option value="0">val1</option>
<option value="1">val2</option>
<option value="2">val3</option>
<option value=... | 2019/03/19 | [
"https://Stackoverflow.com/questions/55235961",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11224844/"
] | Changing `value` programmatically using Javascript doesn't fire [`change`](https://developer.mozilla.org/en-US/docs/Web/Events/change) event. To make it work you have to fire the event programmatically.
```
var sel = document.getElementById('selct');
sel.value=2;
sel.onchange();
```
```js
var sel = document.getEleme... | This work for me:
```
document.getElementById('selct').dispatchEvent(new Event('change'));
``` |
176,998 | [Mono 2.0 was just officially released](http://www.mono-project.com/Main_Page). What single feature do you think is the most important? | 2008/10/07 | [
"https://Stackoverflow.com/questions/176998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] | Windows.Forms is definitely way up there... that might be the feature I'm most excited about. And LINQ-to-XML should be good. I'm looking forward to more LINQ providers now that the LINQ core is available! :) | C# 3.0/LINQ |
176,998 | [Mono 2.0 was just officially released](http://www.mono-project.com/Main_Page). What single feature do you think is the most important? | 2008/10/07 | [
"https://Stackoverflow.com/questions/176998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] | C# 3.0/LINQ | The complete .NET 2.0 profile is quite of an accomplishment! |
176,998 | [Mono 2.0 was just officially released](http://www.mono-project.com/Main_Page). What single feature do you think is the most important? | 2008/10/07 | [
"https://Stackoverflow.com/questions/176998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] | Windows.Forms is definitely way up there... that might be the feature I'm most excited about. And LINQ-to-XML should be good. I'm looking forward to more LINQ providers now that the LINQ core is available! :) | Complete implementation of System.Windows.Forms |
176,998 | [Mono 2.0 was just officially released](http://www.mono-project.com/Main_Page). What single feature do you think is the most important? | 2008/10/07 | [
"https://Stackoverflow.com/questions/176998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] | Complete implementation of System.Windows.Forms | The complete .NET 2.0 profile is quite of an accomplishment! |
176,998 | [Mono 2.0 was just officially released](http://www.mono-project.com/Main_Page). What single feature do you think is the most important? | 2008/10/07 | [
"https://Stackoverflow.com/questions/176998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] | Windows.Forms is definitely way up there... that might be the feature I'm most excited about. And LINQ-to-XML should be good. I'm looking forward to more LINQ providers now that the LINQ core is available! :) | The complete .NET 2.0 profile is quite of an accomplishment! |
29,538 | I am running an IIS 6 FTP Server on a Windows Server 2003 computer (lets call it FTPPC), connected to a domain (lets call it DOMAIN).
Allow anonymous connections is off, so a user requires a domain account to connect to the ftp. The user connects to the ftp using DOMAIN\USERNAME
The root of the ftp is pointing at E:\... | 2009/06/22 | [
"https://serverfault.com/questions/29538",
"https://serverfault.com",
"https://serverfault.com/users/3515/"
] | This is indeed an odd one. I setup the config you describe with IIS running on a DC not a member server and the virtual directory configured to use the logged on user. This worked. Then I tried it with IIS running on a non-domain server, and it worked as well. Sadly IIS running on a domain member server is the one conf... | If you think about it your PC is passing a credential token to the FTP server as you are already domain authenticated. However the FTP server can't pass this token to the NODOMAINPC as it won't recognise the token (it doesn't recognise the domain controller as such).
I think the only option you have is that all users ... |
16,233,792 | I'm writing an application in Javascript. Without going into too much detail, I have a game with a board (which is actually just an HTML table). The user interacts with the board by clicking on s, so I have a click event listener in my $(document).ready(). The event handler updates the board by changing the state of se... | 2013/04/26 | [
"https://Stackoverflow.com/questions/16233792",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1542306/"
] | use on event delegation
```
$(document).on("click","td",function(){
movePiece($(this));
});
```
it is better if you delegate to the closest static parent container...
like
```
$('#tableID').on("click","td",function(){
movePiece($(this));
});
``` | ```
$("body").on("click", "td", function() {
movePiece($(this));
})
```
Use this to bind your dynamic event handler |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | The GPIO pins on the Raspberry Pi are not even close to being fast enough (maybe a couple of MHz vs several GHz required for PCI-E). You can however, check this out: <http://hackaday.com/2012/10/08/stm32-driving-a-pcie-video-card/>
This doesn't use the PCI-Express interface at all, but some Radeon GPUs have a 'debug b... | A few sites have tested the Pi's gpio speed and a quick search shows speeds on the order of hundreds of KHz. Not sure of the PCI 3 frequency off the top of my head but I believe each data line runs in the MHz range.
The low frequency of the GPIO coupled with the coding overhead for each pin it would be impossible to ... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | Your best bet would probably be to check whether a [PLX PCIe bridge](http://www.plxtech.com/products/expresslane/bridges) would be usable for this purpose.
It's highly likely that abandoning this idea of using a Raspberry Pi and instead using something that has a PCIe port built in instead will be vastly easier and ch... | A few sites have tested the Pi's gpio speed and a quick search shows speeds on the order of hundreds of KHz. Not sure of the PCI 3 frequency off the top of my head but I believe each data line runs in the MHz range.
The low frequency of the GPIO coupled with the coding overhead for each pin it would be impossible to ... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | If you want to hit the problem the hard way, you can bit bang the protocol with some external help.
There are several signals you need to mind: signals shared by all cards `SM_SCL`, `SM_SDA`, `PCIE_IRQ` and `PCIE_CLK`, as well as per-channel `PCIE_Rx` and `PCIE_Tx`.
Most PCI-E lines are differential signaling which s... | A few sites have tested the Pi's gpio speed and a quick search shows speeds on the order of hundreds of KHz. Not sure of the PCI 3 frequency off the top of my head but I believe each data line runs in the MHz range.
The low frequency of the GPIO coupled with the coding overhead for each pin it would be impossible to ... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | A few sites have tested the Pi's gpio speed and a quick search shows speeds on the order of hundreds of KHz. Not sure of the PCI 3 frequency off the top of my head but I believe each data line runs in the MHz range.
The low frequency of the GPIO coupled with the coding overhead for each pin it would be impossible to ... | If the Raspberry Pi has PCIe, then it is not exposed in a slot and it would require board modification which would be almost impossible for all but a very select few individuals without destroying it. Try the "lspci -vnnt" command and see if any devices are present. If PCIe is present, it is likely only there for the o... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | The GPIO pins on the Raspberry Pi are not even close to being fast enough (maybe a couple of MHz vs several GHz required for PCI-E). You can however, check this out: <http://hackaday.com/2012/10/08/stm32-driving-a-pcie-video-card/>
This doesn't use the PCI-Express interface at all, but some Radeon GPUs have a 'debug b... | If the Raspberry Pi has PCIe, then it is not exposed in a slot and it would require board modification which would be almost impossible for all but a very select few individuals without destroying it. Try the "lspci -vnnt" command and see if any devices are present. If PCIe is present, it is likely only there for the o... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | Your best bet would probably be to check whether a [PLX PCIe bridge](http://www.plxtech.com/products/expresslane/bridges) would be usable for this purpose.
It's highly likely that abandoning this idea of using a Raspberry Pi and instead using something that has a PCIe port built in instead will be vastly easier and ch... | If the Raspberry Pi has PCIe, then it is not exposed in a slot and it would require board modification which would be almost impossible for all but a very select few individuals without destroying it. Try the "lspci -vnnt" command and see if any devices are present. If PCIe is present, it is likely only there for the o... |
97,085 | I want to connect a PCIe 16x 3.0 GPU card to a Raspberry pi. I don't mind lo loose bandwidth, i just want to use the core GPU capabilities. So, the only idea that came out to my mind is to use the 26 GPIO RPi pins. I am concern about the GPIO/PCIe programing, do not have any idea neither an approach. Is this a crazy a ... | 2014/01/20 | [
"https://electronics.stackexchange.com/questions/97085",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/35845/"
] | If you want to hit the problem the hard way, you can bit bang the protocol with some external help.
There are several signals you need to mind: signals shared by all cards `SM_SCL`, `SM_SDA`, `PCIE_IRQ` and `PCIE_CLK`, as well as per-channel `PCIE_Rx` and `PCIE_Tx`.
Most PCI-E lines are differential signaling which s... | If the Raspberry Pi has PCIe, then it is not exposed in a slot and it would require board modification which would be almost impossible for all but a very select few individuals without destroying it. Try the "lspci -vnnt" command and see if any devices are present. If PCIe is present, it is likely only there for the o... |
30,743,524 | We have a situation where a transaction is started on an NHibernate session, some rows are populated into a couple of tables, and a query is executed which performs a join on the two tables.
Models:
```
public class A
{
public virtual string ID { get; set; } // Primary key
public IList<B> Bs { get; set; }
}
... | 2015/06/09 | [
"https://Stackoverflow.com/questions/30743524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4177806/"
] | The following works for me with jsdoc 3.3.3:
```
/**
* Example model.
*
* @module model/example
*/
module.exports = (function () {
/**
* Constructor function.
*
* @exports model/example.Example
* @constructor
* @param {string} id
*/
var example = function Example(id) {
... | I hate to answer my own question, but with a little more trial and error I got quite satisfactory results. Please feel free to comment if this is a correct approach, but the fact is the documentation is now properly generated :)
The key seems to be to use `@exports <modulename>.<classname>` before `@constructor` , thi... |
17,577,088 | I have the following rewrite rule in order to control my different international domains to redirect to the main domain.
```
RewriteCond %{HTTP_HOST} !^www..*
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} ^([^.]*).(ru|co.in|in|de|com.br|co.uk|ca|com|com/)
RewriteRule ^.*$ http://www.[percent]1.[percent]2[perce... | 2013/07/10 | [
"https://Stackoverflow.com/questions/17577088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413659/"
] | There are several issues with the pattern matching, but the problem is likely in the line matching your international TLDs. Here is the issue on each line:
1. The `.` is a wildcard so you are going to get a negative match on `www.domain.com` but also `wwwxxx.domain.com` with the `*` to match 0 or more of any character... | Thanks! This led me at the right direction in order to solve this issue. This is what I used to get it to work.
```
RewriteCond %{HTTP_HOST} !^www\.
RewriteCond %{HTTP_HOST} ^([^.]*?).(ru|in|de|com\.br|co\.uk|ca|com|com)$
RewriteRule ^.*$ http://www.%1.%2%{REQUEST_URI} [R=301,L]
``` |
11,441,083 | I have an ASP.NET project that I have created in Visual Studio 2010. So to begin the project, I got the generic "MY ASP.NET APPLICATION" page. I have since removed all that generic content and am building the application based off the needs of the user.
On my default.aspx page, I have a `datagrid` wrapped in an `Upda... | 2012/07/11 | [
"https://Stackoverflow.com/questions/11441083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/724269/"
] | Figured this out early this morning. Turns out it is just another gotcha when using Ajax. I wasn't adding a History Point before redirecting to a new page when the user selected a row in the datagrid. So i just needed to do a `AddHistoryPoint` on the `scriptmanager` before doing the redirect and all was well in the nei... | There are two things I would start with.
First, within the browser, I'd go to Internet Options > Browsing History Settings. If "check for newer versions of the stored pages" is set to Never then I'd move it over to Automatically.
Second, I'd look on the actual file system (not within visual studio, use file explorer)... |
3,569,687 | Following a reference from “Elementos de Topología general” by Angel Tamariz and Fidel Casarrubias.
>
> Let be $a\in\mathbb{R}\setminus\{0\}$ and we choose $\epsilon>0$. We define $\delta=\min\left\{\frac{|a|}2,\frac{\epsilon|a|^2}2\right\}$ and so we observe that if $y\in B(a,\delta)$, then
> $$
> \left|\frac{1}y-... | 2020/03/04 | [
"https://math.stackexchange.com/questions/3569687",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/736008/"
] | Since $\lvert y-a\rvert<\frac{\lvert a\rvert}2$, we have$$\lvert y\rvert\geqslant\bigl\lvert\lvert a\rvert-\lvert y-a\rvert\bigr\rvert=\lvert a\rvert-\lvert y-a\rvert>\frac{\lvert a\rvert}2.$$So$$\frac{\lvert y-a\rvert}{\lvert y\rvert\lvert a\rvert}<\frac{\lvert y-a\rvert}{\lvert a\rvert}\times\frac2{\lvert a\rvert}=\f... | $$ |a| = |y|\leq |a-y| < \delta < \frac{|a|}{2}$$
Thus
$$ |y| > \frac{|a|}{2}$$ |
49,708,939 | Developing an iOS application with Xcode ver 9.3, Swift.
Could you tell me how to show and hide(switch) the header in section of tableView by navigation bar button tapped?
* Search bar is put in header in section to make it always visible while scrolling tableview
* I would like to hide the search bar in the initial ... | 2018/04/07 | [
"https://Stackoverflow.com/questions/49708939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9172202/"
] | ```
var hideSearchBar = false // Class global var
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return hideSearchBar ? 0.1 : searchBarHeight
}
@IBAction func search(sender: UIBarButtonItem) {
hideSearchBar = !hideSearchBar
tableView.reloadData()
}
... | You could use `tableView:heightForHeaderInSection:` [Appledoc](https://developer.apple.com/documentation/uikit/uitableviewdelegate/1614855-tableview) from `UITableViewDelegate` method. As follows
```
override viewDidLoad() {
super.viewDidLoad()
yourBarButtonTapped = false
//rest of your code
}
func ta... |
49,708,939 | Developing an iOS application with Xcode ver 9.3, Swift.
Could you tell me how to show and hide(switch) the header in section of tableView by navigation bar button tapped?
* Search bar is put in header in section to make it always visible while scrolling tableview
* I would like to hide the search bar in the initial ... | 2018/04/07 | [
"https://Stackoverflow.com/questions/49708939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9172202/"
] | ```
var hideSearchBar = false // Class global var
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return hideSearchBar ? 0.1 : searchBarHeight
}
@IBAction func search(sender: UIBarButtonItem) {
hideSearchBar = !hideSearchBar
tableView.reloadData()
}
... | You can do this:
```
@objc func searchTapped() {
// If searchBar is hidden, then show a searchBar.
tableView.tableHeaderView = self.searchBar;
// If searchBar is shown, then hide a searchBar.
tableView.tableHeaderView = nil;
tableView.reloadData();
}
```
Or you could define:
```
override func ta... |
6,989,323 | I'm trying to print the host/ip to the screen. But, it's printing: "Resource id #2" instead. I'm using SSH2\_connection(). I read the doc page and know the the function parameters are host, port, methods ... but when I try fread($host), the host/ip is still not printing can someone give me some direction on this? Thank... | 2011/08/08 | [
"https://Stackoverflow.com/questions/6989323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/706808/"
] | You might be interested in checking out [pjscrape](http://nrabinowitz.github.com/pjscrape/) (disclaimer: this is my project). It's a command-line tool using [PhantomJS](http://code.google.com/p/phantomjs/) to allow scraping using JavaScript and jQuery in a full browser context - among other things, you can define a "re... | If the data are generated with javascript then the data are in the downloaded page.
Better is to directly parse them on the fly as you do with plain HTML or Text parsing.
If you cannot isolate tokens with jSoup API just parse them using direct String options, as a plain text. |
6,989,323 | I'm trying to print the host/ip to the screen. But, it's printing: "Resource id #2" instead. I'm using SSH2\_connection(). I read the doc page and know the the function parameters are host, port, methods ... but when I try fread($host), the host/ip is still not printing can someone give me some direction on this? Thank... | 2011/08/08 | [
"https://Stackoverflow.com/questions/6989323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/706808/"
] | You might be interested in checking out [pjscrape](http://nrabinowitz.github.com/pjscrape/) (disclaimer: this is my project). It's a command-line tool using [PhantomJS](http://code.google.com/p/phantomjs/) to allow scraping using JavaScript and jQuery in a full browser context - among other things, you can define a "re... | I tried using [htmlUnit](http://htmlunit.sourceforge.net/) however I found it very slow.
I ended up using the curl command line function within java which worked for my purposes.
```
String command = "curl "+url;
Process p = Runtime.getRuntime().exec(command);
BufferedReader stdInput = new BufferedReader(new InputSt... |
2,385,150 | I was looking for a way to detect the browser extension I am building from my website and I need to alert my users in-case they are viewing my site without it. I have been able to do this in firefox, but I want to know is there a way I can do this in Google Chrome? Even if there is a hack to get this going I am fine. | 2010/03/05 | [
"https://Stackoverflow.com/questions/2385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081973/"
] | If it is in a texture:
* set up orthographic frustum
* disable blending, depth test, etc.
* bind texture
* draw screen-aligned textured quad with correct texture coordinates
I use this in for example in [Compositor::\_drawPixels](http://www.equalizergraphics.com/cgi-bin/viewvc.cgi/trunk/src/lib/client/compositor.cpp?... | glDrawPixels can read from a Buffer Object. Just do a
```
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, XXX)
```
before calling glDrawPixels.
Caveat: glDrawPixels is deprecated... |
2,385,150 | I was looking for a way to detect the browser extension I am building from my website and I need to alert my users in-case they are viewing my site without it. I have been able to do this in firefox, but I want to know is there a way I can do this in Google Chrome? Even if there is a hack to get this going I am fine. | 2010/03/05 | [
"https://Stackoverflow.com/questions/2385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081973/"
] | If it is in a texture:
* set up orthographic frustum
* disable blending, depth test, etc.
* bind texture
* draw screen-aligned textured quad with correct texture coordinates
I use this in for example in [Compositor::\_drawPixels](http://www.equalizergraphics.com/cgi-bin/viewvc.cgi/trunk/src/lib/client/compositor.cpp?... | Use **glBlitFramebuffer**, which operates on frambuffer objects ([Link](http://www.opengl.org/wiki/Framebuffer_Objects)). Ans this is not *deprecated*.
You can take advantage of **format conversion**, **scaling** and **multisampling**. |
2,385,150 | I was looking for a way to detect the browser extension I am building from my website and I need to alert my users in-case they are viewing my site without it. I have been able to do this in firefox, but I want to know is there a way I can do this in Google Chrome? Even if there is a hack to get this going I am fine. | 2010/03/05 | [
"https://Stackoverflow.com/questions/2385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081973/"
] | Let's cover all the bases here.
First, a direct answer: yes, there is such a function. It's called `glDrawPixels`. I'm not kidding.
`glDrawPixels` can certainly read from GPU memory, provided that [you are using buffer objects as their source data](http://www.opengl.org/wiki/Pixel_Buffer_Object) (commonly called "pix... | If it is in a texture:
* set up orthographic frustum
* disable blending, depth test, etc.
* bind texture
* draw screen-aligned textured quad with correct texture coordinates
I use this in for example in [Compositor::\_drawPixels](http://www.equalizergraphics.com/cgi-bin/viewvc.cgi/trunk/src/lib/client/compositor.cpp?... |
2,385,150 | I was looking for a way to detect the browser extension I am building from my website and I need to alert my users in-case they are viewing my site without it. I have been able to do this in firefox, but I want to know is there a way I can do this in Google Chrome? Even if there is a hack to get this going I am fine. | 2010/03/05 | [
"https://Stackoverflow.com/questions/2385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081973/"
] | Let's cover all the bases here.
First, a direct answer: yes, there is such a function. It's called `glDrawPixels`. I'm not kidding.
`glDrawPixels` can certainly read from GPU memory, provided that [you are using buffer objects as their source data](http://www.opengl.org/wiki/Pixel_Buffer_Object) (commonly called "pix... | glDrawPixels can read from a Buffer Object. Just do a
```
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, XXX)
```
before calling glDrawPixels.
Caveat: glDrawPixels is deprecated... |
2,385,150 | I was looking for a way to detect the browser extension I am building from my website and I need to alert my users in-case they are viewing my site without it. I have been able to do this in firefox, but I want to know is there a way I can do this in Google Chrome? Even if there is a hack to get this going I am fine. | 2010/03/05 | [
"https://Stackoverflow.com/questions/2385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081973/"
] | Let's cover all the bases here.
First, a direct answer: yes, there is such a function. It's called `glDrawPixels`. I'm not kidding.
`glDrawPixels` can certainly read from GPU memory, provided that [you are using buffer objects as their source data](http://www.opengl.org/wiki/Pixel_Buffer_Object) (commonly called "pix... | Use **glBlitFramebuffer**, which operates on frambuffer objects ([Link](http://www.opengl.org/wiki/Framebuffer_Objects)). Ans this is not *deprecated*.
You can take advantage of **format conversion**, **scaling** and **multisampling**. |
97,708 | My web development server is in the Cloud and I am very new to Macs.
On Ubuntu and other flavors of Linux, I would mount the remote drives using sshfs. I have researched SSHFS for Mac and come up with **FUSE for OS x** and **MacFUSE**. I have them both installed but when I attempt to run *man sshfs* on my commandline ... | 2013/08/01 | [
"https://apple.stackexchange.com/questions/97708",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/54001/"
] | It looks like the software might not be installed the right way, or in the right place. On a Mac, the easiest way to install sshfs and fuse is with Homebrew.
1. Install Homebrew <http://brew.sh/>
2. `brew install sshfs`
This will install dependencies such as fuse4x. Read all the instructions that appear -- some of o... | If you have installed **Fuse for OSX** you will find the binary you are searching at `/Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static`.
You can use `ln -s [Path-like-above] [Your-favorit-bin-path]/sshfs` if you want to call it with `sshfs`.
If you get a `command not found` ... |
97,708 | My web development server is in the Cloud and I am very new to Macs.
On Ubuntu and other flavors of Linux, I would mount the remote drives using sshfs. I have researched SSHFS for Mac and come up with **FUSE for OS x** and **MacFUSE**. I have them both installed but when I attempt to run *man sshfs* on my commandline ... | 2013/08/01 | [
"https://apple.stackexchange.com/questions/97708",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/54001/"
] | First, you don't want to have both MacFUSE and FUSE for OS X (OSXFUSE) installed, OSXFUSE is a replacement for MacFUSE, which is no longer under active development.
OSXFUSE is not an application, it is a kernel extension and libraries that allow developers to easily write a file system that lives in user space rather... | If you have installed **Fuse for OSX** you will find the binary you are searching at `/Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static`.
You can use `ln -s [Path-like-above] [Your-favorit-bin-path]/sshfs` if you want to call it with `sshfs`.
If you get a `command not found` ... |
17,666 | ```
ldr r0, #0x28
```
What is the `ldr` instruction ? Does it load a string from some offset?
How can I find the string/value that is actually loaded ? | 2018/03/12 | [
"https://reverseengineering.stackexchange.com/questions/17666",
"https://reverseengineering.stackexchange.com",
"https://reverseengineering.stackexchange.com/users/23589/"
] | LDR loads a 32-bit constant (LDRH (halfword): 16 bit, LDRB (byte): 8 bit) from memory into the specified target register (r0 in your example).
Since 32-bit constants cannot be encoded in 32-bit opcodes (or 16-bit for Thumb instructions), the assembler stores the constant in the text segment close to the referencing in... | This can be simply translated into:
```
r0 = 0x28;
```
In ARM assembly, the `#` marks the immediate values and the `r0`, `r1`, ... are registers. The `ldr` instruction can take the following syntactic forms (yours is the first line):
```
LDR{type}{cond} Rt, [Rn {, #offset}] ; immediate offset
LDR{type}{cond} Rt, [R... |
17,666 | ```
ldr r0, #0x28
```
What is the `ldr` instruction ? Does it load a string from some offset?
How can I find the string/value that is actually loaded ? | 2018/03/12 | [
"https://reverseengineering.stackexchange.com/questions/17666",
"https://reverseengineering.stackexchange.com",
"https://reverseengineering.stackexchange.com/users/23589/"
] | LDR loads a 32-bit constant (LDRH (halfword): 16 bit, LDRB (byte): 8 bit) from memory into the specified target register (r0 in your example).
Since 32-bit constants cannot be encoded in 32-bit opcodes (or 16-bit for Thumb instructions), the assembler stores the constant in the text segment close to the referencing in... | **`ldr` without `=` does PC relative loads**
This is true for both labels and numbers.
But you will of course rarely use numbers directly in your assembly. Maybe you have provided some disassembly without labels?
Both of the following work in GNU GAS ARMv8. With a label:
```
ldr x0, pc_relative_ldr
b 1f
pc_... |
36,349,938 | My code is:
```
String num;
char n;
char repeat;
String input;
do {
Scanner keyboard = new Scanner(System.in);
Scanner in = new Scanner(System.in);
System.out.println("Enter a binary number: ");
num = in.nextLine();
n = num.charAt(0);
while (n != '1' && n != '0') {
System.out.println... | 2016/04/01 | [
"https://Stackoverflow.com/questions/36349938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6143593/"
] | ```
while (n != '1' && n != '0')
{
System.out.println("You did not enter a binary number..." +
"try again: ");
num = in.next();
n = num.charAt(0);
}
```
Do above. You are not updating `n` after getting into loop. | The basic problem is that the while loop condition checks `n`, but `n` is not changed in the loop, meaning that the condition's value never changes.
There is the additional problem that you need to check more than the first character - everything needs to be 0 or 1. Further, you need to ensure that there is a first ch... |
426,880 | I want to calculate the dipole potential in spherical coordinates. I know that the potential can be calculated with
$$ \phi = - \int \mathbf E \cdot\mathrm d\mathbf r,$$
but I don't know the electric field. I would say
$$ \mathbf E = \frac{1}{4 \pi \epsilon\_0 r^3} ( 3p\,\hat{\mathbf {r}} \cos(\theta) -\mathbf p) $$
... | 2018/09/05 | [
"https://physics.stackexchange.com/questions/426880",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/205683/"
] | The easiest derivation is probably to start with the potential, and then calculate the electric field as the gradient of that potential.
Consider a dipole at the origin aligned along the z-axis, with two point charges of charge $ \pm q $ positioned at $z = \pm\frac{a}{2}$. By symmetry, the potential will be independen... | [](https://i.stack.imgur.com/5YhJT.jpg)
see above is a dipole with electric dipole moment $\mathbf{\vec{p}}$
since you know potential due to dipole it means
$$\phi(r,\theta)=\dfrac { \mathbf{\vec{p}}\cdot\mathbf {\hat r}}{4\pi \epsilon\_{0}r^2}=\dfr... |
25,694,888 | I have few numbers which i wanted to show in tray icon... for that i need to convert those numbers into icon or any bitmap image ....need help is their any class or property in wpf c# to do so.. any method .. the method i tried is not working...
```
Font fnt = new Font("Tahoma", 8 );
fntheight += fnt.Height;
int maxhe... | 2014/09/05 | [
"https://Stackoverflow.com/questions/25694888",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2931180/"
] | First you need to add:
```
Using System.Drawing.Imaging;
using System.Windows.Interop;
```
To convert text to Bitmap:
```
public Bitmap TextToBitmap(string txt, string fontname, int fontsize, Color bgcolor, Color fcolor, int Width, int Height)
{
Bitmap bmp = new Bitmap(Width, Height);
using (Gra... | @MikMagic You can convert from System.Drawing.Bitmap to System.Windows.Media.Image via BitmapSource object.
See [this Code Project's article](http://www.codeproject.com/Articles/104929/Bitmap-to-BitmapSource) and [this MSDN document](http://msdn.microsoft.com/en-us/library/ms748873.aspx). |
21,084,470 | Hello I am new to rails.
I am working with an existing postgres db. I would like to create CRUD for all of the tables.
I've started with:
rails g scaffold firstTableName
Then I start rails:
rails s
When I navigate to localhost:3000/firstTableName, rails gives the following error:
Migrations are pending; run 'bin/rake... | 2014/01/13 | [
"https://Stackoverflow.com/questions/21084470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1344643/"
] | the error is because you already have the table firstTableName is already present and as you did scaffold, it will create the model, controller and view for you, so it has also create the migration for the firstTableName.
If you already have the migration in place try skipping the migration while scaffolding
>
> ra... | Your database should have a table named `schema_migrations` with only one column `version`. Then you should write all migration versions into that table by hands.
Migrations placed in `project_root/db/migrate/`, and the вшпшеы in the file name is the same as version migration. |
21,084,470 | Hello I am new to rails.
I am working with an existing postgres db. I would like to create CRUD for all of the tables.
I've started with:
rails g scaffold firstTableName
Then I start rails:
rails s
When I navigate to localhost:3000/firstTableName, rails gives the following error:
Migrations are pending; run 'bin/rake... | 2014/01/13 | [
"https://Stackoverflow.com/questions/21084470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1344643/"
] | the error is because you already have the table firstTableName is already present and as you did scaffold, it will create the model, controller and view for you, so it has also create the migration for the firstTableName.
If you already have the migration in place try skipping the migration while scaffolding
>
> ra... | When you run migrations rails keeps track of these by matching each migration in db/migrate folder with an entry in schema\_migrations table that includes timestamp for all the migrations that rails has already run for that environment in versions column.
Reason is to allow you to migrate incrementally.
Earlier versi... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | An idea on why learning proofs (not just theorems) is important: One could say that it is unimportant to know how to prepare food because there is a McDonald's down the street. But, if a person becomes strictly reliant on McDonald's for preparing food, then we can be assured that (s)he will never be able to produce a (... | I'm sure I could write more about why proofs are important, but I believe it all boils down to this. Proofs are important because some very intuitive results turn out to be false, and if we just accept results with no proof because something 'sounds correct', then we could be led down false pathways. Who knows what hor... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | I think the dislike for proofs, and the belief that they must not be important, comes from two misconceptions:
1. That proofs are all two-column proofs.
2. We prove things to find out if they are true.
The first is blatantly false. Most proofs are paragraph proofs, and don't have to show every tiny little step. No on... | I'm sure I could write more about why proofs are important, but I believe it all boils down to this. Proofs are important because some very intuitive results turn out to be false, and if we just accept results with no proof because something 'sounds correct', then we could be led down false pathways. Who knows what hor... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | In my opinion, they're not important. But let me qualify that in a massive way.
Suppose we're interested in solving some particular real-life problem. We're going to make some "let" statements. Like maybe we've got $(x,y) \in \mathbb{R} \times \mathbb{R}$. And to solve the problem, we're going to let $(r,\theta)$ sati... | I'm sure I could write more about why proofs are important, but I believe it all boils down to this. Proofs are important because some very intuitive results turn out to be false, and if we just accept results with no proof because something 'sounds correct', then we could be led down false pathways. Who knows what hor... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | An idea on why learning proofs (not just theorems) is important: One could say that it is unimportant to know how to prepare food because there is a McDonald's down the street. But, if a person becomes strictly reliant on McDonald's for preparing food, then we can be assured that (s)he will never be able to produce a (... | Proofs are important because they tell you why the theorem is true: no amount of practical experience with the use of some helpful formula can ever explain its existence, and this renders mathematics just a bland narrative of assertions to be judged on the merit of their applicability to one's occasional interests. To ... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | An idea on why learning proofs (not just theorems) is important: One could say that it is unimportant to know how to prepare food because there is a McDonald's down the street. But, if a person becomes strictly reliant on McDonald's for preparing food, then we can be assured that (s)he will never be able to produce a (... | One approach would be to give an example of a theorem that sounds so absurd that noone in his right mind would accept it without proof. For example, mention the Banach-Tarski result to the effect that the unit ball can be decomposed into 5 parts which can then be reassembled by rigid motions into... two unit balls.
An... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | I think the dislike for proofs, and the belief that they must not be important, comes from two misconceptions:
1. That proofs are all two-column proofs.
2. We prove things to find out if they are true.
The first is blatantly false. Most proofs are paragraph proofs, and don't have to show every tiny little step. No on... | Proofs are important because they tell you why the theorem is true: no amount of practical experience with the use of some helpful formula can ever explain its existence, and this renders mathematics just a bland narrative of assertions to be judged on the merit of their applicability to one's occasional interests. To ... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | I think the dislike for proofs, and the belief that they must not be important, comes from two misconceptions:
1. That proofs are all two-column proofs.
2. We prove things to find out if they are true.
The first is blatantly false. Most proofs are paragraph proofs, and don't have to show every tiny little step. No on... | One approach would be to give an example of a theorem that sounds so absurd that noone in his right mind would accept it without proof. For example, mention the Banach-Tarski result to the effect that the unit ball can be decomposed into 5 parts which can then be reassembled by rigid motions into... two unit balls.
An... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | In my opinion, they're not important. But let me qualify that in a massive way.
Suppose we're interested in solving some particular real-life problem. We're going to make some "let" statements. Like maybe we've got $(x,y) \in \mathbb{R} \times \mathbb{R}$. And to solve the problem, we're going to let $(r,\theta)$ sati... | Proofs are important because they tell you why the theorem is true: no amount of practical experience with the use of some helpful formula can ever explain its existence, and this renders mathematics just a bland narrative of assertions to be judged on the merit of their applicability to one's occasional interests. To ... |
600,800 | I don't know if this is the right place to post this or not, but I will go ahead anyway (sorry if it ain't the right place)
Yesterday I was discussing a particular theorem of geometry with my brother which he just learnt in the school. I had asked him if he knew the proof for it, he replied saying his teacher has said... | 2013/12/10 | [
"https://math.stackexchange.com/questions/600800",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/5548/"
] | In my opinion, they're not important. But let me qualify that in a massive way.
Suppose we're interested in solving some particular real-life problem. We're going to make some "let" statements. Like maybe we've got $(x,y) \in \mathbb{R} \times \mathbb{R}$. And to solve the problem, we're going to let $(r,\theta)$ sati... | One approach would be to give an example of a theorem that sounds so absurd that noone in his right mind would accept it without proof. For example, mention the Banach-Tarski result to the effect that the unit ball can be decomposed into 5 parts which can then be reassembled by rigid motions into... two unit balls.
An... |
45,353,828 | Currently I have a setup where an API Gateway accepts a `.wav` file from a POST request and sends the `base64` encoded data from the audio file to a lambda function that I have as the handler using their Binary Support system.
I need to convert that base64 encoding of the audio file from the gateway back into a `.wav`... | 2017/07/27 | [
"https://Stackoverflow.com/questions/45353828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5270744/"
] | There are mainly two [limitations](http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html) you need to look into when using API Gateway and Lambda for your use case.
* Maximum size of the audio file is 10MB
* If you need to store the file for processing in /tmp you can hold upto 512MB
Therefore mostl... | As long as your file is less than 512MB, you can write files to `/tmp` in a Lambda. |
45,353,828 | Currently I have a setup where an API Gateway accepts a `.wav` file from a POST request and sends the `base64` encoded data from the audio file to a lambda function that I have as the handler using their Binary Support system.
I need to convert that base64 encoding of the audio file from the gateway back into a `.wav`... | 2017/07/27 | [
"https://Stackoverflow.com/questions/45353828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5270744/"
] | Figure out the issue for anyone curious.
When API Gateway encodes the body of the request with their Binary Support system, they also encode the `WebKitBoundary` heading and tail data from the body if it exists.
It just cut out the front and tail of the encoding pertaining to that data so all that remained was strict... | As long as your file is less than 512MB, you can write files to `/tmp` in a Lambda. |
45,353,828 | Currently I have a setup where an API Gateway accepts a `.wav` file from a POST request and sends the `base64` encoded data from the audio file to a lambda function that I have as the handler using their Binary Support system.
I need to convert that base64 encoding of the audio file from the gateway back into a `.wav`... | 2017/07/27 | [
"https://Stackoverflow.com/questions/45353828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5270744/"
] | There are mainly two [limitations](http://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html) you need to look into when using API Gateway and Lambda for your use case.
* Maximum size of the audio file is 10MB
* If you need to store the file for processing in /tmp you can hold upto 512MB
Therefore mostl... | Figure out the issue for anyone curious.
When API Gateway encodes the body of the request with their Binary Support system, they also encode the `WebKitBoundary` heading and tail data from the body if it exists.
It just cut out the front and tail of the encoding pertaining to that data so all that remained was strict... |
29,927,205 | This is my code. I want to read the data from "data.txt" and convert it to type `float`, but there is a problem converting the data. The error says " could not convert string to float: ".
```
def CrearMatriz():
archi = open("data.txt", "r")
num = archi.readlines()
for lines in num:
nums= [float(x)... | 2015/04/28 | [
"https://Stackoverflow.com/questions/29927205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4799712/"
] | The only way I can reproduce this is by having a blank line at the end of the file. So my data file looks like this:
```
12.34 , 56.78 , 90.12 , 34.56
```
There's a blank line after it, but I can't display that! So here it is in another format:
```
od -xc data.txt
0000000 3231 332e 2034 202c 3635 ... | I'm interested in the type of
```
lines.strip().split(",")
```
It seems to me that strip() should work on a string, but lines would be a list of strings. You might need a double comprehension, something like:
```
[[float(x) for x in line.strip().split(",")] for line in lines]
```
Without your data, I can't verif... |
29,927,205 | This is my code. I want to read the data from "data.txt" and convert it to type `float`, but there is a problem converting the data. The error says " could not convert string to float: ".
```
def CrearMatriz():
archi = open("data.txt", "r")
num = archi.readlines()
for lines in num:
nums= [float(x)... | 2015/04/28 | [
"https://Stackoverflow.com/questions/29927205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4799712/"
] | I am not saying it's the perfect answer, but I suggest you do your parsing outside of the list comprehension proper and append to nums on success, at least until your formatting fixes everything.
From looking at the errors I am getting, one possibility is that it looks like lines.strip() doesn't account for blank line... | I'm interested in the type of
```
lines.strip().split(",")
```
It seems to me that strip() should work on a string, but lines would be a list of strings. You might need a double comprehension, something like:
```
[[float(x) for x in line.strip().split(",")] for line in lines]
```
Without your data, I can't verif... |
57,406,656 | I am trying to get some data from Annotations:
```
Annotations: deployment.kubernetes.io/revision: 1
kubernetes.io/change-cause:
Branch=master-9eb8251 Message=Revert "ON-1796 Re-write the cart GET for edit cart (#1256)" (#1284)
Thi... | 2019/08/08 | [
"https://Stackoverflow.com/questions/57406656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9604842/"
] | You may extract the value after `Branch=` using:
```
String s = 'Annotations: deployment.kubernetes.io/revision: 1 kubernetes.io/change-cause: Branch=master-9eb8251 Message=Revert "ON-1796 Re-write the cart GET for edit cart (#1256)" (#1284) This reverts commit 27e600f83ecd98923713e2996d0aeea0da2df8fa. Author=Gautam P... | you can use this to remove version tag from your branch :
```
import java.util.regex.Pattern
import java.util.regex.Matcher
paragraph = 'Annotations: deployment.kubernetes.io/revision: 1 kubernetes.io/change-cause: Branch=master-9eb8251 Message=Revert "ON-1796... |
69,537,349 | `jq -r '."@graph"[]["rdfs:label"]' 9.0/schemaorg-all-http.jsonld` works but `jq -r '."@graph"[].["rdfs:label"]' 9.0/schemaorg-all-http.jsonld` does not and I don't understand why `.["rdfs:label"]` does *not* need the dot. <https://stackoverflow.com/a/39798796/308851> suggests it needs `.name` after `[]` and <https://st... | 2021/10/12 | [
"https://Stackoverflow.com/questions/69537349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/308851/"
] | I think i'm going nuts, i just tried again with `App\Models\Device` and got the error, re-changed it to `app\Models\Device` and got the error again and finally re-re-changed it to `App\Models\Device` and now it works...... have no idea why or how... | Try to import it like so `use App\Models\Device;` instead of `use app\Models\Device;`
See this [link also](https://stackoverflow.com/questions/28350232/laravel-model-class-not-found) |
56,558,834 | I'm trying to apply `padding-bottom:90px;` so I can move [Tweets by @StackOverflow](https://i.stack.imgur.com/vWIF3.png) (The whole tweets area) down the page.
*I.e. further down, with the above padding, however, this is not working for me, how would I achieve this?*
I don't want to use line breaks tags `<br>`, howe... | 2019/06/12 | [
"https://Stackoverflow.com/questions/56558834",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9543096/"
] | Just change:-
```
.twitterwrapper{
padding-top:90px;
background-color: lightblue;
}
``` | Either add padding-top or negative margin, since there is no content in the code you provided, I can't imagine what exactly you're trying to achive. If you want to make "an ad" use margin and position to achive your expected results. |
23,435,391 | Why when I am using javascript the basic HTML inputs validation not performed?
Say the min max attributes.
Here the HTML:
```
<form action="#" method="get">Quantity (between 1 and 5):
<input type="number" name="quantity" min="1" max="5">
<br />
<input type="submit" value="with HTML">
</form>
<button id... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23435391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1725836/"
] | MySQL is probably already doing what you describe, as much as it can.
In the case of InnoDB (which should be your default storage engine with MySQL), inserts and updates and deletes change primary key or unique key indexes immediately. But they never rebuild the *whole* index, they add new values into (or take values ... | MySQL doesn't "rebuild" the index after every insert. MySQL inserts one or more rows into an existing index.
MySQL has lots of unusual options, and I don't know all of them. I would be surprised if there were an option that said: "Oh, let the index on the table be out of synch with the data in the table." Doesn't soun... |
23,435,391 | Why when I am using javascript the basic HTML inputs validation not performed?
Say the min max attributes.
Here the HTML:
```
<form action="#" method="get">Quantity (between 1 and 5):
<input type="number" name="quantity" min="1" max="5">
<br />
<input type="submit" value="with HTML">
</form>
<button id... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23435391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1725836/"
] | MySQL doesn't "rebuild" the index after every insert. MySQL inserts one or more rows into an existing index.
MySQL has lots of unusual options, and I don't know all of them. I would be surprised if there were an option that said: "Oh, let the index on the table be out of synch with the data in the table." Doesn't soun... | Note that MariaDB, which you are probably using if you apt install mysql on a modern system, removed the buffering mentioned in the accepted answer.
>
> The change buffer has been disabled by default [in updates to] MariaDB 10.5, 10.6, 10.7, and 10.8, and the feature is deprecated and ignored from MariaDB 10.9.0.
>... |
23,435,391 | Why when I am using javascript the basic HTML inputs validation not performed?
Say the min max attributes.
Here the HTML:
```
<form action="#" method="get">Quantity (between 1 and 5):
<input type="number" name="quantity" min="1" max="5">
<br />
<input type="submit" value="with HTML">
</form>
<button id... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23435391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1725836/"
] | MySQL is probably already doing what you describe, as much as it can.
In the case of InnoDB (which should be your default storage engine with MySQL), inserts and updates and deletes change primary key or unique key indexes immediately. But they never rebuild the *whole* index, they add new values into (or take values ... | >
> When MySQL updates the index due to an insert, does it rebuild the
> entire index?
>
>
>
No, MySQL doesn't "rebuild" the index on each insert.
MySQL's default page size is 16K. It allocates these pages in 1MB increments (called extents).
When a table is first created (indexes are rebuilt), the pages are fil... |
23,435,391 | Why when I am using javascript the basic HTML inputs validation not performed?
Say the min max attributes.
Here the HTML:
```
<form action="#" method="get">Quantity (between 1 and 5):
<input type="number" name="quantity" min="1" max="5">
<br />
<input type="submit" value="with HTML">
</form>
<button id... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23435391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1725836/"
] | MySQL is probably already doing what you describe, as much as it can.
In the case of InnoDB (which should be your default storage engine with MySQL), inserts and updates and deletes change primary key or unique key indexes immediately. But they never rebuild the *whole* index, they add new values into (or take values ... | Note that MariaDB, which you are probably using if you apt install mysql on a modern system, removed the buffering mentioned in the accepted answer.
>
> The change buffer has been disabled by default [in updates to] MariaDB 10.5, 10.6, 10.7, and 10.8, and the feature is deprecated and ignored from MariaDB 10.9.0.
>... |
23,435,391 | Why when I am using javascript the basic HTML inputs validation not performed?
Say the min max attributes.
Here the HTML:
```
<form action="#" method="get">Quantity (between 1 and 5):
<input type="number" name="quantity" min="1" max="5">
<br />
<input type="submit" value="with HTML">
</form>
<button id... | 2014/05/02 | [
"https://Stackoverflow.com/questions/23435391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1725836/"
] | >
> When MySQL updates the index due to an insert, does it rebuild the
> entire index?
>
>
>
No, MySQL doesn't "rebuild" the index on each insert.
MySQL's default page size is 16K. It allocates these pages in 1MB increments (called extents).
When a table is first created (indexes are rebuilt), the pages are fil... | Note that MariaDB, which you are probably using if you apt install mysql on a modern system, removed the buffering mentioned in the accepted answer.
>
> The change buffer has been disabled by default [in updates to] MariaDB 10.5, 10.6, 10.7, and 10.8, and the feature is deprecated and ignored from MariaDB 10.9.0.
>... |
687,559 | Here's my system of equations:
$\begin{cases}y + 2kz = 0\\x + 2y + 6z = 2\\kx + 2z = 1\\
\end{cases}$
So I have $\left[\begin{array}{ccc|c}1&2&6&2\\0&1&2k&0\\k&0&2&1\end{array}\right]$
When I row reduce, I get:
$\left[\begin{array}{ccc|c}1&0&6-4k&2\\0&1&2k&0\\0&0&2-6k-4k^2&1-2k\end{array}\right]$
Not really sure w... | 2014/02/23 | [
"https://math.stackexchange.com/questions/687559",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/116458/"
] | While DonAntonio's answer is certainly correct, it is likely that your question comes from a class where determinants have not yet been discussed, so you may need a different perspective.
In that case, recall that your system will be inconsistent if, after row reduction, you have a row of the form
$( 0 \ 0 \ 0 \mid 1)... | The coefficients' matrix of your non-homogeneous linear system is:
$$\begin{pmatrix}0&1&2k\\
1&2&6\\
k&0&2\end{pmatrix}$$
and the system has (a unique, by the way) solution iff the above matrix is regular, which happens iff its determinant is **non-zero** ... |
687,559 | Here's my system of equations:
$\begin{cases}y + 2kz = 0\\x + 2y + 6z = 2\\kx + 2z = 1\\
\end{cases}$
So I have $\left[\begin{array}{ccc|c}1&2&6&2\\0&1&2k&0\\k&0&2&1\end{array}\right]$
When I row reduce, I get:
$\left[\begin{array}{ccc|c}1&0&6-4k&2\\0&1&2k&0\\0&0&2-6k-4k^2&1-2k\end{array}\right]$
Not really sure w... | 2014/02/23 | [
"https://math.stackexchange.com/questions/687559",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/116458/"
] | While DonAntonio's answer is certainly correct, it is likely that your question comes from a class where determinants have not yet been discussed, so you may need a different perspective.
In that case, recall that your system will be inconsistent if, after row reduction, you have a row of the form
$( 0 \ 0 \ 0 \mid 1)... | Now the last row could be rewritten as
$$\pmatrix{1&0&6-4k&2\\0&1&2k&0\\ 0 & 0&2(2k-1)(k-1)&-(2k-1)}$$
Now we have the following cases
1. $k=1$: the system has no solution.
$$\pmatrix{1&0&2&2\\0&1&2&0\\ 0 & 0&0&-1}$$
2. $k=1/2$: the system has infinitely many solution.
$$\pmatrix{1&0&4&2\\0&1&1&0\\ 0 & 0&0&0}$$
3. $... |
70,892 | I open the Facebook app on my phone and go to chat and it tells me one person was last active ten minutes ago and then all of a sudden it says last active one minute ago but I never see a green dot to say they were online. Why is this? It shows green dots for others but not this one person. It was happening throughout ... | 2014/12/13 | [
"https://webapps.stackexchange.com/questions/70892",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/82982/"
] | It's not a flaw.
This can work if the user is offline on Facebook Messenger and responded to a message recently (or even just opened that app) | Maybe you can no longer see they became friends because now he/she can only see their friends or ungrounded that person |
70,892 | I open the Facebook app on my phone and go to chat and it tells me one person was last active ten minutes ago and then all of a sudden it says last active one minute ago but I never see a green dot to say they were online. Why is this? It shows green dots for others but not this one person. It was happening throughout ... | 2014/12/13 | [
"https://webapps.stackexchange.com/questions/70892",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/82982/"
] | It's not a flaw.
This can work if the user is offline on Facebook Messenger and responded to a message recently (or even just opened that app) | If they have chat off (but they are online), it will keep reporting 1 minute ago until they log off. |
70,892 | I open the Facebook app on my phone and go to chat and it tells me one person was last active ten minutes ago and then all of a sudden it says last active one minute ago but I never see a green dot to say they were online. Why is this? It shows green dots for others but not this one person. It was happening throughout ... | 2014/12/13 | [
"https://webapps.stackexchange.com/questions/70892",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/82982/"
] | Maybe you can no longer see they became friends because now he/she can only see their friends or ungrounded that person | If they have chat off (but they are online), it will keep reporting 1 minute ago until they log off. |
38,902,460 | I'm trying to start an AVD in Android Studio, but it just open a "Splash Screen" (where is written Android), and after, there's no progress.
I searched about it, and I found some discussions about Intel's HAXM ([Android Emulator with HAXM freezes on Mac OS Yosemite](https://stackoverflow.com/questions/26495910/android-... | 2016/08/11 | [
"https://Stackoverflow.com/questions/38902460",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6706016/"
] | Do you have Docker for Mac installed by any chance? I was just facing the exact same issue and stopping Docker fixed the problem... | As I'm not allowed to comment on the above answer, just to add my own experience. Both Docker and minikube - which will admittedly run it's kubernetes containers using docker - need to be stopped for the emulator to work. |
31,790,296 | If I use `svn update --accept postpone` in conflicted checkout, then I've got the conflicted file (`filname`) and 3 extra unversioned file ([see doc](http://svnbook.red-bean.com/en/1.8/svn.tour.cycle.html#svn.tour.cycle.resolve.pending)) -
`filename.mine`, `filename.rOLDREV`, `filename.rNEWREV`.
**How to find this ex... | 2015/08/03 | [
"https://Stackoverflow.com/questions/31790296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3578861/"
] | ```
svn info conflicted_file_name
```
For example for conflicted `t.txt`
```
scn info t.txt
```
output
```
Path: t.txt
Name: t.txt
Working Copy Root Path: D:\test\users\u2_conflict\repo4conflict
URL: file:///D:/test/repo4conflict/text/t.txt
Relative URL: ^/text/t.txt
Repository Root: file:///D:/test/repo4conflict... | >
> How to find this extra files from script?
>
>
>
As it written in doc: every file with 'C' status will add three files with the same name and changed extensions
```
C sandwich.txt
Updated to revision 2.
Summary of conflicts:
Text conflicts: 1
$ ls -1
sandwich.txt
sandwich.txt.mine
sandwich.txt.r1
sandwic... |
19,115,361 | So consider I have these two situations:
* <http://jsfiddle.net/CtYYJ/> <---------- first scenario
Here Is the general situation in which the text in the left div is longer than the input elements on the right div.
How can I specify the size of the wrapper to be the same as the right div elements length and in the s... | 2013/10/01 | [
"https://Stackoverflow.com/questions/19115361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/631333/"
] | After checking your graphics I think there is no CSS way for what you ask.
Would using the faux columns method and positioning your right content fixed or absolutely in the bottom corner be a solution?
<http://alistapart.com/article/fauxcolumns>
```
<div style="width:400px;position:relative;">
<div style="height:... | have you tried: height: 100% ? |
12,546,132 | >
> **Possible Duplicate:**
>
> [How to open new browser window using javascript?](https://stackoverflow.com/questions/3616709/how-to-open-new-browser-window-using-javascript)
>
>
>
For example: <http://www.nowness.com/> > Click "Twitter"
I'm not asking about the Twitter API, just a generic window that I want... | 2012/09/22 | [
"https://Stackoverflow.com/questions/12546132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1074400/"
] | The problem isn't recursion. It's just that your first condition is always true: `endingIndex` is always greater than `beginningIndex`. That condition returns without recursion, so the function ends there. | You can do that using `for` loop like :
```
def find_index_equal_value(set):
for i in range(0, len(set)):
val = set[i]
if(val == i):
print "Index matches value."
``` |
12,546,132 | >
> **Possible Duplicate:**
>
> [How to open new browser window using javascript?](https://stackoverflow.com/questions/3616709/how-to-open-new-browser-window-using-javascript)
>
>
>
For example: <http://www.nowness.com/> > Click "Twitter"
I'm not asking about the Twitter API, just a generic window that I want... | 2012/09/22 | [
"https://Stackoverflow.com/questions/12546132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1074400/"
] | The problem isn't recursion. It's just that your first condition is always true: `endingIndex` is always greater than `beginningIndex`. That condition returns without recursion, so the function ends there. | First of all you must add `return` to the start of line 48.
Second, add `print` to start of last line. |
12,546,132 | >
> **Possible Duplicate:**
>
> [How to open new browser window using javascript?](https://stackoverflow.com/questions/3616709/how-to-open-new-browser-window-using-javascript)
>
>
>
For example: <http://www.nowness.com/> > Click "Twitter"
I'm not asking about the Twitter API, just a generic window that I want... | 2012/09/22 | [
"https://Stackoverflow.com/questions/12546132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1074400/"
] | The problem isn't recursion. It's just that your first condition is always true: `endingIndex` is always greater than `beginningIndex`. That condition returns without recursion, so the function ends there. | Firstly, if you can't see what happened, it's because you need to print the returned string:
```
print FindIndex(sampleSet,0,lastIndex)
```
Now, if I run it I get:
```
beginningIndex: 0, endingIndex: 9
midpointIndex: 4.0, midpoint: -3
There is no value in this set such that a[i] = i
```
which means this `if` matc... |
9,147,710 | I have some images in png format, I am wondering whether there are .net library to process images? | 2012/02/05 | [
"https://Stackoverflow.com/questions/9147710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/705414/"
] | You may take a look at GDI+ ([System.Drawing](http://msdn.microsoft.com/en-us/library/system.drawing.aspx) namespace) or [WIC](http://en.wikipedia.org/wiki/Windows_Imaging_Component), both have managed wrappers built into the .NET framework. For example here's an [interesting article](http://weblogs.asp.net/bleroy/arch... | The [System.Drawing.Bitmap](http://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx) class supports BMP, GIF, EXIF, JPG, PNG, and TIFF. You can at least display your PNGs using that.
Also I found a library [AForge](http://code.google.com/p/aforge/) which is used in an [image processing](http://www.codeproje... |
39,690,977 | I'm new here and I want to know how to specify a div's position as absolute and relative at the same time, Because a div can be a child and parent simultaneously .
Thank you for your help | 2016/09/25 | [
"https://Stackoverflow.com/questions/39690977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6879019/"
] | If the child is positioned absolutely, any **grandchild** can be again positioned absolutely *in relation* to the child.
That is, the child does not need to have `position:relative` for the grandchild to be positioned absolutely *in relation* to it.
So the child could be *considered* to have `position:absolute` for ... | There are several ways to position an HTML block.
If you position it as `fixed` then it will ignore other blocks and position itself in the browser window.
If you position it as `static` (or don't position it at all, 'cause that is the default) then it will move along the flow of the page.
If you position it as `relati... |
39,690,977 | I'm new here and I want to know how to specify a div's position as absolute and relative at the same time, Because a div can be a child and parent simultaneously .
Thank you for your help | 2016/09/25 | [
"https://Stackoverflow.com/questions/39690977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6879019/"
] | If the child is positioned absolutely, any **grandchild** can be again positioned absolutely *in relation* to the child.
That is, the child does not need to have `position:relative` for the grandchild to be positioned absolutely *in relation* to it.
So the child could be *considered* to have `position:absolute` for ... | If you require some benefit of absolute positioning (to escape an ancestors overflow for example) but also take up space in the page flow, one trick I use is to duplicate the content inline but then set 'visibility: hidden;' on the inline content so only the absolute item is visible. |
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | Fibonacci sequences only depend on the previous two values, your base cases are `F(0) = 1` and `F(1) = 1`, and for general `F(n) = F(n - 1) + F(n - 2)`. All you need to do is remember these as you calculate. Recursion is a poor way to solve Fibonacci numbers as the higher the values the more calls you needlessly make. ... | One problem is, that `calculateFib()` does not return any calculation result. it only prints the result. So change the code such that it returns a result.
Once that works, try also the non recursive variant, which is in practise better suited. |
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | Fibonacci sequences only depend on the previous two values, your base cases are `F(0) = 1` and `F(1) = 1`, and for general `F(n) = F(n - 1) + F(n - 2)`. All you need to do is remember these as you calculate. Recursion is a poor way to solve Fibonacci numbers as the higher the values the more calls you needlessly make. ... | Because F 9999999 has ~2089876 digits, you'll want to use an [approximation](http://en.wikipedia.org/wiki/Fibonacci_number). Also consider [memoization](https://stackoverflow.com/q/1799990/230513). |
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | I think a recursive fibonacci has a very high computational complexity too,probably O(n!), while the iterative is just O(n) :) | One problem is, that `calculateFib()` does not return any calculation result. it only prints the result. So change the code such that it returns a result.
Once that works, try also the non recursive variant, which is in practise better suited. |
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | The best way to compute the i-th Fibonacci is not by recursion. You can use these formulas:



phi is the golden... | One problem is, that `calculateFib()` does not return any calculation result. it only prints the result. So change the code such that it returns a result.
Once that works, try also the non recursive variant, which is in practise better suited. |
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | I think a recursive fibonacci has a very high computational complexity too,probably O(n!), while the iterative is just O(n) :) | Because F 9999999 has ~2089876 digits, you'll want to use an [approximation](http://en.wikipedia.org/wiki/Fibonacci_number). Also consider [memoization](https://stackoverflow.com/q/1799990/230513). |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.