Daily Archives

Articles indexed Tuesday May 18 2010

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

  • mysql 2 primary key onone table

    - by Bharanikumar
    CREATE TABLE Orders -> ( -> ID SMALLINT UNSIGNED NOT NULL, -> ModelID SMALLINT UNSIGNED NOT NULL, -> Descrip VARCHAR(40), -> PRIMARY KEY (ID, ModelID) -> ); Basically May i know ... Shall we create the two primary key on one table... Is it correct... Bcoz as per sql law,,, We can create N number of unque key in one table, and only one primary key only is the LAW know... Then how can my system allowing to create multiple primary key ? Please advise .... what is the general rule

    Read the article

  • Autocomplettextview filtered by input keys

    - by soclose
    Hi I use autocompletetextview with SimpleCursorAdapter to get data from sqlite. I'd like to get its drop down list started by the entered key. In my autocompletetextview, the list is not shown or filtered by input text. eg, If user enter "an", all text started with "an" will be seen in this list. In Java public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.new); txtPNo = (AutoCompleteTextView) findViewById(R.id.txtSTo); mDbHelper = new DBAdapter(this); mDbHelper.open(); SimpleCursorAdapter notes = fillToData(); txtPhoneNo.setAdapter(notes); } private SimpleCursorAdapter fillToData() { Cursor c = mDbHelper.getName(); startManagingCursor(c); String[] from = new String[] {DBAdapter.Name,DBAdapter.No1}; int[] to = new int[] {R.id.txtName,R.id.txtNo1}; Log.d(TAG, "cursor.getCount()=" + c.getCount()); SimpleCursorAdapter notes = new SimpleCursorAdapter(this, R.layout.autocomplete, c, from, to); return notes; } In new.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:background="#ffffff" > <AutoCompleteTextView android:id="@+id/txtSTo" android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="18sp" android:textColor="#000000" android:hint="To" android:completionThreshold="1" android:selectAllOnFocus="true" android:layout_alignParentTop = "true" android:layout_alignParentLeft="true"/> </RelativeLayout> In autocomplete.xml <?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0" android:padding="5dp"> <TableRow android:padding="5dp"> <LinearLayout android:orientation="vertical"> <TextView android:id="@+id/txtName" xmlns:android="http://schemas.android.com/apk/res/android" android:textColor="#000000" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <TextView android:id="@+id/txtNo1" xmlns:android="http://schemas.android.com/apk/res/android" android:textColor="#000000" android:layout_width="wrap_content" android:layout_height="wrap_content"/> </LinearLayout> </TableRow> </TableLayout> How to implement to get just filtered list?

    Read the article

  • Object viewer control needed (like QuickWatch in VS)

    - by Wallstreet Programmer
    Anyone know of any controls that you can add to your application to allow the user to check out the content of an object? I'm thinking of something like QuickWatch in Visual Studio, just list all properties of an object and its values and allow the user to drill down. I started writing one using reflection but it turned out be a lot of work to handle different kind of collections. This functionality would be used for debugging purposes mostly and not by regular users. I prefer WPF but Winforms would work as well.

    Read the article

  • DLL administration

    - by carlos
    I build some dlls to be used in a big application, and have a team working in the dlls heart of the application and another team working in the gui, but i am having a problems in the deployment of the dll's when a change is done, because the gui team needs or copy the new dll to the project folder, or delete the old reference and add the new one. Is there a best practice to deal with this problem? I am using Visual Studio 2008 and devoloping int VB and C# Thanks !!!

    Read the article

  • How can I make a div expand on click with only one open at a time?

    - by imHavoc
    As shown in here: http://www.learningjquery.com/2007/03/accordion-madness. But I need help to edit it so that it will work for my circumstances. Sample HTML <div class="row even"> <div class="info"> <div class="class">CK1</div> <div class="teacher_chinese">??</div> <div class="teacher_english">Teacher Name</div> <div class="assistant_chinese">??</div> <div class="assistant_english">Assistant Name</div> <div class="room">Room 00</div> <div class="book"></div> </div> <div class="chapters"> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=1"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=2"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=3"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=4"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=5"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=6"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=7"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=8"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=9"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=10"><span class="chapter">?</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=11"><span class="chapter">??</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=12"><span class="chapter">??</span></a> <a href="../../curriculum/cantonese/textbook.php?cls=C1&amp;ch=13"><span class="chapter">??</span></a> </div> </div> JQUERY [Work In Progress] $(document).ready(function() { $('div#table_cantonese .chapters').hide(); $('div#table_cantonese .book').click(function() { var $nextDiv = $(this).next(); var $visibleSiblings = $nextDiv.siblings('div:visible'); if ($visibleSiblings.length ) { $visibleSiblings.slideUp('fast', function() { $nextDiv.slideToggle('fast'); }); } else { $nextDiv.slideToggle('fast'); } }); }); So when the end-user click on div.book, div.chapters will expand. And only one div.chapters will be shown at a time. So if a div.chapters is already open, then it will close the open one first before animating the one the user clicked on.

    Read the article

  • GAE Having Tasks generate pages for user

    - by mellort
    I have a web app that I would like to have the following functionality: user gives a url webapp gets json data from that url and others from same website (this can take anywhere from 1-10 seconds) webapp uses data to generate page for user With this approach, I believe that if the server is in the process of getting the data for one user, then the other user won't be able to load the page (server busy). I would like to avoid this if possible. It seems like the Google Tasks API would be useful for this, but I don't see how I can run the task, and then use the output of the task to generate the page (how would the main app know when the task was finished?) What is the best way to resolve this? Thanks in advance

    Read the article

  • What's the fastest way to strip and replace a document of high unicode characters using Python?

    - by Rhubarb
    I am looking to replace from a large document all high unicode characters, such as accented Es, left and right quotes, etc., with "normal" counterparts in the low range, such as a regular 'E', and straight quotes. I need to perform this on a very large document rather often. I see an example of this in what I think might be perl here: http://www.designmeme.com/mtplugins/lowdown.txt Is there a fast way of doing this in Python without using s.replace(...).replace(...).replace(...)...? I've tried this on just a few characters to replace and the document stripping became really slow.

    Read the article

  • SQL - How to select a row having a column with max value

    - by Abhi
    date value 18/5/2010, 1 pm 40 18/5/2010, 2 pm 20 18/5/2010, 3 pm 60 18/5/2010, 4 pm 30 18/5/2010, 5 pm 60 18/5/2010, 6 pm 25 i need to query for the row having max(value)(i.e. 60). So, here we get two rows. From that, I need the row with the lowest time stamp for that day(i.e 18/5/2010, 3 pm - 60)

    Read the article

  • How do I return the value of the owner and id attributes respectively from an XML result set using P

    - by pharma_joe
    I am using PHP to iterate over the following result set, the aim is to build a hyperlink for each result using a foreach loop. I have stored the XML result in $images, and have constructed this loop: foreach ($images as $image) { //Build link to each photo returned //base URL $flickrPhotoUrl = 'http://www.flickr.com/photos/'; //Append user ID $flickrPhotoUrl .= ""; echo $flickrPhotoUrl; } Here is a sample result from Flickr: <photos page="1" pages="10982" perpage="10" total="109813"> <photo id="4616840471" owner="47823583@N03" secret="1b83173bc0" server="4013" farm="5" title="Strawberry Bears" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4616612597" owner="12658756@N08" secret="f626214382" server="4059" farm="5" title="Yarn Chef Minestrone - Grickle Grass" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4616469567" owner="26284268@N00" secret="6911a66838" server="4022" farm="5" title="P5130121.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4617076736" owner="26284268@N00" secret="8b990acba4" server="4047" farm="5" title="P5130106.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4616470013" owner="26284268@N00" secret="44600b3836" server="4036" farm="5" title="P5130125.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4616466147" owner="26284268@N00" secret="554eab8667" server="4052" farm="5" title="P5130116.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4617082398" owner="26284268@N00" secret="4a2b663442" server="3350" farm="4" title="P5130118.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4617078272" owner="26284268@N00" secret="357737017b" server="4013" farm="5" title="P5130109.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4617081446" owner="26284268@N00" secret="1f87726497" server="4048" farm="5" title="P5130117.JPG" ispublic="1" isfriend="0" isfamily="0"></photo> <photo id="4617077676" owner="26284268@N00" secret="77ca9f754a" server="3330" farm="4" title="P5130108.JPG" ispublic="1" isfriend="0" isfamily="0"></photo>

    Read the article

  • Sparx Enterprise Architect for SQL Server modeling?

    - by Tone
    I have used MS SQL Server Management Studio for most of my database modeling to this point in my career. I am a database developer (not a DBA), but interested in the benefits with using Sparx systems Enterprise Architect for data modeling. I do not have the need to generate scripts for different databases, other than that what does using Sparx EA buy me that SQL Management Studio does not?

    Read the article

  • Office 2010 Professional Plus (Top 10 reasons to upgrade)

    - by mbcrump
    Being a huge nerd, I decided that I would go ahead and upgrade to the latest and greatest office. That being, Office 2010 Professional Plus. The biggest concern that I had was loosing all my mail settings from Outlook 2007. Thankfully, it upgrade gracefully and worked like a charm. So lets start this top 10 list. 1) You can upgrade without fear of loosing all your stuff! As you can tell by the screenshot below, you can select what you want to do. I selected to remove all previous versions.    2) Outlook conversations: Just like GMail, you can now group emails by conversations. This is simply awesome and a must have. 3) The ability to ignore conversations. If you are on a email thread that has nothing to do with you. Simply “ignore” the conversation and all emails go into the deleted folder. 4) Quick Steps, do you send an email to the same team member or group constantly. With quick steps, its just one click away. 5) Spell check in the Subject line! 6)  Easier Screenshots, built in just click the button. No more ALT-Printscreen for those that are not aware of the awesome SnagIT 10 that's out. 7) Open in protected view. When you open a document from an email attachment, it lets you know the file may be unsafe. You can click a button to enable editing. This is great for preventing macros.       8) Excel has always had a variety of charts and graphs available to visually depict data and trends. With Excel 2010, though, Microsoft has added a new feature called Sparklines, which allows you to place a mini-graph or trend line in a single cell. The Sparklines are a cool way to quickly and simply add a visual element without having to go through the effort of inserting a graph or chart that overwhelms the worksheet. 9) Contact actions. If you hover over a name in the form or fields on an email, you get a popup giving you several actions you can perform on the person such as adding them to your Outlook contacts, scheduling a meeting, viewing their stored contact information if they are already in your contacts, sending an instant message or even starting a telephone call. 10) Windows 7 Task Bar Context Menu – I love the jumplist. I don’t know how much that I would actually use it but it just rocks.

    Read the article

  • JavaScript local alias pattern

    Heres a little pattern that is fairly common from JavaScript developers but that is not very well known from C# developers or people doing only occasional JavaScript development. In C#, you can use a using directive to create aliases of namespaces or bring them to the global scope: namespace Fluent.IO { using System; using System.Collections; using SystemIO = System.IO; In JavaScript, the only scoping construct there is is the function, but it can also be used as a local aliasing...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQLAuthority Book Review DBA Survivor: Become a Rock Star DBA

    DBA Survivor: Become a Rock Star DBA – Thomas LaRock Link to Amazon Link to Flipkart First of all, I thank all my readers when I wrote that I could not get this book in any local book stores, because they offered me to send a copy of this good book. A very special mention [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Technical Computing Initiative, Jim Gray and a Virtual Framed Letter on my Wall

    Today Microsoft announced their Technical Computing Initiative, a program to help scientists and engineers take advantage of the latest breakthroughs in parallel computing, bandwidth increases, and technologies that will make doing scientific research akin to using spreadsheets (as opposed to writing really complex custom code).  This is actually the culmination of work that the late Jim Gray, formerly a technical fellow at Microsoft, was working on. I didn't really know Jim, and frankly only...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Web setup project removes files after upgrade from VS2008 to VS2010

    - by Craig Shearer
    I have a web setup project built using VS2008. I've converted my solution to VS2010 and now when I build my new installer and run the install from the MSI it installs fine, then at the last step, removes all the files it's just installed. I have RemovePreviousVersions set to true. If I turn this off the files remain in place (but I get multiple instances in the Programs and Features in the control panel). If I run the install again, the files reappear. From then on, the files always remain, even when installing another version. So, the problem seems to be with running an installer built using VS2008 and then running the same installer built by VS2010. The upgrade GUIDs on each installer are the same. What is the cause and how can I fix this?

    Read the article

  • IoC, AOP and more

    - by JMSA
    What is an IoC container? What is an IoC/DI framework? Why do we need a framework for IoC/DI? Is there any relationship between IoC/DI and AOP? What is Spring.net/ninject with respect to IoC and AOP?

    Read the article

  • Illustration for code presentation

    - by Lasse V. Karlsen
    I got an odd request, and I fear it will be closed as off-topic. So be it, but it's worth a shot. I'm creating a presentation about dependency injection and inversion of control, and I thought I'd make the point of interchangeable parts that serve a common purpose, but has different implementations, by showing an image I've seen before. Basically the image is of a man or a woman, but the image is split up into four parts: Head Torso uhm... not sure the name of this part, stomach, etc. Legs Possibly a fifth with feet and for each part you can choose among a few variants, creating odd people in the process. ie. a man torso with a woman head. But, I can't find such an image now of course. Does anyone know of such an image and can provide me with an url?

    Read the article

  • OpenGL ES - texture map all faces of an 8 vertex cube?

    - by Feet
    Working through some OpenGL-ES tutorials, using the Android emulator. I've gotten up to texture mapping and am having some trouble mapping to a cube. Is it possible to map a texture to all faces of a cube that has 8 vertices and 12 triangles for the 6 faces as described below? // Use half as we are going for a 0,0,0 centre. width /= 2; height /= 2; depth /= 2; float vertices[] = { -width, -height, depth, // 0 width, -height, depth, // 1 width, height, depth, // 2 -width, height, depth, // 3 -width, -height, -depth, // 4 width, -height, -depth, // 5 width, height, -depth, // 6 -width, height, -depth, // 7 }; short indices[] = { // Front 0,1,2, 0,2,3, // Back 5,4,7, 5,7,6, // Left 4,0,3, 4,3,7, // Right 1,5,6, 1,6,2, // Top 3,2,6, 3,6,7, // Bottom 4,5,1, 4,1,0, }; float texCoords[] = { 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, }; I have gotten the front and back faces working correctly, however, none of the other faces are showing the texture.

    Read the article

  • How to Login Google webmaster tools with XMLHTTP

    - by darkandcold
    Hello, I have tried so many times but I couldn't get it worked. I am trying to log in google webmaster tools to get Search Queries List (top 20) I used XMLHTTP and AspTear, but no action :(. It says "my browser isnt cookie supported" But how can I log in google webmaster tools via xMLHTTP cookied enables? xmlhttp has any parameter about cookie?

    Read the article

  • Can someone describe some DI terms to me?

    - by SoBeNoFear
    I'm in the process of writing a DI framework for PHP 5, and I've been trying to find the 'official' definitions of some words in relation to dependency injection. Some of these words are 'context' and 'lifecycle'. And also, what would I call the object that gets created/injected? Finally, what is the difference between components and services, and which term (if either) should I call the objects that can be injected? I've read Martin Fowler's article and looked through other DI frameworks (Phemto, Spring, Google Guice, Xyster, etc.), but I want to know what you think. Thanks!

    Read the article

  • When would you use the Common Service Locator ?

    - by ajma
    I've been looking at the Common Service Locator as a way of abstracting my IoC container but I've been noticing that some people are strongly against this type of this. Do people recommend never using it? Always using it? or sometimes using it? If sometimes, then in what situations would you use it and what situations would you not use it.

    Read the article

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