Search Results

Search found 2673 results on 107 pages for 'michael maddox'.

Page 69/107 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • How do I limit access to a subdomain?

    - by Michael
    I can set up the following: mydomain.com (ex m.com) CNAME points to: mysubdomain.hostingprovider.com (ex s1.h.com) subdomain.mydomain.com (ex s2.m.com) CNAME points to: www.anotherdomain.com (ex a.com) There are files in www.anotherdomain.com/mysubfolder/ that I want mydomain.com to be able to access through the subdomain, but I don't want any of the files on the subdomain to be accessable directly. I have full direct access (ftp) to mydomain.com, but I have opono direct access to www.anotherdomain.com (online booking & shopping cart). Is there anyway to make it so access to subdomain.mydomain.com can only be accessed by mydomain.com?

    Read the article

  • Why is Perl commonly used as CGI scripts?

    - by Michael Vasquez
    I plan to add a better search feature to my site, so I thought that I would write it in C and use the CGI as a means to access it. But it seems that Perl is the most popular language when it comes to CGI-based stuff. Why is that? Wouldn't it be faster programmed in C or machine code? What advantages, if any, are there to writing it in a scripting language? Thanks.

    Read the article

  • Dojo and Ajax - rendering widgets

    - by Michael Merchant
    I'm trying to load content into a Dojo content pane in a specific html tag and not replace the entire content pane. The html I'm loading includes a markup defined widget that I'd like to have rendered when the new row is loaded. So, I have a table that is being dynamically filled via ajax,ie: <body> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.xd.js" djConfig="parseOnLoad: true, isDebug:true"></script> <div id="table-pane" dojoType="dijit.layout.ContentPane"> <table class="test"> <tbody> <tr><td>Name</td><td>Year</td><td>Age</td></tr> <tr> <td><span dojoType="dijit.InlineEditBox" editor="dijit.form.Textarea">Mike</span> </td> <td>2010</td> <td>12</td> </tr> </tbody> </table> </div> </body> <script> var html ='<tr><td><span dojoType="dijit.InlineEditBox" editor="dijit.form.Textarea">John</span></td><td>2011</td><td>22</td></tr>'; dojo.require("dijit.layout.ContentPane"); dojo.require("dijit.InlineEditBox"); dojo.require("dijit.form.Textarea"); dojo.addOnLoad(function(){ pane = dijit.byId("table-pane"); add_elem(); }); function add_elem(){ var node = $(".test tr:last"); node.after(html); dojo.addOnLoad(function(){ //Here I want to initiate any widgets that haven't been initiated pane.buildRendering(); }); }</script> How do I render the Dojo widget in the new table row?

    Read the article

  • how to update div tag in javascript with data from model for onsubmit form asp.net mvc

    - by michael
    In my page i have a form tag which submits to server ,gets data and redirects to same page. problem is the the div tag which has the data from server is not getting updated. how to do that in javascript <% using (Html.BeginForm("Addfile", "uploadfile", FormMethod.Post, new { id = "uploadform", enctype = "multipart/form-data" })) { %> <input type="file" id="addedFile" name="addedFile" /><br /> <input type="submit" id="addfile" value="Addfile" /> <div id="MyGrid"> //data from the model(server side) filelist is not updating</div> what will be the form onsubmit javascript function to update the div tag with the data from the model. and my uploadfile controller get post methods are as [AcceptVerbs(HttpVerbs.Get)] public ActionResult Upload() { return View(); } [AcceptVerbs(HttpVerbs.Post)] public ActionResult AddFile(HttpPostedFileBase addedFile) { static List<string> fileList = new List<string>(); string filename = Path.GetFileName(addedFile.FileName); file.SaveAs(@"D:\Upload\" + filename); fileList.Add(filename); return("Upload",fileList); } thanks, michaela

    Read the article

  • Mootools 1.2.4 delegation not working in IE8...?

    - by michael
    Hey there everybody-- So I have a listbox next to a form. When the user clicks an option in the select box, I make a request for the related data, returned in a JSON object, which gets put into the form elements. When the form is saved, the request goes thru and the listbox is rebuilt with the updated data. Since it's being rebuilt I'm trying to use delegation on the listbox's parent div for the onchange code. The trouble I'm having is with IE8 (big shock) not firing the delegated event. I have the following HTML: <div id="listwrapper" class="span-10 append-1 last"> <select id="list" name="list" size="20"> <option value="86">Adrian Franklin</option> <option value="16">Adrian McCorvey</option> <option value="196">Virginia Thomas</option> </select> </div> and the following script to go with it: window.addEvent('domready', function() { var jsonreq = new Request.JSON(); $('listwrapper').addEvent('change:relay(select)', function(e) { alert('this doesn't fire in IE8'); e.stop(); var status= $('statuswrapper').empty().addClass('ajax-loading'); jsonreq.options.url = 'de_getformdata.php'; jsonreq.options.method = 'post'; jsonreq.options.data = {'getlist':'<?php echo $getlist ?>','pkey':$('list').value}; jsonreq.onSuccess = function(rObj, rTxt) { status.removeClass('ajax-loading'); for (key in rObj) { status.set('html','You are currently editing '+rObj['cname']); if ($chk($(key))) $(key).value = rObj[key]; } $('lalsoaccomp-yes').set('checked',(($('naccompkey').value > 0)?'true':'false')); $('lalsoaccomp-no').set('checked',(($('naccompkey').value > 0)?'false':'true')); } jsonreq.send(); }); }); (I took out a bit of unrelated stuff). So this all works as expected in firefox, but IE8 refuses to fire the delegated change event on the select element. If I attach the change function directly to the select, then it works just fine. Am I missing something? Does IE8 just not like the :relay? Sidenote: I'm very new to mootools and javascripting, etc, so if there's something that can be improved code-wise, please let me know too.. Thanks!

    Read the article

  • R Question. Numeric variable vs. Non-numeric and "names" function

    - by Michael
    > scores=cbind(UNCA.score, A.score, B.score, U.m.A, U.m.B) > names(scores)=c('UNCA.scores', 'A.scores', 'B.scores','UNCA.minus.A', 'UNCA.minus.B') > names(scores) [1] "UNCA.scores" "A.scores" "B.scores" "UNCA.minus.A" "UNCA.minus.B" > summary(UNCA.scores) X6.69230769230769 Min. : 4.154 1st Qu.: 7.333 Median : 8.308 Mean : 8.451 3rd Qu.: 9.538 Max. :12.000 > is.numeric(UNCA.scores) [1] FALSE > is.numeric(scores[,1]) [1] TRUE My question is, what is the difference between UNCA.scores and scores[,1]? UNCA.scores is the first column in the data.frame 'scores', but they are not the same thing, since one is numeric and the other isn't. If UNCA.scores is just a label here how can I make it be equivalent to 'scores[,1]? Thanks!

    Read the article

  • PHP Strange error "0:". Possible Object syntax problem?

    - by Michael Stone
    I'm trying to transfer a site from one hosting company to another. I was using 000webhost until the client had hosting and a domain. Now that the client has their domain and hosting, using FatCow.com, I can not for the life of me, debug my PHP code. I'm not getting any errors. I have a successful DB connection. If you procedurally display data, it works, but when I try to use my original objects, something is breaking and just returns "0:". I have all errors on. On old server where the site worked: PHP Version 5.2.11 MySQL Version: 5.0.81 On new server where I get the "0:": PHP Version 5.2.12 MySQL Version 5.0.32 I've setup a test page to test just the output of the variables with the DB connection. Below is my code: <?php error_reporting(E_ALL); ini_set('display_errors', '1'); try { $link = mysql_connect('connectionstring', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } else{ $db = mysql_select_db('a8210422_lit'); } if($db){ include_once('admin/classes/clsPOW.php'); include_once('admin/classes/clsProviders.php'); $pow = new POW(); $prov = new Providers(); $new = $pow->getNew(); $newAr = $new->val(); $get = $prov->getAll($newAr['providerId']); $getAr = $get->val(); $img = $getAr['image']; $name = $getAr['provider']; $desc = $getAr['description']; $zip = $getAr['zip']; $web = $getAr['link']; if($zip==0){ $zip = "Unavailable"; } print $img; print $name; print $desc; print $zip; print $web; } else{ print 'fail!'; } } //catch exception catch(Exception $e) { echo 'Message: ' .$e->getMessage(); } ?>

    Read the article

  • Using PHP session_id() to Make Sure iframe is Generated by Our Server Dynamically

    - by Michael Robinson
    We use iframes to show ads on our site. Iframes are used to allow us to keep the ad generation code and other site modules separate. As we track ad views on our site, and need to be able to keep an accurate count of which pagetype gets what views, I must ensure that users can't simply copy-paste the iframe in which the ad is loaded onto another site. This would cause ad count to become inflated for this page, and the count would not match the view count of the page the iframe "should" be displayed in. Before anyone says so: no I can't simply compare the page view count with the ad view count, or use the page view count * number of ads per page, as # of ads per page will not necessarily be static. I need to come up with a solution that will allow ads to be shown only for iframes that are generated dynamically and are shown on our pages. I am not familiar with PHP sessions, but from what little reading I have had time to do, the following seems to be to be an acceptable solution: Add "s = session_id()" to the src of the ad's iframe. In the code that receives and processes ad requests, only return (and count) and ad if s == session_id(). Please correct me if I'm wrong, but this would ensure: Ads would only be returned to iframes whose src was generated alongside the rest of the page's content, as is the case during normal use. We can return our logo to ad calls with an invalid session_id. So a simple example would be: One of our pages: <?php session_start(); ?> <div id="someElement"> <!-- EVERYONE LOVES ADS --> <iframe src="http//awesomesite.com/ad/can_has_ad.php?s=<?php echo session_id(); ?>></iframe> </div> ad/can_has_ad.php: <?php session_start(); ?> if($_GET['s'] == session_id()){ echo 'can has ad'; } else{ echo '<img src="http://awesomesite.com/images/canhaslogo.jpg"/>'; } And finally, copied code with static 's' parameter: <!-- HAHA LULZ I WILL SCREW WITH YOUR AD VIEW COUNTS LULZ HAHA --> <iframe src="http//awesomesite.com/ad/can_has_ad.php?s=77f2b5fcdab52f52607888746969b0ad></iframe> Which would give them an iframe showing our awesome site's logo, and not screw with our view counts. I made some basic test cases: two files, one that generates the iframe and echos it, and one that the iframe's src is pointed to, that checks the 's' parameter and shows an appropriate message depending on the result. I copied the iframe into a file and hosted it on a different server, and the correct message was displayed (cannot has ad). So, my question is: Would this work or am I being a PHP session noob, with the above test being a total fluke? Thanks for your time! Edit: I'm trying to solve this without touching the SQL server

    Read the article

  • How much do politics/office intrigue interfere with your day to day tasks at work?

    - by Michael Dorgan
    I'm currently blessed to be employed at a location where politics are pretty much non-existant and management overhead is nearly nil. As I've only worked at this one location for my entire, lengthy career, I have very little frame of reference outside of an occasional Dilbert comic or offhand comment from others about just how bad office politics and management interference get in the way of getting your code done elsewhere. While I'm not actively looking for a new job, this one point has made me quite reluctant to even look seriously elsewhere. My question is, just how much are politics a way of life in larger companies - in or out of the game industry and how much does it affect your day to day satisfaction?

    Read the article

  • How to fix IllegalStateException error when trying to update a listview?

    - by Michael Vetrano
    Hi guys, I am trying to get this code to run, but I get an IllegalStateException when I run this code saying that the content of the listview wasn't notified, yet I have a notification upon updating the data. This is a custom listview adapter. Here is the relevant part of my code: class LoadingThread extends Thread { public void run() { int itemsOriginallyLoaded = 0; synchronized( items ) { itemsOriginallyLoaded = items.size(); } for( int i = itemsOriginallyLoaded ; i < itemsToLoad ; ++i ) { Log.d( LOG_TAG, "Loading item #"+i ); //String item = "FAIL"; //try { String item = "FAIL"; try { item = stockGrabber.getStockString(dataSource.get(i)); } catch (ApiException e) { Log.e(LOG_TAG, "Problem making API request", e); } catch (ParseException e) { Log.e(LOG_TAG, "Problem parsing API request", e); } //} catch (ApiException e) { // Log.e(TAG, "Problem making API request", e); //} catch (ParseException e) { // Log.e(TAG, "Problem parsing API request", e); //} synchronized( items ) { items.add( item ); } itemsLoaded = i+1; uiHandler.post( updateTask ); Log.d( LOG_TAG, "Published item #"+i ); } if( itemsLoaded >= ( dataSource.size() - 1 ) ) allItemsLoaded = true; synchronized( loading ) { loading = Boolean.FALSE; } } } class UIUpdateTask implements Runnable { public void run() { Log.d( LOG_TAG, "Publishing progress" ); notifyDataSetChanged(); } }

    Read the article

  • PHP code not working on IE

    - by Michael Frey
    I have a website with a flag. If it is clicked, the language of the website changes. Here is the code displaying the flag, which is a form with post event: <?php $pagename = $_SERVER['REQUEST_URI']; echo '<form action="'.$pagename.'" method="post"> <input name="formlanguage" type="image" '; if ($_SESSION['lang'] == 0) { echo 'alt="English" src="images/en.png" value="1" '; } else { echo 'alt="Deutsch" src="images/de.png" value="0" '; } echo '/></form>'; ?> Here is the response to that, and this part always fails on IE: if (isset($_POST['formlanguage'])) { $_SESSION['lang']=$_POST['formlanguage']; } I can not figure out why it works on Chrome but not IE. I assume that it might be a setting of IE. But what could that be?

    Read the article

  • Tcp Socket Closed

    - by Michael Covelli
    I always thought that if you didn't implement a heartbeat, there was no way to know if one side of a TCP connection died unexpectedly. If the process was just killed on one side and didn't exit gracefully, there was no way for the socket to send FIN or let the other side know that it was closed. (See some of the comments here for example http://www.perlmonks.org/?node_id=566568 ) But there is a stock order server that I connect to that has a new "cancel all orders on disconnect feature" that cancels live orders if the client dis-connects. It works even when I kill the process on my end, and there is definitely no heartbeat from my app to it. So how is it able to detect when I've killed the process? My app is running on Windows Server 2003 and the order server is on Suse Linux Enterprise Server 10. Does Windows detect that the process associated with the socket is no longer alive and send the FIN?

    Read the article

  • Javascript JQUERY AJAX: When Are These Implemented

    - by Michael Moreno
    I'm learning javascript. Poked around this excellent site to gather intel. Keep coming across questions / answers about javascript, JQUERY, JQUERY with AJAX, javascript with JQUERY, AJAX alone. My conclusion: these are all individually powerful and useful. My confusion: how does one determine which/which combination to use ? I've concluded that javascript is readily available on most browsers. For example, I can extend a simple HTML page with <html> <body> <script type="text/javascript"> document.write("Hello World!"); </script> </body> </html> However, within the scope of Python/DJANGO, many of these questions are JQUERY and AJAX related. At which point or under what development circumstances would I conclude that javascript alone isn't going to "cut it", and I need to implement JQUERY and/or AJAX and/or some other permutation ?

    Read the article

  • programmatically creating property list from json to include an array

    - by Michael Robinson
    [{"memberid":"18", "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School", },] Someone else posted a similar question but without the fact that it was coming from a JSON deserialization. Quinn had some suggestions but it was confused about where to place/replace the following code (if it's correct): NSDictionary *item1 = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@" member",[NSNumber numberWithInt:3],nil] forKeys:[NSArray arrayWithObjects:@"Title",@"View",nil]]; into this: NSData *jsonData = [jsonreturn dataUsingEncoding:NSUTF32BigEndianStringEncoding]; NSError *error = nil; NSDictionary * dict = [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error]; if (dict) { rowsArray = [dict objectForKey:@"member"]; [rowsArray retain]; } My Array.plist needs to look like the following: Root: Dictionary V Rows: Array V Item 0: Dictionary Title: String 18 V Children Array V Item 0 Dictionary Title String 30 etc. Thanks in advance. Every tutorial on JSON only shows a simple array being returned, never a 2-D..It's driving me crazy trying to figure this out.

    Read the article

  • I cannot get the value of a table view cell in cocoa

    - by Michael Amici
    I am trying to get the value of a cell in a table view but it won't let me. If someone could help that would be great. int numberOfChecks = -1; numberOfChecks = numberOfChecks +1; if ([objectsForTable count]-1 >= numberOfChecks) { UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:numberOfChecks]; NSString *cellTitle = cell.textLabel.text; }

    Read the article

  • Perl : how to interrupt/resume loop by user hitting a key?

    - by Michael Mao
    Hi all: This is for debugging purpose. I've got a for loop that generates some output to Cygwin bash's CLI. I know that I can redirect outputs to text files and use Perl or even just a normal text editor to inspect the values printed out for a particular iteration, just feel that a bit painful. What I am now thinking is, to place a special subroutine inside the for loop, so that it would be "interrupted" at the beginning of each iteration, and Perl script should only resume to run after user/programmer hits a key(the Enter Key from keyboard?) In this way I can directly inspect the values printed out during each iteration. Is there a simple way to do this, without using additional libraries/CPAN ? Many thanks to the hints/suggestions in advance.

    Read the article

  • How to check for local Wi-Fi (not just cellular connection) using iPhone SDK?

    - by Michael
    I'm currently using the following to check whether Wi-Fi is available for my application: #import <SystemConfiguration/SystemConfiguration.h> static inline BOOL addressReachable(const struct sockaddr_in *hostAddress); BOOL localWiFiAvailable() { struct sockaddr_in localWifiAddress; bzero(&localWifiAddress, sizeof(localWifiAddress)); localWifiAddress.sin_len = sizeof(localWifiAddress); localWifiAddress.sin_family = AF_INET; // IN_LINKLOCALNETNUM is defined in <netinet/in.h> as 169.254.0.0 localWifiAddress.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); return addressReachable(&localWifiAddress); } static inline BOOL addressReachable(const struct sockaddr_in *hostAddress) { const SCNetworkReachabilityRef target = SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, (const struct sockaddr *)hostAddress); if (target != NULL) { SCNetworkReachabilityFlags flags = 0; const BOOL reachable = SCNetworkReachabilityGetFlags(target, &flags); CFRelease(target); return reachable && (flags & kSCNetworkFlagsReachable); } return NO; } This, however, does not return NO as it should when the iPhone is connected only to a cellular network but not a Wi-Fi network. Does anyone know how to fix this? Edit So this is what I ended up using: #import <arpa/inet.h> // For AF_INET, etc. #import <ifaddrs.h> // For getifaddrs() #import <net/if.h> // For IFF_LOOPBACK BOOL localWiFiAvailable() { struct ifaddrs *addresses; struct ifaddrs *cursor; BOOL wiFiAvailable = NO; if (getifaddrs(&addresses) != 0) return NO; cursor = addresses; while (cursor != NULL) { if (cursor -> ifa_addr -> sa_family == AF_INET && !(cursor -> ifa_flags & IFF_LOOPBACK)) // Ignore the loopback address { // Check for WiFi adapter if (strcmp(cursor -> ifa_name, "en0") == 0) { wiFiAvailable = YES; break; } } cursor = cursor -> ifa_next; } freeifaddrs(addresses); return wiFiAvailable; } Thanks "unforgiven" (and Matt Brown apparently).

    Read the article

  • Using javascript on an HTML table?

    - by Michael McKay
    Hi, few questions, just wondering if anyone can help? I have a table with 1 long row (1000 pixels) and one single column, how do i go about creating a method whereby when the mouse cursor is on the leftmost side of the cell, a variable, lets say X is set to 0, the further right the mouse cursor moves in the cell, the value of X increases. I know that sounds like a strange question but im working on a project where this type of functionality is desired. Is there a javascript method to create this feature? Thanks for any help.

    Read the article

  • How to manage transaction for database and file system in jee environment?

    - by Michael Lu
    I store file’s attributes (size, update time…) in database. So the problem is how to manage transaction for database and file. In jee environment, JTA is just able to manage database transaction. In case, updating database is successful but file operation fails, should I write file-rollback method for this? Moreover, file operation in EJB container violates EJB spec. What’s your opinion? Thank!

    Read the article

  • Linq In Clause & Predicate building

    - by Michael G
    I have two tables. Report and ReportData. ReportData has a constraint ReportID. How can I write my linq query to return all Report objects where the predicate conditions are met for ReportData? Something like this in SQL: SELECT * FROM Report as r Where r.ServiceID = 3 and r.ReportID IN (Select ReportID FROM ReportData WHERE JobID LIKE 'Something%') This is how I'm building my predicate: Expression<Func<ReportData, bool>> predicate = PredicateBuilder.True<ReportData>(); predicate = predicate.And(x => x.JobID.StartsWith(QueryConfig.Instance.DataStreamName)); var q = engine.GetReports(predicate, reportsDataContext); reports = q.ToList(); This is my query construction at the moment: public override IQueryable<Report> GetReports(Expression<Func<ReportData, bool>> predicate, LLReportsDataContext reportDC) { if (reportDC == null) throw new ArgumentNullException("reportDC"); var q = reportDC.ReportDatas.Where(predicate).Where(r => r.ServiceID.Equals(1)).Select(r => r.Report); return q; }

    Read the article

  • Problems with my HTML/CSS

    - by Michael
    Note below is my CSS. This is a three column website. my main content is in the center. The problems that I am having is that my main content does not adjust correctly to IE. It is fine in FF but not in IE. .columns3headers2 #mainContent1 { margin: 0 22% 0 24%; width: 570px; background-color: #DDDDDD; height: 370px; padding: 0, 10, 0, 0; border: groove } .columns3headers2 #mainContent2 { margin: 0 22% 0 24%; width: 570px; background-color: #DDDDDD; height: 190px; border: groove } I do not have much in my main content. <div id="mainContent1"> <h1> Main Content </h1> <div id="cround"> <h3>Absolute Value</h3> <ul> <li>Test 1</li> <li>Test 2</li> <li>Test 3</li> <li>test 4</li> </ul> </p> </div>

    Read the article

  • Should I add try/catch around when casting on an attribute of JSP implicit object?

    - by Michael Mao
    Hi all: Basically what I mean is like this: List<String[]> routes = (List<String[]>)application.getAttribute("routes"); For the above code, it tries to get an attribute named "routes" from the JSP implicit object - application. But as everyone knows, after this line of code, routes may very well contains a null - which means this application hasn't got an attribute named "routes". Is this "casting on null" good programming practice in Java or not? Basically I try to avoid exceptions such as java.io.InvalidCastException I reckon things like this are more as "heritage" of Java 1.4 when generic types were not introduced to this language. So I guess everything stored in application attributes as Objects (Similar to traditional ArrayList). And when you do "downcast", there might be invalid casts. What would you do in this case? Update: Just found that although in the implicit object application I did store a List of String arrays, when I do this : List<double[]> routes = (List<double[]>)application.getAttribute("routes"); It doesn't produce any error... And I felt not comfortable already... And even with this code: out.print(routes.get(0)); It does print out something strange : [Ljava.lang.String;@18b352f Am I printing a "pointer to String"? I can finally get an exception like this: out.print(routes.get(0)[1]); with error : java.lang.ClassCastException: [Ljava.lang.String; Because it was me to add the application attribute, I know which type should it be cast to. I feel this is not "good enough", what if I forget the exact type? I know there are still some cases where this sort of thing would happen, such as in JSP/Servlet when you do casting on session attributes. Is there a better way to do this? Before you say:"OMG, why you don't use Servlets???", I should justify my reason as this: - because my uni sucks, its server can only work with Servlets generated by JSP, and I don't really want to learn how to fix issues like that. look at my previous question on this , and this is uni homework, so I've got no other choice, forget all about war, WEB-INF,etc, but "code everything directly into JSP" - because the professors do that too. :)

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >