Daily Archives

Articles indexed Monday March 29 2010

Page 29/123 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Silverlight and ASP.Net

    - by xscape
    Is it possible to call a page by using HtmlPage.Window.Navigate("ShowMedia.aspx", "_blank"); from my silverlight code behind? The ShowMedia.aspx is located in my <projectName>.web

    Read the article

  • extjs add plugins to dynamic form fields

    - by Anurag Uniyal
    I am creating a form dynamically from the fields returned from server using json e.g. data is "items": [ {"xtype": "textfield", "fieldLabel": "Name", "name": "name"}, {"xtype": "textfield", "fieldLabel": "Description", "name": "description"}, {"xtype": "textarea", "fieldLabel": "Text", "name": "text"} ], Now I want to add a custom plugin to each field usually on client side I do this plugins:new Ext.ux.plugins.MyPlugin() but as my form fields are coming from server, how can I add plugin to field e.g. something like this (but that doesn't work) "plugins": "Ext.ux.plugins.MyPlugin"

    Read the article

  • to connect matlab with java

    - by user304005
    Through the below given code I was able to connect to matlab. But I was not able to execute the script file containing matlab code...Please help me to modify the code so as to execute the matlab code.... Here luck2 is a .m file.... import java.io.InputStreamReader; import java.io.*; public class matlab { private static File myMATLABScript; public static String runScript(File luck2) { String output = "" ; String error = ""; try { String commandToRun ="C:\\Program Files\\MATLAB\\R2009a\\bin\\matlab -nodisplay <" + "Z:\\sem\\java\\luck2"; //String commandToRun = "matlab -nosplash -r myMATLABScript -nodisplay -nodesktop < " + opentxt; System.out.println(commandToRun); Process p = Runtime.getRuntime().exec(commandToRun); String s; BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); System.out.println("\nHere is the standard output of the command:\n"); while ((s = stdInput.readLine()) != null) { System.out.println("haiiiiiiiiiiii"); output = s + "\n"; System.out.println(s); } while ((s = stdError.readLine()) != null) { error = s + "\n"; System.out.println(s); } } catch (Exception e) { System.out.println("exception happened here what I know:"); e.printStackTrace(); System.exit(-1); } return output + error; } public static void main(String[] args) throws IOException { matlab m = new matlab(); matlab.runScript(myMATLABScript); //matlab.runScript(); } }

    Read the article

  • How to enable haptic feedback on button view

    - by Funkyidol
    Hi, I want to add haptic feedback to my application buttons and control them programatically to show button state (enabled and disabled) The default haptic feedback setter works only for long press. How can i make it work for simple button clicks. Amd is there a way to have haptic feedback on events like touch move??

    Read the article

  • nunit2 Nant task always returns exit code 0 (TeamCity 5.0)

    - by Jonathan
    Hello, I just cannot for the life of me get my nant build file to terminate upon a test failure and return (thus preventing the packaging and artifact step from running) This is the unit part of the nant file: <target name="unittest" depends="build"> <nunit2 verbose="true" haltonfailure="false" failonerror="true" failonfailureatend="true"> <formatter type="Xml" /> <test assemblyname="Code\AppMonApiTests\bin\Release\AppMonApiTests.dll" /> </nunit2> </target> And regardless what combination of true/false i set the haltonfailure, failonerror, failonfailureatend properties to, the result is always this: [11:15:09]: Some tests has failed in C:\Build\TeamCity\buildAgent\work\ba5b94566a814a34\Code\AppMonApiTests\bin\Release\AppMonApiTests.dll, tests run terminated. [11:15:09]: NUnit Launcher exited with code: 1 [11:15:09]: Exit code 0 will be returned.1 Please help as i don't want to be publishing binarys where the unit tests have failed!!! TeamCity 5.0 build 10669 AppMonApiTests.dll references nunit.framework.dll v2.5.3.9345 unit isn't installed on the build server or GAC'd Using Nant-0.85 and Nantcontrib-0.85 Thanks, Jonathan

    Read the article

  • Passing input hidden params through urllib2 POST request

    - by ramrajedotcom
    I need to make POST request to CAS SSO server login page, and CAS login page has few input hidden params which are dynamically populated through java. I don't know how to read these hidden param values from response and pass in to CAS server. Without passing these hidden params I am not able to login. Does any one how to read input hidden param values from urllib2 response? Thanks in advance!

    Read the article

  • Creating a fixed formatted cell in UITableview

    - by Wes
    Hi, I want to have a tableview create rows that look like this: value1 item1 container1 value10 item10 container10 value100 item100 container100 value2 item2 container2 What I am trying to show is that the first word (value) will have a set length of 12 and then the second word (item) will have a set length of 10 and then the last word (container) is just tagged on at the end. I am pulling these from a SQLite database and don't want to use multiple lines, but read in a strictly formatted structure like this.

    Read the article

  • Port Android Application to Blackberry

    - by Pria
    Lets say I have an Android app that uses Google Maps and GPS.Uses custom views and timers. How much time will it require to develop it for Blackberry? What changes will be required? Can the UI be reused? I am totally new to Blackberry, though I know Java. Please help me estimate the time.

    Read the article

  • Adding watermarks to textarea

    - by Hulk
    How to add watermarks like "Enter textarea" for a textarea. <textarea rows = "8" cols = "18" border ="0" class="input" style="border: none;" WRAP id="details" name ="details"></textarea> Thanks..

    Read the article

  • Drawing Color Spectrum with Waveform

    - by TheDarkIn1978
    i've come across this ActionScript sample, which demonstrates drawing of the color spectrum, one line at a time via a loop, using waveforms. however, the waveform location of each RGB channel create a color spectrum that is missing colors (pure yellow, cyan and magenta) and therefore the spectrum is incomplete. how can i remedy this problem so that the drawn color spectrum will exhibit all colors? // Loop through all of the pixels from '0' to the specified width. for(var i:int = 0; i < nWidth; i++) { // Calculate the color percentage based on the current pixel. nColorPercent = i / nWidth; // Calculate the radians of the angle to use for rotating color values. nRadians = (-360 * nColorPercent) * (Math.PI / 180); // Calculate the RGB channels based on the angle. nR = Math.cos(nRadians) * 127 + 128 << 16; nG = Math.cos(nRadians + 2 * Math.PI / 3) * 127 + 128 << 8; nB = Math.cos(nRadians + 4 * Math.PI / 3) * 127 + 128; // OR the individual color channels together. nColor = nR | nG | nB; }

    Read the article

  • Where do you use generators feature in your python code?

    - by systempuntoout
    I have studied generators feature and i think i got it but i would like to understand where i could apply it in my code. I have in mind the following example i read in "Python essential reference" book: # tail -f def tail(f): f.seek(0,2) while True: line = f.readline() if not line: time.sleep(0.1) continue yield line Do you have any other effective example where generators are the best tool for the job like tail -f? How often do you use generators feature and in which kind of functionality\part of program do you usually apply it?

    Read the article

  • Oracle sample data problems

    - by Jay
    So, I have this java based data trasformation / masking tool, which I wanted to test out on Oracle 10g. The good part with Oracle 10g is that you get a load of sample schemas with half a million records in some. The schemas are : SH, OE, HR, IX and etc. So, I installed 10g, found out that the installation scripts are under ORACLE_HOME/demo/scripts. I customized these scripts a bit to run in batch mode. That solves one half of my requirement - to create source data for my testing my data transformation software. The second half of the requirement is that I create the same schemas under different names (TR_HR, TR_OE and so on...) without any data. These schemas would represent my target schemas. So, in short, my software would pick up data from a table in a schema and load it up in to the same table in a different schema. Now, I have two issues in creating my target schema and emptying it. I would like this in a batch job. But the oracle scripts you get, the sample schema names are not configurable. So, I tried creating a script, replacing OE with TR_OE, HR with TR_HR and so on. However, this approach is kind of irritating coz the sample schemas are kind of complicated in the way they are created; Oracle creates synonyms, views, materialized views, data types and lot of weird stuff. I would like the target schemas (TR_HR, TR_OE,...) to be empty. But some of the schemas have circular references, which would not allow me to delete data. The only work around seems to be removing certain foreign keys, deleting data and then adding the constraints back. Is there any easy way to all this, without all this fuss? I would need a complicated data set for my testing (complicated as in tables with triggers, multiple hierarchies.. for instance.. a child table that has children up to 5 levels, a parent table that refers to an IOT table and an IOT table that refers to a non-IOT table etc..). The sample schemas are just about perfect from a data set perspective. The only challenge I see is in automating this whole process of loading up the source schemas, and then creating the target schemas and emptying them. Appreciate your help and suggestions.

    Read the article

  • Authenticating AIX Users Against OID (Oracle Internet Directory)

    - by mwilkes
    We have a need to authenticate local users on an AIX server against OID using LDAP. We have a branch within OID where we've placed and synchronized Active Directory users. We've also configured external authentication on OID so that it verifies username/passwords against AD. Has anyone configured authentication for AIX in this type of environment? We believe we need to populate unix specific attributes on the user's directory entry in OID, but are unsure which attributes are needed. Additionally, we are looking to authenticate Oracle database users against OID but because of external authentication we are unable to populate the ORCLPASSWORD attribute on the user's directory entry on OID (which is the attribute Oracle is looking for password in). Help with either or both are welcome.

    Read the article

  • How to select part of a text that exists already in an above cell

    - by pragadheesh
    Hi, In MS Excel, consider i have the word 'Microsoft' in a cell. And in the cell below I want to type the word 'Microhard'. When I start typing Microhard, the word Microsoft appears shaded in black. Now how can I select the part 'Micro' alone from Microsoft and type 'hard' alone. Hope my question is clear. Same question I thought the question should belong to SuperUser so posting it here. Ignore if duplicate.

    Read the article

  • wpf cancel backgroundworker on application exits

    - by toni
    Hi! In my application I have a main windows and into it, in a frame I load a page. This page do a long time task when the user press a button. My problem is that when long task is being doing and the user presses the close button of the main window, the application seems to not finish because I am debugging it in VS2008 and I can see the stop button highlighted. If I want to finish I have to press stop button, the application doesn't stop the debugging automatically on application exit. I thought .NET stops automatically backgroundworkers on application exits but I am not sure after seeing this behaviour. I have tried to force and cancel background worker in unloaded event page with something like this: private void Page_Unloaded(object sender, RoutedEventArgs e) { // Is the Background Worker do some work? if (My_BgWorker != null && My_BgWorker.IsBusy) { //If it supports cancellation, Cancel It if (My_BgWorker.WorkerSupportsCancellation) { // Tell the Background Worker to stop working. My_BgWorker.CancelAsync(); } } } but with no success. After doing CancelAsync(), a few minutes after, I can see the backgroundworker finishes and raise RunWorkerCompleted and I can see the task is completed checking e.Cancelled argument in the event but after this event is exectued the application continues without exiting and I have no idea what is doing.... I set WorkerSupportsCancellation to true to support cancel at the begining. I would apreciate all answers. Thanks.

    Read the article

  • tfidf, am I understanding it right?

    - by alskndalsnd
    Hey everyone, I am interested in doing some document clustering, and right now I am considering using TF-IDF for this. If I am not wrong, TFIDF is particularly used for evaluating the relevance of a document given a query. If I do not have a particular query, how can I apply tfidf to clustering?

    Read the article

  • Django Formset management-form validation error

    - by gramware
    I have a form and a formset on my template. The problem is that the formset is throwing validation error claiming that the management form is "missing or has been tampered with". Here is my view @login_required def home(request): user = UserProfile.objects.get(pk=request.session['_auth_user_id']) blogz = list(blog.objects.filter(deleted='0')) delblog = modelformset_factory(blog, exclude=('poster','date' ,'title','content')) if request.user.is_staff== True: staff = 1 else: staff = 0 staffis = 1 if request.method == 'POST': delblogformset = delblog(request.POST) if delblogformset.is_valid(): delblogformset.save() return HttpResponseRedirect('/home') else: delblogformset = delblog(queryset=blog.objects.filter( deleted='0')) blogform = BlogForm(request.POST) if blogform.is_valid(): blogform.save() return HttpResponseRedirect('/home') else: blogform = BlogForm(initial = {'poster':user.id}) blogs= zip(blogz,delblogformset.forms) paginator = Paginator(blogs, 10) # Show 25 contacts per page # Make sure page request is an int. If not, deliver first page. try: page = int(request.GET.get('page', '1')) except ValueError: page = 1 # If page request (9999) is out of range, deliver last page of results. try: blogs = paginator.page(page) except (EmptyPage, InvalidPage): blogs = paginator.page(paginator.num_pages) return render_to_response('home.html', {'user':user, 'blogform':blogform, 'staff': staff, 'staffis': staffis, 'blog':blogs, 'delblog':delblogformset}, context_instance = RequestContext( request )) my template {%block content%} <h2>Home</h2> {% ifequal staff staffis %} {% if form.errors %} <ul> {% for field in form %} <H3 class="title"> <p class="error"> {% if field.errors %}<li>{{ field.errors|striptags }}</li>{% endif %}</p> </H3> {% endfor %} </ul> {% endif %} <h3>Post a Blog to the Front Page</h3> <form method="post" id="form2" action="" class="infotabs accfrm"> {{ blogform.as_p }} <input type="submit" value="Submit" /> </form> <br> <br> {% endifequal %} <div class="pagination"> <span class="step-links"> {% if blog.has_previous %} <a href="?page={{ blog.previous_page_number }}">previous</a> {% endif %} <span class="current"> Page {{ blog.number }} of {{ blog.paginator.num_pages }}. </span> {% if blog.has_next %} <a href="?page={{ blog.next_page_number }}">next</a> {% endif %} </span> <form method="post" action="" class="usertabs accfrm"> {{delblog.management_form}} {% for b, form in blog.object_list %} <div class="blog"> <h3>{{b.title}}</h3> <p>{{b.content}}</p> <p>posted by <strong>{{b.poster}}</strong> on {{b.date}}</p> {% ifequal staff staffis %}<p>{{form.as_p}}<input type="submit" value="Delete" /></p>{% endifequal %} </div> {% endfor %} </form> {%endblock%}

    Read the article

  • jqGrid dynamic event

    - by Daveo
    Suppose I have the following (shortened for simplicity): jQuery("#grid").jqGrid({ ... ondblClickRow: function() { // I want to define this function dynamically at run time } ... }); How to I bind ondblClickRow event outside of the grid Deceleration. For example in jQuery I would normally do $('#grid').bind('ondblClickRow', function() { alert('my over written event'); });

    Read the article

  • Working with Jasper Reporsts

    - by Chandu
    Hi all, can I integrate the jasper report viewer to my swing application as like if I click on view report button from my application then viewer should be opened. If so could you advice me with code snippet for this integration and in this viewer the save as type should be restricted for PDF only rather than every other download option filter available . Please advice me in this regard. Regards, Chandu

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >