w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Adding desktop path to powershell to switch between folders easily?
You should create an alias. Set-Alias alias command example Set-Alias "folder" "cd C:/Path/to/desktop/folder" Edit: if you want to use argument you should make a script (using or not an alias to call it)

Categories : Powershell

pagination codeigniter always starts at page 2 and active link is always at page 2
try a different way of solution, controller(index()) $this->load->library('pagination'); $config['base_url'] = site_url().'classname/index'; $config['per_page'] = $this->config->item('pagination_number'); $config['uri_segment'] = 4; $data['count']=$this->example_model->count(); $config['total_rows'] =$data['count']; $data['classname']=$this->example_model->getall($this->config->item('pagination_number'),$this->uri->segment(4)); $this->pagination->initialize($config); $data['page_link']=$this->pagination->create_links(); $this->load->view('users/classname.php',$data); model function getall($num,$offset) { $this->db->from('table_name'

Categories : Codeigniter

My website shows up as a blank page on my desktop
Turn on the wordpress debugging in wp-config.php file and run again to check is there any fatal error or not: define('WP_DEBUG', true); And be sure that error reporting is On Maybe you are not in right path. I found this theme on your host refer to modular theme: http://bbmthemes.com/themes/smart/

Categories : HTML

Adding Active Directory to a web site
If you are comfortable with PHP, you should be able to achieve the above no problem! The beauty of PHP is that someone somewhere along the line had the same problem as you so chances are, there's an established solution already. adLdap seems to be a good solution, a library that already does most of the hard work for you and all you'd need to do would be integrate it into your script! See: http://adldap.sourceforge.net/wiki/doku.php?id=documentation_user_functions Hopefully this can make it a little easier for you so you can concentrate on the other things like the actual functionality of the website itself.

Categories : PHP

Adding active class not overriding
You are adding a blank space " " too many .overview li.active { border:1px solid rgba(51,204,204,0.9); } /* change color on active */ .overview li.active:hover { border:1px solid rgba(51,204,204,0.9); } /* trying to force border */ Basically, you were looking for any class active in the children/grandchildren nodes of li and not on the li itself.

Categories : CSS

Rest .next()? My click function adding '.active' twice?
The problem you had was that currentItem didn't get updated when you clicked on a breadcrumb. I made a lot of changes, mostly "streamlining" things. I removed your global variables and based the current item on the active class instead. Check: http://jsfiddle.net/kQabJ/17/ $("#next-button").on('click', function () { var nextItem = $('.active').removeClass('active').next(); if (!nextItem.length) { nextItem = $('.item').first(); } nextItem.addClass('active'); }); $(".breadcrumb-cell .breadcrumb").on('click', function () { $('.active').removeClass('active'); var theID = $(this).data("id"); $("#" + theID).addClass('active'); }); Note that I also modified your DOM a bit to make it easier to select an item when a user clicks a breadcrumb. That change is

Categories : Javascript

Adding "active" class to a the toggle itself jQuery
You use jQuery and you have a unique toggler id. So, you can do this inside your existing function: $('.post-[id]').addClass('active'); Some suggestions though: Since your toggler classes have unique ids, you may want to have them use ids instead of classes. Instead of doing e.style.display, you can use jQuery's toggleClass which keeps track of adding and removing a class for you. You start by hiding all classes whenever you trigger the function, so you could just turn display on for that div. Since you use jQuery, you can use that to trigger the click as well. A simple example based on your code: <div class="trigger" id="[id]">Toggle</div> $('.trigger').click(function(){ $('.episodemirrors').hide(); var id = $(this).attr('id'); $('#post-'+id).css('display'

Categories : PHP

Java-how to tell if cursor has entered a folder or file component on the desktop page
Mouse events happen within the context of the Java application (not your desktop). I don't think this is possible. The best you can do is check if the cursor has left your Java application. As user BackSlash mentioned, you can use PointerInfo to get the pointer coordinates, but you cannot know if it has entered something that isn't part of your java application. http://docs.oracle.com/javase/7/docs/api/java/awt/PointerInfo.html An alternative option is: Add an AWTEventListener for focus events. As long as your app has focus before the button is clicked you'll receive a focus lost event. Then query for the pointer position. The limitation is that, of course, your app loses focus. So depending on what you are ultimately trying to achieve this might not be useful

Categories : Java

Adding to active record query based on a condition
No, the problem is not how you add the conditions. It is the condition itself, because where needs one parameter. where.not does not work at all. Try where('store_id <> 0')

Categories : Ruby On Rails

Adding .active class to a jQuery slideToggle menu
Javascript $('ul li a').on('click', function(e) { // to keep your link from actually clicking through e.preventDefault(); $(this).addClass('active'); $( '#' + $(this).attr('href') ).slideToggle(); }); HTML <ul> <li><a href="projekte">Projekte</a></li> <li><a href="mo">Mo</a></li> </ul>

Categories : Jquery

Detect Desktop and Redirect mobile browser to Desktop Main Website
So if you want to detect a desktop trying to view the mobile version put this in your .htaccess file: Options +FollowSymlinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^m.domain.com$ RewriteCond %{HTTP_USER_AGENT} !(android|bbd+|meego).+mobile|avantgo|bada/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)/|plucker|pocket|psp|series(4|6)0|symbian|treo|up.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino [NC] RewriteCond %{HTTP_USER_AGENT} !^(1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|

Categories : PHP

Adding active class to dynamic Twitter Bootstrap carousel in ASP.NET MVC
You can check for the first item in the loop: <div id="testimonials" class="carousel slide"> <div class="carousel-inner"> @{ var i = 0; foreach (var item in Model.Testimonials) { var itemClass = i++ == 0 ? "item active" : "item"; <div class="@itemClass" style="max-height:70px; overflow:hidden"> <h4>@item.Title</h4> @item.Quote </div> } } </div> </div> or replace foreach with for loop if your Model.Testimonials property is a type of IList<T> or any collection, which items can be individually accessed by index: <div id="testimonials" class="carousel slide">

Categories : Asp Net Mvc

Adding Twitter's Bootstrap 2.x "active" Class to "li" element inside a div
1. use document ready to fire your jquery (jQuery(document).ready(function($) { // Code using $ as usual goes here. });) see also: http://api.jquery.com/ready/ 2. you put the li tags of your subnav in a div instead of an ul tag 3. use a css selector to make your submenu active item visible: .nav-list li.active li.active > a{ background-color: #0088CC; color: #FFFFFF; text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); } Working example code: <!DOCTYPE html> <html> <head> <title>Responsive nesting</title> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap --> <style type="text/css"> body { padding-top: 40px; padding-bottom: 40px; } .nav-list li.active li.active >

Categories : Jquery

Adding PHP code to Drupal Page for adding Javascript
This is more typically handled via a custom module or theme function. But assuming this is being put into a field on a node your code should work. The issue is likely a text format setting. Assuming this is Drupal 7, you can go to /admin/config/content/formats. I assume you are using PHP format. So you will want to inspect the settings for this format and make sure the PHP filter is enabled.

Categories : PHP

Using .NET desktop application with DevExpress over Remote Desktop
I'm working with DevExpress .Net controls (and moreover sometimes with their controls source code) since 2007. And it seems I know the possible reasons of visual drawback of these controls under RDP. These reasons are: - Skinning technology (which is bitmap-based) - Double-buffered painting So, let me explain. When the user is connected via a Remote Desktop Connection, all drawing operations performed by control are transferred over the network connection to the RDP client for display. If control draw a line, the "DrawLine" command is sent over the network to the client. If control draw a text, a "DrawText" command is sent (along with the text to draw). But if control draw a bitmap, the entire bitmap needs to be transferred over the network. Thus this can be a main bottleneck when using

Categories : Dotnet

add active class to li from page url
I think that you want something like this: <ul id="navigation"> <li <?php if (strpos($_SERVER['PHP_SELF'], 'index.php')) echo 'class="current"';?>><a href="index.php">Home Page</a></li> <li <?php if (strpos($_SERVER['PHP_SELF'], 'about.php')) echo 'class="current"';?>><a href="about.php">About Me</a></li> <li <?php if (strpos($_SERVER['PHP_SELF'], 'contact.php')) echo 'class="current"';?>><a href="contact.php">Contact Me</a></li> <li <?php if (strpos($_SERVER['PHP_SELF'], 'portfolio.php')) echo 'class="current"';?>><a href="portfolio.php">My Work</a></li> </ul> I hope this will help you! PS: index.php, about.php, contact.php and portofoli

Categories : PHP

Urldecode bug: after adding a simple product to shopping cart on search page and redirect to current page
In this fle appcodecoreMageCoreHelperAbstract.php public function escapeUrl($data) this function is responsible for weird url. It use htmlspecialchars function of php whic replace & with '&amp;' see here http://php.net/manual/en/function.htmlspecialchars.php So what I do is comment this line $this->getResponse()->setRedirect($returnUrl); in my CartController _goBack method insrtead of I used my custom redirect method.

Categories : Magento

Adding parts of page title in web form and Master page
If I understand you correct, you would like to set the page title as combination of strings coming from the master page code behind and the content page code behind, right? I would not use an asp:Content placeholder for that, but instead an asp:Literal. This means you would need the following: MasterPage.Master: <title> <asp:Literal ID="TitleLiteral" runat="server"></asp:Literal> </title> MasterPage.Master.cs: public void SetTitle(string text) { TitleLiteral.Text = "my part of the title from master page" + text; }; ContentPage.aspx.cs: protected void Page_Load(object sender, EventArgs e) { ((MasterPage)Master).SetTitle("My part of the title from content page"); }; where MasterPage is the name of your master page (public partial class MasterPag

Categories : Asp Net

Unknown div adding length to page if page is shorter than window
Check out the source code on http://twitter.github.io/bootstrap/examples/sticky-footer.html Hope this helps!

Categories : HTML

Active Admin: How to set page title?
As per this post, you can use a line like the following in the action of choice: @page_title="My Custom Title" For example, to implement this in a pre-existing action like 'new', you would do something like this: controller do def new do @page_title="My Custom Title" new! do |format| format.html{render "my_new"} end end end

Categories : Ruby On Rails

Hover and active page styling
Remove color: white; from your .dropdown ul li.on rule and instead add it to this new css rule: .dropdown ul li:hover > a { color: white; }

Categories : CSS

How to highlight active page in a masterpage menu?
There are many ways to do this. There are some easy and some ugly hacky ones: Solution 1: Use a Menu Control. The standard .NET Menu Control has an easy solution to do this. This is the cleanest and fastest solution in my opinion. Have a look at this post. Maby it'll help you if you choose this solution. Solution 2: You coud use some sort of javascript to highlight the current item. jQuery would make that easier if you dont want to write everything by yourself. For this solution have a look at this page. It's outdated but still effective. Solution 3: This is kinda ugly solution and you can do that in many different ways: You could change the <a> elements to HyperLink controls and set some sort of session or cookie when you click on them. When set you could change the style based o

Categories : HTML

Show active navigation for current page with php
You should do it like this: <li <?php echo ($current_url == "globaluser.php") ? $active : ''?> ><a href="globaluser.php?Agent=<?php echo $Agent;?>">Overview</a></li> because right now you're conditioning the presence of the opening <li> tag

Categories : PHP

How to select a div in a div which is in active page(div) while using attr event?
http://jsfiddle.net/isherwood/JWBQG/6 var myIndex = $(this).parent('li').index(); $('.containers').eq(myIndex).find('.container_box').slideToggle().slideToggle();

Categories : Jquery

how to make
  • add css class active after refreshing page?
  • The problem with your code is you are trying to retrieve it onclick. That's the wrong logic. The correct logic is: when the page loads, retrieve it. When the li is clicked, store it. You also have a problem when using find("active"), you need to use the class character . otherwise it will search for elements with the tag name active not the class. $(document).ready(function () { $("li").click(function () { var id = $(this).attr("id"); $('#' + id).siblings().find(".active").removeClass("active"); // ^ you forgot this $('#' + id).addClass("active"); localStorage.setItem("selectedolditem", id); }); var selectedolditem = localStorage.getItem('selectedolditem'); if (selectedolditem != null) { $('#' + s

    Categories : Javascript

    how to add active class in current page in CakePhp
    This is a simple logic as follows <li class="<?php echo (!empty($this->params['action']) && ($this->params['action']=='controlpanel') )?'active' :'inactive' ?>"> <?php echo $this->Html->link('Dashboard', array('controller'=>'users','action' => 'controlpanel'), array('title' => 'Dashboard','class' => 'shortcut-dashboard'));?> </li> <li class="<?php echo (!empty($this->params['action']) && ($this->params['action']=='index') )?'active' :'inactive' ?>"> <?php echo $this->Html->link('Contacts', array('controller'=>'contacts','action' => 'index'), array('title' => 'Contacts','class' => 'shortcut-contacts'));?></li>

    Categories : PHP

    ASP.NET - Accessing Active Directory from code behind page
    I found the answer to my question in one of "Related questions" on this page. The answer was in this topic: Why does DirectoryServicesCOMException occur querying Active Directory from a machine other than the web server? I found, that it was exactly my case. After reading the suggested Microsoft article, I learned, that impersonating works only for local resources on the IIS server. To access network resources (SQL, Active Directory), I have to set "Trust this computer for delegation" in the computer object in Active Directory.

    Categories : Asp Net

    Single page navigation menu - active indicator
    Try this: your modified example $(document).ready(function(){ $('section').waypoint(function(direction) { var me = $(this); //added thisId = $(this).attr('id'); $('ul li').each(function(){ var secondaryID = $(this).attr('class'); if ( secondaryID == thisId ) { $('ul li').removeClass('active'); //added if(direction==='up'){ me = $(this).prev(); } //added if(!me.length){ me = $(this); } $(this).addClass('active'); } }); },{offset: '0'}); }); UPD ok, how about this exam

    Categories : Javascript

    Chrome Extension that loads Page Source of the active tab
    Background scripts are isolated from the current page because they're designed to be persistant regardless of the content of the page. You need to use the chrome.tabs API, specifically chrome.tabs.getCurrent. Once you have the current tab, you can inject code into the window. That's where your snippet above comes in. You will need to add "tab" to your permissions in the manifest file.

    Categories : Javascript

    Eager loading only first page of results with active record
    I ended up with doing two requests and merging the results together. It is not as hard as it sounds: # per_page is 20 limit = "#{(page.to_i - 1) * 20}, #{(page.to_i * 20)}" query = Users.where('items.title LIKE "%whatever%"').where('addresses.lat < 50') return query.includes([{items: [:images, :category]}, :profile, :addresses]). joins(:items). limit(limit).all | query.select('DISTINCT users.*').joins(:items, :addresses). limit(200).all Remark 1: This eager loads only the 20 elements of the current page, and adds all the elements on the other pages without eager loading. For example, say you are on page 3, the first request would eager loads with limit 60, 80 and elements #0 to #199 are added. The way array union (operator |) works in ruby is that if the s

    Categories : Ruby On Rails

    What is the difference between a desktop app and a non-desktop app in windows
    With the introduction of Windows 8, Metro, and Windows Store, API documentations now specify which framework(s) they are supported on. Not all desktop APIs are available to metro/mobile apps, and vice versa.

    Categories : Windows

    Can i check if a session is active throught the code instead at page load?
    Yes, check your session_id(). If it returns an empty string, session is not set. If you want to be able to tell from the client-side, you'll need to use AJAX.

    Categories : PHP

    Changing Fancy Sliding Form active tab on page load
    you can set javascript variable as bellow and use it for your script. sample code with php , <?php $active_tab_from_php = 2 // you should change this, for testing you can hard code echo '<script> var active_tab = "'. $active_tab_from_php . '";</script>'; ?> now you can use this active_tab variable with your script as below, var current = active_tab;

    Categories : Jquery

    Use jquery to reopen last active accordion panel after page reload
    jQuery's .load() will allow you to fetch just a portion of a document. See: http://api.jquery.com/load/ For example: $('#summary').load('somepage.html #summary > *'); Loads the content of the element #summary from the page somepage.html into the current element #summary

    Categories : Jquery

    complex active state navigation on single page website
    You mean scrollspy? Check here http://jsfiddle.net/mekwall/up4nu/ // Cache selectors var lastId, topMenu = $("#top-menu"), topMenuHeight = topMenu.outerHeight()+15, // All list items menuItems = topMenu.find("a"), // Anchors corresponding to menu items scrollItems = menuItems.map(function(){ var item = $($(this).attr("href")); if (item.length) { return item; } }); // Bind click handler to menu items // so we can get a fancy scroll animation menuItems.click(function(e){ var href = $(this).attr("href"), offsetTop = href === "#" ? 0 : $(href).offset().top-topMenuHeight+1; $('html, body').stop().animate({ scrollTop: offsetTop }, 300); e.preventDefault(); }); // Bind to scroll $(window).scroll(function(){ // Get container scroll

    Categories : Javascript

    Make php session active OR if logout return to previous page
    That's a PHP config issue. If you don´t have any access to the php.ini file or don´t wanna mess with it, what you can do is that every time you enter a page you save the current page in a table on the database (it should have a relation with the user table), and when the user log outs after the 30min limit, you just retrieve that value from the database. You can get the current URL with $_SERVER['PHP_SELF']. To check if the user logout just save a session variable and everytime the page is load do: if(!isset($_SESSION['userid'])){ // redirect to the page in the database table header("Location: ".$field_from_db); } Hope it helps!

    Categories : PHP

    Add page class suffix based on active item in Joomla 3.1.1
    Here is how I add page classes to all of my pages: In the beginning of my index.php file, I add the following php: if (is_object($menu)) $pageclass = $menu->params->get('pageclass_sfx'); Then, I use the following for the new opening body tag: <body class="<?php echo $pageclass ? htmlspecialchars($pageclass) : 'default'; ?>"> This sets the body class to "default" by default if a Page Class is not set (see below). Once the above is done, changing the body class is easy. In the Joomla admin, open the menu item you want to set the page class on, click on Advanced Options and scroll down/expand Page Display Options. Enter the class name in Page Class and that's it!

    Categories : PHP

    keeping active page using include_once to include site navigation
    Just use an if-statement to add "active-page" as class to the current active page: <li><a href="index.html" title="Home" class="<?php if (ACTIVE_PAGE == "About") echo "active-page"; ?>"><span aria-hidden="true" class="li_display nav_icon"></span>About</a> You then need to define a constant ACTIVE_PAGE before including your navigation. <?php define ('ACTIVE_PAGE', "About"); include ('yournav.php'); ?> This should work and is okay if you do not have too many pages. An alternative could be in getting the currently visited page via $_SERVER['PHP_SELF'] and then add to navigation.php which html-file shall be called for which entry in php_self. The advantage would be that you have all your navigation-based code in one place. Personally, I wo

    Categories : PHP

    AccountController not redirecting to the correct page when using Active Directory authentication
    Before you redirect to action, issue a FormsAuthentication.SetAuthCookie. This should override the default behaviour of the return URL: Its also worth noting that the bool in SetAuthCookie(string username, bool createPersistantCookie) can be used to remember the user. For this example I have set it to false. try{ LDAPAuth.LDAPQuery(model); FormsAuthentication.SetAuthCookie(model.UserName, false); return RedirectToAction("Homepage", "HomePage"); }

    Categories : Asp Net Mvc

    Is there a way to build a web page that uses different fonts on a phone screen and a desktop screen without writing any JavaScript?
    Sure, you can do it in CSS, using @media rules to set different fonts based on the screen size. Here's a good source of information: http://css-tricks.com/snippets/css/media-queries-for-standard-devices. I'd set the desktop font first, then override it with @media queries with your phone font.

    Categories : Javascript



    © Copyright 2017 w3hello.com Publishing Limited. All rights reserved.