w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
LearnStreet Ruby for Beginners Lesson 9.12
The tutorial is asking you to define a "getter" for the BankAccount class: class BankAccount def initialize(balance) @balance = balance end def balance @balance # remember that the result of last sentence gets returned in ruby end end Then, you can do bankAccount = BankAccount.new 22 # the value 22 is the balance that gets passed to initialize bankAccount.balance # 22 Now, if what the tutorial is asking is a class method (to me it's not really clear), you should do: def self.balance # self is here so you define the method in the class @balance end Then you can do BankAccount.balance

Categories : Ruby

How do I add advanced properties to a controller as seen in the W3 lesson on MVC?
Im not sure if this will help, but you can try clearing your template cache, as show in this question. If that doesn't work, I suggest reinstalling MVC entirely, its possible that something went screwy and you are missing some packages. I suggest installing MVC through the Web Platform Installer (WPI), which can be found here. It should install everything you need.

Categories : C#

Learnstreet Ruby Lesson 11.5 Transfer state between objects
You'd call transfer! on one of the objects, passing in the other, e.g., bobs_account.transfer!(500, alices_account) You're just calling a method on an instance, like "foo".size or [1, 2, 3].each etc. The only difference is that you've created the method you're calling.

Categories : Ruby

Stuck on Learnstreet Ruby Training. Lesson 7.8 Introducing && Operator
So I just went through the other lessons to get to this one. Your answer is very close, but you need a space before and after the - in the responses. def get_range(number) if number >= 1 && number <=50 "1 - 50" elsif number >=51 && number <= 100 "51 - 100" elsif number >=101 && number <= 200 "101 - 200" elsif number >= 201 "greater than 201" end end

Categories : Ruby

nth-child not rendering in Dreamweaver
The Dreamweaver design view sucks, it usually never gives an accurate representation of how things look in a real browser. As an alternative and a helpful answer to your issues you can try the live view from dreamweaver that was implemented after CS5. Here is a video explaining how to set it up. http://tv.adobe.com/watch/creating-time/dreamweavers-live-view-helps-you-save-time/ As a final note, try not to use the design view and tey to get more into the code... once you get used to it you can read the code and visualize almost exactly (usually always better than design view) how things look. So please do not trust design view in dreamweaver for development.

Categories : HTML

Facebook comments in dreamweaver
You need to scrape your page to refresh Facebook's internal cache. To scrap you can send a web request to the Facebook Object Debugger and pass your URL, or you can do like this: curl "http://developers.facebook.com/tools/debug/og/object?q=$url" Also: When does Facebook scrape my page? Facebook needs to scrape your page to know how to display it around the site. Facebook scrapes your page every 24 hours to ensure the properties are up to date. The page is also scraped when an admin for the Open Graph page clicks the Like button and when the URL is entered into the Facebook URL Debugger. Facebook observes cache headers on your URLs - it will look at "Expires" and "Cache-Control" in order of preference. However, even if you specify a longer time, Facebook will scra

Categories : HTML

