Search Results

Search found 26214 results on 1049 pages for 'farm solution'.

Page 53/1049 | < Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >

  • What's a better solution to a site with UGC (video)?

    - by amogh
    We are trying to build a site with user generated video content, finalized on either brightcove or encoding.com + amazon cloud front. Our requirement is more on gathering the videos than showcasing. What would be better alternative? Does brightcove provide decent apis for managing UGC?

    Read the article

  • Handling file uploads with JavaScript and Google Gears, is there a better solution?

    - by gnarf
    So - I've been using this method of file uploading for a bit, but it seems that Google Gears has poor support for the newer browsers that implement the HTML5 specs. I've heard the word deprecated floating around a few channels, so I'm looking for a replacement that can accomplish the following tasks, and support the new browsers. I can always fall back to gears / standard file POST's but these following items make my process much simpler: Users MUST to be able to select multiple files for uploading in the dialog. I MUST be able to receive status updates on the transmission of a file. (progress bars) I would like to be able to use PUT requests instead of POST I would like to be able to easily attach these events to existing HTML elements using JavaScript. I.E. the File Selection should be triggered on a <button> click. I would like to be able to control response/request parameters easily using JavaScript. I'm not sure if the new HTML5 browsers have support for the desktop/request objects gears uses, or if there is a flash uploader that has these features that I am missing in my google searches. An example of uploading code using gears: // select some files: var desktop = google.gears.factory.create('beta.desktop'); desktop.openFiles(selectFilesCallback); function selectFilesCallback(files) { $.each(files,function(k,file) { // this code actually goes through a queue, and creates some status bars // but it is unimportant to show here... sendFile(file); }); } function sendFile(file) { google.gears.factory.create('beta.httprequest'); request.open('PUT', upl.url); request.setRequestHeader('filename', file.name); request.upload.onprogress = function(e) { // gives me % status updates... allows e.loaded/e.total }; request.onreadystatechange = function() { if (request.readyState == 4) { // completed the upload! } }; request.send(file.blob); return request; } Edit: apparently flash isn't capable of using PUT requests, so I have changed it to a "like" instead of a "must".

    Read the article

  • VB.net: Is my Thread Safe List Solution actually safe?

    - by Shiftbit
    I've added teh following Extensions to my Project in order to create a thread safe list: Extensions If I want to conduct a simple operation on my list <Extension()> _ Public Sub Action(Of T)(ByVal list As List(Of T), ByVal action As Action(Of List(Of T))) SyncLock (list) action(list) End SyncLock End Sub If I want to pass it more than one parameter I could simply extend it with more items... <Extension()> _ Public Sub Action(Of T)(ByVal list As List(Of T), ByVal action As Action(Of List(Of T), T), ByVal item As T) SyncLock (list) Action(list, item) End SyncLock End Sub Actions I have created the following Action Examples: Private Sub Read(Of T)(ByVal list As List(Of T)) Console.WriteLine("Read") For Each item As T In list Console.WriteLine(item.ToString) Thread.Sleep(10) Next End Sub and also one that takes a parameter: Private Sub Write(Of T)(ByVal list As List(Of T), ByVal item As T) Thread.Sleep(100) list.Add(item) Console.WriteLine("Write") End Sub Initiating Then in my various threads I will call my Actions with: list.Action(AddressOf Read) or list.Action(AddressOf Write2, 10) Are these Extenxion methods thread safe or do you have other recommendations?

    Read the article

  • The Best solution to sending emails to group members in a social network.

    - by praveen
    I'm developing a social network in php. There is a feature to create custom groups by members and i want to enable the owner of the group to send emails in bulk to all group members. And most importantly i want to make sure that most mails are not going to end up in users' SPAM list. I'm using PHPMailer in my website What should be the best and affordable approach? These are the solutions i came up with. Pls include your own if possible. Using my servers' (hostgator.com) given SMTP server to send emails in bulk Using google apps SMTP (i have even setup SPF for this) Using a third-party to handle my outgoing messages (i.e: mailChimp, iContact ? do they provide APIs ? this is just my idea) Thanks in advance

    Read the article

  • I Clean Solution'd my Winform App and now it's broken...

    - by Refracted Paladin
    I have a Winform App that uses a 3rd Party Library of Controls, DevExpress. I also created a bunch of Controls myself, extending those controls. Everything has been working fine when all of a sudden I opened VS today and on the Design Page all my extended controls were missing. I then tried rebuilding to no avail. Then I tried Cleaning and Rebuilding and made it even worse. Now I have tons(520) of erros stating things like -- Error 179 The name 'datBirthDate' does not exist in the current context D:\Documents\Visual Studio 2008\Projects\MatrixReloaded\MatrixReloaded\Controls\Member\ucGeneral.cs 339 17 MatrixReloaded also if I try to open a form or user control in Design Mode I first get this -- could not find type, "MyType" please make sure that the assembly that contains this type is referenced and then, if I click Ignore and Continue I get this for all Forms and Contros when I try and look at them in Design Mode -- Exception of type System.OutOfMemoryException was thrown Help!?!? When I googled I came across mostly references to VS 2003...I am on 2008 sp1.

    Read the article

  • I'm having trouble spacing a menu control in an ASP.NET page. Is my solution the correct way to do t

    - by pkiyan
    Hey, I added a menu control to my page that is displayed vertically. I couldn't find a way to add spaces (I'd like about 5px.) between the menu items, so I just did something similar to this: <asp:Menu ID="Menu1" runat="server" BackColor="ActiveBorder"> <Items> <asp:MenuItem NavigateUrl="~/About.aspx" Text="One" /> </Items> </asp:Menu> <p></p> <asp:Menu ID="Menu2" runat="server" BackColor="ActiveBorder"> <Items> <asp:MenuItem NavigateUrl="~/Default.aspx" Text="Two" /> </Items> </asp:Menu> I just created multiple menu controls with a single menu item control in them, and placed a break between the menu controls. This seems very wrong to me, but I could not figure out another way. Also, this is a bit off subject, but is it okay to use empty paragraph tags as line breaks?(sometimes a br tag is too much) Thanks..

    Read the article

  • VBA: Difference in two ways of declaring a new object? (Trying to understand why my solution works)

    - by Matt
    I was creating a new object within a loop, and adding that object to a collection; but when I read back the collection after, it was always filled entirely with the last object I had added. I've come up with two ways around this, but I simply do not understand why my initial implementation was wrong. Original: Dim oItem As Variant Dim sOutput As String Dim i As Integer Dim oCollection As New Collection For i = 0 To 10 Dim oMatch As New clsMatch oMatch.setLineNumber i oCollection.Add oMatch Next For Each oItem In oCollection sOutput = sOutput & "[" & oItem.lineNumber & "]" Next MsgBox sOutput This resulted in every lineNumber being 10; I was obviously not creating new objects, but instead using the same one each time through the loop, despite the declaration being inside of the loop. So, I added Set oMatch = Nothing immediately before the Next line, and this fixed the problem, it was now 0 to 10. So if the old object was explicitly destroyed, then it was willing to create a new one? I would have thought the next iteration through the loop would cause anything declared within the loop do be destroyed due to scope? Curious, I tried another way of declaring a new object: Dim oMatch As clsMatch: Set oMatch = New clsMatch. This, too, results in 0 to 10. Can anyone explain to me why the first implementation was wrong?

    Read the article

  • Where can I find a tool to convert a VS solution to a gcc makefile?

    - by Tim
    I know about CMake and bakefile already, but that is not what I am looking for. Is there a tool that will generate a makefile given a VC project? (or at least a first attempt at one) so I don't have to do all the work by hand? Alternatively, is there a tool that makes CMake files? Edit: Following the link below leads me to this: http://www.winehq.org/docs/winemaker That is a great help. I have not tried it yet.

    Read the article

  • What's the best free and opensource PHP ecommerce solution? (and why?)

    - by Andrea Ambu
    I'd like to avoid coding one from scratch, so I'd like to see what the open-source community can offer :-) Required features: Easy way to insert items with photo and description Templates easy-to-create Multi language (at least Italian and English) Shopping cart User managment PayPal support (not required but really appreciated :D) I'm going on PHP and MySQL because of the hosting service I can't change, so please don't talk to me about alternatives :P I'd like to know what's the one you like the most and why should it be better than the others UPDATE: I need also multi language, Italian and English are a must.

    Read the article

  • What solution programmers prefer to get ride of Myopia?

    - by Emily
    Yes, i have Myopia and that's really annoying and make me blame myself why i choosen this field. And i think a lot of people like me here. What did you choose/Or the best choice in order to correct your short-sight? Glasses Contacts Overnight Contacts Lasik I'm really confused because some people say glasses are decreasing the sight more, other say Lasik is just a luck, others prefer overnight contacts which you sleep with'em.

    Read the article

  • Null-free "maps": Is a callback solution slower than tryGet()?

    - by David Moles
    In comments to "How to implement List, Set, and Map in null free design?", Steven Sudit and I got into a discussion about using a callback, with handlers for "found" and "not found" situations, vs. a tryGet() method, taking an out parameter and returning a boolean indicating whether the out parameter had been populated. Steven maintained that the callback approach was more complex and almost certain to be slower; I maintained that the complexity was no greater and the performance at worst the same. But code speaks louder than words, so I thought I'd implement both and see what I got. The original question was fairly theoretical with regard to language ("And for argument sake, let's say this language don't even have null") -- I've used Java here because that's what I've got handy. Java doesn't have out parameters, but it doesn't have first-class functions either, so style-wise, it should suck equally for both approaches. (Digression: As far as complexity goes: I like the callback design because it inherently forces the user of the API to handle both cases, whereas the tryGet() design requires callers to perform their own boilerplate conditional check, which they could forget or get wrong. But having now implemented both, I can see why the tryGet() design looks simpler, at least in the short term.) First, the callback example: class CallbackMap<K, V> { private final Map<K, V> backingMap; public CallbackMap(Map<K, V> backingMap) { this.backingMap = backingMap; } void lookup(K key, Callback<K, V> handler) { V val = backingMap.get(key); if (val == null) { handler.handleMissing(key); } else { handler.handleFound(key, val); } } } interface Callback<K, V> { void handleFound(K key, V value); void handleMissing(K key); } class CallbackExample { private final Map<String, String> map; private final List<String> found; private final List<String> missing; private Callback<String, String> handler; public CallbackExample(Map<String, String> map) { this.map = map; found = new ArrayList<String>(map.size()); missing = new ArrayList<String>(map.size()); handler = new Callback<String, String>() { public void handleFound(String key, String value) { found.add(key + ": " + value); } public void handleMissing(String key) { missing.add(key); } }; } void test() { CallbackMap<String, String> cbMap = new CallbackMap<String, String>(map); for (int i = 0, count = map.size(); i < count; i++) { String key = "key" + i; cbMap.lookup(key, handler); } System.out.println(found.size() + " found"); System.out.println(missing.size() + " missing"); } } Now, the tryGet() example -- as best I understand the pattern (and I might well be wrong): class TryGetMap<K, V> { private final Map<K, V> backingMap; public TryGetMap(Map<K, V> backingMap) { this.backingMap = backingMap; } boolean tryGet(K key, OutParameter<V> valueParam) { V val = backingMap.get(key); if (val == null) { return false; } valueParam.value = val; return true; } } class OutParameter<V> { V value; } class TryGetExample { private final Map<String, String> map; private final List<String> found; private final List<String> missing; public TryGetExample(Map<String, String> map) { this.map = map; found = new ArrayList<String>(map.size()); missing = new ArrayList<String>(map.size()); } void test() { TryGetMap<String, String> tgMap = new TryGetMap<String, String>(map); for (int i = 0, count = map.size(); i < count; i++) { String key = "key" + i; OutParameter<String> out = new OutParameter<String>(); if (tgMap.tryGet(key, out)) { found.add(key + ": " + out.value); } else { missing.add(key); } } System.out.println(found.size() + " found"); System.out.println(missing.size() + " missing"); } } And finally, the performance test code: public static void main(String[] args) { int size = 200000; Map<String, String> map = new HashMap<String, String>(); for (int i = 0; i < size; i++) { String val = (i % 5 == 0) ? null : "value" + i; map.put("key" + i, val); } long totalCallback = 0; long totalTryGet = 0; int iterations = 20; for (int i = 0; i < iterations; i++) { { TryGetExample tryGet = new TryGetExample(map); long tryGetStart = System.currentTimeMillis(); tryGet.test(); totalTryGet += (System.currentTimeMillis() - tryGetStart); } System.gc(); { CallbackExample callback = new CallbackExample(map); long callbackStart = System.currentTimeMillis(); callback.test(); totalCallback += (System.currentTimeMillis() - callbackStart); } System.gc(); } System.out.println("Avg. callback: " + (totalCallback / iterations)); System.out.println("Avg. tryGet(): " + (totalTryGet / iterations)); } On my first attempt, I got 50% worse performance for callback than for tryGet(), which really surprised me. But, on a hunch, I added some garbage collection, and the performance penalty vanished. This fits with my instinct, which is that we're basically talking about taking the same number of method calls, conditional checks, etc. and rearranging them. But then, I wrote the code, so I might well have written a suboptimal or subconsicously penalized tryGet() implementation. Thoughts?

    Read the article

  • Strict pointer aliasing: any solution for a specific problem?

    - by doublep
    I have a problem caused by breaking strict pointer aliasing rule. I have a type T that comes from a template and some integral type Int of the same size (as with sizeof). My code essentially does the following: T x = some_other_t; if (*reinterpret_cast <Int*> (&x) == 0) ... Because T is some arbitary (other than the size restriction) type that could have a constructor, I cannot make a union of T and Int. (This is allowed only in C++0x only and isn't even supported by GCC yet). Is there any way I could rewrite the above pseudocode to preserve functionality and avoid breaking strict aliasing rule? Note that this is a template, I cannot control T or value of some_other_t; the assignment and subsequent comparison do happen inside the templated code. (For the record, the above code started breaking on GCC 4.5 if T contains any bit fields.)

    Read the article

  • How to implement a Client-side Ajax Login on Asp.Net MVC (A link to the solution for Asp.Net Webform

    - by Matt
    Hi, I'm trying to implement a client-side ajax login on Asp.Net MVC. I used to have this set up just fine on WebForms, but now that I've moved to MVC it's giving me some troubles. If you'd like a tutorial on Client-side Ajax Login for Asp.Net Webforms, it can be found here -- Easy, A++ Now... for some reason it's not working for Asp.Net MVC. I used the exact same tutorial as for the Webforms, except when it executes the ssa.login() (equivalently: Sys.Services.AuthenticationService.login()) it's not doing anything. I have alerts in both the onLoginComplete() function and the onError() function. As well I have an alert before the ssa.login gets called and right after... function loginHandler() { var username = $("#login_UserName").val(); var password = $("#login_Password").val(); var isPersistent = $("#login_RememberMe").attr("checked"); var customInfo = null; var redirectUrl = null; // Log them in. alert("try login"); ssa.login(username, password, isPersistent, customInfo, redirectUrl, onLoginComplete, onError); alert("made it here"); } The first alert fires but the second one doesn't which means the function is failing. Here's the function I pulled from Asp.Net Ajax to show you: function(c, b, a, h, f, d, e, g) { this._invoke(this._get_path(), "Login", false, { userName: c, password: b, createPersistentCookie: a }, Function.createDelegate(this, this._onLoginComplete), Function.createDelegate(this, this._onLoginFailed), [c, b, a, h, f, d, e, g]); } Anyone have any idea of why it's failing?

    Read the article

  • Whats the best solution for a database used in conjunction with Maps in Android?

    - by Andrew
    Could someone please point me in the right direction. My project involves a database where users enter their address and other info from my website. This database is then referenced in my android application to show the locations of these addresses in my database. I have yet to start and just came up with this idea. My question is, what would be the best method to create a database easily modified through my website (mySQL, php, etc), and also easily referenced easily through Android and the Google Maps API? I need some ideas on the languages I will need to use to create this database and website so I can go buy the necessary books to start reading up. Thanks so much

    Read the article

  • Problems and solution for Developing a connected web and desktop application?

    - by Taz
    hi, I am trying to develop a web application(Using ASP.NET and c#) that uses a specific database hosted on web server. I will have another desktop application that will use a local database. Both databases have same structure and data at start up. Then databases will change when users add data to web application and an employee adds data to the desktop application. After a while I have to sync both databases. What will be best way to do this? Is there any opensource example/ starter kit to start with? Thanks.

    Read the article

  • Solution to combine two submit buttons.. doing two different things from the same input

    - by zac
    I am trying to figure out how to combine two different forms, both require the same input but they do two different things. One form sends a request to the ecommerce platform to get the order status, and another form takes the same order number and returns a tracking code from USP or USPS. I am looking for some guidance on how I could combine these two actions.. one is currently using the POST method and the other GET. Here is an example .. so one is This one runs a validation script to confirm the order number is valid and then returns the order info if it is the second form is sending a get request to an asp file that is generating the proper tracking numbers. Can someone please point me to how I could begin to tackle this?

    Read the article

  • How can I progrommatically change the target framework from 4.0 to 3.5 of a project/solution?

    - by scott
    Edit 3: After more googling it looks like you can't have the TargetFrameworkMoniker property in a .NET 3.5 application. So I guess I should be asking a different question. How do I change the Target framework from 4.0 to 3.5? Unfortunately, I can only find stuff on how to go the other way. or better yet how do i progrommatically set the target framework version of a project to something other than 4.0? Original question: I just switched to vs2010. I have an application that uses .net 3.5. It loads plugins which are generated by a different app. The plugins are using .net 4 and there for cannot be loaded. I'm using EnvDTE.Project to create a project and set the settings. I can't find what setting needs to be set for this. Edit 1: I'm generating code for about 50 solutions. When I made the switch from vs2005 to vs2010 the projects in those solutions are defaulting to .NET Framework 4.0. So I need to set the .NET Framework to 3.5 when I am generating the code for these solutions. Edit 2: After a lot of googling I found this. so then I tried this: loProp = vsGetProperty("TargetFrameworkMoniker"); vsSetValue(loProp, ".NETFramework,Version=v3.5"); the definitions for those two methods are below. as far as I can tell they do the same this as project.Properties.Item("TargetFrameworkMoniker").Value = ".NETFramework,Version=v4.0,Profile=Client"; I start getting an Property Unavailable Exception later in the code. When I remove the new lines everything works except the projects target framework is still 4.0. The code generators target framework is 3.5 so I can't use the FrameworkName class like shown in the second example in that link. here is vsGetProperty protected Property vsGetProperty(string aProperty) { bool lbDone = false; int liCount = 0; Property loProp; while (!lbDone && liCount < pMaxRetries) { try { loProp = pProject.Properties.Item(aProperty); lbDone = true; return loProp; } catch (System.Runtime.InteropServices.COMException loE) { liCount++; if ((uint)loE.ErrorCode == 0x80010001) { // RPC_E_CALL_REJECTED - sleep half sec then try again System.Threading.Thread.Sleep(pDelayBetweenRetry); } } } return null; } and vsSetValue protected void vsSetValue(Property aProperty, string aValue) { bool lbDone = false; int liCount = 0; while (!lbDone && liCount < pMaxRetries) { try { aProperty.Value = aValue; lbDone = true; } catch (System.Runtime.InteropServices.COMException loE) { liCount++; if ((uint)loE.ErrorCode == 0x80010001) { // RPC_E_CALL_REJECTED - sleep half sec then try again System.Threading.Thread.Sleep(pDelayBetweenRetry); } } } }

    Read the article

  • I want to extract the video link out of youtube embed code, I am searching for a regex solution for

    - by Starx
    For example: an youtube embed code <object width="480" height="385"> <param name="movie" value="http://www.youtube.com/v/TFlzeO267qY&hl=en_US&fs=1&"></param> <param name="allowFullScreen" value="true"></param> <param name="allowscriptaccess" value="always"></param> <embed src="http://www.youtube.com/v/TFlzeO267qY&hl=en_US&fs=1&" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed> </object> I want to extract http://www.youtube.com/v/TFlzeO267qY&hl=en_US&fs=1&" from this embed code but I dont know how to create a regex expression for this Thanks in Advance?

    Read the article

< Previous Page | 49 50 51 52 53 54 55 56 57 58 59 60  | Next Page >