Daily Archives

Articles indexed Wednesday May 12 2010

Page 20/121 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How to use this json string with jquery autocomplete?

    - by Pandiya Chendur
    I have two textboxes in my page, <asp:TextBox ID="TxtClientName" runat="server"></asp:TextBox> <asp:TextBox ID="TxtClientMob" runat="server"></asp:TextBox> and i have a json string, {"Table" : [{"ClientName" : "Pandiya","ClientMobNo" : "9566643707"}, {"ClientName" : "Bala","ClientMobNo" : "9994403569"}]} Is it possible to use this json string to autocomplete in two textboxes seperating keys ClientName and ClientMobNo in jquery..... Any suggestion....

    Read the article

  • Windows Identity Foundation - Local STS on Windows Azure.

    - by joe
    Hello, I am trying to use Federated authentication on Azure. I found a example of having a local sts outside azure which is used for authentication from a web role hosted in azure. This works perfectly. My issue is, i dont want to have an application outside azure. Instead, I want to host the local sts website also in azure. So in effect I will have two web roles (1. my actual website, 2. the sts). I tried the above approach my creating a new webrole and moving the files from my original sts project. But i am getting compilation errors even if I reference the required dlls. I have also set "copy local" to true. It will be very helpful if somebody can guide me.. Thanks

    Read the article

  • Get control in code from ControlTemplate By Name

    - by Polaris
    Hello. I have next control template in my WPF app. <Style TargetType="Label" x:Key="LabelStyle"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Label"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="40"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <TextBox x:Name="MyTextBlock" Text="{TemplateBinding Content}" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" /> <Label Content="{TemplateBinding Content}" Grid.Column="1" Grid.Row="1"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> TextBox "MyTextBlock" is invisible in C# code of window. How can I access to this textblock in code

    Read the article

  • Prevent lazy loading in nHibernate

    - by Ciaran
    Hi, I'm storing some blobs in my database, so I have a Document table and a DocumentContent table. Document contains a filename, description etc and has a DocumentContent property. I have a Silverlight client, so I don't want to load up and send the DocumentContent to the client unless I explicity ask for it, but I'm having trouble doing this. I've read the blog post by Davy Brion. I have tried placing lazy=false in my config and removing the virtual access modifier but have had no luck with it as yet. Every time I do a Session.Get(id), the DocumentContent is retrieved via an outer join. I only want this property to be populated when I explicity join onto this table and ask for it. Any help is appreciated. My NHibernate mapping is as follows: <?xml version="1.0" encoding="utf-8" ?> <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="Jrm.Model" namespace="Jrm.Model"> <class name="JrmDocument" lazy="false"> <id name="JrmDocumentID"> <generator class="native" /> </id> <property name="FileName"/> <property name="Description"/> <many-to-one name="DocumentContent" class="JrmDocumentContent" unique="true" column="JrmDocumentContentID" lazy="false"/> </class> <class name="JrmDocumentContent" lazy="false"> <id name="JrmDocumentContentID"> <generator class="native" /> </id> <property name="Content" type="BinaryBlob" lazy="false"> <column name="FileBytes" sql-type="varbinary(max)"/> </property> </class> </hibernate-mapping> and my classes are: [DataContract] public class JrmDocument : ModelBase { private int jrmDocumentID; private JrmDocumentContent documentContent; private long maxFileSize; private string fileName; private string description; public JrmDocument() { } public JrmDocument(string fileName, long maxFileSize) { DocumentContent = new JrmDocumentContent(File.ReadAllBytes(fileName)); FileName = new FileInfo(fileName).Name; } [DataMember] public virtual int JrmDocumentID { get { return jrmDocumentID; } set { jrmDocumentID = value; OnPropertyChanged("JrmDocumentID"); } } [DataMember] public JrmDocumentContent DocumentContent { get { return documentContent; } set { documentContent = value; OnPropertyChanged("DocumentContent"); } } [DataMember] public virtual long MaxFileSize { get { return maxFileSize; } set { maxFileSize = value; OnPropertyChanged("MaxFileSize"); } } [DataMember] public virtual string FileName { get { return fileName; } set { fileName = value; OnPropertyChanged("FileName"); } } [DataMember] public virtual string Description { get { return description; } set { description = value; OnPropertyChanged("Description"); } } } [DataContract] public class JrmDocumentContent : ModelBase { private int jrmDocumentContentID; private byte[] content; public JrmDocumentContent() { } public JrmDocumentContent(byte[] bytes) { Content = bytes; } [DataMember] public int JrmDocumentContentID { get { return jrmDocumentContentID; } set { jrmDocumentContentID = value; OnPropertyChanged("JrmDocumentContentID"); } } [DataMember] public byte[] Content { get { return content; } set { content = value; OnPropertyChanged("Content"); } } }

    Read the article

  • Semantic errors

    - by gautam kumar
    Can semantic errors be detected by the compiler or not? If not when do the errors get detected? As far as I know semantic errors are those errors which result from the expressions involving operators with incorrect number/type of operands. For example: n3=n1*n2;//n1 is integer, n2 is a string, n3 is an integer The above statement is semantically incorrect. But while reading C Primer Plus by Stephen Prata I found the following statement The compiler does not detect semantic errors, because they don't violate C rules. The compiler has no way of divining your true intentions. That leaves it to you to find these kinds of errors. One way is to compare what a program does to what you expected it to do. If not the compiler, who detects those errors? Am I missing something?

    Read the article

  • Atomically maintaining a counter using Sub-sonic ActiveRecord

    - by cantabilesoftware
    I'm trying to figure out the correct way to atomically increment a counter in one table and use that incremented value as an pseudo display-only ID for a record in another. What I have is a companies table and a jobs table. I want each company to have it's own set of job_numbers. I do have an auto increment job_id, but those numbers are shared across all companies. ie: the job numbers should generally increment without gaps for each company. ie: companies(company_id, next_job_number) jobs(company_id, job_id, job_number) Currently I'm doing this (as a method on the partial job class): public void SaveJob() { using (var scope = new System.Transactions.TransactionScope()) { if (job_id == 0) { _db.Update<company>() .SetExpression("next_job_number").EqualTo("next_job_number+1") .Where<company>(x => x.company_id == company_id) .Execute(); company c = _db.companies.SingleOrDefault(x => x.company_id == company_id); job_number = c.next_job_number; } // Save the job this.Save(); scope.Complete(); } } It seems to work, but I'm not sure if there are pitfalls here? It just feels wrong, but I'm not sure how else to do it. Any advice appreciated.

    Read the article

  • [ZF] How to use Zend_Db without SQL Queries?

    - by rasouza
    The last time I worked with Zend_Db I recall I used to write SQL Queries manually. I've been searching for some ORM application, but, since I read something like Zend_Db is also capable of doing so, I started to try it, but I can't find neither a good tutorial explain it or a good documentation. I read something lake Gateway pattern and ModelMapper class but I can't figure it out. Can someone shine my path? :P

    Read the article

  • You don't have permission fckeditor php

    - by G-Rajendra
    i upload fckeditor in myadmin and i also make upload files in $Config['UserFilesPath'] = '/uploadfiles/' ; i had also gave 777 permission in upload files and browse.html but when i want to upload files there is showing error as below "You don't have permission to access /wealthfinance/admin/fckeditor/editor/filemanager/browser/default/browser.html on this server." what is main problem in fckeditor could you please anyone help me

    Read the article

  • AVAudioPlayer problem regarding song overlaping in iPhone

    - by riteshkumar1905
    I have using AVAudioPlayer in my app but the problem is that when i play the song from list it will played while before stopping the song i am again goes to song list then select another song then both song will start playing simultaneously so please tell me the code which will terminate my first song. i am using avTouchContoller & avTouchViewController in my app. so i am enclosing the code for song which is written in avController.m & avTouchViewController.m as follow for single song avtouchController.m switch (flag) { case 1: //[self stop]; fileURL = [[NSURL alloc] initFileURLWithPath: [[NSBundle mainBundle] pathForResource:@"Aarti Keeje" ofType:@"aac"]]; self._player = [[AVAudioPlayer alloc] initWithContentsOfURL:fileURL error:nil]; //self._player=newplayer; //[newplayer release]; if (self._player) { _fileName.text = [NSString stringWithFormat: @"%@ (%d ch.)", [[self._player.url relativePath] lastPathComponent], self._player.numberOfChannels, nil]; [self updateViewForPlayerInfo]; [self updateViewForPlayerState]; } [fileURL release]; break;

    Read the article

  • Is there are standard way to store a database schema outside a python app

    - by acrosman
    I am working on a small database application in Python (currently targeting 2.5 and 2.6) using sqlite3. It would be helpful to be able to provide a series of functions that could setup the database and validate that it matches the current schema. Before I reinvent the wheel, I thought I'd look around for libraries that would provide something similar. I'd love to have something akin to RoR's migrations. xml2ddl doesn't appear to be meant as a library (although it could be used that way), and more importantly doesn't support sqlite3. I'm also worried about the need to move to Python 3 one day given the lack of recent attention to xml2ddl. Are there other tools around that people are using to handle this?

    Read the article

  • Can I un-check a group of RadioBottoms inside a group box?

    - by Claire Huang
    radio bottoms inside a group Box will be treated as a group of bottoms. They are mutual exclusive. How can I clean up their check states?? I have several radio bottoms, one of them are checked. How can I "clean" (uncheck) all radio bottoms?? "setChecked" doesn't work within a group, I tried to do following things but failed. My code is as following, radioButtom is inside a groupBox, and I want to unchecked it. The first setChecked does works, but the second one doesn't, the radioBottom doesn't been unchecked MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { QRadioButton *radioButton; ui->setupUi(this); radioButton->setChecked(true); radioButton->setChecked(false); } Where is the problem in my code?

    Read the article

  • how to put the gps new cllocation co-ordinate to google map in objective-c.

    - by uttam
    i want to use the gps to update the user location on google map,i am using the following method. -didFailWithError and -didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation but how can i get the newlocation on the google map, because for that we want the latitude and longitude. and then put that in setregion method. pls tell me how i can we set the newlocation obtain from location manager to the google map

    Read the article

  • How to launch a dependent application on OS X?

    - by jldupont
    What is the programmatical mechanism by which an application can be launched at a result of another one being launched? E.g. upon launching iTunes, the Last.fm desktop launches too. Or it is just a question of substituting a "batch file" of some sort? Note: OS X newbie.

    Read the article

  • How can I (from a script) add something to the zsh command history?

    - by Brandon
    I'd like to be able to look through my command history and know the context from which I issued various commands--in other words, "what directory was I in?" There are various ways I could achieve this, but all of them (that I can think of) would require manipulating the zsh history to add (for instance) a commented line with the result of $(pwd). (I could create functions named cd & pushd & popd etc, or I could use zsh's preexec() function and maybe its periodic() function to add the comment line at most every X seconds, just before I issue a command, or perhaps there's some other way.) The problem is, I don't want to directly manipulate the history file and bypass the shell's history mechanism, but I can't figure out a way (with the fc command, for instance) to add something to the history without actually typing it on the command line. How could I do this?

    Read the article

  • How to soft code an MKV with subtitles?

    - by GiH
    I have an avi and corresponding .srt file for subtitles. I hate having two files for this movie, so what I want to do is convert this file to mkv as I heard it can hold subtitles. I have handbrake to convert the file, but will that allow me to include the subtitles? If not, how would I go about putting the subtitles into the mkv?

    Read the article

  • NSAutoreleasePool carrying across methods?

    - by Tim
    I'm building an iPhone application where I detach some threads to do long-running work in the background so as not to hang the UI. I understand that threads need NSAutoreleasePool instances for memory management. What I'm not sure about is if the threaded method calls another method - does that method also need an NSAutoreleasePool? Example code: - (void)primaryMethod { [self performSelectorInBackground:@selector(threadedMethod) withObject:nil]; } - (void)threadedMethod { NSAutoreleasePool *aPool = [[NSAutoreleasePool alloc] init]; // Some code here [self anotherMethod]; // Maybe more code here [aPool drain]; } - (void)anotherMethod { // More code here } The reason I ask is I'm receiving errors that objects are being autoreleased with no pool in place, and are "just leaking." I've seen other questions where people didn't have autorelease pools in place at all, and I understand why an autorelease pool is needed. I'm specifically interested in finding out whether an autorelease pool created in (in this example) threadedMethod applies to objects created in anotherMethod.

    Read the article

  • Performance of "returning" from a Try block

    - by Mystagogue
    Exception handling on Windows boxes (at least for C++) takes a performance hit if you exit a try block prematurely (such as executing a return statement) the same as if an exception were thrown. But what about C#? Is there a performance hit for returning prematuraly from a try block, whether through a return statement or break statement?

    Read the article

  • JQuery UI Sortable

    - by RussP
    Can someone please help me with this one: When using UISortables where - and how do I put "serialize" into the JQuery function? I have 4 columns class '.columm' and each wit a unique id - col1,col2,col3 & col4. I can get the drag & drop bit to work I now need to put the "final" positions into a serialized array. Here is my code: $(".column").sortable({ revert: true, scroll: true, appendTo: 'body', connectWith: '.column', delay:200, stop: function() { $(".column").each(function(){ var test = $(this).attr('id'); alert(test); // //var myArray = $(this).sortable("serialize"); }) }, revertDuration:50000, scope:'scope', opacity: 0.80, }); You will see alert test. I have done this to see if I can get the col id's into an alert and I can, but where do i put .sortable( "serialize" , [options] ) and how do I do that for the 4 columns to create 1 single serialized array? having done that how/where do you set the order when you next load the page? (OK yes, I do intent to "store" the serialized array) Help please - thanks

    Read the article

  • fetching gps location in blackberry

    - by SWATI
    in my application i try to fetch users location but it always 0.0 for both latitude and longitude.I have seen blackberry forum but couldn't find what am i doing wrong??? code : package com.MyChamberApp; import javax.microedition.location.Criteria; import javax.microedition.location.Location; import javax.microedition.location.LocationListener; import javax.microedition.location.LocationProvider; public class GPS_Location { static double longi; static double lati; public GPS_Location() { } public void location() { new LocationTracker(); } class LocationTracker { private LocationProvider provider; Criteria cr; public LocationTracker() { resetGPS(); } public void resetGPS() { try { cr = new Criteria(); cr.setPreferredPowerConsumption(Criteria.POWER_USAGE_HIGH); cr.setPreferredResponseTime(120000); cr.setCostAllowed(true); provider = LocationProvider.getInstance(cr); provider.getLocation(120); if (provider != null) { provider.setLocationListener(new MyLocationListener(), 1,1,1); } } catch (Exception e) {} } public void run(){} private class MyLocationListener implements LocationListener { public void providerStateChanged(LocationProvider provider,int newState) { if (newState == LocationProvider.TEMPORARILY_UNAVAILABLE) { provider.reset(); resetGPS(); } if (newState == LocationProvider.OUT_OF_SERVICE) { provider.reset(); resetGPS(); } } public void locationUpdated(LocationProvider provider,Location location) { if (location != null && location.isValid()) { try { lati = location.getQualifiedCoordinates().getLatitude(); longi = location.getQualifiedCoordinates().getLongitude(); } catch (Exception e) {} } } } } } i have tried this code on curve8300,bold9000 It works well on simulator but does not fetches value on device till i manually do not refresh my gps. thanks in advance!!!!!!!!!!!!!!!!

    Read the article

  • Why entered key word is not store in database?

    - by Nitz
    Hey Guys, I had made on form, in which i had one text area. Now i am storing that data of text area to mysql database. Now if i had press enter key word then it not stores in the database. Because i don't get exacted output as what i entered. as example... If i had write like this..... GoodMorningHow are you? then i only get like this... Good Morning How are you? So its not storing that enter key word in the database.

    Read the article

  • selenium scripts

    - by user121196
    I want to use selenium scripts to click on a bunch of links on my webpage one by one, each click results in a page refresh. However selenium doesn't support css pseudo class like :visited, so I can't distinguish the ones that are already clicked from the ones that I want to click on next. Is there a way to solve my problem?

    Read the article

  • retriving row of grid

    - by madhu
    i have data grid to which data is getting from database.after getting the data i hvve to show entire row information in an alert box.can any one help me thanks in advance. my function code is private function fetch(event:Event):void { var selectedRow:Object = event.currentTarget.selectedItem; Alert.show(""+selectedRow.Details); } iam calling this method on click event of grid

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >