Daily Archives

Articles indexed Monday June 7 2010

Page 12/113 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • full text search on multiple fields in diferrent tables

    - by crisgomez
    Hi, I want to create a a full text search usng ms sql 2005. here is the structure of my table User-contains fields of Id, fname,lname,email,alternativeemail Attachment-contains fields of id, name,category,filenameorurl Certification-contains of fileds of id, title,school,sdate,edate EducationalBackground-contain of fields of, id,qualification,sdate,edate,school,fieldofstudy EmploymentDetails-contain of fields position, positionlevelid,specializationid,description now the relationship of user to the other table is one to many relationship. now how can I create an effective query to have quick full text search and return the values of the different tables?any help please

    Read the article

  • Image resizing not working with png images

    - by user304828
    it not work with png created a thumb png but haven't data , like null data :D with jpg , jpeg still working without error why ? function thumbnail($pathtoFile,$thumWidth,$pathtoThumb) { //infor of image $infor = pathinfo($pathtoFile); // Setting the resize parameters list($width, $height) = getimagesize($pathtoFile); $modwidth = $thumWidth; $modheight = floor( $height * ( $modwidth / $width )); // Resizing the Image $thumb = imagecreatetruecolor($modwidth, $modheight); switch(strtolower($infor['extension'])) { case 'jpeg': case 'jpg': $image = imagecreatefromjpeg($pathtoFile); break; case 'gif': $image = imagecreatefromgif($pathtoFile); break; case 'png': $image = imagecreatefrompng($pathtoFile); break; } imagecopyresampled($thumb, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height); switch(strtolower($infor['extension'])) { case 'jpeg': case 'jpg': imagejpeg($thumb,$pathtoThumb, 70); break; case 'gif': imagegif($thumb,$pathtoThumb, 70); break; case 'png': imagepng($thumb,$pathtoThumb, 70); break; } //destroy tmp imagedestroy($thumb); }

    Read the article

  • Double Click and Resize on an Ipad

    - by Luke
    Thanks to the great post at OranLooney.com I was able to get a java/icefaces web-app to resize nicely on the ipad, however the code provided for double click doesn't seem to work without further customization. Has anybody had any experience with getting this to work? there seems to be little documentation on google. the donnothing(); in the window.orientationchange is there as it seems sometimes without it the resize will (sometimes) not work // a function to parse the user agent string; useful for // detecting lots of browsers, not just the iPad. function checkUserAgent(vs) { var pattern = new RegExp(vs, 'i'); return !!pattern.test(navigator.userAgent); } if ( checkUserAgent('iPad') ) { // iPad specific stuff here window.onorientationchange = function() { donnothing(); }; document.body.addEventListener('touchstart', function(e) { touch = e.touches[0]; if ( !touch ) return; var me = document.createEvent("MouseEvents"); me.initMouseEvent('dblclick', true, true, window, 1, // detail / mouse click count touch.screenX, touch.screenY, touch.clientX, touch.clientY, false, false, false, false, // key modifiers 0, // primary mouse button null // related target not used for dblclick event ); touch.target.dispatchEvent(me); }); }

    Read the article

  • Silverlight Cream for June 06, 2010 -- #876

    - by Dave Campbell
    In this Issue: Brian Genisio, Michael Washington, Fons Sonnemans , Don Burnett, Xianzhong Zhu, Mike Snow, Jesse Liberty, Victor Gaudioso, David Kelley(-2-), and Matias Bonaventura . Shoutout: Anoop has a good post up: MEF or Managed Extensibility Framework and Lazy – Being Lazy with MEF, Custom Export Attributes etc Jesse Liberty's got a good post up if you are just Getting Started With Silverlight: A Path Through The Learning Material John Papa reports Updates and New Home for Sticky Plugin Tim Heuer announced Silverlight 4 Theme refresh including RIA Services templates From SilverlightCream.com: Adventures in MVVM – ViewModel Location and Creation Brian Genisio has a post up about ViewModels and how he attaches them to his views. Some discssion of MVVMLight, and other external links plus the code for the project. Simplified MEF: Dynamically Loading a Silverlight .xap Michael Washington has a good tutorial up on MEF, Silverlight, and ViewModel. In Michael's words: The goal here is to give you a quick easy win. You will be able to understand this one. You will come away with something you can use, and you will be able to tell your fellow colleagues, "MEF? yeah I'm using that, good stuff Touch Gesture Triggers for Windows Phone 7 projects in Blend 4.0 Fons Sonnemans has a post up about touch gestures for WP7 -- he's got 3 of them implemented using triggers, plus an external link to another, and the source. What the Heck is “MEF” for, and what Silverlight designers need to know about it? Don Burnett is also talking MEF... he does a good job of introducing MEF if you're not acquainted yet, plus some external information. Write Your Custom Effect Components in Silverlight 3 Xianzhong Zhu has a post up walking you through creating your own Custom Effect for Blend and Silverlight 3 ... lots of external links and the source project. Silverlight Tip of the Day #28 – Text Trimming Mike Snow's Tip #28 is about Text Trimming... what it does, and how it differs from WPF Windows Phone 7: Lists, Page Animation and oData Jesse Liberty called this a mini-tutorial, but it's not so mini... great tutorial on WP7, data, lists, and page transitions... oh, and the data is OData too... New Silveright Video Tutorial: How to Do Hit Detection Victor Gaudioso's latest video tutorial is up and he's demonstrating how to do Silverlight HitTesting via code from Andy Beaulieu Dependency Properties Made Easy Need a quick pick-up on Dependency Properties? David Kelley has a short post about them on his blog. Isolated Storage Made Easy David Kelley also has a quick post up about Isolated Storage ... going to keep an eye out for more of these quick "Made Easy" posts from David. Prism 4.0 First Drop – MVVM Matias Bonaventura has a post up about the recent Prism 4.0 drop and highlights a bunch of the features/enhancements in this... some code snippets and a linnk out to the CodePlex drop. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Is PHP still basically Procedural Overall?

    - by coffeeaddict
    I know PHP 5 has some object oriented similarities but it's not a true OOP environment still right? Also does it have a true compiler? I see compiling of scripts which still means procedural. I assume it's not a real compiler in that any PHP compilers out there do not create assemblies?

    Read the article

  • Virtual Mode List View Click 1 Selects More Than One Items

    - by Samir
    I have a list view with virtual mode set to true and other things. It doing ok. But 1) Say there are 25 items and 15 of them are visible, that is to see the rest of 10 items need to scroll down. 2) Before scrolling swap two items, say myItems[0], it must be visible & myItems[20], it must be not visible scroll required. 3) Now select the first item, it was swapped, you now have two items selected, both 0 indexed and 20 indexed ones. When after swap, those two list view items are of same Position and same Bounds. But before 20-indexed item's Position was (-1, -1) and Bounds was (0,0,0,0). How come 0-indexed item didn't change its position & size? How to solve this ?

    Read the article

  • C# String Resource Values as Enum String Part values?

    - by JL
    Using VS2010 and .net V4.0 I would like to achieve the following: I already have 2 resource files in my project for 2 languages - English and Czech. I must say Resource Management in .net is excellent, I am suprised even to get code completion when implementing a String for example: string desc = Strings.ResourceManagerDesc This gets the string associated with the current culture of the thread. Now I am trying to create an Enum that can have the String portion of the Enum interpreted from the Strings resources. In the following way (This code DOES NOT WORK): public enum DownloadStatus { 1 = Strings.DownloadState_Complete, 2 = Strings.DownloadState_Failed, 3 = Strings.DownloadState_InProgress } This is a made up example, but you can see the point here. Since the above code won't work, is there a best practice way to achieve what I want?

    Read the article

  • XML url link in Flash

    - by Vickyboy
    Hi, I am new to XML and am having a small problem in Flash. I have a number of buttons. Each of these buttons need to open up a different URL which is in a xml file (I have added only one button for now (banstead), as I wasn´t sure how to add more). My XML: <?xml version="1.0" encoding="utf-8"?> <banstead targ="_self" href="http://www.marca.com"> </banstead> My AS: weblinkXML = new XML(); weblinkXML.ignoreWhite = true; weblinkXML.load("xml/counties.xml"); weblinkXML.onLoad = function (success) { var url = weblinkXML.firstChild.attributes.href; banstead.onRelease = function () { getURL(weblinkXML.url); } } For some reason when I test the movie and click on the button it doesn´t open the URL I requested. Appreciate any help

    Read the article

  • 'sript/console test' with spork and rspec not loading the whole environment?

    - by TheDeeno
    I'm trying to load up console to interact with some of my rspec mocking helpers. I expected that running script/console test would load an env similar to when I run spec. However, this doesn't appear to be the case. It looks like spec_helper is never loaded. Or, if it is, it's not actually running through the logic because spork has polluted it a bit. In short, is there a quick and easy way to get an interactive rspec party going?

    Read the article

  • Verifying existence of name and password in NSUserDefaults to Skip a login/Screen

    - by Michael Robinson
    I have a Tabbar/Tableview App that modally loads a Login/Signup view when the app loads, I have set up a Root.plist in a settings bundle for the name and password and have successfully retrieved the items. I want to be able to do two things: 1) Do a test to see if the NSUserDefault Strings are empty and if so load the Login/Signup view. 2) If the strings are available then use the string contents to login to my Webservice. Thanks in advance. Here is my LoginViewController .m : @synthesize usernameField; @synthesize passwordField; @synthesize loginButton; @synthesize loginIndicator; @synthesize usernameLabel; @synthesize passwordLabel; -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; usernameLabel.text = [defaults objectForKey:kUsernameKey]; passwordLabel.text = [defaults objectForKey:kPasswordKey]; } - (void)viewDidAppear:(BOOL)animated { [self refreshFields]; [super viewDidAppear:animated]; } - (void)viewDidLoad { [super viewDidLoad]; [self refreshFields]; [self.navigationController setNavigationBarHidden:YES animated:NO]; } - (IBAction) login: (id) sender { { NSString *post =[NSString stringWithFormat:@"username=%@&password=%@",usernameField.text, passwordField.text]; NSString *hostStr = @"http:~iphone_login.php?"; hostStr = [hostStr stringByAppendingString:post]; NSData *dataURL = [NSData dataWithContentsOfURL: [ NSURL URLWithString: hostStr ]]; NSString *serverOutput = [[NSString alloc] initWithData:dataURL encoding: NSASCIIStringEncoding]; NSLog(@"Site: %@",hostStr); NSLog(@"Site: %@",serverOutput); if([serverOutput isEqualToString:@"Yes"]){ UIAlertView *alertsuccess = [[UIAlertView alloc] initWithTitle:@"Congrats" message:@"You are authorized " delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alertsuccess show]; [alertsuccess release];

    Read the article

  • Nothing happen when refreshing the main Frame (JAVA)

    - by Ams
    Hello everyone, I try to show a ( Logged in ) message when a user is succefully connected but nothing happen when a do a repaint(). you can take a look to the code : public class MainFrame extends JFrame implements ActionListener{ private static final long serialVersionUID = 1L; private static final int FRAME_HEIGHT = 400; private static final int FRAME_WIDTH = 250; private static final String TITLE = new String("TweeX"); private static String TWITTERID = new String(); private static String TWITTERPW = new String(); private boolean logged = false; private JTextField loginField = new JTextField(10); private JPasswordField passField = new JPasswordField(10); private JButton login = new JButton("Connect"); private GridBagConstraints c = new GridBagConstraints(); private String UserStatus = new String("Please login..."); /* * Constructor ! */ MainFrame() { setSize(FRAME_WIDTH, FRAME_HEIGHT); setTitle(TITLE); setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); setResizable(false); loginUser(); } /* * Login Forms */ protected void loginUser(){ this.setLayout(new GridBagLayout()); //add Login Fiels + Label c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.insets = new Insets(5,5,5,20); c.gridy = 0; add(new JLabel("Username:"),c); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 0; add(loginField,c); //add Password Fiels + Label c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 1; add(new JLabel("Password:"),c); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 1; add(passField,c); //add Login button c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 2; add(login,c); //add listener to login button login.addActionListener((ActionListener) this); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 1; c.gridy = 3; add(new JLabel(UserStatus),c); setVisible(true); } @Override public void actionPerformed(ActionEvent e) { TWITTERID = loginField.getText(); TWITTERPW = passField.getText(); Twitter twitter = new TwitterFactory().getInstance(TWITTERID,TWITTERPW); logged = true; try { twitter.verifyCredentials(); } catch (TwitterException e1) { logged = false; } } protected void connect(){ if(logged){ UserStatus = "Loged In :)"; repaint(); } } static public void main(String[] argv) { new MainFrame(); } }

    Read the article

  • NavigationWindow Click Sound

    - by Robert
    I have a WPF application that uses the navigation window and frames to navigate between xaml pages. Every time it goes between the pages it makes a click sound. Is there a way to disable that?

    Read the article

  • how to omit extra bits in a file?

    - by thinthinyu
    I want to omit extra bit in txt file.eg ....ÿ 0111111110111101100011011010010001 in this string we want to omit extra bit "ÿ " which is appeared when we save a binary string. Save fun is as follow. please help me. void LFSR_ECDlg::Onsave() { this-UpdateData(); CFile bitstream; char strFilter[] = { "Stream Records (*.mpl)|*.mpl| (*.pis)|*.pis|All Files (*.*)|*.*||" }; CFileDialog FileDlg(FALSE, ".mpl", NULL, 0, strFilter); if( FileDlg.DoModal() == IDOK ) { if( bitstream.Open(FileDlg.GetFileName(), CFile::modeCreate | CFile::modeWrite) == FALSE ) return; CArchive ar(&bitstream, CArchive::store); CString txt; txt=""; txt.Format("%s",m_B);//by ANO AfxMessageBox (txt);//by ANO txt=m_B;//by ANO ar <<txt;//by ANO ar.Close(); } else return; bitstream.Close();

    Read the article

  • Surface Detection in 2d Game?

    - by GamiShini
    I'm working on a 2D Platform game, and I was wondering what's the best (performance-wise) way to implement Surface (Collision) Detection. So far I'm thinking of constructing a list of level objects constructed of a list of lines, and I draw tiles along the lines. ( http://img375.imageshack.us/img375/1704/lines.png ). I'm thinking every object holds the ID of the surface that he walks on, in order to easily manipulate his y position while walking up/downhill. Something like this: //Player/MovableObject class MoveLeft() { this.Position.Y = Helper.GetSurfaceById(this.SurfaceId).GetYWhenXIs(this.Position.X) } So the logic I use to detect "droping/walking on surface" is a simple point (player's lower legs)-touches-line (surface) check (with some safety approximation - let`s say 1-2 pixels over the line). Is this approach OK? I`ve been having difficulty trying to find reading material for this problem, so feel free to drop links/advice.

    Read the article

  • New iPhone Dev policy...how does Apple enforce this? [closed]

    - by milesmeow
    Apple doesn't want anyone to create iPhone apps outside of the Xcode/Objective-C environment. How can they actually enforce this? If the non Xcode IDE, for example Unity, compiles to an iPhone executable, how will Apple know which dev environment you used to create the app? Can they have Xcode compile some sort of signature into the executable that no one knows about?

    Read the article

  • HTML5 Webapp as regular icon or app on iPhone and Andorid.

    - by holografix
    Hi all, Sorry if this is a noob question, I searched quite a bit and couldn't find an answer. I'm developing a html5 app that relies on sqlite for local storage. I'd like for it to appear as an app icon on the iPhone/Android screen, what's the best way to do this? Ie can I write some sort of "wrapper" app to achieve it? Thanks!

    Read the article

  • To Make an item wiggle and delete

    - by gbf.sara
    I need to delete/remove an item in my Iphone application. For that i should make tat item wiggle(shake) when i give long press. And then it should ask for an alert to delete or not??? Can anyone guide me plz??? It ll be more helpful if u help me with a source code Tanx in advance

    Read the article

  • Is it possible to implement X-HTTP-Method-Override in ASP.NET MVC?

    - by Greg Beech
    I'm implementing a prototype of a RESTful API using ASP.NET MVC and apart from the odd bug here and there I've achieve all the requirements I set out at the start, apart from callers being able to use the X-HTTP-Method-Override custom header to override the HTTP method. What I'd like is that the following request... GET /someresource/123 HTTP/1.1 X-HTTP-Method-Override: DELETE ...would be dispatched to my controller method that implements the DELETE functionality rather than the GET functionality for that action (assuming that there are multiple methods implementing the action, and that they are marked with different [AcceptVerbs] attributes). So, given the following two methods, I would like the above request to be dispatched to the second one: [ActionName("someresource")] [AcceptVerbs(HttpVerbs.Get)] public ActionResult GetSomeResource(int id) { /* ... */ } [ActionName("someresource")] [AcceptVerbs(HttpVerbs.Delete)] public ActionResult DeleteSomeResource(int id) { /* ... */ } Does anybody know if this is possible? And how much work would it be to do so...?

    Read the article

  • Brief white screen when loading PHP page?

    - by orbit82
    What would cause a brief flash of white screen while a PHP page is loading? I just noticed it today on a WordPress theme that I am building and am wondering if this is a cause for concern. As a page loads, the screen will flash white before showing the page content. Sometimes this happens on every single page load, other times it only happens intermittently.

    Read the article

  • what's ur idea about this two way for creat a folder in oracle

    - by rima
    According to my last question about how to create folder here I find some codes that s.b before write it! looking : (sorry for limitation i cant put codes here) they try to Create a bat file,by oracle outfile text_IO,file_type then they write these statement! body_of_file = 'Net use x: \\address' body_of_file += 'md' || filename body_of_file += 'start '|| file name then open bat file and write inside it! then they call it by HOST!!!! like: Host('cmd /c \\address\.x.bat host_folder'|| sysdate); but they can easily and directly by calling HOST! and also I dont know why they code just can in oracle 6i!!!! we use 2 oracle 6i and 10g. please would you help me : 1- why this code dont work in 10g? 2- which way is better?create a batch file and create folder or use HOST for run each command?(in my Idea both is same,How about u?)

    Read the article

  • Accessing object properties from a treenode that's associated with it ?

    - by mhd
    Hallo, I have read http://stackoverflow.com/questions/1880930/easy-object-binding-to-treeview-node, but still have unanswered question. if an object is associated with treenode tag property, how to access that object members/properties from that treenode ? node1 = new TreeNode(); node1.tag = object1; //ex:if object1 has public property valueA //How to access valueA from node1 ??

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >