Search Results

Search found 1557 results on 63 pages for 'daniel gollas'.

Page 49/63 | < Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >

  • Ensuring all waiting threads complete

    - by Daniel
    I'm building a system where the progress of calling threads is dependent on the state of two variables. One variable is updated sporadically by an external source (separate from the client threads) and multiple client threads block on a condition of both variables. The system is something like this TypeB waitForB() { // Can be called by many threads. synchronized (B) { while (A <= B) { B.wait(); } A = B; return B; { } void updateB(TypeB newB) { // Called by one thread. synchronized (B) { B.update(newB); B.notifyAll(); // All blocked threads must receive new B. } } I need all the blocked threads to receive the new value of B once it has been updated. But the problem is once a single thread finishes and updates A, the waiting condition becomes true again so some of the other threads become blocked and don't receive the new value of B. Is there a way of ensuring that only the last thread that was blocked on B updates A, or another way of getting this behaviour?

    Read the article

  • PHP to C# and Vice versa

    - by Daniel Sh.
    I'm in this project: A web page that's gonna be used by the front-end company people to query and update data from a SQL DB. I'm working with visual studio and the code behind (C#) is almost done, so the interactions between SQL and C# and ok. My original idea was to work with ASP.NET which is familiar to me, but that's not gonna be possible. I have to switch to PHP. So, today is my first day learning PHP, checking http://php.net/manual/en/index.php and a lot of things seem quite similar to ASP.NET so I guess it won't be that hard. Anyways, some questions popped up quite fast as I wanted to script something else than a "hello world" . Is there an easy way to get/send C# variables from my class using a php page? I've read soemthing about using XML in order to do so, but still I'm scratching my head, is there another, easier, way to do this?

    Read the article

  • activerecord search conditions - looking for null or false

    - by Daniel
    When doing a search in active record I'm looking for record's that do not have an archived bit set to true. Some of the archived bits are null (which are not archived) others have archived set to false. Obviously, Project.all(:conditions => {:archived => false}) misses the projects with the archived bits with null values. How can all non-archived projects be selected wtih active record?

    Read the article

  • How to get function's name from function's pointer in C?

    - by Daniel Silveira
    How to get function's name from function's pointer in C? Edit: The real case is: I'm writing a linux kernel module and I'm calling kernel functions. Some of these functions are pointers and I want to inspect the code of that function in the kernel source. But I don't know which function it is pointing to. I thought it could be done because, when the system fails (kernel panic) it prints out in the screen the current callstack with function's names. But, I guess I was wrong... am I?

    Read the article

  • Positioning Photos in a Grid (HTML)

    - by Daniel O'Connor
    Hey Everyone, I've been trying to code this page for a while, but my biggest problem is that I can't seem to get the photos perfectly positioned. For some reason, there is a small bottom padding in each <td>which is messing things up. Here is the table code: <table> <tr> <td rowspan="2" style="height:353px;"><img src="danoconnor/img/photography/farm.jpg" height="353" width="470" alt="Farm" /></td> <td><img src="danoconnor/img/photography/paragliding.jpg" height="190" width="254" alt="Paraglider" /></td> <td rowspan="2"><img src="danoconnor/img/photography/cristo.jpg" height="353" width="230" alt="Cristo Redentor" /></td> </tr> <tr> <td><img src="danoconnor/img/photography/u2.jpg" height="154" width="254" alt="U2 at Fordham University" /></td> </tr> </table> My question is: how can I make the photogrid look like this? Thanks!

    Read the article

  • EXCEL import to sql returning NULL for decimals when in VARCHAR data type

    - by Daniel
    Hi, I am working on a peice of software which has expodentially grown over the last few years and the database needs to be regularly updated. Customers are providing us with data now on large spreadsheets which we format and will start importing into the database. I am using the Import and Export Data (32-bit) Wizard. One column in the database contains values like '1.1.1.2' etc and i am importing them in as a Varchar as that is the data type in the database. However, for values like '8.5', 'NULL' is getting imported insead. It only occurs when there is one decimal point. Is this a formatting error with excel or is it the wrong datatype?

    Read the article

  • There has to be an easier way.. pulling data from mysql

    - by Daniel Hunter
    I need to pull 3 values from a table and assign each one to a variable each value is based on to columns, a type and an id $ht_live_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='L'"); $ht_live_result = mysql_fetch_array($ht_live_query); $htCODE_Live = $ht_live_result['htcode']; You can see that I am assigning the desired value to the variable $htL $ht_General_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='G'"); $ht_General_result = mysql_fetch_array($ht_General_query); $htCODE_General = $ht_General_result['htcode']; $ht_Reward_query = mysql_query("SELECT htcode FROM coupon WHERE pid='$pid' AND type='R'"); $ht_Reward_result = mysql_fetch_array($ht_Reward_query); $htCODE_Reward = $ht_Reward_result ['htcode']; I know I am doing this the hard way but can not figure out how to do the foreach or while loop to attain the desired results.

    Read the article

  • Why does cisco IOS require domain-name to be set before SSH keys can be generated?

    - by Daniel Papasian
    Is there a technical reason why IOS requires the device's domain-name to be set (via ip domain-name) before an SSH key can be generated? Is the domain-name used in any way in the generation of the key? Is there any way to force the generation of a key before the domain name is set? UPDATE: Myself (before I posted this question) and others in your answer seem to think it may be used as either a salt or a source of entropy for the key. Wouldn't the domain-name be very predictable? This doesn't seem like a suitable source of entropy.

    Read the article

  • Get/Set nested property values

    - by Daniel Deer
    I'll try to be more descriptive here. A Few Q's: using: var foo = new Foo() { Bar = new Bar() { Value = "Value" } }; var value = DataBinder.Eval(foo, "Bar.Value"); Or: This one It is possible to retrieve an internal nested property using property path syntax. Is there a way to set/trigger a nested property (a regular property not DependencyProperty) easily with some kind of simple mechanisms as described here? I want to acheive something like: string newValue = "Hello World!"; DataBinder.EvalSet(foo, "Bar.Value", NewValue); Is there any mechanism that support both property path (for nested objects) and XPATHs (if the objects are XPATH navigable of course) ? again, that supports get and set options. Thanks, DD

    Read the article

  • How do I marshal a pointer to an array of pointers to structures?

    - by Daniel Stutzbach
    I have a C function with the following signature: int my_function(int n, struct player **players) players is a pointer to an array of pointers to struct player objects. n is the number of pointers in the array. The function does not modify the array nor the contents of the structures, and it does not retain any pointers after returning. I tried the following: [DllImport("mylibary.dll")] static extern int my_function(int n, [In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0)] player_in []players); However, that marshals the data as a pointer to an array of structures, not a pointer to an array of pointers to structures.

    Read the article

  • gzip several files and pipe them into one input

    - by Daniel
    I have this program that takes one argument for the source file and then it parse it. I have several files gzipped that I would like to parse, but since it only takes one input, I'm wondering if there is a way to create one huge file using gzip and then pipe it into the only one input.

    Read the article

  • What books help one to learn to read code?

    - by Daniel
    Lion's Commentary on Unix Sixth Edition with Source Code is a wonderful book to learn how to read code. Reading code is important -- how does one learn how to write excellent code without having read excellent code? But, sadly, while great writers, of fiction and non-fiction, all spend a great deal of time reading stuff, we, programmers, seem to avoid it like the plague. Worse still, programming books usually go the same way. They might show a pattern or a style, but they often avoid showing good, complex code, and helping one go through it. There are exceptions, of course. I hope. So, with that in mind, what books are to be found which help one learn how to read code?

    Read the article

  • What is necessary to run JavaScript files from MS Server 2003?

    - by Daniel
    I have created some JavaScript files and they run well from my Mac OS X Server. Now I have put the same JavaScript files on my MS Server 2003. But they don't work. Do I have to install something on the server in order to get them work? EDIT: (Sorry, I'm new and English is not my native language, so its hard for me to describe the situation well) I have downloaded this free Ajax Chat app. After enabling PHP on my Mac, it worked. But on my MS Windows 2003 Server it doesn't work. I installed PHP and Apache on Windows. PHP and Apache work well. But everything that uses JavaScript (such as drop down menus or pop-up windows) doesn't work. Thanks!

    Read the article

  • Which bug in the Delphi IDE / VCL do you despise the most?

    - by Ben Daniel
    I've been working in Delphi 7 for the last 6 years now and have learnt to merely submit to the instablity of the IDE. For example, there are particular projects I've inherited which, when working on, I cannot use the CTRL+SPACE dropdown symbol list in the Delphi editor without getting an Access Violation error, this would easily top my list but there are many more. I'd like to know which bugs frustrate you the most.

    Read the article

  • Re-authentication required for registered-path links (to ASP.NET site) coming to IE from PowerPoint

    - by Daniel Halsey
    We're using URL routing based on Phil Haack's example, with config modifications based on MSDN Library article #CC668202, to provide "shareable" links for a ASP.NET forms site, and have run into a strange issue: For users attempting to open links from PowerPoint presentations, and who have IE set as their default browser, using one of these links forces (forms-based) re-authentication, even in the same browser instance with a live session. Info: We know the session is still alive. (Page returns information for the currently logged-in user; confirmed via debug watches) This doesn't happen with other browsers (FF, Chrome) or with other programs (Notepad++) as the URL source. We do not have a default path set, as this caused issues with root path handling at initial login. This primarily happens with PowerPoint, but will also happen in Word and OCS. On some machines, even after changing the default browser, Office apps will continue to use IE for these links, forcing this error. (A potential registry fix for this failed, but even if it had worked, we can't control default browser choice for our users.) We can't figure out if this is an Office oddity or is being caused by our decision to use app-level URL routing (rather than IIS rewriting). Has anyone else encountered this and found a solution?

    Read the article

  • I have a serious problem to use 'happle' in xcode project.

    - by Daniel K
    Hello. I am a korean student, and I'm trying to develop a iphone application. I want to make the application which will shows contents of Web board, which is belong to some website. I will use 'UITableViewController", and the names of contents have to be displayed on table view. I heard that if I want to scrap the text on webpage, I have to use 'parser'. However, Iphone SDKs provide only the parser for xml webpage, NSXmlParser. In my acknowledges, NSXmlParser is not for HTML webpage, so it doesn't provide HTML parsing. If there is any way to parse HTML page with NSXmlParser, I want to know how to use that. Anyway, I found a simple and good HTML parser, 'happle', through searching on google. I tried to add the sources of happle on my xcode project, and I also add the libxml2.2.dylib, and I even set up 'Header search paths' and 'Other Linker Flags'. However It doesn't work. The Compiler show a error message : "No such file in dictionary". In my opinion, there is no frameworks file in my computer, so I tried to set up 'libxml2 frameworks' many times, but I coundn't success. please help me how to parse HTML page and how to set up libxml2... It really urgent. p.s. please forgive my ugly English

    Read the article

  • How do i know in the detail view what cell in tableview was selected?

    - by Daniel Rotaru
    how can i know what tableview cell was selected?(being in the detail view) The problem is that. I have an table view controller. Here are parsed from the internet entries to the table. So it's a dynamic tabe view that loads from internet. I will not know how many entries will be in the table so i will not know what details view to call when i click a row. So i have maked one view. This view contains an calendar. On this calendar(wich is the detail iew) i will parse data from internet depending on the selected row. For exemple: i have table: entry 1, entry 2,entry 3,entry 4 When i click entry 2 i need to call a php with the argument entry 2. The php will know what entry on the table i have selected and will generate me the correct xml that i will parse. Here is my tableview didSelectRow function: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic -- create and push a new view controller if(bdvController == nil) bdvController = [[BookDetailViewController alloc] initWithNibName:@"BookDetailView" bundle:[NSBundle mainBundle]]; Villa *aVilla = [appDelegate.villas objectAtIndex:indexPath.row]; [self.navigationController pushViewController:bdvController animated:YES] And here is my self view function on detailviewcontroller: -(void)loadView { [super loadView]; self.title=@"Month" UIBarButtonItem *addButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"ListView" style:UIBarButtonItemStyleDone target:self action:@selector(add:)]; self.navigationItem.rightBarButtonItem = addButtonItem; calendarView = [[[KLCalendarView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 373.0f) delegate:self] autorelease]; appDelegate1 = (XMLAppDelegate *)[[UIApplication sharedApplication] delegate]; myTableView=[[UITableView alloc]initWithFrame:CGRectMake(0, 260, 320, 160)style:UITableViewStylePlain]; myTableView.dataSource=self; myTableView.delegate=self; UIView *myHeaderView=[[UIView alloc]initWithFrame:CGRectMake(0, 0, myTableView.frame.size.width,2)]; myHeaderView.backgroundColor=[UIColor grayColor]; [myTableView setTableHeaderView:myHeaderView]; [self.view addSubview:myTableView]; [self.view addSubview:calendarView]; [self.view bringSubviewToFront:myTableView]; } I think that here in self load i need to make the if procedure.. If indexPath.row=x parse fisier.php?variabila=title_of_rowx but the question is how i know the indexPath variable?

    Read the article

  • How would I authenticate against a local windows user on another machine in an ASP.NET application?

    - by Daniel Chambers
    In my ASP.NET application, I need to be able to authenticate/authorise against local Windows users/groups (ie. not Active Directory) on a different machine, as well as be able to change the passwords of said remote local Windows accounts. Yes, I know Active Directory is built for this sort of thing, but unfortunately the higher ups have decreed it needs to be done this way (so authentication against users in a database is out as well). I've tried using DirectoryEntry and WinNT like so: DirectoryEntry user = new DirectoryEntry(String.Format("WinNT://{0}/{1},User", serverName, username), username, password, AuthenticationTypes.Secure) but this results in an exception when you try to log in more than one user: Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. I've tried making sure my DirectoryEntries are used inside a using block, so they're disposed properly, but this doesn't seem to fix the issue. Plus, even if that did work it is possible that two users could hit that line of code concurrently and therefore try to create multiple connections, so it would be fragile anyway. Is there a better way to authenticate against local Windows accounts on a remote machine, authorise against their groups, and change their passwords? Thanks for your help in advance.

    Read the article

  • Making uppercase of std::string

    - by Daniel K.
    Which implementation do you think is better? std::string ToUpper( const std::string& source ) { std::string result; result.reserve( source.length() ); std::transform( source.begin(), source.end(), result.begin(), std::ptr_fun<int, int>( std::toupper ) ); return result; } and... std::string ToUpper( const std::string& source ) { std::string result( source.length(), '\0' ); std::transform( source.begin(), source.end(), result.begin(), std::ptr_fun<int, int>( std::toupper ) ); return result; } Difference is that the first one uses reserve method after the default constructor, but the second one uses the constructor accepting the number of characters.

    Read the article

  • sql server 2005 replication article conflict

    - by Daniel
    Hi all, I have a sql server 2005 database that I want to setup replication for. The problem is that the database has two schemas both of which have a table with the same name in it. For some reason even though the tables are in different schemas the replication creation fails when done through management studio due to conflicting article names (i assume its trying to create the same name for both tables in the different schemas). Is there any workaround for doing this in the studio, I can probably write a script or program to do this but just for this one thign is a bit annoying and it probably wont be allowed to run in production. Perhaps there is a hot fix or something I'm not aware about? Cheers,

    Read the article

  • A few problems with Delphi involving Mail Merge, SQL + Databases.

    - by Daniel
    My first problem is with mail merge. I have created a a Data File and a table, yet I am not able to fill my table with information from my Data File. The << just seems to be inserted after wherever the cursor is on the page, which is not where the table is. All that is entered into the actual table is a '59'. Therefore I think I either need to to change the code or be able to move the cursor. Here is the code I am currently using: wrdDoc.Tables.Add(wrdSelection.Range, ADOTable1.FieldCount, 3); wrdDoc.Tables.Item(1).Columns.Item(1).SetWidth(51,wdAdjustNone); wrdDoc.Tables.Item(1).Columns.Item(2).SetWidth(20,wdAdjustNone); wrdDoc.Tables.Item(1).Columns.Item(3).SetWidth(100,wdAdjustNone); // Set the shading on the first row to light gray wrdDoc.Tables.Item(1).Rows.Item(1).Cells .Shading.BackgroundPatternColorIndex := wdGray25; // BOLD the first row wrdDoc.Tables.Item(1).Rows.Item(1).Range.Bold := True; // Center the text in Cell (1,1) wrdDoc.Tables.Item(1).Cell(1,1).Range.Paragraphs.Alignment := wdAlignParagraphCenter; // Fill each row of the table with data wrdDoc.Tables.Item(1).Cell(1, 1).Range.InsertAfter('Time'); wrdDoc.Tables.Item(1).Cell(1, 2).Range.InsertAfter(''); wrdDoc.Tables.Item(1).Cell(1, 3).Range.InsertAfter('Teacher'); For Count := 1 to (ADOTable1.FieldCount - 1) do begin wrdDoc.Tables.Item(1).Cell((Count + 1), 1).Range.InsertAfter(wrdSelection.Range,'Time' + IntToStr(Count)); wrdDoc.Tables.Item(1).Cell((Count + 1), 2).Range.InsertAfter(wrdSelection.Range,'THonorific' + IntToStr(Count)); wrdDoc.Tables.Item(1).Cell((Count + 1), 3).Range.InsertAfter(wrdSelection.Range,'TSurname' + IntToStr(Count)); end; My second problem is that I do not know what the correct SQL syntax is for editing the name of a column in the database (I am using Delphi 7 and Microsoft Jet Engine if that makes a difference). The third problem is that when I add a new column to my database manually (which I need to do) I get a 'violation' error in one of my units when I activate an ADOTable. This only happens on one unit and it happens when I add a column with any name anywhere in the table. I know that is vague but I can't seem to narrow down the problem any further than that. If you could help with me with any of those it would be great. Thanks.

    Read the article

  • When are referenced Assemblies loaded?

    - by Daniel
    I wrote a program that makes a reference to Microsoft.Web.Administration.dll, which is not present on Windows Server 2003. The program checks for the os and does not reference the dll if the os is 2003. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //reference the Microsoft.Web.Administration.dll file.<br> When I tested this program on Windows Server 2003, an error occured telling me it couldn't locate the Microsoft.Web.Administration.dll. But when I separated the if-else block into 2 different methods as below, and the error did not occur. if(OSVersion == WindowsServer2003) //do the job without referencing the Microsoft.Web.Administration.<br> else if(OSVersion == WindowsServer2008) //DoIt2008Style(); So I wanted to know about reference file loading time in more detail. could you point me to some resources?

    Read the article

  • mysql innodb:innodb_flush_method

    - by Daniel
    in the following link http://dev.mysql.com/doc/refman/5.1/en/innodb-parameters.html#sysvar_innodb_flush_method it says:Different values of this variable can have a marked effect on InnoDB performance. For example, on some systems where InnoDB data and log files are located on a SAN, it has been found that setting innodb_flush_method to O_DIRECT can degrade performance of simple SELECT statements by a factor of three. Why O_DIRECT could slow down the select statement?

    Read the article

  • Unit Test Sessions Window Closes when debugging

    - by Daniel Dyson
    When I select an NUnit test in the Unit Test Sessions window and click debug, the window disappears. My breakpoints are hit, but if I hit F5, the Unit Test Sessions window does not return until the test returns a result or I stop the debugging session. This is preventing me from viewing any console output during tests. Any ideas?

    Read the article

< Previous Page | 45 46 47 48 49 50 51 52 53 54 55 56  | Next Page >