Search Results

Search found 645 results on 26 pages for 'classname'.

Page 22/26 | < Previous Page | 18 19 20 21 22 23 24 25 26  | Next Page >

  • getting service from wsdd via xpath not wroking

    - by subes
    Hi, I am trying to get the XPath "/deployment/service". Tested on this site: http://www.xmlme.com/XpathTool.aspx <?xml version="1.0" encoding="UTF-8" standalone="no"?> <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org /axis/wsdd/providers/java"> <service name="kontowebservice" provider="java:RPC" style="rpc" use="literal"> <parameter name="wsdlTargetNamespace" value="http://strategies.spine"/> <parameter name="wsdlServiceElement" value="ExposerService"/> <parameter name="wsdlServicePort" value="kontowebservice"/> <parameter name="className" value="dmd4biz.container.webservice.konto.internal.KontoWebServiceImpl_WS"/> <parameter name="wsdlPortType" value="Exposer"/> <parameter name="typeMappingVersion" value="1.2"/> <operation xmlns:operNS="http://strategies.spine" xmlns:rtns="http://www.w3.org/2001/XMLSchema" name="expose" qname="operNS:expose" returnQName="exposeReturn" returnType="rtns:anyType" soapAction=""> <parameter xmlns:tns="http://www.w3.org/2001/XMLSchema" qname="in0" type="tns:anyType"/> </operation> <parameter name="allowedMethods" value="expose"/> <parameter name="scope" value="Request"/> </service> </deployment> I absolutely can't find out why it always tells me that my xpath does not match... This may be stupid, but am I missing something?

    Read the article

  • Why doesn't Javascript recognize the HTML class attribute?

    - by Cornflake
    Can anyone help me with a Javascript question, please? Why does the following code display only message boxes with the word "null" in them? And I think there are not enough of them either. <html> <head> <script type="text/javascript"> function showElementClasses(node) { var els = node.getElementsByTagName("*"); for(var i=0,j=els.length; i<j; i++) alert(els[i].getAttribute("class")); alert("Class: " + els[i].className); } showElementClasses(document); </script> </head> <body class="bla"> <div class="myclass" style="width: 500; height: 400" id="map"></div> </body> </html>

    Read the article

  • Selecting a div with same ID as the rel attribute of clicked link

    - by Chris
    Hi there, This is a two-part question. I'm using jQuery for a project and wanting to click a link and toggle the class name "highlight" to that link and also to the div with the same id as the rel attribute of the link. I then want to be able to link to the next div without the classname of "highlight". Here's the HTML for it: <ul> <li><a href="#" rel="panel1">Item 1</a></li> <li><a href="#" rel="panel2">Item 2</a></li> <li><a href="#" rel="panel3">Item 3</a></li> </ul> <a href="">go to next div without class of highlight</a> <div id="panel1">some text</div> <div id="panel2">some text</div> <div id="panel3">some text</div> Can anyone help with jQuery side of things? Many thanks in advance!

    Read the article

  • Running single test class or group with Surefire and TestNG

    - by Slartibartfast
    I want to run single test class from command line using Maven and TestNG Things that doesn't work: mvn -Dtest=ClassName test I have defined groups in pom.xml, and this class isn't in one of those groups. So it got excluded on those grounds. mvn -Dgroups=skipped-group test mvn -Dsurefire.groups=skipped-group test when config is <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.7.1</version> <configuration> <groups>functest</groups> </configuration> </plugin> Parameters work fine in there are no groups defined in pom.xml. Similarly, when surefire is configured with <configuration> <includes> <include>**/*UnitTest.java</include> </includes> </configuration> I can add another test with -Dtest parameter, but cannot add group. In any combination, I can narrow down tests to be executed with groups, but not expand them. What's wrong with my configuration? Is there a way to run a single test or group outside of those defined in pom.xml? Tried on Ubuntu 10.04 with Maven 2.2.1, TestNG 5.14.6 and Surefire 2.7.1

    Read the article

  • if else on javascript with the value of a select box (pure javascript)

    - by user983248
    I'm working on a select box that have images instead of text, (on the background with css). <script type="text/javascript"> function onChange(element) { element.style.backgroundColor = "Yellow"; element.className = "on_change"; } </script> <select onchange="onChange(this);"> <option value="1" style="background: url(/one.png) no-repeat scroll 0 0 transparent; width:32px; height:32px;"></option> <option value="2" style="background: url(/two.png) no-repeat scroll 0 0 transparent; width:32px; height:32px;"></option> <option value="3" style="background: url(/three.png) no-repeat scroll 0 0 transparent; width:32px; height:32px;"></option> </select> The problem is how do I get the value of the selected option and if is 1 set one image and if it is two set another image as the background using pure javascript (no jQuery)? I know that selectedIndex is the key to my problem, but I'm clueless of how to use it or how to use it on an if else statement. The script above is just one of my trials, I actually use the script above to perform the same task. <select onchange="this.style.backgroundColor=this.options[this.selectedIndex].style.backgroundColor; this.style.color=this.options[this.selectedIndex].style.color">

    Read the article

  • Problem with 2 levels of inheritance in hibernate mapping

    - by Seth
    Here's my class structure: class A class B extends A class C extends A class D extends C class E extends C And here are my mappings (class bodies omitted for brevity): Class A: @Entity @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @MappedSuperclass @DiscriminatorColumn( name="className", discriminatorType=DiscriminatorType.STRING ) @ForceDiscriminator public abstract class A Class B: @Entity @DiscriminatorValue("B") public class B extends A Class C: @Entity @DiscriminatorValue("C") @MappedSuperclass @DiscriminatorColumn( name="cType", discriminatorType=DiscriminatorType.STRING ) @ForceDiscriminator public abstract class C extends A Class D: @Entity @DiscriminatorValue("D") public class D extends C Class E: @Entity @DiscriminatorValue("E") public class E extends C I've got a class F that contains a set of A: @Entity public class F { ... @OneToMany(fetch=FetchType.LAZY, cascade=CascadeType.ALL) @JoinTable( name="F_A", joinColumns = @JoinColumn(name="A_ID"), inverseJoinColumns = @JoinColumn(name="F_ID") ) private Set<A> aSet = new HashSet<A>(); ... The problem is that whenever I add a new E instance to aSet and then call session.saveOrUpdate(fInstance), hibernate saves with "A" as the discrimiator string. When I try to access the aSet in the F instance, I get the following exception (full stacktrace ommitted for brevity): org.hibernate.InstantiationException: Cannot instantiate abstract class or interface: path.to.class.A Am I mapping the classes incorrectly? How am I supposed to map multiple levels of inheritance? Thanks for the help!

    Read the article

  • function not printing out anything

    - by Abdul Latif
    I have the following function below: public function setupHead($title){ $displayHead .='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>'.$title.'</title>'; $displayHead .='<script type="text/javascript" src="'.PATH.'js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="'.PATH.'js/thickbox.js"></script> <script type="text/javascript" src="'.PATH.'js/ui.core.js"></script> <!--<script type="text/javascript" src="'.PATH.'js/js.js"></script>--> <link rel="stylesheet" href="'.PATH.'css/thickbox.css" type="text/css" media="screen" /> <link rel="stylesheet" type="text/css" href="'.PATH.'css/styles.css"> <link rel="stylesheet" type="text/css" href="'.PATH.'css/menu_allbrowsers.css"> <link rel="stylesheet" href="'.PATH.'css/news.css" type="text/css" media="screen" /> <link rel="stylesheet" href="'.PATH.'css/text.css" type="text/css" media="screen" /> <script type="text/javascript" src="'.PATH.'js/swfobject.js"></script> <!--[if IE 7]><link rel="stylesheet" type="text/css" href="'.PATH.'css/IE7menu.css" /><![endif]--> <!--[if IE 6]><link rel="stylesheet" type="text/css" href="'.PATH.'css/ie6.css" /><![endif]--> <!--[if IE 7]><link rel="stylesheet" type="text/css" href="'.PATH.'css/ie7.css" /><![endif]--> </head>'; return $displayHead; } but when it call is using: echo classname->setupHead($title); nothing gets displayed. doesn't php allow html in strings? Thanks in advance

    Read the article

  • axis-java2wsdl task classpath setting problem

    - by qkrsppopcmpt
    Hey Guys, here is my build.xml <?xml version="1.0" standalone="yes"?> <path id='axis2.classpath'> <fileset dir='D:\Tools\axis2-1.5.1-bin\axis2-1.5.1\lib'> <include name='**/*.jar' /> </fileset> </path> <path id='compiled.class.path'> <fileset dir='./bin/pkg'> <include name='*.class' /> </fileset> </path> <taskdef resource="axis-tasks.properties" classpathref="axis2.classpath" /> <target name="run" > <axis-java2wsdl output="out/TestService.wsdl" location="http://localhost:8080/axis2/service/TestService" namespace="service" classname="TestService"> <classpath refid="compiled.class.path"/> <mapping namespace="TestService" package="pkg"/> </axis-java2wsdl> </target> here is my file structure: prj-bin-pkg-TestService.class/////////// prj-src-pkg-TestService.java/////////// prj-build.xml I get java.lang.ClassNotFoundException: TestService. Can anybody tell me how to fix it? Thanks so much. !!!!!!!!!!!!!

    Read the article

  • C++ - Basic WinAPI question

    - by HardCoder1986
    Hello! I am now working on a some sort of a game engine and I had an idea to put everything engine-related into a static library and then link it to my actual problem. Right now I achieved it and actually link that library and every functions seem to work fine, except those, which are windows-related. I have a chunk of code in my library that looks like this: hWnd = CreateWindow(className, "Name", WS_OVERLAPPED | WS_CAPTION | WS_EX_TOPMOST, 0, 0, 800, 600, NULL, NULL, GetModuleHandle(NULL), this); if (hWnd) { ShowWindow(hWnd, SW_NORMAL); UpdateWindow(hWnd); } else { MessageBox(NULL, "Internal program error", "Error", MB_OK | MB_ICONERROR); return; } When this code was not in the library, but in the actual project, it worked fine, created the window and everything was ok. Right now (when I'm linking to my library that contains this code) CreateWindow(...) call returns NULL and GetLastError() returns "Operation succesfully completed" (wtf?). Could anybody help me with this? Is it possible to create a window and display it using a static library call and why could my code fail? Thank you.

    Read the article

  • how to get large pictures from photo album via facebook graph api

    - by Nav
    I am currently using the following code to retrieve all the photos from a user profile FB.api('/me/albums?fields=id,name', function(response) { //console.log(response.data.length); for (var i = 0; i < response.data.length; i++) { var album = response.data[i]; FB.api('/' + album.id + '/photos', function(photos) { if (photos && photos.data && photos.data.length) { for (var j = 0; j < photos.data.length; j++) { var photo = photos.data[j]; // photo.picture contain the link to picture var image = document.createElement('img'); image.src = photo.picture; document.body.appendChild(image); image.className = "border"; image.onclick = function() { //this.parentNode.removeChild(this); document.getElementById(info.id).src = this.src; document.getElementById(info.id).style.width = "220px"; document.getElementById(info.id).style.height = "126px"; }; } } }); } }); but, the photos that it returns are of poor quality and are basically like thumbnails.How to retrieve larger photos from the albums. Generally for profile picture I use ?type=large which returns a decent profile image but the type=large is not working in the case of photos from photo albums and also is there a way to get the photos in zip format from facebook once I specify the photo url as I want users to be able to download the photos.

    Read the article

  • Regarding Div Display

    - by user71723
    Hi to all, When i click on button,one div is showing..whenever i click on the body,that div will be hide. How can we achieve this functionality .. i write one code is as below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <script language="javascript"> function HideSubMenus(e) { var targ; if (!e) var e = window.event; if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement; if (targ.nodeType == 3) // defeat Safari bug targ = targ.parentNode; for (var i=0; i!=5; i++) { if (!targ) { break; } else if (targ.className=="divclass") { return; } targ = targ.parentNode; } if(document.getElementById("showdivid")) { document.getElementById("showdivid").style.display=''; } } </script> </head> <body onclick="HideSubMenus(event);"> <input type="button" name="button" value="Click ME" onclick="document.getElementById('showdivid').style.display='';" /> <div id="showdivid" class="divclass" style="display:none;"> TeSt DIV </div> </body> </html> regards raj

    Read the article

  • What's the proper workaround for creating a div with a table in it with images in the table?

    - by Noor
    I want this: <div id="display"> <div id="slideshow1"> <table cellspacing=0><tr><td style="height:200px;padding:0;vertical-align:middle"> <img ... /> </td></tr></table> </div> </div> And I'm using this: var thelistt = localStorage.getItem('thelist') var trt = document.createElement("div"); trt.setAttribute("Id","slideshow1"); trt.className="pics"; $('#display').append(trt); var tble = document.createElement("table"); tble.setAttribute("cellspacing","0"); tble.innerHTML = "<tr><td style='height:200px;padding:0;vertical-align:middle'>"; $('#slideshow1').append(tble); trt.innerHTML += thelistt; This creates a div, then a table, closes the table, then images, then closes div.. Isn't there a smoother way to not do all this, if someone'd take a look at my current code i''m sure you'd get a good laugh : http://hem.bredband.net/noor/bildspelet3.html (you need to click on edit and put in two or more urls directly to images)

    Read the article

  • Compiling GWT 2.6.1 at Java 7 source level

    - by Neeko
    I've recently updated my GWT project to 2.6.1, and started to make use of Java 7 syntax since 2.6 now supports Java 7. However, when I attempt to compile, I'm receiving compiler errors such as [ERROR] Line 42: '<>' operator is not allowed for source level below 1.7 How do I specify the GWT compiler to target 1.7? I was under the impression that it would do that by default, but I guess not. I've attempted cleaning the project, including deleting the gwt-unitCache directory but to no avail. Here is my Ant compile target. <target name="compile" depends="prepare"> <javac includeantruntime="false" debug="on" debuglevel="lines,vars,source" srcdir="${src.dir}" destdir="${build.dir}"> <classpath refid="project.classpath"/> </javac> </target> <target name="gwt-compile" depends="compile"> <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"> <classpath> <!-- src dir is added to ensure the module.xml file(s) are on the classpath --> <pathelement location="${src.dir}"/> <pathelement location="${build.dir}"/> <path refid="project.classpath"/> </classpath> <jvmarg value="-Xmx256M"/> <arg value="${gwt.module.name}"/> </java> </target>

    Read the article

  • jQuery - How to animate click function without clicking (Slide-show like) - Is this possible?

    - by iamtheratio
    Hello, I have created a jQuery script (with help) that works great however I need it to automate/animate itself without using the click function, I just want to know is this possible and if so, how? Similar to a slide-show. Basically the code allows me to click on an image and hide/show a DIV, while changing a list of elements such as class/id name. Here's my code: JQUERY: jQuery(document).ready(function(){ //if this is not the first tab, hide it jQuery(".imgs:not(:first)").hide(); //to fix u know who jQuery(".imgs:first").show(); //when we click one of the tabs jQuery(".img_selection a").click(function(){ //get the ID of the element we need to show stringref = jQuery(this).attr("href").split('#')[1]; // adjust css on tabs to show active tab $('.img_selection a').removeAttr('id'); // remove all ids $(this).attr('id', this.className + "_on") // create class+_on as this id. //hide the tabs that doesn't match the ID jQuery('.imgs:not(#'+stringref+')').hide(); //fix if (jQuery.browser.msie && jQuery.browser.version.substr(0,3) == "6.0") { jQuery('.imgs#' + stringref).show(); } else //display our tab fading it in jQuery('.imgs#' + stringref).show(); //stay with me return false; }); });

    Read the article

  • My fade in goes to all opaque for it goes to transparent

    - by DerNalia
    So, I'm trying to fade in a transparent div, kinda like hulu does when you click dim lights... here is what i have: //show the bg new Effect.Appear('darkBackgroundLayer', {duration: 0.3}); then when my pop up is initialized // create the div for background dimming if($('darkBackgroundLayer')){ Element.remove('darkBackgroundLayer') } var transparentBG = document.createElement('div'); transparentBG.className = 'darkenBackground'; transparentBG.id = "darkBackgroundLayer" transparentBG.style.display = "none"; document.body.appendChild(transparentBG); and the CSS for the new div .darkenBackground { background-color: rgb(0, 0, 0); opacity: 0.7; /* Safari, Opera */ -moz-opacity:0.70; /* FireFox */ filter: alpha(opacity=70); /* IE */ z-index: 20; height: 100%; width: 100%; background-repeat:repeat; position:fixed; top: 0px; left: 0px; } but, currently, it fades in... all the way to a solid back, then jumps to the .7 opacity... ideas?

    Read the article

  • form:select items problem in spring mvc portlet

    - by dhaval
    I have a set of drop-down control which I want to render with my custom tag library. The following is the code of the tag lib: <spring:bind path="${path}"> <c:choose> <c:when test="${readOnly}"> <span class="readOnly">${status.value}</span> </c:when> <c:otherwise> <form:select path="${path }" itemLabel="${label }" itemValue="${value }" items="${itemList}"> </form:select> </c:otherwise> </c:choose> And this is the code I have written in the JSP file: <tag:conditionalListControl path="model.selectedCountry" readOnly="false" label="name" value="id" listItems="model.countryList" className="simple" /> Upon execution the paring returns the following error: [jsp:165] javax.servlet.jsp.JspException: Type [java.lang.String] is not valid for option items But if i change the items="${itemList}" to items="${model.countryList}" which is the list I want to display, it works fine without any problem and also bind to required variables on form submit. But i don't want to hard code any variables in the tag lib. Any suggestions???

    Read the article

  • Tying in .addClass() with other functions?

    - by Anders H
    Assuming an accordion dropdown with the standard form of: <ul> <li> <a href="#">Main Element</a> <ul> <li> <a href="#">Dropdown Element</a> </li> </ul> </li> </ul> I'm using jQuery to expand when the parent element link is clicked: var $j = jQuery.noConflict(); function initMenus() { $j('ul.menu ul').hide(); $j.each($j('ul.menu'), function(){ $j('#' + this.id + '.expandfirst ul:first').show(); }); $j('ul.menu li a').click( function() { var checkElement = $j(this).next(); var parent = this.parentNode.parentNode.id; if($j('#' + parent).hasClass('noaccordion')) { $j(this).next().slideToggle('normal'); return false; } if((checkElement.is('ul')) && (checkElement.is(':visible'))) { if($j('#' + parent).hasClass('collapsible')) { $j('#' + parent + ' ul:visible').slideUp('normal'); } return false; } if((checkElement.is('ul')) && (!checkElement.is(':visible'))) { $j('#' + parent + ' ul:visible').slideUp('normal'); checkElement.slideDown('normal'); return false; } } ); } $j(document).ready(function() {initMenus();}); To add a class to the Main Element when clicked (aka the class is enabled anytime the dropdown is expanded) I'm trying to use .toggleClass(className) without luck, most likely to my positioning. Where can I add this element to get the desired effect?

    Read the article

  • Is there a way to check if a div has the same class as an ancestor in jQuery?

    - by T.R.
    I'm looking to dynamically highlight a tab, if it represents the current page. I have: <style> #tabs li{bg-color: white;} body.Page1 #tabs .Page1, body.Page2 #tabs .Page2, body.Page3 #tabs .Page3{bg-color: orange;} </style> <body class="Page1 ADifferentClass"> <ul id="tabs"> <li class="Page1 SomeClass"> <li class="Page2 SomeOtherClass"> <li class="Page3 AnotherClass"> </ul> </body> As you can see, there needs to be CSS for each tab, so adding another page involves modifying both the HTML and the CSS. Is there a simple (DRY) way to check if two divs have the same class already built into jQuery? I ultimately went with this: <script> $(document).ready(function(){ var classRE = /Page\d+/i; var pageType = $('body').attr('className').match(classRE); $('li.'+pageType).addClass('Highlight'); }); </script> <style> #tabs li{bg-color: white;} #tabs li.Highlight{bg-color: orange;} </style>

    Read the article

  • how to call subactivity of another application android?

    - by Are
    Hi. To call main activity I saw componentName class in android. intent = new Intent(new ComponentName(packageNam,classname); if same is used in case of child activity, I got error , "is activity delcared in andorid manifest?" like error. how to call app1 child activity in app2 by using intent ? In app1 the activity is declared like this in manifest <activity android:name=".activity.MessageCompose" android:label="@string/app_name" android:enabled="false"> - <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.SENDTO" /> <data android:scheme="mailto" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> </intent-filter> - <intent-filter android:label="@string/app_name"> <action android:name="android.intent.action.SEND" /> <data android:mimeType="*/*" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> - <intent-filter android:label="@string/app_name"> <action android:name="android.intent.action.SEND_MULTIPLE" /> <data android:mimeType="*/*" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity>

    Read the article

  • jQuery AJAX tabs + PHP

    - by ufw
    Hi, seems like I'm stuck with jQuery tabs. I'm trying to pass selected tab name to some php script but is seems like it doesn't get any data. This is how tabs normally work without any response from server side: http://pastebin.com/KBxj7p5k And this is how I try to pass the the current tab name to the server: $(document).ready(function() { $('ul.tabs li').css('cursor', 'pointer'); $('ul.tabs.tabs1 li').click(function(){ var thisClass = this.className.slice(0,2); $('div.t1').hide(); $('div.t2').hide(); $('div.t3').hide(); $('div.t4').hide(); $('div.' + thisClass).show('fast'); $('ul.tabs.tabs1 li').removeClass('tab-current'); $(this).addClass('tab-current'); var name = thisClass; var data = 'name='+name; $.ajax ({ type:"GET", url:"handler.php", data:data, success:function(html) { thisClass.html(html); } }); }); Thanks.

    Read the article

  • How do I stop Ant from hanging after executing a java program that attempted to interrupt a thread (and failed) and continued?

    - by Zugwalt
    I have Ant build and execute a java program. This program tries to do something that sometimes hangs, so we execute it in a thread. actionThread.start(); try { actionThread.join(10000); } catch (InterruptedException e) { System.out.println("InterruptedException: "+e.getMessage()); } if (actionThread.isAlive()) { actionThread.interrupt(); System.out.println("Thread timed out and never died"); } The ant call looks like this: <java fork="true" failonerror="yes" classname="myPackage.myPathName" classpath="build"> <arg line=""/> <classpath> <pathelement location="bin" /> <fileset dir="lib"> <include name="**/*.jar"/> </fileset> </classpath> </java> And when this runs I see the "Thread timed out and never died" statement, and I also see the main program finish execution, but then Ant just hangs. Presumably it is waiting for the child threads to finish, but they never will. How can I have Ant be done once it is done executing main() and just kill or ignore dead threads?

    Read the article

  • hasAndBelongsToMany only working one way

    - by Cameron
    In my application I have users that are able to be friends with other users. This is controlled with a users table and a friends_users table. The friends_users table has the following columns: id, user_id, friend_id, status And the model User looks like: public $hasAndBelongsToMany = array( 'Friend'=>array( 'className' => 'User', 'joinTable' => 'friends_users', 'foreignKey' => 'user_id', 'associationForeignKey' => 'friend_id' ) ); This seems to work fine when viewing the Users for a user who is in the user_id column, but doesn't work the other way around, i.e. in reverse... Any ideas why? Here is the method I use to list the friends for a user: $user = $this->User->find('first', array( 'conditions' => array('User.id' => $this->Auth->user('id')), 'contain'=>'Profile' )); $friends = $this->User->find('first', array( 'conditions'=>array( 'User.id'=>$user['User']['id'] ), 'contain'=>array( 'Profile', 'Friend'=>array( 'Profile', 'conditions'=>array( 'FriendsUser.status'=>1 ) ) ) ) ); $this->set('friends', $friends);

    Read the article

  • Javascript toggle using custom attributes

    - by Jacob
    Can't seem to get this to work for me, can anyone offer me some help? http://codepen.io/anon/pen/kABjC This should open and close a section of text based on click, it takes the ID # which is just a digit (1,2,3,4,etc) and using that id targets an id to open and close the section. Javascript $(document).ready(function(){ $('.classclick').click(function(){ $('#class'+$(this).Attr('data-id')+"show").show(400); }); }); HTML <div class="classes"> <?php foreach ($classes as $class): ?> <div class="class"> <div class="classclick" data-id="<?=$class['cid']?>"> <div class="class-title"> <?=$class['className']?> </div> <div class="class-intensity"> Intensity: <?=$class['classIntensity']?> </div> </div> <div class="class-show hidden" id="class<?=$class['cid']?>show"> <div class="class-inner-content"> <div class="two-thirds"> <?=$class['classDesc']?> </div> <div class="one-third"> Things To Know: asdfasd asdf afsdadfs fsda dfsa dfsadfsa </div> </div> </div> </div> <?php endforeach; ?> </div>

    Read the article

  • Why cant we create Object if constructor is in private section?

    - by Abhi
    Dear all I want to know why cant we create object if the constructor is in private section. I know that if i make a method static i can call that method using <classname> :: <methodname(...)>; But why cant we create object is my doubt... I also know if my method is not static then also i can call function by the following... class A { A(); public: void fun1(); void fun2(); void fun3(); }; int main() { A *obj =(A*)malloc(sizeof(A)); //Here we can't use new A() because constructor is in private //but we can use malloc with it, but it will not call the constructor //and hence it is harmful because object may not be in usable state. obj->fun1(); obj->fun2(); obj->fun3(); } So only doubt is why cant we create object when constructor is in private section? Thanks in advance

    Read the article

  • regex match css class name from single string containing multiple classes

    - by effectica
    I have a long string that contains multiple css classes. With regex I would like to match every class name as I then need to replace these class names like so: <span>CLASSNAME</span> I have tried for hours to come up with a solution and I think I am close however for certain class names I am not able to exclude closing curly brackets from the match. Here is a sample string I have been carrying out testing on: #main .items-Outer p{ font-family:Verdana; color: #000000; font-size: 50px; font-weight: bold; }#footer .footer-inner p.intro{ font-family:Arial; color: #444444; font-size: 30; font-weight: normal; }.genericTxt{ font-family:Courier; color: #444444; font-size: 30; font-weight: normal; } And here is the the regex I came up with so far: ((^(?:.+?)(?:[^{]*))|((?:\})(?:.+?)(?:[^{]*))) Please look at the screenshot I am attaching as it will show more clearly the matches I get. My problem is that I would obviously like to exclude curly brackets from any match.

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26  | Next Page >