Regular Expression in dreamweaver
Do you need to extract/capture certain pieces of info or just find the whole string? My usual method for generalizing regexp is to start with the literal text and just replace elements with general placeholders... <a onclick="NavigateChat();" style="cursor:pointer;"><img src="[^"]+" width="d+" height="d+" border="d+" alt="[^"]+"/></a> This expression uses the character set [^"] which stands for "not a quote mark". If you just use .* as a wildcard, your regexp will fail if there is more than one tag present in your document. Regexps are "greedy" and would try to select ALL the text from the first tag through to the end of the last link. Without a data sample, I can't test this for sure, but it should be close.

Categories : Regex

Phonegap HTML/Dreamweaver CC Splashscreen
I would do it with a Phonegap plugin the splash described Here From the plugin install directory, you have to copy manually the Java files to Android source files, because the plugin install not always makes a copy. I hope it helps!

Categories : Android

Invalid markup with all my div classes when using php in dreamweaver
It is because in cssmenu.php you must be having <html> or <head> or <body> tags those may be already present in your current file with the <div> tag having include statement.

Categories : PHP

dreamweaver regex replace css rule
Search for ([a-zA-Z0-9])([#.]) and replace by $1 $2. Don't forget to check "Use regular expression" in the search box. Explanation: ( : start matching group 1 [a-zA-Z0-9] : match letters lower and uppercase and digits ) : end matching group 1 ( : start matching group 2 [#.] : match either # or . ) : end matching group 2

Categories : Regex

how to decrypt Dreamweaver site passwords?
The Dreamweaver just gives you the option to export the site manager data. Site=>Manage Sites=>select the site=>export this will save on your computer a readable xml file with extension .ste Just open it in word-pad or any other application to read the xml and search for the needed server password and get the value of the attribute pw in the tag server Then use this javascript function to decrypte the password from this value function decodeDreamWaverPass(hash){ var pass = ''; for (var i=0 ; i<hash.length ; i+=2){ pass+=String.fromCharCode(parseInt(hash[i]+''+hash[i+1],16)-(i/2)); } return pass; } Hope that it will be helpful for you...

Categories : Javascript

dreamweaver automatically creating a new folder
So I posted a similar question on Adobe's forums and they responded with this and yes it does fix the issue. Dreamweaver creates a temporary page. It's created specifically for previewing. You "should" be able to turn it off in the preferences... Edit > Preferences >select Preview In Browser > uncheck the "Preview using temporary file" checkbox EDIT: OOps, forgot the Preview In Browser selection.

Categories : PHP

Dreamweaver Syntax Highlight (Php, Html)
Check for balanced parentheses, braces, or square brackets Open the document in Code view. Place the insertion point in the code you want to check. Select Edit > Balance Braces. All of the code between the enclosing parentheses, braces, or square brackets is selected. Choosing Edit > Balance Braces again selects all of the code inside the parentheses, braces, or square brackets that enclose the new selection. http://help.adobe.com/en_US/dreamweaver/cs/using/WSc78c5058ca073340dcda9110b1f693f21-7ba2a.html

Categories : PHP

PHP session is not working though there is no error at all in Dreamweaver
You are doing nothing when the query return more than one result elseif ($count > 1){ echo "here"; } try the above code and check whether it makes any change

Categories : PHP

How to transfer jsfiddle code to dreamweaver?
The default value of the second dropdown in jsFiddle is "onLoad". This means any javascript you write in the script panel will be executed in an onLoad event handler. Since you're using jQuery, you can reproduce this behavior by using a $(document).ready block*: $(document).ready(function () { // your code from the jsFiddle javascript panel }); *onLoad and document ready are not the same thing, but either will work for you.

Categories : Jquery

HTML Dreamweaver Left Margin
The body of the page includes a browser default margin, so you should reset that value once you start editing your CSS, if you don't want to bump in later issues like this. Copy the following to the top of you CSS file/tags: html, body{ margin: 0; padding: 0; } With that you can then remove the unnecessary updates on the margins that you've inserted to correct this problem.

Categories : CSS

Developing a User Authentication in DreamWeaver CS6
i was look for the same answer, and found this tutorial at adobe website, it helped.

Categories : Authentication

How can I make a click counter in dreamweaver in javascript?
As mentioned by @SLaks, you will need some method of storing this counter on the server - otherwise there is no way for a page request to know how many times it has been called before. To do this you will need both: Server-side code to read the value and display it to the user, and also to update the value when the page is requested the next time, and Server-side storage to actually hold the counter value. One possible solution to this (without adding a huge amount of additional complexity) would be to use PHP to read/write the counter, and a simple text file to hold the value. There are other ways, but may make things a bit too hard (i.e. no need for a database to hold one value).

Categories : Javascript

Files open as completely empty in Dreamweaver
Found the answer, was a corrupted cache. Followed directions here: Dreamweaver's cache is kept in a file in its Configuration folder. That file name depends on OS: For Windows it is WinFileCache-<randomString>.dat For MAC it is MacFileCache-<randomString>.dat Deleting of that file clears the cache. After restarting Dreamweaver is creating new one. Location of the cache file differs for each version and operating system. Here is a list of locations depending on DW version and OS: For Dreamweaver CC: Vista, 7 & 8: C:Users<username>AppDataRoamingAdobeDreamweaver CC<language>Configuration XP: C:Documents and Settings<username>Application DataAdobeDreamweaver CC<language>Configuration Once I cleared it and rebooted and restarted it wor

Categories : File

HTML from Dreamweaver to Muse not working properly
I think the reason why is probably because you didn't put style tags around your code. Try to put it up like that and see if it helps :-) (div style="border: 1px solid #aaa;background-colo r:#f9efef; width:920; height:375px; overflow:auto; color:#FFF;")(p) (img src="PersonalSite/Portfolio.jpg" alt="" width="4325" height="350" /)(/p) (/div)

Categories : HTML

Collaboration - Java EE project and front end (dreamweaver)
The first thing which comes to my mind is: How did it work before? You must be either using this setup since some time and then collaboration between front end and backend guys must work somehow, or yo set this up recently, then I can tell you that JSP is an outdated technology since several years. I would further assume, that within a small startup you have the possibility to change setups without caring about company policies and the need to be more efficient in your development process than some big company, that's why I strongly propose to invest that time now and save probably more later. The default server-centric web technology in Java EE is JSF in combination with Facelets as view technology. For your case this would both benefit the backend guys, as they don't have to maintain

Categories : Java

How to import colors.xml into dreamweaver creative cloud for Mac
(in OS X 10.7.5 & Adobe CC) i put my darkcoding scheme succesfully in this hidden folder /Users/yourusername/Library/Application Support/Adobe/Dreamweaver CC/nl_NL/configuration/CodeColoring Use Command+K in Finder and paste this path and change yourusername in your username. Don't forget to change nl_NL in your language-code. By the way: after struggling with my own dark color scheme, i switched to That Web Guy's theme: http://www.thatwebguyblog.com/post/a_dark_code_view_theme_for_dreamweaver/

Categories : Osx

Dreamweaver PHP contact form returning name error
Change the form method to method="POST" instead of GET: <form action="myform.php" method="POST"> Right now in the PHP code that processes the form input you are referring to the POST data. Right now you're using method is GET and that's why the values will not be set in the $_POST array. Alternatively in your processing code you could use $_GET instead of $_POST.

Categories : PHP

code fails to work outside a jsFiddle in dreamweaver
You need to move click handler code in your document ready handler - $(document).ready(function () { $("div.tab-headers>a").click(function () { // Grab the href of the header var _href = $(this).attr("href"); // Remove the first character (i.e. the "#") _href = _href.substring(1); // show this tab tabify(_href); }); tabify(); }); The reason, it works on fiddle is that, jsFiddle automatically wraps your code in ready handler - their is select box on left to choose though

Categories : Javascript

javascript setInterval() working in Dreamweaver but not in Chrome
id is only visible from the scope of the moveDown function. Make it global so that you can call clearInterval(id) in moveUp. Change function moveDown() { var top=-500 var id = setInterval(function() { to var id; function moveDown() { var top=-500 id = setInterval(function() { And changing the dom every tenth of millisecond (.1) might be a little extrem...

Categories : Javascript

Dreamweaver Centering Divtag : Creating a header box
Add the following to your #HeaderBox CSS Margin: 0 auto; What does the above do/ mean? Well first we declare that we need to adjust the margins in question. The '0' is actually shorthand CSS in play here (ie: you could do Margin: 0 auto 0 auto;) which would accomplish the same thing. But the 0 in question declares the top and bottom margins, the auto tells the browser fit me in with the space you have around said element.

Categories : CSS

Dreamweaver PHP mySQL insert to WordPress wpdb Conversion
OK after a bunch of research and some experimentation I have found the solution. Basically the auto generated code is not what you want to use, however you can use bits and pieces of it to build the custom code quickly. Such as building the form fields for you. Here is the new code for WordPress that does the same thing that the Dreamweaver code does. On top of that, the WordPress API wpdb sanitizes and does much of the other work you would otherwise have to do manually. Pretty cool if you ask me! The form stays the same as I am just going to use what Dreamweaver builds because it is quick and easy. Delete everything else that Dreamweaver created and replace it with the code the code below using WordPress's $wpdb. <?php <!-- initialize wpdb --> global $wpdb; <!-- grab wordpr

Categories : PHP

HTML Footer in Adobe Dreamweaver CS6 design view
yes, its correct that Dreamweaver's output is quite different than that of web browser's output and there is nothing wrong with your code. Dreamweaver's internal web browser is not much updated and doesn't supports some HTML and CSS tags. so just ignore Dreamweaver's web browser..

Categories : HTML

Dreamweaver Preview Browser different from Actual Webpage HTML CSS
I tried using http://bradfrost.github.io/this-is-responsive/patterns.html# as a basic template and it ended up working how I wanted it to. It did require starting again and copying and pasting only the relevant code. TRY THIS: http://bradfrost.github.io/this-is-responsive/patterns.html#

Categories : HTML

Include line breaks in Dreamweaver regex for less code
You can replace by using saving groups like this: Find: ^.*?:s(.*)$ Replace: $1 Then, click Replace All button. See also: Using regular expressions – Part 2: Finding and replacing text

Categories : Regex

Keep the information is saved on jQuery Mobile app developed in dreamweaver
Use the localStorage API: localStorage.setItem("word", "your word goes here"); alert( "word = " + localStorage.getItem("word"));

Categories : Iphone

is there any region tag in dreamweaver cs6 that functional alike visual studio has?
You don't need to use code/tag in Dreamweaver. Select the part of code than you want to collapse and click on minus sign in the left gutter. Your code will be collapsed and Dreamweaver will remember this. You can find more options in Edit, Code Collapse menu. For example, you can collapse HTML tag and its children by selecting Collapse Full Tag.

Categories : Visual Studio 2012

Dreamweaver design and live view show different things?
If you want to use Dreamweaver you should ditch the design view and get in the habit of previewing everything in the browser and troubleshooting with the browsers web inspector. If you really want to see a live preview of your css and positioning, you can do some of that in the web inspector. If you have access to a Mac you should consider looking at Espresso http://macrabbit.com/espresso/ by the folks at macrabbit. Also, beware of the non breaking space returns (<p>&nbsp;</p>) tags that Dreamweaver is making, delete em and use css instead.

Categories : HTML

Dreamweaver CS6 says my javascript file is "not defined on a local disk"?
I was using the Dreamweaver tutorial and the same message happened. I found out that my CSS folder needed to have a styles.css and a print.css file to be attached and the page showed up. All of the coding had been done I was just getting the error message that the local disk did not have my folder.

Categories : Javascript

Adobe Dreamweaver CC Phonegap Build Service Issue
After going through the APK, just found out that Dreamweaver CC has a bug while packaging the APK from Macintosh. The theme CSS files of the jQuery mobile are taken as default Macintosh Hard Drive Path. Hence you need to tweek it a bit to the relative file path. Macintosh File Path: <link href="file:///Macintosh%20HD/Applications/Adobe%20Dreamweaver%20CC/Configuration/Third%20Party%20Source%20Code/jquery-mobile/jquery.mobile.theme-1.0.min.css" rel="stylesheet" type="text/css"/> Instead copy the themes to the following folder and use the relative file path: <link href="jQueryAssets/jquery.ui.core.min.css" rel="stylesheet" type="text/css"> It works great :)

Categories : Jquery

I'm using SpryTabbedPanels in Dreamweaver and I need to change the menu font size only?
There is no way you can do this in an 'easy' way. All the parent css rules get inherited by child nodes unless overwritten. So if you want to make sure that all the elements inside .TabbedPanels will not inherit its font, use: .TabbedPanels <elements you need styled> { font-family: <your desired font>; } For example, this will reset font of all the nodes within .TabbedPanels: .TabbedPanels * { font-family: auto; }

Categories : CSS

Dreamweaver change file in dual screen view
What I see from you screen grab is you are using Code Inspector - it displays your HTML in a floating window so you see your working pages in their full glory rather than have them cut in half as in Split View. Have you tried Dreamweaver's Code Split View, please read link

Categories : Javascript

dreamweaver regex replacement fails when newline used in search pattern
It turns out this file is using (carriage return and newline) for a line delimiter rather than only (newline) as was expected. The solution is to use ( ? )x as the pattern and $1y as the replacement. Works like a champ. The file source lives on a Win7 laptop but is put to a UNIX box (CentOS 6.4) for actual use. Also, a big thank you to commenter for suggestion to make conditional so pattern will handle both Linux / UNIX and Windows.

Categories : Regex

Dreamweaver CS6 - How to convert latin caracteres to the correspondent html code?
There is no built in function to do this in Dreamweaver. Option 1 There is this plugin. You can select some text, and run this plugin from the "commands" menu. I know this works CS5 but I have not tested it in CS6. Option 2 If you change this line in your HTML file: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> to this: <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> Dreamweaver will know to convert the characters automatically. See this forum here.

Categories : HTML

Adobe Dreamweaver CS6 (and CC) doesn't do code-hightlight for *.TWIG files / Notepad++ Auto-Twig highlight
I was just having this issue, with CS6 (following Adobe's site). Make sure to have Dreamweaver turned off. Edit: C:Users\[username]AppDataRoamingAdobeDreamweaver CS6en_USConfigurationExtensions.txt Find: HTM,HTML,...,SVG:All Documents HTM,HTML,HTA,HTC,XHTML:HTML Documents Change to: HTM,HTML,...,SVG,TWIG:All Documents HTM,HTML,HTA,HTC,XHTML,TWIG:HTML Documents` Turns out that there is a second MMDocumentTypes.xml in: C:Users\[username]AppDataRoamingAdobeDreamweaver CS6en_USConfigurationDocumentTypesMMDocumentTypes.xml and C:Program FilesAdobeAdobe Dreamweaver CS6configurationDocumentTypesMMDocumentTypes.xml Edit both these files and change this line in both: <documenttype id="HTML" internaltype="HTML" winfileextension="html,htm,shtml,shtm,stm,tpl,lasso,xhtml" macfileexten

Categories : HTML



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