Search Results

Search found 2210 results on 89 pages for 'stupid phil'.

Page 51/89 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • Storing extended IIdentity in HttpContext.Current.User (IPrinciple)

    - by UpTheCreek
    I have created an ExtendedId class which extends GenericIdentity. (This stores Id as well as name) In a httpmodule I stored this extended id in Current.User like so: HttpContext.Current.User = new GenericPrincipal(myExtendedId, roles); Problem is, later, how do I get at my ExtendedId type again? If I try this: ExtendedId eId = (ExtendedId)HttpContext.Current.User.Identity; I get a casting error. I have a feeling I'm doing something stupid here with casting, but I'm a bit foggy this morning.

    Read the article

  • Can Core Data be used on Linux?

    - by glenc
    This might be a stupid question, but I was wondering whether or not you can use the Core Data libraries on Linux at all? I'm planning how to build the server side of an iPhone app that I'm working on, and have found that you can use PyObjC to get access to Core Data in a Python environment, e.g. use Core Data in a TurboGears web application. At this point I'm thinking that you would have to run the web server on Mac OSX, because I can't find any evidence on the internet that you can access the Objective-C libraries on Linux. I've always written webapps on Linux but will obviously make the jump to an OSX server if it allows me to use the same datastore implementation on the iPhone and the server, the only job remaining being the Core Data <- Web Services XML translation that has to happen on the wire.

    Read the article

  • Ruby on Rails Foreigner plugin not working for SQL Server

    - by Earlz
    Well, now that I've finally got my stupid ODBC stuff configured, I took a schema.rb file that I dumped from a Postgres database and did a db:schema:load on it in a Rails project configured for SQL Server. Well, it sets up all the schema in the SQL Server database except for a minor detail: No foreign keys are created. The rake command doesn't show any errors and does say it is adding foreign keys. But they don't actually get added. This is the last bit from the command: -- add_foreign_key("workhistoryform", "form", {:name=>"workhistoryform_form_rid_fkey", :column=>"form_rid", :primary_key=>"form_rid"}) -> 0.0002s -- initialize_schema_migrations_table() -> 0.0092s -- assume_migrated_upto_version(0) -> 0.0942s [earlz@earlzarch avp_msql_migrations]$ So what is the problem? Does the Foreigner plugin not work in SQL Server? If it didn't I'd expect to see an error or something...

    Read the article

  • PHP array : simple question about multidimensional array

    - by Tristan
    Hello, i've got a SQL query which returns multiple rows, and i have : $data = array( "nom" => $row['nom'] , "prix" => $row['rapport'], "average" => "$moyenne_ge" ); which is perfect, but only if my query returns one row. i tried that : $data = array(); $data[$row['nom']]["nom"] = $row['nom'] ; ... $data[$row['nom']]['average'] = "$moyenne_ge"; in order to have : $data[brand1][nom] = brand1 $data[brand1][average] = 150$ $data[brand2][nom] = brand2 $data[brand2][average] = 20$ ... but when i do : json_encode($data) i only have the latest JSON object instead of all JSON object from my request as if my array has only one brand instead of 10. I guess i did something stupid somewhere. Thanks for your help

    Read the article

  • WSDL: What do I do with it? Add service Reference? Noobie question

    - by Johnny
    Hey guys! I have been given a WSDL with all the method requests and responses, and all the objects I'll need to use for creating a few webmethods. The thing is, I don't know what to do with it. I've added the WSDL as a Service Reference. I can see the methods and structures, I can instantiate them, it's all there, but the project doesn't build as soon as I add the WSDL. "Error 2 The type name 'ServiceReference1' does not exist in the type 'WSPELab.WSPELab' C:\Users\JJ\Documents\Visual Studio 2008\Projects\WSPELab\WSPELab\Service References\ServiceReference1\Reference.cs 21 111 WSPELabSLN Is it a stupid namespace error on my part? EDIT : Forgot to add this. With the WSDL added, can I used the structures it contains directly? Or are they just "listings" for me to implement? Thanks!

    Read the article

  • Search Netflix using API without the user being logged in?

    - by Felix
    I'm trying to search Netflix through their API, but without logging anyone in (because I want to do this on the back-end, not necessarily related to any user action). I'm just starting off with their API so please forgive me if I'm doing something completely stupid. Here's the URL I'm trying to access: http://api.netflix.com/catalog/titles/?oauth_consumer_key=MY_CONSUMER_KEY&oauth_token_secret=MY_SECRET&term=fight+club However, that gives me a 400 Bad Request error. Is there no way to browse/search the Netflix catalog without having a user first sign in to my application? Or am I doing something wrong? Note: I'm accessing said URL through my browser, since I only want to perform a GET request, which is what a browser does by default.

    Read the article

  • OpenGLES mix and match blending options complicated question

    - by DevDevDev
    So I have a background line drawing, black and white. I want to be able to draw over this, keeping the black lines in there, and drawing only where it is white. I can do this by using glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA); And the black stays black and white gets whatever color I want. However in the white areas, I want to be able to draw some color, pick to another color and then blend. However this doesn't work because the blend function is messed up. So what I was thinking is having a linedrawing framebuffer, and a user-drawing framebuffer. The user draws into the userdrawing framebuffer, with a different blending, and then I switch blending options and draw into the linedrawing framebuffer. But i don't know enough OpenGL to say whether or not this will work or is a stupid idea. Thanks a lot

    Read the article

  • create manually parameter ReturnUrl

    - by user276640
    i have view like 'home/details/5', it can be access by anonymous user. but there is button, which can be pressed only by registered users. no problem, i can look into Request.IsAuthenticated , and if anonymous i show button login instead of secret button but the problem- when press login i can lose address and parameters of page. how can i create login button and pass a parameter ReturnUrl ? something like <%= Html.ActionLink("enter to buy", "LogOn", "Account", new { ReturnUrl = path to view with route value })%> i see only stupid solution <%= Html.ActionLink("enter to buy", "LogOn", "Account", new { ReturnUrl = "home/details/" + ViewContext.RouteData.Values["id"] })%> but i don't like to hard code names of controller

    Read the article

  • Select on multiple criteria with XPath

    - by Matt Thrower
    I have an XML document which looks something like this: <meadinkent> <record> <comp_div>MENSWEAR</comp_div> <sty_ret_type>ACCESSORIES</sty_ret_type> <sty_pdt_type>BELTS</sty_pdt_type> <pdt_category>AWESOME_BELTS</pdt_category> </record> <medinkent> I want to useXPath to select nodes which match all four elements and I'm having trouble getting the boolean syntax right. I'm trying this to match the first two just as a test: "/meadinkent/record/comp_div[.='" & comp_div & "'] and /meadinkent/record/sty_ret_type[.='" & sty_ret_type & "']" Which is failing, saying no nodes are returned. Obviously I'm being very stupid - what am I doing wrong? Cheers, mAtt

    Read the article

  • is it possible to have an sqlite database in a sqlserver field?

    - by Behrooz
    I think my question seems to be vague. I am trying to save user settings in SQLServer, but the problem can be expressed in this term:"it needs 20 tables with circular dependencies. and i have enough tables to fill 3 database diagrams", so the best way encountered to my brain is to save it as a sqlite database in a field, like this: Index |Name |Data 1 |Behrooz |*sqlite database here* 2 |User1 |*sqlite database here* ... is this way the right way?is it stupid? should i create more tables instead of doing all these? does it increase database fragmention?

    Read the article

  • Clear all class variables between instances

    - by ensnare
    This is probably a stupid question, but what's the best way to clear class variables between instances? I know I could reset each variable individually in the constructor; but is there a way to do this in bulk? Or am I doing something totally wrong that requires a different approach? Thanks for helping ... class User(): def __init__(self): #RESET ALL CLASS VARIABLES def commit(self): #Commit variables to database >>u = User() >>u.name = 'Jason' >>u.email = '[email protected]' >>u.commit() So that each time User is called the variables are fresh. Thanks.

    Read the article

  • IE Mixed Content Warining when using https URLs and http:443 URLs?

    - by Campbeln
    I'm getting the good ole' "This page contains both secure and nonsecure items." dialog in IE when connecting to an HTTPS site. No big deal... I've just got something coming in over a non-secure connection so that should be an easy fix, right? So I go into "View Web Page Privacy Policy..." to look to see where I've included an HTTP file, and this is what I see... https://blah/path/to/file.htm https://blah/path/to/file.js http://blah:443/path/to/file.css Um... ok... so... there is an HTTP only URL being requested, but it is going over port 443 ("https://blah/" is shorthand for "http://blah:443/") so... What is the deal with this!? IE 7.0.5730.13 can't possibly be THAT stupid, can it? Is there an IIS setting that needs to be tweaked?

    Read the article

  • Updating the datalist in a RadComboBox

    - by jphenow
    So I'm just struggling with a lot of little things in the web app so I'm checking up with all kinds of stuff to make sure i'm not breaking it cause of stupid problems. At some point in my web app (trying to keep it mostly Asynchronous) I have to update the list in my RadComboBox because something was added. Do I just need to call RadComboBox.DataBind() again? Since I don't explicitly use its datasource(I do it in the manual insert using a string fashion) object to insert my new record do I need to tell that to update? The list just doesn't seem to update when i just call databind so I feel like i need to have the datasource recheck for entries or SOMETHING Thanks

    Read the article

  • Using sub filters/queries in Google App Engine

    - by fredrik
    Hi, I'm trying to use figure out how to sub query a query that uses a filter. From what I've figured out so far while using .filter() it changes the original query, that leads to a second .filter() would also have to match the first filter. I would like to make something like this: modules = data.Modules.all().filter('page = ', page.key()) modules.filter('name = ', 'Test') modules.filter('name = ', 'Test2') I can't get the "Test2" filter to work. The only solution I have at the moment is to make all new queries. data.Modules.all().filter('page = ', page.key()).filter('name = ', "Test").get() data.Modules.all().filter('page = ', page.key()).filter('name = ', "Test2").get() Or write the same as an GQL. But for me it seams quite stupid way to go. I've looked at using ancestors, but I don't quite understand it and honestly don't know if that's the way to go. Any ideas? ..fredrik

    Read the article

  • Swing combo boxes

    - by Dalton Conley
    Alright, so I'm simply defining a combo box like so... JComboBox yearSelect = new JComboBox(); Now, I have not even added this to a panel or anything, I've just defined it. When I run the app, nothing displays.. when I comment out this line.. the app displays the other panels like I want it to.. is there something I'm doing wrong? Maybe I'm forgetting something that has to do with combo boxes? I think it may be something stupid that I'm missing.

    Read the article

  • Scala method where type of second parameter equals part of generic type from first parameter

    - by ifischer
    I want to create a specific generic method in Scala. It takes two parameters. The first is of the type of a generic Java Interface (it's from the JPA criteria query). It currently looks like this: def genericFind(attribute:SingularAttribute[Person, _], value:Object) { ... } // The Java Interface which is the type of the first parameter in my find-method: public interface SingularAttribute<X, T> extends Attribute<X, T>, Bindable<T> Now i want to achieve the following: value is currently of type java.lang.Object. But I want to make it more specific. Value has to be the of the same type as the placeholder "_" from the first parameter (and so represents the "T" in the Java interface). Is that somehow possible, and how? BTW Sorry for the stupid question title (any suggestions?)

    Read the article

  • Emacs, Cedet and semantic

    - by synasius
    Hello everyone, I've configured CEDET for emacs following Alex article (great!!). Now, the questions: 1 - i've generated GTAGS with Gnu Global in my /usr/include, how can i check if semantic is using GTAGS? 2 - can I keep my GTAGS in another directory and instruct semantic to use that dir?? 3 - In c/c++ sources, completion on include statement (from system headers) doesn't list all available headers. Ok, this is a stupid problem.. but makes me think something is not working right Thanks for your help!

    Read the article

  • Problems with South/Django: not recognizing the Django App

    - by christmasgorilla
    I've got a Django project on my machine and when I try to use South to migrate the data schema, I get several odd errors. Example: $ python manage.py convert_to_south thisLocator /Library/Python/2.6/site-packages/registration/models.py:4: DeprecationWarning: the sha module is deprecated; use the hashlib module instead import sha /Users/cm/code/thisLocator/../thisLocator/batches/models.py:6: DeprecationWarning: the md5 module is deprecated; use hashlib instead import md5 There is no enabled application matching 'thisLocator'. I've followed the South documentation. Settings.py has it in the installed apps, I can run import south from the manage.py shell. Everyone else on my team is calling the app thisLocator. Am I doing something really stupid?

    Read the article

  • Unity3D, Torque3D, Google O3D, WebGl....which to choose?

    - by gpwjg
    for development of interactive 3d web applications, which engine is recommended? I am aware that WebGL has been anounced to become standarized for all browsers in the near future (1~2 years). I am afraid that by investing time into a proprietary game engine such as Unity, torque would be not great once plugin-less open source 3d engines appear (webgl & 3D javascript). Is this a stupid thing to worry about ? Should I begin with Unity3D (it's demo's and tools were mind blowing).

    Read the article

  • Build Environment setup - Using .net, java, hudson, and ruby - Could really use a critique

    - by Jeff D
    I'm trying to figure out the best way to stitch together a fast, repeatable, unbreakable build process for the following environment. I've got a plan for how to do it, but I'd really appreciate a critique. (I'd also appreciate some sample code, but more on that later) Ecosystem - Logical: Website - asp.net MVC 2, .net 3.5, Visual Studio 2010. IIS 6, Facebook iframe application application. This website/facebook app uses a few services. An internal search api, an internal read/write api, facebook, and an IP geolocation service. More details on these below Internal search api - .net, restful, built using old school .ashx handlers. The api uses lucene, and a sql server database behind the scenes. My project won't touch the lucene code, but does potentially touch the database and the web services. internal read/write api - java, restful, running on Tomcat Facebook web services A mocking site that emulates the internal read/write api, and parts of the facebook api Hudson - Runs unit tests on checkin, and creates some installers that behave inconsistently. Ecosystem - Physical: All of these machines can talk to one another, except for Hudson. Hudson can't see any of the target machines. So code must be pulled, rather than pushed. (Security thing) 1. Web Server - Holds the website, and the read/write api. (The api itself writes to a replicated sql server environment). 2. Search Server - Houses the search api. 3. Hudson Server - Does not have permissions to push to any environment. They have to pull. 4. Lucene Server 5. Database Server Problem I've been trying to set this site up to run in a stress environment, but the number of setup steps, the amount of time it takes to update a component, the black-box nature of the current installers, and the time it takes to generate data into the test system is absolutely destroying my productivity. I tweak one setting, have to redeploy, restart in a certain order, resetup some of the settings, and rebuild test data. Errors result in headscratching, and then basically starting over. Very bad. This problem is complicated further by my stress testing. I need to be able to turn on and off different external components, so that I can effectively determine the scalability of each piece. I've got strategies in place for how to do that for each dependency, but it further complicates my setup strategy, because now each component has 2 options. A mock version, or a real version. Configurations everywhere must be updated accordingly. Goals Fast - I want to drop this from a 20 minute exercise when things go perfectly, to a 3 minute one Stupid simple - I want to tell the environment what to do with as few commands as possible, and not have to remember how to stitch the environments together Repeatable - I want the script to be idempotent. Kind of a corollary to the Stupid Simple thing. The Plan So Far Here's what I've come up with so far, and what I've come looking for feedback on: Use VisualStudio's new web.config transformations to permit easily altering configs based on envrionment. This solution isn't really sufficient though. I will leave web.config set up to let the site run locally, but when deploying elsewhere, I have as many as 6 different possible outputs for the stress environment alone (because of the mocks of the various dependencies), let alone the settings for prod, QA, and dev. Each of these would then require it's own setup, or a setup that would then post-process the configs. So I'm currently leaning toward just having the dev version, and a version that converts key configuration values into a ruby string interpolation syntax. ({#VAR_NAME} kinda thing) Create a ruby script for each server that is essentially a bootstrapping script. That is to say, it will do nothing but load the ruby code that does the 'real' work from hudson/subversion, so that the script's functionality can evolve with the application, making it easy to build the site at any point in time by reference the appropriate version of the script. So in a nutshell, this script loads another script, and runs it. The 'real' ruby script will then accept commandline parameters that describe how the environment should look. From there, 1 configuration file can be used, and ruby will download the current installers, run them, post-process the configs, restart IIS/Tomcat, and kick off any data setup code that is needed. So that's it. I'm in a real time crunch to get this site stress-tested, so any feedback that you think could abbreviate the time this might take would be appreciated. That includes a shameless request for sample ruby code. I've not gotten too much further than puts "Hello World". :-) Just guidance would be helpful. Is this something that Rake would be useful for? How would you recommend I write tests for this animal? (I use interfaces and automocking frameworks to mock out things like http requests in .net. With ducktyping, it seems that this might be easier, but I don't know how to tell my code to use a fake duck in test, but a real one in practice) Thanks all. Sorry for such such a long-winded, open-ended question.

    Read the article

  • Visual studio does not gray out properties with a ReadOnlyAttribute(true)

    - by Fire-Dragon-DoL
    I know it's stupid but visual studio (2010) doesn't gray out my properties tagged with ReadOnlyAttribute, I can't edit their values (if I try to do it, simply return to the previous value), but they aren't grayed out, I think it's really boring this when using the editor Is there an option or an attribute that I'm forgetting? Thanks for any help Example 1: /// <summary> /// Inform if the LcdDisplay has been already initiated /// </summary> [Description("Inform if the LcdDisplay has been already initiated")] [DefaultValue(false)] [ReadOnly(true)] public bool Initialized { get; private set; } Initialized is not grayed out

    Read the article

  • XHtml Strict, Float: Center ?

    - by Axel Myers
    Hi everyone. I'm having hard time with Xhtml Strict 1.0 and Css. And I'm almost out of solutions. My Site Url: http://www.pro-turk.net/beta/ I made a jquery multilevel dropdown menu for my site. It looks like OK, but I have used inline-block property of css display attribute on navigation menu which is a part of css 2.1 and isn't supported by some browsers (including ie6 and ie7). I want to make #nav li elements block level elements, but to do this and having all of them in same line, the only way is using float in #nav li. But I want to center them in their parent (the menu bar). So I need something like float:center (I know it's pretty stupid and doesn't exist). But is there a way to include block level elements as children elements without linebreaks (I mean without making a block level element). Regards.

    Read the article

  • Android Release Version and "Waiting for Debugger"

    - by Tom Richards
    I know this has been asked before but I still don't have a solution. My first app: developed and debugged on my moto droid and then followed all the release steps, (exported from Eclipse, using my key to sign) including removing the debug in the manifest xml. I copied the resulting apk to the droid, disconnected the usb and installed it by double clicking on the file using Astro. I get the "Waiting for Debugger" message like when I am debugging but it never goes away. Doing something real stupid I know but I can't figure it out. Any help would be appreciated. Thanks, Tom

    Read the article

  • fetching a url using $.getJSON and parsing it correctly

    - by sofia
    This is probably really stupid but i can't find the problem with my code. It fetches a url that returns json and the function is then supposed to return a string: function getit() { var ws_url = 'example.com/test.js'; var user = false; $.getJSON(ws_url, function(data) { alert('user '+data.user);//shows john user = data.user || false; } ); return user;//should return john but returns false } test.js will have something like this: {"id":"12","username":"ses","user":"john","error":""} or like this: {"error":"123"} I also tried if(data.user){}else{} but it didn't work either.. So what am i missing? Thanks :)

    Read the article

  • python: iif or (x ? a : b)

    - by Albert
    If Python would support the (x ? a : b) syntax from C/C++, I would write: print paid ? ("paid: " + str(paid) + " €") : "not paid" I really don't want to have an if-check and two independent prints here (because that is only an example above, in my code, it looks much more complicated and would really be stupid to have almost the same code twice). However, Python does not support this operator or any similar operator (afaik). What is the easiest/cleanest/most common way to do this? I have searched a bit and seen someone defining an iif(cond,iftrue,iffalse) function, inspired from Visual Basic. I wondered if I really have to add that code and if/why there is no such basic function in the standard library.

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >