Daily Archives

Articles indexed Sunday March 28 2010

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

  • How to Bridge Two Ethernet Ports on Mac OS X

    - by Rabarberski
    How can I bridge two wired ethernet interfaces on Mac OS X (e.g. the current MacPro comes with two ethernet ports)? Googling turned up (e.g. this Apple forum post and this openvpn post) that this is fairly easy on Linux (using the brctl command) and under Windows (via Network Connections right-click Bridge Connections), but how is it done under Mac OS X? BTW: There also doesn't seem to be a macport for brctl ('port search brctl' didn't turn up any results) Note: I don't want to have 'internet sharing', which creates a new network (by handing out network addresses in a new range). I want to really 'bridge' two interfaces so to keep the same network subnet.

    Read the article

  • PHP Array To Class Static Public Values.

    - by what
    I want to make a class that has all the values of an array as a static object in that class. For example: $vars=array(... );//some array with actual values $Class_code='class MyClass{'; for($i=0; $i<count($vars); $i++){ $Class_code.='static public $'.strval($vars[i]).';'; } eval($Class_code.'}'); /* When I echo the line above it says that the vars for MyClass (MyClass::vars) are missing even with strval(). */ So, how can I get $vars[i] to be a string if strval didn't work?

    Read the article

  • adding UIImageView to UIScrollView throws exception cocoa touch for iPad

    - by Brodie4598
    I am a noob at OBJ-C :) I am trying to add a UIImageView to a UIScrollView to display a large image in my iPad app. I have followed the tutorial here exactly: http://howtomakeiphoneapps.com/2009/12/how-to-use-uiscrollview-in-your-iphone-app/ The only difference is that in my App the View is in a seperate tab and I am using a different image. here is my code: - (void)viewDidLoad { [super viewDidLoad]; UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Cheyenne81"]]; self.imageView = tempImageView; [tempImageView release]; scrollView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height); scrollView.maximumZoomScale = 4.0; scrollView.minimumZoomScale = 0.75; scrollView.clipsToBounds = YES; scrollView.delegate = self; [scrollView addSubview:imageView]; } - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{ return imageView; } and: @interface UseScrollViewViewController : UIViewController<UIScrollViewDelegate>{ IBOutlet UIScrollView *scrollView; UIImageView *imageView; } @property (nonatomic, retain) UIScrollView *scrollView; @property (nonatomic, retain) UIImageView *imageView; @end I then create a UIScrollView in Interface Builder and link it to the scrollView outlet. Thats when I get the problem. When I run the program it crashes instantly. If I run it without linking the scrollView to the outlet, it will run (allbeit with a blnk screen). The following is the error I get in the console: 2010-03-27 20:18:13.467 UseScrollViewViewController[7421:207] * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key scrollView.'

    Read the article

  • Using Jquery.Form Plugin + MultiFile to automatically upload a single file

    - by Alan Neal
    I wanted to find a way to upload a single file*, in the background, have it start automatically after file selection, and not require a flash uploader, so I am trying to use two great mechanisms (jQuery.Form and JQuery MultiFile) together. I haven't succeeded, but I'm pretty sure it's because I'm missing something fundamental. Just using MultiFile, I define the form as follows... <form id="photoForm" action="image.php" method="post" enctype="multipart/form-data"> The file input button is defined as... <input id="photoButton" "name="sourceFile" class="photoButton max-1 accept-jpg" type="file"> And the Javascript is... $('#photoButton').MultiFile({ afterFileSelect: function(){ document.getElementById("photoForm").submit(); } }); This works perfectly. As soon as the user selects a single file, MultiFile submits the form to the server. If instead of using MultiFile, as shown above, let's say I include a Submit button along with the JQuery Form plugin defined as follows... var options = { success: respondToUpload }; $('#photoForm').ajaxForm(options); ... this also works perfectly. When the Submit button is clicked, the form is uploaded in the background. What I don't know how to do is get these two to work together. If I use Javascript to submit the form (as shown in the MultiFile example above), the form is submitted but the JQuery.Form function is not called, so the form does not get submitted in the background. I thought that maybe I needed to change the form registration as follows... $('#photoForm').submit(function() { $('#photoForm').ajaxForm(options); }); ...but that didn't solve the problem. The same is true when I tried .ajaxSubmit instead of .ajaxForm. What am I missing? BTW: I know it might sound strange to use MultiFile for single-file uploads, but the idea is that the number of files will be dynamic based on the user's account. So, I'm starting with one but the number changes depending on conditions.

    Read the article

  • Any good libraries for parsing JSON in Classic ASP?

    - by Mark Biek
    I've been able to find a zillion libraries for generating JSON in Classic ASP (VBScript) but I haven't been to find ANY for parsing. I want something that I can pass a JSON string and get back a VBScript object of some sort (Array, Scripting.Dictionary, etc) Can anyone recommend a library for parsing JSON in Classic ASP?

    Read the article

  • SQLAuthority News Author Visit to Nepal TechMela 2 Technical Sessions

    Microsoft MDP Nepal is going to organize a Tech Mela for the IT community of Nepal on March 29 & 30, 2010 (2066 Chaitra 16 & 17), Monday and Tuesday, at the Russian Center for Science & Culture, Kamalpokhari, Kathmandu. The objective of the event is to enhance and exchange knowledge about Information Technology, as [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • OS X: How to show all files in chooser dialogs

    - by Stabledog
    On OS X 10.5 and 10.6 at least, the command to enable all files in Finder only affects Finder Windows -- the "/File /Open" dialogs on applications still show a limited set of files, ignoring nearly all the Unix stuff. Is there a setting which enables ALL file dialogs of ALL types to show ALL files? I really am a big boy and promise not to harm them! :)

    Read the article

  • Key word extraction in Python

    - by oliland
    I'm building a website in django that needs to extract key words from short (twitter-like) messages. I've looked at packages like topia.textextract and nltk - but both seem to be overkill for what I need to do. All I need to do is filter words like "and", "or", "not" while keeping nouns and verbs that aren't conjunctives or other parts of speech. Are there any "simpler" packages out there that can do this? EDIT: This needs to be done in near real-time on a production website, so using a keyword extraction service seems out of the question, based on their response times and request throttling.

    Read the article

  • Linux Kernel Module - Creating proc file - proc_root undeclared error

    - by Zach
    I copy and paste code from this URL for creating and reading/writing a proc file using a kernel module and get the error that proc_root is undeclared. This same example is on a few sites so I assume it works. Any ideas why I'd get this error? Does my makefile need something different. Below is my makefile as well: Example code for a basic proc file creation (direct copy and paste to get initial test done): http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html#AEN769 Makefile I'm using: obj-m := counter.o KDIR := /MY/LINUX/SRC PWD := $(shell pwd) default: $(MAKE) ARCH=um -C $(KDIR) SUBDIRS=$(PWD) modules

    Read the article

  • Why isn't this simple PHP/MySQL code working?

    - by Sammy
    I am very new to php/mysql and this is causing me to loose hairs, I am trying to build a multi level site navigation. In this part of my script I am readying the sub and parent categories coming from a form for insertion into the database: // get child categories $catFields = $_POST['categories']; if (is_array($catFields)) { $categories = $categories; for ($i=0; $i<count($catFields); $i++) { $categories = $categories . $catFields[$i]"; } } // get parent category $select = mysql_query ("SELECT parent FROM categories WHERE id = $categories"); while ($return = mysql_fetch_assoc($select)) { $parentId = $return['parent']; } The first part of my script works fine, it grabs all the categories that the user has chosen to assign a post by checking the checkboxes in a form and readies it for insertion into the database. But the second part does not work and I can't understand why. I am trying to match a category with a parent that is stored in it's own table, but it returns nothing even though the categories all have parents. Can anyone tell me why this is? p.s. The $categories variable contains the sub category id.

    Read the article

  • DataMapper and Codeigniter - how to fully manage a many-to-many relationship

    - by user252160
    I have the following relationship CType has many Field Field has many Ctype and of course the tables used are fields, ctypes, and ctypes_fields. Normally, the ctypes_fields table should contain only ids referencing the other two tables. However, i'd like to put there a "options" field that will contain some content for the concrete instance only. I walked through all DataMapper tuts but I could'n find relevant info on how I could extract these specific values (the ones in the relation table) Should I create a separate model for this relation table or there is a clever way to do this ?

    Read the article

  • Web Automation Tool

    - by Aaron
    I've realized I need a full-fledged browser automation tool for testing user interactions with our JavaScript widget library. I was using qunit, starting with unit testing and then I unwisely started incorporating more and more functional tests. That was a bad idea: trying to simulate a lot of user actions with JavaScript. The timing issues have gotten out of control and have made the suite too brittle. Now I spend more time fixing the tests, then I do developing. Is it possible to find a browser automation tool that works in: Windows XP: IE6,7,8, FF3 OSX: Safari, FF3 ? I've looked into SeleniumIDE and RC, but there seems to be some IE8 problems. I've also seen some things about Google's WebDriver, which confusingly seems to work with Selenium. Our organziation has licenses for IBM's Rational Functional Tester, but I don' think that will work on the MAC. The idea is to try to run tests on all the browsers our organization supports. Doable? Are my requirements unrealistic? Any recommendations as far as software to try? Thanks!

    Read the article

  • Windows File Server -- Where To Start

    - by yodie
    I have a Windows 2003 server, a whole load of PDFs on it that need to be accessed from various computers, both on the local network and not, and including mobile devices, and files that have to be sent to it. Where do I start? The most important thing (after getting the job done) is security.

    Read the article

  • Perform manual test, automate after - or never?

    - by dotnetdev
    In my current company, we have one tester. Having spoken to this tester, she says that in testing, before implementing any automation systems, the scripts (steps to take) are manually written and performed (performed at least once). Is this the way things work in testing? To make me laugh, this has been done in this case, yet no automation. It makes me laugh to see the lead tester perform loads of different combinations of usernames and passwords for a login form (which she is not overly keen on having automated) when I could easily automate that (but politics in the company won't allow that). This doesn't seem like the environment where a junior tester (not me, I'm a SDET) cannot learn anything. Thanks

    Read the article

  • Get UPN or email for logged in user in a .NET web application

    - by DrStalker
    I'm not a .NET developer, and I have a feeling this would be trivial for someone who is: I have a C# web application that makes user of the user credentials of the logged in user. Currently it uses the SID which comes from System.Security.Principal.WindowsIdentity.GetCurrent().User.Value I need to get either the users UPN login or email address (as defined in active directory) instead of the SID. GetCurrent() returns an object of type WindowsIdentity; looking in the details for WindowsIdentity Members: MSDN: WindowsIdentity Members I can't see anything that looks like it would give me either the UPN or email in there. How can I pull up that information to use, either by feeding the SID into some other function or calling something different in the first place.

    Read the article

  • VSTS 2008 Database Edition doesn't seem to know 'DATEADD' constants, any ideas?

    - by Marcel Marchon
    I'm trying to implement a database build using VSTS 2008 Database Edition. The build always fails on the following constraint: ALTER TABLE [dbo].[tablename] ADD CONSTRAINT [DF_tablename_date] DEFAULT (CONVERT([varchar],dateadd(hour,(-1),getdate()),(1))) FOR [date]; The error that it shows is the following: TSD03082: The name "hour" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. Anybody have an idea what is wrong here?

    Read the article

  • problem with IBoutlet UITableView connection

    - by ideafactory
    Hi,I'm having a problem with IBoutlet UITableView connection. It seems that the IBOutlet isn't connected to the TaleView. I set the delgate and the datasource to the files owner and set the iboutlet to the tableview in the nib. The tableview is well initialized. I just want to do some reloadData and it's not working. I try to do some deselectRow just to see if it isn't reloadData problem but it doesn't deselect so i assume that the iboutlet isn't associated with my tableview. This table view is in a viewcontroller that is called as a modalViewController. Here is some code: My .h file: @interface AddEditProjectsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UITextViewDelegate, UIAlertViewDelegate>{ IBOutlet UITableView *addEditProjectTable; } @property (nonatomic, retain) IBOutlet UITableView *addEditProjectTable; @end My .m file: - (void)viewWillAppear:(BOOL)animated { (...) [addEditProjectTable reloadData]; [super viewWillAppear:animated]; Thanks for any help! :)

    Read the article

  • Hiding/Unhiding Control in Gridview’s column - shifting problem

    - by lupital
    This is a follow up to my previous question: link text In gridview's column i have a linkbutton and a label under it. I want to hide/unhide label when linkbutton is clicked. I use javascript because i don't want any postbacks. The code: protected void gvwComments_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { LinkButton lButton = ((LinkButton)e.Row.Cells[2].FindControl("lbtnExpand")); Label label = ((Label)e.Row.Cells[2].FindControl("lblBody")); lButton.Attributes.Add("onclick", string.Format("HideLabel('{0}'); return false;", label.ClientID)); } } function HideLabel(button) { var rowObj = document.getElementById(button); if (rowObj.style.display == "none") { rowObj.style.display = "block"; } else { rowObj.style.display = "none"; } } The problem is that when I unhide the label by clicking on button, linkbutton is shifted a a bit upper it's original position in the cell. Is it possible to preserve linkbutton's position in the gridviews cell?

    Read the article

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