profile

How to scan and auto-configure profiles in AutoMapper?

浪子不回头ぞ 提交于 2019-12-02 17:12:15
Is there any way to auto-configue Automapper to scan for all profiles in namespace/assembly? What I would like to do is to add mapping profiles to AutoMapper from given assembly filtered by given interface, something like Scan Conventions in StructureMap: public static void Configure() { ObjectFactory.Initialize(x => { // Scan Assembly x.Scan( scanner => { scanner.TheCallingAssembly(); scanner.Convention<MyCustomConvention>(); scanner.WithDefaultConventions(); }); // Add Registries x.AddRegistry(new SomeRegistry()); }); Debug.WriteLine(ObjectFactory.WhatDoIHave()); } public class

measuring time of a profiled “Sleep” function

微笑、不失礼 提交于 2019-12-02 13:03:18
问题 A few days ago I posted this question: measuring time of a profiled function (I hope it's ok i'm opening a new thread, I just can't find the old one in the few first pages) I noticed that in my profiled process, I call a "Sleep" method - and this is the problem... When I call SuspendThread/ResumeThread - The Sleeping process pauses, but in reality - time moves on! I figure that "Sleep" is just some kind of a loop that takes the time and stops whenever the difference between the start time and

基于maven的ssh框架一步一步搭建(二)

旧街凉风 提交于 2019-12-01 21:46:40
五、配置profile 1、profile是用来做什么的 Profile能让你为一个特殊的环境自定义一个特殊的构建;profile使得不同环境间构建的可移植性成为可能。不同的构建环境是什么意思?构建环境的两个例子是产品环境和开发环境。当你在开发环境中工作时,你的系统可能被配置成访问运行在你本机的开发数据库实例,而在产品环境中,你的系统被配置成从产品数据库读取数据。Maven能让你定义任意数量的构建环境(构建profile),这些定义可以覆盖pom.xml中的任何配置。你可以配置你的应用程序,在“开发”profile中,访问本地的开发数据库实例,在“产品”profile中,访问产品数据库。Profile也可以通过环境和平台被激活,你可以自定义一个构建,它根据不同的操作系统或者不同的JDK版本有不同的行为。 ---《maven权威指南》 我的理解是一个profile就是一种构建环境,我们可以通过激活我们自定义的构建环境来覆盖已有的maven环境配置。 2、配置pom.xml添加properties 和profile <profiles> <profile> <id>dev</id> <properties> <db.url>jdbc:mysql://localhost:3306/ddd</db.url> </properties> </profile> <profile> <id

Where did the “Profile or Debug APK…” option disappear to in Android Studio 3.4.1?

一世执手 提交于 2019-12-01 19:44:52
问题 Android Studio used to have the option to debug existing APKs from the File->Profile or Debug APK . I have used it in Android Studio version 3.4. Now at version 3.4.1, I cannot find it. Does anyone know if the option was removed from Android Studio or where can I find it? 回答1: I had this same issue and here's how I solved it. I had disabled APK and NDK support in hopes that it would speed up my IDE. I forgot to turn them back on. So I went into Preferences > Plugins and if you don't have them

how to use Profile.GetProfile() in a library class?

二次信任 提交于 2019-12-01 19:38:23
I cant figure out how to use Profile.GetProfile() method in a library class. I tried using this method in a Page.aspx.cs and it worked perfectly. How can I make a method that works in the page.aspx.cs, work in the class library. In ASP.NET, Profile is a hook into the HttpContext.Current.Profile property, which returns a dynamically generated object of type ProfileCommon, derived from System.Web.Profile.ProfileBase . ProfileCommon apparently includes a GetProfile(string username) method, but you wont find it documented officially in MSDN (and it wont show up in intellisense in visual studio)

Maven profiles are not considered in Eclipse

纵然是瞬间 提交于 2019-12-01 16:13:29
I have three profiles defined in my pom.xml: <profiles> <profile> <id>ABC</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <url.base>http://server1.de</url.base> <url.searchevse>/search</url.searchevse> <url.reservation>/reservation</url.reservation> <url.cancelation>/reservation/cancel</url.cancelation> <xxx.devmode>false</xxx.devmode> </properties> </profile> <profile> <id>XYZ</id> <properties> <url.base>http://server2.de</url.base> <url.searchevse>/cns/search</url.searchevse> <url.reservation>/cns/reservation</url.reservation> <url.cancelation>/cns/cancel

Maven profiles are not considered in Eclipse

北慕城南 提交于 2019-12-01 14:19:54
问题 I have three profiles defined in my pom.xml: <profiles> <profile> <id>ABC</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <url.base>http://server1.de</url.base> <url.searchevse>/search</url.searchevse> <url.reservation>/reservation</url.reservation> <url.cancelation>/reservation/cancel</url.cancelation> <xxx.devmode>false</xxx.devmode> </properties> </profile> <profile> <id>XYZ</id> <properties> <url.base>http://server2.de</url.base> <url.searchevse>/cns

Error when trying to create archive of iOS app: “Unable to create a provisioning profile because your team has no devices registered.”

倖福魔咒の 提交于 2019-12-01 11:36:17
I am trying to create an archive of an iOS app with Xcode to submit it to the App Store. However, the following error message pops up when I select 'iOS Device' as target and click on Product - Archive: Unable to create a provisioning profile because your team has no devices registered in the Member Center. Please connect a device, enable it for development, and add it to the Member Center using the Organizer. The same error message also appears when I click the "Fix Issue" button on the app settings page where it tells me that there are no provisioning profiles installed. There seem to be the

ASP.NET SQL Profile Provider - Does the ProfileBase.Create() method hit DB?

爱⌒轻易说出口 提交于 2019-12-01 07:38:27
I am working with the SQLMemebershipProvider and using Profiles. I have a custom class called UserProfile that inherits from the ProfileBase class and I use this to set custom properties like "FullName". I am wanting to loop through all the users in the database and get access to their profile properties. On each iteration I am calling ProfileBase.Create() to get a new profile and then access the properties. It looks to me like every time ProfileBase.Create() is called it hits my SQL database. But I am just looking for confirmation of this. So, does anyone know if this does in fact hit the DB

GetLocalTime() API time resolution

本秂侑毒 提交于 2019-12-01 05:20:31
I need to find out time taken by a function in my application. Application is a MS VIsual Studio 2005 solution, all C code. I used thw windows API GetLocalTime(SYSTEMTIME *) to get the current system time before and after the function call which I want to measure time of. But this has shortcoming that it lowest resolution is only 1msec. Nothing below that. So I cannot get any time granularity in micro seconds. I know that time() which gives the time elapsed since the epoch time, also has resolution of 1msec (No microseconds) 1.) Is there any other Windows API which gives time in microseconds