Questions

What are iterator, iterable, and iteration?

What are "iterable", "iterator", and "iteration" in Python? How are they defined?

Unable to update the EntitySet - because it has a DefiningQuery and no <UpdateFunction> element exist

I am using Entity Framework 1 with .net 3.5. I am doing something simple like this: ``` var roomDetails = context.Rooms.ToList(); foreach (var room in roomDetails) { room.LastUpdated = D...

Difference between "\n" and Environment.NewLine

What is the difference between two, if any (with respect to .Net)?

4 Oct at 19:20

Duplicate symbols for architecture x86_64 under Xcode

I now have the same question with above title but have not found the right answer yet. I got the error: ``` /Users/nle/Library/Developer/Xcode/DerivedData/TestMoboSDK-Client-cgodalyxmwqzynaxfbbewrooy...

9 Dec at 05:40

Get environment variable value in Dockerfile

I'm building a container for a ruby app. My app's configuration is contained within environment variables (loaded inside the app with [dotenv](http://github.com/bkeepers/dotenv)). One of those config...

23 Oct at 09:16

Modulo operator in Python

What does modulo in the following piece of code do? ``` from math import * 3.14 % 2 * pi ``` How do we calculate modulo on a floating point number?

23 Mar at 16:5

Inline style to act as :hover in CSS

I know that embedding CSS styles directly into the HTML tags they affect defeats much of the purpose of CSS, but sometimes it's useful for debugging purposes, as in: ``` <p style="font-size: 24px">as...

26 Dec at 08:13

System.MissingMethodException: Method not found?

Previous working asp.net webforms app now throws this error: > System.MissingMethodException: Method not found The `DoThis` method is on the same class and it should work. I have a generic handler as ...

19 Jan at 15:6

Difference between margin and padding?

What exactly is the difference between and in CSS? It really doesn't seem to serve much purpose. Could you give me an example of where the differences lie (and why it is important to know the differ...

27 Dec at 10:10

Could not find default endpoint element

I've added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error: > Could not find default endpoint element that references contract 'IMySOAPWebSe...

8 Mar at 19:21

How to get current foreground activity context in android?

Whenever my broadcast is executed I want to show alert to foreground activity.

17 Jan at 15:34

Python progression path - From apprentice to guru

I've been learning, working, and playing with Python for a year and a half now. As a biologist slowly making the turn to bio-informatics, this language has been at the very core of all the major contr...

21 May at 18:38

Undefined symbols for architecture armv7

This problem has been driving me crazy, and I can't work out how to fix it... ``` Undefined symbols for architecture armv7: "_deflateEnd", referenced from: -[ASIDataCompressor closeStream] in...

30 Jun at 20:44

Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

I am trying to configure hibernate orm mapping tool to my java class and using PostgreSQL as my database and configured the password as "password". When I tried to run the application, I have encounte...

19 Nov at 09:30

DECODE( ) function in SQL Server

``` SELECT PC_COMP_CODE, 'R', PC_RESUB_REF, DECODE(PC_SL_LDGR_CODE, '02', 'DR', 'CR'), PC_DEPT_NO DEPT, '', --PC_DEPT_NO, PC_SL_LDGR_CODE + '/' + PC_SL_ACNO, ...

Angular2 - Input Field To Accept Only Numbers

In Angular 2, how can I mask an input field (textbox) such that it accepts only numbers and not alphabetical characters? I have the following HTML input: ``` <input type="text" *ngSwitchDefaul...

Creating and writing lines to a file

Is it possible to create a file and write lines to it in vbscript? Something similar to file (`echo something something >>sometextfile.txt`). On execution of the vbscript depending on the path of t...

22 Apr at 08:28

How to capitalize first letter of each word, like a 2-word city?

My JS woks well when the city has one word: - But when it's - How do I make it become San Diego? ``` function convert_case() { document.profile_form.city.value = document.profile_fo...

12 May at 20:2

HTML img onclick Javascript

How do I have JavaScript open the current image in a new WINDOW with an ONCLICK event. ``` <script> function imgWindow() { window.open("image") } </script> ``` HTML ``` <img src="pond1.jpg" hei...

28 Apr at 03:15

Is there a way to only install the mysql client (Linux)?

Are there are any Linux mysql command line tools that don't require the entire mysql db installation package to be installed? What I'm trying to do is from server #1 (app server), execute mysql com...

13 Mar at 03:32

GROUP BY + CASE statement

I have a working query that is grouping data by hardware model and a result, but the problem is there are many . I have tried to reduce that down to . This generally works, but I end up having: ```...

How to convert currentTimeMillis to a date in Java?

I have milliseconds in certain log file generated in server, I also know the locale from where the log file was generated, my problem is to convert milliseconds to date in specified format. The proces...

29 Apr at 17:30

Find when a file was deleted in Git

I have a Git repository with n commits. I have a file that I need, and that used to be in the repository, and that I suddenly look for and think "Oh! Where'd that file go?" Is there a (series of) Gi...

12 Jan at 23:10

Convert row names into first column

I have a data frame like this: ``` df VALUE ABS_CALL DETECTION P-VALUE 1007_s_at "957.729231881542" "P" "0.00486279317241156" 1053_at "320.632701283368"...

1 May at 06:9

How to write a Unit Test?

I have a Java class. How can I [unit test](http://en.wikipedia.org/wiki/Unit_testing) it? --- In my case, I have class does a binary sum. It takes two `byte[]` arrays, sums them, and returns a n...

13 Dec at 07:8