Zend Studio keeps loading with-in a project folder. How do I get it to load so my top level elements are all my projects? - zend-studio

Yes I set "top level elements" to "projects"
Here is how it looks when I load my zend studio.
I want it to load so that all my projects are there instead of having to press that up button 20 times...

Find the file below to edit in your favorite text editor:
workspace.metadata.plugins\org.eclipse.ui.workbench\workbench.xml
In my case:
C:\Users\juliano\Zend\workspaces\DefaultWorkspace.metadata.plugins\org.eclipse.ui.workbench
And find the line:
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/xxx" type="4"/>
In my case it was:
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/Electrolux" type="4"/>
and replace it by
<input factoryID="org.eclipse.ui.internal.model.ResourceFactory" path="/" type="8"/>
And again have peace!

Related

Change VS 2015 to use EcmaScript 6?

I am using visual studios 2015 to write react code. I am trying to understand ReactJs.net as well.
When I made my app.js folder and put this code in
import React from 'react';
const App = () => (
<div>
<h2>User List</h2>
<UserList />
<hr />
<h2>User Details</h2>
<UserDetails />
</div>
);
export default App;
everything is underlined and I see this message
"EcmaScrpit6 feature. Your current language level is EcmaScrpit5"
How do I change so I don't get this message anymore?
Old post but here's the answer since this issue does arise now and then: This is a ReSharper error that results from scanning your Javascript code. If you place the cursor over the code with squiggly red lines under it and press alt-Enter to bring up the ReSharper context menu, you will be offered the opportunity to 'Change to ...', whatever the feature you are using requires, e.g. ECMAScript 2015 or whatever. Make sure you do not exceed whatever you have configured in your Typescript config (tsconfig.json) compiler options and double-check browser compatibility before you change to a new higher ECMAScript level in your Javascript code.
If you want to manually manage what ReSharper complains about, Click Extensions/ReSharper/Options in Visual Studio to bring up the ReSharper options dialog. Scroll down to Code Editing->Javascript and click Inspections. You will see a drop-down with the label 'JavaScript language level:' there. Select whatever ECMAScript level you want there and save the settings. Done.

Upload and download files with buttons using cURL (or other....)

I would like to know how to use in bash in order to first chose some parameters on a internet page then upload a *.txt file, and be redirected(after file analysis) to an other page and finally to press on a button to download a new file all this in bash.
I found a lot of information on forums regarding cURL and how to fill in forms and download files but very often you could juste download the file by accessing with URL/file.txt. Here it seems to me that it is different because the page uses some code in order to analyse my .txt file and output a new one.
The site is MSC server and I need to check the CADD checkbox in option 2, upload a *.txt by choosing file, click on upload & submit and after beeing redirected click on download result. Here is the html important parts
first page:
<form action="UploadServlet" method="post" enctype="multipart/form-data">
Apply MSC to: <input TYPE=checkbox name=measure1 VALUE=CADD> CADD 1.3
<input type="file" name="fname" id="fileChooser" size="16" /><br>
<input type="submit" value="Upload & Submit" size="20" onclick="document.getElementById('pleaseWait2').style.display = 'block';"/>
second page:
<form action="DownloadServlet" method="post">
<input type="submit" value="Download Result" color ="#ff0000" size = 200>
That is what I tried
curl -L -F measure1=CADD -F fname=#file2.txt -F submit="Upload & Submit" http://pec630.rockefeller.edu/MSC/
That was what I tried for the first page but it only shows me on the terminal the HTML code of the same page not the one where I should be redirected. And even if it gives me teh HTML of the second page, I've got no idea on how to download the file, firstly because the URL changes so I don't know what to put for the URL (I think it's something with cookies but I'm not sure) and secondly even when I try to click on a button and to download a file (for example, ont the example button on the first page, it still shows me the HTML code and it doesn't download the text file).
I hope I was clear enough and that you will be able to help me, I'm still a beginner in programmation and It's been 10 hours since I started to find how to do this:/.
Also since it's my first question (I normally always find previous questions that were like mine) I take this opportunity to thank you are all because your answers are always very clear, and I hope I'll be able to help other people to when I'll understand more of what I do :)
I didn't found the kind code I was looking for (I suppose it is a problem with cookies but even when I tried to handle them with cURL it is not working) but I found a way to get around "any" (I think) cURl problems. Maybe it will help others:
Just copy the headers your computer sends to the site as you a doing what you want:
in google chrome
view -> developer -> developer tools -> do what you want to -> right click on the name which pops up in the side bar -> copy as cURL -> paste it in your code
It's certainly not the best way to do it but if you're desperate as I was it works:)

