w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Webstorm - Link html class reference to scss file
As @Iena said, it's not possible. Try voting for the issue (http://youtrack.jetbrains.com/issue/WEB-6737) and JetBrains may add the feature.

Categories : Intellij Idea

ECMAScript 6 modules in Node.JS
You can use Continuum, which is an ES6 virtual machine written in (current) JavaScript.

Categories : Javascript

Portable replacement for ECMAScript 6 Set?
off the top of my head, this can be accomplished with an object and a bit of code. an object is a hash and thus gives you 80% of the functionality you want. the problem with js objects is that their keys are always strings. This is where you write a bit of code. I would create 2 objects: one where your keys are strings and one where your keys start out as numbers but become strings. if thing thing you are inserting is number, check in the numbers object, if string, check in the other object. psudocode: numObj = {} strObj = {} add = (val) -> if _.isNumber(val) numObj[val] = true else strObj[val] = true contains = (val) -> if _.isNumber(val) return !!numObj[val] else return !!strObj[val]

Categories : Javascript

How does the "new" keyword work as described in ECMAScript 5 standard
Let's go through this step by step Resolve things like new window['foo' + 1 + 'bar'] -> new window.foo1bar determine what object is actually referenced: What is window? Local variable or property of the global object? This is obvious. Not so obvious, but the point is: every Function is a constructor, but not every constructor is a Function. This point makes sure that new is only called on constructors. Run the constructor. Note that the spec also provides MemberExpression : new MemberExpression Arguments for the case new foo(...)

Categories : Javascript

ECMAScript Regex for a multilined string
Try to use: lazy quantifiers: === (.+?) ===\n([\s\S]*?)\n=== END \1 === negative classes and negative lookaheads: === ((?:[^ ]+| (?!===))+) ===\n((?:[^\n]+|\n(?!=== END \1 ===))*) POSIX: === (.+?) === ((.| )*?) === END [^=]+? ===

Categories : C++

Sharepoint 2010 list creation using ecmascript
You can use SPServices with "GetListCollection" to find all the lists in a Sharepoint, and then use "AddList" to create it. Something like: var myList="My List Test"; // the name of your list var listExists=false; $().SPServices({ operation: "GetListCollection", async: true, webURL:"http://my.share.point/my/dir/", completefunc: function (xData, Status) { // go through the result $(xData.responseXML).find('List').each(function() { if ($(this).attr("Title") == myList) { listExists=true; return false } }) // if the list doesn't exist if (!listExists) { // see the MSDN documentation available from the SPService website $().SPServices({ operation: "AddList", async: true, webURL:"http://my.share.point/my/dir/", listN

Categories : Sharepoint

SharePoint List items with the same titles using ECMAScript
Here it is: SPWeb web = SPContext.Current.Web; SPList list = web.Lists["CustomList"]; SPQuery qry = new SPQuery(); qry.Query = @" <Where><Eq> <FieldRef Name='Title' /><Value Type='Text'>" + TextTitle.Text + "</Value></Eq></Where>"; SPListItemCollection result = list.GetItems(qry); TextBoxCheck.Text = result.Count.ToString() + " matches has been found";

Categories : Javascript

Which ECMAScript standards comply Adobe's ExtendScript implementation? (if any)
If you look at the After Effects CS6 Scripting Guide, it says: The After Effects scripting engine supports the 3rd Edition of the ECMA-262 Standard, including its notational and lexical conventions, types, objects, expres- sions, and statements. ExtendScript also implements the E4X ECMA-357 specification, which defines access to data in XML format. I imagine the rest of the Adobe Collection is the same.

Categories : Javascript

In Draft ECMAScript 6, what's the rationale behind using StopIteration exception to signal the end of iteration?
I don't claim to be authoritative with this answer. Instead, it is just my recollection of various discussions I read about iterators and/or my own thoughts... Unfortunately I do not have a list of sources (too long ago) nor can I easily produce one (because even googling up stuff takes lots of time sometimes). StopIteration The name StopIteration and a lot of the semantics originated from python. PEP 234 has some remarks regarding alternative approaches: It has been questioned whether an exception to signal the end of the iteration isn't too expensive. Several alternatives for the StopIteration exception have been proposed: a special value End to signal the end, a function end() to test whether the iterator is finished, even reusing the IndexError exception.

Categories : Javascript

What does the standard (HTML5 and EcmaScript 5.1) say about extending host objects in the browser?
the dom/html elements have an prototype chain as follows: HTMLElement > Element > Node > Object hooking in anywhere in the chain where it makes the senes is probly the best bet.

Categories : Javascript

Visual Studio Express 2012 for Web TypeScript EcmaScript version
This question seems like a duplicate of: Targeting ES5 with TypeScript in Visual Studio You can use the compiler flag -target ES5 to compile typescript to ecmascript 5. In VisualStudio this is possible by editing the xml file which stores the compiler target. edit

