Questions tagged [named]

Anything named - objects, variables, classes... Naming is a primary tool of reuse.

Anything named - objects, variables, classes...

Naming is a primary tool of reuse.

392 questions
5
votes
2 answers

Rails, routing many named routes to one action

Is there a simpler way of writing this: map.old_site_cusom_packages '/customs_packages_options.html', :controller => :public, :action => :redirect_to_home map.old_corporate '/corporate.html', :controller => :public, :action => :redirect_to_home …
CafeHey
  • 5,699
  • 19
  • 82
  • 145
4
votes
2 answers

Using Designated Initializer on member of inherited base class

I created a class Something which holds a member variable. I am able to do this, which works as intended: struct Something { bool Works; }; int main() { Something s = { .Works = false, }; } Now, I want to created a struct…
Nox
  • 713
  • 7
  • 16
4
votes
2 answers

Java named/optional parameters using annotation?

In RESTeasy this... @GET @Path("request") public String requestJson(@QueryParam("arg1") @DefaultValue("") String arg1, @QueryParam("arg2") @DefaultValue("0") Integer arg2); ...allows you to define any subset of parameters…
travega
  • 8,284
  • 16
  • 63
  • 91
4
votes
3 answers

Combine named Routes and PageView

I'm fairly new to flutter and building my first real app. I implemented a router class and generating named routes from icon buttons for navigation. Next step I want to also switch between the 3 screens by swiping. My structure is: main.dart…
Simon Schork
  • 65
  • 1
  • 5
4
votes
2 answers

How to access newtype named tuples fields in haskell

I declare the following newtypes: newtype Code = Code String deriving (Show) newtype Name = Name String deriving (Show) newtype Account = Account (Code, Name) deriving (Show) So: *Main Lib> :t Code Code :: String -> Code *Main Lib> :t Name Name ::…
nesiax
  • 43
  • 3
4
votes
1 answer

obtain the current outlet name in case of a multiple named router outlet

In our angular 4 application we have multiple named router outlets. So the url is like : http://localhost:3000/main/(outletName1:Printers//outletName2:Printers) Let's suppose one component is displayed in one particular named router…
Dacian
  • 678
  • 6
  • 12
4
votes
3 answers

Python Wildcard Import Vs Named Import

Ok, I have some rather odd behavior in one of my Projects and I'm hoping someone can tell me why. My file structure looks like this: MainApp.py res/ __init__.py elements/ __init__.py MainFrame.py Inside of MainFrame.py I've defined a…
Dan
  • 673
  • 6
  • 6
4
votes
2 answers

How to add a named vector as a row to a data frame, reordered according to column name order?

How to add a named vector to a data frame, with the components of the vector reordered according to the column names of the data frame? I need to build a data frame one row at a time. A named vector is obtained by some processing and it provides the…
kishore
  • 541
  • 1
  • 6
  • 18
4
votes
2 answers

preventing R nested list from being converted to named vector

I want to create a nested list, for example, > L <- NULL > L$a$b <- 1 > L $a $a$b [1] 1 Since I need to do assignment in loops, I have to use the brackets instead of the dollar, for example, > L <- NULL > a <- "a" > b <- "b" > L[[a]][[b]] <- 1 >…
foehn
  • 431
  • 4
  • 13
3
votes
2 answers

Can an named restriction exist in OWL?

Can we define a restriction as a named class? I mean, instead of using this: :myclass owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :hasAge ; owl:cardinality "2"^^xsd:nonNegativeInteger ] . to use…
kwstas
  • 147
  • 6
3
votes
2 answers

What are the definitions of named method and named function?

I have read the question Difference between method and function in Scala and many articles about differences between method and function. I got a feeling that a 'method' is just a "named function" defined as a method in a class, a trait or an…
Ying
  • 2,660
  • 24
  • 23
3
votes
0 answers

Angular, named outlet need to add slash to path

I have layout named admin-panel
when I call the…
Mike
  • 413
  • 2
  • 9
3
votes
1 answer

Extract all values from a vector of named numerics with the same name in R

I'm trying to handle a vector of named numerics for the first time in R. The vector itself is named p.values. It consists of p-values which are named after their corresponding variabels. Through simulating I obtained a huge number of p-values that…
Sahila
  • 35
  • 5
3
votes
2 answers

Excel: Named range with VBA

I'm trying to define a named range in Excel using VBA. Basically, I have a variable column number. Then a loop runs to determine the first empty cell in that particular column. Now I want to define a named range from row 2 of that particular column…
Jort
  • 1,401
  • 8
  • 23
  • 39
3
votes
2 answers

How to build an efficient named array?

I want to have a type that both has named members and also is iterable, so one should be able to refer to the members by index, by label or from a for-each loop. One way to realise this would be to use std::unordered_map with some…
bitmask
  • 32,434
  • 14
  • 99
  • 159