Prevent Visual Studio to auto correct this

I have the following line:
<input id="cbField{$idx}"
type="checkbox" value="{ID}"
{?checked}checked="checked"{Checked}"/>
<label for="cbField{$idx}">{Name}</label>
{?checked} is wrong, it should be {?Checked} with a Capital C.
When I copy 'Checked' and past it on 'checked', VS "correct" them both to 'checked'.
I work with dust.js so I'm not writing 100% "right of the bat" valid HTML and I'd like to prevent visual studio to make any single change to what I type
How can this be done?
I found it, it's in HTML/... Advanced : Format on paste.
Tools / Options / Text Editor / HTML / Advanced / Format on past
On my VS version

Adding Kendo UI to an existing MVC 4 project

I have a question about Kendo UI. I have an existing MVC4 project in which I wanted to use some of the Kendo extensions, namely the Editor. Currently the project uses jqWidgets as a UI framework.
I opened VS 2012, loaded the project and used the Telerik menu to add references to Kendo in the project. The wizard added all the necessary references and made changes to the web.config files. So far so good. However, I have two problems:
When I try to use the Kendo Html Helper I do not have intellisense and the Kendo is underlined saying that the HtmlHelper does not have a definition for 'Kendo'. I have <add namespace="Kendo.Mvc.UI" /> in both, my main web.config as well as in the web.config in the Views folder. Strangely enough, when I run the site, I do not get an error, but the editor does not load its initial content and if I try to interract with it, I get the following error: (my second question)
TypeError: invalid 'in' operand e - I am guessing that somewhere in the site, There is a conflict that couses this error, but I cannot find it. Here is how I load all the JS files in my _Layout.cshtml:
#Scripts.Render("~/bundles/jquery")
#Scripts.Render("~/bundles/jqueryui")
#Scripts.Render("~/Scripts/kendo/2013.2.918/kendo.all.min.js")
#Scripts.Render("~/Scripts/kendo/2013.2.918/kendo.aspnetmvc.min.js")
#Scripts.Render("~/Scripts/kendo.modernizr.custom.js")
I am not sure if the problems are related. My jQuery version is 1.9.1 and I am using the latest Kendo version (2013.2.918.340)
Any help would be greatly appreciated.
Here is how I use the editor in the View:
#(Html.Kendo().Editor()
.Name("editor")
.HtmlAttributes(new { style = "width: 700px; height: 400px" })
.Value(#<text>
<p>
Some text
</p>
</text>)
.ImageBrowser(imageBrowser => imageBrowser
.Image("~/Content/UserFiles/Images/{0}")
.Read("Read", "ImageBrowser")
.Create("Create", "ImageBrowser")
.Destroy("Destroy", "ImageBrowser")
.Upload("Upload", "ImageBrowser")
.Thumbnail("Thumbnail", "ImageBrowser"))
)
The solution to the first problem is to add namespace reference only to the web.config file in the Views folder. There is no need to add it to the root web.config. After that restart Visual Studio and reload your project. Everything should be fine and intellisense should work.
As for the second problem, this is hard to guess. Could you show your code where you are loading the contents into HTML editor?

Visual Studio Format Document inserts tab after data-bind

cshtml files with more than one data-bind on a line get a tab (four spaces) insterted after the >data-bind="<. This happens when Visual Studio does "Format Document". And is therefore reproducible by Edit->Format Document.
Only the additional data-binds have this, so the 2nd and 3rd get spaces added while the first remains normal:
<input type="checkbox" data-bind="checked: Active" /><span data-bind="text: firstName"></span><span data-bind="text: lastName"></span>
Changes into:
<input type="checkbox" data-bind="checked: Active" /><span data-bind=" text: firstName"></span><span data-bind=" text: lastName"></span>
It's not a huge problem, stuff can be placed on seperate lines, but still annoying.
Edit: Since vs2013 I no longer have this problem. That also seems to have fixed another problem where vs would randomly decide to move my carret and type some spaces.
I am working with Visual studio 2012, and I don't facing this problem.
May be you could try to reset your VS settings.
If it doesn't work, I will post my settings.

Resources