w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Allow access to a locally stored XML from Internet Explorer9
I managed to fix. I decided to pass all data in a JSON object INLINE. You can do it in the HTML DOM, using <script type="application/json" id="stuff> json code here </script> and call it in js using var myVar=JSON.parse(document.getElementById('stuff').innerHTML); This is HTML% valid: http://dev.w3.org/html5/spec/Overview.html#the-script-element . I decided to write it directly in the js, and to call it like a var. var tabObj = {"tabelle": json code }; I have to understand yet if I have to parse it or if is not mandatory. That's all folks. Thanks for the help, I know it was a strange question.

Categories : HTML

Divert to locally stored maven-install-plugin
If you don't have internet access, I assume you have a mirror of maven central available on your intranet. If it's the case you must configure your settings.xml to declare the mirror. So add something like that in your settings.xml file: <mirrors> <mirror> <id>central-mirror</id> <name>Local mirror of central repo</name> <url>http://unity.apps.company.net/nexus/content/repositories/central</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> EDIT Other thing to look at : you may need to configure some proxy settings (it seems strange that they aren't already there...) see this

Categories : Maven

Pulling the raw html string from an htm file stored locally in Xcode
First, you'll have to add the file to your project and include it in the application bundle: add the file to your project select the target go to the Build Phases tab expand the Copy Bundle Resources section add the file to the list This makes sure the file is available when your application runs on the device. To read the content of the file when your application runs, get the file path: NSString *path = [[NSBundle mainBundle] pathForResource:@"your_file" ofType:@"htm"]; and then load the file NSError *error; NSString *content = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error]; Things to watch out for: check for the error value after reading if the file is large, you might want to read it asynchronously

Categories : HTML

How is data loaded from a remote database stored locally (in memory)
While it's very easy the put the fetched data right into your array and use it from there, it is likely that you would be benefitted by using a local database for two main reasons: scalability and persistance. If you are hoping to download and display a large amount of data, it may be unsafe to try to store it in memory all at once. It would be more scalable to download whatever data you need, store it in a local database, and then fetch only the relevant objects you need to display. If you download the data and only store it in an array, that data will have to be re-fetched from the remote database and re-parsed on next load of your app/view controller/etc before anything can be displayed. Instead, create a local database in which to store the downloaded data, allowing it to be readily

Categories : IOS

Accessing an online Silverlight application from a locally stored HTML page
Well, I'm not sure why it's not loading from a local html but here are some workarounds that could help you Host your html in your client iis if this is applicable that seems to work just fine. Or if this is not possible try this First create a html page that will load your xap file on the server where you host the xap file and in the local html file just load the html page inside an iframe like this <iframe **id="xapHost"** src="http://astrocoder.com/BlogFiles/Silverlight/test.html?id=5" frameborder="0" style="width:500px;height:500px"> To load the xap file with custom parameters you could add query string parameters to your iframe src url like the url above and in your JavaScript you could retrieve these values and build your object with the new parameter.

Categories : Dotnet

Can you have leiningen load library code from locally checked out source?
Check out Leiningens checkout dependencies functionality. Basically, you make a symbolic link to the library directory in a subdirectory called 'checkouts' of your current project, and add it to your Leiningen profile. Now that project is loaded too whenever your program is started from Leiningen (REPL, run). If you are on Windows, instead of making a symbolic link, you need to make the NTFS equivalent of a symbolic link to a directory, called a 'junction point'. Take care that this does not work if your project isn't actually started through Leiningen (for instance in Eclipse/CounterClockWise). If you run from CounterClockWise, you need to add the library you want as an Eclipse project, then edit the Eclipse project properties of your own project: Under Java Build Path > Projects, add

Categories : Clojure

How to read map tile images from database stored locally into google earth plugin using just javascript/html5?
"Can this be done solely with javascript or must the images be hosted..." Yes, they must be hosted either locally or remotely, how can you possible serve them if they aren't? The Kml <href> element must contain a link to a local or remote file that is accessible via HTTP or HTTPS. "Is it possible to use javascript to serve up those images" No, JavaScript is a client side language -it doesn't have access to the networking layer or local file system - it can't 'serve' anything. You could always just set up a local server to do this, Windows comes with IIS built in for example. It is fine to have the <href> element point to a local file via http, e.g. http://localhost/whatever.kml, https://127.0.0.1/images/foo.jpg, etc.

Categories : Javascript

When GCC links a shared library is the soname stored?
Yes, you can use ldd to view the dependency of a binary. Try ldd /bin/bash yourself On my machine it prints linux-vdso.so.1 => (0x00007fff10dff000) libncurses.so.5 => /lib/libncurses.so.5 (0x00007f2237acb000) libdl.so.2 => /lib/libdl.so.2 (0x00007f22378c7000) libc.so.6 => /lib/libc.so.6 (0x00007f2237564000) /lib64/ld-linux-x86-64.so.2 (0x00007f2237d25000)

Categories : Gcc

