Questions

Operand type clash: int is incompatible with date + The INSERT statement conflicted with the FOREIGN KEY constraint

``` create table pilot ( emp_num int, pl_license varchar (3), pl_ratings varchar (30), pl_med_type int, pl_med_date date, pl_pt135_date date, constraint PK_pilot primary key (emp_num) ) insert into p...

13 Nov at 08:4

How to return result of a SELECT inside a function in PostgreSQL?

I have this function in PostgreSQL, but I don't know how to return the result of the query: ``` CREATE OR REPLACE FUNCTION wordFrequency(maxTokens INTEGER) RETURNS SETOF RECORD AS $$ BEGIN SELE...

Add/Delete table rows dynamically using JavaScript

I'm trying to add/delete table rows following [this example](http://www.w3schools.com/js/tryit.asp?filename=try_dom_table_insertrow) and [this example](http://www.w3schools.com/js/tryit.asp?filename=t...

30 Jun at 08:31

What is the difference between instanceof and Class.isAssignableFrom(...)?

Which of the following is better? ``` a instanceof B ``` or ``` B.class.isAssignableFrom(a.getClass()) ``` The only difference that I know of is, when 'a' is null, the first returns false, while...

30 Jan at 19:44

How can one see content of stack with GDB?

I am new to GDB, so I have some questions: - How can I look at content of the stack? Example: to see content of register, I type `info registers`. For the stack, what should it be?- How can I see the...

7 Sep at 14:27

How to get a index value from foreach loop in jstl

I have a value set in the `request` object like the following, ``` String[] categoriesList=null; categoriesList = engine.getCategoryNamesArray(); request.setAttribute("categoriesList", categoriesList...

14 Mar at 19:13

How to create <input type=“text”/> dynamically

I want to create an input type text in my web form dynamically. More specifically, I have a textfield where the user enters the number of desired text fields; I want the text fields to be generated dy...

20 Nov at 15:24

How are cookies passed in the HTTP protocol?

How are cookies passed in the HTTP protocol?

12 Aug at 11:27

jQuery: go to URL with target="_blank"

I am using this bit of jQuery code to get href of the link: ``` var url = $(this).attr('href'); ``` -- and this bit of code to go to that href: ``` window.location = url; ``` Everything is just ...

13 Jul at 02:35

Jquery validation plugin - TypeError: $(...).validate is not a function

My script throw errors: > TypeError: jQuery.validator is undefined additional-methods.js:20 TypeError: $(...).validate is not a function index.php:115 Probably, I have mistake in jQuery code. ```...

7 Feb at 20:45

Pipenv: Command Not Found

I'm attempting to use pipenv. I ran the command `pip install pipenv`, which ran successfully: ``` ... Successfully built pipenv pathlib shutilwhich pythonz-bd virtualenv-clone Installing collected pac...

29 Dec at 01:24

COPYing a file in a Dockerfile, no such file or directory?

I have a Dockerfile set up in my root (~) folder. The first three lines of my file look like this: ``` COPY file1 /root/folder/ COPY file2 /root/folder/ COPY file3 /root/folder/ ``` but it returns ...

22 Jan at 16:45

Git status shows files as changed even though contents are the same

I received a git checkout from someone else and am trying to commit the unstaged changes to the local repository. However, a (if not every) file appears as even though the contents are exactly the s...

12 Aug at 18:56

Any difference between await Promise.all() and multiple await?

Is there any difference between: ``` const [result1, result2] = await Promise.all([task1(), task2()]); ``` and ``` const t1 = task1(); const t2 = task2(); const result1 = await t1; const result2 ...

24 Jul at 16:10

Looping over arrays, printing both index and value

I want to do something like this: ``` foo=( ) foo[0]="bar" foo[35]="baz" for((i=0;i<${#foo[@]};i++)) do echo "$i: ${foo[$i]}" done # Output: # 0: bar # 1: ``` Then i tried to loop through it us...

17 Jul at 11:9

Read .csv file in C

I have a .csv file: ``` lp;imie;nazwisko;ulica;numer;kod;miejscowosc;telefon;email;data_ur 1;Jan;Kowalski;ul. Nowa;1a;11-234;Budry;123-123-456;jan@go.xxx;1980.05.13 2;Jerzy;Nowak;ul. Konopnicka;13a/3;...

7 Mar at 18:54

Change <br> height using CSS

I have seen a [question](https://stackoverflow.com/questions/1409649/how-to-change-height-of-a-br) here about the same, but I can't get any of the answers to work (at least on Chrome). This question i...

20 Aug at 11:18

Which JRE am I using?

There are two varieties of JRE available. [Java VM: IBM vs. Sun](https://stackoverflow.com/questions/338745/java-vm-ibm-vs-sun). Is there a way to know which JRE I am using through JavaScript or some...

17 Dec at 06:5

EOFError: EOF when reading a line

I am trying to define a function to make the perimeter of a rectangle. Here is the code: ``` width = input() height = input() def rectanglePerimeter(width, height): return ((width + height)*2) pri...

16 Jul at 11:56

Difference between logger.info and logger.debug

What is the difference between `logger.debug` and `logger.info` ? When will `logger.debug` be printed?

25 Sep at 17:48

Change the "From:" address in Unix "mail"

Sending a message from the Unix command line using `mail TO_ADDR` results in an email from `$USER@$HOSTNAME`. Is there a way to change the "From:" address inserted by `mail`? For the record, I'm usin...

19 Dec at 14:49

isPrime Function for Python Language

So I was able to solve this problem with a little bit of help from the internet and this is what I got: ``` def isPrime(n): for i in range(2,int(n**0.5)+1): if n%i==0: return F...

13 Aug at 13:41

How can I choose a custom string representation for a class itself (not instances of the class)?

Consider this class: ``` class foo(object): pass ``` The default string representation looks something like this: ``` >>> str(foo) "<class '__main__.foo'>" ``` How can I make this display a cust...

1 Feb at 20:7

How can I use "e" (Euler's number) and power operation?

How can I write `1-e^(-value1^2/2*value2^2)` in Python? I don't know how to use power operator and `e`.

16 Nov at 15:2

How can I solve ORA-00911: invalid character error?

I tried to execute an `SQL` `INSERT` with `Toad for oracle`: ``` INSERT INTO GRAT_ACTIVITY (UUID, IP_ADRESS, SEND_MAIL, DATE_CREA, DATE_UPD, CREATOR, CENTER, ETAT, REQUEST) VALUES('555-vgd9-pllkd...

4 May at 01:38