Search Results

Search found 52538 results on 2102 pages for 'two column layout'.

Page 5/2102 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • backbone marionette - displaying a view in a layout region which has already been rendered

    - by Justin Wyllie
    I have something like this: //render the layout Layout.layout = new Layout.Screen(); MyApp.SomeRegion.show(Layout.layout); //render a view into it var mView = new CompositeView({collection: data}); Layout.layout.SomeRegion.show(mView); That all works fine. The layout has 3 regions. The above has rendered a view into one of them. Now, later, I want (in response to some user interaction) to render another view into one of the other regions. So I try: var mView2 = new CompositeView({collection: data}); Layout.layout.SomeOtherRegion.show(mView); But 'SomeOtherRegion' no longer exists on Layout.layout. I looked at this in Firebug. In the first case Layout.layout has my three regions defined on it. In the second case, not. Though they are still there in the regions object. This is the same layout instance. It looks like once a layout has been rendered you cannot render into it again? There must be a way. Nb. I don't want to re-render the layout. I hope that makes sense --Justin Wyllie

    Read the article

  • How do I create a customized keyboard layout for Windows?

    - by Pedro Palhoto
    On Linux you can create any layout you wish by editing the appropriate ASCII configuration files. On Windows the keyboard layout definitions are binary. Is there any tool that can create these binary keyboard layout configuration files? I grew up on the Macintosh international keyboard layout, which used the option key extensively, and now I would like to use the same layout on Windows. On Linux this Mac international keyboard layout exists for both the console as well as for X.Org. On Windows, the most similar layout is US International, which is not the same.

    Read the article

  • SQL: ATER COLUMN to shorter CHAR(n) type

    - by Rising Star
    I'm working with MS SQL SERVER 2003. I want to change a column in one of my tables to have fewer characters in the entries. This is identical to this question: http://stackoverflow.com/questions/2281336/altering-a-table-column-to-accept-more-characters except for the fact that I want fewer characters instead of more. I have a column in one of my tables that holds nine-digit entries. A developer previously working on the table mistakenly set the column to hold ten-digit entries. I need to change the type from CHAR(10) to CHAR(9). Following the instructions from the discussion linked above, I wrote the statement ALTER TABLE [MY_TABLE] ALTER COLUMN [MY_COLUMN] CHAR(9); This returns the error message "String or binary data would be truncated". I see that my nine-digit strings have a space appended to make them ten digits. How do I tell SQL Server to discard the extra space and convert my column to a CHAR(9) type?

    Read the article

  • Android Runtime Layout Tutorial

    - by Ryan
    Does anyone know how to perform or have a good reference for doing an activity layout at runtime in android? Here is the code for my activity. I'm sure I'm just neglecting to do something here: package com.isi.sa; import android.app.Activity; import android.os.Bundle; import android.widget.LinearLayout; import android.widget.TextView; public class SimpleAssessmentTest extends Activity { LinearLayout layout; TextView question; @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); layout = new LinearLayout(this); question = new TextView(this); layout.setBackgroundColor(R.color.black); question.setTextColor(R.color.white); question.setText("This is question1"); layout.addView(question); } } As you can see I'm just trying to add a linear layout with a single text view (just for testing purposes) however, when the activity starts I just get a black screen with a title bar of my app name. Thanks

    Read the article

  • The Impossible Layout?

    - by Kyle K
    I'm beginning to think this is impossible, but thought I'd ask you guys. Basically it's a 2 column layout, but the "business" wants the following: -Always take up the entire browser window -Accommodate resizing of browser window -Left column will be fixed width, but that width should be flexible from page-to-page. -Left column has a region at the top with fixed height. -Left column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. -Right column should take up remaining horizontal space of browser window. -Right column has a region at the top with fixed height. -Right column has a bottom region. It should take up the remaining vertical space of browser window. If content is very large, it will have a scroll bar just for that region. I've tried everything...divs, floated, absolutely positioned, tables, divs in tables... Is this even possible? Here's an image of what it should look like: http://imgur.com/zk1jP.png

    Read the article

  • Copy android.R.layout to my project

    - by eric
    Good advice from CommonWare and Steve H but it's not as easy to me as I first thought. Based on their advice I'm trying to copy android.R.layout to my project to ensure consistency. How do you do this? I looked in Eclipse's Package Explorer and under Android 1.5android.jarandroidR.classRlayout and find R$layout.class. Do I copy the code out of there into my own class? From my very limited knowledge of Java, the following code doesn't make much sense: public static final class android.R$layout { // Field descriptor #8 I public static final int activity_list_item = 17367040; // Field descriptor #8 I public static final int browser_link_context_header = 17367054; // Field descriptor #8 I public static final int expandable_list_content = 17367041; // Field descriptor #8 I public static final int preference_category = 17367042; // Field descriptor #8 I public static final int select_dialog_item = 17367057; // Field descriptor #8 I public static final int select_dialog_multichoice = 17367059; // Field descriptor #8 I public static final int select_dialog_singlechoice = 17367058; // Field descriptor #8 I public static final int simple_dropdown_item_1line = 17367050; // Field descriptor #8 I public static final int simple_expandable_list_item_1 = 17367046; // Field descriptor #8 I public static final int simple_expandable_list_item_2 = 17367047; // Field descriptor #8 I public static final int simple_gallery_item = 17367051; // Field descriptor #8 I public static final int simple_list_item_1 = 17367043; // Field descriptor #8 I public static final int simple_list_item_2 = 17367044; // Field descriptor #8 I public static final int simple_list_item_checked = 17367045; // Field descriptor #8 I public static final int simple_list_item_multiple_choice = 17367056; // Field descriptor #8 I public static final int simple_list_item_single_choice = 17367055; // Field descriptor #8 I public static final int simple_spinner_dropdown_item = 17367049; // Field descriptor #8 I public static final int simple_spinner_item = 17367048; // Field descriptor #8 I public static final int test_list_item = 17367052; // Field descriptor #8 I public static final int two_line_list_item = 17367053; // Method descriptor #50 ()V // Stack: 3, Locals: 1 public R$layout(); 0 aload_0 [this] 1 invokespecial java.lang.Object() [1] 4 new java.lang.RuntimeException [2] 7 dup 8 ldc <String "Stub!"> [3] 10 invokespecial java.lang.RuntimeException(java.lang.String) [4] 13 athrow Line numbers: [pc: 0, line: 899] Local variable table: [pc: 0, pc: 14] local: this index: 0 type: android.R.layout Inner classes: [inner class info: #5 android/R$layout, outer class info: #64 android/R inner name: #55 layout, accessflags: 25 public static final] }

    Read the article

  • Is there a way how to customize my keyboard layout in Xubuntu in a graphical way (by clicking)?

    - by Honza Javorek
    Possible duplicate, but I really couldn't find a solution. I would like to adjust my US keyboard layout, e.g. to add possibility to type some special characters on combination of right Alt + another character, etc. Moreover, my arrow up is dead, so until I buy another keyboard, I'd like to use my right shift as my arrow up, ASAP. However, there seems to be no way how to edit my keyboard layout easily in Xubuntu :( I found no editor and I really don't want to spend years in some configuration files and terminal (not that I can't, but I really really don't want). KLE - the only editor I could find, but no installation guide, no package, no PPA, no idea how to make it working (and uninstallable if not needed one day) Editor in Ubuntu - apparently not present in Xubuntu I found several tutorials how to change the layout, but they all seems to be complicated and not easy to follow. I don't want to spend a weekend in terminal or so, I am looking for an app to launch, make some clicking, finish my work by hitting Save button and - done! Please, is there such solution? For humans?

    Read the article

  • JavaNullPointerException/Layout Error when working with lists and ListView on Android

    - by psyhclo
    Hey, I'm trying to implement a ListView on Android, which will print the data retrieved from the SQLite Database. So I want to retrieve a lot of columns from the table and add this to a list, so I will print this list as a ListView. For this I created a method that will select all the columns from the table in a separate class, and I will print the ListView in a ListActivity. I want to retrieve 6 columns of the table, which is represented by the ids 2, 4, 5, 6, 7, 9. But it shows a lot of errors: 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): FATAL EXCEPTION: main 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): java.lang.NullPointerException 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:355) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.AbsListView.obtainView(AbsListView.java:1418) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ListView.makeAndAddView(ListView.java:1745) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ListView.fillDown(ListView.java:670) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ListView.fillFromTop(ListView.java:727) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.ListView.layoutChildren(ListView.java:1598) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.AbsListView.onLayout(AbsListView.java:1248) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.LinearLayout.onLayout(LinearLayout.java:1047) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.widget.FrameLayout.onLayout(FrameLayout.java:338) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.View.layout(View.java:7175) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.ViewRoot.performTraversals(ViewRoot.java:1140) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.view.ViewRoot.handleMessage(ViewRoot.java:1859) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.os.Handler.dispatchMessage(Handler.java:99) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.os.Looper.loop(Looper.java:123) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at android.app.ActivityThread.main(ActivityThread.java:3647) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at java.lang.reflect.Method.invokeNative(Native Method) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at java.lang.reflect.Method.invoke(Method.java:507) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 12-24 19:19:04.066: ERROR/AndroidRuntime(22630): at dalvik.system.NativeStart.main(Native Method) Here is the code of the method that select the data. public List<String> selectAll() { List<String> list1 = new ArrayList<String>(); List<String> list2 = new ArrayList<String>(); List<String> list3 = new ArrayList<String>(); List<String> list4 = new ArrayList<String>(); List<String> list5 = new ArrayList<String>(); List<String> list6 = new ArrayList<String>(); Cursor cursor = this.db.query(TABLE_NAME, null, null, null, null, null, "duration desc"); if (cursor.moveToFirst()) { do { list1.add(cursor.getString(2)); list2.add(cursor.getString(4)); list3.add(cursor.getString(5)); list4.add(cursor.getString(6)); list5.add(cursor.getString(7)); list6.add(cursor.getString(9)); list1.addAll(list2); list1.addAll(list3); list1.addAll(list4); list1.addAll(list5); list1.addAll(list6); } while (cursor.moveToNext()); Log.i(TAG, "After cursor.moveToNext()"); } if (cursor != null && !cursor.isClosed()) { cursor.close(); } Log.i(TAG, "Before selectAll returnment"); return list1; } And here is the code of the ListActivity class: public class RatedCalls extends ListActivity { private static final String LOG_TAG = "RatedCallsActivity"; private CallDataHelper cdh; StringBuilder sb = new StringBuilder(); OpenHelper openHelper = new OpenHelper(RatedCalls.this); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.i(LOG_TAG, "calling from onCreate()"); cdh = new CallDataHelper(this); Log.i(LOG_TAG, "--->>> before calling the service"); startService(new Intent(this, RatedCallsService.class)); Log.i(LOG_TAG, "Service called."); Log.i(LOG_TAG, "--->>> after calling the service"); fillList(); } public void fillList() { List<String> ratedCalls = this.cdh.selectAll(); setListAdapter(new ArrayAdapter<String>(this, R.layout.listitem, ratedCalls)); ListView lv = getListView(); lv.setTextFilterEnabled(true); lv.setOnItemClickListener(new OnItemClickListener() { public void onItemClick(AdapterView<?> parent, View view, int position, long id) { // When clicked, show a toast with the TextView text Toast.makeText(getApplicationContext(), ((TextView) view).getText(), Toast.LENGTH_SHORT).show(); } }); } }

    Read the article

  • HTG Explains: What Is Two-Factor Authentication and Should I Be Using It?

    - by Jason Fitzpatrick
    More and more banks, credit card companies, and even social media networks and gaming sites are starting to use two-factor authentication. If you’re a little unclear on what it is or on why you’d want to start using it, read on to learn how two-factor authentication can keep your data secure. HTG Explains: What Is Two-Factor Authentication and Should I Be Using It? HTG Explains: What Is Windows RT and What Does It Mean To Me? HTG Explains: How Windows 8′s Secure Boot Feature Works & What It Means for Linux

    Read the article

  • SQL SERVER – Check If Column Exists in SQL Server Table

    - by Pinal Dave
    A very frequent task among SQL developers is to check if any specific column exists in the database table or not. Based on the output developers perform various tasks. Here are couple of simple tricks which you can use to check if column exists in your database table or not. Method 1 IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'columnName' AND OBJECT_ID = OBJECT_ID(N'tableName')) BEGIN PRINT 'Your Column Exists' END   For AdventureWorks sample database IF EXISTS(SELECT * FROM sys.columns WHERE Name = N'Name' AND OBJECT_ID = OBJECT_ID(N'[HumanResources].[Department]')) BEGIN PRINT 'Your Column Exists' END   Method 2 IF COL_LENGTH('table_name','column_name') IS NOT NULL BEGIN PRINT 'Your Column Exists' END For AdventureWorks sample database IF COL_LENGTH('[HumanResources].[Department]','Name') IS NOT NULL BEGIN PRINT 'Your Column Exists' END Method 3 IF EXISTS( SELECT TOP 1 * FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'TableName' AND [COLUMN_NAME] = 'ColumnName' AND [TABLE_SCHEMA] = 'SchemaName') BEGIN PRINT 'Your Column Exists' END For AdventureWorks sample database IF EXISTS( SELECT TOP 1 * FROM INFORMATION_SCHEMA.COLUMNS WHERE [TABLE_NAME] = 'Department' AND [COLUMN_NAME] = 'Name' AND [TABLE_SCHEMA] = 'HumanResources') BEGIN PRINT 'Your Column Exists' END Let me know if you know any other method to find if Column Exists in SQL Server Table. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Calculate # of Rowspans and Colspans based on keys in a Multi-Array

    - by sologhost
    Ok, I have these 2 types of layouts, basically, it can be any layout really. I have decided to use tables for this, since using div tags cause undesirable results in some possible layout types. Here are 2 pics that describe the returned results of row and column: This would return the $layout array like so: $layout[0][0] $layout[0][1] $layout[1][1] In this layout type: $layout[1][0] is NOT SET, or doesn't exist. Row 1, Column 0 doesn't exist in here. So how can we use this to help us determine the rowspans...? Ok, this layout type would now return the following: $layout[0][0] $layout[0][1] $layout[1][0] $layout[2][0] $layout[2][1] $layout[3][1] Again, there are some that are NOT SET in here: $layout[1][1] $layout[3][0] Ok, I have an array called $layout that does a foreach on the row and column, but it doesn't grab the rows and columns that are NOT SET. So I created a for loop (with the correct counts of how many rows there are and how many columns there are). Here's what I got so far: // $not_set = array(); for($x = 0; $x < $cols; $x++) { $f = 0; for($p = 0; $p < $rows; $p++) { // $f = count($layout[$p]); if(!isset($layout[$p][$x])) { $f++; // It could be a rowspan or a Colspan... // We need to figure out which 1 it is! /* $not_set[] = array( 'row' => $p, 'column' => $x, ); */ } // if ($rows - count($layout[$p])) } } Ok, the $layout array has 2 keys. The first 1 is [ row ] and the 2nd key is [ column ]. Now looping through them all and determining whether it's NOT SET, tells me that either a rowspan or a colspan needs to be put into something somewhere. I'm completely lost here. Basically, I would like to have an array returned here, something like this: $spans['row'][ row # ][ column # ] = Number of rowspans for that <td> element. $spans['column'][ row # ][ column # ] = Number of colspans for that <td> element. It's either going to need a colspan or a rowspan, it will definitely never need both for the same element. Am I going about this whole thing the wrong way? Any help at all would be greatly appreciated!! I've been driving myself crazy with this for days! Pllleaase...

    Read the article

  • Keyboard layout per window

    - by Giorgi
    Hello, As you know when you change keyboard layout with alt-shift it affects all the windows of current application. Is it there any program which changes the behavior to per window? OS: Windows 7

    Read the article

  • Automatic layout of manual network mapping

    - by Paul
    So I have a small business network mainly consisting of two routed layer-2 domains with a total of ca. 100 devices spread over ca. 2000m² production and office spaces. Typical problems to solve using the graph would be: Over what (cable) path is a PC connected to the server? Where to expect devices connected to a switch port? I want to generate a graph of the physical network topology: Nodes are endpoint devices, switch ports, wall outlets, patch panel ports etc. Edges are cable connections. Ideally, grouping edges (or segments) that pass through the same bundle could be grouped. Also I would like to augment the graph data with automatically gathered data (monitoring state, MAC address, Switch port <- MAC entries to build up parts of the map). At the moment I use graphviz for this inside a Confluence wiki like that: layout = "neato" overlap = scale subgraph { rankdir = "TB" subgraph cluster_r1pf1 { r1pf1 [label="{ Rack 1 PF 1 | { <p1>P1 | <p2>P2 | <p3>P3} }", shape=record] } subgraph cluster_switch1 { switch1 [label="{ Rack 1 Switch 1 | { <p1> P1 | <p1> P1 | <p3> P3} }", shape=record] } r1pf1:p1 -> switch1:p1 (obviously there are dozens of entries omitted here) Problem is: I have a hard time to influence graphviz to generate a bearable layout. Edges overlap so bad that you can't read the diagram anymore. The question is: What other tools (be it interactive like Visio, Omnigraffle or I/O-oriented like graphviz) exist that would allow an easily versionable (as in: Operates on a text file) documentation that is both machine and human readable and editable? Why not OmniGraffle or Visio? Well we don't have Macs and Visio is not available at the moment. To buy it I would need good arguments. Automation would be one of that. But last time I looked, versioning Visio files or even thinking about automatic handling was a nightmare. Related: Network Mapping Tools basically asks the same with a focus on generating the complete graph automatically (but without the need to document cabling connections) Recommendations for automatic computer inventory brings up links of "all-in-one" solutions

    Read the article

  • Page layout software that allows mixed visual and programatic editing

    - by Justin Love
    I'd like to use a programming model for custom graphics and precision placement, and an interactive visual mode for large scale layout and less precise placements. I've used tools (PostScript, various vector drawing programs) that do one of these modes well, but leave me pining for the other model. Which tools should I be investigating? I'm currently on OS X. Examples: Creating diagrams with precise spacing, sets of cards, either likely drawing from some sort of data.

    Read the article

  • Formula in all cells in a column

    - by paulj3000
    Hi, Simple question: I want to create a formula which, in column Cn, will compute the values of An * Bn. example column C1 = column A1 * column B1 column C2 = column A2 * column B2 column C3 = column A3 * column B3 ...etc all the way down to column Cn = column An * column Bn Thanks

    Read the article

  • How to set column width of gridview with respective resolution

    - by Royson
    My gridview has 4 columns. In my machine it is displayed properly according to my code. but when i tried to run my app on another machines my column height gets increased and header text of two column displayed on two-line. Like: MyAllFolder Path It should be displayed on same line with changing width. How to dynamically change column width to set column header text in one line??

    Read the article

  • Silverlight DataGrid Exception Reordering Column Headers

    - by Mike
    I'm trying to set the initial display order of the column headers in a silverlight datagrid by changing the column header DisplayIndex values. If I try to set the column order at page load time, I get an out of range exception. If I set the column order (same routine) at a later time like, in a button click handler, it works. Is this just a bug in the silverlight datagrid control? Suggestions for a possible work around?

    Read the article

  • SlickGrid V2.0 Column name/id does not follow column when dragging

    - by Brian
    I have an application (using SlickGrid) where I need to get the column name or id at any time when user clicks on a cell (this pulls up a menu specific to the data in that column/cell). Grid works fine initially but if the column is moved (drag/drop), the column name/id does not follow the drop but remains mapped to it's initial column position. Has anyone else seen this and, if so, how did you fix it? Thanks

    Read the article

  • SQL SERVER – How to an Add Identity Column to Table in SQL Server

    - by Pinal Dave
    Here is the question I received on SQLAuthority Fan Page. “How do I add an identity column to Table in SQL Server? “ Sometime the questions are very very simple but the answer is not easy to find. Scenario 1: If you are table does not have identity column, you can simply add the identity column by executing following script: ALTER TABLE MyTable ADD ID INT IDENTITY(1,1) NOT NULL Scenario 2: If your table already has a column which you want to convert to identity column, you can’t do that directly. There is a workaround for the same which I have discussed in depth over the article Add or Remove Identity Property on Column. Scenario 3: If your table has already identity column and you can want to add another identity column for any reason – that is not possible. A table can have only one identity column. If you try to have multiple identity column your table, it will give following error. Msg 2744, Level 16, State 2, Line 2 Multiple identity columns specified for table ‘MyTable‘. Only one identity column per table is allowed. Leave a comment if you have any suggestion. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL Tagged: Identity

    Read the article

  • WPF - How to stop an ItemsControl psuedo-grid's columns from dancing/jumping around during layout

    - by Drew Noakes
    Several other questions on SO have come to the same conclusion I have -- using an ItemsControl with a DataTemplate for each item constructed to position items such that they resemble a grid is much simpler (especially to format) than using a ListView. The code resembles: <StackPanel Grid.IsSharedSizeScope="True"> <!-- Header --> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="Column1" /> <ColumnDefinition Width="Auto" SharedSizeGroup="Column2" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="Column Header 1" /> <TextBlock Grid.Column="1" Text="Column Header 2" /> </Grid> <!-- Items --> <ItemsControl ItemsSource="{Binding Path=Values, Mode=OneWay}"> <ItemsControl.ItemTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="Column1" /> <ColumnDefinition Width="Auto" SharedSizeGroup="Column2" /> </Grid.ColumnDefinitions> <TextBlock Grid.Column="0" Text="{Binding ColumnProperty1}" /> <TextBlock Grid.Column="1" Text="{Binding ColumnProperty2}" /> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> </ItemsControl> </StackPanel> The problem I'm seeing is that whenever I swap the object to which the ItemsSource is bound (it's an ObservableCollection that I replace the reference to, rather than clear and re-add), the entire 'grid' dances about for a few seconds. Presumably it is making a few layout passes to get all the Auto-width columns to match up. This is very distracting for my users and I'd like to get it sorted out. Has anyone else seen this?

    Read the article

  • Need an Overview of Possibilities for multicolumn programming

    - by Sam
    Hi folks, From source1 and source2 i gather that IE9 will NOT support multi-column css3!! Since it is still the most popular browser (another thing i cannot understand), i am left but no other choice than to use Programming Power to make multi-columns work. Now, I use three divs that float to left, and which are manually filled with text. Please don't laugh i know its stupid! But I would wish to not to have to worry about the columns and just have a one piece of (un-interrupted) text which all goes into only 1 div, and then have a program smart enough to split it up into X equally wide columns. Question: before i start reinvent the wheel, what methods of programming power have you known that tackle this elegantly? Please suggest your best working multi-column layout sources so I can evaluate which option is the best (I will update the below table). Exploring all possibilities 2011 and further, to enable multi column text user experience: Language Author SourceCodeUsage WorksOnAllMajorBrowser? ================================================================================= html manual labour put text manually in separate left-floating divs "Y" // Upside: control! Downside: few changes necessitates to reflow 3 divs manually! CSS3 w3c css3.info/preview/multi-column-layout/ "N" // {-moz-column-count: 3; -webkit-column-count: 3; } Thats all! javascript a list apart will add url soon ? // php ? ? ? //

    Read the article

  • Downloading an android layout from the internet.

    - by oscarello
    Hi, I would like ask if there's a way to download an android layout from the Internet into the "res/layout" folder. I was thinking in getting the file using an HttpUrlConnection and a FileOutputStream, like discussed in here http://stackoverflow.com/questions/576513/android-download-binary-file-problems but I can't fgure out how to put it into the "res/layout" folder. Thanks!

    Read the article

  • Error while opening the Eclipse Android Layout Editor

    - by Janusz
    Since yesterday everytime I open my layout Editor in Eclipse for the Android UI I get the following exception: Unhandled event loop exception java.lang.StackOverflowError at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.isTheme(Unknown Source) at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.isTheme(Unknown Source) at... the last part goes on and on as expected if an Stackoverflow Exception occurs. Anybody else experiencing this and found a solution? I'm working with the latests android sdk on Mac OS X with Eclipse 3.5.2

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >