Search Results

Search found 7418 results on 297 pages for 'argument passing'.

Page 157/297 | < Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >

  • tar - exclude certain files

    - by Alan
    I wish to tar all files in a directory and its subdirectories that do NOT end in .jpg, .bmp, .gif, or png. So, given the following folders and files: foo/file.txt foo/file.gif foo/bar/file foo/bar/image.jpg I want to tar only the files file.txt and file. file.gif and image.jpg should be ignored. I would also like to maintain the folder structure. My first thought was to pipe the results of the find command in conjunction with grep -v ".jpg|.gif|.bmp.png" to a text file, and then use the tar include argument to feed it that list of files. However, the results of the grepped find command also contain directories (in the example above, it would be "foo" and "foo/bar"), and when a directory is fed to tar, it includes all files in that directory, so I would end up with a tar file containing all of the files--not what I want. Is there any way to prevent find from outputting directories? Is there a far easier way to approach this?

    Read the article

  • What do you do when you need whole-words search in Firefox?

    - by romkyns
    Example: I am looking to see if "arg" is a special keyword in Lua. I go to the Lua reference manual at http://www.lua.org/manual/5.1/manual.html. I search for "arg". I find hundreds of occurrences of the word "argument(s)" or "vararg". Any ideas? I know Firefox won't implement whole words as a core feature (something about cluttering up the ui... argh...), and I couldn't find a good addon that implemented this well.

    Read the article

  • PHP MVC correct usage

    - by Ratt
    What is the correct (recommended method) for passing information to a view in a MVC environment. Currently we use Zend Framework, where we write classes to handle specific things EG a Book class with a save and load method to retrieve info from the DB, which is called from a particular nameAction(). What I would like to know is what is the best way to pass this information to the view, in some cases we do $this-view-book_name = $book-getBookName(); and in other cases we do the following $this-view-book = $book; OR $this-view-books = Book_Manager::getAllBooks(); and then access the object(s) properties in the view. Information on-line suggests we try limit what access a view has to information, i.e pass them only what they need and in some cases people say its ok to pass stuff through as long as nothing is done to that information. Regards

    Read the article

  • if an outdated, vulnerable but clean Windows machine is connected to network behind router, can it be detected and attacked?

    - by EndangeringSpecies
    suppose the machine is clean of all malware but not in any sense updated, patched, secured etc. Suppose I connect it to the internet from behind wireless router with the intent of using it only on a few trusted sites and only there. Or, for the sake of argument, maybe I wouldn't do any browsing at all, just let it sit there connected to the network. This is all happening in a residential situation with cable internet. In this situation can a remote attacker somehow detect the fact that the machine is connected to the internet and try connecting to do an exploit?

    Read the article

  • Getting Bad file descriptor when running Tornado AsyncHTTPTestCase

    - by Will
    When running a test using the Tornado AsyncHTTPTestCase I'm getting a stack trace that isn't related to the test. The test is passing so this is probably happening on the test clean up? I'm using Python 2.7.2, Tornado 2.2. The test code is: class AllServersHandlerTest(AsyncHTTPTestCase): endpoint = AllServersHandler.endpoint # '/rest/test/' def test_server_status_with_advertiser(self): on_new_host(None, '127.0.0.1') response = self.fetch(self.endpoint, method='GET') result = json.loads(response.body, 'utf8').get('data') self.assertEquals(['127.0.0.1'], result) The test passes ok, but I get the following stack trace from the Tornado server. OSError: [Errno 9] Bad file descriptor INFO:root:200 POST /rest/serverStatuses (127.0.0.1) 0.00ms DEBUG:root:error closing fd 688 Traceback (most recent call last): File "C:\Python27\Lib\site-packages\tornado-2.2-py2.7.egg\tornado\ioloop.py", line 173, in close os.close(fd) OSError: [Errno 9] Bad file descriptor Any ideas how to cleanly shutdown the test case?

    Read the article

  • PayPal Fetch Token

    - by arik-so
    Hello, I am using the PayPal API for Express Checkout Integration. Upon setting the Express Checkout, one gets to a page with a token, like this page: https://api-3t.sandbox.paypal.com/nvp The token looks more or less like that ACK=Failure&L_ERRORCODE0=81002&L_SHORTMESSAGE0=Unspecified%20Method&L_LONGMESSAGE0=Method%20Specified%20is%20not%20Supported&L_SEVERITYCODE0=Error My Question is: how do I fetch this toke by means of PHP? I do not want to be redirected to that page beforehand. How do I just fetch the contents of a remote file after passing certain post parameters? Thanks in advance!

    Read the article

  • Implementing callback functions in C

    - by robertjohn123
    Hi, I am a newbie to C.I am trying to implement callback function using function pointers. I am getting an error :test_callback.c:10: error: expected identifier or ‘(’ before ‘void’ when I try to compile the following program: #include<stdio.h> void (*callback) (void); void callback_proc () { printf ("Inside callback funtion\n"); } void register ((void (*callback) (void))) { printf ("Inside registration \n"); callback (); /* Calling an initial callback with function pointer */ } int main () { callback = callback_proc;/* Assigning function to the function pointer */ register (callback);/* Passing the function pointer */ return 0; } What is this error?Can anyone help?

    Read the article

  • Pass 2d array to function in C?

    - by Evelyn
    I know it's simple, but I can't seem to make this work. My function is like so: int GefMain(int array[][5]) { //do stuff return 1; } In my main: int GefMain(int array[][5]); int main(void) { int array[1800][5]; GefMain(array); return 0; } I referred to this helpful resource, but I am still getting the error "warning: passing argument 1 of GefMain from incompatible pointer type." What am I doing wrong?

    Read the article

  • Enumerating all combinations of lists of different types

    - by jball
    Given two IEnumberables of different types, what is the best practice (considering readability and maintainability) for iterating over both lists to perform an action on all possible combinations? My initial solution was to use nested foreach loops, iterating over the first IEnumerable, and then within that loop, iterating over the second IEnumerable and passing the value from the outer and the current loop into the target method. Eg.: enum ParamOne { First, Second, Etc } List<int> paramTwo = new List<int>() { 1, 2, 3 }; void LoopExample() { foreach (ParamOne alpha in Enum.GetValues(typeof(ParamOne))) { foreach (int beta in paramTwo) { DoSomething(alpha, beta); } } } I tried to restructure it with LINQ, but ended up with something that had no obvious advantages and seemed less intuitive. A search here shows lots of questions about nesting foreachs to iterate over child properties, but I couldn't find anything about iterating over two distinct lists.

    Read the article

  • Can I pass the LHS of a cfengine3 processes: line to the RHS?

    - by joeforker
    I'm using cfengine to start the foobar process. Apparently the LHS is discarded when I use process_select? Can I simply pass the LHS to a function, rather than having to put the command match pattern in a body argument? bundle agent foobar { processes: "foobar" # documented way would be to use .* here process_select => command("foobar"), restart_class => start_foobar; commands: start_foobar:: "/usr/bin/foobar"; } body process_select command(c) { command => "$(c)"; process_result => "command"; }

    Read the article

  • web service with no input parameter

    - by cateof
    I have a WSDL with various portTypes. Some of the contain only output <operation name="getServerTimeZone"> <output message="s0:getServerTimeZoneSoapOut"/> </operation> I would expect that the correct should be: <operation name="getServerTimeZone"> <input message="s0:getServerTimeZoneSoapIn"/> <output message="s0:getServerTimeZoneSoapOut"/> </operation> The problem is that when I am trying to create stubs from the WSDL using gsoap wsdl2h parser I got the following error: No wsdl:definitions/portType/operation/input I haven't tested with other tools (ie WSDL2Java). My question: Is it valid to have a portType with no input? I am using AltovaXML Spy and this WSDL passes the validation.... Is there any meaning having WSDL operation with no input? (I am not talking about One-Way Message Passing, where you can have input but no output - this is valid).

    Read the article

  • Remove binding to FrameworkElementFactory

    - by Damien
    I am currently creating a datatemplate to display data in a listview control in a specific manner and bound to the data. This works fine. But I need to be able to remove the bindings when the screen is closed and control is being disposed. How can I do this? I am thinking of just passing null as the second parameter of SetBinding and not sure if this will fix the issue. Also I have tried BindingOperation.ClearBindings, but I have a FrameworkElementFactory object and not a DependancyObject. Any help would be appricaited. //Create a Element Factory object to save the elements that make //up the DataTemplate cellTemplateFactory = new FrameworkElementFactory(typeof(TextBlock)); //Set the binding to the text property of the textblock element var binding = new Binding(dispColumn.BindingField) { TargetNullValue = string.Empty, Mode = BindingMode.OneTime };

    Read the article

  • Scriptom (groovy) leaves Excel process running - am I doing something wrong?

    - by Alex Stoddard
    I am using the Scriptom extension to Groovy 1.7.0 to automate some processing using Excel 2007 under Windows XP. This always seems to leave an Excel process running despite my calling quit on the excel activeX object. (There is a passing reference to this phenomenon in the Scriptom example documentation too.) Code looks like: import org.codehaus.groovy.scriptom.ActiveXObject; def xls = new ActiveXObject("Excel.Application") xls.Visible = true // do xls stuff xls.Quit() The visible excel window does disappear but an EXCEL process is left in the task manager (and more processes pile up with each run of the script). There are no error message or exceptions. Can anyone explain why the Excel process is left behind and is there any way to prevent it from happening?

    Read the article

  • Calling DLL functions from VB6.

    - by Tim Ring
    I've got a Windows DLL that I wrote, written in C/C++ (all exported functions are 'C'). The DLL works fine for me in VC++. I've given the DLL to another company who do all their development in VB. They seem to be having a problem linking to the functions. I haven't used VB in ten years and I don't even have it installed. What could be the problem? I've declared all my public functions as follows: define MYDCC_API __declspec(dllexport) MYDCCL_API unsigned long MYDCC_GetVer( void); . . . Any ideas? Finally got back to this today and have it working. The answers put me on the right track but I found this most helpful: http://www.codeproject.com/KB/DLL/XDllPt2.aspx Also, I had a few problems passing strings to the DLL functions, I found this helpful: http://www.flipcode.com/archives/Interfacing_Visual_Basic_And_C.shtml

    Read the article

  • rsync - How to exclude one .htaccess but not all of them

    - by Cory Gagliardi
    I have an rsync command for copying my files from dev to production. I don't want to copy the .htaccess file that's in the root of the HTML directory but, I do want to copy the few .htaccess files that are in its sub directories. I'm using the argument --exclude .htaccess which is stopping all of the files from getting copied. The other arguments I'm including are -a --recursive --times --perms. Is it possible to configure rsync to do this? Edit: Here is my full command: rsync -a --recursive --times --perms \ --exclude prop_images --exclude tracking --exclude vtours \ --exclude .htaccess --exclude .htaccess_backup --exclude "*~" \ /home/user/dev_html/* /home/user/public_html/

    Read the article

  • Exchange 2010 Room Mailbox Calendar Permissions

    - by Brian Mitchell
    Exchange 2010 sp2 Outlook 2007/2010 Server 2008 I have managed to set up several room mailboxes in exchange, people are able to book the rooms and they get a response from the exchange server. this is brilliant. however users are unable to view the calendar of the room mailbox to see what times are available, in a ideal world I would like users to only see if the room is free or not. I dont want users to see the details of the meeting (title, description etc) I have been trying to do this using the following command Add-MailboxFolderPermission -Identity meetingroom -User "Usergroup" -AccessRights AvailabilityOnly -DomainController AD-Server This throws the following error Specified argument was out of the range of valid values. Parameter name: memberRights + CategoryInfo : NotSpecified: (meetingroom:MailboxFolderIdParameter) [Add-MailboxFolderPermission], Argum entOutOfRangeException + FullyQualifiedErrorId : CBC6516F,Microsoft.Exchange.Management.StoreTasks.AddMailboxFolderPermission Any help on the situation would be brilliant, i have been trying to get this done for a couple of days and im going around in circles.

    Read the article

  • Cisco IOS router config -- how to disable SSH / SNMP on all but loopback address?

    - by chris
    Sorry for the naive question; a quick reading of the cisco docs doesn't answer this question... So I've got a router (say for the sake of argument a 4500 running IOS 15.x) It has interfaces in 3 different subnets -- 10.0.0.1/24, 10.0.1.1/24, and 10.0.2.1/24 It also has a loopback address of 172.16.0.33 How do I make it so that SSH / SNMP and other administrative traffic works on the 172 address but doesn't work on the IP addresses I wish to only use for L3 forwarding? Ideally this can be done by disabling the control plane access to these interfaces not just by using an ACL, but whatever, I don't actually care that much as long as it works... Thanks!

    Read the article

  • Inject WCF proxy with credentials using StructureMap

    - by Steve Horn
    I have a service proxy generated by svcutil which generated an interface(IStudentContract) and a concrete type implementing (StudentContractClient). I'd like to have instances of StudentContractClient injected into my classes via StructureMap. My proxy also needs to have credentials supplied as seen in this passing unit test: <Test()> _ Public Sub Then_the_web_service_call_should_not_throw_an_exception() Dim studentServiceProxy As New StudentContractClient Dim credential As New NetworkCredential credential.Domain = ConfigurationManager.AppSettings("something") credential.UserName = ConfigurationManager.AppSettings("something") credential.Password = ConfigurationManager.AppSettings("something") studentServiceProxy.ClientCredentials.Windows.ClientCredential = credential Dim result = studentServiceProxy.GetCurrentTeachersByStudentSepid(26899) result.Count.ShouldEqual(4) End Sub My question is what would the structuremap configuration look like to have instances of IStudentContract injected with the credentials supplied? Thanks for any help!

    Read the article

  • Port Redirection on Mac OS X Lion

    - by Andreas
    I have tried to solve this issue using pf but with no luck. Basically, I am trying to redirect incoming port 443 traffic to port 22. I have tried to set up a rule in a file and load it in pf but I get syntax error. Can anyone with more experience with pf provide some insight? Here's what I've attempted: pass in on en1 proto tcp from any to any port 443 rdr-to 127.0.0.1 port 22 and pass in quick proto tcp to port 443 rdr-to 127.0.0.1 port 22 I've been able to do this in MacOSX Snow Leopard with ipfw: sudo ipfw add 1443 forward 127.0.0.1,22 ip from any to any 443 in but it doesn't work in Lion (it gives me an Invalid Argument error).

    Read the article

  • How to efficiently handle Where and OrderBy clauses

    - by Goran
    My business layer passes all the required information to UI layer. From what I have read, in general, best practice is to send fetched data to UI layer, and to avoid passing queries like ObjectQuery. My problem with this approach is next: If I am to make a flexible business layer, then I should allow UI to sort the data anyway it requires. Fetching sorted data from database, and then resorting them in UI is kind of bad practice for me, so the only way is to somehow So what are my options? Is there a way to make it like this: public void OrderByMethod(params ...) { .... } so I can call it like this: OrderByMethod(MyEntity.Property1, MyEntity.Property2 descending....); Thanks, Goran

    Read the article

  • Is there a RAR extractor (for multiple rar files like .r00 etc.) that will use all of my quad cores?

    - by Christopher Done
    I've got a quad core Intel processor. I've got a big file split into little ones as RAR files, foo.r00, foo.r01, etc. which the RAR program extracts into one file/directory. Is there a RAR program that I can specify like "use four cores" in the extract process? At the moment it sits there using 100% of one core. I recognise the bottleneck might be my hard drive anyway, but I don't see a lot of HD usage and suspect the decompression process is more intensive than waiting on I/O. For example, GNU Make accepts a (-j, I think) argument to tell it how many cores to use, which I used to compile PHP 6 really quickly.

    Read the article

  • Assigning a view controller to be the delegate of a subview which is not directly descendent?

    - by ambertch
    I am writing an iphone app where in numerous cases a subview needs to talk to its superview. For example: View A has a table view that contains photos A has a subview B which allows users to add photos, upon which I want to auto append them to A's table view So far I have been creating a @protocol in B, and registering A as the delegate. The problem in my case is that B has a subview C that allows users to add content, and I want actions in C to invoke changes in its grandparent, A. Currently I am working around this by passing around a self pointer to my base view controller (C.delegate = B.delegate), but it doesn't seem very proper to me. Any thoughts? (and/or general advice on code organization when all sort of subviews needs to talk to superviews would be greatly appreciated) Thanks!

    Read the article

  • iPhone - UITableViewController not loading table

    - by RyanJM
    I'm pushing a UITableViewController onto a navigationController. The title (set in the viewDidLoad) shows up but not the table. numberOfSectionsInTableView is called. But tableView:numberOfRowsInSection: is not called. I'm passing in 1 so it should be looking for number of rows. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } I'm setting up the view in the following manner: SelectUserViewController *nextController = [[SelectUserViewController alloc] initWithStyle:UITableViewStyleGrouped]; nextController.managedObjectContext = managedObjectContext; OrangeQCAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.navigationController pushViewController:nextController animated:YES]; Again, the viewDidLoad method is called. And my class is set up as follows: @interface SelectUserViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource> {...} What else should I be looking at? When I go through the debugger, after it looks at numberOfSectionsInTableView it just disappears (I think it is in the UITableViewController class) and never comes back.

    Read the article

  • jquery cookie - hoursToLive

    - by mathiregister
    Hi guys, i'm using the jquery cookie plugin. Everything works fine except the fact that I have no idea how to set an expiration-time for the cookie? $.cookie('opt_visible', 'true'); the jquery-cookie documentation says: hoursToLive (DEPRECATED for expiresAt) NUMBER For how many hours should the cookie be valid? (Passing 0 means to delete the cookie at the end of the browser session--this is default. Negative values will delete the cookie, but you should use the del() method instead.) That's exactly what I'd like to have. The cookie should be available as long as i'm browsing the site. As soon as i close the window or browsertab, the cookie should be deleted. How can i implement this hoursToLive thingy to my mentioned line above? Thank you

    Read the article

  • asp.net session error

    - by umeshchaurasia
    HI all, I am working with asp.net with c#.net Here i am using session state to pass the value from one page to another. i have two pages, in first page i am calculating the value and passing the value to second page using session and in second page i am displaying the message through the value. I am using these two pages for facebook application. I uploaded my two pages then i am checking with facebook by opening through internet explorer and its giving below error. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. But when i open my application using firefox the pages are working fine. please help me...

    Read the article

< Previous Page | 153 154 155 156 157 158 159 160 161 162 163 164  | Next Page >