Search Results

Search found 131 results on 6 pages for 'manish'.

Page 3/6 | < Previous Page | 1 2 3 4 5 6  | Next Page >

  • Cannot use standard android color attribute in custom color selector

    - by Manish Gupta
    So, android defines the following in themes.xml: <style name="Theme"> ... <item name="colorPressedHighlight">@color/legacy_pressed_highlight</item> </style> and: <style name="Theme.Holo"> ... <item name="colorPressedHighlight">@color/holo_blue_light</item> </style> I want to use this colorPressedHighlight as the background color for my custom Button when it is pressed. So I defined the following in res/color/app_button_background.xml: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" > <item android:state_pressed="true" android:drawable="?android:colorPressedHighlight"/> <item android:drawable="@android:color/transparent" /> </selector> Finally, I define my custom ImageButton style: <style name="App_ImageButtonStyle" parent="@android:style/Widget.ImageButton"> <item name="android:gravity">center</item> <item name="android:background">@color/app_button_background</item> </style> I crash on app launch with the following call stack: 06-27 20:24:41.954: E/AndroidRuntime(532): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #6: <item> tag requires a 'drawable' attribute or child tag defining a drawable 06-27 20:24:41.954: E/AndroidRuntime(532): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:178) 06-27 20:24:41.954: E/AndroidRuntime(532): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:867) 06-27 20:24:41.954: E/AndroidRuntime(532): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:804) 06-27 20:24:41.954: E/AndroidRuntime(532): at android.content.res.Resources.loadDrawable(Resources.java:1920) I know that directly accessing @color/legacy_pressed_highlight or @color/holo_blue_light instead of accessing them through the colorPressedHighlight fixes the crash but it does not solve the problem. Themes can vary, hence I need to access it through the colorPressedHighlight attribute. PS: I had a similar problem to which I haven't found an answer yet. Can someone please help!

    Read the article

  • payment order option for payment in oscommerece

    - by manish
    Hello sir... I need PAYMENY ORDER for making payment.when customer choose payment with payment order, then he have to fill a form and submit .For oscommerece i need thid. Means,When the user reaches the page where payment information is requested we will have a option to pay using Purchase Order in the dropdown and credit card information will not be asked in this case. They will need to fill out all the information like this page https://creator.zoho.com/dmkosanke/form/7.Once this is filled an email alert will be sent and this application will show up under admin and they can check and approve it.

    Read the article

  • Does a silverlight video player always need source address in URL format only?

    - by Manish
    I have seen on many sites the silverlight video player. I noticed that all of them took a URL as the source of the video file. Can a silverlight player play a video file kept locally? I mean a simple HTML file kept in a folder with the xap (say VideoPlayer.xap) and the video (say ABC.avi) file. The html file would contain an object tag. For example: <object height="240" width="500" type="application/x-silverlight-2" data="data:application/x-silverlight,"> <param value="VideoPlayer.xap" name="source"> <param value="onSilverlightError" name="onerror"> <param value="white" name="background"> <param value="cc=true,markers=true,markerpath=markers_movie21.xml,m=ABC.avi" name="initParams"> <a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=115261"> <img style="border-style: none;" alt="Get Microsoft Silverlight" src="http://go.microsoft.com/fwlink/?LinkId=108181"> </a> </object>

    Read the article

  • ASP.Net: Writing chunks of file..HTTP File upload with resume..

    - by Manish
    Please refer to question: http://stackoverflow.com/questions/2062852/resume-in-upload-file-control Now to find a solution for the above question, I want to work on it and develop a user control which can resume a HTTP File Upload process. For this, I'm going to create a temporary file on server until the upload is complete. Once the uploading is done completely then will just save it to the desired location. The procedure I have thought of is: Create a temporary file with a unique name (may be GUID) on the server. Read a chunk of file and append it to this temp file on the server. Continue step 1 to 3 until EOF is reached. Now if the connection is lost or user clicks on pause button, the writing of file is stopped and the temporary file is not deleted. Clicking on resume again or uploading the same file again will check on the server if the file exists and user whether to resume or to overwrite. (Not sure how to check if it's the same file. Also, how to step sending the chunks from client to server.) Clicking on resume will start from where it is required to be uploaded and will append that to the file on the server. (Again not sure how to do this.) Questions: Are these steps correct to achieve the goal? Or need some modifications? I'm not sure how to implement all these steps. :-( Need ideas, links... Any help appreciated...

    Read the article

  • Does a silverlight video player always need source address in URL format?

    - by Manish
    I have seen on many sites the silverlight video player. I noticed that all of them took a URL as the source of the video file. Can a silverlight player play a video file kept locally? I mean a simple HTML file kept in a folder with the xap (say VideoPlayer.xap) and the video (say ABC.avi) file. The html file would contain an object tag. For example: <object height="240" width="500" type="application/x-silverlight-2" data="data:application/x-silverlight,"> <param value="VideoPlayer.xap" name="source"> <param value="onSilverlightError" name="onerror"> <param value="white" name="background"> <param value="cc=true,markers=true,markerpath=markers_movie21.xml,m=ABC.avi" name="initParams"> <a style="text-decoration: none;" href="http://go.microsoft.com/fwlink/?LinkID=115261"> <img style="border-style: none;" alt="Get Microsoft Silverlight" src="http://go.microsoft.com/fwlink/?LinkId=108181"> </a> </object>

    Read the article

  • AutoCompleteExtender not working for WebService hosted on IIS 7

    - by Manish
    I have a web service file in my project having a web method which is used for AutoCompleteExtender and which works fine when I debug it from VS. But when I publish and host it on IIS, it's not working properly. However, I tested the webservice method directly by typing the URL and it gave the desired output. Is their a special setting needs to be done in IIS to make it working or any property of AutoCompleteExtender need to be set?

    Read the article

  • creating enumeration using .NET's CodeDom

    - by Manish Sinha
    Hi, I want to create an Enumeration using CodeDom API. I have searched enough on the internet and I get results which are hardly of any use. What I want to generate is public enum bug_tracker_type { [Description("Bugzilla")] Bugzilla, [Description("Debbugs")] Debbugs, [Description("PHP Project Bugtracker")] PHP_Project_Bugtracker, [Description("Google Code")] Google_Code } I used CodeTypeDeclaration and set it's IsEnum property as true, created a name, and set it's Attributes. Now the biggest problem is how to populate the body? I tried CodeTypeMember mem = new CodeTypeMember(); mem.Name = WadlSharpUtils.CreateIdentifier(discreteValue.value); mem.CustomAttributes.Add(new CodeAttributeDeclaration(discreteValue.value)); // enumCandidate is an instance of CodeTypeDeclaration enumCandidate.Members.Add(mem); Though using this solution I can generate the Description attributes, the end of line would be ; and not ,

    Read the article

  • Creating DescriptionAttribute on Enumeration Field using System.Reflection.Emit

    - by Manish Sinha
    I have a list of strings which are candidates for Enumerations values. They are Don't send diffs 500 lines 1000 lines 5000 lines Send entire diff The problem is that spaces, special characters are not a part of identifiers and even cannot start with a number, so I would be sanitizing these values to only chars, numbers and _ To keep the original values I thought of putting these strings in the DescriptionAttribute, such that the final Enum should look like public enum DiffBehvaiour { [Description("Don't send diffs")] Dont_send_diffs, [Description("500 lines")] Diff_500_lines, [Description("1000 lines")] Diff_1000_lines, [Description("5000 lines")] Diff_5000_lines, [Description("Send entire diff")] Send_entire_diff } Then later using code I will retrieve the real string associated with the enumeration value, so that the correct string can be sent back the web service to get the correct resource. I want to know how to create the DescriptionAttribute using System.Reflection.Emit Basically the question is where and how to store the original string so that when the Enumeration value is chosen, the corresponding value can be retrieved. I am also interested in knowing how to access DescriptionAttribute when needed.

    Read the article

  • How to validate smtp credentials before sending mail in C# ?

    - by Manish Gupta
    I need to validate the username and password set in SmtpClient object before sending mail. Here is the code sample: SmtpClient client=new SmtpClient(host); client.Credentials=new NetworkdCredentials(username,password); client.UseDefaultCredentials=false; //Here I need to verify the credentials(i.e. username and password) client.Send(mail); Thanks in advance.....

    Read the article

  • In cakePHP, how to retrieve joined result from multiple tables

    - by Manish Sharma
    Hi, can anyone tell me, how to retrieve joined result from multiple tables in cakePHP ( using cakePHP mvc architecture). For example, I have three tables to join (tbl_topics, tbl_items, tbl_votes. Their relationship is defined as following: a topic can have many items and an item can have many votes. Now I want to retrieve a list of topics with the count of all votes on all items for each topic. The SQL query for this is written below: SELECT Topic.*, count(Vote.id) voteCount FROM tbl_topics AS Topic LEFT OUTER JOIN tbl_items AS Item ON (Topic.id = Item.topic_id) LEFT OUTER JOIN tbl_votes AS Vote ON (Item.id = Vote.item_id); My problem is I can do it easily using $this-><Model Name>->query function, but this requires sql code to be written in the controller which I don't want. I'm trying to find out any other way to do this (like find()).

    Read the article

  • inline assembly error

    - by Manish
    I am using inline assembly for iphone, I working for device debug mode. The instruction is as follows: __asm__("smlatb %0, %1, %2 ,%3 \n\t": "=r"(Temp): "r"(treg5) : "r"(fac5) : "r"(Temp) ); And I am getting an errors: error : expected ')' before tokedn '(' error: unknown register name 'r' in 'asm' I am using X-code 3.0 and gcc 4.0. Any ideas?

    Read the article

  • Threading: problem with checkbox's visibility

    - by Manish
    In a C#.NET windows application I set the visibility of the checkbox to false: checkBoxLaunch.Visible = true; I started a thread. Thread th = new Thread(new ThreadStart(PerformAction)); th.IsBackground = true; th.Start(); The thread performs some stuff and sets the visibility to true private void PerformAction() { /* . .// some actions. */ checkBoxLaunch.Visible = true; } But after the thread finishes it's task, the check box is not visible to me.. :( What am I missing??

    Read the article

  • .Net: Adding files and folders to SETUP Project programmatically

    - by Manish
    So, here is the scenario: I want to create a installer which would just dump few files and folders at a location specified by user. But the problem is these files are required to be picked up from a fixed source folder and then the installer is build. Also, these files may change any time and then again a new version of the installer is required to be created. So this needs to be done programmatically. Also, how can I add some coding stuff in setup projects? (New to SETUP PROJECTS) How? Any ideas/comments appreciated...

    Read the article

  • How to set parameters of CGContextAddArcToPoint method using a slider

    - by Manish Sahni
    am making an app in which i have to control a smile of a face like graphics. For example if i slide the slider down(to a value less than middle) it should give the arc a sad face(like :-( ) effect and if i slide the slider up the arc should give the effect of smile(like :-) ).initially lips are like :-| . I need to control the lips which is an arc using a slider? smileSliderViewController.h #import <UIKit/UIKit.h> @interface smileSliderViewController : UIViewController { IBOutlet UISlider *slider; } -(IBAction)valueChange:(id)sender; @end smileSliderViewController.m #import "smileSliderViewController.h" //#import "smile.h" @implementation smileSliderViewController -(IBAction)valueChange:(id)sender { int value = (int)(slider.value); if(value>0 && value<25) { //value--; CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloat components[] = {0.0,0.0,1.0,1.0}; CGColorRef color = CGColorCreate(colorspace, components); CGContextSetStrokeColorWithColor(context, color); CGContextMoveToPoint(context, 120,180); CGContextAddArcToPoint(context, 190 , 170, 270, 200, 0 ); CGContextStrokePath(context); } } smile.h #import <UIKit/UIKit.h> #import "smile.m" @interface smile : UIView { IBOutlet UISlider *slider; } @end smile.m #import "smile.h" #import "smileSliderViewController.h" @implementation smile - (id)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { // Initialization code } return self; } - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); CGContextSetLineWidth(context, 2.0); //CGContextSetStrokeColor(context, [UIColor redColor].CGColor); CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB(); CGFloat components[] = {0.0,0.0,1.0,1.0}; CGColorRef color = CGColorCreate(colorspace, components); CGContextSetStrokeColorWithColor(context, color); CGRect rectangle = CGRectMake(60, 20, 200,200); CGContextAddEllipseInRect(context, rectangle); CGContextStrokePath(context); /*CGRect rectangle1 = CGRectMake(130,170,50,10); CGContextAddRect(context,rectangle1); CGContextStrokePath(context);*/ /*CGContextMoveToPoint(context,100,200); CGContextAddArcToPoint(context,120,150,400,150,70 ); CGContextStrokePath(context);*/ /*CGContextMoveToPoint(context, 100,100); CGContextAddArcToPoint(context, -100,200, -400,200, 80); CGContextStrokePath(context);*/ CGContextSetStrokeColorWithColor(context,color); CGRect rectangle2 = CGRectMake(80, 90, 50, 8); CGContextAddEllipseInRect(context, rectangle2); CGContextStrokePath(context); CGContextSetStrokeColorWithColor(context,color); CGRect rectangle3 = CGRectMake(180, 90, 50, 8); CGContextAddEllipseInRect(context, rectangle3); CGContextStrokePath(context); CGContextSetStrokeColorWithColor(context,color); CGContextMoveToPoint(context, 155,120); CGContextAddLineToPoint(context, 155,160); CGContextStrokePath(context); /*CGContextSetStrokeColorWithColor(context, color); CGRect rectangle4 = CGRectMake(130, 180, 50,8); CGContextAddEllipseInRect(context, rectangle4); CGContextStrokePath(context);*/ /*CGContextSetStrokeColorWithColor(context,color); CGContextMoveToPoint(context, 120,180); CGContextAddLineToPoint(context, 190,180); CGContextStrokePath(context);*/ int value = (int)(slider.value); if(value == 25) { CGContextMoveToPoint(context, 120,180); CGContextAddArcToPoint(context, 190 , 180, 250 , 180, 0 ); CGContextStrokePath(context); } }

    Read the article

  • Saving Types generated via Reflection.Emit as code file (.cs) instead of saving it in .dll files

    - by Manish Sinha
    Before start let me tell my experience: I am experienced with C#.NET, web services, XML part and few more. Reflection is something new to me, though I have read extensively on it and tried out some experimental code, but haven't made anything great using reflection I checked out many examples of how we can create Type at runtime and then which can be saved in an assembly (.dll) files. Of all the examples I have seen is about saving the created types in the .dll files instead of code file. Isn't there any way to create the code file out of reflection? I need to create code file since I want to distribute code instead of compiled assemblies. What I want to do is something like xsd.exe does, either spit out a .dll or the code file(in any language). Isn't there any way to create a code file, since most of the place I can find is AssemblyBuilder ab = System.AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.Save); and then lastly ab.Save("QuoteOfTheDay.dll");

    Read the article

  • video API iphone

    - by Manish
    Hi, I want to play H.264 video streamed from network. To play video iphone provides the media player API. Does anyone one aware of any documented or undocumented API for decoding and playing single video frame?

    Read the article

  • cookies handling on webrequest and response

    - by manish patel
    I have created a application that has a function mainpost. It is created to post data on a https sites. Here I want to handle cookies in this function. How can I do this task? public string Mainpost(string website, string content) { // this is what we are sending string post_data = content; // this is where we will send it string uri = website; // create a request HttpWebRequest request = (HttpWebRequest) WebRequest.Create(uri); request.KeepAlive = false; request.ProtocolVersion = HttpVersion.Version10; request.Method = "POST"; // turn our request string into a byte stream byte[] postBytes = Encoding.ASCII.GetBytes(post_data); // this is important - make sure you specify type this way request.ContentType = "application/x-www-form-urlencoded"; request.ContentLength = postBytes.Length; Stream requestStream = request.GetRequestStream(); // now send it requestStream.Write(postBytes, 0, postBytes.Length); requestStream.Close(); // grab te response and print it out to the console along with the status // code HttpWebResponse response = (HttpWebResponse)request.GetResponse(); string str = (new StreamReader(response.GetResponseStream()).ReadToEnd()); Console.WriteLine(response.StatusCode); return str; }

    Read the article

  • Writing a .wmv file using WMA sf filter

    - by Manish
    Hi I am trying to create an output .wmv file using WM Asf writer filter.Here is my code . IBaseFilter* pASFWriter; CoCreateInstance(CLSID_WMAsfWriter,NULL,CLSCTX_INPROC_SERVER,IID_IBaseFilter,(void**) (&pASFWriter)); pGraphBuilder-AddFilter(pASFWriter,L"FileWriter"); IFileSinkFilter *pSink2=NULL; pASFWriter-QueryInterface(IID_IFileSinkFilter,(void**)&pSink2); pSink2-SetFileName(OUTFILENAME,NULL); All of the above return S_OK however there is no file created .I am not able to understand why this is so?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >