Search Results

Search found 5671 results on 227 pages for 'sub tuts'.

Page 18/227 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • CodeIgniter Active Record Queries W/ Sub Queries

    - by Mike
    Question: I really am trying to stick to using ActiveRecord and not using straight SQL.. can someone help me convert this to activerecord? Trying to get the email address and contact name from another table. map_userfields table is a one to many, multiple rows per p.id. one row per p.id per uf.fieldid. see this screenshot for a reference to the map_userfields table: Current Non active record query SELECT p.id, (SELECT uf.fieldvalue FROM map_userfields uf WHERE uf.pointid = p.id AND uf.fieldid = 20) As ContactName, (SELECT uf.fieldvalue FROM map_userfields uf WHERE uf.pointid = p.id AND uf.fieldid = 31) As ContactEmail FROM map_points p WHERE /** $pointCategory is an array of categories to look for **/ p.type IN($pointCategory) Note: I am using CodeIgniter 2.1.x, MySQL 5.x, php 5.3

    Read the article

  • How to redirect Sub domain as attribute in page with .htaccess

    - by rkaartikeyan
    I want like this Ex: http://user1.mysite.com or http://user2.mysite.com if anyone enter URL Like these on browsers it should go as bellow http://mysite.com/user.php?userName=user1 How can i solve this with .htaccess With help of Prix i solved this Issue RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC] RewriteCond %{HTTP_HOST} ^(.*)\.mysite\.com RewriteRule ^(.*)$ http://mysite.com/user.php?userName=%1 [R=301] Its working fine :) http://user1.mysite.com http://mysite.com/user.php?userName=user1 -> This one is working fine with Prix Code Now i want Like Bellow. I have tried lot but not working. So again i don't have anyway rather than ask here. I want like this http://user1.mysite.com/inbox/ http://mysite.com/inbox.php?userName=user1 And also Like this http://user1.mysite.com/message/1 http://mysite.com/view-message.php?userName=user1&messageID=1

    Read the article

  • Binding Data Template element to property on sub-class

    - by TerrorAustralis
    Hi guys, I have a class, for experiment sake call it foo() and another class, call it bar() I have a data template for class foo() defined in my xaml, but one of foo()'s properties is a bar() object such that foo() { Public string Name {get; set;} Public int ID {get; set;} Public bar barProp {get; set;} } and bar() { Public string Description{get; set;} } I want my data template of foo to display the Description property of bar. I have tried the simple <textblock Text="{Binding Path=barProp.Description}" /> and variants to no avail Seeking wisdom, DJ

    Read the article

  • jquery : ul, li parent multiple child sub-child toggling

    - by user360826
    hello, my main question is as follows: how to show only the first subchild of a ul or li upon clicking the enclosing parent. eg: <ul> Grandparent <li> Child1 <li> Grandchild11</li></li> <li> Child2 <li>GrandChild21</li><li>grandchild22</li></li> </ul> so, for example I would like something to the effect of <script> $('ul').click(function(){ $('ul').children('first li').toggle() }); $('li').click(function(){ $('li').children('first li').toggle() }); </script> meaning: when i click ul, i only see the first child node (child1 and child2 will be shown, but not the grandchildren). when i click child1 or child2 i see the respective grandchild. grandchild is not shown upon clicking grandparent, only upon clicking child1 or child2. i know i am reinventing the wheel of some pre-coded solution, but any help would be largely appreciated!

    Read the article

  • server controls complex properties with sub collections.

    - by Richard Friend
    Okay i have a custom server control that has some autocomplete settings, i have this as follows and it works fine. /// <summary> /// Auto complete settings /// </summary> [System.ComponentModel.DesignerSerializationVisibility (System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty), Category("Data"), Description("Auto complete settings"), NotifyParentProperty(true)] public AutoCompleteLookupSettings AutoComplete { private set; get; } I also have a ParameterCollection that is really related to the auto complete settings, currently this collection resides off the control itself like so : /// <summary> /// Parameters for any data lookups /// </summary> [System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content), PersistenceMode(PersistenceMode.InnerProperty)] public ParameterCollection Parameters { get; set; } What i would like to do is move the parameter collection inside of the AutoCompleteSettings as it really relates to my autocomplete, i have tried this but to no avail.. I would like to move from <cc1:TextField ID="TextField1" runat='server'> <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" /> <Parameters> <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" /> </Parameters> </cc1:TextField> To <cc1:TextField ID="TextField1" runat='server'> <AutoComplete MethodName="GetTest" TextField="Item1" TypeName ="AppFrameWork.Utils" > <Parameters> <asp:ControlParameter ControlID="txtTest" PropertyName="Text" Name="test" /> </Parameters> </AutoComplete> </cc1:TextField>

    Read the article

  • Catch clearly defined exception from sub.submodule in python

    - by mynthon
    I have 3 files. xxx which imports xxx2 and xxx2 imports xxx3 which one raises OppsError exception. xxx3.py: class OppsError(Exception):pass def go(): raise OppsError() xxx2.py: import xxx3 xxx3.go() xxx.py: try: import xxx2 except xxx3.OppsError: print 'ops' When i run xxx.py i get error NameError: name 'xxx3' is not defined. Is importing xxx3 inside xxx only way to catch OppsError?

    Read the article

  • htaccess to not show index.php in sub directory

    - by Jamesaa
    I have a simple page structure like below /directory/subdir_1/index.php /directory/subdir_2/index.php .... (there are no other files in these directories) is it possible to have 'fake/pretty' urls for the above files as below? /directory/subdir_1 /directory/subdir_2 ... so this path would show whether the visitor typed that,/directory/subdir_2/ or /directory/subdir_2/index.php. Many thanks

    Read the article

  • counting sub rows in mysql

    - by moustafa
    i have 2 table ok catgories and artilces i have this structure catgories web > design > photoshop > layers web > design > photoshop > effects and each one is a catgory and layers catgories has 100 article and effects catgories has 50 article now i want when count the articles 'web' catgory it show 150 article how i can do this give me an example

    Read the article

  • MVC route with id and sub-action

    - by Dan Revell
    I can't figure out what I need to do with MVC routing to make this work Here's my one route: routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "{controller}/{id}/{action}", defaults: new { id = RouteParameter.Optional, action = RouteParameter.Optional } ); The request /Shipments/ works great. The request /Shipments/3/Packages works great. The request /Shipments/3 however fails with the error: Multiple actions were found that match the request: System.Linq.IQueryable`1[Api.Controllers.RequisitionsController+PackageRequisitionWithTracking] GetPackageRequisitions(Int32) on type Api.Controllers.RequisitionsController Api.Models.ShipmentRequisition GetShipmentRequisitions(Int32) on type Api.Controllers.RequisitionsController It can't seem to differentiate between: public ShipmentRequisition GetShipmentRequisitions(int id) and [ActionName("Packages")] public IQueryable<PackageRequisitionWithTracking> GetPackageRequisitions(int id) I would have thought the lack of action name on the get shipment by id would allow that route to work.

    Read the article

  • Do I always need to rebuild the project containing references to sub project's dll, if sub projects

    - by Puneet Dudeja
    I have a solution containing 4 class library projects and one "web site" project. The web site project contains references to the 3 class library projects, whenever I make changes in any of the class library projects, the only option I see is to rebuild the web site which takes a lot of time. Is there any option that I can only update the dll references and the changes are reflected in the web site project ?

    Read the article

  • how to get a sub list from a list in ocaml

    - by romerun
    Hi, I'm looking at the List document. It seems the library does not provide a sublist function. I'm trying to get list of elements from i to j. Now I have to write it as: let rec sublist list i j = if i j then [] else (List.nth list i) :: (sublist list (i+1) j) which is quite concise but I'm questioning the efficiency of List.nth, because if it's O(n), I would rather have to write it in a less concise way. I'm wondering why didn't they provide List.sublist func, if List.nth is not O(1), because it's such a quite common operation..

    Read the article

  • How to change a sub layout dynamically

    - by user1762121
    I am newbie in android, but I want to change the contents of a layout, that is inside another layout, due to clicks on buttons. ----------------------------- | Button | Button | Button | ----------------------------- | | | Layout that changes | | dynamically | | | | | ------------------------------ Thanks

    Read the article

  • SQL - sub count

    - by Andy Clarke
    Hi I've got some SQL ... SELECT AdviceNo, Registration FROM tblSalesDetail that produces something like ... ADV00001, ABC123 ADV00001, CDE564 ADV00002, FGE432 ADV00003, HUY789 ADV00003, MJS532 ADV00003, JFY428 Can anyone tell me how I'd adjust it to see the following please? ADV00001, ABC123, 1 ADV00001, CDE564, 2 ADV00002, FGE432, 1 ADV00003, HUY789, 1 ADV00003, MJS532, 2 ADV00003, JFY428, 3

    Read the article

  • Extracting a sub-string in C#

    - by hero
    I am new to c# programming and I want to ask a question. How can I get the value in () and store it in another string. example: I have string s1="here there (hi)"; How can I get s2="hi"; the () will always be at the end of the sentence (never at first or in between).

    Read the article

  • Join with table and sub query in oracle

    - by Amandeep
    I dont understand what is wrong with this query it is giving me compile time error of command not ended properly.The inner query is giving me 4 records can any body help me out. select WGN3EVENTPARTICIPANT.EVENTUID from (Select WGN_V_ADDRESS_1.ADDRESSUID1 as add1, WGN_V_ADDRESS_1.ADDRESSUID2 as add2 from WGN3USER inner join WGN_V_ADDRESS_1 on WGN_V_ADDRESS_1.USERID=wgn3user.USERID where WGN3USER.USERNAME='FIRMWIDE\khuraj' ) as ta ,WGN3EVENTPARTICIPANT where (ta.ADDRESSUID1=WGN3EVENTPARTICIPANT.ADDRESSUID1) AND (ta.ADDRESSUID2=WGN3EVENTPARTICIPANT.ADDRESSUID2) I am running it in oracle. Thanks Amandeep

    Read the article

  • Accessing loop iteration in a sub-function?

    - by DisgruntledGoat
    I'm using the Google Maps API to plot several points on a map. However, in the click event function below, i is always set to 4, i.e. its value after iterating the loop: // note these are actual addresses in the real page var addresses = new Array( "addr 1", "addr 2", "addr 3", "addr 4" ); for (var i = 0; i < addresses.length; i++) { geocoder.getLatLng(addresses[i], function(point) { if (point) { var marker = new GMarker(point); map.addOverlay(marker); map.setCenter(point, 13); GEvent.addListener(marker, "click", function() { // here, i=4 marker.openInfoWindowHtml("Address: <b>" + addresses[i] + "</b>"); }); } }); } So when the marker displays it's using addresses[4] which is undefined. How do I pass the correct value of i to the function?

    Read the article

  • Accessing Sub functions /procedures from DPR or other function / procedure in Delphi

    - by HX_unbanned
    Hello, stackoverflowers :) As much I know - Subroutines are with Private access mode to its parent unction / procedure, right? Is there any way to access them from "outer-world" - dpr or other function / procedure in unit? Also - which way takes more calcualtion and space to compiled file? for example: function blablabla(parameter : tparameter) : abcde; procedure xyz(par_ : tpar_); begin // ... end; begin // ... end; procedure albalbalb(param : tparam) : www; begin xyz(par_ : tpar); // is there any way to make this function public / published to access it therefore enabling to call it this way? end; // all text is random. // also, is there way to call it from DPR in this manner? // in C++ this can be done by specifing access mode and/or using "Friend" class .. but in DELPHI?

    Read the article

  • Avoiding sub-type selection in view code

    - by John Donoghue
    Hi, I have some code where the model contains some classes like (vb.net pseudocode, but could be any OO language): Enum AttributeType Boolean Date String End Enum MustInherit Class Attibute Must Override Function Type As AttributeType End Class Class BooleanAttribute: Attribute Function Type As AttributeType Return AttributeType.Boolean End Function End Class And the view contains some code like: Select Case AttributeType Case Boolean //Display checkbox control Case Date //Display date picker control Case String //Display textbox control End Select I don't really like the code in the view, for the hopefully obvious reasons (what happens when I get a new attribute type etc). My question is, how should I replace it? I could easily add a method to the concrete classes, but that pollutes the model with UI stuff so that's a horrible idea. I could move the select into a factory, but that seems to be just hiding the problem. Can anybody advise a better approach?

    Read the article

  • Write file in sub-directory in Android

    - by Davide Vosti
    I'm trying to save a file in a subdirectory in Android 1.5. I can successfully create a directory using _context.GetFileStreamPath("foo").mkdir(); (_context is the Activity where I start the execution of saving the file) but then if I try to create a file in foo/ by _context.GetFileStreamPath("foo/bar.txt"); I get a exception saying I can't have directory separator in a file name ("/"). I'm missing something of working with files in Android... I thought I could use the standard Java classes but they don't seem to work... I searched the Android documentation but I couldn't fine example and google is not helping me too... I'm asking the wrong question (to google)... Can you help me out with this? Thank you!

    Read the article

  • Recursively getting files in a directory with several sub-directories

    - by yeahumok
    Hello! I was wondering if anybody here could help me out as I'm still very new to C#. I have a drive with folders w/in folders w/in folders that all contain files. Is there a way to recursively loop through the files and gather up all of these file names into a .txt file? I'm not sure how to implement this into my Console app--so does anybody have any code that might help?

    Read the article

  • Accessing parent class attribute from sub-class body

    - by warwaruk
    I have a class Klass with a class attribute my_list. I have a subclass of it SubKlass, in which i want to have a class attribute my_list which is a modified version of the same attribute from parent class: class Klass(): my_list = [1, 2, 3] class SubKlass(Klass): my_list = Klass.my_list + [4, 5] # this works, but i must specify parent class explicitly #my_list = super().my_list + [4, 5] # SystemError: super(): __class__ cell not found #my_list = my_list + [4, 5] # NameError: name 'my_list' is not defined print(Klass.my_list) print(SubKlass.my_list) So, is there a way to access parent class attribute without specifying its name?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >