Search Results

Search found 31491 results on 1260 pages for 'simple talk'.

Page 70/1260 | < Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >

  • Universal control - simple question about dock and anchor

    - by Vytas999
    I use Visual Studio .NET to develop internal applications. I create a Windows control that will display custom status bar information. Different developers will use the control to display the same information in many different applications. The control must always be displayed at the bottom of the parent form in every application. It must always be as wide as the form. When the form is resized, the control should be resized and repositioned accordingly. How should I do that in the best way and why? A)Create a property to allow the developers to set the Dock property of the control. Set the default value of the property to AnchorStyle.Bottom. B) Create a property to allow the developer to set the Anchor property of the control. Set the default value of the property to AnchorStyle.Bottom.

    Read the article

  • simple fbml fb:login-button is not rendering in ie6

    - by Mark
    The following codes works in FF and Chrome, but IE6 does not render the connect button. What am I missing here? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <title></title> </head> <body> <fb:login-button>Login button</fb:login-button> <script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script> <script type="text/javascript"> FB_RequireFeatures(["XFBML"], function(){ FB.Facebook.init("API_KEY", "/xd_receiver.htm"); }); </script> </body> </html>

    Read the article

  • How to write a simple usb driver?

    - by ScReYm0
    I make this treat because you are closing my other before i get my answer. Here is my answer clear and exactly what i want to do! I wanna create a usb driver, so my own C application be able to get into my flash drive and take information from the imported flash drive. OS: Windows Please don't close it again I still cant find my answer... more details I start my app/which contains my USB driver/ i plug-in my flash and its shows in Explorer that this drive is plugged and it is accessible, while that's happening, my app is checking that file data.txt EXIST if that file exist, program run next function, if not program, my program runs down/exit/! I hope that this helps understanding my idea...

    Read the article

  • simple dividing

    - by dontoo
    Lets say I am dividing 2592 / 324 = 8 Practically I must guess that 324 goes 8 times in 2592 without reminder. For example, first I try with 7 ( 7*324 = 2268, reminder 324, so 7 is wrong, so I try with 8 and 8 is correct) Is there anyway to do dividing without guessing( trying ), like multiplication ( all mechanically, digit by digit )?

    Read the article

  • Simple user control for conditionally rendering nested HTML

    - by Goyuix
    What I would like to do, is be able to pass two attributes to a user control, a ListName and a Permission, like so: <uc:check id="uc" List="Shared Documents" Permission="OpenItems" runat="server"> <!-- have some HTML content here that is rendered if the permission is true --> </uc:check> Then in the actual check user control, have something similar to: <%@ Control language="C#" ClassName="check" %> <% // determine permission magic placeholder if (DoesUserHavePermissions(perm)) { // render nested HTML content } else { // abort rendering as to not show nested HTML content } %> I have read the page on creating a templated control on MSDN, and while that would work - it really seems to be a bit overkill for what I am trying to do. Is there a control that already renders content based on a boolean expression or a simpler template example? http://msdn.microsoft.com/en-us/library/36574bf6.aspx

    Read the article

  • Need help building SQL Query (simple JOIN)

    - by Newbie
    Hello! In my database, I have a "users", a "quests" and a "questings" table. A user can solve a quest. Solving a quest will save the "user_id" and the "quest_id" in my "questings" table. Now, I want to select all quests, a user has NOT solved (meaning there is no entry for this user and quest in "questings" table)! Let's say the user has the id 14. How to write this query? After solving this query, I want to filter the results, too. A quest and a user has a city, too. What to do for writing a query which returns all quests, a user has NOT solved yet, in the users city (user city == quest city)?

    Read the article

  • C# code simple console program not working

    - by Wast334
    I am trying to test some console ability in C#.. I can't get this code to work using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Dim myMessage; myMessage = @"Hello World"; printf(@"%@", myMessage); return 0; } } } I am getting a bunch of compiler errors i am not sure what I am doing wrong..? Error 1 The type or namespace name 'Dim' could not be found (are you missing a using directive or an assembly reference?) C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 12 13 ConsoleApplication1 Error 2 The name 'printf' does not exist in the current context C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 14 13 ConsoleApplication1 Error 3 Since 'ConsoleApplication1.Program.Main(string[])' returns void, a return keyword must not be followed by an object expression C:\Documents and Settings\wstevens\Local Settings\Application Data\Temporary Projects\ConsoleApplication1\Program.cs 15 13 ConsoleApplication1

    Read the article

  • very simple delegate musing

    - by Ted
    Sometimes the simplest questions make me love C/C++ and C# more and more. Today sitting on the bus musing aout delegates I remembered reading somwhere you don't need to use the new keyword when instaniating a new delegate. For example: public static void SomeMethod(string message) { ... } ... public delegate void TestDelgate(string message); //Define a delegate ........... //create a new instance ..METHOD 1 TestDelgate t = new TestDelgate(SomeMethod); //OR another way to create a new instance ..METHOD 2 TestDelgate t = SomeMethod; //create a new instance ..METHOD 2 So todays questions are What happens under the hood in method 2. Does the compiler expand method 2 into method 1, hence writing TestDelgate t = SomeMethod; is just a shortcut for TestDelgate t = new TestDelgate(SomeMethod);, or is there another reason for the exsitence of method 2 Do you guys think method 1 or method 2 is better for readability (this is a subjective question, but I'd just like to get a unscientific feel of general opinion of stackoverflow :-))

    Read the article

  • Simple doubt related to strings in C

    - by piemesons
    // The first example: char text[] = "henri"; char *p; p = text; *(p + 1) = 'E'; // Output = hEnri // Now If we want to remove the "e" ie hnri, we would go for????? *(p + 1)=????? Please dont say start copying the array. I am looking for the best solution

    Read the article

  • Simple 'database' in c++

    - by DevAno1
    Hello. My task was to create pseudodatabase in c++. There are 3 tables given, that store name(char*), age(int), and sex (bool). Write a program allowing to : - add new data to the tables - show all records - sort tables with criteria : - name increasing/decreasing - age increasing/decreasing - sex Using function templates is a must. Also size of arrays must be variable, depending on the amount of records. I have some code but there are still problems there. Here's what I have: Function tabSize() for returning size of array. But currently it returns size of pointer I guess : #include <iostream> using namespace std; template<typename TYPE> int tabSize(TYPE *T) { int size = 0; size = sizeof(T) / sizeof(T[0]); return size; } How to make it return size of array, not its pointer ? Next the most important : add() for adding new elements. Inside first I get the size of array (but hence it returns value of pointer, and not size it's of no use now :/). Then I think I must check if TYPE of data is char. Or am I wrong ? // add(newElement, table) template<typename TYPE> TYPE add(TYPE L, TYPE *T) { int s = tabSize(T); //here check if TYPE = char. If yes, get the length of the new name int len = 0; while (L[len] != '\0') { len++; } //current length of table int tabLen = 0; while (T[tabLen] != '\0') { tabLen++; } //if TYPE is char //if current length of table + length of new element exceeds table size create new table if(len + tabLen > s) { int newLen = len + tabLen; TYPE newTab = new [newLen]; for(int j=0; j < newLen; j++ ){ if(j == tabLen -1){ for(int k = 0; k < len; k++){ newTab[k] = } } else { newTab[j] = T[j]; } } } //else check if tabLen + 1 is greater than s. If yes enlarge table by 1. } Am I thinking correct here ? Last functions show() is correct I guess : template<typename TYPE> TYPE show(TYPE *L) { int len = 0; while (L[len] == '\0') { len++; } for(int i=0; i<len; i++) { cout << L[i] << endl; } } and problem with sort() is as follows : Ho can I influence if sorting is decreasing or increasing ? I'm using bubble sort here. template<typename TYPE> TYPE sort(TYPE *L, int sort) { int s = tabSize(L); int len = 0; while (L[len] == '\0') { len++; } //add control increasing/decreasing sort int i,j; for(i=0;i<len;i++) { for(j=0;j<i;j++) { if(L[i]>L[j]) { int temp=L[i]; L[i]=L[j]; L[j]=temp; } } } } And main function to run it : int main() { int sort=0; //0 increasing, 1 decreasing char * name[100]; int age[10]; bool sex[10]; char c[] = "Tom"; name[0] = "John"; name[1] = "Mike"; cout << add(c, name) << endl; system("pause"); return 0; }

    Read the article

  • Trouble applying a simple template

    - by Adam S
    I'm having trouble applying a template to my checkboxes. I have the following template: <ControlTemplate x:Key="TriStateRed" TargetType="{x:Type CheckBox}"> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="{x:Null}" > <Setter TargetName="path" Property="Data" Value="M 0 2.5 A 5 2.5 0 1 1 5 5 L 5 8 M 5 10 L 5 10" /> <Setter TargetName="path" Property="Stroke" Value="Red" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> However, visual studio gives me the following error: Cannot find the Trigger target 'path'. (The target must appear before any Setters, Triggers, or Conditions that use it.) Can anyone make sense of this?

    Read the article

  • Fast way to pass a simple java object from one thread to another

    - by Adal
    I have a callback which receives an object. I make a copy of this object, and I must pass it on to another thread for further processing. It's very important for the callback to return as fast as possible. Ideally, the callback will write the copy to some sort of lock-free container. I only have the callback called from a single thread and one processing thread. I only need to pass a bunch of doubles to the other thread, and I know the maximum number of doubles (around 40). Any ideas? I'm not very familiar with Java, so I don't know the usual ways to pass stuff between threads.

    Read the article

  • Help to comment a simple statement

    - by Woppie the Russian
    How does you call this statement?: $arr = array(); initialize an array or declare an array? In brief, how would you comment such a statement? (P.S. That array would then hold a bunch of values.) EDIT: I doubt because what I basically do is declare a variable of a particular type, don't I?

    Read the article

  • Simple question about operator ||

    - by Tristan
    HEllo, i try to do that in FlashBuilder (FlexProject) protected function btn_detail_view_clickHandler(event:MouseEvent):void { CurrentState="Statistiques" || "PartMarche"; } But it's not working, i guess this is not the right syntax but what's the right syntax ? Thanks

    Read the article

  • Simple doubt related to strings in C (question in an interview)

    - by piemesons
    // The first example: char text[] = "henri"; char *p; p = text; *(p + 1) = 'E'; // Output = hEnri // Now If we want to remove the "e" ie hnri, we would go for????? *(p + 1)=????? Please dont say start copying the array. I am looking for the best solution. Its an interview question... EDIT I specially mentioned the question that i am not asking for the solution like start moving the element. I thought there must be some other good solution..

    Read the article

  • Simple rails routing / url question

    - by justinbach
    I'm using Ryan Bates' nifty authentication in my application for user signup and login. Each user has_many :widgets, but I'd like to allow users to browse other users' widgets. I'm thinking that a url scheme like /username/widgets/widget_id would make a lot of sense--it would keep all widget-related code in the same place (the widgets controller). However, I'm not sure how to use this style of URL in my app. Right now my codebase is such that it permits logged-in users to browse only their own widgets, which live at /widgets/widget_id. What changes would I need to make to routes.rb, my models classes, and any place where links to a given widget are needed? I've done Rails work before but am a newb when it comes to more complicated routing, etc, so I'd appreciate any feedback. Thanks for your consideration!

    Read the article

  • Yet Another Simple Retain Count Question

    - by yar
    [I'm sure this is not odd at all, but I need just a bit of help] I have two retain properties @property (nonatomic, retain) NSArray *listContent; @property (nonatomic, retain) NSArray *filteredListContent; and in the viewDidLoad method I set the second equal to the first self.filteredListContent = self.listContent; and then on every search I do this self.filteredListContent = [listContent filteredArrayUsingPredicate:predicate]; I thought I should do a release right above this assignment -- since the property should cause an extra retain, right? -- but that causes the program to explode the second time I run the search method. The retain counts (without the extra release) are 2 the first time I come into the search method, and 1 each subsequent time (which is what I expected). Some guidance would help, thanks! Is it correct to not release?

    Read the article

  • Simple Regex Question

    - by Jim B
    Hey Everyone, I need to search a bunch of files for anything that contains either "tblPayment" or "tblInvoice" I also want to match any tables named "tblPaymentMethod", "tblInvoiceItem", "tblInvoicePayment" Anybody care to help me out with how to write a regular expression for this? Thanks again!

    Read the article

  • simple obj-c naming question

    - by Highstead
    This question is more to figure out how to look up classes and objects in objective-c but i lack the knowledge to figure out how to look this up so i pose the question here. In .Net if i had a MyObject.MyValue the MyValue would be called a property, and I could look this up in MSDN. In java i would check the javadocs online (and that property would have to be a value). With objective-c that is called a ? and if i wanted to look it up i would look where? Example: //Object.??? UIImage.backgroundColor = [UIColor blueColor];

    Read the article

  • Simple Obj-C Memory Management Question

    - by yar
    This is from some sample code from a book // On launch, create a basic window - (void)applicationDidFinishLaunching:(UIApplication *)application { UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[[HelloController alloc] init]]; [window addSubview:nav.view]; [window makeKeyAndVisible]; } But a release is never called for window nor for nav. Release should be called since alloc was called, right? If #1 is right, then I would need to store a reference to each of these in an instance variable in order to release them in the dealloc? Perhaps I'm wrong all around...

    Read the article

  • Reconstructing simple 3d enviroment(room) from photo

    - by Riz
    I have photo of a room with three walls and floor/ceiling or both. I am trying to reconstruct this room in 3d asking user for minimal input. Right now I use 8 points defined by user, angles of left and right wall(they can be quite different from 90) and one size "InLeftBottom-InRightBottom"(I need to have real size of this room for later use). I have no info about user's camera(I can read EXIF to get FOV and use constant height but this can be only used as additional info). Is this possible to ask user for less info? Maybe it's possible to get wall angles without user interaction? Or maybe I am completly wrong and should use different approach?

    Read the article

< Previous Page | 66 67 68 69 70 71 72 73 74 75 76 77  | Next Page >