Search Results

Search found 1091 results on 44 pages for 'bill zimmerman'.

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

  • mysql first record retrieval

    - by Sammy
    While very easy to do in Perl or PHP, I cannot figure how to use mysql only to extract the first unique occurence of a record. For example, given the following table: Name Date Time Sale John 2010-09-12 10:22:22 500 Bill 2010-08-12 09:22:37 2000 John 2010-09-13 10:22:22 500 Sue 2010-09-01 09:07:21 1000 Bill 2010-07-25 11:23:23 2000 Sue 2010-06-24 13:23:45 1000 I would like to extract the first record for each individual in asc time order. After sorting the table is ascending time order, I need to extract the first unique record by name. So the output would be : Name Date Time Sale John 2010-09-12 10:22:22 500 Bill 2010-07-25 11:23:23 2000 Sue 2010-06-24 13:23:45 1000 Is this doable in an easy fashion with mySQL? Thanks, Sammy

    Read the article

  • Redirecting a HTTP rqueust and response code/headers

    - by Bill Zimmerman
    Hi, I have a loosely coupled web app (one part uses PHP, the other uses WGSI). The WSGI/python framework shares the authentication with the PHP app, meaning that generally, the user should Log in via the PHP interface Now the user can access any of the WSGI pages [this part works if the user has logged in] What I want to do though, is if a user tries to access a WSGI page while not logged in (maybe from a previous bookmark), I would like to redirect him to the login page, and after logging in redirect him back to the orignal URL. I'm not very experienced with server-side programming, so here are my questions. How should I redirect the user back to the PHP login page? What should the HTTP status code be? Do I need to set any extra header information? What is a good way/best practice method to pass the original URL to the login page, and then after logging have it redirect the user back. Thank you!

    Read the article

  • 3D World to Local transformation

    - by Bill Kotsias
    Hello. I am having a real headache trying to set a node's local position to match a given world position. I was given a solution but, AFAICS, it only takes into account orientation and position but NOT scaling : node_new_local_position = node_parent.derivedOrientation().Inverse() * ( world_position_to_match - node_parent.derivedPosition() ); The node in question is a child of node_parent; node_parent local and derived properties (orientation, position and scaling) are known, as well as its full matrix transform. All the positions are 3d vectors; the orientation is a quaternion; the full transform is a 4x4 matrix. Could someone please help me to modify the solution to support scaling in the node hierarchy? Many thanks in advance, Bill

    Read the article

  • jquery - radio button not checked on page load, but checked on same function call later

    - by Bill Zimmerman
    Hi, I'm having a strange problem with jquery. When my page loads, I dynamically create some simple radio buttons in a special i've created. However, the default radio button is not checked. It is checked however when the change() event is triggered later, but is never checked the first time. Can someone help? I am certain that the change() event is triggered on the page load, because the rest of the HTML is added dynamically and I can see it. The basic idea is when the page loads, I bind an event handler, and then immediately call it to make sure that the default options are loaded. $(document).ready(function() { $(".options select[name=App]").change(onAppChange); //trigger the change function in the dropdown to populate default options $(".options select[name=App]").change() } Here is the simple onAppChange() function: function onAppChange() { var val = $(this).val(); var app_options = $(this).closest(".options").find(".app_options"); //clear the app_options app_options.empty(); var newOptions = ''; switch(val) { case 'testapp': newOptions='\ <fieldset>\ <legend>TestApp</legend>\ Option 1:\ <label>\ <input type="radio" name="option1" value="value1" checked>\ Value1\ </label>\ \ <label>\ <input type="radio" name="option1" value="value2">\ value2\ </label>\ \ </fieldset>'; break; case 'todo': //for testing newOptions='FOO'; break; } app_options.append(newOptions); } Yes, I am aware that I could use javascript to automatically select a radio button again, but I asked this question because I wanted to understand why this is happening. When using and , there doesn't seem to be any problem. Only with radio buttons. Why does the behavior differ when the same change() event is triggered? What is going on behind the scenes?

    Read the article

  • How do php apps identify a user after the session has timed out?

    - by Bill Zimmerman
    I am trying to understand how PHP apps check to see if a user is logged in. I am specifically looking at mediawiki's code to try to help me understand, but these cases should be fairly common in all php apps. From what I gather, the main cases are: A user just logged in or was created, every time they visit the page PHP knows its them by checking data common to the $_SESSION variable and the cookie. A user had the 'remember me' option checked on the login page a long time ago. They have a cookie on there computer with a tokenID, which is checked with a token on the server to authenticate them. In this case, there is no session variable, because the time between accesses could be weeks. My question is, what happens when a user is logged in, but the PHP session times out and he wants to access a page? I would have assumed that there is no easy way for the server to know who the person is - and that they would have to be redirected to the login page. However, mediawiki does just that. I've verified that the session files are deleted after X minutes, but when I hit refresh in mediawiki, it knows which user I am, and the 'token' variable is not included in the cookie.

    Read the article

  • Ending php sessions for debugging purposes

    - by Bill Zimmerman
    Hi, This might be very easy to do, but I haven't been able to figure it out. Basically, I have a loosely couple web-app written in python and php. The python code uses PHP sessions (generated from the PHP app when the user logs in) to check if the user is logged in/has permission to access the given python resource. My question is this: What is the easiest way to force all active sessions to timeout. I would like to do this for debugging purposes, to test out the python code. I tried changing the session.max_lifetime PHP variable, but that still doesn't guarantee that the session has ended and is removed. I tried just deleting the file, but this seems to cause problems (when i refresh the php page, errors show up in my apache logs and it won't reload quickly) Any ideas?

    Read the article

  • Very long strings as primary keys in a database for caching

    - by Bill Zimmerman
    Hi, I am working on a web app that allows users to create dynamic PDF files based on what they enter into a form (it is not very structured data). The idea is that User 1 enters several words (arbitrary # of words, practically capped of course), for example: A B C D E There is no such string in the database, so I was thinking: Store this string as a primary key in a MySQL database (it could be maybe around 50-100k of text, but usually probably less than 200 words) Generate the PDF file, and create a link to it in the database When the next user requests A B C D E, then I can just serve the file instead of recreating it each time. (simple cache) The PDF is cpu intensive to generate, so I am trying to cache as much as I can... My questions are: Does anyone have any alternative ideas to my approach What will the database performance be like? Is there a better way to design the schema than using the input string as the primary key?

    Read the article

  • vb.net Object Initialiser List(Of T)

    - by Tim B James
    I have been looking at some C# code: List<Employee> Employees = new List<Employee>{ new Employee{firstname="Aamir",lastname="Hasan",age=20}, new Employee{firstname="awais",lastname="Hasan",age=50}, new Employee{firstname="Bill",lastname="Hasan",age=70}, new Employee{firstname="sobia",lastname="khan",age=80}, }; Now when I convert this to vb.net Dim Employees as List(Of Employee) = New List(Of Employee)() With { New Employee() With { _ .firstname = "Aamir", _ .lastname = "Hasan", _ .age = 20 _ }, _ New Employee() With { _ .firstname = "awais", _ .lastname = "Hasan", _ .age = 50 _ }, _ New Employee() With { _ .firstname = "Bill", _ .lastname = "Hasan", _ .age = 70 _ }, _ New Employee() With { _ .firstname = "sobia", _ .lastname = "khan", _ .age = 80 _ } _ } I get the error "Name of field or property being initialized in an object initializer must start with'.'." Now I can get an array of employee using the code: Dim Employees = { New Employee() With { _ .FirstName = "Aamir", _ .LastName = "Hasan", _ .Age = 20}, _ New Employee() With { _ .FirstName = "Awais", _ .LastName = "Hasan", _ .Age = 50}, _ New Employee() With { _ .FirstName = "Bill", _ .LastName = "Hasan", _ .Age = 70 _ } _ } But I would like a List(Of Employee) as it is bugging me as to why this doesnt work in vb.net?

    Read the article

  • How to read in Excel file in Win7 64bit?

    - by Bill Campbell
    Hi, I have a c# application that I have moved to a 64bit machine. This application reads in an Excel file for some data input. I would like to build this project as 64bit. Is there any way to have my program read in this file? I find it hard to believe that there is no way to use and Excel file as input into a 64bit app. I have installed Office 2010 64 bit as well as the 2010 Office System Driver Beta: Data Connectivity Components with no luck. I'm sure that I'm just missing something really simple. thanks!! Bill

    Read the article

  • NHibernate: insert multiple items at once

    - by Gart
    Hello, all! I am learning NHibernate now and I would like to know is it possible to save multiple objects to database in one operation. For example, consider this test code private static void SaveTestBillNamesInSession(ISession session, params string[] names) { var bills = from name in names select new Bill { Name = name, DateRegistered = DateTime.Now, }; foreach (var bill in bills) session.SaveOrUpdate(bill); } This loop here generates many INSERT statements which may be sub-optimal in SQL Server 2008 which allows to include multiple data rows in one INSERT statement. Is it possible to rewrite this code to make use of this functionality - insert all the data in one operation?

    Read the article

  • OpenAL - determine maximum sources

    - by Bill Kotsias
    Is there an API that allows you to define the maximum number of OpenAL "sources" allowed by the underlying sound hardware? Searching the internet, I found 2 recommendations : keep generating OpenAL sources till you get an error. However, there is a note in FreeSL (OpenAL wrapper) stating that this is "very bad and may even crash the library" assume you only have 16; why would anyone ever require more? (!) The second recommendation is even adopted by FreeSL. So, is there a common API to define the number of simultaneous "voices" supported? Thank you for your time, Bill

    Read the article

  • Best way to return a user-generated file, AJAX or Forms?

    - by Bill Zimmerman
    Hi, I'm new to web programming, so I need some help. I am writing a custom file-creation app for my site. A user visits the page, clicks on some various options and toggles some checkboxes, and the presses a 'download now' link. I have a PHP backend which will be processing the submission, and generating a PDF file. After the user presses the download link, I want the download to start like it would for any static link. My question is: What is the best way to do this? From my limited understanding, I have a choice between using AJAX or somehow using forms to submit the data. What are the advantages/disadvantages of each? Does anyone have any good links to examples? Thanks

    Read the article

  • Is there a way to disable all other Java Scripts other than my own with Grease Monkey

    - by DKinzer
    I need help getting a Grease Monkey with JQuery Script to run on a broken site. I'm trying to get the following GM script to run, but the page I want it to work on has a JS error and my JS does not get executed. // ==UserScript== // @name BILL INFO PAGE ALTER // @namespace http://jenkinslaw.org // @description Alter the web page in order to pretty print // @include http://www.legis.state.pa.us/cfdocs/billinfo/bill_history.cfm?* // @require http://code.jquery.com/jquery-1.4.2.min.js // ==/UserScript== */ (function() { //Make a copy of the bill table var bill_table = $('.main_table').clone(); //empty the whole lot $(body).empty(); //append the bill back to the dom. $(body).append(bill_table); }()); Thanks! D

    Read the article

  • Creating ODT and PDF files as end result

    - by Bill Zimmerman
    Hello, I've been working on an app to create various document formats for a while now, and I've had limited success. Ideally, I'd like to dynamically create a fairly simple ODT/PDF/DOC file. I've been focusing my efforts on ODT, because it is editable, and open enough that there are several tools which will convert it to any of the other formats I need. The problem is that the ODT XML files are NOT simple, and there aren't any good-quality API's I could find (especially in python). So far, I've had the most success creating a template ODT file, and then manipulating the DOM in python as needed. This is ok generally, but is quickly becoming inadequate and requires too much tweaking every single time I need to alter one of the templates. The requirements are: 1) Produce a simple document that will have lists, paragraphs, and the ability to draw simple graphics on the page (boxes, circles, etc...) 2) The ability to specify page size, and the different formats should generally print the exact same output when sent to a printer My questions: 1) Are there any other ways I can produce ODT/PDF/DOC files? 2) Would LaTeX be acceptable? I've never really used it, does anyone have experience converting LaTeX files into other formats? 3) Would it be possible to use HTML? There are a lot of converters online. Technically you can specify dimensions in mm/cm, etc..., but I am worried that the printed output will differ between browsers/converters.... Any other ideas?

    Read the article

  • Including/Organzing HTML in large javascript project

    - by Bill Zimmerman
    Hi, I've a got a fairly large web app, with several mini applets on each page. These applets are almost always identical jquery apps. I am looking for advice on how I should organize/include smaller parts of these jquery apps within my larger project. For example, each app has several independent tabs. If possible, I would like to store each of the tabs as a seperate .html file because this makes development easier. My requirements are: 1) All of the html 'tabs' are loaded on the clients end when the page loads. I would like to avoid any delays by dynamically requesting the tab html. 2) If possible, I would like to minimize the raw data sent. For example, it would be preferable to send each tab 1 time, instead of sending each tab 10 times if there are ten applets on that page. Questions: 1) What are my options for 'including' the HTML files / javascript code 2) Any tips for keeping my development simple in this situation? Surely there has to be a better way than just editing one massive html file when working with large pages.

    Read the article

  • iPhone not returning to application after calling eMail send

    - by Bill
    I am sending an email from within my iPhone application. The eMail page pops up ok, I click on the Send button, the iPhone plays a whoosh sound, and the eMail actually arrives at the recipient. Unfortunately, the mail dialog still sits there unresponsive, and the only option - to click the home button - kills the app. Is there something else that needs to be specified to close the eMailMessage view? MFMailComposeViewController *eMailMessage; NSArray *toAddress; if ([MFMailComposeViewController canSendMail]) { toAddress = [NSArray arrayWithObject:@"[email protected]"]; eMailMessage = [[MFMailComposeViewController alloc] init]; [eMailMessage setToRecipients:toAddress]; [eMailMessage setSubject:@"Notification"]; [eMailMessage setMessageBody:@"Performed by ..." isHTML:NO]; [self presentModalViewController:eMailMessage animated:YES]; [eMailMessage release]; }

    Read the article

  • Dynamic dispatch and inheritance in python

    - by Bill Zimmerman
    Hi, I'm trying to modify Guido's multimethod (dynamic dispatch code): http://www.artima.com/weblogs/viewpost.jsp?thread=101605 to handle inheritance and possibly out of order arguments. e.g. (inheritance problem) class A(object): pass class B(A): pass @multimethod(A,A) def foo(arg1,arg2): print 'works' foo(A(),A()) #works foo(A(),B()) #fails Is there a better way than iteratively checking for the super() of each item until one is found? e.g. (argument ordering problem) I was thinking of this from a collision detection standpoint. e.g. foo(Car(),Truck()) and foo(Truck(), Car()) and should both trigger foo(Car,Truck) # Note: @multimethod(Truck,Car) will throw an exception if @multimethod(Car,Truck) was registered first? I'm looking specifically for an 'elegant' solution. I know that I could just brute force my way through all the possibilities, but I'm trying to avoid that. I just wanted to get some input/ideas before sitting down and pounding out a solution. Thanks

    Read the article

  • Shuffling words in a sentence in javascript (coding horror - How to improve?)

    - by Bill Zimmerman
    Hi, I'm trying to do something that is fairly simple, but my code looks terrible and I am certain there is a better way to do things in javascript. I am new to javascript, and am trying to improve my coding. This just feels very messy. All I want to do is to randomly change the order some words on a web page. In python, the code would look something like this: s = 'THis is a sentence' shuffledSentence = random.shuffle(s.split(' ')).join(' ') However, this is the monstrosity I've managed to produce in javascript //need custom sorting function because javascript doesn't have shuffle? function mySort(a,b) { return a.sortValue - b.sortValue; } function scrambleWords() { var content = $.trim($(this).contents().text()); splitContent = content.split(' '); //need to create a temporary array of objects to make sorting easier var tempArray = new Array(splitContent.length); for (var i = 0; i < splitContent.length; i++) { //create an object that can be assigned a random number for sorting var tmpObj = new Object(); tmpObj.sortValue = Math.random(); tmpObj.string = splitContent[i]; tempArray[i] = tmpObj; } tempArray.sort(mySort); //copy the strings back to the original array for (i = 0; i < splitContent.length; i++) { splitContent[i] = tempArray[i].string; } content = splitContent.join(' '); //the result $(this).text(content); } Can you help me to simplify things?

    Read the article

  • Rails: unexpected behavior updating a shared instance

    - by Pascal Lindelauf
    I have a User object, that is related to a Post object via two different association paths: Post --(has_many)-- comments --(belongs to)-- writer (of type User) Post --(belongs to)-- writer (of type User) Say the following hold: user1.name == "Bill" post1.comments[1].writer == user1 post1.writer == user1 Now when I retrieve the post1 and its comments from the database and I update post1.comments[1].writer like so: post1.comments[1].writer.name = "John" I would expect post1.writer to equal "John" too. But it doesn't! It still equals "Bill". So there seems to be some caching going on, but the kind I would not expect. I would expect Rails to be clever enough to load exactly one instance of the user with name "Bill"; instead is appears to load two individual ones: one for each association path. Can someone explain how this works exactly and how I am to handle these types of situations the "Rails way"?

    Read the article

  • Jquery javascript - How can I let users 'undo' their modifications?

    - by Bill Zimmerman
    Hi, i have a basic jquery app that allows a user to edit and manipulate some lists on a page. What I would like to do is have a button 'restore original list' that the user can press to undo his modifications. What is the best way to do this? I was thinking of just copying the DOM from the list down, and pasting it in a hidden element someplace else on the page. Is this the best way to do this? I also noticed that jquery has a .data() function which I could use if I converted the data to an array and stored it this way. What are the advantages and disadvantages? Also, I'm open to any suggestions people have if there is some method I haven't thought of. Thanks for your help!

    Read the article

  • Printing All Entries in A PHP Table

    - by mgunawan
    I'm trying to insert a php excerpt with SQL (I understand this is outdated, but am trying to grasp the syntax first) into my HTML page, and I've got the following table: ID Name Element1 Element2 0 John John's 1st John's 2nd 1 Bill Bill's 1st Bill's 2nd 2 Steve Steven's 1st Steve's 2nd I'm trying to get the for loop that will essentially print out the following in my html page Name: Name where ID=0 Element1: Element1 where ID=0 Element2: Element2 where ID=0 Name: Name where ID=1 Element1: Element1 where ID=1 Element2: Element2 where ID=1 and so forth. Basically, I am trying to make this process automated so that whenever a new record is added into the table, the HTML page will automatically update with a new "profile". Thank you for your help!

    Read the article

  • Are table headers only for the top row in html?

    - by Bill Zimmerman
    Hi, I always see the th tag only used in the first row of the table. Is there some specific reason why it can't be used to create 'left' headers along the leftmost column. Is this bad form, or is this ok. Basically, a table with headings on the top row and the leftmost column, with the very top left square being empty. e.g. <table> <tr> <th/> <!--empty--> <th>Top 1</th> <th>Top 2</th></tr> <tr> <th>LeftHeader?</th> <td>data1</td> <td>data2</td></tr> </table>

    Read the article

  • How do I import facebook friends from another website

    - by Jim Zimmerman
    I am looking for a way to connect to facebook by allowing the user to enter in their username and password and have our app connect to their account and get their contacts so that they can invite them to join their group on our site. I have written a facebook app before, but this is not an app as much as it is a connector so that they can invite all their friends or just some to the site we are working on. I have seen several other sites do this and also connect to Yahoo, Gmail and Hotmail contacts. I dont think they are using Facebook Connect to do this since it is so new, but they may be. Any solution in any language is fine as I can port whatever example to use C#. I cannot find anything specifically on Google or Facebook to address this specific problem. Any help is appreciated. I saw a first answer get removed that had suggested i might need to scrape the friends page. The more I look around, this might be what i need to do. Any other way i think will require the person to add it as an app. I am wondering how a answer can get removed, maybe that user deleted it.

    Read the article

  • Accessing php $_SESSION from python (wsgi) - is it possible?

    - by Bill Zimmerman
    Hi, I've got a python/WSGI app which needs to check to see if a user has logged on to a PHP web app. The problem is that the PHP app checks if a user has logged on by comparing a value in the $_SESSION variable to a value in the cookie from the user's browser. I would prefer to avoid changing the behavior of the php app if at all possible. My questions: Is there anyway I can access the session variables from within python? Where should I start to look? Are there any obvious security/performance issues I should be aware of when taking this approach?

    Read the article

  • Remove successive 0th entries in args[] for a Java command line interface?

    - by Bill IV
    I recall seeing, somewhere, an example that stepped through String args[] by deleting the lowest numbered value(s) public static void main( String args[]) { while (args.length > 0 ) { // do something and obliterate elements from args[] } } Obviously, a variable tracking current position in args and compared to args.length will do it; or an ArrayList made from args[]'s contents, with argsAL.size(). Am I mis-remembering an ArrayList example? I know this is a borderline question, the likely answer is, "No, there isn't and there shouldn't be either!". Maybe I'm over-focused... Bill

    Read the article

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