profile

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

久未见 提交于 2019-12-01 05:09:21
问题 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

How to use a function defined in a bash profile in a bash script?

[亡魂溺海] 提交于 2019-12-01 05:01:41
问题 I have a Projection function in my bash_profile. Now I am trying to call this function from a bash script however I get a not found error. How do I make the projection function visible to the bash script? 回答1: You must export the function export -f foo ref 回答2: The sane but not necessarily elegant approach is to put the function in a separate file, and source it from your profile and from your script. You need to export the function if you want to make it available to all your scripts, but --

GetLocalTime() API time resolution

醉酒当歌 提交于 2019-12-01 02:40:53
问题 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

ASP.NET built in user profile vs. old style user class/tables

故事扮演 提交于 2019-12-01 02:12:53
I am looking for guidance regarding the best practice around the use of the Profile feature in ASP.NET. How do you decide what should be kept in the built-in user Profile, or if you should create your own database table and add a column for the desired fields? For example, a user has a zip code, should I save the zip code in my own table, or should I add it to the web.config xml profile and access it via the user profile ASP.NET mechanism? The pros/cons I can think of right now are that since I don't know the profile very well (it is a bit of a Matrix right now), I probably can do whatever I

Connection to specific HID profile bluetooth device

为君一笑 提交于 2019-12-01 00:21:38
I connect bluetooth barcode scanner to my android tablet. barcode scanner is bonded with android device as a input device - HID profile. it shows as keyboard or mouse in system bluetooth manager. i discovered that bluetooth profile input device class exist but is hidden. class and btprofile constants have @hide annotaions in android docs. hidden class: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.3.1_r1/android/bluetooth/BluetoothInputDevice.java here they should be also 3 other constants developer.android.com/reference/android/bluetooth

Windows API for Creating User Profile

六月ゝ 毕业季﹏ 提交于 2019-11-30 17:37:51
问题 I'm trying to find the Window API for creating user profile. I'm creating local user in windows, and i'm trying to run process with this user using CreateProcessWithLogonW with LOGON_WITH_PROFILE flag set. Since the profile does not exist (the user was not interactively logged on yet) the CreateProcessWithLogonW fails. When performing interactive logon with this user and then running the program it works. Anyone knows how can I create user profile using Win32 API? Thanks! Lior 回答1: Try with

Activation of maven profile based on multiple properties

三世轮回 提交于 2019-11-30 08:00:00
I am creating a maven 2 build for a project and I came up with profiles since the build has to be created for both different locations (say Berlin, Paris, North Pole) and different environment (Development, Production). Those are specified via properties. So for "North Pole" "DEV" I do: -Dlocation=NorthPole -Denvironment=DEV Now I would like to acivate my porfile based on both these properties, not just one. So I tried following: <profiles> <profile> <id>NOrth Pole DEV</id> <activation> <property> <name>location</name> <value>NorthPole</value> </property> <property> <name>environment</name>

Android - get facebook profile picture

心已入冬 提交于 2019-11-30 06:13:11
问题 I don't know why, but I am always getting null when I try to get the profile picture of the user. Do I need to set some specific permissions to get access? Below is my method: public static Bitmap getFacebookProfilePicture(String userID) throws SocketException, SocketTimeoutException, MalformedURLException, IOException, Exception { String imageURL; Bitmap bitmap = null; imageURL = "http://graph.facebook.com/"+userID+"/picture?type=large"; InputStream in = (InputStream) new URL(imageURL)

How write a program to connect to a a2dp bluetooth device using pre 3.0 Android?

给你一囗甜甜゛ 提交于 2019-11-30 05:32:43
My application needs to connect to a a2dp device over bluetooth and I want to "be able to query for the visible bluetooth devices, then, select a a2dp device and have it 'connect via a2dp' so that audio starts playing through the connected device" but my phone is running gingerbread (2.3.3). I went through the basic bluetooth tutorial at http://developer.android.com/guide/topics/wireless/bluetooth.html and got to the part I need to connect to the bluetooth device and then I read the bottom of the page: "Starting in Android 3.0, the Bluetooth API includes support for working with Bluetooth

C# memory profile

狂风中的少年 提交于 2019-11-30 05:30:34
问题 I'm trying to perform some memory profiling on an applications that is accumulating large amounts of memory. I have found this tool (CLRProfiler): http://msdn.microsoft.com/en-us/library/ff650691.aspx But it does not seem to be working. When I run it, it sits forever at "Waiting for application to start common language runtime". Any other suggestions on how I can profile memory in C#? 回答1: Check out Redgate: http://www.red-gate.com/products/dotnet-development/ants-memory-profiler/ 回答2: If you