Categories : Visual Studio 2012

SharePoint 2013 Property Bag CRUD using jQuery (REST API) and CSOM (ECMASCRIPT)
You can update key value with set_item() method. There is code snippet: var clientContext = SP.ClientContext.get_current(); var oWebsite = clientContext.get_web(); clientContext.load(oWebsite); var webProps = oWebsite.get_allProperties(); clientContext.load(webProps); clientContext.executeQueryAsync(successHandler, errorHandler); function successHandler() { var client = webProps.get_fieldValues().Client; var newClient = "newClient"; webProps.set_item("Client", newClient); } I think it must be possible in REST, as CSOM is just wrapper over REST. You can get request to http://yourServer.com/_vti_bin/client.svc/ProcessQuery with Fiddler or browser developer tools.

Categories : Jquery

Setup Jade With webstorm on MAC
The EISDIR error is caused when a Node application expects a file, but gets a directory. This particular instance of that error was thrown by this block of code: fs.writeFile(path, output, function(err){ if (err) throw err; console.log(' 33[90mrendered 33[36m%s33[0m', path); }); You can tell because it's not error number 156, but the line number of the relevant code. Do you, by any chance have a directory named main.html in /Applications/MAMP/htdocs/HTMLCodes/Sports/public_html? Also, you should be able to just execute the command, jade main.jade without the second argument. That would seem to make your life easier. Though if your dead set on using Webstorm on a Mac, this configuration should work equally well, or to keep it really simple, just put $File

Categories : Osx

Grunt debugging from Webstorm
You have to run grunt-cli as a Node application: Create a new Node.js Run/Debug configuration: Run->Edit configurations... In Path to Node choose your node binary, ie: /Users/someuser/nvm/v0.10.5/bin/node In Working Directory, choose your Gruntfile.js directory, ie /Projects/someproject In Path to Node App JS File, choose your Grunt CLI path (you can choose the grunt-cli symlink created on your node bin directory, WebStorm will use the symlink target), ie: /Users/someuser/nvm/v0.10.5/lib/node_modules/grunt-cli/bin/grunt (C:UserssomeuserAppDataRoaming pm ode_modulesgrunt-cliingrunt on Windows 7) In Application parameters enter the Grunt task to run, ie test Click on Run or Debug and you are done :)

Categories : Node Js

How to run build.dart in WebStorm?
OK, thanks to LazyOne's hint I was able to dig a bit deeper. The solution to this is to create a File Watcher in WebStorm with the following options: Scope: Project Files Program: [your path to]dart-sdkindart.exe Arguments: build.dart Working Directory: $ProjectFileDir$ This will run the build.dart every time a file in your project changes, pretty much exactly like the Dart Editor.

Categories : Dart

cannot open file '%f' webstorm
This is something I have no idea why it was showing that message. But upon research,, I found in the menu properties there is the extra "%f" at the end. Remove that, voila. It works with no annoying error.

Categories : Misc

WebStorm - Node.JS project
it's not currently supported - please vote for WEB-1173 and WEB-8333

Categories : Debugging

WebStorm and PHPStorm debug php and js at same time
Solution: As LazyOne suggested I should use "zero configuration" option inside PhpStorm, complete instructions at jetbrains/... Below is a description of the steps: Install Xdebug (sudo apt-get install php5-xdebug) Add inside /etc/php5/apache2/php.ini the lines: [Xdebug] zend_extension=/usr/lib/php5/20100525+lfs/xdebug.so xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9000 restart apache: "service apache2 restart" check Xdebug is enabled "php --version" should show "with xDebug vx.x" Toggle the “Listen debugger connections” button., this will listen for incoming connections to the test.php script Set a breakpoint in the test.php source code Activate the xdebug debugger, to do this we need to set a special GET/POST or COOKIE paramete

Categories : PHP

webstorm: typescript bool vs. boolean
Webstorm language service currently only works with 0.8.x, The typescript language service inside WebStrom does not understand the changes made in 0.9.x, and since the TypeScript language service api changed (for the better imho) from 0.8 to 0.9 its not a drop in replacement. A new version of WebStorm with these features is on the way though (should be soon).

Categories : Javascript

Multi-select Jetbrains Webstorm
Well, you cannot. I think you're talking about the multiple cursors that are present in Sublime Text 2. But, if your text is aligned, then you can change it using the ALT + CLICK and dragging that. You can vote for this feature as lena mentions. UPDATE This feature is now supported in Webstorm 8. If you press the ALT key and click on a different location, you will get a separate cursor there. Before, you could only drag and create cursors in the same line, however, now you can place your cursor wherever you want to. Please take a look at this video to learn more.

Categories : Misc

