Search Results

Search found 2579 results on 104 pages for 'mike monkiewicz'.

Page 63/104 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • curb not working with rails

    - by Mike
    I have a simple class that is using curb to retrieve data. Everything works just find from the command line, but when I load it into my rails application WebBrick crashes on the "require 'curb'" statement. I'm extremely new to ruby so I'm not sure how exactly to debug the error from webbrick to determine what is wrong. If someone knows how to solve this issue that would be great, if someone could also point me into the right direction to start troubleshooting the issue myself that would also help.

    Read the article

  • Extracting fields from a define-type object in Scheme

    - by Mike
    Hi, I am trying to extract the field 'name' or 'named-expr' from the following object: (bind 'x (num 5)) ;; note that this is not a list, but a type Binding With the Binding definition: (define-type Binding (bind (name symbol?) (named-expr WAE?))) I have tried, but received the error "reference to an identifier before its definition: Binding-name." Here is what I tried typing: (begin (Binding-name (bind 'x (num 5)))) (begin (define x (bind 'x (num 5))) (Binding-name x)) Thank you!

    Read the article

  • Apache issue with subdomains

    - by mike
    I just setup a subdomain with the following RewriteCond: RewriteCond $1 !^search.php$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/?([^/]+)$ search.php?q=$1 [L,NS] I'm using the same rewrite condition on my main domain and it works perfectly. However, when I set it up on the subdomain, it simply outputs "index.php" when going to http://subdomain.domain.com Every page on the subdomain outputs the page name in the body instead of processing the code, except for the search page, which appears to be working correctly. Any idea why every page but the search page works? What can I do to correct it?

    Read the article

  • Get username of opened file

    - by Mike L.
    Is there a way to learn the username of the user that has a file open? I am developing a program that will be a desktop client for many users. The application will open some files and I'd like to allow many users to open the files at the same time, but only allow the first user to have write privileges. What I want is to be able to tell the other users who has write access to a file. Is that something that can be learned by an application? (I am developing in VS 2008).

    Read the article

  • The following grammar is LL1, SLR, LR(1), LALR?

    - by Mike
    P - {D ; C} D - d; D| d C - c; C | c a) Is the grammar LL(1)? Explain your answer. b) Is the grammar SLR(1)? Explain your answer. c) Is the grammar LR(1)? Explain your answer. d) Is the grammar LALR? Explain your answer. As for my answers I actually got no for them all... so I'm thinking I did something wrong Here is my explanation. a) It is not LL(1) because it is not left factored. b) It is not SLR, because of the transition diagram item 2 ( which is... ) D- d . ; D D- d . We need to consult the follow set, Follow(D) = ; Therefore this is not SLR c) It is not LR(1) because of... item 1 P- {D.;C} , $ D- .d;D , ; D- .d , ; item 2 D- d.; D , ; D- d. , ; item 3 D- d; . D , ; D- .d;D , ; D- .d , ; Since item 2 goes to item 3 with ;, AND "D- d."'s (in item 2) look ahead token is also ;. this causes a reduce to shift conflict, therefore this grammar is not LR(1) d) This grammar is not LALR because it is not LR(1) Thanks for your help!

    Read the article

  • Add UIView Above All Other Views, Including StatusBar

    - by Mike Stead
    I'm wanting to create a view (UIControl) which blocks all input and shows a UIActivityIndicatorView while authenticating a user. The UIActionSheet and UIAlertView both manage to add a black semi-transparent view over the top of all other views to block input and I'd like to do similar. I've tried adding my view to the top UIWindow in the [[UIApplication sharedApplication] windows] array, and while this does place it above the UIKeyboard if it's visible, it doesn't place it over the StatusBar (which makes sense). My next attempt was to extend UIAlertView, remove all of its subviews and set its layer.contents = nil, then add the ActivityIndicator as a subview. This works well, but I can't seem to kill the default bouncy transition of the UIAlertView when you call it to "show". Does anyone have any pointers towards the best way tackle this problem that gives me full control? Oh and I know blocking input is not great but I do ensure it's for a short period of time and it has the benefit of making it clear to the user that their action, which must complete for them to progress, is processing.

    Read the article

  • How to add custom header to ASMX web service call using jquery?

    - by Mike
    I have a web service with the following contract: POST /Service/service.asmx HTTP/1.1 Host: xxx.xxx.xxx Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "xxx.xxx.xxx/Service/Method" <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <Request xmlns="xxx.xxx.xxx/Service/"> <transactiontype>string</transactiontype> <username>string</username> <password>string</password> </Request> </soap:Header> <soap:Body> <Method xmlns="xxx.xxx.xxx/Service/"> <xml>xml</xml> </Method> </soap:Body> </soap:Envelope> And I am trying to call the service using jquery. This is my code: $.ajax({ url: serverUrl + 'Method', type: "POST", dataType: "xml", data: { xml: "xml" }, beforeSend: function (req) { req.setRequestHeader('Header', '<Request xmlns="xxx.xxx.xxx/Service/">' +'<transactiontype>4</transactiontype>' +'<agencyName>name</agencyName>' +'<username>user</username>' +'<password>pass</password>' +'</Request>'); }, success: function (data) { alert(data.text); }, error: function (request, status, errorThrown) { alert(status); } }); However, the header content is not passed to the web service? How would I go about passing the header credentials to my web service call?

    Read the article

  • Button outside view... how to make it work

    - by Mike
    I have a UIImageView based class that creates objects with the following characteristics: a small image square and a UITextView below. If the user drags the object by the image it can drag it around. If the user taps on the UITextView the keyboard has to appear and the user can change the text on it. The objects created by the class are like this: 1) the object creates a 60x60 pixels frame 2) puts an image inside that frame 3) creates a UITextView and puts it below that 60x60 frame. So, as the class is a UIImageView based and it creates an image with 60x60 pixels and the UITextView is located outside that area, in theory the text view is outside the area the tapping are for that object. Obviously I could make the class create a big square to encompass the image and the text view, but that frame would be too big and I have the objects created by this class to be as close as possible when I add them to another view. I could also create the text views from the same view I created the objects, but I would have to manage each object and each correspondent text view and I need them to move together... so, I have a problem. Any ideas on a simplest way to do that?

    Read the article

  • animate rotation

    - by Mike
    I'm trying to animate a rotation using CATransform3DMakeRotation, but the problem is once the animation is finished, the image goes back to its initial position, i.e back to zero. But I'd like to keep it where it finished rotating. How would I do that? edit What I'm trying to do is to create the same compass which comes with the new iPhone. Basically the locationmanager gives me new headings every few seconds (or several per second). Using the new heading and the timestamp, I was trying to get a smooth animation of the image but not getting anywhere. The only thing which seems to work is applying the transform directly, e.g. compassimage.layer.transform = CATransform3DMakeRotation(newHeading.trueHeading *M_PI/180,0,0,1.0): but that's not animated...

    Read the article

  • Preventing spam bots on site?

    - by Mike
    We're having an issue on one of our fairly large websites with spam bots. It appears the bots are creating user accounts and then posting journal entries which lead to various spam links. It appears they are bypassing our captcha somehow -- either it's been cracked or they're using another method to create accounts. We're looking to do email activation for the accounts, but we're about a week away from implementing such changes (due to busy schedules). However, I don't feel like this will be enough if they're using an SQL exploit somewhere on the site and doing the whole cross site scripting thing. So my question to you: If they are using some kind of XSS exploit, how can I find it? I'm securing statements where I can but, again, its a fairly large site and it'd take me awhile to actively clean up SQL statements to prevent XSS. Can you recommend anything to help our situation?

    Read the article

  • Using conditionals in Linq Programatically

    - by Mike B
    I was just reading a recent question on using conditionals in Linq and it reminded me of an issue I have not been able to resolve. When building Linq to SQL queries programatically how can this be done when the number of conditionals is not known until runtime? For instance in the code below the first clause creates an IQueryable that, if executed, would select all the tasks (called issues) in the database, the 2nd clause will refine that to just issues assigned to one department if one has been selected in a combobox (Which has it's selected item bound to the departmentToShow property). How could I do this using the selectedItems collection instead? IQueryable<Issue> issuesQuery; // Will select all tasks issuesQuery = from i in db.Issues orderby i.IssDueDate, i.IssUrgency select i; // Filters out all other Departments if one is selected if (departmentToShow != "All") { issuesQuery = from i in issuesQuery where i.IssDepartment == departmentToShow select i; } By the way, the above code is simplified, in the actual code there are about a dozen clauses that refine the query based on the users search and filter settings.

    Read the article

  • WITH statement in Java

    - by Mike Clark
    In VB.NET there is the WITH command that lets you omit an object name and only access the methods and properties needed. For example: With foo .bar() .reset(true) myVar = .getName() End With Is there any such syntax within Java? Thanks!

    Read the article

  • Are the contents of a fragment visible outside the host plugin?

    - by Mike Daniels
    I have never worked with plug-in fragments before. I thought that by creating a new class within a fragment and exporting the package that contains it in the fragment's manifest, I'd be able to access that class from another plug-in that already has a dependency on the host plug-in. However, I cannot seem to make this work. Are the contents of a fragment ever visible to any plug-in besides the host plug-in? If so, is there something special I have to do to allow this?

    Read the article

  • Using MPI under VC++ MFC project?

    - by Mike
    Does any body know how can I use MS_MPI in my VC++ MFC project? I already have a big MFC project and I only want to use parallel processing in a part of it with MPI. (I know how to use MPI in a separate code, but I don't know how to integrate it with my VC++ MFC project)

    Read the article

  • Downloading a picture via urllib and python.

    - by Mike
    So I'm trying to make a Python script that downloads webcomics and puts them in a folder on my desktop. I've found a few similar programs on here that do something similar, but nothing quite like what I need. The one that I found most similar is right here (http://bytes.com/topic/python/answers/850927-problem-using-urllib-download-images). I tried using this code: >>> import urllib >>> image = urllib.URLopener() >>> image.retrieve("http://www.gunnerkrigg.com//comics/00000001.jpg","00000001.jpg") ('00000001.jpg', <httplib.HTTPMessage instance at 0x1457a80>) I then searched my computer for a file "00000001.jpg", but all I found was the cached picture of it. I'm not even sure it saved the file to my computer. Once I understand how to get the file downloaded, I think I know how to handle the rest. Essentially just use a for loop and split the string at the '00000000'.'jpg' and increment the '00000000' up to the largest number, which I would have to somehow determine. Any reccomendations on the best way to do this or how to download the file correctly? Thanks!

    Read the article

  • .net runtime type casting when using reflection

    - by Mike
    I have need to cast a generic list of a concrete type to a generic list of an interface that the concrete types implement. This interface list is a property on an object and I am assigning the value using reflection. I only know the value at runtime. Below is a simple code example of what I am trying to accomplish: public void EmployeeTest() { IList<Employee> initialStaff = new List<Employee> { new Employee("John Smith"), new Employee("Jane Doe") }; Company testCompany = new Company("Acme Inc"); //testCompany.Staff = initialStaff; PropertyInfo staffProperty = testCompany.GetType().GetProperty("Staff"); staffProperty.SetValue(testCompany, (staffProperty.PropertyType)initialStaff, null); } Classes are defined like so: public class Company { private string _name; public string Name { get { return _name; } set { _name = value; } } private IList<IEmployee> _staff; public IList<IEmployee> Staff { get { return _staff; } set { _staff = value; } } public Company(string name) { _name = name; } } public class Employee : IEmployee { private string _name; public string Name { get { return _name; } set { _name = value; } } public Employee(string name) { _name = name; } } public interface IEmployee { string Name { get; set; } } Any thoughts? I am using .NET 4.0. Would the new covariant or contravariant features help? Thanks in advance.

    Read the article

  • Perl, efficient parsing of csv file

    - by Mike
    I'm working on a project that involves parsing a large csv formatted file in Perl and am looking to make things more efficient. My approach has been to split() the file by lines first, and then split() each line again by commas to get the fields. But this suboptimal since at least two passes on the data are required. (once to split by lines, then once again for each line). This is a very large file, so cutting processing in half would be a significant improvement to the entire application. My question is, what is the most time efficient means of parsing a large CSV file using only built in tools? note: Each line has a varying number of tokens, so we can't just ignore lines and split by commas only. Also we can assume fields will contain only alphanumeric ascii data (no special characters or other tricks). Also, i don't want to get into parallel processing, although that might work effectively.

    Read the article

  • How do I use IIS6 style metabase paths in IIS7 AppCmd tool?

    - by Mike Atlas
    I'm currently in the process of upgrading old II6 automation scripts that use the IISVdir tool to create/modify/update apps and virtual directories, and replacing them with AppCmd for IIS7. The IIS6, "IISVDir" commands reference paths in that are from the metabase, eg, "/W3SVC/1/ROOT/MyApp" - where 1 is ID of the "Default Web Site" site. The command doesn't actually require the display name of the site to make changes to it. This works well, since on a different language OS, the "Default Web Site" site name could be named, for example, "??? Web ???" or anything else for that matter. But this flexibility is lost if AppCmd can only reference "Default Web Site" via its name, and not a language-neutral identifier. So, how can I script AppCmd to refer to sites, vdirs and apps using language neutral identifiers to reference the "Default App Site"? Perhaps I need to start creating my own site instead, from the start, and name it something else specific, and stop using "Default Web Site" as the root? (Disclosure: I only have a IIS7-English machine that I am working on currently, but I have both IIS6-English and IIS6-Japanese machines for testing my old scripts - so perhaps it really is just "Default Web Site" still on Win2k8-Japanese?)

    Read the article

  • wrong interface orientation or unknown

    - by Mike
    The problem is this: I put the simulator in landscape I start the app The app is unable to detect the correct orientation, always unknown! I have created a sample project that demonstrates the problem I have. Take it here How can I solve that? thanks

    Read the article

  • How to update non-scalar entity properties in EF 4.0?

    - by Mike
    At first I was using this as an extension method to update my detached entities... Public Sub AttachUpdated(ByVal obj As ObjectContext, ByVal objectDetached As EntityObject) If objectDetached.EntityState = EntityState.Detached Then Dim original As Object = Nothing If obj.TryGetObjectByKey(objectDetached.EntityKey, original) Then obj.ApplyCurrentValues(objectDetached.EntityKey.EntitySetName, objectDetached) Else Throw New ObjectNotFoundException() End If End If End Sub Everything has been working great until I had to update non-scalar properties. Correct me if I am wrong but that is because "ApplyCurrentValues" only supports scalars. To get around this I was just saving the FK_ID field instead of the entity object relation. Now I am faced with a many to many relationship so its not that simple. I would like to do something like this... Dim Resource = RelatedResource.GetByID(item.Value) Condition.RelatedResources.Add(Resource) But when I call SaveChanges the added Resources aren't saved. I started to play around with self-tracking entities (not sure if they will help solve my prob) but it seems they cannot be serialized to ViewState and this is a requirement for me. I guess one solution would be to add the xRef table as an entity and add the fks myself but I would rather it just work how I expect it too. I am open to any suggestions on how to either save my many to many relationships or serialize self-tracking entities (if self-trackingwould even solve my problem). Thanks!

    Read the article

  • How can a hacker put a file on my server root (apache, php, 1and1)

    - by mike-sav
    Hi there, I have a site hosted on 1and1 and a couple of weeks ago I noticed a hacker had put a .php file on the server that when viewed in a browser exposed my DB schema, DB connection strings, FTP account (for file uploads using a form), etc, etc. Naturally I panicked and I wiped the server and reuploaded my files. Fortunatley I encrypt passwords using MD5 and I don't store things like credit card details, etc, etc. Now I checked my files and with all user input I use a clean function (htmlentities, sql_real_escape_string, etc, etc) that strips the input of any XSS or SQL injection. I have also made sure that the session key gets re-engineered when a user status changes (like they log into their account) to prevent session hijacking, my folder permissions are set to 755 and file permission are 644. Has anyone got any idea how this could have happened? Or if I'm missing something

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >