FAQ Database Discussion Community


Is there a way to configure Elasticsearch so that it will prevent creating new type in specific index?

indexing,elasticsearch,mapping
For example: I have index people and document type person-info. I explicitly defined its mapping by: curl -XPUT 'http://localhost:9200/people/_mapping/person-info' -d ' { "person-info" : { "properties" : { // some mapping } } } Once I inserted some documents to person_info instead of person-info by mistake. So Elasticsearch automatically created...

How to change the proguard mapping file name in gradle for Android project

android,gradle,mapping,proguard,obfuscation
I have android project based on gradle and I want to change mapping.txt file name after it's generated for my build. How can it be done? upd How it can be done in build.gradle? Since I have access there to my flavors and other stiff, I would like to create...

How get custome analyzer source from elasticsearch?

elasticsearch,mapping,analyzer
I made a _mapping request to elasticsearch and see that for one field custom analyzer is used. The output for field like that: "myFieldName": { "type": "string", "analyzer": "someCustomAnalyzer" } So is there are a way to get source for that someCustomAnalyzer? I have tried request curl -XGET localhost:9200/_analyze?analyzer=someCustomAnalyzer and...

Serve private mapping from S3 tiles by proxying data or signing urls through heroku?

heroku,amazon-s3,mapping,leaflet,cesium
I want to store mapping tiles in a private S3 bucket. Each tile has its own URL and each set of tiles could potentially have GBs of tiles. I then want to visualise these tiles through a front end mapping client (e.g leaflet). This client pulls tiles as it needs...

How to compare arrays in my case?

