Search Results

Search found 543 results on 22 pages for 'lee marshall'.

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

  • iptables mac address filtering not work

    - by Tony Lee
    I block every port default by ufw and add iptables rules like this: sudo iptables -A INPUT -p tcp --dport 1723 -m mac --mac-source 00:11:22:33:44:55 -j ACCEPT then I list iptables INPUT rules: sudo iptables -L INPUT --line-numbers Chain INPUT (policy DROP) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:domain 2 ACCEPT tcp -- anywhere anywhere tcp dpt:domain 3 ACCEPT udp -- anywhere anywhere udp dpt:bootps 4 ACCEPT tcp -- anywhere anywhere tcp dpt:bootps 5 ufw-before-logging-input all -- anywhere anywhere 6 ufw-before-input all -- anywhere anywhere 7 ufw-after-input all -- anywhere anywhere 8 ufw-after-logging-input all -- anywhere anywhere 9 ufw-reject-input all -- anywhere anywhere 10 ufw-track-input all -- anywhere anywhere 11 ACCEPT tcp -- anywhere anywhere tcp dpt:1723 MAC 00:11:22:33:44:55 but I can't visit my server:1723 Is there sth wrong? I use Ubuntu 11.10

    Read the article

  • PHP accessible shared content between two websites on the same VPS on different domains/IPs

    - by Lee Fentress
    I have two ecommerce websites, selling music digital downloads, on the same VPS, currently using cPanel/WHM (but thinking of switching to Virtualmin). They have separate domains and IPs of course. They both share from the same set of music files, so I have duplicate copies in each website directory, which takes up a lot of disk space. How might I go about sharing the same set of music files across both sites, allowing PHP access, so that it does not break my shopping cart's functionality of serving customers the downloads after they have paid for them? I thought of maybe using symlinks or something, but I don't know if it's possible, or if it would have to somehow circumvent built-in security features of the server. I'm new to VPS management.

    Read the article

  • Has anyone used Sproutcore?

    - by Sam Lee
    Has anyone used Sproutcore for a web application? If so, can you give me a description of your experience? I am currently considering it, but I have a few concerns. First, the documentation is bad/incomplete, and I'm afraid that I'll spend lots of time figuring things out or digging through source code. Also, I'm a bit hesitant to use a project that is relatively new and could undergo significant changes. Any thoughts from people who have developed in Sproutcore are appreciated! EDIT/PS: Yes, I've seen this post: http://stackoverflow.com/questions/370598/sproutcore-and-cappuccino . However I'm interested in a bit lengthier description of Sproutcore itself from someone who's used it for a significant project.

    Read the article

  • What do you call the process of converting line breaks into html elements?

    - by Ben Lee
    On sites with user-created content (such as programmers SE) or blogging software back-ends, line breaks entered by the user in the content area are frequently converted into <br> and/or <p> tags when rendered on the front-end. For example, this: A limerick There once was a man from Nantucket Who kept all his cash in a bucket. Might render html like this: <p> A limerick </p> <p> There once was a man from Nantucket<br> Who kept all his cash in a bucket. </p> What is the standard name for this process of converting line breaks into html?

    Read the article

  • What is the best way to deal with 404s that are all trying to point to the same page that are from an external site?

    - by Lee
    I started getting 404s showing up in my Google Webmaster's Tools from a site linking to a specific category but with odd characters at the end of the url. So Something like this: http://example.com/category/puppies%EF%BC%9A.textwidget%E8%A6%81%E7%B4%A0%E7%B7%A8%E9%9B%86 Google Webmaster says that there are about 120 of these links and I can imagine there will be more to come. What is the best way to handle these links from an seo point-of-view? I have heard 301 redirecting too many links at one time can cause Google to ding the site but I don't want this site to continue posting broken links. Any help on this would be appreciated.

    Read the article

  • About cdn architecture to route way

    - by Tony Lee
    Our web system, use the third-party cdn service. Assume that the user set the local dns with the googledns or opendns to visit our web sites, so cdn service will select the closest cdn proxy node. all right, but in fact the user's actual access position might outside there, cdn service may chose the one furthest away from the user node, so static resource access slower.. At present, my idea is if user local set dns server with googledns, and then first one we get the actual ip address of the user, tracerote to test a best routing lines, set up a cookie in user browser, and then set 302 header for response to jump to the which best cdn node. Whether the user's browser side traceroute tool can provide the best route decision-making ? Because we find that, once the user to set local dns server with the foreign network segment, for example : set dns with 8.8.8.8, so cdn routing will choose the foreign service node.

    Read the article

  • Why is my Workspace switcher view skewed

    - by Lee
    I have been using Workspace switcher in Ubuntu just fine but recently have encountered this problem. The windows in the switcher don't fill the screen. I must have pressed some combination of buttons somehow but can't find any information anywhere in regards to resizing them. As you can see in the screen shot it looks like a perspective view or something. http://i1115.photobucket.com/albums/k553/lmt337/Screenshotfrom2012-07-04103519.png I should also add I have a dual monitor setup and nvidia graphics. The switcher still works but the fact the screens dont fit my actual screens is driving me nuts. Thanks in advance for any help.

    Read the article

  • XML Serialization in C# without XML attribute nodes

    - by Alex Marshall
    Hello, I have an XML document format from a legacy system that I have to support in a future application. I want to be able to both serialize and deserialize the XML between XML and C# objects, however, using the objects generated by xsd.exe, the C# serialization includes the xmlns:xsi..., xsi:... etc XML attributes on the root element of the document that gets generated. Is there anyway to disable this so that absolutely no XML attribute nodes get put out in the resulting XML ? The XML document should be elements only. Duplicate? XmlSerializer: remove unnecessary xsi and xsd namespaces

    Read the article

  • python numpy roll with padding

    - by Marshall Ward
    I'd like to roll a 2D numpy in python, except that I'd like pad the ends with zeros rather than roll the data as if its periodic. Specifically, the following code import numpy as np x = np.array([[1, 2, 3],[4, 5, 6]]) np.roll(x,1,axis=1) returns array([[3, 1, 2],[6, 4, 5]]) but what I would prefer is array([[0, 1, 2], [0, 4, 5]]) I could do this with a few awkward touchups, but I'm hoping that there's a way to do it with fast built-in commands. Thanks

    Read the article

  • How to call SQL Function with multiple parameters from C# web page

    - by Marshall
    I have an MS SQL function that is called with the following syntax: SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = 7 AND LocationName = ''Default'' ', 10) The first parameter passes a specific WHERE clause that is used by the function for one of the internal queries. When I call this function in the front-end C# page, I need to send parameter values for the individual fields inside of the WHERE clause (in this example, both the ClientID & LocationName fields) The current C# code looks like this: String SQLText = "SELECT Field1, COUNT(*) AS RecordCount FROM GetDecileTable('WHERE ClientID = @ClientID AND LocationName = @LocationName ',10)"; SqlCommand Cmd = new SqlCommand(SQLText, SqlConnection); Cmd.Parameters.Add("@ClientID", SqlDbType.Int).Value = 7; // Insert real ClientID Cmd.Parameters.Add("@LocationName", SqlDbType.NVarChar(20)).Value = "Default"; // Real code uses Location Name from user input SqlDataReader reader = Cmd.ExecuteReader(); When I do this, I get the following code from SQL profiler: exec sp_executesql N'SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationID nvarchar(20)', @ClientID=7,@LocationName=N'Default' When this executes, SQL throws an error that it cannot parse past the first mention of @ClientID stating that the Scalar Variable @ClientID must be defined. If I modify the code to declare the variables first (see below), then I receive an error at the second mention of @ClientID that the variable already exists. exec sp_executesql N'DECLARE @ClientID int; DECLARE @LocationName nvarchar(20); SELECT Field1, COUNT(*) as RecordCount FROM GetDecileTable (''WHERE ClientID = @ClientID AND LocationName = @LocationName '',10)', N'@ClientID int,@LocationName nvarchar(20)', @ClientID=7,@LocationName=N'Default' I know that this method of adding parameters and calling SQL code from C# works well when I am selecting data from tables, but I am not sure how to embed parameters inside of the ' quote marks for the embedded WHERE clause being passed to the function. Any ideas?

    Read the article

  • Py2exe, PyQt4 and Postgre Driver (QPSQL)

    - by Marshall
    Hi, I`m trying to freeze my application using Py2exe. My app uses PyQt4 and it apparently works fine with py2exe. But once I`ve uninstalled PyQt, it shows the following error: QSqlDatabase: QPSQL driver not loaded QSqlDatabase: available driver: QPSQL7 QPSQL Which doesn't make sense at all. If PyQt4 is still installed, it works just fine. This is my py2exe parameters: data_files = [ ('sqldrivers', [ 'C:\Python26\Lib\site-packages\PyQt4\plugins\sqldrivers\qsqlpsql4.dll' ]) ] setup(console=["delivery.py"], options={"py2exe" : {"includes" : ["sip", "PyQt4.QtSql", "PyQt4.QtWebKit", "PyQt4.QtNetwork"]}}, data_files=data_files)

    Read the article

  • Best practices for Subversion and Visual Studio projects

    - by Alex Marshall
    I've recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that's built from a cobbling-together of various programs and scripts written in C and Perl. The projects I'm now working on have reached critical mass for being committed to subversion. I was wondering what should and should not be committed to the repository for Visual Studio projects. I know that it's going to generate various files that are just build-artifacts and don't really need to be committed, and I was wondering if anybody had any advice for properly using SVN with Visual Studio. At the moment, I'm using an SVN 1.6 server with Visual Studio 2010 beta. Any advice, opinions are welcome.

    Read the article

  • "no such file to load -- treetop/runtime" running "rake jobs:work"

    - by Ryan Marshall
    when i try and run the "rails server" or "rake jobs:work" i get the error: "no such file to load -- treetop/runtime" full trace: macbook-pro-2:domain ryan$ rake jobs:work --trace(in /Applications/htdocs/domain) rake aborted! no such file to load -- treetop/runtime /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68:in require' /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:68 /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61:ineach' /opt/local/lib/ruby/gems/1.8/gems/mail-2.2.14/lib/mail.rb:61 /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1:in require' /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed/performable_mailer.rb:1 /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5:inrequire' /opt/local/lib/ruby/gems/1.8/gems/delayed_job-2.1.2/lib/delayed_job.rb:5 /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:in require' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:64:inrequire' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:in each' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:62:inrequire' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:in each' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:51:inrequire' /opt/local/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:112:in require' /ApApplications/htdocs/domain/config/application.rb:7 /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' /Applications/htdocs/domain/Rakefile:4 /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:inload' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2383:in raw_load_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:inload_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:inload_rakefile' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:instandard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/local/bin/rake:19:inload' /opt/local/bin/rake:19 in my Gemfile i have: "gem 'delayed_job'"

    Read the article

  • Bad Practice requiring file within a model?

    - by Lee Marshall
    I have built an MVC php application and was wondering, if instead of having to write out a large amount of html and set the data, could I not just have all this html (with some php) in a separate file and just require it? For example: $test = '<div> Test content <div>More content</div> </div>'; $APP->Template->setData('test', $test, FALSE); Instead could I not just use: $test = require("includes/content.php"); $APP->Template->setData('test', $test, FALSE); Would this be considered as bad practise? It just seems that by requiring files, it can shorten the length of controllers. Would be good to get anybodies advice on this matter.

    Read the article

  • Re-using Buttons in WPF

    - by Alex Marshall
    I have a bunch of different objects that are commonly edited in the same TabControl using different DataTemplates, but I want each DataTemplate to have a common look and feel with Ok and Cancel buttons at the bottom right of each tab that will close the tab or save the content and then close the currently selected tab. What's the best way to place buttons on each tab ? Is there a way to do it without copying and pasting the buttons and stack panel across all of my data templates ?

    Read the article

  • Shared library linking and loading in BusyBox 0.61

    - by Alex Marshall
    Does anybody know how the dynamic linking and shared library loading works in BusyBox 0.61 ? I can't seem to find how this is done. There's no 'ld' present on the embedded system I'm dealing with, nor is there an LD_LIBRARY_PATH variable set anywhere. My motivation for this is to be able to create a symlink in the /lib directory to another directory on a different device (with considerably more storage space) for adding in more shared libraries, as the file system that contains /lib is a ramdisk that gets reloaded on startup and is within a few kb of being completely full (so we can't add more libraries to the image, nor can we obtain devices with more memory for the ramdisk)

    Read the article

  • How to add XML elements into the toolbox in Visual Studio 2010 RC

    - by Alex Marshall
    I'm trying to edit an XML schema in Visual Studio 2010 Ultimate RC, but when I go to the toolbox (with the schema open and focused) there's absolutely nothing in the Toolbox view, even when every tutorial out there that I've read tells me that there should be. I've tried using the context menu option for resetting the Toolbox to no effect. Is there something I'm missing ? Something I need to install to get this feature of Visual Studio going ?

    Read the article

  • How can I get jQuery validation plugin Ketchup to stop an Ajax form submission when validation fails?

    - by Marshall Sontag
    I'm using Ruby on Rails, Formtastic gem, jQuery and ketchup to validate my form. I'm submitting the form created by Formtastic inside a modal box using ajax: <% semantic_form_remote_for @contact_form, :url => '/request/contact' do |f| %> I have a validation plugin verifying the fields on the form: $(document).ready(function() { $("#new_contact_form").ketchup(); }); The problem is that semantic_form_remote_for generates an onSubmit ajax request that the jQuery validation plugins won't prevent, since it's not a normal form submission. One question on stackoverflow suggests using :condition on the remote form declaration to fire a javascript function, but I can't do that since I'm not using a function, but rather relying on a jQuery handler. I also tried putting ketchup within a submit event handler: $(document).ready(function() { $("#new_contact_form").submit(function() { $('#new_contact_form').ketchup(); }); }); No luck. Form still submits. I also tried using the beforeSend option of jQuery.ajax: $(document).ready(function() { jQuery.ajax( { beforeSend: function(){ $('#new_contact_form').ketchup(); } }); }); Validation fires off, but form is still submitted. I switched to jQuery Validation plugin just to see if it was due to some limitation in Ketchup. It turns out that Validation has a submitHandler option: $(document).ready(function() { $('#new_contact_form').validate({ submitHandler: function(form) { jQuery.ajax({ data:jQuery.param(jQuery('#new_contact_form').serializeArray()), dataType:'script', type:'post', url:'/request/contact' }); return false; } }); }); This works when I use a regular semantic_form_for instead of semantic_form_remote_for, but alas, I would rather use Ketchup. Is Ketchup just woefully lacking? Am I forced to use jQuery Validation?

    Read the article

  • How do I stop displaying a J2ME MIDP application, just before destroying it?

    - by Paul Marshall
    I have a J2ME application where the user has the option to dial a phone number from within the application. This should be the last thing the user does with the app, so it should stop displaying anything. My current code: public void callAndExit() { // use a platform-specific request to dial MyMidletThingummy.getInstance().platformRequest( "tel:" + number ); notifyDestroyed(); } The call works just fine, uses the phone's native way of calling, etc. The problem is that, just after the call completes (whenever the user hangs up), my application displays for a split second before being destroyed. Is there something I can do so that I stop displaying the MIDlet (and, say, show the phone's home screen or whatever else it would rather display), then dial out?

    Read the article

  • Android: Hiding the keyboard in an overrided "Done" keypress of EditText

    - by Marshall Ward
    Hello, I have used a bit of Android code to override the "Done" button in my EditText field: myEditField.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { mySubroutine(); return true; } return false; } }); Activating the field calls up the keyboard, and pressing "Done" evaluates mySubroutine() successfully. However, the keyboard no longer goes away when I press "Done". How do I restore this default behaviour to the routine?

    Read the article

  • Unable to find reference to std library math function inside library

    - by Alex Marshall
    Hello, I've got several programs that use shared libraries. Those shared libraries in turn use various standard C libraries. ie Program A and Program B both use Shared Library S. Shared Library S uses std C math. I want to be able to statically link Shared Library S against the standard library, and then statically link Programs A and B against S so that I don't have to be dragging around the library files, because these programs are going to be running on an embedded system running BusyBox 0.61. However, when I try to statically link the programs against Shared Library S, I get an error message from GCC stating : ../lib/libgainscalecalc.a(gainscalecalc.): In function 'float2gs': [path to my C file].c:73: undefined reference to 'log' Can somebody please help me out ? The make commands I'm using are below : CFLAGS += -Wall -g -W INCFLAGS = -I$(CROSS_INCLUDE)/usr/include LIBFLAGS += -L$(CROSS_LIB)/usr/lib -lm gainscalecalc_static.o: gainscalecalc.c $(CC) $(CFLAGS) -c $< -I. $(INCFLAGS) -o $@ gainscalecalc_dynamic.o: gainscalecalc.c $(CC) $(CFLAGS) -fPIC -c $< -o $@ all: staticlib dynamiclib static_driver dynamic_driver clean: $(RM) *.o *.a *.so *~ driver core $(OBJDIR) static_driver: driver.c staticlib $(CC) $(CFLAGS) -static driver.c $(INCFLAGS) $(LIBFLAGS) -I. -L. -lgainscalecalc -o $@ dynamic_driver: driver.c dynamiclib $(CC) $(CFLAGS) driver.c -o $@ -L. -lgainscalecalc staticlib: gainscalecalc_static.o $(AR) $(ARFLAGS) libgainscalecalc.a gainscalecalc_static.o $(RANLIB) libgainscalecalc.a chmod 777 libgainscalecalc.a dynamiclib: gainscalecalc_dynamic.o $(CC) -shared -o libgainscalecalc.so gainscalecalc_dynamic.o chmod 777 libgainscalecalc.so Edit: Linking against the shared libraries compiles fine, I just haven't tested them out yet

    Read the article

  • Performance of fopen vs stat

    - by Alex Marshall
    Hello, I'm writing several C programs for an embedded system where every bit of performance we can squeeze out will matter. Part of that is accessing log files. When determining if a file exists, is there any performance difference between using open / fopen, and stat ? I've been using stat on the assumption that it only has to do a quick check against the file system, whereas fopen would have to actually gain access to a file and manipulate internal data structures before returning. Is there any merit to this ?

    Read the article

  • Basic CHMOD restriction

    - by Marshall Mathews
    i have an uploads folder on my website. What i want to do is restrict users from accessing like i dont want them to go to www.mysite.com/uploads/ and see the files in there and it should show forbidden, but they should be able to download via my website, for example www.mysite.com/downloads.php?id=1 If thats not possible, how can i atleast not show them the directory index on /uploads How is it that file sharing websites does this? An htaccess with deny from all stops php from accessing the file as well Please tell me a solution if you would know, i googled and asked on irc a few days ago about this issue, its pretty confusing to me.

    Read the article

  • Specifying both multiple targets and multiple build files with ant or subant in 1.6

    - by Paul Marshall
    I'm trying to unify a build process, running one build to get multiple packages. My first shot at this is just having a central build script call <ant or <subant on each project's build.xml file. I'm using Ant 1.6, and I've run into a funny problem: either I use the <ant task, and I can specify multiple targets but not multiple build files, or I use the <subant task, and I can specify multiple build files but not multiple targets. I realize there's a few solutions here already: Just upgrade to Ant 1.7 already; <antcall can do multiple targets there. Edit the separate project build files to have a variety of top-level targets, so I can call each individual file with just one target, and use <antcall. Copy-paste a lot of <ant tasks, with a little help from <macrodef to help the sanity. Is there something I've missed, that will allow me to do what I want from this single central build.xml without a) editing individual project files, b) writing lots of repetitive code, or c) upgrading Ant, and that d) doesn't require editing every time I add a new project?

    Read the article

  • Should I return an NSMutableString in a method that returns NSString

    - by Casey Marshall
    Ok, so I have a method that takes an NSString as input, does an operation on the contents of this string, and returns the processed string. So the declaration is: - (NSString *) processString: (NSString *) str; The question: should I just return the NSMutableString instance that I used as my "work" buffer, or should I create a new NSString around the mutable one, and return that? So should I do this: - (NSString *) processString: (NSString *) str { NSMutableString *work = [NSMutableString stringWithString: str]; // process 'work' return work; } Or this: - (NSString *) processString: (NSString *) str { NSMutableString *work = [NSMutableString stringWithString: str]; // process 'work' return [NSString stringWithString: work]; // or [work stringValue]? } The second one makes another copy of the string I'm returning, unless NSString does smart things like copy-on-modify. But the first one is returning something the caller could, in theory, go and modify later. I don't care if they do that, since the string is theirs. But are there valid reasons for preferring the latter form over the former? And, is either stringWithString or stringValue preferred over the other?

    Read the article

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