Search Results

Search found 524 results on 21 pages for 'amit ron'.

Page 12/21 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Android AppWidget TextView: How to set background color at run time

    - by Amit
    I am trying to create an AppWidget, in which the background color of a TextView changes at random at specified periodic interval. The TextView is defined in layout xml file as <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widget" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/message" android:background="#ff99ff" android:text="Hello Widget" /> </LinearLayout> In update method, i have loaded the layout as RemoteViews remoteView=new RemoteViews(context.getPackageName(),R.layout.widget_message); To change the background of TextView i used the following statement remoteView.setInt(R.id.message, "setBackgroundResource", R.color.col_1); But i am getting a widget saying problem loading widget. If i remove the above line everything works fine. LogCat says: updateAppWidget couldn't find any view, using error view android.widget.RemoteViews$ActionException: view: android.widget.TextView can't use method with RemoteViews: setBackgroundResource(int)

    Read the article

  • HTML parsing - fetch and update data from the .html file

    - by Amit Jain
    I have a form in a .html files where input/select box looks like this <input type="text" id="txtName" name="txtName" value="##myName##" /> <select id="cbGender" name="cbGender"> <option>Select</option> <option selected="selected">Male</option> <option>Female</option> </select> I would need to remove '##' value textbox and also update them with different values if needed be in the textbox/checkbox/ selectbox. I would know the id of the input types. The code is to be written in groovy. Any ideas?

    Read the article

  • How do I make UITableViewCellAccessoryDisclosureIndicator visible in black background?

    - by Amit Vaghela
    Hi I wrote this cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; in this method - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; but I can only see it when I select that cell otherwise it's not visible.and it work perfectly when background is white. I am sure that I need to set a property, but I don't know which property I need to change to make this thing work. thanks in advance. cheers.

    Read the article

  • Prevent onbeforeunload from being called when clicking on mailto link

    - by Amit
    Is there anyway to prevent onbeforeunload from being called when clicking on mailto link in chrome. In FF, Safari, IE it is working fine. <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"> google.load("jquery", "1.3.2"); </script> <script type="text/javascript"> $(document).ready(function(){ window.onbeforeunload = confirmExit; }); function confirmExit() { return "Are you sure?"; } </script> </head> <body> <a href="mailto:[email protected]?subject=test mail&body=Hello%20World">Mail Link</a> </body> </html>

    Read the article

  • Parsing and getting specific values from CSV string

    - by Amit Ranjan
    I am having a string in CSV format. Please see my earlier question http://stackoverflow.com/questions/2865861/parsing-csv-string-and-binding-it-to-listbox I can add new values to it by some mechanism. Everything will be same except the new values will have numeric part = 0. Take example I have this exsiting CSV string 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt Now by some mechanism i added two more files Superman.txt and Spiderman.txt to the existing string. Now it became 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt What i am doing here is that this csv string is paased into SP where its splitted and inserted to db. So for inserting I have to take the files with numeric part 0 only rest will be omiited .Which will be further then converted into CSV string Array will look like this str[0]="1" str[1]="abc.txt" str[2]="2" str[3]="def.doc " str[4]="3" str[5]="flyaway.txt" str[6]="0" str[7]="Superman.txt" str[8]="0" str[9]="Spiderman.txt" So at last i want to say my input will be 1 , abc.txt , 2 , def.doc , 3 , flyaway.txt, 0, Superman.txt, 0 , Spiderman.txt Desired Output: 0, Superman.txt, 0 , Spiderman.txt

    Read the article

  • Datetime Format Setting In SSRS

    - by Amit
    We have a requirement where date time values would be passed to the report parameter which is of "String" date type (and not "DateTime"). The report parameter would be a queried one i.e. it would have a list of values in which the passed value should fall in. The strange part is that if the date time value passed to this parameter is passed in this format mm/dd/yyyy hh:mm:ss AM/PM then only it succeeds otherwise a error is displayed (If month/date/hour/minute/second is having a single digit value then we need to pass single digit value to parameter as well). Assuming that the report server picks this format from the "regional settings" in control panel, we tried modifying the date & time formats as yyyy-mm-dd & HH:mm:ss but the outcome was the same. On researching more I found some suggestions specifying to change the language property in the rdl (I was not able to figure out how) but this would not be the solution I am looking for. I also found another topic here but it didn't provide the solution but it didn't provide the solution we are looking for. I need to understand on if this format is controlled by the report server & is it configurable. It would be great if someone can provide some guidance. Thanks.

    Read the article

  • About "If.." in Scheme (plt-scheme)

    - by Amit
    I had a pretty simple requirement in my Scheme program to execute more than one statement, in the true condition of a 'if'. . So I write my code, something like this: (if (= 1 1) ((expression1) (expression2)) ; these 2 expressions are to be executed when the condition is true (expression3) ) Obviously, the above doesn't work, since I have unintentionally created a # procedure with # arguments. So, to get my work done, I simply put the above expressions in a new function and call it from there, in place of the expression1, expression2. It works. So, my point here is: is there any other conditional construct which may support my requirement here?

    Read the article

  • CakePHP session sharing between two apps, on the same domain

    - by Amit Yadav
    I am having two cakephp application working on the same domain. I access them like localhost:8080/wishlist & localhost:8080/lighthouse The wishlist is a separate cakePHP application and the lighthouse is a separate CakePHP application. The login page is at localhost:8080/lighthouse, now i want the session generated by the lighthouse application to be used in the wishlist application. The directory structure is /htdocs /wishlist /app /config .... /lighthouse /app /config .... I have edited the core.php file for both the application. I am using the same session cookie name and the same security sale but i am not able to get the session on the wishlist application. Can some one let me know how can i share session in between my two application.

    Read the article

  • Get HTTP header fields only on iPhone

    - by amit
    I want to get only the headers of an URL request. I have been using stringWithContentsOfURL() for all downloading so far, but now I am only interested in the headers and downloading the entire file is not feasible as it is too large. I have found solutions which show how to read the headers after the response has been receieved, but how do I specify in the request that I only wish to download headers. Skip the body! Thanks.

    Read the article

  • Using If Else in HTML page inside <%# %>tags

    - by Amit Ranjan
    I have to set image on the basis of fields value coming from db. I want it to achieve via. tags <%# %. For example i have collection binded with grid. It has a Field called Online which is boolean. So if the value of Online is true then the green.png will be set as path of asp:image control else grey.png will be the path of the asp: image control.

    Read the article

  • detect face from image and crop face from that photo

    - by Siddhpura Amit
    I have done coding in that i am successfully getting face with rectangle drawing now i want to crop that rectangle area. if there are many rectangle( mean many faces) than user can select one of the face or rectangle and that rectangle areal should be cropped can any body help me... Below is my code class AndroidFaceDetector extends Activity { public String path; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Bundle bundle = this.getIntent().getExtras(); path = bundle.getString("mypath"); setContentView(new myView(this)); } class myView extends View { private int imageWidth, imageHeight; private int numberOfFace = 5; private FaceDetector myFaceDetect; private FaceDetector.Face[] myFace; float myEyesDistance; int numberOfFaceDetected; Bitmap myBitmap; public myView(Context context) { super(context); System.out.println("CONSTRUCTOR"); System.out.println("path = "+path); if (path != null) { BitmapFactory.Options BitmapFactoryOptionsbfo = new BitmapFactory.Options(); BitmapFactoryOptionsbfo.inPreferredConfig = Bitmap.Config.RGB_565; myBitmap = BitmapFactory.decodeFile(path, BitmapFactoryOptionsbfo); imageWidth = myBitmap.getWidth(); imageHeight = myBitmap.getHeight(); myFace = new FaceDetector.Face[numberOfFace]; myFaceDetect = new FaceDetector(imageWidth, imageHeight, numberOfFace); numberOfFaceDetected = myFaceDetect.findFaces(myBitmap, myFace); } else { Toast.makeText(AndroidFaceDetector.this, "Please Try again", Toast.LENGTH_SHORT).show(); } } @Override protected void onDraw(Canvas canvas) { System.out.println("ON DRAW IS CALLED"); if (myBitmap != null) { canvas.drawBitmap(myBitmap, 0, 0, null); Paint myPaint = new Paint(); myPaint.setColor(Color.GREEN); myPaint.setStyle(Paint.Style.STROKE); myPaint.setStrokeWidth(3); for (int i = 0; i < numberOfFaceDetected; i++) { Face face = myFace[i]; PointF myMidPoint = new PointF(); face.getMidPoint(myMidPoint); myEyesDistance = face.eyesDistance(); canvas.drawRect((int) (myMidPoint.x - myEyesDistance), (int) (myMidPoint.y - myEyesDistance), (int) (myMidPoint.x + myEyesDistance), (int) (myMidPoint.y + myEyesDistance), myPaint); } } } } }

    Read the article

  • How to estimate the contribution of an individual to a software project?

    - by Amit Kumar
    I work on a software project and would like to estimate the percentage out of the total contribution that I have put in the development of the software. Is there some tool doing this? Such a tool can be useful for appraisals or negotiations, for example. After all, we work for money (yes, not only money, put the point remains). I think there is enough hand-waving for the most important things. The estimation is very subjective (at least to me now) but I do not know of any tool that provides even a subjective estimate. I know of Sloccount that spells out the total effort using the lines of code but not on per-developer basis. My idea of an ideal tool for this purpose would: measure the complexity of the code (more complex is more effort, but more effort is not necessarily more contribution) measure the decomposibility/flexibility of the software (more decomposable is better) how much library code is used -- using library code speeds up the development process, increases the associated risk and requires the developer to know from before or learn about the library. be intelligent enough to differentiate between "who wrote the code", "who copied the code" and "who indented the code". It is difficult to differentiate between the complexity in the implementation and the intrinsic complexity of the problem. Perhaps a comparison can be made with an equivalent open source counterpart if there is, or for each submodule separately. If there is no such tool, is there no merit in having such a tool? Or do you believe in "I do work, I do not measure"? It takes time after all. Perhaps the project manager should do this estimation continuously, say, weekly. Are there any standards? Yes, standardization is difficult because every project has a different goal, but difficult does not mean it is not useful.

    Read the article

  • login problem with ajax

    - by Amit
    i have created login page which sends ajax request to a php page for login verification. On that php page i m creating session, and sending response as per login verification. if user is authenticated i m redirecting it to home page from java script from where i send ajax. but on that homepage i cant get that session object... why? can u tell me solution to retrieve that session on home page

    Read the article

  • Memory Allocation Profiling in C++

    - by Amit Kumar
    I am writing an application and am surprised to see its total memory usage is already too high. I want to profile the dynamic memory usage of my application: How many objects of each kind are there in the heap, and which functions created these objects? Also, how much memory is used by each of the object? Is there a simple way to do this? I am working on both linux and windows, so tools of any of the platforms would suffice. NOTE: I am not concerned with memory leaks here.

    Read the article

  • webpage accessibility

    - by amit upadhyay
    hi, i have a strange requirement. I want to access a page on my site through a link say www.abc.com/downloads/file.txt but i also want that if anybody enters only www.abc.com/downloads it should not be accessible or it should display access denied. How can i do that???????

    Read the article

  • validator="" attribute of <h:inputtext> in jsf causing exception

    - by Amit
    We are trying to migrate from WS5 to WAS7 and the jsf code is causing the following error Original Exception: Error Message: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: JSPG0301E: Invalid attribute, validator, for deferred method returning void. Error Code: 500 Target Servlet: /jsp/listView/listViewUPD_MAP_UM01.jsp Error Stack: com.ibm.ws.jsp.translator.JspTranslationException: JSPG0227E: Exception caught while translating /jsp/listView/listViewUPD_MAP_UM01.jsp: JSPG0301E: Invalid attribute, validator, for deferred method returning void. at com.ibm.ws.jsp.translator.visitor.generator.BaseTagGenerator.evaluateAttribute(BaseTagGenerator.java:527)

    Read the article

  • Dividing a Video into Frames and Sending Frames to Streams

    - by Amit Kumar
    I have to implement a "demux" that divides up a video stream and sends each frame to one of multiple output streams in a round-robin fashion. I am trying to implement the demux as follows. The video stream contains one frame after another and is implemented via a java InputStream. Each frame has a frame header followed by the image data. The demux needs to read the frame header to know the size of the image data. The image data can then be redirected from the input video stream to one of the output streams (java OutputStream). My problem is about how to implement this redirection. That is, connect the InputStream to the OutputStream to send N bytes (here N is the size of the image data), and then disconnect and connect to another OutputStream. I have seen the interface of PipedInputStream etc but they do not seem to implement the disconnection.

    Read the article

  • Interpretation of empty User-agent

    - by Amit Agrawal
    How should I interpret a empty User-agent? I have some custom analytics code and that code has to analyze only human traffic. I have got a working list of User-agents denoting human traffic, and bot traffic, but the empty User-agent is proving to be problematic. And I am getting lots of traffic with empty user agent - 10%. Additionally - I have crafted the human traffic versus bot traffic user agent list by analyzing my current logs. As such I might be missing a lot of entries in there. Is there a well maintained list of user agents denoting bot traffic, OR the inverse a list of user agents denoting human traffic?

    Read the article

  • how to udate window controls(NSTextField,NSCheckbox and etc) in binding manually

    - by Amit
    Hi, I am working on an application in which i need to store all the NSObject subclass properties into plist file and then allow users to store it and restore it. We call it profile and it can restore the saved state of all the controls/views on the window in my application. I have completed the storing/Restoring part, but the issue is when i am updating the class properties manually, it is not updating the control state Like checkboxs and others which is bind with the class property. Please let me know how can i update the controls state, if its KVC/KVO updated programatically. Thanks in advance

    Read the article

  • how to get textfield data in win32-gui perl

    - by amit
    hi i want to store textfield data in a variable but my code is not working here is my code use Win32::GUI(); my $W1 = Win32::GUI::Window-new( -name = "W1", -title = "First Window", -pos = [ 100, 100 ], -size = [ 300, 200 ], ); $W1-AddButton( -name = "ButtonW1", -text = "Enter Chipname", -pos = [ 87, 100 ], #-ok = 1, ); $W1-AddTextfield( -name = "chipfield", -left = 20, -top = 40, -width = 250, -height = 20, # -prompt = ["Mix ",30], ); $W1-Show(); Win32::GUI::Dialog(); exit(0); sub W1_Terminate { return -1; } sub ButtonW1_Click { $chipname = $W1-chipfield-Text(), print $chipname; #return 0; } please help me where is problem

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >