Questions tagged [user-defined]

253 questions
1
vote
2 answers

C program to find the Majority Element of Array using a user defined array size returns unexpected results

I am trying to write a c program that prompts the user to input the size of an array (N) between 1 and 100. Then prompt the user to input array elements to the size of N. Following that I want to display the aforementioned elements to the user,…
Sam Lieber
  • 13
  • 3
1
vote
1 answer

Matlab plot marker label (NodeLabel) property

Is there any way to access and set plot marker property in Matlab? In some case especially when user defined Marker is used (like the image below), it is necessary to set NodeLabel's position, font and color, to make it distinct in the…
Shivid
  • 1,295
  • 1
  • 22
  • 36
1
vote
0 answers

Set custom color in Interface Builder

So I have this class MWColor with the following properties: @interface MWColor : NSObject + (UIColor *)orange; + (UIColor *)green; In the Interface Builder, for a given UIView, I currently set the background color manually, as such: However, I…
Sjakelien
  • 2,255
  • 3
  • 25
  • 43
1
vote
1 answer

MySQL assign user-defined variable in where clause

The 1st query sql will converted to: SELECT name,(@num) FROM test WHERE 1 In select clause, the (@num : @num + 1) return 1, so is mean the last query sql equal to: SELECT name,(@num) FROM test WHERE 1 <= 1 ? If yes, why the 2nd query only…
consatan
  • 349
  • 1
  • 7
  • 18
1
vote
2 answers

How to compare last digit of number w/ last digit of another number?

public static boolean retsim(int x, int y) { String xx = x + ""; String yy = y + ""; boolean returnValue = false; if(xx.substring(xx.length() - 1) == yy.substring(yy.length() - 1)) { returnValue = true; } return…
Snare_Dragon
  • 59
  • 1
  • 11
1
vote
0 answers

docker userdefined network - no connection to the outside world

I try to expose a docker container to the outside world (well, to be specific just in my internal network - 10.0.0.0/24) with a static ip adress. In my example the container should have the IP address 10.0.0.200. Docker version is 1.10.3. Therefore…
1
vote
1 answer

#value error in user defined function

I wrote a VBA function that checks several things and returns a code that triggers conditional formatting. Everything works well except that the formula often triggers a #value error. It does this for all cells containing the formula (a few…
TMZ
  • 43
  • 3
1
vote
1 answer

Exact user defined expressions in Sympy derivatives

I am using Sympy to calculate the derivative of a complicated potential. I have defined x, y, D0, e, C, k, d, b as Sympy Symbols. Then I go on to do the following definitions: import sympy as sm x, y, D0, e, C, k, d, b = sm.symbols("x, y, D0, e, C,…
George Datseris
  • 411
  • 4
  • 14
1
vote
1 answer

Multilingual ASP.NET MVC 4 - User Editable translations

I've setup an ASP.NET MVC Multilingual website. When user registers, they select their preferred language from a drop-down list and then on the website's labels, messages, alerts etc. are shown in their selected language. They can change their…
Vaibhav J.
  • 352
  • 2
  • 15
1
vote
1 answer

User defined search of a hash

New to Perl. Using Windows 10 w/ Padre IDE. I have a question that has been stumping me and it's probably very simple yet I have yet to find an answer on the net. Here is the code that is working up until my search. It reads a list.txt file with…
jveytech
  • 13
  • 4
1
vote
1 answer

Bluemix sql database recovery

When I removed my app from the Bluemix dashboard, it removed the associated SQL db as well. I have a script that creates new tables/indexes with our schema name but the free version of SQL database does not support user-defined schema names. The…
Tushar
  • 11
  • 1
1
vote
1 answer

Vim Script: User-defined command with "prefix"

I have created a simple user-defined command using the following vim script command! -nargs=* -complete=file EE :call EE() function! EE(...) if filereadable(expand(a:1)) exec 'edit ' . a:1 endif endfunction :EE file will open a…
Vimminator
  • 35
  • 4
1
vote
1 answer

Unable to use user-defined operator in Prolog

I've been stuck for quite some time on this issue, my Prolog program has the following line within its operator definitions: :- op(100, xfx, [has,gives,'does not',eats,lays,isa]). and then this fact: fact :: X isa animal :- member(X,…
Reddy
  • 481
  • 1
  • 7
  • 20
1
vote
2 answers

java, two 2D arrays and their interactions, ArrayIndexOutOfBounds Exception

2nd question! (followup to my first) I'm now trying to list the first array (namesArray) and match each index with the user-defined amount of hours in hoursArray. So it asks for how many people worked for the week, then asks for their names, then…
Ryan Horner
  • 123
  • 1
  • 1
  • 7
1
vote
3 answers

How to fill in all periods between two dates in MySQL?

I have the following situation, where I have some individuals with a start and an end date: ID | start_date | end_date 1 2015-02-15 2015-04-20 2 2015-03-10 2015-06-15 ... ... ... Now, I need to derive a table with the…
tholor
  • 55
  • 1
  • 6