Daily Archives

Articles indexed Sunday April 4 2010

Page 7/76 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • CSS placement of text

    - by Josh
    Anyone know how I can get "Posted by AUTHOR on April 3rd, 2010 | 0 Comments" underneath the headline of the news links WITHOUT it being apart of the A CLASS? I want it to look, read, and function like: [IMAGE] HEADLINE Posted by AUTHOR on April 3rd, 2010 | 0 Comments All of that in the initial looking field, then the user can click and it expands further. I can obviously get it to work if I put it in the A CLASS tag, but that's the problem. I can't have it there.

    Read the article

  • Status of VB6/ Best Desktop Application Language with Native Compilation

    - by Sandeep Jindal
    I was looking for a Desktop Application Programming Language with one of the biggest constraint: - “I need to output as native executable”. I explored multiple options: Java is not a very good option for desktop programming, but still you can use it. But Java to Exe is a problem. Only GCJ and Excelsior-Jet provides this. .Net platform does not support native compilation. Only very few expensive tools are available which can do the job. Python is not an option for native compilation. Right? VB6 is the option I am left with. From the above list, if I am correct, VB6 is the only and probably the best option I have. But VB6 itself has issues like: It is no more under development since There are questions on support of VB6 IDE with Vista Thus my questions are: From the list of programming language options, do you want to add any more? If VB6 is good/best option, looking at its development status, would you suggest using VB6 in this era?

    Read the article

  • Enforcing a Uniqueness Constraint in a Nested Form

    - by Euwyn
    I'm trying not to fight the defaults here and use Rails built-in support for nested attributes (from http://ryandaigle.com/articles/2009/2/1/what-s-new-in-edge-rails-nested-attributes). I'm labeling Things with Tags, and all works swell, and for each Thing I have a form with a nested field that creates a new Tag by a name. Trouble is, I need to make sure that each Tag has a unique name. Instead of creating a new Tag, if a user enters the name of one that already exists, I need to create the associate with that pre-existing Tag. How do I do this?

    Read the article

  • iPhone SDK: Orientation (Landscape and Portrait views)

    - by domness
    Okay, I've got my normal app which is in portrait mode. I can force my app to go to landscape mode for a view (using navigationcontroller and viewcontroller) like this: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; } But then when I go back to the main menu (tableview) it goes straight back to portrait. I try this code: - (void)viewWillAppear:(BOOL)animated { [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationPortrait]; } But that doesn't work.. Any ideas?

    Read the article

  • How to pass form errors in session or flash? [Rails 2.3.5]

    - by yuval
    I have a create action for a form that potentially generates errors (i.e. first name is missing) and then redirects. The problem is, that when the redirect happens those form errors get lost. How could I pass those form errors in a session to be displayed back in the original form (which should still be filled out with the previous details, as in the original error_messages behavior)? Thanks!

    Read the article

  • Install CLSQL on Mac OS X

    - by Ken
    I have SBCL installed (via macports/darwinports) on my Intel Core 2 Duo Macbook running 10.5.8. I've installed several libraries like this: (require 'asdf) (require 'asdf-install) (asdf-install:install 'cl-who) But when I tried to install CLSQL this way ('clsql) after it downloaded, I got this: ... ; registering #<SYSTEM CLSQL-UFFI {123D9E01}> as CLSQL-UFFI ; $ cd /Users/ken/.sbcl/site/clsql-5.0.5/uffi/; make cc -arch x86_64 -arch i386 -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress clsql_uffi.c -o clsql_uffi.dylib ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture i386 ld: duplicate symbol dyld_stub_binding_helper in /usr/lib/bundle1.o and /usr/lib/bundle1.o for architecture x86_64 collect2: ld returned 1 exit status collect2: ld returned 1 exit status lipo: can't open input file: /var/folders/Nf/Nf4o5ArDFaWBH2OwtnWM3E+++TQ/-Tmp-//ccJyZxou.out (No such file or directory) make: *** [clsql_uffi.so] Error 1 Is there something I forgot, or some trick to get it to build on Mac OS X? I know very little about C libraries on the Mac these days, so I don't even know where to start on this. Thanks!

    Read the article

  • Urban Airship - not receving push notifications on device?

    - by Silent
    Hey guys just installed everything to my app tried to push but no messages appear the token for my device is saved so thats working, when i push the website says it sent but no message on device. Right now im using production certificate for push notification with a developer pervision and not the distrubution certificate. I tried cleaning the build and reinstalling but no luck since an extra app was installed from the same one. I used the code that is on the sample file tutorial i think thats all the detail dont know what to do next.

    Read the article

  • Which PHP library I should choose to work with CouchDB?

    - by Guss
    I want to try playing with CouchDB for a new project I'm writing (as a hobby, not part of my job). I'm well versed in PHP, but I haven't programmed with CouchDB at all, and also I have little experience with non-SQL databases. From looking at CouchDB's "Getting Started with PHP" document they recommend using a third-party library or writing your own client using their RESTful HTTP API. I think I'd rather not mess with writing protocol implementations myself at this point, but what is your experience with writing PHP to work with CouchDB? I haven't tested any of the alternatives yet, but I looked at: PHPillow : I'm interested in the way they implement ORM. I wasn't planning to do ORM, but my problem domain probably map well to that method. PHP Object Freezer: seems like a poor man's ORM - I can use it to implement an actual ORM, or just as an easy store/retrieve document API but it seems too primitive. PHP-on-Couch : Also a bit simple, but they have an interesting API for views and from the documentation it looks usable enough. PHP CouchDB Extension : From the listed options this looks like it has the best chance of making it into the PHP mainline itself, and also has the most complete API. Any opinion one wish to share on each library is welcome.

    Read the article

  • How to store a user's password to another web application

    - by Horace Loeb
    I'm building a web application that shows users interesting visualizations of their Gmail activity (who they're emailing the most, etc). Obviously the user needs to give me his Gmail password to use the application, and I'm wondering how I should store it: Store the Gmail password in plaintext. Risky! Don't store the Gmail password at all; force the user to enter it every time he wants to sync data. Potentially inconvenient! Encrypt the Gmail password before storing it. The user's password to my application is the key. Something like (3) seems best, but with (3) I can only sync data when the user logs in (since I won't know his password to my application at any other time), which isn't ideal. I'd prefer a Mint.com-like solution whereby the user can click a button to sync data from Gmail at any time without re-entering his password (any idea how Mint accomplishes this without storing your banking passwords?)

    Read the article

  • Problem implementing sorting algorithm in C with an array of structs

    - by dilog
    Well here is my little problem, first my code: struct alumn { char name[100]; char lastname[100]; int par; int nota; }; typedef struct alumn alumn; int bubble(alumn **arr, int length) { int i,j; alumn *temp; for (i=0; i<=length-2; i++) { for (j=i+1; j<=length-1;j++) { if ((*arr)[i].nota > (*arr)[j].nota) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } } } int main(int argc, char **argv) { alumn *alumns; ... here goes some other code ... bubble(&alumns,totalAlumns); return 0; } My problem is that this algorith is not sorting anything. I'm having a hard time doing the swap, i tried everything but nothing works :( . Any help??? struct alumn { char name[100]; char lastname[100]; int par; int nota; }; typedef struct alumn alumn; int bubble(alumn **arr, int length) { int i,j; alumn *temp; for (i=0; i<=length-2; i++) { for (j=i+1; j<=length-1;j++) { if ((*arr)[i].nota > (*arr)[j].nota) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; } } } } int main(int argc, char **argv) { alumn *alumns; ... here goes some other code ... bubble(&alumns,totalAlumns); return 0; } My problem is that this algorith is not sorting anything. I'm having a hard time doing the swap, i tried everything but nothing works :( . Any help???

    Read the article

  • WrapPanel doesn't wrap in WPF ListView

    - by Joan Venge
    I am using a ListView with an ItemTemplate like this: <Window.Resources> <DataTemplate x:Key="ItemTemplate"> <WrapPanel Orientation="Horizontal"> <Image Width="50" Height="50" Stretch="Fill" Source="{Binding Cover}"/> <Label Content="{Binding Title}" /> </WrapPanel> </DataTemplate> </Window.Resources> But the Covers do not fill the screen like windows explorer windows. How do I do this? They just get stacked vertically in my version.

    Read the article

  • Why are all objects in this extension of usercontrol null at runtime?

    - by csciguy
    All, I have a simple class. public class Container : UserControl { public bool IsClickable { get; set; } } I have a class that extends this class. public class ScrollingContainer : Container { public void Draw() { } public void Update() { } } I have a custom class, that then extends ScrollingContainer. public partial class MaskContainer : ScrollingContainer { public MaskContainer() { InitializeComponent(); } } XAML <local:ScrollingContainer x:Class="Test.Types.MaskContainer" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:GameObjects;assembly=GameObjects" mc:Ignorable="d" > </local:ScrollingContainer> In my mainpage.xaml, I have the following. <types:MaskContainer x:Name="maskContainer" Canvas.ZIndex="1" Width="Auto" Height="Auto"> <Canvas x:Name="maskCanvas"> <Button x:Name="button1" Content="test button"/> </Canvas> </types:MaskContainer> Why, at runtime, are both maskCanvas and button1 null? maskContainer is not null. The inheritance should be straightforward here. Container inherits usercontrol. Scrollable container inherits container. Mask Container inherits scrollable container. Why am I losing the fucntionality of the original base class at this level? Is it incorrect to add the element (button1) to the maskcontainer inside of the main.xaml? My end goal is to create a container that is reusable, but inherits all properties/methods that I've specified throughout the chain. Any help is appreciated.

    Read the article

  • Correctly use dependency injection

    - by Rune
    Me and two other colleagues are trying to understand how to best design a program. For example, I have an interface ISoda and multiple classes that implement that interface like Coke, Pepsi, DrPepper, etc.... My colleague is saying that it's best to put these items into a database like a key/value pair. For example: Key | Name -------------------------------------- Coke | my.namespace.Coke, MyAssembly Pepsi | my.namespace.Pepsi, MyAssembly DrPepper | my.namespace.DrPepper, MyAssembly ... then have XML configuration files that map the input to the correct key, query the database for the key, then create the object. I don't have any specific reasons, but I just feel that this is a bad design, but I don't know what to say or how to correctly argue against it. My second colleague is suggesting that we micro-manage each of these classes. So basically the input would go through a switch statement, something similiar to this: ISoda soda; switch (input) { case "Coke": soda = new Coke(); break; case "Pepsi": soda = new Pepsi(); break; case "DrPepper": soda = new DrPepper(); break; } This seems a little better to me, but I still think there is a better way to do it. I've been reading up on IoC containers the last few days and it seems like a good solution. However, I'm still very new to dependency injection and IoC containers, so I don't know how to correctly argue for it. Or maybe I'm the wrong one and there's a better way to do it? If so, can someone suggest a better method? What kind of arguments can I bring to the table to convince my colleagues to try another method? What are the pros/cons? Why should we do it one way? Unfortunately, my colleagues are very resistant to change so I'm trying to figure out how I can convince them.

    Read the article

  • Product Catalog Schema design

    - by FlySwat
    I'm building a proof of concept schema for a product catalog to possibly replace a very aging and crufty one we use. In our business, we sell both physical materials and services (one time and reoccurring charges). The current catalog schema has each distinct category broken out into individual tables, while this is nicely normalized and performs well, it is fairly difficult to extend. Adding a new attribute to a particular product involves changing the table schema and backpopulating old data. An idea I've been toying with has been something along the line of a base set of entity tables in 3rd normal form, these will contain the facts that are common among ALL products. Then, I'd like to build an Attribute-Entity-Value schema that allows each entity type to be extended in a flexible way using just data and no schema changes. Finally, I'd like to denormalize this data model into materialized views for each individual entity type. This views are what the application would access. We also have many tables that contain business rules and compatibility rules. These would join against the base entity tables instead of the views. My big concerns here are: Performance - Attribute-Entity-Value schemas are flexible, but typically perform poorly, should I be concerned? More Performance - Denormalizing using materialized views may have some risks, I'm not positive on this yet. Complexity - While this schema is flexible and maintainable using just data, I worry that the complexity of the design might make future schema changes difficult. For those who have designed product catalogs for large scale enterprises, am I going down the totally wrong path? Is there any good best practice schema design reading available for product catalogs?

    Read the article

  • iPhone Orientation Relayout From Single Column to Double Column

    - by kkrizka
    I am trying to create a UIView in Interface Builder that shows to the user two boxes containing some text. This UIView should support both landscape and portrait modes. When in portrait orientation, the two boxes should be centered horizontally and be under each other. Like in the picture below: But when in landscape orientation, it should show the two boxes centered vertically and by side by side. Like in the picture below: Is this possible using only the autosizing options (or any other IB options), or do I have to relayout the view in code on orientation change events? I would prefer using only IB. I tried locking the top and left margins of the top box and locking the bottom and right margins of the bottom box. But the problem is that for it to work I also need to shrink the two boxes as one changes from portrait to landscape, because otherwise they would overlap.

    Read the article

  • Problem with glaux.h locating

    - by rodnower
    Hello, I try to compile code, that beggins with: #include<stdlib.h> #include<GL/gl.h> #include<glaux.h> with command: cc -o test test.c -I/usr/local/include -L/usr/local/lib -lMesaaux -lMesatk -lMesaGL -lXext -lX11 -lm But one of errors I got is: test.c:3:18: error: glaux.h: No such file or directory Then I try: yum provides glaux.h but yum find anything. Before all I installed Mesa with: yum install mesa* So, can anyone tell me from where I can get the header file? Thank you for ahead.

    Read the article

  • SQL SERVER Enable Identity Insert Import Expert Wizard

    I recently got email from old friend who told me that when he tries to execute SSIS package it fails with some identity error. After some debugging and opening his package we figure out that he has following issue.Let us see what kind of set up he had on his package.Source Table with Identity columnDestination [...]...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

  • Two issues occur when you deploy an ASP.NET 2.0-based application on a server that is running IIS 7.

    979917 ... Two issues occur when you deploy an ASP.NET 2.0-based application on a server that is running IIS 7.0 or IIS 7.5 in Integrated modeThis RSS feed provided by kbAlerz.com.Visit kbAlertz.com to subscribe. It's 100% free and you'll be able to recieve e-mail or RSS updates for the technologies you pick from the Microsoft Knowledge Base....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

  • Search in static pages

    - by Shyju
    I have an ASP web application which has pages with static content as well as dynamic content(data from database). I want to implement a search feature in the site.I Can do this with the dynamic data easily by framing the select query based on the search keys and pull data from the tables,But i would like to know how can i implement the search with the static pages ?

    Read the article

  • Binding dropdown list in a gridview edit item template

    - by Renju
    i can bind the dropdownlist in the edit item template. The drop down list is having null values. protected void grdDevelopment_RowDataBound(object sender, GridViewRowEventArgs e) { DropDownList drpBuildServers = new DropDownList(); if (grdDevelopment.EditIndex == e.Row.RowIndex) { drpBuildServers = (DropDownList)e.Row.Cells[0].FindControl("ddlBuildServers"); } } also getting an error Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

    Read the article

  • How to determine if scrolling a UITableView was done by tapping the index?

    - by John Michael Zorko
    Hello, all ... I want to determine when the index (transparent alphabet) along the side of a UITableView is tapped. To be more specific, I have a sectioned UITableView that has an index, and said index does the right thing, but when the UITableView's -scrollViewDidScroll method is called, I want to be able to determine if said scrolling was the result of the user tapping the index, vs. dragging or swiping the table view itself. If anyone has ideas on how to do this, i'd love to hear about them :-) Regards, John

    Read the article

  • What does * address(found in printf) mean in assembly?

    - by Mask
    Disassembling printf doesn't give much info: (gdb) disas printf Dump of assembler code for function printf: 0x00401b38 <printf+0>: jmp *0x405130 0x00401b3e <printf+6>: nop 0x00401b3f <printf+7>: nop End of assembler dump. (gdb) disas 0x405130 Dump of assembler code for function _imp__printf: 0x00405130 <_imp__printf+0>: je 0x405184 <_imp__vfprintf+76> 0x00405132 <_imp__printf+2>: add %al,(%eax) How is it implemented under the hood? Why disassembling doesn't help? What does * mean before 0x405130?

    Read the article

  • Knight movement.... " how to output all possible moves. "

    - by josh kant
    The following is the code i wrote.. I have to write it for nXn but for easyness i tried to test it for 5X5. It does not display my output... could anybody tell me whats wrong with the following code: { #include <iostream> #include <iomanip> using namespace std; void knight ( int startx, int starty, int n, int p[][5], int used [][5], int &count); int main ( ) { const int n = 5; // no. of cloumns and rows int startx = 0; int starty = 0; int p[5][5]; int used[5][5]; int count = 1; int i= 0; int j = 0; //initializing the array for ( i = 0; i < 5; i++) { for ( j = 0; j < 5; j++) { p[i][j] = 0; used [i][j] = 0; } } //outputting the initialized array.. i=0; while ( i< 5) { for ( j = 0; j < 5; j++) { cout << setw(3) << p[i][j]; } i++; cout << endl; } knight (startx,starty,n,p,used,count); return 0; } void knight ( int x, int y, int n, int p[][5], int used [][5], int &count) { int i = 0; //knight (x,y,n,p,used,count) for ( i = 0; i < n*n; i++) { if ( used [x][y] == 0 ) { used[x][y] = 1; // mark it used; p[x][y] += count; //inserting step no. into the solution //go for the next possible steps; //move 1 //2 squares up and 1 to the left if (x-1 < 0 && y+2 < n && p[x-1][y+2] == 0) { used[x-1][y+2] = 1; p[x-1][y+2] += count; knight (x-1,y+2,n,p,used,count); used[x-1][y+2] = 0; } //move 2 //2 squares up and 1 to the right if ( x+1 < n && y+2 < n && p[x+1][y+2] == 0 ) { used[x+1][y+2] = 1; p[x+1][y+2] += count; knight (x+1,y+2,n,p,used,count); used[x+1][y+2] = 0; } //move 3 //1 square up and 2 to the right if ( x+2 < n && y+1 < n && p[x+2][y+1] == 0 ) { used[x+2][y+1] = 1; p[x+2][y+1] += count; knight (x+2,y+1,n,p,used,count); used[x+2][y+1] = 0; } //move 4 //1 square down and 2 to the right if ( x+2 < n && y-1 < n && p[x+2][y-1] == 0 ) { used[x+2][y-1] = 1; p[x+2][y-1] += count; knight (x+2,y-1,n,p,used,count); used[x+2][y-1] = 0; } //move 5 //2 squares down and 1 to the right if ( x+1 < n && y-2 < n && p[x+1][y-2] == 0 ) { used[x+1][y-2] = 1; p[x+1][y-2] += count; knight (x+1,y-2,n,p,used,count); used[x+1][y-2] = 0; } //move 6 //2 squares down and 1 to the left if ( x-1 < n && y-2 < n && p[x-1][y-2] == 0 ) { used[x-1][y-2] = 1; p[x-1][y-2] += count; knight (x-1,y-2,n,p,used,count); used[x-1][y-2] = 0; } //move 7 //1 square down and 2 to the left if ( x-2 < n && y-1 < n && p[x-2][y-1] == 0 ) { used[x-2][y-1] = 1; p[x-2][y-1] += count; knight (x-2,y-1,n,p,used,count); used[x-2][y-1] = 0; } //move 8 //one square up and 2 to the left if ( x-2 < n && y+1< n && p[x-2][y+1] == 0 ) { used[x-2][y+1] = 1; p[x-2][y+1] += count; knight (x-2,y+1,n,p,used,count); used[x-2][y+1] = 0; } } } if ( x == n-1 && y == n-1) { while ( i != n) { for ( int j = 0; j < n; j++) cout << setw(3) << p[i][j]; i++; } } } Thank you!!

    Read the article

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