Getting angularJS autcomplete in Webstorm/PHPStorm
If you don't already have angular set up, go to Preferences > Project Settings > Javascript > Libraries and add your version of angular. As for autocomplete in html strings, I don't think that's going to happen with the current version of PHPStorm, but in most other places, it should do the trick.

Categories : Angularjs

WebStorm Linking to a .js file in HTML
No idea what 'Webstorm' is, but your HTML contains no reference to the jQuery library. This is where $ is defined. At the following above your existing <script> tag: <script type="text/javascript" src="[ PATH TO JQUERY ]"></script>

Categories : Javascript

How to set up instant code completion in WebStorm 7 EAP?
It can just be slow. If explicit Ctrl+Space is as slow, I'd suggest you to file a performance problem request to http://youtrack.jetbrains.com/ with a CPU snapshot attached (http://devnet.jetbrains.com/docs/DOC-1253).

Categories : Intellij Idea

Webstorm don't recognize node.js third party modules
It seems that the '..params' module is exporting a constructor function that constructs an object which has kioskParams as an attribute. And the constructor itself doesn't have an attribute called kioskParams. It can be easier understood if you write it like this: var SyParams = require('../params'); // The module exports a constructor ... var syParams = new SyParams(); // You construct the actual object syParams.kioskParams; //Then you access its members

Categories : Node Js

Shortcut to quickly run a project from a Javascript in WebStorm?
To have the application opened in a specific browser of your choice, choose View | Web preview on the main menu or press Alt+F2. Then select the desired browser from the pop-up menu.

Categories : Javascript

webstorm typescript display compile error
Based on Meta Discussion Update (25/8/2013) This issue has been fixed in typescript 0.9.1 Update (7/8/2013) Looks like this issue is already on the radar, please vote for it to make it a BIG blip.

Categories : Typescript

Deploying AngularJS Seed application in WebStorm
I use WebStorm 7, so there might be some discrepancy in comparison with version 6 that you're using, but the over-all functionality is the same. Quick solution: Open the file in the editor and right click in the code to access the context menu. Choose the "Debug" option, which should start a debug session pointing to the current page. Configuration solution: WebStorm supports configurations for setting up different debugging scenarios. From the "Run" menu, choose the "Configurations" option. Add a JavaScript debug configuration, and add the URL you want in the designated field within the dialog presented. Then, when you initialize a debugging session (a general one, not one for a specific page), you're presented a small dialog that allows you to choose a debug configuration. Maybe ther

Categories : Angularjs

How do you set up Webstorm 6.0 to breakpoint debug a nodejs application?
I use webstorm and it's great. Having looked at that documentation, I agree. If you're just starting out, you don't need all the remote and attach to existing processes options. The easiest option would be to rightclick on your main js file and choose debug. Setting breakpoints is the same as in most editors these days, just click left of the line. If you don't get the debug option when you right click then you need to make a run/debug configuration which sounds worse than it is. Select "Run" -> "Edit configurations". Click the plus sign. Choose "Node.js" Click on the browse ... button on the Path to Node App js file and choose the file you want to debug Click Ok. Click on the bug!

Categories : Node Js

WebStorm debug mode doesn't hit breakpoints
I have the same situation as yours, except that I'm building my app using Backbone.js and RequireJs and the app is running on localhost. My app can run in debug mode in Chrome but the breakpoints cannot be hit. I solve the problem by mapping the Remote URL and my local directory. You can define this in your JavaScript debug configuration profile in the Run->Edit Configurations. You can refer to this wonderful tutorial: Debugging your JavaScript app using WebStorm. Happy debugging!

Categories : Google Chrome