javascript,angularjs,mapping
I am trying to do a mapping in my app. I have something like $scope.newProducts = ['123','456','789'] $scope.products = [{'id':'123'}, {'id':'121'}, {'id':'678'}, {'id':'789'}]; I want to be able to identify new product in my products array. I have something like $scope.newProducts.forEach(function(id){ //not sure what is the best way to find...

can't force GROK parser to enforce integer/float types on haproxy logs

types,mapping,logstash,kibana,grok
Doesn't matter if integer/long or float, fields like time_duration (all time_* really ) map as strings in kibana logstash index. I tried using mutate (https://www.elastic.co/blog/little-logstash-lessons-part-using-grok-mutate-type-data) did not work either. How can i correctly enforce numeric type instead of strings on these fields? My /etc/logstash/conf.d/haproxy.conf: input { syslog { type =>...

replace a numerical column by a character column in R with a defined mapping

r,mapping,dplyr,tidyr
I did some searching but could not find an answer to my problem. Say I have a data frame with a column student_id in integers and some other columns. I also have another mapping table containing two columns, with the 1st one being student_id and the 2nd one student_name in...

Mapping CSV using json file

python,json,csv,python-3.x,mapping
I have a csv file containing 3 columns, Dick,25,Coder John,23,Architect Roony,20,Designer Paras,40,Manager How do I parse it using python against a json mapper which states which column is what like column 2 is Age, 3 is Occupation ? Something like - [ "Person","Age", "Job" ] Also, It would be great...

PowerShell map persistent sharepoint path

powershell,sharepoint,mapping
I'm trying to map the path to a SharePoint document library in a persistent way. It's strange that this works fine: $Sharepoint = '\\domain.net\stuff\Documents\Folders - Permission matrix' New-PSDrive -Name P -Root $Sharepoint -PSProvider FileSystem -Credential $Credentials But this doesn't work: New-PSDrive -Persist -Name P -Root $Sharepoint -PSProvider FileSystem -Credential $Credentials...

Hibernate map mapping(3 tables)

java,hibernate,dictionary,collections,mapping
Let's suppose I've these 3 tables: CREATE TABLE "entity1" ( "id" int4 NOT NULL, "name" text NOT NULL, CONSTRAINT "entity1_pkey" PRIMARY KEY("id") ); CREATE TABLE "entity2" ( "id" int4 NOT NULL, "entity1_id" int4 NOT NULL, "param_name" text NOT NULL, "entity3_id" int 4 NOT NULL, CONSTRAINT "entity2_pkey" PRIMARY KEY("id") CONSTRAINT "fk_entity2_to_1"...

Two fields mapping in symfony2

php,symfony2,doctrine2,mapping
Is it possible to collect and map two fields from form to one property? Details: I have an array field in my entity: @ORM\Column(name="custom", type="simple_array") where admin can specify (multi choice) custom options for the product - for example: $product->setCustom( array('customText', 'customNumber') ); So the user should have two fields...

How to Create a URL to an Action in a Different Project in the Same Solution?

asp.net,asp.net-mvc,asp.net-mvc-4,url,mapping
I have two projects (created in MVC4) in one solution.One project is site and another project is site to manage employees. The URLes are www.ambulangtrns.com and www.ambulangEmployee.com. When I type this address www.ambulangtrns.com I have to execute the start action method in first project and when I type this URL...

Symfony2 / Doctrine2 : how to access an entity annotation mapping?

symfony2,doctrine2,annotations,mapping,accessor
In my Symfony2/doctrine2 application, I have two entities, Media and Recipe. They can be linked by a oneToMany or a ManyToMany association. In the case of a oneToMany relationship, I am using the following code to retrieve the Recipe linked to an instance of Media : $accessor = PropertyAccess::createPropertyAccessor(); $reflect...

JavaScript objects: 'addEventListener is not a function'

javascript,html,object,canvas,mapping
I create an array of JavaScript objects called elements and loop through it in order to draw every one on a canvas as well as hooking up a few event handlers to it. However, I get an error stating that 'Uncaught TypeError: elements[i].addEventListener is not a function' Here is the...

set transparent layer on the 3d model and draw something on the transparent layer and project on the surface

ios,unity3d,mapping,projection
I have done lots of research on projection mapping but did not found any solution that i want to do like map on the real 3d object by projector through iPad or desktop. I want to draw something on the real time 3d object from ipad application. I have 3d...

Converting tree-like map into plain map with composite keys

java,dictionary,mapping,logic
I was trying to do something in Java but I am stuck at this problem, I really dont know how to convert this. I tried for loops but I would need to make a lot of for loops and I would like to keep my code clean. I have a...

Load collection with custom SQL in NHibernate

c#,oracle,nhibernate,mapping
I'm pretty new to NHibernate. I understood the main concepts, but now I'm a bit stuck : I need to load a collection property using a slightly complicated SQL query. Let me explain: I'm writing a code generator that generates classes from Oracle tables (using oracle TAB and COL views)....

Control pan and zoom animation duration in mapbox.js

mapping,gis,mapbox,mapbox-gl-js
I'm making an animated map showing a series of points using Mapbox.js. Ideally, I want to smoothly switch focus between points by combining zoom and pan like this example created in d3.js. I wonder if there is anyway to control the pan & zoom animation speed (mainly to slow it...

Creating analyzed and not_analyzed index on all fields in Elasticsearch

python,indexing,elasticsearch,mapping
Im pretty new to Elasticsearch. I have a requirement of creating ALL string fields with an "analyzed" and "not_analyzed" index. I have been able to do it for 1 or 2 fields, but how can I do this if I have 50 fields in my document? I have used the...

Mapping flattened stored proc values to navigation property

sql,entity-framework,mapping,entity-framework-6,automapper
Here is my stored procedure which returns a type of Customer_GetCustomers_Result: SELECT c.*, a.City AS AddressCity, a.State AS AddressState FROM Customer c LEFT OUTER JOIN Address a ON c.AddressId = a.Id I expect AddressCity and AddressState to map to Customer.Address.City and Customer.Address.State when using AutoMapper to map from Customer_GetCustomers_Result to...

Spring RequestBody Mapping maps all attributes to null values

java,spring,web-services,rest,mapping
i have the following RESTfull method : @RequestMapping(value = "/budgetLines", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public void create(@RequestBody BudgetLine budgetLine) { System.out.println("Before Persisting in the repository " + budgetLine); budgetLineRepository.save(budgetLine); } I'am consuming this method inside a web application, i checked using the network analysis tool (in the...

Leaflet package in R not plotting all coordinates

r,mapping,leaflet
I'm trying to plot using leaflet with a somewhat sizable set of coordinates (~34K latitude/longitude pairs) however, using the code below it seems that leaflet is only plotting a small portion of these: data <- read.csv("Food_inspections.csv", header = TRUE) names(data) <- tolower(names(data)) data1 <- filter(data, risk == c("Risk 1 (High)","Risk...

How to map a csv line to a collection of keyword dictionaries?

parsing,csv,clojure,mapping
Let's assume I have the following csv: DATE;DESC;IN;OUT 11/04/13;Buy new shoes;;90 16/04/13;Wage;5000; 17/04/13;Donate money;;200 ;;; 30/04/13;Buy new shoes again;;80 I basically want to parse this csv file, filter out empty lines and later on, perform some calculations on it. I do not want to use any pre-made csv libraries whatsoever...

Hibernate Mapping Understanding

java,spring,hibernate,mapping
i have a little problem by understanding how hibernate maps collection bidiractional. Wanted is the following: Tables schema: event (e_id,date, i_id) info (i_id, detailDesc) i have multiple events and some info objects which sums ups details to x events. As objects i have different Event Objects and some Info objects...

Doctrine2 / Symfony 2 @ParamConverter with custom repository method dropping unmapped arguments

php,symfony2,doctrine2,annotations,mapping
i am in the need to send a non-mapped argument to my custom repository method. However it seems those arguments are purely ignored, I don't get them when I vardump my repository method arguments. I have found the issue detailed here but without comments : @ParamConverter with custom repository method...

Searching in specific indices with JSON object

elasticsearch,mapping,elasticsearch-dsl
I have a problem. In my application I'm using ElasticSearch. I'm posting JSON object to my ElasticSearch server. That JSON object contain DSL query. So, what I need to do, is to query specific index for some data. This is the query: { "query":{ "indices":{ "indices":[ "index-1" ], "query":{ "bool":{...

My ES custom analyser is not used?

elasticsearch,mapping,elastic
I'm using Elasticsearch and create an index with the following information for mapping and settings. The problem I have is that my field geography.locality which should use the 'name_analyser' doesn't seem to use it. { "index": "programs", "body": { "settings": { "number_of_shards": 5, "analysis": { "filter": { "elision": { "type":...

model isn't working as expected C#

c#,model,mapping,dapper
My model is getting data I need, but I'm not sure how to organize it in the way I need. I have it where the model pulls a team, and a player. The issue is when mapping my data to the model it gives me duplicate teams, and doesn't allow...

Selenium Web Driver : How to map html elements to Java Object.

selenium,webdriver,mapping
As part of Selenium Web-driver learning I came across a scenario. Please let me know the professional approach to proceed. I am testing a eCommerce application where while I click on Mobile link all mobile phones are getting displayed.I want to check whether they are sorted based on name and...

Using EF6 code-first, reference same property name

c#,entity-framework,properties,mapping
How to reference both ShippingAddressId and BillingAddressId properties in Customer class to Address class which has a diffrent key named AddressId? Running update-database -verbose causes error: Unable to determine the principal end of an association between the types 'Project1.Customer' and 'Project1.Address'. The principal end of this association must be explicitly...

How to map Spring Interceptor

java,spring,mapping,interceptor
I'm trying to map a Spring Interceptor so it catches every '*.do' request, but I can only make it work in a 'single level'. My Interceptor mapping path is "/*.do", and I can only intercept URIs like /app/action.do If I request /app/anotherLevel/action.do the Interceptor is not triggered. I've noticed that...

Relation between map function and mathematical concept of map

functional-programming,mapping,categories
I started reading "conceptual mathematics: an introduction in Category Theory". There, a map is defined as having a domain and codomain, with exactly one arrow leaving a given element of the domain and mapping it to an element in the codomain. However, my concurrent endeavours in Haskell show the map...

Many to One Relation in Symfony 2

symfony2,doctrine2,mapping,schema,many-to-one
I have a problem related to Doctrine2: 1- I have two tables joining on a many-to-one relation: Table 1 - Activity The Schema: Backend\adminBundle\Entity\Activity: type: entity table: activity indexes: result_id: columns: - result_id id: id: type: integer nullable: false unsigned: false comment: '' id: true generator: strategy: IDENTITY fields: .........

Mapping x,y,z coordinates to one integer

mapping
I want to create a function in order to convert x,y,z to one number. For example, I have created a function for x,y to one number. Let's say the number is "k" and width, the width of the map. k=y*width+x. I think that a good idea would be to consider...

How to insert key and value to map that is inside another map in cpp?

c++,insert,mapping,iteration
I have this map : std::map<std::string, std::map<std::string, std::string> > objects; As far as I know, when I write objects[key] it will replace the value of the key already exists, but here I want it to add to the second map if the pair doesn't exist. Example: Current MAP :("key1",map(<"key_a","value_a">,<"key_c","value_d">)) input:...

EER diagram with mandatory sub-classes to SQL tables

sql,sql-server,mapping,relational
I am working on an assignment to create a database for fast food outlet and am stuck with generating a relational schema from my EER which has mandatory subclasses. I have a CustOrderDetails(OrderNo {PK}, EmployeeNo, DiscCode,....) entity with subclasses DeliveryOrder(CallStart,...) and PickUpOrder(PickUpName,...). These are "Maandatory/Disjoint" so CustOrderDetails MUST be one...

Convert grayscale to color gradient in Java?

java,image,colors,mapping,grayscale
Is there any general algorithm or a provided class for mapping a grayscale value (0-255) to a value in a colour gradient? I am thinking of something of the sorts: public Color mapGrayscaleValue (byte value, Color[] gradientColors); I am wanting this to provide clearer highlights in what would otherwise be...

Mapping values of a matrix?

matlab,matrix,mapping
So I have a large matrix(4091252x2) that looks something like this: 439105 1053224 439105 1696241 439105 580064 439105 1464748 1836139 1593258 1464748 439105 1464748 1053224 1464748 1696241 1464748 580064 580064 439105 Basically, the matrix represents calls made from one person to another, represented by a personID (439105 calls 1053224). What...

Calculate latitude/longitude between two other coordinates certain meters away

javascript,mapping
I am working on a Javascript function for calculating a coordinate with latitude and longitude on a "line" between two other coordinates. This coordinate that i need to calculate for example is 300 meters away from the first coordinate while the distance between the two coordinates is 1600 meters. What...

Data transformations on-the-fly

mapping,apache-spark,storm
Is there a way, other than a manual mapping, to translate related values on-the-fly? I know this sounds vague but what I am looking for is a way to take an input value of say "2015 Ford" and translate it given to a mapping provided by a client that indicates...

How to match a set against a set of sets, completely

mapping,combinatorics,computation-theory,np-complete,set-theory
This problem is similar to the "Exact Hitting Set" problem (http://en.wikipedia.org/wiki/Exact_cover#Exact_hitting_set) but with slightly different constraints. I am looking for libraries, implementations, or papers that solve the following. Say I have a set of sets S, and is initialized as follows: S = {N, O, P, E}; N = {1,...

How to make a dictionary of arrays?

arrays,matlab,dictionary,mapping,containers
I can't seem to figure out how containers.Map works. It's doing okay with characters and numbers, but flips out when I try to feed it arrays. How do I make something like this? function test global a a = containers.Map(); a(pi) = 3:14; a(5) = 4:2:10; end ...

HIbernate mapping on the wrong froreign key

java,xml,hibernate,mapping
I have 2 classes Device and Position that have a relation one-to-many/many-to-one (One device has several positions, a position is associated to one and only one device). I have clearly specified in the hibernate mapping file that I want my table to join on device.DeviceID = position.FK_DeviceID, yet when i...

Add brands through company, it's possible? How?

php,symfony2,doctrine2,mapping,symfony-2.6
I have this two tables (see pics below) mapped as follow: class Brand { ... /** * @var Company * * @ORM\ManyToOne(targetEntity="Company") * @ORM\JoinColumn(name="companies_id", referencedColumnName="id") */ protected $company; } class Company { ... } I need to add support for add a new Brand from Company but I have not...

Using Sequence in non Id field In jpa and Sql Server

java,sql-server,hibernate,jpa,mapping
My JPA Entity contiens a non id field named counter, the value of this field is getted from Sql server sequence. How can i represente this requirement in my JPA mapping of the entity ? I note that i can't add/modify the dabatabase objects ( triger/ function / procedure ),...

Spring mvc Ambiguous mapping found. Cannot map controller bean method

java,spring,maven,mapping,mv
I am trying to build an app which can list some values from the database and modify, add, delete if necessary using Spring 4 and i receive the following error(only if the "@Controller" annotation is present in both of my controller files, if i delete the annotation from one of...

In R, mapping column classes to a character vector without a for loop

r,class,mapping
Say I have a dataframe with X columns, and a character vector of length X containing classes such as the following: classes <- c("character","numeric","numeric","character","character") How would I "map" those classes to my dataframe's columns without the use of a for loop?...

Automapper v3.3.1.0 Missing type map configuration or unsupported mapping

c#,asp.net-mvc,mapping,automapper
I get the error Missing type map configuration or unsupported mapping. Version of AutoMapper: v3.3.1.0 My code is: Global.asax protected void Application_Start() { AutoMapperWebConfig.RegisterMappings(); AutoMapperServiceConfig.RegisterMappings(); } AutoMapperWebConfig: public class AutoMapperWebConfig { public static void RegisterMappings() { Mapper.Initialize(cfg => { cfg.AddProfile<DtoToViewModelMappingProfile>(); }); } } AutoMapperServiceConfig: public class AutoMapperServiceConfig { public static...

vim - how to stop this bug: insert single char func - put vs p

vim,time,mapping
I wanted to be able to easily insert a single char from normal mode, and clean up some of the mappings that were being added for that purpose while I was at it. I have this in my vimrc now: "insert single char from normal mode function! InsertSingleChar() "jump into...

One to Many entity framework error

entity-framework,mapping,one-to-many,code-first,asp.net-web-api2
I have 2 models, user & telephone. A user can have many telephone numbers. My User code: public class User { public User() { this.TelephoneNumbers = new List<Telephone>(); } public int UserId { get; set; } public string Forename { get; set; } public string Surname { get; set; }...

Change lowercase and uppercase of characters in java

java,unicode,mapping,uppercase,lowercase
If I want to create a dictionary where the user can create a custom alphabet (that still uses unicode) Is there a way to change lowercase and uppercase mapping of the characters? Let's say I want the lowercase of 'I' to be 'ı' instead of 'i' or upperCase of 'b'...

How to configure Automapper to automatically ignore properties with ReadOnly attribute?

c#,.net,asp.net-mvc,mapping,automapper
Context: Let's say I have the following "destination" class: public class Destination { public String WritableProperty { get; set; } public String ReadOnlyProperty { get; set; } } and a "source" class with the ReadOnly attribute on one of it's properties: public class Source { public String WritableProperty { get;...

Mapping int to int (in Java)

java,algorithm,dictionary,integer,mapping
In Java. How can I map a set of numbers(integers for example) to another set of numbers? All the numbers are positive and all the numbers are unique in their own set. The first set of numbers can have any value, the second set of numbers represent indexes of an...

Replace array/objects key value with key value from another array/object javascript

javascript,arrays,json,object,mapping
My question is based on how to merge data from one JS object into another JSON object in order to replace its current value by mapping that to a key and value from the other object. In this example I have x and y which are simply giving a date...

Mapping from One Sheet to Another Fill Unfilled chracter

excel,excel-vba,printing,header,mapping
So I have one excel document that has partially filled character array ("|" shows excel column line): Current Result ("_" is a space): 1111GGH80100022190 1112QQH80100023201 1113GGH80100045201 1114AAH80100025190 So my current code outputs this above result. The problem is that characters 1-5 and 21-24 get skipped over. In general if there...

What the equivalent of activity life cycle in iOS?

android,ios,objective-c,mapping,android-lifecycle
Actually, I would say that both iOS ViewControllers and Android Activities have their lifecycle methods. For example an equivalent of ViewController.viewDidLoad() is Activity.onCreate() ? Else I still need to know the equivalent of the other : OnStart() OnRestart() OnResume() OnStop() OnDestroy() OnPause() ...

mapping SQLquery to plain Object, not Entity

java,sql-server,hibernate,mapping
I have following Java method: public void loadData() { session = DaoSF.getSessionFactory().openSession(); String sql = "select s.column1, SUM(s.column2), 'hi' as column3 from Source s group by s.column1"; Query query = session.createSQLQuery(sql).addEntity(Test.class); dataList = query.list(); } Class Source: @Entity @Table(name="SourceTable") public class Source implements Serializable { @Id private int column1; private...

When I try to map the properties for an entity (Entity Framework), I get the error the type '__' must be a non-nullable value type

c#,entity-framework,generics,mapping,nullable
My mapping class looks like the following: public class EmployeeMap : EntityTypeConfiguration<EFEmployee> { public EmployeeMap() { HasKey(t => t.Id); Property(t => t.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity); Property(t => t.HireDate).IsRequired(); //Property(t => t.JobTitle).IsRequired(); Property(t => t.Salary).IsRequired(); //Property(t => t.Certifications).IsRequired(); Property(t => t.VacationTime).IsRequired(); Property(t => t.SickTime).IsRequired(); //Property(t =>...

Azure Table Storage - TableEntity map column with a different name

azure,mapping,windows-azure-storage,azure-storage-tables
I am using Azure Table Storage as my data sink for my Semantic Logging Application Block. When I call a log to be written by my custom EventSource, I get columns similar to the ff.: EventId Payload_username Opcode I can obtain these columns by creating a TableEntity class that matches...

AutoMapper: An exception of type 'AutoMapper.AutoMapperMappingException' occurred in AutoMapper.dll but was not handled in user code

c#,mapping,automapper,dto
I have a problem like this. But this answer it didn't work for me. I am working on a little project. I have two domain model (Post, Source): public class Post { public Post() { Sources = new HashSet<Source>(); } public int Id { get; set; } public string Title...

disable the keyboard FnLock at startup

linux,keyboard,mapping
The FnLock key is activated at boot on my wired keyboard. Is there a way to disable it? Unfortunately, pressing the FnLock key is not visible through showkey nor keytouch. it is really annoying because all the F1... keyx are remapped to unwanted actions like closing the window....

There should be one non-read-only mapping defined for the primary key field

jpa,mapping,eclipselink
Hi I've the following code (using eclipselink 2.6): Transmission: @Entity public class Transmission { @Column(name="TRANSMISSION_ID") @Id private Long id; @Column(name="TRANSMISSION_CONTENT") private String content; .... } HeaderPk: @Embeddable public class HeaderPk { // this is a foreign key to "TRANSMISSION_ID" in Transmission @Column(name="FK_TRANSMISSION_ID") private Long transmissionId; @Column(name="MAILBOX_ID") private String mailboxId; @Column(name="TRANSMISSION_TIME")...

Limit path media type mappings in Jersey

java,jersey,mapping,jersey-2.0,media-type
I have configured MEDIA_TYPE_MAPPINGS for my Jersey apps. Unfortunately, this causes some trouble with a generic upload service in my app. @PUT @Path("files/{filename}") @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) public Response uploadFile( @PathParam("filename") @NotNull @Size(max = 240) String filename, DataSource dataSource) If someone uploads .../files/file.xml the extension is chopped of. Is there...

How can i set a Column in a CompositeId mapping with NHibernate

c#,visual-studio-2013,fluent-nhibernate,mapping,firebird
I have one Composite Id map with NHibernate and I want to set a column in all those Id's. Is that possibel? public class MapProduction : ClassMap<Production> { public MapProduction() { CompositeId() .KeyProperty(c => c.ProductionCode) .KeyProperty(c => c.Cycle) .KeyProperty(c => c.Crop) .KeyProperty(c => c.TechnologyLevel); Map(c => c.Area).Column("A_ARE"); Map(c => c.Productivity).Column("P_ARE");...

How to quickly map a combination of elements to another vector

algorithm,mapping
Suppose I have two set of elements, X and Y. Both sets contain tens of thousands (or more) unique elements. Any combination of elements in X, like (X1, X4, X6, X100, ...), may be mapped to zero, one or multiple elements in Y. How should I store the data in...

How to map fields correctly using XmlElement for dozer

java,mapping,dozer
I have the following field @Mapping("greatId") @XmlElement(name = "great_key") private String greatKey; So my getters and setters are getGreatKey(), and setGreatKey(..). Then my JSON do not contain the response with field "great_key". But if i add a getter getGreat_key(), then it returns the fields. I dont want to add those...

vim comment/uncomment with one mapping [duplicate]

function,vim,mapping,comments
This question already has an answer here: What's a quick way to comment/uncomment lines in Vim? 32 answers I'm new(bie) in vim. I've got the following mapping to comment my python code : nmap cc 0i#<ESC> I would like to have the same mapping to uncomment a line. I...

Dozer mapping of Lists of Complex Object

java,mapping,dozer
Is there a way to map one List of objects to one List of objects ids? I have the following objects: public class Role implements Serializable { private List<Section> sections; //getters and setters ... } public class Section { private Long id; //getters and setters ... } public class RoleDTO...

ElasticSearch null_value with an object?

elasticsearch,mapping
Is it possible to use an object for the null_value mapping in ElasticSearch? { "properties-v3": { "mappings": { "property": { "properties": { // ... omitting lots of properties for brevity "stats": { // <-- Need to populate this if null "properties": { "bookings": { "type": "long", "null_value": 0 }, "enquiries":...

org.hibernate.MappingException: Unknown entity: from xxx

hibernate,mapping,entity
I was trying to resolve issue which I posted here But, now I'm getting another issue. :( org.hibernate.MappingException: Unknown entity: from EmpTest at org.hibernate.internal.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:1095) at org.hibernate.internal.SessionImpl.getOuterJoinLoadable(SessionImpl.java:1754) at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1659) at org.hibernate.internal.CriteriaImpl.list(CriteriaImpl.java:380) at com.model.EmpModelImp.getAll(EmpModelImp.java:84) at...

Implementing shortcuts (reach) pruning while using A*

algorithm,mapping,openstreetmap,graph-theory,a-star
I am working on a project for shortest path finding. I have looked at alot of resources online to come up with a good algorithm. I am working with openstreetmap data and it's clear to me that I have to use A* algorithm. While looking for different solutions, I have...

Map alphabetic sequence to integer

ruby,mapping
I want to implement an alphabetic code which maps to an integer. For example: A = 1 B = 2 C = 3 ... Z = 26 AA = 27 AB = 28 ... BA = 53 ... ZZ = 702 What the best way to do this mapping so...

C - Memory Mapping with Multiple Processes

c,memory,mapping,mmap
I have an assignment requiring me to write a multi-processed program that works with a memory-mapped file containing a string of characters. After the parent process maps the file to memory, it spawns 2 children processes to modify the file. Child 1 outputs the contents of the file, converts the...

R Creating a Character Column from a Numeric Column w/o using For Loop

r,for-loop,mapping,character,lookup
I am trying to create a column of characters based on an existing column of numbers, preferably without using a for loop. I have come up with a variety of ways to do this, but I keep feeling like I'm making this far more complicated than it needs to be....

Restkit : getting mappingResult with “” in all requests

ios,mapping,restkit
After executing a Restkit Request with "nil" keyPath which works fine, i get its response : "<null>" = "<EstablishmentReservationsMapping: 0x7fc42d1140f0>" But i'm still getting it In all the mappingResults of the next requests, like this : "<null>" = "<EstablishmentReservationsMapping: 0x7fc42d1140f0>"; "my_establishments" = ( "<Establishment: 0x7fc42f89ae10>", "<Establishment: 0x7fc42f89b220>", "<Establishment: 0x7fc42f89b8f0>", "<Establishment:...

Combine data into smaller discrete intervals

f#,mapping,intervals,discrete-mathematics
Suppose we have a pair of input arrays, or a list of (key, value) tuples if you prefer. What's an elegant and performant way to combine values that have indices falling in a certain interval? For example, if the interval (or 'bin') size is 10 then the values of all...

Texture mapping consuming physical memory

c++,opengl,mapping,textures,glut
there's a problem with my texture mapping, when I execute the code, it run smoothly for 5-8 sec, then the framerate drop drastically, when I monitor the task manager, it seem the program consuming almost 95% of my physical memory, anybody know how to solve this problem?? I'm using visual...

Copy web-builder created website to new hosting

file-upload,mapping,hosting
I have a website created in a web-building online app (link to the app: http://www.webnode.com). The app doesn't allow me to actually view the folder structure of my web, it's something more like creating a blog using blogspot by google or similar web apps. The problem is that I want...

Entity framework fluent mapping many-to-may

c#,entity-framework,mapping,many-to-many,fluent
I'm having a problem when I try to map this model: public class Discipline { public int Id {get;set;} public string Name{get;set;} public virtual ICollection<DisciplineRequirement> Requirements {get;set;} } public class DisciplineRequirement { public int DisciplineId {get;set;} public int RequiredDiscipline {get;set;} public virtual Discipline Discipline {get;set;} public virtual Discipline RequiredDiscipline {get;set;}...

There are a subset or constraint of HTML5 that can be perfectly mapped into XHTML5, and vice-versa?

xml,html5,mapping,polyglot-markup
I need to represent content in a lingua franca, that is, in nowadays, the HTML5 standard — my objective is not to show a page in the web-browser. I need to represent only content, no interface, no layout, no logic (no Javascript). As remembered in other questions (or programmers questions),...

Mapping Json Array to Object fails

ios,json,swift,ios8,mapping
I try to convert a JSON response from the server to an object. I use Swift. This is the result of printing the server response: ( { 1 = Horst; 2 = Schnitzelhuber; 3 = "0161 2213310"; id = 0000040001; status = 2; }, { 1 = "Mar\U00f0a"; 3 =...

Mapping function in LISP

recursion,mapping,lisp
I need your help on something. I have a list in input: (1 ((2 3) (4 ((5) (6)))) ((7 8) (9 10)) 11) I want to receive in output the following: ((1 2 3 7 8 11) (1 2 3 9 10 11) (1 4 5 7 8 11) (1...

Cant overriding class when mapping with NHibernate

c#,visual-studio,nhibernate,mapping,firebird
I have one class "MyClass" mapping with NHibernate but at my database table name is upper case("MYCLASS"). I'm trying to make a integrated test, and when execute my test i got sql error ("Dynamic Sql Error"), i check the problem and my query is comming with double quotes at table...

MapperParsingException when creating mapping for elasticsearch index

elasticsearch,mapping,sense
Using sense, I'm trying to create a mapping for an index with three properties. When i try to create it i get the following response { "error": "MapperParsingException[Root type mapping not empty after parsing! Remaining fields: [mappings : {gram={properties={gram={type=string, fields={gram_bm25={type=string, similarity=BM25}, gram_lmd={type=string}}}, sentiment={type=string, index=not_analyzed}, word={type=string, index=not_analyzed}}}}]]", "status": 400 } This...