Qt: mingw compiled library does only work with both library.so and library.lib file present
That's weird, I think you should get a *.a and *.dll files when building a shared lib with MinGW on Windows, as said in the documentation: In windows, MinGW will output .a and .dll, MSVC2010 will ouput .lib and .dll. In linux, MinGW will output .so, .so.1, .so.1.0 and .so.1.0.0 – .lib, .a and .so are import libraries. You definitely shouldn't rename your file! Be careful to: not to include the "lib" prefix after "-l" in your project file. put everything after after "-l" in lower case as you're on Windows not adding any extension to your library name after "-l" add and reference the .h file used in your library A real example using QtWebsocket lib: INCLUDEPATH += "$${PWD}/include/" LIBS += -L"$${PWD}/libs/" -lqtwebsocket ... HEADERS += ... $${PWD}/include/QWsSocket.

Categories : Qt

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

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

How to make my JAR library to be included in the in AndroidManifest.xml and use it as a shared library
<uses-library> is for libraries that are part of device firmware (SDK add-ons). So, unless you are distributing your own hardware or ROM mods, <uses-library> will not be of use to you. Moreover, generally speaking, you want to have independent copies of that library, one per app using it. That way, you can update each app separately. Otherwise, changes to your JAR may necessitate simultaneous changes to all of your apps, and since you are not in charge of installing those app updates (users are), that could be a major problem.

Categories : Android

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 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

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 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

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

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

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 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

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

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

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

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

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 - 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

use sql stored procedure to insert data which is returned from a query stored in a table
You may check this fiddle The code of the Stored Procedure is: CREATE PROCEDURE [dbo].[spInsertStuff] @cli_id int AS DECLARE @SQL AS VARCHAR(MAX) DECLARE @ADL_ID AS INT DECLARE MyCURSOR CURSOR FOR SELECT QUERY, ADL_ID FROM ASSESSMENT_DATALABEL_LIST OPEN MyCURSOR FETCH NEXT FROM MyCURSOR INTO @SQL, @ADL_ID WHILE @@FETCH_STATUS = 0 BEGIN SET @SQL = REPLACE(@SQL,'@KeyFieldValue',@cli_id) DECLARE @Temp AS TABLE ([Value] [nvarchar](50)) INSERT INTO @Temp EXEC (@SQL) INSERT INTO Item_Destination (ItemType, ItemCaption, ItemValue) SELECT ItemType, ItemCaption, (SELECT [Value] FROM @Temp) FROM Item_Source WHERE Item_Source.adl_ID = @ADL_ID DELETE FROM @Temp FETCH NEXT FROM

Categories : SQL

How to Hide an image stored in second TD based on the values of table stored in first TD with JQuery?
This should be enough to get you started: $( '#myTable td:first td' ).each( function() { if ( $( this ).text().trim() == 'N/A' ) { $( '#myTable td' ).eq( 1 ).hide(); } } );

Categories : Javascript

how to call postgresql stored procs from inside another stored proc and include return values in queries
There is a difference between: SELECT INTO ... [http://www.postgresql.org/docs/current/interactive/sql-selectinto.html] and SELECT select_expressions INTO [STRICT] target FROM ...; [http://www.postgresql.org/docs/current/interactive/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-ONEROW] I think you want: SELECT get_widget_id(widget_desc) INTO active_id;

Categories : Postgresql

Execute SQL arithmetic stored as string (stored procedure? c#?)
I would create a function to return quantity based on the business logic related to misc fields. Example function would be create dbo.fn_GetQuantity(@Qty int, @width decimal(18, 3), @Height decimal(18,3)) returns int as begin -- TODO Apply all business logic related to @width & @height here and calculate new @Qty return @Qty end then in the proc I would just call this new function with needed parameters. create proc dbo.sGetParts() as begin select Part, dbo.fn_GetQuantity(Qty, finWidth, finWidth) from parts end

Categories : C#

How to call Stored Procedures (with 2 parameters) in a Stored Procedure?
Try this one - CREATE PROCEDURE [dbo].[SP_All] @myDate DATETIME , @ServerName SYSNAME AS BEGIN EXEC dbo.sp_1 @myDate, @ServerName EXEC dbo.sp_2 @myDate, @ServerName EXEC dbo.sp_3 @myDate, @ServerName EXEC dbo.sp_4 @myDate, @ServerName END

Categories : SQL

Call stored procedures from another stored procedure or only one SP for better efficiency?
Assuming that you are updating 9 tables in one action like(button click),maintaining transaction may be your requirement ,so i would like to suggest you to make one storedprocedures and maintain transaction in it,rather than 9 different procedures..

Categories : Sql Server

Multipule stored variables in a stored procedure
It can be quite tough if you have even more parameters. Please have a look at this question on SO for further investigation: How can I use optional parameters in a T-SQL stored procedure?. C# Example I would never use a stored procedure for such a scenario. Instead, have a glance at the following code: var sqlSelect = "Select field1, field2, field3 FROM yourTable" var cmd = new SqlCommand(yourConn) var sqlWhere = new StringBuilder(); If (sCode > 0) { cmd.Parameters.Add("@SCode", SqlDbType.int).Value = sCode; sqlWhere.Append("@SCode AND"); } If (vCode > 0) { cmd.Parameters.Add("@VCode ", SqlDbType.int).Value = vCode; sqlWhere.Append("@VCode AND"); } If(eCode > 0) { cmd.Parameters.Add("@ECode", SqlDbType.int).Value = eCode ; sqlWhere.Append("@ECode AND"); } if (sqlWhere.lengt

Categories : C#

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



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