Closure Compiler annotations in WebStorm 6, how to use Record Types?
The first example the annotation is incorrectly applying to socket.on, not to the callback function. In addition, the annotation is formatted incorrectly. An @param tag describes exactly one parameter and it's type. You are attempting to describe two. Also, record types only need one set of braces surrounding them. Here's one way that might look: /** * @param {string} eventName, * @param {function({ pageId: string })} callback */ socket.on = function(eventName, callback) {}; socket.on('page:getSource', function (data) { //data = { pageId: id } console.log(data.pageId) }); Your second example seems correct - but since the socket.on definition wasn't provided I can't verify. Here's a similar test case that does work: // ==ClosureCompiler== // @compilation_level ADVANCED_OPTI

Categories : Javascript

how to align text to specific character in phpstorm or webstorm?
Cmd+Alt+L (in Mac) or Ctrl+Alt+L (Win) and PHP Storm will format code depends of your Code style in Settings. TO set this code style go: File -> Settings -> Code style -> PHP(choose here your language) -> Other -> Align key-value pair - mark as checked. And then press Reformat code (Ctrl+Alt+L) and voila. You will get code, styled you write above.

Categories : PHP

Webstorm: how to exclude javascript from code completion in typescript project
Right click on the folder that contains your compiled javascript and select "Mark Directory As" then "Excluded". WebStorm will hide the directory from the project view, stop indexing it for searches and code completion, and not include it in code refactoring tracing. I tend to mark all build output as ignored and ensure that WebStorm is only worrying itself with the source.

Categories : Typescript

webstorm + typescript "unresolved variable" after adding reference path
Modify it to "export interface IBaseClass" and on the other side you need to require it. At runtime you might get an error loading a js file not there. If so make an empty js file. My recommendation : do not have a file just with interfaces when using requirejs/commonjs

Categories : Typescript

Why nodejs test case with nodeunit keep loading in webstorm after successfully passed the test cases?
Are you calling done() at the end? For example exports.globalSetterTest = function(test){ var app = require('../helpers/globalsetter'); app.setData("abc"); var res = app.getData(); test.equal(res, "abc", "msg"); test.done(); }; I have the same setup as you and here are some sample tests I wrote. https://github.com/captainchung/webstormNodeUnitTests/blob/master/test/spec.js

Categories : Node Js

If a class inherits a method does calling that method on that class point to the super class or does it make a local copy within the child class?
It will follow the way you have it currently written: -> New object of class B -> Call method One on this object -> First line calls supermethod, proceed to execute it -> Second line prints out after that Your code doesn't compile at all though, you might want to clear that up. What's keeping you from testing this yourself? Here's the new situation as you described it. Everything still works as expected, you just add a layer. public class C { public void test() { System.out.println("Inside C"); } } public class B extends C { public void test() { super.test(); System.out.println("Inside B"); } } public class A extends B { public static void main(String[] args) { A obj = new A(); obj.test(); } } Out

Categories : Java

Rational Class Built Off of Polynomial Class: An Analysis of Class Dependency and Operator Overloading
Source: Polynomial Multiply(const Polynomial & poly1, const Polynomial & poly2) { if( poly2.get_size()==1 && poly2.Coefficient(0)==1) The problemic method: int Polynomial::Coefficient(int k) const { return coefficient[k + 1]; } If the size is 1 then you can only reach the coefficient[0] and k + 1 here is 1. You may meant: int Polynomial::Coefficient(int k) const { return coefficient[k]; }

Categories : C++

Cannot find method (class)(class)getRange((class),number) Error on Google Forms
The problem is that you're calling getRange(rowNumber... when rowNumber may not being defined. If you did as Srik suggests, and ran this in the debugger, you'd probably find execution stopping at: var preApproved = sheet.getRange(rowNumber, 14, 1, 1); ...and you'd see that rowNumber is undefined, because no match for responseID was found. A couple of lines later, you're checking whether preApproved is "trueish". I don't know why you're doing that - maybe this is recognition that responseID might not be found, and an expectation that the result would be a null range for the resulting getRange() call. Or maybe you meant to get the value at that cell? (Let's assume that's the case - then you need to use Range.getValue().) Better would be to properly validate the result of the search. Wh

Categories : Google Apps Script

Cleaner view with class="name1", class="name2" and jQuery regexp or not use numbers in class
To explain a little more my comment: jQuery's data function can be used to retreive and store ANY kind of javascript data to a DOM element. Since jQuery caches the DOM elements, it is not stored in the DOM at all, it simply is linked to it internally. This method of storing data is one of the easiest to use and one of the fastest when you need to link data to DOM elements. A little catch is to be avoided though, as it is described above, jQuery does not store directly in the data attribute of the DOM element. So if you have this piece of HTML: <a href="#" data-linkto="homepage">Link</a> you could, find this element with the attribute selector like $('[data-linkto]') to add your onclick event listener. But if, after some user interaction, you do $mylinkelement.data('linkto',

Categories : Javascript

initialize member variable of base class inside child class and use in other class
There are two instances of BaseClass in the example you posted. One is the one instantiated with new ChildClass() and the other one is instantiated by the main() method (TestClass). Each one of them, being a subclass of BaseClass, has its own test member (they are different variables with different values). Remember that the this keyword always references the instance in which it is used. In this case, System.out.println(this.test); is accessing the test property of the TestClass instance created in the main method. You need to access the test property of the other instance. You could do so by keeping a reference to the ChildClass instance and accessing the test property afterwards: ChildClass instance = new ChildClass().initialize(); System.out.println(instance.test); You

Categories : Java

i'm trying to insert after
After clarifying yourself in the comments, I think that's what you're looking for: jsFiddle Demo $('.cts').find('div.tbox, div.tarea').each(function(i) { var val; switch ($(this).attr("class")) { case ("tbox"): val = "first"; break; case ("tarea"): val = "second"; break; } var properties = $('<div class="fieldProperties">' + '<input type="text" value="' + val + '" name="fields['+i+'].id" ' + 'id="fields['+i+'].id"> </div>'); properties.insertAfter(this); });

Categories : Jquery



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