Search Results

Search found 42717 results on 1709 pages for 'question answering'.

Page 75/1709 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • Hibernate question hbm2ddl.auto possible values and what they do

    - by Suzan
    I really want to know more about the update, export and the values that could be given to hbm2ddl.auto. I need to know when to use the update and when not? And what is the alternative? These are changes that could happen over DB: New tables new columns in old tables columns deleted data type of a column changed a type of a column changed it attributes tables have been dropped values of a column has changed In each case what is the best solution?

    Read the article

  • Operating system scheduler question

    - by ual
    I recently asked myself: If a program, like Mozilla Firefox for example, is started - the control must be somehow given to it. But when the program crashes, why doesn't my whole system crash like in early Windows version? How can Windows take back the control from the program, or even not give it to it fully? (Note: This is not my homework; I go to school but in my informatics class are really only guys that would answer with "Can I eat that?" when I ask them about kernels. Same with my teacher.)

    Read the article

  • Noob Droid Question regarding random number

    - by Pete Herbert Penito
    Brand new to droid programming, but would love to learn as much as possible, so I finally got my emulator working correctly, I even got a hello world button to work, I'm attempting to make this button display a random number, I've googled this and came up with this code: Random generator = new Random(); int n = generator.nextInt(n); I fixed the Random function by including some Random java utility. I'm assuming this code above goes in the .java file of the project, so my button code looks as follows (tested and works): PopUpText.makeText(v.getContext(), "Hello World", PopUpText.LENGTH_LONG).show(); I figured I could replace "Hello World" with n to display the number in the box, however the following error is stopping the compile: The local variable n may not have been initialized Any ideas why this is happening? Any advice would be hugely appreciated.

    Read the article

  • Code igniter authentication code in controller security question

    - by Prime Studios
    I have a main controller to handle the very front-end of my authentication system, it handles login, logout, update user info, etc. functions that I anticipate calling by POST'ing from views/forms. What about something like a "delete_user" function though? My thoughts are a button in someones admin panel would say "Delete Account" and it would post to "/auth/delete", and the function would delete the user based on their session username or id. This seems a bit open ended, you could send out a link to someone and when they opened it while in that application it would delete their account.. Whats the best way to handle this?

    Read the article

  • Data scheme question

    - by Matt
    I am designing a data model for a local city page, more like requirements for it. So 4 tables: Country, State, City, neighbourhood. Real life relationships is: Country owns multiple State which owns multiple cities which ows multiple neighbourhoods. In the data model: Do we link these with FK the same way or link each with each? Like in each table there will even be a Country ID, State ID, CityID and NeighbourhoodID so each connected with each? Other wise to reach neighbourhood from country we need to join 2 other tables in between? There are more tables I need to maintain for IP addess of cities, latitude/longitude, etc.

    Read the article

  • Simple IF statement question

    - by JGreig
    How can I simply the below if statements? if ( isset(var1) & isset(var2) ) { if ( (var1 != something1) || (var2 != something2) ) { // ... code ... } } Seems like this could be condensed to only one IF statement but am not certain if I'd use an AND or OR

    Read the article

  • Question about ITextUndoHistory returned from TryGetHistory

    - by nick.ueda
    Everytime the IWpfTextView's TextBuffer changes I am trying to get the history's redostack and undostack and simply checking the count. When doing this I am encountering a "Method not supported exception" when trying to access the two stacks. Am I retrieving the history incorrectly or does VS not want me seeing/editing the contents of the stacks? I can post the code if necessary... Thanks, Nick

    Read the article

  • sql join question, how to select when value not in a set of values

    - by Elliott
    I have two tables, table1 and table2. Table1 is in a one to many relationship with table2 (one row in table1 maps to many rows in table2). There is a field in table2 called code. If none of the values of code in table2 equal some set of values (say 1, 2, and 3), I want to select the value in table1. I'm not sure how to write this kind of join. Assume the primary key in table1 is called id and the foreign key to which it maps is called did. Can you tell me how to write this kind of join? Thanks, Elliott

    Read the article

  • Search SQL Question Between Related Two Tables

    - by mTuran
    Hi, I am writing some kind of search engine for my web application and i have a problem. I have 2 tables first of is projects table: PROJECTS TABLE id int(11) NO PRI NULL auto_increment employer_id int(11) NO MUL NULL project_title varchar(100) NO MUL NULL project_description text NO NULL project_budget int(11) NO NULL project_allowedtime int(11) NO NULL project_deadline datetime NO NULL total_bids int(11) NO NULL average_bid int(11) NO NULL created datetime NO MUL NULL active tinyint(1) NO MUL NULL PROJECTS_SKILLS TABLE project_id int(11) NO MUL NULL skill_id int(11) NO MUL NULL For example: I want ask this query to database: 1-) Skills are 5 and 7. 2-) Order results by created 3-) project title contains "php" word. 4-) Returned rows should contain projects.* columuns. 5-) Projects should be distinct(i don't want same projects in return of query). Please write sql query that ensure these conditions. Thank You.

    Read the article

  • Rails newb syntax question

    - by Veep
    I'm in the console, looking at someone else's app. I come across the following: >> p.location => [#<Tag id: 2, name: "projects">] Why do I see this result, which seems to be the object name, and how do I access the actual attribute name, "projects"? >> p.location.name => "Tag" Thank you very much!

    Read the article

  • python class decorator question?

    - by nsharish
    decorator 1: def dec(f): def wrap(obj, *args, **kwargs): f(obj, *args,**kwargs) return wrap decorator 2: class dec: def __init__(self, f): self.f = f def __call__(self, obj, *args, **kwargs): self.f(obj, *args, **kwargs) A sample class, class Test: @dec def disp(self, *args, **kwargs): print(*args,**kwargs) The follwing code works with decorator 1 but not with decorator 2. a = Test() a.disp("Message") I dont understand why decorator 2 is not working here. Can someone help me with this?

    Read the article

  • Question about joins and table with Millions of rows

    - by xRobot
    I have to create 2 tables: Magazine ( 10 millions of rows with these columns: id, title, genres, printing, price ) Author ( 180 millions of rows with these columns: id, name, magazine_id ) . Every author can write on ONLY ONE magazine and every magazine has more authors. So if I want to know all authors of Motors Magazine, I have to use this query: SELECT * FROM Author, Magazine WHERE ( Author.id = Magazine.id ) AND ( genres = 'Motors' ) The same applies to Printing and Price column. To avoid these joins with tables of millions of rows, I thought to use this tables: Magazine ( 10 millions of rows with this column: id, title, genres, printing, price ) Author ( 180 millions of rows with this column: id, name, magazine_id, genres, printing, price ) . and this query: SELECT * FROM Author WHERE genres = 'Motors' Is it a good approach ? I can use Postgresql or Mysql.

    Read the article

  • Quick question about pointers

    - by xbonez
    So, I have this code fragment: int * iPtr ; int * jPtr ; int i = 5, k = 7; iPtr = &i; jPtr = iPtr ; I have just started learning about pointers, and need to get some doubts cleared. is jPtr now essentially also pointing at i? I know I can change the value of i by using *iPtr, but how can I change the value of the object being pointed to by jPtr? How will changing the object being pointed to by jPtr affect the value of the object pointed to by iPtr, and i ?

    Read the article

  • Android 2.2: Screen brightness/timeout question

    - by Johan
    Im using the following code to adjust the brightness of the screen: public void SetBright(float value) { Window mywindow = getWindow(); WindowManager.LayoutParams lp = mywindow.getAttributes(); lp.screenBrightness = value; mywindow.setAttributes(lp); } But i want the brightness to be 0% for a specific time. But when i use SetBright(0.0f), i cant change it back. I made a timer that runs for a minute with 0% brightness, then turns it back to 100%. Works when i use 10% for example. But when i turn it to 0% i cant seem to wake it up again. Any ideas how to solve this?

    Read the article

  • Simple Binding question, unable to bind to button command in a DataTemplate using MVVM Light Toolkit

    - by deliberative assembly
    I've been attempting to bind to buttons within a DataTemplate without much success. The button does not fire. Button Click works successfully outside of the DataTemplate. Yet if I create a Click="button_click" the click button is fired. The Button Content binds perfectly as well. Example to illustrate.. Why does the command not fire? Advice on how this should be handled this? The example is a simplified version of my real problem, I am currently not using a Listbox. I only recreated the same problem with a listbox..

    Read the article

  • StructureMap Question

    - by derans
    This is the equivalent of what I'm trying to create with StructureMap: new ChangePasswordWithNotificationAndLoggingService( new ChangePasswordService( new ActiveDirectoryRepository(new ActiveDirectoryCredentials()), new TokenRepository("")), new EmailNotificationService(new PasswordChangedNotification(new UserAccount())), new LoggingService()); This is what I have right now: ForRequestedType<IChangePasswordService>() .TheDefault.Is.ConstructedBy(() => new ChangePasswordService(DependencyRegistrar.Resolve<IActiveDirectoryRepository>(), DependencyRegistrar.Resolve<ITokenRepository>())) .EnrichWith<IChangePasswordService>(x => new ChangePasswordWithNotificationAndLoggingService(x, DependencyRegistrar.Resolve<INotificationService>(), DependencyRegistrar.Resolve<ILoggingService>())); I need to pass the UserAccount to the INotificationService...can't figure it out. I've tried this: DependencyRegistrar.With(new UserAccount { Username = "test" }); No luck...UserAccount always turns out null. I don't have to do it all with StructureMap, I'm open to any suggestions. This is what I currently have working: public static IChangePasswordService ChangePasswordService(UserAccount userAccount) { return new ChangePasswordWithNotificationService( new ChangePasswordService(ActiveDirectoryRepository(), TokenRepository()), new EmailNotificationService(new PasswordChangedNotification(userAccount))); }

    Read the article

  • .net design pattern question

    - by user359562
    Hi. I am trying to understand design pattern problems. I am trying to modify the code like this in winforms and trying to see if any design pattern suits my requirement. Please suggest which is the best design pattern in this scenario. This is very basic code containing 2 tab pages which might have different controls can be added dynamically and read out different files on click of particular tab. To elaborate more... I have written this code to learn and understand design pattern. This is just a scenario where user click on a particular tab which will show dynamic controls generated. public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { if (tabControl1.SelectedTab.Name.Equals("tabPage1")) { GeneratedynamicControlsForTab1(); } else if (tabControl1.SelectedTab.Name.Equals("tabPage2")) { GeneratedynamicControlsForTab2(); } } private void GeneratedynamicControlsForTab1() { Label label1 = new Label(); label1.Text = "Label1"; tabPage1.Controls.Add(label1); ReadCSVFile(); } private void GeneratedynamicControlsForTab2() { tabPage1.Controls.Clear(); Label label2 = new Label(); label2.Text = "Label2"; tabPage2.Controls.Add(label2); ReadTextFile(); } private void ReadCSVFile() { } private void ReadTextFile() { } }

    Read the article

  • question about PORT

    - by user222820
    I have written a program in C# that sends text to COMx. I wish to test it using HyperTerminal, meaning I want to read the text that I send with my program. When I set the WAIT FOR CALL in HyperTerminal, my program is refused access to the given port. How can I test my program? Is it possible?

    Read the article

  • Operating system question

    - by ual
    I recently asked myself: If a program, like Mozilla Firefox for example, is started - the control must be somehow given to it. But when the program crashes, why doesn't my whole system crash like in early Windows version? How can Windows take back the control from the program, or even not give it to it fully? (Note: This is not my homework; I go to school but in my informatics class are really only guys that would answer with "Can I eat that?" when I ask them about kernels. Same with my teacher.)

    Read the article

  • Question regarding MySQL indices and their functionality

    - by user281434
    Hi Say I have an ordinary table in my db like so ---------------------------- | id | username | password | ---------------------------- | 24 | blah | blah | ---------------------------- A primary key is assigned to the id column. Now when I run a Mysql query like this: SELECT id FROM table WHERE username = 'blah' LIMIT 1 Does that primary key index even help? If I am telling it to match usernames, then shouldn't the username column be indexed instead? Thanks for your time

    Read the article

  • SQL CASE Question

    - by docsql
    Hiya, I dont know if this can be done but i'd though i'd ask. What I want to do is have a case statement query and if a 1 begin another action. if 0 dont do anything. For Example select CASE WHEN client.deathofdeath = yes THEN 1 do another select in here (which is another table) Else 0 End AS DeathDate From Client client Can this be done?

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >