Daily Archives

Articles indexed Saturday May 29 2010

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

  • "Finding" an object instance of a known class?

    - by Sean C
    My first post here (anywhere for that matter!), re. Cocoa/Obj-C (I'm NOT up to speed on either, please be patient!). I hope I haven't missed the answer already, I did try to find it. I'm an old-school procedural dog (haven't done any programming since the mid 80's, so I probably just can't even learn new tricks), but OOP has my head spinning! My question is: is there any means at all to "discover/find/identify" an instance of an object of a known class, given that some OTHER unknown process instantiated it? eg. somthing that would accomplish this scenario: (id) anObj = [someTarget getMostRecentInstanceOf:[aKnownClass class]]; for that matter, "getAnyInstance" or "getAllInstances" might do the trick too. Background: I'm trying to write a plugin for a commercial application, so much of the heavy lifting is being done by the app, behind the scenes. I have the SDK & header files, I know what class the object is, and what method I need to call (it has only instance methods), I just can't identify the object for targetting. I've spent untold hours and days going over Apples documentation, tutorials and lots of example/sample code on the web (including here at Stack Overflow), and come up empty. Seems that everything requires a known target object to work, and I just don't have one. Since I may not be expressing my problem as clearly as needed, I've put up a web page, with diagram & working sample pages to illustrate: http://www.nulltime.com/svtest/index.html Any help or guidance will be appreciated! Thanks.

    Read the article

  • iPhone: scale UIView about a specific point

    - by Greg Maletic
    I want to animate the scaling down of a UIView, but not about its center: about a different point. As a shot in the dark, I tried translating the view, scaling, then translating back, using a series of CGAffineTransforms. But it doesn't work: it still scales about the center. Anyone know how to do this? Thanks very much.

    Read the article

  • Is it possible to dynamically add webcontrols via jQuery???

    - by Chris Conway
    Currently I have a webform that has a series of links. What I'd like to be able to do is add a webcontrol's content when one of the links is clicked. Is this kind of thing even possible? If not, what's the best strategy for loading a set of controls (one textbox and one dropdown with values from one link, two textboxes and a checkbox from another link, etc.). I'd need to be able get the values of each of these controls on postback. Ideally, I'd like to be able to add that new content to an acordian control, most likely the jQuery UI acordian. So each clickable link would add new content to an acordian control. What's everybody's thoughts on this?

    Read the article

  • Facebook API friends_get is extremely slow

    - by IkimashoZ
    I have a PHP application running in iFrame mode. I am rendering an <fb:multi-friend-selector condensed="true"> inside of <fb:serverfbml> tags. This is inside a PHP file that calls a function that gets a list of user IDs using $facebook->api_client->friends_get();. The multi-friend selector renders just fine, but, when I leave the friend_get() call uncommented, the page takes between 15-20 seconds to load (confirmed with Firebug)! The goal is to limit the number of users displayed in the selector by building a list of user ids not to display, for use in the friend selector's exclude_ids parameter. And since it's "exclude_ids" and not "include_ids", I can't think of a way of getting around this api call. It seems to me there must be something I can do to make the api call faster, because I've seen friend selectors that load much more quickly.

    Read the article

  • How to get page content using Javascript or JQuery

    - by Luke101
    Hello, I will have a widget on a remote page. In the widget I want javascript or jquery to get all the article content from the webpage and send it back to my website. I only need just the article content and not all the other information on the webpage. I would like the script to send the remote webpage url, page content, title text, and h1 text. I would not like to receive any html tags. Is this possible to do?

    Read the article

  • Email notifications of exceptions happening in a Python app?

    - by ming yeow
    Hi folks, I want to set up email notifications when there is an error happening in my application. In ruby, there is a very elegant solution called ExceptionNotifier, which wraps around the exception handler and uses the built-in mailer to send an email. What is the best way of doing this in Python? I know that this is a very common issue, so would love for any tips that you folks can share! PS: Code samples, pointers to modules would be AWESOME! Thanks!

    Read the article

  • Bootable backup of a Mac without an HFS+ disk?

    - by marienbad
    How can I make a bootable backup of my Mac's internal hard drive to be restored using Disk Utility, without formatting my external destination drive as HFS+ (it's FAT32, of course)? Time Machine and SuperDuper both require that the volume where the backup is saved be HFS+ formatted. This looks helpful: http://developer.apple.com/macosx/backuponmacosx.html But it doesn't explain how to use FAT32 disk.

    Read the article

  • How to control the time before Windows 7 wakes from standby and hibernates?

    - by Ricket
    Ever since I reformatted my laptop, it just hasn't been the same. Before reformatting I noticed that if it was in standby for around 24 hours, it would automatically wake up and go into hibernation. I think that's a pretty cool feature and I didn't mind it. But lately, it's been waiting only a few hours (maybe 3-6; I haven't really timed it or paid enough attention) before waking up from standby and going into hibernation. There have been a few instances where this has been bothersome, and I'd like to change it back to a nice long wait time. Where is this setting? What setting in Windows controls the time before the computer wakes up from standby and goes into hibernation?

    Read the article

  • SQLAuthority News – Guest Post – FAULT Contract in WCF with Learning Video

    - by pinaldave
    This is guest post by one of my very good friends and .NET MVP, Dhananjay Kumar. The very first impression one gets when they meet him is his politeness. He is an extremely nice person, but has superlative knowledge in .NET and is truly helpful to all of us. Objective: This article will give a basic introduction on: How to handle Exception at service side? How to use Fault contract at Service side? How to handle Service Exception at client side? A Few Points about Exception at Service Exception is technology-specific. Exception should not be shared beyond service boundary. Since Exception is technology-specific, it cannot be propagated to other clients. Exception is of many types. CLR Exception Windows32 Exception Runtime Exception at service C++ Exception Exception is very much native to the technology in which service is made. Exception must be converted from technology-specific information to natural information that can be communicated to the client. SOAP Fault FaultException<T> Service should throw FaultException<T>, instead of the usual CLR exception. FaultException<T> is a specialization of Fault Exception. Any client that programs against FaultException can handle the Exception thrown by FaultException<T>. The type parameter T conveys the error detail. T can be of any type like Exception, CLR Type or any type that can be serialized. T can be of type Data contract. T is a generic parameter that conveys the error details. You can read complete article http://dhananjaykumar.net/2010/05/23/fault-contract-in-wcf-with-learning-video/ Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, SQLAuthority News, T SQL, Technology

    Read the article

  • How Search Engine Optimization Can Improve Your Business

    Before I move on to how Search Engine Optimization in Toronto can improve your business, you need to familiarize yourself with search engine optimization (SEO). Many people think SEO is a very complex process with many steps and procedures involved. It is true to a certain extent as there are many things which have to be done in SEO, but SEO is simplified if you know the basics well.

    Read the article

  • Managing Images in Web Development

    Images are an important ingredient of web content. Since developers have little control over the display of website, they need to follow some norms to ensure perfect display of images on the target device. The prescribed standard of managing images while developing web pages are as follows:

    Read the article

  • MySQL - Mac - Error 2002 - Can't connect to local... through socket

    - by Sohrab Hejazi
    I had MySQL running fine on my Mac till earlier today when I installed homebrew and also updated my Path. When I try to run mysql from my ternimal window now, I get the following error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I can't connect MySQLAdmin either. I can't even run Mysqld. The error I get when trying to run mysqld is that it can't create test file. I also tried to tlenet loalhost 3306 and wasn't able to connect. Any help would be appreciated as I am fairly new to Mac.

    Read the article

  • How to display panels with component in frame

    - by terence6
    Why my JFrame 'frame' is diplaying empty window, when it should give me 3 menu buttons and my own painted JComponent below ? What am I missing here ? import java.awt.*; import javax.swing.*; public class Eyes extends JFrame { public static void main(String[] args) { final JFrame frame = new JFrame("Eyes"); frame.setPreferredSize(new Dimension(450, 300)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JPanel players = new JPanel(new GridLayout(1, 3)); players.add(new JButton("Eyes color")); players.add(new JButton("Eye pupil")); players.add(new JButton("Background color")); JPanel eyes = new JPanel(); eyes.add(new MyComponent()); JPanel content = new JPanel(); content.setLayout(new BoxLayout(content, BoxLayout.Y_AXIS)); content.add(players); content.add(eyes); frame.getContentPane(); frame.pack(); frame.setVisible(true); } } class MyComponent extends JComponent { public MyComponent(){ } @Override public void paint(Graphics g) { int height = 120; int width = 120; Graphics2D g2d = (Graphics2D) g; g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,RenderingHints.VALUE_ANTIALIAS_ON); BasicStroke bs = new BasicStroke(3.0f); g2d.setStroke(bs); g2d.setColor(Color.yellow); g2d.fillOval(200, 200, height, width); g2d.setColor(Color.black); g2d.drawOval(60, 60, height, width); } }

    Read the article

  • screen scraping

    - by sam
    hello folks., i am screen scraping a website which is in danish language.. i am unable to scrape certain characters as like må .. any idea to solve this? thanks

    Read the article

  • Problem accessing updated variables within OnTouch

    - by Jay Smith
    I have an OnTouch and a setOnTouchListener that updates varibles which contain screen coord info. The problem is it doesnt seem to ever update them. On line 78, RGB.setText(test); it never changes from 0.0. If i were to move that line and the line above it into the onTouch it updates. any idea what is wrong? Thank you. package com.evankimia.huskybus; import com.test.huskybus.R; import android.app.Activity; import android.os.Bundle; import android.view.MotionEvent; import android.view.View; import android.view.View.OnTouchListener; import android.widget.TextView; public class HuskyBus extends Activity { TextView RGB; private CampusMap mCampusMap; private float startX = 0; //track x from one ACTION_MOVE to the next private float startY = 0; //track y from one ACTION_MOVE to the next float scrollByX = 0; //x amount to scroll by float scrollByY = 0; //y amount to scroll by /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); RGB = (TextView) findViewById(R.id.coordBox); mCampusMap = (CampusMap) findViewById(R.id.map); mCampusMap.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub switch (event.getAction()) { case MotionEvent.ACTION_DOWN: // Remember our initial down event location. startX = event.getRawX(); startY = event.getRawY(); break; case MotionEvent.ACTION_MOVE: float x = event.getRawX(); float y = event.getRawY(); // Calculate move update. This will happen many times // during the course of a single movement gesture. scrollByX = x - startX; //move update x increment scrollByY = y - startY; //move update y increment startX = x; //reset initial values to latest startY = y; mCampusMap.invalidate(); break; }//end switch return false; } ; }); //end onDraw? String test = "" + scrollByX; RGB.setText(test); } }

    Read the article

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