Daily Archives

Articles indexed Thursday May 20 2010

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

  • Three20 JSON problem: Can deploy to simulator but not device (extThree20JSON)

    - by wgpubs
    Everything builds and runs in the simulator fine ... but when I attempt to run on device I get: "arm-apple-darwin10-gcc-4.2.1: ..../three20/Build/Products/Debug-iphoneos/libextThree20JSON+YAJL.a: No such file or directory" I check that directory and indeed the file doesn't exist. It does exist in the "Debug-iphoneosimulator" though (which I guess explains why it works in the simulator). So what gives and what can I do to correct this? Thanks

    Read the article

  • Dependent Dropdowns (Linked Selects) with single class (no other selectors)

    - by AJ
    I am trying to create multiple dependent dropdowns (selects) with a unique way. I want to restrict the use of selectors and want to achieve this by using a single class selectors on all SELECTs; by figuring out the SELECT that was changed by its index. Hence, the SELECT[i] that changed will change the SELECT[i+1] only (and not the previous ones like SELECT[i-1]). For html like this: <select class="someclass"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> <select class="someclass"> </select> <select class="someclass"> </select> where the SELECTs other than the first one will get something via AJAX. I see that the following Javascript gives me correct value of the correct SELECT and the value of i also corresponds to the correct SELECT. $(function() { $(".someclass").each(function(i) { $(this).change(function(x) { alert($(this).val() + i); }); }); }); Please note that I really want the minimum selector approach. I just cannot wrap my head around on how to approach this. Should I use Arrays? Like store all the SELECTS in an Array first and then select those? I believe that since the above code already passes the index i, there should be a way without Arrays also. Thanks a bunch. AJ

    Read the article

  • jQuery append Google Adsense to div..

    - by SoulieBaby
    Hi everyone, I'm having issues with google adsense and it loading before my jQuery and killing my codes, so I thought I'd try to append the Google Adsense javascript to the appropriate div using the document ready function, here's the code I'm trying to write: <script language="javascript" type="text/javascript"> $(document).ready(function(){ $(".googleBanners").html("<script language='javascript' type='text/javascript'>\n" + "google_ad_client = 'pub-8487967187298044';\n" + "google_ad_slot = '1088799521';\n" + "google_ad_width = 250;\n" + "google_ad_height = 250;\n" + "</" + "script>\n" + "<script language='javascript' src='http://pagead2.googlesyndication.com/pagead/show_ads.js' type='text/javascript'>" + "</" + "script>"); }); </script> But I'm not so good writing javascript/jQuery so if someone could help me implement this that would be fantastic. The error in FF I'm currently getting is "Error: google_protectAndRun is not defined". I'm not sure what that means, but I'm guessing I've written the jQuery code wrong.. lol

    Read the article

  • Writing a simple batch file to setup a variable?

    - by Sam
    I want to write a simple batch file where i want to setup a environment variable based on the machine architecture. It is as below: set ARCH=%PROCESSOR_ARCHITECTURE% echo %ARCH% if %ARCH%==x86 ( set JAVA_ROOT=C:\Progra~1\Java\j2re1.4.2_13 ) else ( set JAVA_ROOT=C:\Progra~2\Java\j2re1.4.2_13 ) echo JAVA_ROOT is %JAVA_ROOT% On 64-bit machine where the architecture is 'AMD64' the JAVA_ROOT will be displayed as 'C:\Progra~2\Java\j2re1.4.2_13' at the echo statement. But when i run an application that uses this file, the first value of JAVA_ROOT would be picked up 'C:\Progra~1\Java\j2re1.4.2_13'. I don't have any idea why it goes in the 'if' part even though i am running this on 64-bit Windows7. When i echoed the

    Read the article

  • PHP - Opening uploaded DOCX files with the correct MIME TYPE

    - by user270797
    I have users uploading DOCX files which I make available for download. The issues we have been experiencing is the unknown mime types of DOCX files which causes IE to open these docs as Zip files. It is running on a Windows/IIS server. Because this is a shared host, I cannot change any server settings. I was thinking that I could just write some code that would handle DOCX files, perhaps custom output: if (extension=docx) { header("Content-Disposition: attachment; etc) header('Content-Type: application/application/vnd.openxmlformats-officedocument.wordprocessingml.document'); Output the file contents etc } Would this be a viable solution?? If so, can someone help fill in the gaps? (PS I know the above syntax is not correct, just a quick example)

    Read the article

  • How can I access the copy buffer on the web?

    - by Ólafur Waage
    Wild question here. Is it possible to access the copy buffer on the web. What I mean is. Can I go into Photoshop. Select a piece of a photo. Copy that piece and paste it into some element. That something would be like a Java applet or Flash or Silverlight or anything. I am just wondering if it is possible and if someone could point me in a direction. Since a few google searches have only found where you can copy files and paste via a Java applet.

    Read the article

  • Could not load file or assembly for c1webreport1 tool in compnentone studio

    - by Omprakash
    I'm using Licensed componentone product in my ASP.NET application and spcefically i use C1WebReport1 control from the product.while upgrading C1WebReport1 control from version 2.5.20072.239 to 2.6.20093.53207,i get the error message as "Could not load file or assembly 'C1.Web.C1WebReport.2, Version=2.6.20093.53207, Culture=neutral, PublicKeyToken=594a0605db190bb9' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)" can any one help me to bring complete solution? Thanks in advance. Regards Omprakash

    Read the article

  • Maven problems using GAE and DataNucleus

    - by Wraith
    I'm having trouble retrieving 2 artifacts in my Maven/Java/Google App Engine project: com.google.appengine.orm:datanucleus-appengine:jar:1.0.7.final com.google.appengine:appengine-api-1.0-sdk:jar:1.3.4 There's a similar question posted, but each answer brings me back to the same error message. More detail I don't know if it is relevant, but rather than a version number, my original dependency for DataNucleus contained a variable. I am using Eclipse. <groupId>org.datanucleus</groupId> <artifactId>datanucleus-core</artifactId> <version>${datanucleus.version}</version> <scope>runtime</scope> I did not include my stack trace in Maven for brevity's sake. Please let me know if it would help to post it. Thank you.

    Read the article

  • salted passwords confusion

    - by Vasiliy Stavenko
    I'm setting up email server for the first time and confused with strange thing. I have several user accounts which stored in previous server. Passwords for this accounts are in plain text. But I want to create crypts for them. Mysql (where my users will be stored) have function encrypt(passwd, salt). If no salt given used random value. I discovered that courier uses one certain salt and crypted all passwords with it. So the task done. But I'd like to know if there's a way to define my own salt for my pop3 server?

    Read the article

  • How to watch DNR TV in iTunes

    - by TimH
    I have subscribed to DNR TV in iTunes, but it won't download episodes (audio podcasts work fine). Am I missing something? I added this URL in iTunes: http://feeds.feedburner.com/DnrtvWmv

    Read the article

  • What is the easiest way to reference libraries in Qt projects?

    - by Jake Petroules
    I have two Qt4 Gui Application projects and one shared library project, all referenced under a .pro file with the "subdirs" template. So, it's like: exampleapp.pro app1.pro app2.pro sharedlib.pro Now, what I want to do is reference sharedlib from app1 and app2 so that every time I run app1.exe, I don't have to manually copy sharedlib.dll from its own folder to app1.exe's folder. I could set PATH environment variable in the projects window, but this isn't very portable. I've looked at putting the LIBS variable in the app1.pro file, but I'm not sure if that refers to statically linked libraries only - I've tried it with various syntaxes and it doesn't seem to work with shared libs.

    Read the article

  • Lock free multiple readers single writer

    - by dummzeuch
    I have got an in memory data structure that is read by multiple threads and written by only one thread. Currently I am using a critical section to make this access threadsafe. Unfortunately this has the effect of blocking readers even though only another reader is accessing it. There are two options to remedy this: use TMultiReadExclusiveWriteSynchronizer do away with any blocking by using a lock free approach For 2. I have got the following so far (any code that doesn't matter has been left out): type TDataManager = class private FAccessCount: integer; FData: TDataClass; public procedure Read(out _Some: integer; out _Data: double); procedure Write(_Some: integer; _Data: double); end; procedure TDataManager.Read(out _Some: integer; out _Data: double); var Data: TDAtaClass; begin InterlockedIncrement(FAccessCount); try // make sure we get both values from the same TDataClass instance Data := FData; // read the actual data _Some := Data.Some; _Data := Data.Data; finally InterlockedDecrement(FAccessCount); end; end; procedure TDataManager.Write(_Some: integer; _Data: double); var NewData: TDataClass; OldData: TDataClass; ReaderCount: integer; begin NewData := TDataClass.Create(_Some, _Data); InterlockedIncrement(FAccessCount); OldData := TDataClass(InterlockedExchange(integer(FData), integer(NewData)); // now FData points to the new instance but there might still be // readers that got the old one before we exchanged it. ReaderCount := InterlockedDecrement(FAccessCount); if ReaderCount = 0 then // no active readers, so we can safely free the old instance FreeAndNil(OldData) else begin /// here is the problem end; end; Unfortunately there is the small problem of getting rid of the OldData instance after it has been replaced. If no other thread is currently within the Read method (ReaderCount=0), it can safely be disposed and that's it. But what can I do if that's not the case? I could just store it until the next call and dispose it there, but Windows scheduling could in theory let a reader thread sleep while it is within the Read method and still has got a reference to OldData. If you see any other problem with the above code, please tell me about it. This is to be run on computers with multiple cores and the above methods are to be called very frequently. In case this matters: I am using Delphi 2007 with the builtin memory manager. I am aware that the memory manager probably enforces some lock anyway when creating a new class but I want to ignore that for the moment. Edit: It may not have been clear from the above: For the full lifetime of the TDataManager object there is only one thread that writes to the data, not several that might compete for write access. So this is a special case of MREW.

    Read the article

  • What is the difference between Multiple R-squared and Adjusted R-squared in a single-variate least s

    - by fmark
    Could someone explain to the statistically naive what the difference between Multiple R-squared and Adjusted R-squared is? I am doing a single-variate regression analysis as follows: v.lm <- lm(epm ~ n_days, data=v) print(summary(v.lm)) Results: Call: lm(formula = epm ~ n_days, data = v) Residuals: Min 1Q Median 3Q Max -693.59 -325.79 53.34 302.46 964.95 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2550.39 92.15 27.677 <2e-16 *** n_days -13.12 5.39 -2.433 0.0216 * --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 410.1 on 28 degrees of freedom Multiple R-squared: 0.1746, Adjusted R-squared: 0.1451 F-statistic: 5.921 on 1 and 28 DF, p-value: 0.0216 Apologies for the newbiness of this question.

    Read the article

  • Only show content when certain criteria is met?

    - by Elliot
    I'm wondering if theres a best practice for what I'm trying to accomplish... First we have the model categories, categories, has_many posts. Now lets say, users add posts. Now, I have a page, that I want to display only the current user's posts by category. Lets say we have the following categories: A, B, and C User 1, has posted in Categories A and B. In my view I have something like: @categories.each do |category| category.name @posts.each do |post| if post.category_id==category.id post content here end end end The problem with this, is I'm going to show the empty category, as well as the categories that do have content. Is there a more efficient way of going about this? As I don't want to show the empty categories. Best, Elliot

    Read the article

  • Suggestions for GUI of a multiledia messaging application in J2ME

    - by awaghad-ashish
    Hello everyone, We have developed a messaging application in j2me which adds text message, gets pictures from gallery and attaches them to the message etc and sends it over to a server after encryption, i.e. the client wants the messages to be encrypted. The app is ready but the only problem is that the GUI of the app looks miserable compared to the GUI of native messaging application on Nokia phones. Our GUI consists of a texfield for adding recipients i.e. the user clicks "options" to "add recipients" and is taken to a new form where contacts are shown. but the textfield is not in one line (like in case of native app). Also, we need the user to input the text message in a textField since we cannot have textbox inside a form (but the native app has a textbox as well as a textField ). Are there any ways to achieve such GUIs (one-line textfields, textbox like thing inside a form)? I hope you all understand what I mean, any kind of help will be appreciated. Thanks and regards, Ashish.

    Read the article

  • MySQL - What is wrong with this query or my database? Terrible performance.

    - by Moss
    SELECT * from `employees` a LEFT JOIN (SELECT phone1 p1, count(*) c, FROM `employees` GROUP BY phone1) b ON a.phone1 = b.p1; I'm not sure if it is this query in particular that has the problem. I have been getting terrible performance in general with this database. The table in question has 120,000 rows. I have tried this particular query remotely and locally with the MyISAM and InnoDB engines, with different types of joins, and with and without an index on phone1. I can get this to complete in about 4 minutes on a 10,000 row table successfully but performance drops exponentially with larger tables. Remotely it will lose connection to the server and locally it brings my system to its knees and seems to go on forever. This query is only a smaller step I was trying to do when a larger query couldn't complete. Maybe I should explain the whole scenario. I have one big flat ugly table that lists a bunch of people and their contact info and the info of the companies they work for. I'm trying to normalize the database and intelligently determine which phone numbers apply to individual people and which apply to an office location. My reasoning is that if a phone number occurs multiple times and the number of occurrence equals the number of times that the street address it is attached to occurs then it must be an office number. So the first step is to count each phone number grouping by phone number. Normally if you just use COUNT()...GROUP BY it will only list the first record it finds in that group so I figured I have to join the full table to the count table where the phone number matches. This does work but as I said I can't successfully complete it on any table much larger than 10,000 rows. This seems pathetic and this doesn't seem like a crazy query to do. Is there a better way to achieve what I want or do I have to break my large table into 12 pieces or is there something wrong with the table or db?

    Read the article

  • Big problems on iPhone ad hoc build -

    - by phil swenson
    No matter what I do I can't get my ad hoc provisioning profile to work. In Organizer, I always get "A valid signing identity matching this profile cannot be found in your keychain" for my adhoc profile. I have my distribution cert installed in my login keychain. I dragged the adhoc mobileprovision file to XCode... that's pretty much all there is to it, right? I searched around and found suggestions like re-creating the cert/profile. Did that, same thing. Also make sure your login keychain is default. It is. Even tried a different computer. Same result. In XCode AdHoc target I don't have a distribution target to pick. This all used to work, but obviously I messed something up..... Perhaps my process is just wrong (it's been months since I did this). Does someone have a step by step list of how to set up for adhoc distribution?

    Read the article

  • Help choose a code generation tools for ASP.NET

    - by Kintaro
    Hello, I am new to the code generation tools and I would like to know how does a tool like LLBGen Pro compares with the Entity Framework? On top of that my boos is really looking into a tool called CodeOnTime http://codeontime.com/default.aspx because he likes their good UI support. I am asking here because I really want an unbiased opinion. I am not sure if LLBGen can also generate the UI. So far all the development in the house we do it the classic way coding each layer manually. However we are in need of a fast prototyping tool. Any advice to help me choose wisely will be much appreciated thanks in advance.

    Read the article

  • How do you read a file line by line in your language of choice?

    - by Jon Ericson
    I got inspired to try out Haskell again based on a recent answer. My big block is that reading a file line by line (a task made simple in languages such as Perl) seems complicated in a functional language. How do you read a file line by line in your favorite language? So that we are comparing apples to other types of apples, please write a program that numbers the lines of the input file. So if your input is: Line the first. Next line. End of communication. The output would look like: 1 Line the first. 2 Next line. 3 End of communication. I will post my Haskell program as an example. Ken commented that this question does not specify how errors should be handled. I'm not overly concerned about it because: Most answers did the obvious thing and read from stdin and wrote to stdout. The nice thing is that it puts the onus on the user to redirect those streams the way they want. So if stdin is redirected from a non-existent file, the shell will take care of reporting the error, for instance. The question is more aimed at how a language does IO than how it handles exceptions. But if necessary error handling is missing in an answer, feel free to either edit the code to fix it or make a note in the comments.

    Read the article

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