Search Results

Search found 3484 results on 140 pages for 'chris dubois'.

Page 108/140 | < Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >

  • What can you do in C without "std" includes? Are they part of "C," or just libraries?

    - by Chris Cooper
    I apologize if this is a subjective or repeated question. It's sort of awkward to search for, so I wasn't sure what terms to include. What I'd like to know is what the basic foundation tools/functions are in C when you don't include standard libraries like stdio and stdlib. What could I do if there's no printf(), fopen(), etc? Also, are those libraries technically part of the "C" language, or are they just very useful and effectively essential libraries?

    Read the article

  • LINQ to Entites: How should I handle System.InvalidOperationException when checking for existance of

    - by chris
    I have a many-to-one relationship that users can edit via checkboxes. PK of Foo is ID, and fid contains the id from the checkbox. I'm checking to see if an element exists with: Foo ent; try { ent = ctx.Foo.First(f => f.ID == fid); } catch (System.InvalidOperationException ioe) { ent = new Foo(); } It seems to me that I should be able to do this without throwing an exception. What would be the best way to do this?

    Read the article

  • How do I write raw binary data in Python?

    - by Chris B.
    I've got a Python program that stores and writes data to a file. The data is raw binary data, stored internally as str. I'm writing it out through a utf-8 codec. However, I get UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 25: character maps to <undefined> in the cp1252.py file. This looks to me like Python is trying to interpret the data using the default code page. But it doesn't have a default code page. That's why I'm using str, not unicode. I guess my questions are: How do I represent raw binary data in memory, in Python? When I'm writing raw binary data out through a codec, how do I encode/unencode it?

    Read the article

  • Stop jQuery animations stacking

    - by Chris
    I have an Options box that hovers in the top right of the webpage. It's opacity is set to 10% so as not to be obstructive to users. When they hover over (mouseenter) it I use jQuery to fade it in and slidedown the content (and the reverse on mouseout). If they do this repeatedly though the animation stacks up and you can sometimes be left in a situation where your mouse is stood still but the box is yo-yoing around. How can I get around this situation? Here is how I currently setup the animations $("#dropdown").mouseenter(function() { $(this).fadeTo('fast',1); $("#options").slideDown(); }); $("#dropdown").mouseleave(function() { $(this).fadeTo('fast',0.1); $("#options").slideUp(); }); Note I am using jQuery only and not any other plugins.

    Read the article

  • Can you modify SQL DB schema in a transaction to know if all changes were applied?

    - by Chris F
    As part of my (new) database version control methodology, I'm writing a "change script" and want the change script to insert a new row into the SchemaChangeLog table if the script is executed successfully, or to reverse changes if any single change in the script fails. Is it possible to do schema changes in a transaction and only if it gets committed to then do the INSERT? For example (psuedo-code, I'm not too good with SQL): SET XACT_ABORT ON BEGIN TRANSACTION PRINT 'Add Col2 to Table1' IF NOT EXIST (SELECT * FROM sys.columns WHERE NAME='Col2' AND object_id=OBJECT_ID('Table1')) BEGIN ALTER TABLE [dbo].[Table1] ADD Col2 int NULL END -- maybe COMMIT here? INSERT INTO SchemaChangeLog VALUES(...) COMMIT TRANSACTION

    Read the article

  • How to declare a variable that spans multiple lines

    - by Chris Wilson
    I'm attempting to initialise a string variable in C++, and the value is so long that it's going to exceed the 80 character per line limit I'm working to, so I'd like to split it to the next line, but I'm not sure how to do that. I know that when splitting the contents of a stream across multiple lines, the syntax goes like cout << "This is a string" << "This is another string"; Is there an equivalent for variable assignment, or do I have to declare multiple variables and concatenate them? Edit: I misspoke when I wrote the initial question. When I say 'next line', I'm just meaning the next line of the script. When it is printed upon execution, I would like it to be on the same line.

    Read the article

  • Cross-Application User Authentication

    - by Chris Lieb
    We have a webapp written in .NET that uses NTLM for SSO. We are writing a new webapp in Java that will tightly integrate with the original application. Unfortunately, Java has no support for performing the server portion of NTLM authentication and the only library that I can find requires too much setup to be allowed by IT. To work around this, I came up with a remote authentication scheme to work across applications and would like your opinions on it. It does not need to be extremely secure, but at the same time not easily be broken. User is authenticated into .NET application using NTLM User clicks link that leaves .NET application .NET application generates random number and stores it in the user table along with the user's full username (domain\username) Insecure token is formed as random number:username Insecure token is run through secure cipher (likely AES-256) using pre-shared key stored within the application to produce a secure token The secure token is passed as part of the query string to the Java application The Java application decrypts the secure key using the same pre-shared key stored within its own code to get the insecure token The random number and username are split apart The username is used to retrieve the user's information from the user table and the stored random number is checked against the one pulled from the insecure token If the numbers match, the username is put into the session for the user and they are now authenticated If the numbers do not match, the user is redirected to the .NET application's home page The random number is removed from the database

    Read the article

  • What the guidelines around filters and querystring parameters in RSS Feeds?

    - by Chris Henry
    I run a site where users can content that is tagged by a special set of tags. While implementing RSS feeds, I was wondering what, if any, rules or guidelines exist for using a querystring to filter what content an RSS feed shows. For example, the feed that shows all content on the site would be: /feed If someone was interested in all the work that was tagged with fashion, the URL would be /feed?tag=fashion

    Read the article

  • How can I create an ODBC connection to SAS?

    - by Chris B.
    I'm writing a program that needs to access SAS data. I've downloaded the ODBC drivers for SAS and installed them, but I need to be able to create ODBC connections on the fly, programmatically. The following code (in Python) seems like it should work: import ctypes ODBC_ADD_DSN = 1 def add_dsn(name, driver, **kw): nul, attrib = chr(0), [] kw['DSN'] = name for attr, val in kw.iteritems(): attrib.append('%s=%s' % (attr, val)) return ctypes.windll.ODBCCP32.SQLConfigDataSource(0, ODBC_ADD_DSN, driver, nul.join(attrib)) == 1 print add_dsn('SAS Test', 'SAS', description = 'Testing SAS') But it pops up the SAS ODBC configuration dialog, sets the datasource name, and waits for the user to enter the information and dismiss the dialog. How can I avoid that?

    Read the article

  • What should be contained in a global Subversion ignore pattern for Visual Studio 2010?

    - by Chris Simmons
    After installing and using Visual Studio 2010, I'm seeing some newer file types (at least with C++ projects ... don't know about the other types) as compared to 2008. e.g. .sdf, .opensdf, which I guess are the replacement for ncb files with Intellisense info stored in SQL Server Compact files? I also notice .log files are generated, which appear to be build logs. Given this, what's safe to add to my global ignore pattern? Off the bat, I'd assume .sdf, .opensdf, but what else?

    Read the article

  • Prototype: Form.serialize missing some inputs (due to table?)

    - by Chris
    I'm using JavaScript Prototype (through Ruby on Rails) to handle some Ajax calls; but in one particular case I'm missing a field from the form. I have a layout like this: +---------+---------+ | Thing 1 | Thing 2 | +---------+---------+-----------+ | o Opt 1 | o Opt 1 | <Confirm> | | o Opt 2 | o Opt 2 | | +---------+---------+-----------+ Opt 1 and 2 are Radio buttons, Confirm is a button. The entire table is wrapped in a form, with code like: <form action="javascript:void(0)"> <input type="hidden" name="context" value="foo" /> <input type="hidden" name="subcontext" value="bar" /> <table> <tr><td>Thing 1</td><td>Thing2</td></tr> <tr><td> <input type="radio" name="choice" value="1.1" />Opt 1<br /> <input type="radio" name="choice" value="1.2" />Opt 2<br /> </td><td> <input type="radio" name="choice" value="2.1" />Opt 1<br /> <input type="radio" name="choice" value="2.2" />Opt 2<br /> </td><td> <input name="choice_btn" type="button" value="Confirm" onclick="new AJAX.Updater('my_form', '/process_form', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this.form)}); return false;" /> </td></tr> </table> </form> But I can see that the POST generated by clicking the Confirm button contains the foo and bar values for the hidden fields, but not the choice of the radio buttons. Is this because I've got a table inside my form? How can I get around this?

    Read the article

  • jQuery slideToggle - when div is toggled it pushes content out of viewable area (IE)

    - by Chris
    This is an annoying ocurrance in IE when I use the jQuery slideToggle effect. Without the div being open, page looks normal. The minute I toggle the div open, it extends past the current content, overtop of the footer, and out of the viewable browser area (Even after scrolling all the way down). This feature seems to work just fine in firefox. Do I need an additional hack or CSS to make it work in IE8?

    Read the article

  • jQuery delay doesn't work as expected

    - by Chris
    I have the following jQuery code $("#dropdown").hover(function() { $(this).stop(true,true).fadeTo('fast',1); $("#options").stop(true,true).slideDown(); }, function() { $(this).delay(1000).stop(true,true).fadeTo('fast',0.1); $("#options").delay(1000).stop(true,true).slideUp(); } ); What I expect to happen is when the mouse leaves #dropdown it will wait 1 second before continuing. This is not happening. What I am trying to achieve, in case there is a better way, is to leave the drop down menu visible for a second or two after moving your mouse and I would also like to prevent the events from happening again to prevent artifacts and "funnies" if you were to move the mouse over and out from the div very quickly

    Read the article

  • Learning CSS - What is the BEST ONLINE RESOURCE?

    - by Chris Jacob
    The Goal: Use votes to rank nominated sites. The first answer to reach 100+ votes will be accepted. Please answer following these 5 simple rules: ONE SITE per answer. Link to each page if nominating a "series" of resources on a SITE. No "offline" books. Only online resources (tutorials, API references, blogs, screencasts, etc). Don't add "subjective" details/notes in your answer. Add them as a comment to the answer. Don't post duplicates. If your favourite is already listed Up Vote It! Example Answer: Site Name http://www.example.com Example Answer (site with a series of resources): Site Name http://www.example.com Series Name A http://www.example.com/video/a/1 http://www.example.com/video/a/2 Series Name B http://www.example.com/video/b/1

    Read the article

  • Cakephp: Extend search capability to hasMany Relationship

    - by Chris
    I have two models: Car hasMany Passengers Passenger belongsTo Car I want to implement a search using Cake Search. The user should input a number and the searchengine should return all cars that have less than this number passengers. In my search form: echo $form->input('passengers', array('label' => 'Passengers', 'div' => false)); In my Car model: public $filterArgs = array( array('name' => 'passengers', 'type' => 'int'), ); In the controller: public $presetVars = array( array('field' => 'passengers', 'type' => 'int') } I thought of adding a function to the model that returns the number of passengers: function countPassengers(){ return(count($this->Car->Passenger)); //Not sure if this works } And how to I implement this search criteria?: return all Cars where countPassengers()<passenger

    Read the article

  • Filter on count(*) in oracle

    - by chris
    I have a grouped query, and would like to filter it based on count(*) Can I do this without a subquery? This is what I have currently: select * from (select ID, count(*) cnt from name group by ID) where cnt > 1;

    Read the article

  • Folder Renaming After Tar Extraction

    - by Chris S
    I have an tarball, myarchive.tar.gz. When I uncompress it using "tar -zxvf myarchive.tar.gz", it creates a folder myarchive-x980-2303-ssioo. What's the easiest way to automatically rename the extracted folder to ensure it matches the name of the archive? I've checked tar's manpage, but it doesn't seem to have an option for this.

    Read the article

  • How to get dataset to populate data into dbgrid in Delphi 6?

    - by Chris J
    I have created a DBGrid in Delphi 6 and tied it to a DataSource contained in a DataModule. The Dataset for that source in also located in the same module. In the OnShow event for the form, I activate the dataset and set a label equal to the rowcount for the dataset. This shows several hundred rows but nothing shows in the dbgrid. If I activate the dataset in the IDE, the grid populates with the expected data. Does anyone have any idea why this behaviour would change between the IDE and normal runtime? We are also using SDAC connection components. All 3rd party component choices are not mine to change. I can elaborate as necessary for clarification, but I mainly need troubleshooting ideas to start at.

    Read the article

  • How to use Javascript to create a checked radioButton in IE?

    - by Chris
    I was trying to create a checked radiobutton by using following code in IE7. But it doesn't work. var x = document.createElement(""); var spn=document.createElement("span"); spn.appendChild(x); x.checked=true; document.body.appendChild(spn); I found that I could put x.checked=true after appendChild statement to make it work. I also noticed that when I change "radio" to "checkbox", it can be checked without changing the order of statements. I am really confused by these facts. Am I doing something wrong in the above code?

    Read the article

  • Bash Script (Cygwin) to grep a logfile for multiple phrases and output a new file for each phrase.

    - by Chris
    Each logfile is titled based on the date it was created in the format YYYY-MM-DD.txt. I need to search each file for five different keywords and output five files prepended with the specific keyword and then the original logfile name. Example: Test-YYYY-MM-DD.txt grep -i -w 'keyword1' YYYY-MM-DD.txt Keyword1-YYYY-MM-DD.txt If it's also possible to email each new file to a different person, that would be helpful as well.

    Read the article

  • Sitemap Links don't work on live site, Windows Authentication

    - by Chris
    I have a intranet site with Windows Authentication. I have 'Administrator' pages in an 'Administrator' folder that will only show for those in the admin group (windows security group) These pages work I have a folder with sub folders containing reports. These permissions are broken down for each type of report. They have similar role priveleges. When I test the application, I can navigate to the pages. When I deploy the site live on the intranet the links don't return a page. Error missing link 404. Do I need to set something in IIS?

    Read the article

  • iPhone SDK: Check validity of URLs with NSURL not working??

    - by Chris
    hi, I'm trying to check if a given URL is valid and i'm doing it like this: - (BOOL)urlIsValid:(NSString *)address { NSURL *testURL = [NSURL URLWithString:address]; if (testURL == nil) { return NO; } else { return YES; } } Since "URLWithString" is supposed to return "nil" if the URL is malformed I thought this would work but it doesn't for some reason. Could someone please tell me why? Thanks in advance!

    Read the article

  • mysql_query arguments in PHP

    - by Chris Wilson
    I'm currently building my first database in MySQL with an interface written in PHP and am using the 'learn-by-doing' approach. The figure below illustrates my database. Table names are at the top, and the attribute names are as they appear in the real database. I am attempting to query the values of each of these attributes using the code seen below the table. I think there is something wrong with my mysql_query() function since I am able to observe the expected behaviour when my form is successfully submitted, but no search results are returned. Can anyone see where I'm going wrong here? Update 1: I've updated the question with my enter script, minus the database login credentials. <html> <head> <title>Search</title> </head> <body> <h1>Search</h1> <!--Search form - get user input from this--> <form name = "search" action = "<?=$PHP_SELF?>" method = "get"> Search for <input type = "text" name = "find" /> in <select name = "field"> <option value = "Title">Title</option> <option value = "Description">Description</option> <option value = "City">Location</option> <option value = "Company_name">Employer</option> </select> <input type = "submit" name = "search" value = "Search" /> </form> <form name = "clearsearch" action = "Search.php"> <input type = "submit" value = "Reset search" /> </form> <?php if (isset($_GET["search"])) // Check if form has been submitted correctly { // Check for a search query if($_GET["find"] == "") { echo "<p>You did not enter a search query. Please press the 'Reset search' button and try again"; exit; } echo "<h2>Search results</h2>"; ?> <table align = "left" border = "1" cellspacing = "2" cellpadding = "2"> <tr> <th><font face="Arial, Helvetica, sans-serif">No.</font></th> <th><font face="Arial, Helvetica, sans-serif">Title</font></th> <th><font face="Arial, Helvetica, sans-serif">Employer</font></th> <th><font face="Arial, Helvetica, sans-serif">Description</font></th> <th><font face="Arial, Helvetica, sans-serif">Location</font></th> <th><font face="Arial, Helvetica, sans-serif">Date Posted</font></th> <th><font face="Arial, Helvetica, sans-serif">Application Deadline</font></th> </tr> <? // Connect to the database $username=REDACTED; $password=REDACTED; $host=REDACTED; $database=REDACTED; mysql_connect($host, $username, $password); @mysql_select_db($database) or die (mysql_error()); // Perform the search $find = mysql_real_escape_string($find); $query = "SELECT job.Title, job.Description, employer.Company_name, address.City, job.Date_posted, job.Application_deadline WHERE ( Title = '{$_GET['find']}' OR Company_name = '{$_GET['find']}' OR Date_posted = '{$_GET['find']}' OR Application_deadline = '{$_GET['find']}' ) AND job.employer_id_job = employer.employer_id AND job.address_id_job = address.address_id"; if (!$query) { die ('Invalid query:' .mysql_error()); } $result = mysql_query($query); $num = mysql_numrows($result); $count = 0; while ($count < $num) { $title = mysql_result ($result, $count, "Title"); $date_posted = mysql_result ($result, $count, "Date_posted"); $application_deadline = mysql_result ($result, $count, "Application_deadline"); $description = mysql_result ($result, $count, "Description"); $company = mysql_result ($result, $count, "Company_name"); $city = mysql_result ($result, $count, "City"); ?> <tr> <td><font face = "Arial, Helvetica, sans-serif"><? echo $count + 1; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $title; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $company; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $description; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $date_posted; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $application_deadline; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $education_level; ?></font></td> <td><font face = "Arial, Helvetica, sans-serif"><? echo $years_of_experience; ?></font></td> <? $count ++; } } ?> </body> </html>

    Read the article

< Previous Page | 104 105 106 107 108 109 110 111 112 113 114 115  | Next Page >