Hi
Why HttpContext.Current.User.IsInRole("Customer") returns false if the user is not logged in, I think because user is considered anonymous is this case, Correct?
Thanks
Hi All:
I have an issue with not getting the correct relative url.
Right now, say my home page is at (please ignore quotation)
"http://www.foo.com/user/home"
I have links on the homepage that should go to
"http://www.foo.com/user/home/page1"
but right now I'm getting
"http://www.foo.com/page1"
Everything worked locally, can this be fixed with modifying .htaccess and how? Thank you.
Hey all,
i use some code for inline cell editing from Apples TaggedLocations Example and im now stuck.
At the demo Code they save the changes at textFieldDidEndEditing, this works because they asume to edit only the first element in a table view.
I have to edit every row at the table view, so my problem is how to get indexPath.row to update the correct object stored in a mutableArray.
Or did i miss something?
Thanks for your help!
suppose we have simple polygon(without holes) with vertices
(v0,v1,....vn)
my aim is to determine if for given point p(x,y) any line segment connecting this point and any vertices of polygon is inside polygon or even for given two point
p(x0,y0) `p(x1,y1)`
line segment connecting these two point is inside polygon?
i have searched many sites about this ,but i am still confused,generally i think we have to compare coordinates of vertices and by determing coordinates of which point is less or greater to another point's coordinates,we could determine location of any line segment,but i am not sure how correct is this,please help me
Hi,
I want to find an element by class name. I know it will appear in a particular parent div, so rather than search the entire dom, I'd like to search only the particular div. I am trying this, but does not seem to be the correct syntax:
var element = $("#parentDiv").(".myClassNameOfInterest");
what's the right way to do that?
Thanks
I am trying to clip a 4:3 image with a circle within a grid control.
I need the circle clip to reveal the image from the middle in a perfect circle. See below.
The circle should dynamically re-size with the image.
I have tried Canvas.Clip and Ellipse+VisualBrush without achieving the correct behavior.
Thanks!
I am just starting with cpp and I've been following different examples to learn from them, and I see that buffer size is set in different ways, for example:
char buffer[255];
StringCchPrintf(buffer, sizeof(buffer), TEXT("%s"), X);
VS
char buffer[255];
StringCchPrintf(buffer, 255*sizeof(char), TEXT("%s"), X);
Which one is the correct way to use it?
I've seen this in other functions like InternetReadFile, ZeroMemory and MultiByteToWideChar.
public class TestClass{
private String divisions[] ={};
public void doAction(){
Collection testArray = new ArrayList();
// put testArray will data
divisions = (String [] ) testArray.toArray(division); //should i use this
divisions = (String [] ) testArray.toArray(new String [] {}); //should i use this?
}
}
if i use case 1, and i call doaction multiple time, the division, something will show wrong records
if i use case2, divisions will always show the correct records. is my assumption should use case 2?
Hi friends....
I have two tables.I want to get all records from one table that are different from the records in second table.
For eg.
if we have four records in first table like A,B,C,D and three records in second table thats A,B,C then the answer of query should be D.
I have tried "EXCEPT" operator but it doesnt work fine.Kindly help me in writing correct query for the given problem.
Any help is appreciated....
Thanks in Advance
Nemat
Given two DOM elements, say a and b, how can we determine which comes first in the document?
I'm implementing drag and drop for a set of elements. And the elements can be selected in any order, but when they are dragged, these elements need to be moved in the "correct" order.
I need to create a custom route to list all the rooms in a given building. So, I want the url to look something like this:
/Building/1000/Room
Which would list all the rooms in Building 1000.
Is this the correct mapping for the route (to call the IndexByBuilding method in RoomController)?
routes.MapRoute(
"RoomsByBuilding",
"Building/{id}/Room",
new { controller = "Room", action = "IndexByBuilding", id = "" }
);
Here's the query:
INSERT INTO jobemails (jobid, to, subject, message, headers, datesent) VALUES ('340', '[email protected]', 'We\'ve received your request for a photo shoot called \'another\'.', 'message', 'headers', '2010-04-22 15:55:06')
The datatypes are all correct, it always fails at the subject, so it must be how I'm escaping the values, I assume.
I'm sure one of you will see my idiot mistake right away. A little help?
consider a standard c# 'function'
public void foo()
{
//some code
}
In c or c++ this is called a 'function' - even if taking no parameters and returning no value. In another language maybe it would be a 'procedure'.
In object orientation speak it would be called a 'method' if a class member.
What would be the correct term to use in c#?
I have a bunch of elements with a classname
<p class="red"></p>
<div class="red"></div>
I cant seem to select the first element with the class="red" using the following CSS rule:
.red:first-child{
border:5px solid red;
}
What is wrong in this selector and how to correct it ??
I have seen in some other questions that using Session_ End() in Global.asax.cs is not advised. This is because if you're not using the default Session handler, Session_End won't get called, correct? Is there any other cases where it won't get called?
The big question is: If you can't depend on Session_End(), what do you do to determine when a session has closed?
I have a Java class with a property like this
private Object myObj;
When I try to save the class using Hibernate annotations, I get the rather confusing error message "property mapping has wrong number of columns".
What is the correct approach to persisting a class containing a generic property such as this?
I know this isn't the BEST practice, but every once in a while when I'm merging up a huge batch up changes with the trunk (and I know my branch is current), I will simply delete the contents of the trunk and then copy the contents of my branch up, so that I don't have to deal with resolving conflicts for an hour. The problem is that I seem to lose the entire history of commit messages for each file. My branch still has the correct history of commit messages... how can I merge them up?
I've made an routing definition like this:
routes.MapRoute("ProductSearch", "Search-{MainGroup}-{SubGroup}-{ItemType}",
new {
controller = "Product",
action = "Search",
MainGroup = "", SubGroup = "", ItemWebType = ""});
It is not working if the parameters are empty.
Actually it resolves the url, so Url.Action method resolves the path "Search-12--" but the link is not working, so the GET of the page is not working
With slashes it is working the Url.Action method makes "Search/12"
"Search/{MainGroup}/{SubGroup}/{ItemType}"
is it somehow possible to correct it?
I would like to create an Intent that opens the messages application in a specific conversation.
If a short message notification is clicked Logcat reveals the following:
INFO/ActivityManager(31909): Starting activity: Intent { act=android.intent.action.VIEW dat=content://mms-sms/conversations/3 flg=0x34000000 cmp=com.android.mms/.ui.ConversationList bnds=[0,586][600,682] }
This brought me a little bit further using content://mms-sms/conversations/3 as the data starts up the messages app in the correct conversation. I now only need to find out which conversation a message belongs to.
Hi,
I'm using lightbox to include articles in my pages (iframes), and I'm wondering how can I assign the correct height to my lightbox (wrapping the content).
I don't have access to the height of the iFrame from css or javascript for some reason.
Could you give me some help ?
thanks
I am a beginner in image processing. I want to write an application in C++ or in C# for
Searching an image in a list of images
Searching for a particular feature (for e.g. face) in a list of images.
Can anybody suggest where should I start from?
What all should I learn before doing this?
Where can I find the correct information regarding this?
For a data-binding application, I am trying to draw parallels among RelaxNG, C++ and C.
RelaxNG.Elements === C++.Class === C.Struct
RelaxNG.Attributes === C++.class-members === C.structure-members
Only that the Elements in RelaxNG can also have a data-type (i.e. it seems Attribute is a special case of the Element).
Do I have the above equivalence correct? If I use the above convention in my implementation, will I be breaking some data-binding libraries?
Hi, I was just putting some thought into different languages (as I'm reviewing for final exams coming up) and I can not think of a valid pushdown automata to handle the language A = {0^n 1^n 0^n | n = 0}. This is not a context-free language, am I correct?
I am doing an app android to login and upload photo to twitter.
I used twitter4j to login and reference some tutorial..I extract that consumer key and consumer secret key are filled correct.But I encountered an error"401: Authentication credential...".Have a solution to fix it is sync time my server with time twitter server..But I don't understand what sync time here and how to extractly..
Can you help me.