Search Results

Search found 1573 results on 63 pages for 'adam lane'.

Page 40/63 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Hidden features of PL/SQL

    - by Adam Paynter
    In light of the "Hidden features of..." series of questions, what little-known features of PL/SQL have become useful to you? Edit: Features specific to PL/SQL are preferred over features of Oracle's SQL syntax. However, because PL/SQL can use most of Oracle's SQL constructs, they may be included if they make programming in PL/SQL easier.

    Read the article

  • Is there a programming language that performs currying when named parameters are omitted?

    - by Adam Gent
    Many functional programming languages have support for curried parameters. To support currying functions the parameters to the function are essentially a tuple where the last parameter can be omitted making a new function requiring a smaller tuple. I'm thinking of designing a language that always uses records (aka named parameters) for function parameters. Thus simple math functions in my make believe language would be: add { left : num, right : num } = ... minus { left : num, right : num } = .. You can pass in any record to those functions so long as they have those two named parameters (they can have more just "left" and "right"). If they have only one of the named parameter it creates a new function: minus5 :: { left : num } -> num minus5 = minus { right : 5 } I borrow some of haskell's notation for above. Has any one seen a language that does this?

    Read the article

  • How to find loginname, database username, or roles of sqlserver domain user who doesn't have their own login?

    - by Adam Butler
    I have created a login and database user called "MYDOMAIN\Domain Users". I need to find what roles a logged on domain user has but all the calls to get the current user return the domain username eg. "MYDOMAIN\username" not the database username eg. "MYDOMAIN\Domain Users". For example, this query returns "MYDOMAIN\username" select original_login(),suser_name(), suser_sname(), system_user, session_user, current_user, user_name() And this query returns 0 select USER_ID() I want the username to query database_role_members is there any fuction that will return it or any other way I can get the current users roles?

    Read the article

  • SQLAlchemy introspection of ORM classes/objects

    - by Adam Batkin
    I am looking for a way to introspect SQLAlchemy ORM classes/entities to determine the types and other constraints (like maximum lengths) of an entity's properties. For example, if I have a declarative class: class User(Base): __tablename__ = "USER_TABLE" id = sa.Column(sa.types.Integer, primary_key=True) fullname = sa.Column(sa.types.String(100)) username = sa.Column(sa.types.String(20), nullable=False) password = sa.Column(sa.types.String(20), nullable=False) created_timestamp = sa.Column(sa.types.DateTime, nullable=False) I would want to be able to find out that the 'fullname' field should be a String with a maximum length of 100, and is nullable. And the 'created_timestamp' field is a DateTime and is not nullable.

    Read the article

  • SQL Server union selects built dynamically from list of words

    - by Adam Tuttle
    I need to count occurrence of a list of words across all records in a given table. If I only had 1 word, I could do this: select count(id) as NumRecs where essay like '%word%' But my list could be hundreds or thousands of words, and I don't want to create hundreds or thousands of sql requests serially; that seems silly. I had a thought that I might be able to create a stored procedure that would accept a comma-delimited list of words, and for each word, it would run the above query, and then union them all together, and return one huge dataset. (Sounds reasonable, right? But I'm not sure where to start with that approach...) Short of some weird thing with union, I might try to do something with a temp table -- inserting a row for each word and record count, and then returning select * from that temp table. If it's possible with a union, how? And does one approach have advantages (performance or otherwise) over the other?

    Read the article

  • Generating changelogs from commit-comments - bad idea?

    - by Adam Asham
    I work for a small company (<10 developers) where we use Svn and to some extent Git. We have no release system implemented. We don't tag our applications with a release numbers so as you can imagine, we don't keep track of changes between releases very well. With this in mind I've been thinking about generating changelogs from the commit-comments. It doesn't have to be an awful idea if you implement guidelines for how to write comments. Or am I fooling myself thinking that colleagues will follow these guidelines? Most of them don't bother adding comments today but I'm hoping that will change if they become aware of how to formulate themselves and that you don't have to comment on every single commit. Or would we it be more wise to gather information from our bug/project managing software and write the changelogs manually (which unfortunately is something nobody wants to do)?

    Read the article

  • python add two list and createing a new list

    - by Adam G.
    lst1 = ['company1,AAA,7381.0 ', 'company1,BBB,-8333.0 ', 'company1,CCC, 3079.999 ', 'company1,DDD,5699.0 ', 'company1,EEE,1640.0 ', 'company1,FFF,-600.0 ', 'company1,GGG,3822.0 ', 'company1,HHH,-600.0 ', 'company1,JJJ,-4631.0 ', 'company1,KKK,-400.0 '] lst2 =['company1,AAA,-4805.0 ', 'company1,ZZZ,-2576.0 ', 'company1,BBB,1674.0 ', 'company1,CCC,3600.0 ', 'company1,DDD,1743.998 '] output I need == ['company1,AAA,2576.0','company1,ZZZ,-2576.0 ','company1,KKK,-400.0 ' etc etc] I need to add it similar product number in each list and move it to a new list. I also need any symbol not being added together to be added to that new list. I am having problems with moving through each list. This is what I have: h = [] z = [] a = [] for g in hhl: spl1 = g.split(",") h.append(spl1[1]) for j in c_hhl: spl2 = j.split(",") **if spl2[1] in h: converted_num =(float(spl2[2]) +float(spl1[2])) pos=('{0},{1},{2}'.format(spl2[0],spl2[1],converted_num)) z.append(pos)** else: pos=('{0},{1},{2}'.format(spl2[0],spl2[1],spl2[2])) z.append(pos) for f in z: spl3 = f.split(",") a.append(spl3[1]) for n in hhl[:]: spl4 = n.split(",") if spl4[1] in a: got = (spl4[0],spl4[1],spl4[2]) hhl.remove(n) smash = hhl+z #for i in smash: for i in smash: print(i) I am having problem iterating through the list to make sure I get all of the simliar product to a new list,(bold) and any product not in list 1 but in lst2 to the new list and vice versa. I am sure there is a much easier way.

    Read the article

  • If setUpBeforeClass() fails, test failures are hidden in PHPUnit's JUnit XML output

    - by Adam Monsen
    If setUpBeforeClass() throws an exception, no failures or errors are reported in the PHPUnit's JUnit XML output. Why? Example test class: <?php class Test extends PHPUnit_Framework_TestCase { public static function setUpBeforeClass() { throw new \Exception('masks all failures in xml output'); } public function testFoo() { $this->fail('failing'); } } Command line: phpunit --verbose --log-junit out.xml Test.php Console output: PHPUnit 3.6.10 by Sebastian Bergmann. E Time: 0 seconds, Memory: 3.25Mb There was 1 error: 1) Test Exception: masks all failures in xml output /tmp/pu/Test.php:6 FAILURES! Tests: 0, Assertions: 0, Errors: 1. JUnit XML output: <?xml version="1.0" encoding="UTF-8"?> <testsuites> <testsuite name="Test" file="/tmp/phpunit-broken/Test.php"/> </testsuites> More info: $ php --version PHP 5.3.10-1ubuntu3.1 with Suhosin-Patch (cli) (built: May 4 2012 02:21:57) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans

    Read the article

  • How to submit Nothing as a route value to ASP MVC

    - by Adam
    I have a route with several optional parameters. These are possible search terms in different fields. So, for example, if I have fields key, itemtype and text then I have in global.asax: routes.MapRoute( _ "Search", _ "Admin.aspx/Search/{Key}/{ItemType}/{Text}", _ New With {.controller = "Admin", .action = "Search" .Key = Nothing, .ItemType = Nothing, .Text = Nothing} _ ) My action takes optional parameters: Function Search(Optional ByVal Key As String = Nothing, _ Optional ByVal ItemType As Integer = 0, _ Optional ByVal Text As String = Nothing, _ Optional ByVal OtherText As String = Nothing) It then checks if the Key and Text strings have a non-null (and non-empty) value and adds search terms to the db request as needed. However, is it possible to send in a null value for, for example, Key but still send in a value for Text? If so, what does the URL look like? (Admin.aspx/Search//0/Foo doesn't work :) ) I know I can handle this using a parameter array instead, but wondered if this was possible using the sort of route described? I could of course define some other value as equivalent to null (for example, a space/%20) but is there any way to send a null value in the URL? I'm suspecting not, but thought I'd see if anyone knew of one. I'm using ASP MVC 2 for this project.

    Read the article

  • Differences between a conceptual UML class diagram and an ERD?

    - by Adam
    If I create a conceptual class diagram such that each class captures 'name' and 'attributes' but not 'operations', have I not basically created what would be otherwise considered an ERD? I'm trying to gain an understanding of what the differences are between creating a conceptual class diagram as I have described versus calling it a ERD? If these are still two different animals, can somebody please explain what the differences are?

    Read the article

  • Trying to right click on code in VS2008 causes lockup.

    - by Adam Haile
    Working on a Win32 DLL using Visual Studio 2008 SP1 and, since yesterday, whenever I try to right click on code, to go to a variable definition for example, VS completely locks up and I have to manually kill the process. To make it even weirder, whenever this happens the devenv.exe process uses exactly 25% of the CPU. And I mean exactly, never 24%, never 26%, always 25% Also, I've run ProcMon to see if devenv is actually doing something, but it's doing absolutely nothing external of the process. No disk, network, registry access. Nothing. This is getting really aggravating because I have a large code base to deal with and the only other way of jumping to the definition is to first search for it. Has anyone run into a similar issue? And, better yet, know a fix?

    Read the article

  • Display a MYSQL field using CAKE

    - by adam
    Forgive me if this is a "homework" question. We have a "Rating" table in our mysql db. I want to display this number on our user profile page. JUST BELOW THE GRAVATAR. here is the code in app/views/user/view.ctp <div class="nhplft"> flash(); ? ?d=identicon&s=100" border="0" alt="My Avatar! UID:" / Change Image link("Home",'/items'); ?  |  link('Add',array('controller' = 'items','action'='add')); ?  |  link('Search',array('controller'='items','action'='index')); ?  |  link("Logout",'/users/logout'); } ?

    Read the article

  • SSRS Report Manager Report names

    - by Adam
    Is it possible to have SSRS's Report Manager display a report name that is not the .RDL file name? I.E. I have a Report .RDL named "MyReportAboutSomeImportantStuff.RDL" but I want the Report Manager to display this user friendly as "My Report About Some Important Stuff."

    Read the article

  • Help with cake controllers

    - by adam
    We had an outsourced engineer work on a quick feature DELETING items listed in our database. He says that the code is difficult because the "controller" is missing. Is there a pre-loaded controller for every function like that in cake, or is it weird that he is expecting a controller to be there for a feature we didn't have yet.

    Read the article

  • knockout bind text label to dropdown value selected option text

    - by Adam Levitt
    Is there a simple way to bind the textbox of a div to change based on the text value of the selected option in a dropdown on the same page? <div data-bind="text: dropdownValue"></div> <select> <option value="1">Value1</option> <option value="2">Value2</option> </select> Please note, I don't want to put the values into the select element using javascript. I'd like to bind to the value straight from the HTML. I can also include jQuery to make it work.

    Read the article

  • Should Python import statements always be at the top of a module?

    - by Adam J. Forster
    PEP 08 states: Imports are always put at the top of the file, just after any module comments and docstrings, and before module globals and constants. However if the class/method/function that I am importing is only used in rare cases, surely it is more efficient to do the import when it is needed? Isn't this: class SomeClass(object): def not_often_called(self) from datetime import datetime self.datetime = datetime.now() more efficient than this? from datetime import datetime class SomeClass(object): def not_often_called(self) self.datetime = datetime.now()

    Read the article

  • Java: Is there a way to obtain the bytecode for a class at runtime?

    - by Adam Paynter
    In Java, is there a way (at runtime) to obtain the bytecode which defined a particular class? Put another way, is there a way to obtain the byte[] array passed to ClassLoader.defineClass(String name, byte[] b, int off, int len) when a particular class was loaded? I see that this method is declared final, so creating a custom ClassLoader to intercept class definitions seems out of the question. In the past, I have used the class's ClassLoader to obtain the bytecode via the getResourceAsStream(String) method, but I would prefer a more canonical solution.

    Read the article

  • Array inside of Arrays; Java (Help with Lab Assignment)

    - by Adam
    We are working on a lab assignment for my CS&E class and I think I can ask this question without going into detail of the entire lab requirements, but is it possible for an array to be inside of an array? For example, would this work: int [] arrayOne = new int[3]; arrayOne[0] = Start of an array If this is possible how do you go about doing it?

    Read the article

  • What standards and best practices should I follow to write interoperable portlets or web gadgets?

    - by Adam
    I am trying to design the standards and patterns for implementing portlets/web gadgets with the main goal of maximizing interoperability if those components were hosted in a Java app server framework or within an existing ASP.NET technology (SharePoint webparts), or a client side-only framework. Is there any guidance anywhere of the parts of different portlet standards that are shared between most portal frameworks? Is the best I can hope for is to adhere to the JSR 168 and 286 standards and hitch my wagon to Java?

    Read the article

  • Rails and jQuery - how do you get server-side validation errors to your view after an ajax request

    - by adam
    Ive searched this site but questions are usually regarding doing client-side validations or for different frameworks. I have a tasks list whose items can be edited inline. Upon submitting the inline edit form the item is updated all thanks to jQuery, ajax and rails. But I want to handle bad input from the user. HTML requests redisplay the view and errors are displayed thanks to rails helpers. But how do I insert that information after an ajax call? Heres my update method in my controller def update @task = Task.find(params[:id]) respond_to do |format| if @task.update_attributes(params[:task]) flash[:notice] = 'Task was successfully updated.' format.html { redirect_to(@task) } format.xml { head :ok } format.js else format.html { render :action => "edit" } format.xml { render :xml => @task.errors, :status => :unprocessable_entity } #format.js ...hmmm... either go to js.erb file or do stuff inline end end end

    Read the article

  • Safest LAMP encrypt method

    - by Adam Kiss
    Hello, what is PHP's safest encrypt/decrypt method, in use with MySQL - to store let's say passwords? Of course, not for portal purposes. I want to do little password (domain/mysql/ftp...) storage for whole team online, but I don't want really to endanger our clients' bussinesses. Hash can't be used for obvious reasons (Doesn't really make sense to run rainbow tables every time :D). Any idea?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >