Daily Archives

Articles indexed Friday June 4 2010

Page 5/8 | < Previous Page | 1 2 3 4 5 6 7 8  | Next Page >

  • Is there an open source repository for SQL code?

    - by morpheous
    I find myself writing SQL code (queries or stored procs) to solve problems that can definitely be defined as 'patterns' that occur frequently in business. Rather than having to wrack my brain each time I encounter a new problem (which must have been solved a countless times by other coders/db analysts, I wondered if there was a repository I could go to check out (peer reviewed) code - and maybe add my two pence every now and then. I know different db vendors tend to write slightly variant forms of SQL - but there could still be a repository with ANSI stuff and proprietary stuff. Hopefully, such a site would encourage more people to write standardized SQL. Is there such a site?. If no - why not? (would anyone else be interested in such a site?) If such a site exists, please provide link(s), as Google is not finding anything remotely useful.

    Read the article

  • How do I control script execution time in PHP

    - by mathew
    for example I do have 5 PHP functions on a page which execute when loading. each functions has its own processing time and some of them take more time sometimes to complete the task. hence the total loading time of the said page is slow. my question is how do I control execution time for each script and set time limit for the same. I am aware that there is an in built function in PHP called set_time_limit(); but it gives fatal error if time is beyond the maximum limit...

    Read the article

  • Custom setter methods in Core-Data

    - by andrewebling
    I need to write a custom setter method for a field (we'll call it foo) in my subclass of NSManagedObject. foo is defined in the data model and Xcode has autogenerated @property and @dynamic fields in the .h and .m files respectively. If I write my setter like this: - (void)setFoo: (NSObject *)inFoo { [super setFoo: inFoo]; [self updateStuff]; } then I get a compiler warning on the call to super. Alternatively, if I do this: - (void)setFoo: (NSObject *)inFoo { [super setValue: inFoo forKey: inFoo]; [self updateStuff]; } then I end up in an infinite loop. So what's the correct approach to write a custom setter for a subclass of NSManagedObject?

    Read the article

  • How to get the file name from the intent?

    - by Sumithran
    This is my mainfeast file.After using intent filter i download the ics file from the mail attachment.when i open the downloaded file it start my application. I need to get the file name and data of the selected file in my application. What should i do in the mainfeast and the java file. I am very new to android can any one help me???? <application android:label="@string/app_name" android:icon="@drawable/icsicon"> <activity android:name=".setMIMEfile" android:label="@string/app_name"><intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="*/*" /> <data android:pathPattern=".*\\.ics" />

    Read the article

  • Need help with cURL and POSTing in PHP

    - by alex
    I need to post to a payment gateway. The example PHP script for the gateway simply sets the XML like this curl_setopt($ch, CURLOPT_POSTFIELDS, $xmlRequest); // $xmlRequest is just a string of XML In all of my experience, generally you need to use an array with key/values or a string similar to GET params. I am using Kohana, and tracked down a cURL module. It accepts the POST key/values as an array only. Now, I could ditch the module and throw some cURL straight in, but I am using this module fine all throughout the site, so would prefer to use it here. So, my question is, how does that first one work? Does it just POST the whole thing without any named key? Is there a default key I could use for an array to get the module to work?

    Read the article

  • CRL checking problem windows 2003

    - by Tim Mahy
    Hi all, we have CRL that is valid for 24 hours and has a next update in 12 hours. The CRL is valid from 12:12 AM to 12:12 AM and from 12:12 PM to 12:12 PM. In the logs of the CRL hosting webserver we see that one of our servers not always fetches the CRL at night, in most cases the server that missed the CRL IIS servers 403.16 on 12:13 PM. Is our following theory good: when a windows server misses fetching the CRL on it's nextUpdate but the current CRL is still valid, the fetching is not retried? This leads to a situation that when the CRL expires there is no overlap and gives a little time of 403.16 situations in IIS since the CRL is not thrusted and so all certificates are marked als unsafe? greetings, Tim

    Read the article

  • [SOLVED] netcat/socat no response from other networking services

    - by jack
    Hi gurus First, I thought that this was Vmware problem : http://serverfault.com/questions/141838/vmware-problems-networking-no-packet-response But now, after testing on several physical machines, I realized certain services didn't return response data when using socat/netcat 1.1 which is supposed to the latest version since last updated. root@test3:~# netcat 192.168.1.2 25 220 762462a8c4d Microsoft ESMTP MAIL Service, Version: 6.0.2600.5949 ready at Fri, 12 May 2010 18:04:20 +0600 EHLO localhost sdfsafsd ^ root@test3:~# I've tested it on both windows and linuxes. I found no problem with telnet.

    Read the article

  • [SOLVED] vmware problems - networking - no packet response

    - by jack
    XP is my host. Ubuntu is my Guest in VMware. When I do the following commands, I should get SMTP respones but now get no response. I use wireshark to analayze it. Also in wireshark shows nothing. root@vmware:~# netcat 192.168.1.2 25 220 762462a8c4d Microsoft ESMTP MAIL Service, Version: 6.0.2600.5949 ready at Fri, 12 May 2010 18:04:20 +0800 EHLO SAYHELLO VRFY TEST@LOCALHOST test \ sdfsafsd How can I fix it? UPDATE: I came to know that this is no VMWare problem. This is Netcat problem. For this, you might have to type Ctrl+M {ENTER} {ENTER}

    Read the article

  • Open Source Development

    - by MA1
    I am a Fedora12(GNOME) user. I recently started development in Linux. Most of the Linux system applications/utilities are written in c/c++. The problem i am facing is that how to integrate a downloaded source code with some IDE(e.g, Anjuta etc). In simple words i want to know that, what is the best way to start development on some existing source code using an IDE. Lets take the example of GRUB2(v1.97.1). I downloaded the source code and now i want to study/customize/enhance/add new things to this code, so i want all the source files should be visible in a structural/hierarchical way for the ease of development?

    Read the article

  • iPhone contacts app styled indexed table view implementation

    - by KSH
    My Requirement: I have this straight forward requirement of listing names of people in alphabetical order in a Indexed table view with index titles being the starting letter of alphabets (additionally a search icon at the top and # to display misc values which start with a number and other special characters). What I have done so far: 1. I am using core data for storage and "last_name" is modelled as a String property in the Contacts entity 2.I am using a NSFetchedResultsController to display the sorted indexed table view. Issues accomplishing my requirement: 1. First up, I couldn't get the section index titles to be the first letter of alphabets. Dave's suggestion in the following post, helped me achieve the same: http://stackoverflow.com/questions/1112521/nsfetchedresultscontroller-with-sections-created-by-first-letter-of-a-string The only issue I encountered with Dave' suggestion is that I couldn't get the misc named grouped under "#" index. What I have tried: 1. I tried adding a custom compare method to NSString (category) to check how the comparison and section is made but that custom method doesn't get called when specified in the NSSortDescriptor selector. Here is some code: `@interface NSString (SortString) -(NSComparisonResult) customCompare: (NSString*) aStirng; @end @implementation NSString (SortString) -(NSComparisonResult) customCompare:(NSString *)aString { NSLog(@"Custom compare called to compare : %@ and %@",self,aString); return [self caseInsensitiveCompare:aString]; } @end` Code to fetch data: `NSArray *sortDescriptors = [NSArray arrayWithObject:[[[NSSortDescriptor alloc] initWithKey:@"last_name" ascending:YES selector:@selector(customCompare:)] autorelease]]; [fetchRequest setSortDescriptors:sortDescriptors]; fetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:@"lastNameInitial" cacheName:@"MyCache"];` Can you let me know what I am missing and how the requirement can be accomplished ?

    Read the article

  • how to use jquerydate picker with partial views in asp.net mvc?

    - by Renu123
    hello i am working on asp.net mvc. at staring i used the jquery which works fine but now i am converting my pages in to partial pages at this point am using ajax function to convert it in to partial view but every thing is working fine except date picker plz tell me the solution. the script that i have used: $(document).ready(function() { $("#txtTransationDate").datepicker(); }); </script> <input id="txtTransationDate" name="txtTransationDate" type="text" /> thank you......

    Read the article

  • Understanding behaviour of read() and write()

    - by neo730
    hi i am a student and just start learning low level c programming.i tried to understand read() and write() methods with this program. #include <unistd.h> #include <stdlib.h> main() { char *st; st=calloc(sizeof(char),2);//allocate memory for 2 char read(0,st,2); write(1,st,2); } i was expecting that it would give segmentation fault when i would try to input more than 2 input characters.but when i execute program and enter " asdf " after giving " as " as output it executes "df" command. i want to know why it doesn't give segmentation fault when we assign more than 2 char to a string of size 2.and why is it executing rest(after 2 char)of input as command instead of giving it as output only? also reading man page of read() i found read() should give EFAULT error,but it doesn't. I am using linux.

    Read the article

  • Datawindow opening error "The memory could not read"

    - by Ambut bhath
    I'm using PowerBuilder version 7.0.3. While opening/Modify Datawindow the datawindow from the library list i got the following error message ["The instruction at "0x104a985c" referenced memory at "0x00000000". The memory could not be "read" Click on OK to termincate the program Click on CANCEL to debug the program] is there any solution for that issue? how to resolve this? Thanks! in advance regards Ambutbhath

    Read the article

  • Unable to run native C++ application on different machine

    - by Rakesh K
    Hi, I wrote a simple 'Hello, world' application in C++ using Visual Studio 2008. I am able to run the app successfully on my local machine. BUt when I copy the exe onto another machine and run, it does not run. It gives the error that 'Application has failed to start because application configuration is incorrect'. The another system does not have Visual Studio installed. What could be the problem? Thanks, Rakesh.

    Read the article

  • Running The JVM From Within An MXML Component

    - by Joshua
    Thinking outside of the box here... What possible basic approaches could be taken in an effort to create a Flex component that could run Java? I know I can easily use flex to browse to or launch a Java app, but there are things I can only do if I can run the Java from WITHIN an MXML Component. I the strictest sense, I know it's not impossible (ie: if you had all the source code for flex and for the jvm), but what's the least impractical means to this end? Showcase your creativity.

    Read the article

  • Chrome: On pressing Enter on a Textbox of a <form> Submits page without calling onClick of submit bu

    - by X-eCuTeR
    Hi Folks, I have a scenario in which I have 2 Submit Buttons in a form for going back and forward. Both the buttons have different JavaScript associated with it. It is working great if we press these buttons to navigate. But when in Google Chrome, when someone press enter on any of the text box within the Form it does not calls the onClick of the button. Is there any work around for that. Thanks

    Read the article

  • Rails: Generated tokens missing occasionally

    - by Vincent Chan
    We generate an unique token for each user and store it on database. Everything is working fine in the local environment. However, after we upload the codes to the production server on Engine Yard, things become weird. We tried to register an account right after the deploy. It is working fine and we can see the token in the db. But after that, when we register new accounts, we cannot see any tokens. We only have NULL in the db. Not sure what caused this problem because we can't re-produce this in the local machine. Thanks for your help.

    Read the article

  • What is the best way to handle the Connections to MySql from c#

    - by srk
    I am working on a c# application which connects to MySql server. There are about 20 functions which will connect to database. This application will be deployed in 200 over machines. I am using the below code to connect to my database which is identical for all the functions. The problem is, i can some connections were not closed and still alive when deployed in 200 over machines. Connection String : <add key="Con_Admin" value="server=test-dbserver; database=test_admindb; uid=admin; password=1Password; Use Procedure Bodies=false;" /> Declaration of the connection string Globally in application [Global.cs] : public static MySqlConnection myConn_Instructor = new MySqlConnection(ConfigurationSettings.AppSettings["Con_Admin"]); Function to query database : public static DataSet CheckLogin_Instructor(string UserName, string Password) { DataSet dsValue = new DataSet(); //MySqlConnection myConn = new MySqlConnection(ConfigurationSettings.AppSettings["Con_Admin"]); try { string Query = "SELECT accounts.str_nric AS Nric, accounts.str_password AS `Password`," + " FROM accounts " + " WHERE accounts.str_nric = '" + UserName + "' AND accounts.str_password = '" + Password + "\'"; MySqlCommand cmd = new MySqlCommand(Query, Global.myConn_Instructor); MySqlDataAdapter da = new MySqlDataAdapter(); if (Global.myConn_Instructor.State == ConnectionState.Closed) { Global.myConn_Instructor.Open(); } cmd.ExecuteScalar(); da.SelectCommand = cmd; da.Fill(dsValue); Global.myConn_Instructor.Close(); } catch (Exception ex) { Global.myConn_Instructor.Close(); ExceptionHandler.writeToLogFile(System.Environment.NewLine + "Target : " + ex.TargetSite.ToString() + System.Environment.NewLine + "Message : " + ex.Message.ToString() + System.Environment.NewLine + "Stack : " + ex.StackTrace.ToString()); } return dsValue; }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8  | Next Page >