Daily Archives

Articles indexed Friday April 23 2010

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

  • Shake to open view modally

    - by Vivas
    Hi, I have my 'shake' working fine (using motionEnded), based off of Apple's GLPaint code. When the user shakes the device (running 3.0 and up) I want to open a view controller modally using presentModalViewController. In my appdelegate I have the notification (as per the GLPaint sample code): [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(shakeToOpenHiddenScreen) name:@"shake" object:nil]; In my shakeToOpenHiddenScreen I just want to open view 'x' modally but I don't think that my appdelegate will respond to presentModalViewController. Is there a way around this?

    Read the article

  • PHP - what is the proper way to do inline HTML variable output?

    - by edmicman
    I just moved from an Ubuntu PHP workstation dev environment back to Windows and am using xampp. I have a bit of code, like so: <input type="text" name="txtEmail" value="<?=$emailaddress;?>"/> that I swear worked to display the variable in the textbox when I was developing before. But when I loaded the page on Windows/xampp it just put that text between the quotes in the textbox. Instead, I ended up changing it to something like: <input type="text" name="txtFirstName" value="<?php echo($firstname);?>" /> The latter makes sense, but I guess I thought there was a shorthand or something, and I must be going crazy because I'm sure the first way was working on a difference environment. So what's the best way to do this?

    Read the article

  • Volunteer for a potential employer?

    - by EoRaptor013
    I've been looking for work since March, and haven't had much luck. Recently, however, I interviewed with a small company near my home for a C#, .NET, SQL development position. I hit it off very well with the hiring manager during the phone screen, and even more so during the face to face. Unfortunately, I failed the practical test: wiring up a web form, creating a couple of SQL stored procedures, saving new data with validation, and creating a minimal search screen. I knew what I was doing, but I was too slow to meet their standards as all the work needed to be done within an hour. Nevertheless, I really liked the place, the environment, the people who I would have been working with, and the boss. (I gave the company an 11 on Joel's 12 point scale.) So, the obvious next step was to scrape the rust off. I've been trying to create little projects for myself, but I don't know that I've been effective in getting any faster. What with all that goes into creating a project, I'm not heads-down coding as much as I think I need. Now, with all that introduction, here's the question. I have been thinking about calling the hiring manager at that place, and asking him to let me volunteer for three or four weeks, with no strings attached. I think it would benefit me, and wouldn't cost him anything (as long as I didn't slow the existing people down!). At the end of that period, he might, or might not, be inclined to hire me, but even if not, I would have had as much as 160 hours of in the trenches development. Maybe not all shiny, but no more rust, I would think. Does this plan make any sense at all? I certainly don't want to sound desperate (although, I'm not far from being there), and I very much need the tuneup, lube, and change the oil. What's the downside, if any, to me doing this? Do any of you see red flags going up—either from the prerspective of the hiring manager, or from the perspective of a developer?

    Read the article

  • Should I remove Etag for htm and php pages?

    - by Castor
    I generate htm files dynamically using php and .htaccess. I read somewhere that I should remove Etags for files of type text/html? Is that correct? I am wondering if I use etags and If i don't change the content, I could save some bandwidth. I would appreciate if you guys could tell me if I can use etags for htm files.

    Read the article

  • Can't contravariance be solved with interfaces?

    - by Sir Psycho
    Hi, I'm at the point where I'm starting to grasp contravariance, although I'm trying to work out what the advantage is when an interface can be used instead. Obviously I'm missing something. Here is the c#4 example class Dog : Animal { public Dog(string name) : base(name) { } } class Animal { string _name; public Animal(string name) { _name = name; } public void Walk() { Console.WriteLine(_name + " is walking"); } } Action<Animal> MakeItMove = (ani) => { ani.Walk(); }; Action<Dog> MakeItWalk = MakeItMove; MakeItWalk(new Dog("Sandy")); Same example which works in earlier versions on c# class Dog : Animal { public Dog(string name) : base(name) { } } class Animal : IAnimal { string _name; public Animal(string name) { _name = name; } public void Walk() { Console.WriteLine(_name + " is walking"); } } interface IAnimal { void Walk(); } Action<IAnimal> MakeItMove = (ani) => { ani.Walk(); }; Action<IAnimal> MakeItWalk = MakeItMove; MakeItWalk(new Dog("Sandy")); These may not be the best examples, but I still can't seem to 'get it'. Is the in keywork defined on the action delegate simply a short hand syntax way like lamda is to delegates?

    Read the article

  • Choose Graph API or old REST API for Facebook application

    - by Andree
    Hi there! I should have asked this in Facebook developer forum instead, but somehow I can't register to the forum and the Facebook connect feature is not working at the time I'm writing this. Anyway, I am still confused whether to use Graph API or the old REST API for my Facebook app. Generally, this is what I want to achieve in my app: Get profile picture and name of the user. Get profile picture and name of the user's friends who are also using my app. Post into the user's stream. Allow users to invite their friends to use the application. Can someone provide me an insight, which one is better for my application?

    Read the article

  • Changing Base Path In PHP

    - by Joshua
    I need to change the folder that "relative include paths" are based on. I might currently be "in" this folder: C:\ABC\XYZ\123\ZZZ And in this case, the path "../../Source/SomeCode.php" would actually be in this folder: C:\ABC\XYZ\Source And realpath('.') would = 'C:\ABC\XYZ\123\ZZZ'; If however, realpath('.') were "C:\Some\Other\Folder" Then in this case, the path "../../Source/SomeCode.php" would actually be in this folder: C:\Some\Source How do I change what folder is represented by '.' in realpath()? Like this: echo ('BEFORE = '.realpath('.')); // BEFORE = C:\ABC\XYZ\123\ZZZ // Some PHP code here... echo ('AFTER = '.realpath('.')); // AFTER = C:\Some\Other\Folder How can I change the folder represented by '.', as seen by realpath()?

    Read the article

  • javascript to jquery

    - by Angeline Aarthi
    How do I write the following line which is in javascript in jQuery? var variablename = new functionname('some variable'); This is my js code: var rt = new ResizeableTextbox('myRT'); I need to use this in the following code segment: if($(this).text() =='String') { $("<label id=labelstr"+stringinc+" >"+label+"</label>").appendTo(".menu li"); $("<input id=inputstr"+stringinc+" type= 'text' ></input>").appendTo(".menu li"); //in place of this I need that javascript code. } How do I do that? The function Resizeable is defined in a separate js file. Please help me out.

    Read the article

  • How do I manage conflict in the workplace?

    - by JoelFan
    My workplace has an excessive amount of personal conflict among developers. There are some legitimate technical disagreements involved, but I wish it could be kept to a discussion about issues and not about people. Is there anything I can do about this from my lowly position, being that I don't have any formal leadership role on the team?

    Read the article

  • How to select nth element of particular type in enlive?

    - by Mad Wombat
    I am trying to scrape some data from a page with a table based layout. So, to get some of the data I need to get something like 3rd table inside 2nd table inside 5th table inside 1st table inside body. I am trying to use enlive, but cannot figure out how to use nth-of-type and other selector steps. To make matters worse, the page in question has a single top level table inside the body, but (select data [:body : :table]) returns 6 results for some reason. What the hell am I doing wrong?

    Read the article

  • NSTimer to smooth out playback position

    - by Michael
    I have an audio player and I want to show the current time of the the playback. I'm using a custom play class. The app downloads the mp3 to a file then plays from the file when 5% has been downloaded. I have a progress view update as the file plays and update a label on each call to the progress view. However, this is jerky... sometimes even going backward a digit or two. I was considering using an NSTimer to smooth things out. I would be fired every second to a method and pass the percentage played figure to the method then update the label. First, does this seem reasonable? Second, how do I pass the percentage (a float) over to the target of the timer. Right now I am putting the percent played into a dictionary but this seems less than optimal. This is what is called update the progress bar: -(void)updateAudioProgress:(Percentage)percent { audio = percent; if (!seekChanging) slider.value = percent; NSMutableDictionary *myDictionary = [[NSMutableDictionary alloc] init]; [myDictionary setValue:[NSNumber numberWithFloat:percent] forKey:@"myPercent"]; [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(myTimerMethod:) userInfo:myDictionary repeats:YES]; [myDictionary release]; } This is called first after 5 seconds but then updates each time the method is called. As always, comments and pointers appreciated.

    Read the article

  • Mounting an attached ebs volume in EC2

    - by David
    I've created an EC2 instance, created an EBS volume, attached it to the running instance, and successfully ssh'ed into my instance. The drive is attached as /dev/sdf Next, I tried mounting the drive by running: mkdir /testName mount -t ext3 /dev/sdf /testName But then I get the error message: mount: wrong fs type, bad option, bad superblock on /dev/sdf, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so What am I doing wrong? Thanks.

    Read the article

  • MS SQL server services not installed - help!

    - by judahgabriel
    Hi guys, I've installed SQL Server 2008 R2, but connecting to my local machine in SQL Management Studio fails: Putting "localhost" or "." as the server name results in the same error. I've narrowed down the problem: there are no SQL services installed: Bringing up the Services control panel applet shows me there are no MS SQL services installed. Things I've tried: Repair install of SQL Complete uninstall and reinstall of all MS SQL products. How can I get SQL Server running?

    Read the article

  • Why would only the cpu fan not spin and no video displayed?

    - by Patrick
    I just built a new computer and when I first powered it on I got a continuous beeping which according to the manual means a power failure. After moving the voltage switch to the left a little I was able to get the beeping to stop. Even after the stopping though the CPU fan doesn't spin, and there is no display on the monitor. All the other fans and lights come on in the computer though, the DVD drive is working and ejects the tray, and the hard drive sounds like it spins up. Has anyone seen this before and know what is wrong or what has failed?

    Read the article

  • Oracle Transportation Management Annual Customer Conference

    - by [email protected]
    The 2010 Oracle Transportation Management (OTM) Conference will be held June 13-16 in Philadelphia, Pennsylvania. The conference brings together all things OTM: users, prospective users, development personnel, product strategy, implementation experts, and software and services partners.  With over 200 attendees, this conference is the premiere location and time to learn about OTM, build relationships with peers, and get answers to all your OTM questions.    This year's conference will be held at the: Sheraton Society Hill, One Dock St., Philadelphia, PA. 19106Companies speaking at this year's event include:AT&T Land O Lakes BlueScope Steel Baillie Lumber Kraft Sears Roseburg Forest Products Toyota Beckman CoulterLevi StraussNiagara BottlingSmurfit StonePQ CorporationOffice Depot               To register click here http://www.otmconference.com/ConfAgenda.aspx.  1

    Read the article

  • Is my form password being passed in clear text?

    - by liinkas
    This is what my browser sent, when logging into some site: POST http://www.some.site/login.php HTTP/1.0 User-Agent: Opera/8.26 (X2000; Linux i686; Z; en) Host: www.some.site Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 Accept-Language: en-US,en;q=0.9 Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0 Referer: http://www.some.site/ Proxy-Connection: close Content-Length: 123 Content-Type: application/x-www-form-urlencoded lots_of_stuff=here&e2ad811=my_login_name&e327696=my_password&lots_of_stuff=here Can I state that anyone can sniff my login name and password for that site? Maybe just on my LAN? If so (even only on LAN ) then I'm shocked. I thought using <input type="password"> did something more than make all characters look like ' * ' p.s. If it matters I played with netcat (on linux) and made connection browser <= netcat (loged here) <= proxy <= remote_site

    Read the article

  • Global variables in jQuery

    - by Thorpe Obazee
    I have been working on this script: <script type="text/javascript" src="/js/jquery.js"></script> <script type="text/javascript"> $(function(){ compentecy = $('#competency_id'); $('#add_competency').bind('click', function(e){ e.preventDefault(); $.post('/script.php', {competency_id: compentecy.val(), syllabus_id: 2}, function(){ // competency = $('#competency_id'); competency.children('option[value=' + compentecy.val() + ']').remove(); }); }); }); </script> in the $.post callback function, it seems that I can't access global variables. I tried $.competency but it didn't work. I always get a "competency is undefined" error. I had to reinitialize the variable once again inside the callback. Is there a way to NOT reinitialize the variable inside the callback?

    Read the article

  • Retrieving saved checkboxes' name and values from database

    - by sermed
    I have a form with checkboxes, each one has a value. When the registered user select any checkbox the value is incremented (the summation) and then then registred user save his selection of checkbox if he satisfied with the result of summation into database all this work fine ...i want to enable the registred user to view his selection history by retriving and displaying the checkboxes he selected in a page with thier values ... How I can do that? I'm just able to save the selected checkboxes as choice 1, choice 2, for example .. I want to view the selected checkboxes that is saved in database as the appear in the page when the user first select them: for example if the registred user selects these 3 options LEAD DEEP KEEL (1825) FULLY BATTENED MAINSAIL (558) TEAK SIDE DECKS (2889) They will be saved as for example (choice1, choice2, choice3). But if he want to view selected checkboxes the appear exactly as first he selects them: LEAD DEEP KEEL (1825) FULLY BATTENED MAINSAIL (558) TEAK SIDE DECKS (2889) This is my user table: $query="CREATE TABLE User( user_id varchar(20), password varchar(40), user_type varchar(20), firstname varchar(30), lastname varchar(30), street varchar(50), city varchar(50), county varchar(50), post_code varchar(10), country varchar(50), gender varchar(6), dob varchar(15), tel_no varchar(50), vals varchar(50), email varchar(50))"; and the code to inser the options selected to database <?php include("databaseconnection.php"); $str = ''; foreach($_POST as $key => $val) if (strpos($key,'choice') !== false) $str .= $key.','; $query = "INSERT INTO User (vals) VALUES('$str')"; $result=mysql_query($query,$conn); if ($result) { (mysql_error(); } else { echo " done"; } ?> And this is my form: function checkTotal() { document.listForm.total.value = ''; var sum = 0; for (i=0;i <form name="listForm" method="post" action="insert_options.php" > <TABLE cellPadding=3 width=600 border=0> <TBODY> <TR> <TH align=left width="87%" bgColor=#b0b3b4><SPAN class=whiteText>Item</SPAN></TH> <TH align=right width="13%" bgColor=#b0b3b4><SPAN class=whiteText>Select</SPAN></TH></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>General</B></SPAN></TD></TR> <TR> <TD bgcolor="#c4c8ca"><SPAN class=normalText >TEAK SIDE DECKS (2889)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="2889" type="checkbox" onchange="checkTotal()" /></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>LEAD DEEP KEEL (1825)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1825" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>FULLY BATTENED MAINSAIL (558)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="558" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>HIGH TECH SAILS FOR CONVENTIONAL RIG (1979)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1979" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>IN MAST REEFING WITH HIGH TECH SAILS (2539)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="2539" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPlNNAKER GEAR (POLE LINES DECK FITTINGS) (820)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="820" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPINNAKER POLE VERTICAL STOWAGE SYSTEM (214)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="214" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>GAS ROD KICKER (208)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="208" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SIDE RAIL OPENINGS (BOTH SIDES) (392)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="392" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SPRING CLEATS MIDSHIPS -ALUMIMIUM (148)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="148" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ELECTRIC ANCHOR WINDLASS (1189)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1189" type="checkbox" onchange="checkTotal()"> </TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ANCHOR CHAIN GALVANISED (50m) (202)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="202" type="checkbox" onchange="checkTotal()"> </TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>ANCHOR CHAIN GALVANISED (50m) (1141)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="1141" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>NAVIGATION & ELECTRONICS</B></SPAN></TD></TR> <TR> <TD bgcolor="#c4c8ca"><SPAN class=normalText >WIND VANE (STAINLESS STEEL)(41)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="41" type="checkbox" onchange="checkTotal()" /></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>RAYMARINE ST6O LOG & DEPTH (SEPARATE UNITS)(226)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="226" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>ENGINES & ELECTRICS</B></SPAN></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SHORE SUPPLY (220V) WITH 3 OUTLETS (EXCLUDJNG SHORE CABLE) (327)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="327" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgColor=#c4c8ca><SPAN class=normalText>3rd BATTERY(14OA/H)(196)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="196" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>24 AMP BATTERY CHARGER (475)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="475" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>2 BLADED FOLDING PROPELLER (UPGRADE)(299)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="299" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>BELOW DECKS/DOMESTIC</B></SPAN></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>WARM WATER (FROM ENGINE & 220V)(749)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="749" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>SHOWER IN AFT HEADS WITH PUMPOUT(446)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="446" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>DECK SUCTION DISPOSAL FOR HOLDINGTANK(166)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="166" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>REFRIGERATED COOLBOX (12V)(666)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="666" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>LFS SAFETY PACKAGE (COCKPIT HARNESS POINTS STAINLESS STEEL JACKSTAYS)(208)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="208" type="checkbox" onchange="checkTotal()"></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>UPHOLSTERY UPGRADE IN SALOON (SUEDETYPE)(701)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="701" type="checkbox" onchange="checkTotal()"></TD></TR> <TR> <TD bgcolor="#9da8af"colSpan=2><SPAN class=normalText><B>NAVIGATION ELECTRONICS & ELECTRICS</B></SPAN></TD></TR> <TD bgColor=#c4c8ca><SPAN class=normalText>VHF RADIO AERIAL CABLED TO NAVIGATION AREA(178)</SPAN></TD> <TD align=right bgColor=#c4c8ca><input name="choice" value="178" type="checkbox" onchange="checkTotal()"></TD></TR> </table>

    Read the article

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