Search Results

Search found 205 results on 9 pages for 'rohit garg'.

Page 6/9 | < Previous Page | 2 3 4 5 6 7 8 9  | Next Page >

  • How to do OrderBY on XML column in SQL SERVER 2008

    - by Rohit
    I am creating a comma seperated values of columns specified in dbName attribute of below xml. Now i want to concatenate those columns on the basic of Position attribute. DECLARE @varXML AS XML = '<gridFormat> <column property="FacilityInternalID" dbName="Pname" HeaderText="TAT Health" IsVisible="1" Position="1" /> <column property="FacilityInternalID" dbName="Priority" HeaderText="Priority" IsVisible="1" Position="2" /> <column property="FacilityInternalID" dbName="JobID" HeaderText="Job Number" IsVisible="1" Position="3" /> <column property="FacilityInternalID" dbName="Status" HeaderText="Status" IsVisible="1" Position="6" /> <column property="FacilityInternalID" dbName="name" HeaderText="Customer" IsVisible="1" Position="4" /> <column property="FacilityInternalID" dbName="sname" HeaderText="Facility " IsVisible="1" Position="5" /> </gridFormat>' PRINT @varXML This is the query by which I am generating CSV of columns. I have to use it is select list. SELECT @ColumnsToDisplay = LEFT(MyCsvList, LEN(MyCsvList) - 1) FROM ( SELECT ( SELECT row.value('@property', 'varchar(200)') + ', ' AS [text()] FROM @varXML.nodes('gridFormat/column') AS d ( row ) FOR XML PATH('') ) AS MyCsvList ) AS MyCsvListFinal SET @SQL = 'SELECT ' + @ColumnsToDisplay + ' FROM JobListingDetails' Result should be select Pname,Priority,JobID,name,sname,status FROM JobListingDetails. Please help.

    Read the article

  • what is wrong in java AES decrypt function?

    - by rohit
    hi, i modified the code available on http://java.sun.com/developer/technicalArticles/Security/AES/AES_v1.html and made encrypt and decrypt methods in program. but i am getting BadpaddingException.. also the function is returning null.. why it is happing?? whats going wrong? please help me.. these are variables i am using: kgen = KeyGenerator.getInstance("AES"); kgen.init(128); raw = new byte[]{(byte)0x00,(byte)0x11,(byte)0x22,(byte)0x33,(byte)0x44,(byte)0x55,(byte)0x66,(byte)0x77,(byte)0x88,(byte)0x99,(byte)0xaa,(byte)0xbb,(byte)0xcc,(byte)0xdd,(byte)0xee,(byte)0xff}; skeySpec = new SecretKeySpec(raw, "AES"); cipher = Cipher.getInstance("AES"); plainText=null; cipherText=null; following is decrypt function.. public String decrypt(String cipherText) { try { cipher.init(Cipher.DECRYPT_MODE, skeySpec); byte[] original = cipher.doFinal(cipherText.getBytes()); plainText = new String(original); } catch(BadPaddingException e) { } return plainText; }

    Read the article

  • How do I modify the HttpResponse object in django ?

    - by Rohit
    I need the html returned using render_to_response to be escaped. I am unable to find any suitable documentation. Can someone point in some direction ? the code is : return render_to_response(template_name, {return render_to_response(template_name, { 'form': form, redirect_field_name: redirect_to, 'site': current_site, 'site_name': current_site.name, }, context_instance=RequestContext(request)) Here I need the response html text to be escaped. I way I know is reading template file in string and escaping it with re.escape() and then rendering it. whats a cleaner and simpler way to do that ??

    Read the article

  • In Django : How to serialize dict object to json ?

    - by Rohit
    I have this very basic problem, >>> serializers.serialize("json", {'a':1}) Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/lib/pymodules/python2.6/django/core/serializers/__init__.py", line 87, in serialize s.serialize(queryset, **options) File "/usr/lib/pymodules/python2.6/django/core/serializers/base.py", line 40, in serialize for field in obj._meta.local_fields: AttributeError: 'str' object has no attribute '_meta' >>> How can this be done ? Thanks in advance !

    Read the article

  • How to make script paths inside user control independent of page hierarchy.

    - by Rohit
    My website is organized in the following folder structure Root Pages CustomerManagement DepartMentManagement Script UserControls Now i have a user control inside userControl Folder. I have to use a external js file. So i use it this way <script type="text/javascript" language="javascript" src="../Script/slider.js"></script> My understanding is that since both are under root so i have used a single .. Now what happens is that when this usercontrol is used inside DepartMentManagement it checks for script folder inside CustomerManagement as .. refers to one hierarchy above and script file is not found.Even using a ~ doesnot work. I want to make this script path independent of the path where this control is used. I don't want to move script reference code to the page as control requires script mot page.Please tell me how to achieve this.

    Read the article

  • Compatibility of x-www-browser

    - by rohit.arondekar
    I want to open html files from a shell script. I know that Ubuntu has a command x-www-browser that will open the default browser on the system. I also found via some Googling that the command is part of the debian system. I was wondering if the command is available on non debian based distros. If it isn't is there a standard way of opening an html file in the default browser on a linux OS via command line? Note that I'm using Bash.

    Read the article

  • How to get Combobox.SelectedItem Return string value of what is selected instead of Service Reference Class?

    - by Rohit Acharya
    I currently have the following code for a button. The message box shows SilverlightApplication2.ServiceReference2.Employee instead of the text string selected by the user. The combobox items are being populated by a WCF service. As a result I am unable to pass it to the Async call. How do I get the string of what user selected? private void btnAdd_Click(object sender, RoutedEventArgs e) { object selectedItem = comobo1.SelectedItem.ToString(); MessageBox.Show(selectedItem.ToString()); var proxy = new Service1Client(); proxy.GetAllEmployeesCompleted += proxy_GetAllEmployeesCompleted; proxy.GetAllEmployeesAsync(selectedItem.ToString()); }

    Read the article

  • Configuring the expiry time for the messages destined to the "Expired message address" in Hornetq

    - by Rohit
    I have configured a message expiry destination in Hornetq as below <address-setting match="#"> <dead-letter-address>jms.queue.error</dead-letter-address> <expiry-address>jms.queue.error</expiry-address> <max-delivery-attempts>3</max-delivery-attempts> <redelivery-delay>2000</redelivery-delay> <max-size-bytes>10485760</max-size-bytes> <message-counter-history-day-limit>10</message-counter-history-day-limit> <address-full-policy>BLOCK</address-full-policy> <redistribution-delay>60000</redistribution-delay> </address-setting> And the messages do get redirected to the expiry address once the expiration time is exceeded. These messages live indefinitely on the expiry address, Is there a way to provide a expiry time for these messages so they live only limited time on the expiry address?

    Read the article

  • How to allow netNamedPipeBinding to work with requiring UAC?

    - by Rohit
    I have a service running under Local system account. I have an application that run in a non-UAC mode. Both interact with each other as both act as server and client. Application as client can communicate with Service. But Service as client cannot communicate with application. If I run with UAC the problem is solved. <customBinding> <binding name="net.pipe"> <namedPipeTransport /> </binding> </customBinding>

    Read the article

  • Insert multiple records from a XML string differing on one parameter in SQL SERVER 2008

    - by Rohit
    Below in a query which inserts records to SimpleDictationProfileMapping table after reading it from a XML string. Now this query inserts a single record in which DictationCaptureProfileID is @dictationCaptureProfileId . Now i want to insert multiple rows in which @dictationCaptureProfileId is different and other 2 values are same. What i want to achieve by this is in case parent changes all child values should also change. INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID, DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId, row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes('/simpleMappingAtribute/attribute') AS d ( row ) ; I want INSERT INTO SimpleDictationProfileMapping ( DictationCaptureProfileID OR (SELECT DictationCaptureProfileID FROM DictationCaptureProfile WHERE SystemDictationCaptureProfileID = @systemDictationCaptureProfileID), DictationProfileMappingAttributeID, DictationProfileMappingAttributeValue ) SELECT @dictationCaptureProfileId , row.value('@attrId','varchar(max)'), row.value('@value', 'varchar(max)') FROM @simpleDictationCaptureProfileMappings.nodes ('/simpleMappingAtribute/attribute') AS d ( row ) ; Please tell how to achieve this.

    Read the article

  • Binding expression failing.

    - by Rohit Kandhal
    My output window is flooded with binding expression failures like : "Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.UserControl', AncestorLevel='1''. BindingExpression:Path=DataContext.CurrentActivationObjectType; DataItem=null; target element is 'StackPanel' (Name=''); target property is 'NoTarget' (type 'Object')" and similar binding issues. Also i found that these failure occurs only when the screen loads (i.e. first time) No failures there after. I've checked the binding it is fine . Binding :

    Read the article

  • convert 0.5 to 0.50 in C#

    - by Rohit
    I have a string which holds 0.5. I have to convert in to 0.50. I have tried following ways but nothing works.Please help hdnSliderValue.Value is 0.5,I want workFlow.QualityThresholdScore to be 0.50 workFlow.QualityThresholdScore = Convert.ToDecimal(String.format("{0:d}",hdnSliderValue.Value)); workFlow.QualityThresholdScore = Convert.ToDecimal(String.format("{0:0.00}",hdnSliderValue.Value)); IS there any built in function or will i have to do string handling to accomplish this.

    Read the article

  • ViewPager and Fragment Pager adapter implementation

    - by Rohit Deshmukh
    So I am trying to implement sliding views/fragments using viewpager and fragment pager adapter. convert_home is my main xml file that has android.support.v4.view.PagerTitleStrip and temperature.xml and velocity.xml are my two other views. I have no clue where I am going wrong. package app.converto; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.Menu; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; public class ConverTo extends FragmentActivity { SectionsPagerAdapter mSectionsPagerAdapter; ViewPager mViewPager; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager()); mViewPager.setAdapter(mSectionsPagerAdapter); setContentView(R.layout.converto_home); mViewPager = (ViewPager) findViewById(R.id.pager); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.converto_home, menu); return true; } public class SectionsPagerAdapter extends FragmentPagerAdapter { public SectionsPagerAdapter(FragmentManager fm) { super(fm); } @Override public Fragment getItem(int i) { switch(i){ case 0: Fragment1 fragment = new Fragment1(); return fragment; case 1: Fragment2 fragment2 = new Fragment2(); return fragment2; } defaultFragment fragment3 = new defaultFragment(); return fragment3; } @Override public int getCount() { return 2; } // // @Override // public CharSequence getPageTitle(int position) { // switch (position) { // case 0: return getString(R.string.velocity); // case 1: return getString(R.string.temperature); // case 2: return getString(R.string.distance); // } // return null; // } } public static class Fragment1 extends Fragment{ public Fragment1(){ } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //return inflater.inflate(R.layout.temperature, container, false); View view = inflater.inflate(R.layout.temperature, container, false); TextView textView = (TextView) view.findViewById(R.id.sample); textView.setText(getArguments().getString("title")); return view; } } public static class Fragment2 extends Fragment{ public Fragment2(){ } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //return inflater.inflate(R.layout.velocity, container, false); View view = inflater.inflate(R.layout.temperature, container, false); TextView textView = (TextView) view.findViewById(R.id.sample); textView.setText(getArguments().getString("title")); return view; } } public static class defaultFragment extends Fragment{ public defaultFragment(){ }//end constructor @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // return inflater.inflate(R.layout.temperature, container, false); View view = inflater.inflate(R.layout.temperature, container, false); TextView textView = (TextView) view.findViewById(R.id.sample); textView.setText(getArguments().getString("title")); return view; }//end oncreate }//end default fragment }

    Read the article

  • Asp.net regularexpressionvalidator fires even when CausesValidation="false"

    - by Rohit
    I have a regularexpression validator which validates a valid email. I have two buttons on my form. Submit and undo. On undo, we are reverting the page state to default submit has it validationgroup set while undo doesnot have any validationgroup and CausesValidation="false". Now when i navigate to page and enter invalid emailaddress,i directly click undo. the validator fires and stops my page from posting.however if i press tab and navigate to other control and then click undo,the validator shows error message but posts back and furthur proessing is done. This is very strange and i want the page to postback without any error message when i click undo.how to achieve it.

    Read the article

  • one primary key column foreign key to 2 other table columns.How to resolve data entry issue.

    - by Rohit
    I have a requirement according to which I have to create a central Login system.We have 2 things Corporate and Brand each represented by tables "Corporate" and "Brand". When a corporate gets registered,corporateID is given,When a user under that corporate gets registered there is a table corporateuser in which corporateID is a foreign key and CorporateUserID is a primary key.Similarly in the case of a brand. So we have CorporateUserId and BrandUserID. Now i have a table called RegisteredUsers in which i want to have corporate as well as brand users.UserID is a primary key in this table which is a foreign key to both corporateuser as well as Branduser. now when i enter a corporateuser,I do an entry to corporateuser as well as RegisteredUsers.When i enter CorporateUserID in userID for RegisteredUsers.It gives foreign key violation error. I fully understand this error.How can i achieve this.This requirement is very rigid.Please tell a workaround

    Read the article

  • custom DB logging using enterprise library 4.1

    - by Rohit
    We have to create a historical log of all the changed entities. we have defined our custom tables for this purpose. I have to incorporate this tables in Enterprise library logging block and do logging in these tables. I need to write a SP to insert values to these tables. Till now,what i have got from google is that i have to create a listener inheriting from CustomTraceListener and give my implementation of WriteMessage. What i need to know is,how will i plug my tables and SP in Enterprise library logging block.

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9  | Next Page >