Search Results

Search found 76098 results on 3044 pages for 'http gdata youtube com'.

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

  • Converting audio files(.3gp) to video with Album cover and uploading to YouTube

    - by Samuh
    I have an audio file in .3gp format on my Android device which I wish to upload to YouTube. I know that YouTube is a video upload site and that I need to convert this sound file to video. I just want an image to display all the time the audio is playing. Google tells me there are number of tools that can help me. But I want to do this via java code from my Android device. Please help. Thanks.

    Read the article

  • .co.uk targeted for google.co.uk .com targeted for google.com

    - by Higgs Boson
    We've had a website running on a .co.uk domain for some years, this domain is listed in the SERPS for our brand on both google.co.uk and google.com. We get little traffic from anywhere other than the UK because the website is targeted at the UK market with specific UK keywords. This is great, however we recently purchased the .com domain with the intention of producing a second version of the website targeted to the United States with US specific keywords i.e. targeting and moving in to the US marketplace. We have used Google webmaster tools to set the geographic target for the .com domain to be the US. I think I was expecting ONLY the .com site to show up when searching google.com and only the .co.uk site to show up when searching google.co.uk. However when we search google.com for our 'brand' the .co.uk site is listed in the SERPS. We would prefer the .com to appear in the SERPS on google.com. Is there anything we can do?

    Read the article

  • URL rewrite from www.domain.com/sudirectory to http://domain.com/subdirectory

    - by chrizzbee
    I need a solution for the following problem: I use a CMS and want the backend only be available at http://domain.com/backend and not at http://www.domain.com/backend. How do I have to change my .htaccess file to achieve this? I already have a rewrite rule from HTTP (non-www) to www. Here's what I currently have in my .htaccess file: ## # Uncomment the following lines to add "www." to the domain: # RewriteCond %{HTTP_HOST} ^shaba-baden\.ch$ [NC] RewriteRule (.*) http://www.shaba-baden.ch/$1 [R=301,L] # # Uncomment the following lines to remove "www." from the domain: # # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] # RewriteRule (.*) http://example.com/$1 [R=301,L] # # Make sure to replace "example.com" with your domain name. ## So, the first bit is the redirect from HTTP to www. It works on the domain part of the URL. As explained, I need a rewrite rule from the backend login at http://www.shaba-baden.ch/contao to http://shaba-baden.ch/contao

    Read the article

  • How to display/add play button on youtube image?

    - by Zakir Sajib
    I have embedded the youtube image from youtube server which is "http://img.youtube.com/vi/0.jpg", now there is no play button shows up on middle of the image as we see usually any youtube videos! I tried to use the following code to get an image on top of the youtube image but it shows bigger picture, i know why <a class="fancybox" href="#video"> <img src="/wp-content/themes/mytheme/images/play_button.png" no-repeat width: 0px height:0px; style="background: url(http://img.youtube.com/vi/<?php echo $youtubeid ; ?>/0.jpg) transparent" width="180" height="150"/> <div id ="video"> // here is my embedded youtube usual code </div> both images shown in 180 x 150 size, but thats not what i want. I want youtube image will be shown in 180 x 150 size and play button image (play_button.png) will be display in middle of the youtube image in small size. Any clue in css or coding in php will be great favour.

    Read the article

  • IIS 7&rsquo;s Sneaky Secret to Get COM-InterOp to Run

    - by David Hoerster
    Originally posted on: http://geekswithblogs.net/DavidHoerster/archive/2013/06/17/iis-7rsquos-sneaky-secret-to-get-com-interop-to-run.aspxIf you’re like me, you don’t really do a lot with COM components these days.  For me, I’ve been ‘lucky’ to stay in the managed world for the past 6 or 7 years. Until last week. I’m running a project to upgrade a web interface to an older COM-based application.  The old web interface is all classic ASP and lots of tables, in-line styles and a bunch of other late 90’s and early 2000’s goodies.  So in addition to updating the UI to be more modern looking and responsive, I decided to give the server side an update, too.  So I built some COM-InterOp DLL’s (easily through VS2012’s Add Reference feature…nothing new here) and built a test console line app to make sure the COM DLL’s were actually built according to the COM spec.  There’s a document management system that I’m thinking of whose COM DLLs were not proper COM DLLs and crashed and burned every time .NET tried to call them through a COM-InterOp layer. Anyway, my test app worked like a champ and I felt confident that I could build a nice façade around the COM DLL’s and wrap some functionality internally and only expose to my users/clients what they really needed. So I did this, built some tests and also built a test web app to make sure everything worked great.  It did.  It ran fine in IIS Express via Visual Studio 2012, and the timings were very close to the pure Classic ASP calls, so there wasn’t much overhead involved going through the COM-InterOp layer. You know where this is going, don’t you? So I deployed my test app to a DEV server running IIS 7.5.  When I went to my first test page that called the COM-InterOp layer, I got this pretty message: Retrieving the COM class factory for component with CLSID {81C08CAE-1453-11D4-BEBC-00500457076D} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). It worked as a console app and while running under IIS Express, so it must be permissions, right?  I gave every account I could think of all sorts of COM+ rights and nothing, nada, zilch! Then I came across this question on Experts Exchange, and at the bottom of the page, someone mentioned that the app pool should be running to allow 32-bit apps to run.  Oh yeah, my machine is 64-bit; these COM DLL’s I’m using are old and are definitely 32-bit.  I didn’t check for that and didn’t even think about that.  But I went ahead and looked at the app pool that my web site was running under and what did I see?  Yep, select your app pool in IIS 7.x, click on Advanced Settings and check for “Enable 32-bit Applications”. I went ahead and set it to True and my test application suddenly worked. Hope this helps somebody out there from pulling out your hair.

    Read the article

  • Split a long JSON string into lines in Ruby

    - by David J.
    First, the background: I'm writing a Ruby app that uses SendGrid to send mass emails. SendGrid uses a custom email header (in JSON format) to set recipients, values to substitute, etc. SendGrid's documentation recommends splitting up the header so that the lines are shorter than 1,000 bytes. My question, then, is this: given a long JSON string, how can I split it into lines < 1,000 so that lines are split at appropriate places (i.e., after a comma) rather than in the middle of a word? This is probably unnecessary, but here's an example of the sort of string I'd like to split: X-SMTPAPI: {"sub": {"pet": ["dog", "cat"]}, "to": ["test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com", "test@gmail.com", "anothertest@gmail.com"]} Thanks in advance for any help you can provide!

    Read the article

  • Uploading on Youtube via HTTP Post

    - by sajid.nizami
    I am following the steps provided on this link [http://code.google.com/apis/youtube/2.0/developers_guide_dotnet.html#Browser_based_Upload][1] Whenever I try to upload anything using this method, I get a HTTP 400 error saying that the next_url is not provided. Code is pretty simple and is a copy of Google's own code. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="BrowserUpload.aspx.cs" Inherits="BrowserUpload" %> <%@ Import Namespace="Google.YouTube" %> <%@ Import Namespace="Google.GData.Extensions.MediaRss" %> <%@ Import Namespace="Google.GData" %> <%@ Import Namespace="Google.GData.YouTube" %> <%@ Import Namespace="Google.GData.Client" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript"> function checkForFile() { if (document.getElementById('file').value) { return true; } document.getElementById('errMsg').style.display = ''; return false; } </script> </head> <body> <% YouTubeRequestSettings settings = new YouTubeRequestSettings("Danat", "API-KEY", "loginid", "password" ); YouTubeRequest request = new YouTubeRequest(settings); Video newVideo = new Video(); newVideo.Title = "My Test Movie"; newVideo.Tags.Add(new MediaCategory("Autos", YouTubeNameTable.CategorySchema)); newVideo.Keywords = "cars, funny"; newVideo.Description = "My description"; newVideo.YouTubeEntry.Private = false; newVideo.Tags.Add(new MediaCategory("mydevtag, anotherdevtag", YouTubeNameTable.DeveloperTagSchema)); FormUploadToken token = request.CreateFormUploadToken(newVideo); %> <form action="<%= token.Url %>?next_url=<%= Server.UrlEncode("http://www.danatev.com") %>" name="PostToYoutube" method="post" enctype="multipart/form-data" onsubmit="return checkForFile();" > <input id="file" type="file" name="file" /> <div id="errMsg" style="display: none; color: red"> You need to specify a file. </div> <input type="hidden" name="token" value="<%= token.Token %>" /> <input type="submit" value="go" /> </form>

    Read the article

  • NFS (with Kerberos) mount failing due to "Server not found in Kerberos database" error

    - by Kendall Hopkins
    When running: `sudo mount -t nfs4 -o sec=krb5 sol.domain.com:/ /mnt` I get this error on the client: mount.nfs4: access denied by server while mounting sol.domain.com:/ And on the server syslogs UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for nfs/ip-#-#-#-#[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for nfs/ip-#-#-#-#[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database UNKNOWN_SERVER: authtime 0, nfs/[email protected].COM for krbtgt/[email protected].COM, Server not found in Kerberos database Server keytab file: ubuntu@sol:~$ sudo klist -e -k /etc/krb5.keytab Keytab name: WRFILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 7 host/[email protected].COM (aes256-cts-hmac-sha1-96) 7 host/[email protected].COM (arcfour-hmac) 7 host/[email protected].COM (des3-cbc-sha1) 7 host/[email protected].COM (des-cbc-crc) 9 nfs/[email protected].COM (aes256-cts-hmac-sha1-96) 9 nfs/[email protected].COM (arcfour-hmac) 9 nfs/[email protected].COM (des3-cbc-sha1) 9 nfs/[email protected].COM (des-cbc-crc) Client keytab file: ubuntu@mercury:~$ sudo klist -e -k /etc/krb5.keytab Keytab name: WRFILE:/etc/krb5.keytab KVNO Principal ---- -------------------------------------------------------------------------- 3 host/[email protected].COM (aes256-cts-hmac-sha1-96) 3 host/[email protected].COM (arcfour-hmac) 3 host/[email protected].COM (des3-cbc-sha1) 3 host/[email protected].COM (des-cbc-crc) 3 nfs/[email protected].COM (aes256-cts-hmac-sha1-96) 3 nfs/[email protected].COM (arcfour-hmac) 3 nfs/[email protected].COM (des3-cbc-sha1) 3 nfs/[email protected].COM (des-cbc-crc)

    Read the article

  • Google I/O 2012 - HTML5 at YouTube: Stories from the Mobile Front

    Google I/O 2012 - HTML5 at YouTube: Stories from the Mobile Front Greg Schechter, Zoltan Szego Is HTML5 ready for production code? Of course it is. This is a look into all the different HTML5 technologies we use in live code at YouTube. We'll have a collection of tips, tricks, and best practices for HTML5 video, the track tag, getUserMedia, and more. Plus a deep dive into Mobile Video Tag development. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 329 10 ratings Time: 54:10 More in Science & Technology

    Read the article

  • Contact YouTube

    - by takeshin
    Is there any direct way do contact a „real” person, an YouTube employer? Someone created an account for the company I work for (previous employer). She entered some password and e-mail. The provided e-mail was valid, but since last login (more than two years), we changed our domain, and this e-mail is probably not valid anymore (and we even don't know it), co we can't use option to reset password. I have used all the options in YouTube help center, and no one worked. Also we can't contact this previous employer to get any data she entered in the registration form. The only data I know is the username. All the movies present the products of our company, there are links to our site in movie descriptions, so there should be no problem to prove that the account is ours. This is an urgent case, becouse the movies contain outdated information.

    Read the article

  • Google I/O 2012 - Getting Direct Feedback from your YouTube Community

    Google I/O 2012 - Getting Direct Feedback from your YouTube Community Eric Lundberg, Jeffrey Posnick Do you want to hear from (and see!) your site's community? We will be sharing a new way to solicit videos from your users. Come and learn about how it was developed and see an example of it put to use as part of the YouTube Direct open source video submission platform. For all I/O 2012 sessions, go to developers.google.com From: GoogleDevelopers Views: 0 0 ratings Time: 40:44 More in Science & Technology

    Read the article

  • php request youtube video is not working [closed]

    - by m3tsys
    what is wrong to this code? header('Content-type: application/x-shockwave-flash'); $video_id = $_REQUEST['id']; $content = readfile("http://www.youtube.com/watch?v=$video_id"); echo $content; or header('Content-type: application/x-shockwave-flash'); $video_id = $_REQUEST['id']; $content = readfile("http://localhost/embed/player.swf?file=http://www.youtube.com/watch?v=$video_id"); echo $content; Why this code is not working? How should look the code?

    Read the article

  • Do all web caches understand the "Cache-Control" HTTP header?

    - by chris_l
    I'd like to avoid the "Expires" header, and use "Cache-Control" only - or maybe the other way around. The headers will account for a significant percentage of my traffic, so I'd prefer not to "use both". AFAIK, the "Cache-Control" header was standardized in HTTP 1.1, but are there still web caches/proxies in use, which don't understand it? Note: This could help answering a part of my stackoverflow (bounty) question

    Read the article

  • Telling between a "natural" HTTP 404 and a PHP Generated one

    - by JCOC611
    So I have a file that should never be accessed by a user directly, but included in another PHP file. If the file is called directly, it generates a HTTP Status 404 Not Found to trick a possible attacker that such file doesn't exist. However, if the hacker could tell that the 404 was generated by PHP or is not "natural" then the whole point of the header would be lost. So is it possible to tell whether the 404 was generated by the server naturally (because the file really doesn't exist) or by a PHP code? PS: I know this question might seem pretty weird lol

    Read the article

  • The dynamic Type in C# Simplifies COM Member Access from Visual FoxPro

    - by Rick Strahl
    I’ve written quite a bit about Visual FoxPro interoperating with .NET in the past both for ASP.NET interacting with Visual FoxPro COM objects as well as Visual FoxPro calling into .NET code via COM Interop. COM Interop with Visual FoxPro has a number of problems but one of them at least got a lot easier with the introduction of dynamic type support in .NET. One of the biggest problems with COM interop has been that it’s been really difficult to pass dynamic objects from FoxPro to .NET and get them properly typed. The only way that any strong typing can occur in .NET for FoxPro components is via COM type library exports of Visual FoxPro components. Due to limitations in Visual FoxPro’s type library support as well as the dynamic nature of the Visual FoxPro language where few things are or can be described in the form of a COM type library, a lot of useful interaction between FoxPro and .NET required the use of messy Reflection code in .NET. Reflection is .NET’s base interface to runtime type discovery and dynamic execution of code without requiring strong typing. In FoxPro terms it’s similar to EVALUATE() functionality albeit with a much more complex API and corresponiding syntax. The Reflection APIs are fairly powerful, but they are rather awkward to use and require a lot of code. Even with the creation of wrapper utility classes for common EVAL() style Reflection functionality dynamically access COM objects passed to .NET often is pretty tedious and ugly. Let’s look at a simple example. In the following code I use some FoxPro code to dynamically create an object in code and then pass this object to .NET. An alternative to this might also be to create a new object on the fly by using SCATTER NAME on a database record. How the object is created is inconsequential, other than the fact that it’s not defined as a COM object – it’s a pure FoxPro object that is passed to .NET. Here’s the code: *** Create .NET COM InstanceloNet = CREATEOBJECT('DotNetCom.DotNetComPublisher') *** Create a Customer Object Instance (factory method) loCustomer = GetCustomer() loCustomer.Name = "Rick Strahl" loCustomer.Company = "West Wind Technologies" loCustomer.creditLimit = 9999999999.99 loCustomer.Address.StreetAddress = "32 Kaiea Place" loCustomer.Address.Phone = "808 579-8342" loCustomer.Address.Email = "[email protected]" *** Pass Fox Object and echo back values ? loNet.PassRecordObject(loObject) RETURN FUNCTION GetCustomer LOCAL loCustomer, loAddress loCustomer = CREATEOBJECT("EMPTY") ADDPROPERTY(loCustomer,"Name","") ADDPROPERTY(loCustomer,"Company","") ADDPROPERTY(loCUstomer,"CreditLimit",0.00) ADDPROPERTY(loCustomer,"Entered",DATETIME()) loAddress = CREATEOBJECT("Empty") ADDPROPERTY(loAddress,"StreetAddress","") ADDPROPERTY(loAddress,"Phone","") ADDPROPERTY(loAddress,"Email","") ADDPROPERTY(loCustomer,"Address",loAddress) RETURN loCustomer ENDFUNC Now prior to .NET 4.0 you’d have to access this object passed to .NET via Reflection and the method code to do this would looks something like this in the .NET component: public string PassRecordObject(object FoxObject) { // *** using raw Reflection string Company = (string) FoxObject.GetType().InvokeMember( "Company", BindingFlags.GetProperty,null, FoxObject,null); // using the easier ComUtils wrappers string Name = (string) ComUtils.GetProperty(FoxObject,"Name"); // Getting Address object – then getting child properties object Address = ComUtils.GetProperty(FoxObject,"Address");    string Street = (string) ComUtils.GetProperty(FoxObject,"StreetAddress"); // using ComUtils 'Ex' functions you can use . Syntax     string StreetAddress = (string) ComUtils.GetPropertyEx(FoxObject,"AddressStreetAddress"); return Name + Environment.NewLine + Company + Environment.NewLine + StreetAddress + Environment.NewLine + " FOX"; } Note that the FoxObject is passed in as type object which has no specific type. Since the object doesn’t exist in .NET as a type signature the object is passed without any specific type information as plain non-descript object. To retrieve a property the Reflection APIs like Type.InvokeMember or Type.GetProperty().GetValue() etc. need to be used. I made this code a little simpler by using the Reflection Wrappers I mentioned earlier but even with those ComUtils calls the code is pretty ugly requiring passing the objects for each call and casting each element. Using .NET 4.0 Dynamic Typing makes this Code a lot cleaner Enter .NET 4.0 and the dynamic type. Replacing the input parameter to the .NET method from type object to dynamic makes the code to access the FoxPro component inside of .NET much more natural: public string PassRecordObjectDynamic(dynamic FoxObject) { // *** using raw Reflection string Company = FoxObject.Company; // *** using the easier ComUtils class string Name = FoxObject.Name; // *** using ComUtils 'ex' functions to use . Syntax string Address = FoxObject.Address.StreetAddress; return Name + Environment.NewLine + Company + Environment.NewLine + Address + Environment.NewLine + " FOX"; } As you can see the parameter is of type dynamic which as the name implies performs Reflection lookups and evaluation on the fly so all the Reflection code in the last example goes away. The code can use regular object ‘.’ syntax to reference each of the members of the object. You can access properties and call methods this way using natural object language. Also note that all the type casts that were required in the Reflection code go away – dynamic types like var can infer the type to cast to based on the target assignment. As long as the type can be inferred by the compiler at compile time (ie. the left side of the expression is strongly typed) no explicit casts are required. Note that although you get to use plain object syntax in the code above you don’t get Intellisense in Visual Studio because the type is dynamic and thus has no hard type definition in .NET . The above example calls a .NET Component from VFP, but it also works the other way around. Another frequent scenario is an .NET code calling into a FoxPro COM object that returns a dynamic result. Assume you have a FoxPro COM object returns a FoxPro Cursor Record as an object: DEFINE CLASS FoxData AS SESSION OlePublic cAppStartPath = "" FUNCTION INIT THIS.cAppStartPath = ADDBS( JustPath(Application.ServerName) ) SET PATH TO ( THIS.cAppStartpath ) ENDFUNC FUNCTION GetRecord(lnPk) LOCAL loCustomer SELECT * FROM tt_Cust WHERE pk = lnPk ; INTO CURSOR TCustomer IF _TALLY < 1 RETURN NULL ENDIF SCATTER NAME loCustomer MEMO RETURN loCustomer ENDFUNC ENDDEFINE If you call this from a .NET application you can now retrieve this data via COM Interop and cast the result as dynamic to simplify the data access of the dynamic FoxPro type that was created on the fly: int pk = 0; int.TryParse(Request.QueryString["id"],out pk); // Create Fox COM Object with Com Callable Wrapper FoxData foxData = new FoxData(); dynamic foxRecord = foxData.GetRecord(pk); string company = foxRecord.Company; DateTime entered = foxRecord.Entered; This code looks simple and natural as it should be – heck you could write code like this in days long gone by in scripting languages like ASP classic for example. Compared to the Reflection code that previously was necessary to run similar code this is much easier to write, understand and maintain. For COM interop and Visual FoxPro operation dynamic type support in .NET 4.0 is a huge improvement and certainly makes it much easier to deal with FoxPro code that calls into .NET. Regardless of whether you’re using COM for calling Visual FoxPro objects from .NET (ASP.NET calling a COM component and getting a dynamic result returned) or whether FoxPro code is calling into a .NET COM component from a FoxPro desktop application. At one point or another FoxPro likely ends up passing complex dynamic data to .NET and for this the dynamic typing makes coding much cleaner and more readable without having to create custom Reflection wrappers. As a bonus the dynamic runtime that underlies the dynamic type is fairly efficient in terms of making Reflection calls especially if members are repeatedly accessed. © Rick Strahl, West Wind Technologies, 2005-2010Posted in COM  FoxPro  .NET  CSharp  

    Read the article

  • Problems with GData Request Token

    - by Dan Delgado
    We have successfully used GData libraries to access a user's Google Docs. But we encountered problems when many users log in to our site and authorize our web app at the same time or successively. Here's what happens: First user successful logs in, authorizes our web app via OAuth and is able to add rubric (or google spreadsheet). Second user, immediately after first user adds a rubric, successfully logs in then webapp fails on authorize (Token not given. I tried to log it.) Third user fails on login. Fourth user was able to log in, authorize via OAuth, and create rubrics successfully. Fifth user was able to log in but like the second user, gets an invalid token on authorize (Token not given.) And the list goes on. Results were unpredicatable. Below is an excerpt of the stack trace we get when the fail scenario happens: Nested in org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException: java.lang.NullPointerException at com.google.gdata.client.authn.oauth.OAuthUtil.normalizeParameters(OAuthUtil.java:158) at com.google.gdata.client.authn.oauth.OAuthUtil.getSignatureBaseString(OAuthUtil.java:81) at com.google.gdata.client.authn.oauth.OAuthHelper.addCommonRequestParameters(OAuthHelper.java:649) at com.google.gdata.client.authn.oauth.OAuthHelper.getOAuthUrl(OAuthHelper.java:592) at com.google.gdata.client.authn.oauth.OAuthHelper.getUnauthorizedRequestToken(OAuthHelper.java:276) at com.projectrix.controller.OAuthController.authorize(OAuthController.java:59) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Method.java:40) Help!

    Read the article

  • Nginx ignoring client's HTTP 1.0 request and respond by HTTP 1.1

    - by Yoga
    I am testing using nginx/php5-fpm, with the code <?php header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found"); // also tested: header("Status: 404 Not Found"); echo $_SERVER["SERVER_PROTOCOL"]; And force to use HTTP 1.0 with the curl command. curl -0 -v 'http://www.example.com/test.php' > GET /test.php HTTP/1.0 < HTTP/1.1 404 Not Found < Server: nginx < Date: Sat, 27 Oct 2012 08:51:27 GMT < Content-Type: text/html < Connection: close < * Closing connection #0 HTTP/1.0 As you can see I am already requesting using HTTP 1.0, but nginx reply me with HTTP 1.1

    Read the article

  • C#: Downloading video from YouTube

    - by Maxim Z.
    Hi! I wish to download a video from YouTube and then extract its audio. Can anyone point me to some C# code to download a video? Thanks! UPDATE: For clarification purposes, I already know how to extract audio from a .FLV file like these. Thanks!

    Read the article

  • Uploading video to youtube through the API, and show progress bar

    - by Hagai
    HI, does anybody know if there's any option to show a real progress bar in my web site, when uploading a video to youtube using their API? I believe that in order to do so , I would need to have the option to make ajax calls during the upload to get the state of the upload. am I right? and if I am, do you know if that's possible and how?

    Read the article

  • Google.com always forward me to google.com.hk

    - by Ta Coen
    Any one could help me to figure out why Google.com always forward me to google.com.hk? $ dig google.com www.google.com. 509426 IN CNAME www.l.google.com. www.l.google.com. 100 IN A 74.125.71.147 www.l.google.com. 100 IN A 74.125.71.99 www.l.google.com. 100 IN A 74.125.71.105 www.l.google.com. 100 IN A 74.125.71.106 www.l.google.com. 100 IN A 74.125.71.104 www.l.google.com. 100 IN A 74.125.71.103 and $ dig google.com.hk www.google.com.hk. 261572 IN CNAME www.google.com. www.google.com. 589217 IN CNAME www.l.google.com. www.l.google.com. 139 IN A 74.125.235.17 www.l.google.com. 139 IN A 74.125.235.18 www.l.google.com. 139 IN A 74.125.235.19 www.l.google.com. 139 IN A 74.125.235.20 www.l.google.com. 139 IN A 74.125.235.16 How to make my network always goes to google.com?

    Read the article

  • domain2.com redirects to domain1.com in Apache

    - by Dmitry Mikhaylov
    I created new virtual host, but when I try to request it, Apache redirects me to another virtual host. What could cause this problem? <VirtualHost XXX.XXX.XXX.XXX:80 > ServerName domain1.com AddDefaultCharset utf-8 CustomLog /var/www/httpd-logs/domain1.com.access.log combined DocumentRoot /home/user/www/domain1.com ErrorLog /var/www/httpd-logs/domain1.com.error.log ServerAdmin admin@myemail.com ServerAlias www.domain1.com SuexecUserGroup user user AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps php_admin_value open_basedir "/home/user:." php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f admin@myemail.com" php_admin_value upload_tmp_dir "/home/user/mod-tmp" php_admin_value session.save_path "/home/user/mod-tmp" ScriptAlias /cgi-bin/ /home/user/www/domain1.com/cgi-bin/ </VirtualHost> <VirtualHost XXX.XXX.XXX.XXX:80 > ServerName domain2.com CustomLog /dev/null combined DocumentRoot /home/user/www/domain2.com ErrorLog /dev/null ServerAdmin admin@myemail.com ServerAlias www.domain2.com SuexecUserGroup user user AddType application/x-httpd-php .php .php3 .php4 .php5 .phtml AddType application/x-httpd-php-source .phps php_admin_value open_basedir "/home/user:." php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f admin@myemail.com" php_admin_value upload_tmp_dir "/home/user/mod-tmp" php_admin_value session.save_path "/home/user/mod-tmp" </VirtualHost> "apache2ctl -S" output: VirtualHost configuration: XXX.XXX.XXX.XXX:80 is a NameVirtualHost default server domain1.com (/etc/apache2/apache2.conf:266) port 80 namevhost domain1.com (/etc/apache2/apache2.conf:266) port 80 namevhost domain2.com (/etc/apache2/apache2.conf:284) XXX.XXX.XXX.XXX:443 is a NameVirtualHost default server domain1.com (/etc/apache2/apache2.conf:246) port 443 namevhost domain1.com (/etc/apache2/apache2.conf:246) wildcard NameVirtualHosts and _default_ servers: *:443 is a NameVirtualHost default server www.example.com (/etc/apache2/apache2.conf:239) port 443 namevhost www.example.com (/etc/apache2/apache2.conf:239) *:80 is a NameVirtualHost default server domain1.com (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost domain1.com (/etc/apache2/sites-enabled/000-default:1)

    Read the article

  • Should I Return "500" or "404" if a Requested Image is not Found?

    - by Michael Robinson
    I work with code written by other people, occasionally I am left somewhat confused and at these times Stack Overflow saves me. Please, save me again. Our site allows people to upload images and later embed them within text in our site like so: <img src="http://site.com/image_script.php?p=some_image_identifier"/> My question is: If the identifier, "p", does not lead us to an image should the server return "500" or "404"? I would have thought it should be "404", but that's not what is happening right now.

    Read the article

  • New Agile PLM Customer Testimonial Videos on YouTube

    - by Kerrie Foy
    Have you visited the Oracle Agile PLM channel on YouTube recently? There are many new video testimonials, and even an overview of how Oracle Agile PLM helps companies drive powerful corporate performance by maximizing product profitability. Here are a few highlights... Oracle Agile PLM: Proven Results Watch an overview of the transformative success our customers have realized using Oracle Agile PLM applications to take their company to the next level. Alcatel-Lucent Ups Competitive Edge with Oracle Agile PLM and Oracle EBS Brad Magnani of Alcatel-Lucent Enterprise describes how the Oracle Agile PLM and Oracle EBS solutions help speed time to market, eliminate wasted cash, secure data, and ensure product quality, enabling innovation and success. Herbalife: an Oracle Agile PLM Customer Video Filmed at OpenWorld 2010 Listen to Gary Swanson of Herbalife describe how his organization realizes powerful new insight into product information with Agile PLM Business Intelligence (BI). Tyson: an Oracle Agile PLM for Process Customer Video Filmed at OpenWorld 2010, featuring Kim Glenn Tyson: an Oracle Agile PLM for Process Customer Video Filmed at OpenWorld 2010, featuring Amber Woods We are so proud to have two testimonials from Tyson Foods! Tune in to each to see the unique perspectives on Agile PLM for Process at Tyson from different organizational views, demonstrating Oracle's ability to enable enterprise-wide PLM implementations delivering superior results. Take a moment to view these interesting customer testimonials to learn how Oracle Agile PLM applications are helping companies succeed. Subscribe to our YouTube channel today!

    Read the article

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