Verify a method call using Moq
I am fairly new to unit testing in C# and learning to use Moq. Below is the class that I am trying to test. ``` class MyClass { SomeClass someClass; public MyClass(SomeClass someClass) { ...
Center Contents of Bootstrap row container
I have the code below and I'd like to center the "well" elements of the outer "row" div. I've tried various approaches such as text-align: center (which just centers the text and not the inner DIV el...
- Modified
- 19 Nov at 21:26
Why does 2 mod 4 = 2?
I'm embarrassed to ask such a simple question. My term does not start for two more weeks so I can't ask a professor, and the suspense would kill me. Why does 2 mod 4 = 2?
- Modified
- 22 Feb at 20:15
Hiding an Excel worksheet with VBA
I have an Excel spreadsheet with three sheets. One of the sheets contains formulas for one of the other sheets. Is there a programmatic way to hide the sheet which contains these formulas?
How to get file URL using Storage facade in laravel 5?
I've been experimenting using the new Flysystem integration with Laravel 5. I am storing 'localised' paths to the DB, and getting the Storage facade to complete the path. For example I store `screens...
Mockito: Mock private field initialization
How I can mock a field variable which is being initialized inline? ``` class Test { private Person person = new Person(); ... public void testMethod() { person.someMethod(); ...
- Modified
- 8 Jul at 14:17
PHP array printing using a loop
If I know the length of an array, how do I print each of its values in a loop?
How to create a list of objects?
How do I go about creating a list of objects (class instances) in Python? Or is this a result of bad design? I need this cause I have different objects and I need to handle them at a later stage, so I...
Saving and Reading Bitmaps/Images from Internal memory in Android
What I want to do, is to save an image to the internal memory of the phone . How can I do it? I have got the image directly from the camera to the image view in my app its all working fine. Now wha...
- Modified
- 15 Oct at 10:1
Setting dropdownlist selecteditem programmatically
I want to set the `selecteditem` attribute for an ASP.Net dropdownlist control programmatically. So I want to pass a value to the dropdownlist control to set the selected item where the item is equal...
- Modified
- 24 Aug at 09:19
how to overwrite css style
I'm developing pages, now in my css style I have this line of code ``` .flex-control-thumbs li { width: 25%; float: left; margin: 0; } ``` for my pages. Now, some of my pages don't need...
Calling stored procedure with return value
I am trying to call a stored procedure from my C# windows application. The stored procedure is running on a local instance of SQL Server 2008. I am able to call the stored procedure but I am not able ...
- Modified
- 21 Nov at 04:22
Drag and drop elements from list into separate blocks
I'm trying to get a jQuery component similar to the one on [this site](http://www.dhtmlgoodies.com/scripts/drag-drop-nodes/drag-drop-nodes-demo2.html). Basically, there is a list with available eleme...
- Modified
- 30 Aug at 08:21
How can I use async/await at the top level?
I have been going over `async`/`await` and after going over several articles, I decided to test things myself. However, I can't seem to wrap my head around why this does not work: ``` async function m...
- Modified
- 20 Jun at 09:12
Can you target <br /> with css?
Is it possible to target the line-break `<br/>` tag with CSS? I would like to have a 1px dashed line every time there is a line-break. I am customising a site with my own CSS and cannot change the s...
- Modified
- 17 May at 12:55
Are HTTPS headers encrypted?
When sending data over HTTPS, I know the content is encrypted, however I hear mixed answers about whether the headers are encrypted, or how much of the header is encrypted. How much of HTTPS headers ...
- Modified
- 10 Jan at 20:55
Angular4 - No value accessor for form control
I have a custom element : ``` <div formControlName="surveyType"> <div *ngFor="let type of surveyTypes" (click)="onSelectType(type)" [class.selected]="type === selectedType"> <md-i...
- Modified
- 27 Jul at 14:31
How to convert timestamp to datetime in MySQL?
How to convert `1300464000` to `2011-03-18 16:00:00` in MySQL?
- Modified
- 19 Mar at 15:1
How to prevent caching of my Javascript file?
I have a simple html: ``` <html> <body> <head> <meta charset="utf-8"> <meta http-equiv='cache-control' content='no-cache'> <meta http-equiv='expires' content='0'> <meta http-equiv='pragma' content='n...
- Modified
- 26 Mar at 15:20
Set the maximum character length of a UITextField
How can I set the maximum amount of characters in a `UITextField` on the iPhone SDK when I load up a `UIView`?
- Modified
- 24 Nov at 17:52
Enable VT-x in your BIOS security settings (refer to documentation for your computer)
While I was adding a virtual device in my Android Studio, Android Studio is Showing This Error. See This Image: [](https://i.stack.imgur.com/X4fNh.jpg) .
- Modified
- 17 Sep at 04:47
Where in memory are my variables stored in C?
By considering that the memory is divided into four segments: data, heap, stack, and code, where do global variables, static variables, constant data types, local variables (defined and declared in fu...
- Modified
- 5 Jun at 11:35
Difference between virtual and abstract methods
Here is some code from [MSDN](http://msdn.microsoft.com/en-us/library/ms173150.aspx): ``` // compile with: /target:library public class D { public virtual void DoWork(int i) { // Ori...
- Modified
- 3 Aug at 13:33
Stop on first error
> [Automatic exit from bash shell script on error](https://stackoverflow.com/questions/2870992/automatic-exit-from-bash-shell-script-on-error) How can I have bash stop on the first command fai...
- Modified
- 23 May at 12:10
Unable to read repository at http://download.eclipse.org/releases/indigo
I was trying to add the PDT, Indigo - [http://download.eclipse.org/releases/indigo](http://download.eclipse.org/releases/indigo) Unable to read repository at [http://download.eclipse.org/releases/indi...
- Modified
- 20 Jun at 09:12