w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Is it possible to configure Eclipse to do ctrl+space always like sts 3.3.0 does
In the Eclipse preferences, go to Java > Editor > Content Assist. In the Auto Activation group, in the the Auto Activation triggers for Java add all the letters and space after the dot. You can also reduce the activation delay. I have set mine to 50ms for instance. I think it should give you most of what you expect. Note that I have never used STS.

Categories : Eclipse

Unmap ctrl+space in Sublime Text 3
Go to /Applications, left-click on Sublime Text.app, and select "Show Package Contents". Open Contents/MacOS/Packages/Default.sublime-package in TextWrangler (it's a free d/l if you don't have it) - it supports editing ZIP files. You should now be able to edit Default (OSX).sublime-keymap and save the whole package. Restart ST3 and you should be good!

Categories : Osx

android studio ctrl + space opens documentation window
Ctrl-Q toggles between doc window states (when using the default keymap). Possible states are: -Hidden -Shown to the side of the auto-complete list -Docked as one of the tabs If you have a different keymap, you can search for this action in Settings -> Keymap. The action is called "Quick Doc".

Categories : Android

How to prevent images from resizing while changing the browser zoom by "Ctrl -" or "Ctrl +"?
There is no surefire way of doing this. The only suggestions that I could make will require extensive programming knowledge in javascript and even then, there is no guarantee this will work. Unless it breaks the page, I don't think you need to worry about this. Moreover you might just kill the user's experience by trying to prevent him from rescaling You can check this question for some solutions that might and I say this with a packet of salt might help Catch browser's "zoom" event in JavaScript

Categories : HTML

Jump with Ctrl-I doesn't work in my MacVim, but Ctrl-O works?
<C-i> and <Tab> are strictly equivalent. You are actively overriding <Tab> and therefore <C-i> in ~/.vim/plugin/settings/Settings.vim. If you want <C-i> to work normally don't override it (or <Tab>). Simple. Unless you have a very specific reason to do so, you don't need to put anything in ~/.gvimrc. The normal place for your settings/mappings is ~/.vimrc, there's no valid reason to put them anywhere else (~/.vim/plugin/settings/Settings.vim or wherever). Use nnoremap <C-+> <C-o> if you want <C-+> to do what <C-o> does, whatever benefit you think you will get from doing that.

Categories : Vim

Assign command ctrl+z/ctrl+y to button?
You would have to be using JavaScript to detect key presses. Since you are already using jQuery in your application, consider the following: $(document).keydown(function(e){ if ( e.ctrlKey && e.keyCode == 122 ) { myCtrlZFunction(); } else if( e.ctrlKey && e.keyCode == 121 ) { myCtrlYFunction(); } }); e in the keydown's closure argument is the number code for the key depressed. The code for z is 122, the code for y 121. All you really need to do then is to create your myCtrlZFunction() and myCtrlYFunction() You can see the different keycode values on: http://expandinghead.net/keycode.html

Categories : Javascript

Why can't I press CTRL+A or CTRL+Backspace in my textbox?
As Hans Passant said Ctrl+A doesn't actually work in that mode, you have to implement it yourself. Not hard with a KeyDown event handler. To Implement what you want, you can use the KeyDown event of the textbox private void textBox1_KeyDown(object sender, KeyEventArgs e) { if (e.Control) { if (e.KeyCode == Keys.A) { textBox1.SelectAll(); } if (e.KeyCode == Keys.Back) { e.SuppressKeyPress = true; int selStart = textBox1.SelectionStart; while (selStart > 0 && textBox1.Text.Substring(selStart - 1, 1) == " ") { selStart--; } int prevSpacePos = -1;

Categories : C#

JSP EL and autoCompletion
For IntelliJ, you can use comment annotations, such as this: <%--@elvariable id="list" type="java.util.List<your.item.class.Here>"--%> To get this automatically, IntelliJ should be coloring ${items} as a warning, since it wont have any idea what it is. Click on it and when the lightbulb pops up, click the option "Declare external variable in comment annotation." That will generate a comment annotation such as the one listed above.

Categories : Java

How can I remap autocompletion in vim?
I don't think that the AutoComplPop plugin does anything to the Enter key; rather, this is the default behavior when the completion popup is visible. See :h popupmenu-keys: The behavior of the <Enter> key depends on the state you are in: first state: Use the text as it is and insert a line break. second state: Insert the currently selected match. third state: Use the text as it is and insert a line break. It's just that AutoComplPop by default selects the first match (which the built-in completions don't do). To answer your question (though I don't fully get what behavior you want): There's no special mode for the popup menu, you have to use a :help map-expr and check for the popup menu with pumvisible(). For example, to make <Enter> abort completio

Categories : Vim

Case sensitive cmd autocompletion
Options wildignorecase and fileignorecase control what you want (added in 7.3.872, upgrade ViM if you have older). This should do the trick for you: :set nofileignorecase :set nowildignorecase Not sure about Cygwin, but that definitely works on OSX.

Categories : Vim

Implementing AutoCompletion using Solr
Why not use the built in autocomplete functionality in ADF with the af:autosuggestBehavior component? https://pinboard.in/search/u:OracleADF?query=af%3AautoSuggestBehavior

Categories : Solr

Autocompletion of @author in Intellij
You can work around that via a Live Template. Go to Settings -> Live Template, click the "Add"-Button (green plus on the right). In the "Abbreviation" field, enter the string that should activate the template (e.g. @a), and in the "Template Text" area enter the string to complete (e.g. @author - My Name). Set the "Applicable context" to Java (Comments only maybe) and set a key to complete (on the right). I tested it and it works fine, however IntelliJ seems to prefer the inbuild templates, so "@a + Tab" only completes "author". Setting the completion key to Space worked however. To change the user name that is automatically inserted via the File Templates (when creating a class for example), can be changed by adding -Duser.name=Your name to the idea.exe.vmoptions or idea64.exe.vmoptio

Categories : Intellij Idea

OXID eShop - Autocompletion in Eclipse
Ok, after some tries i figured it out disabled "automatic build" clean project add "application" to include path enable "automatic build" let the project build enjoy autocomplete

Categories : PHP

How to filter autocompletion results in django grappelli?
It looks like you can pass extra search params into the ajax autocompleter somehow. Likely a frontend hack needed. https://github.com/sehmaschine/django-grappelli/blob/master/grappelli/views/related.py#L101 OR You can make the default Manager for the models return an already filtered list, and have places that need to explicitly see deleted items remove that restriction. This would likely make the default case much easier for you across the board.

Categories : Python

In PyDev, how can I get autocompletion for an instance returned by a method?
I wonder if you're using some combination of classes / containers that hinders pydev's ability to predict your return value's type. This super-simplistic example works on my system and I get full code completion on inst: class A(object): def __init__(self, params = None): self.myBs = [B() for _ in range(10)] def getB(self): return self.myBs[5] class B(object): def foo(self): pass inst = A().getB() # Auto-complete broken. PyDev thinks inst is a list. assert isinstance(inst, B) # Auto-complete working again. After additional detail, the assert statement is necessary to trigger PyDev's autocomplete functionality.

Categories : Python

Bash alias autocompletion that considers only *.foo files
Try: complete -f -X '!*.tex' g Then, you can type: g <TAB> And get the completions. Note: this doesn't complete directories. Someone else may have a better solution using compgen. There's a helpful autocomplete guide on The Linux Documentation Project too.

Categories : Bash

Irregular module detection/autocompletion in IPython
Add that directory as "source" content root. http://www.jetbrains.com/pycharm/webhelp/configuring-content-roots.html The pycharm autosuggest will start showing the suggestions.

Categories : Python

Is there a way for Vim to use words in all open files in a Screen session for autocompletion?
There's no built-in way to achieve this (how could it? Vim doesn't know anything about where its been launched from.) But you could (with quite some effort) implement something like this. Here's just an outline; I hope that's enough to discourage you from it: Vim allows to implement custom insert-mode completion via 'completefunc', cp. :help complete-functions. To get the sources from the other Vim(s) running in the other screen session(s), you could use the Vim client-server communication :help remote.txt to ask them for their open buffers. Then it's "just" a matter of opening those and parsing them for completion matches (either in your Vim or the remote one). But why go all the way? I'd rather open those related files in a single Vim instance; after all, Vim allows very flexible layou

Categories : Vim

Vimscript: How can I implement interactive method argument autocompletion?
There's no way around closing the popup menu after a candidate has been selected and inserted into the buffer. However, nothing prevents you from automatically re-triggering the same completion (using feedkeys() and the CursorMovedI event), provided the conditions for continued completion are given. The AutoComplPop - Automatically opens popup menu plugin does this; you can check its implementation for details.

Categories : Vim

sublime text 3 html autocompletion not working correctly
What you are describing it the expected behavior for Sublime Text. The functionality that you are looking for comes from Emmet as skuroda said. Just install it using Package Control and you should be good to go.

Categories : Misc

Sublime Text 2: Module autocompletion for Perl (Script supporting)
SublimeCodeIntel should work for you. I haven't used it for Perl, but the language is supported, and it does all the things you're looking for with Python, my language of choice. You can install it through Package Control. It will take a while to get going at first, as it has to index all your modules (you can tell it where to look in the settings), but once that's done it's a real time-saver.

Categories : Perl

Emacs + clojure. Autocompletion data from all source files in project
auto-complete should be able to complete from all open clojure files, but right now I can't say that it's possible to complete from the project & libraries. Potentially this could be done via Semantic (from CEDET), but right now there is no parser for clojure code there. I've started work on Leiningen support in EDE (CEDET's project-related part) - some code exists in CEDET repo, or you can look to my CEDET repo at https://github.com/alexott/cedet/tree/devel (I plan to merge it back to CEDET some time later)

Categories : Emacs

C-family Semantic Autocompletion Plugins for Vim Using Clang (clang_complete, YouCompleteMe)
clang_complete Thanks for using Vim for Windows, hope you enjoy. To solve your problem you have to utilize .clang_complete file. Read more about it in :h clang_complete. In brief, you can put this file into the root directory of any of your projects (i.e. for each project this file can be different, what perfectly makes sense, since different projects have different toolchain configurations). Here is the sample for MinGW-w64 toolchain: -ID:/Toolchains/x64/MinGW-w64/4.8.1/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++ -ID:/Toolchains/x64/MinGW-w64/4.8.1/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32 -ID:/Toolchains/x64/MinGW-w64/4.8.1/lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/backward -ID:/Toolchains/x64/MinGW-w64/4.8.1/lib/gcc/x86_64-w64-mingw32/4.8.1/include -ID:/To

Categories : Vim

What is the linux command line to check kernel space and User space Memory used
Try: sudo slabtop or sudo cat /proc/slabinfo These should give you enough information to estimate the total kernel memory consumption. You can read more info about kernel and userspace memory here.

Categories : Linux

UNIX:Create array from space delimited string while ignoring space in quotes
This is bash specific, may work with ksh/zsh inp='ROLE_NAME="Business Manager" ROLE_ID=67686' set -- $inp arr=() while (( $# > 0 )); do word=$1 shift # count the number of quotes tmp=${word//[^"]/} if (( ${#tmp}%2 == 1 )); then # if the word has an odd number of quotes, join it with the next # word, re-set the positional parameters and keep looping word+=" $1" shift set -- "$word" "$@" else # this word has zero or an even number of quotes. # add it to the array and continue with the next word arr+=("$word") fi done for i in ${!arr[@]}; do printf "%d %s " $i "${arr[i]}"; done 0 ROLE_NAME="Business Manager" 1 ROLE_ID=67686 This specifically breaks words on arbitrary whitespace but joins

Categories : Shell

javascript regex replace all doublequotes in string unless the doublequote is followed by space or comma space
A way: rebuild the json string: var str = '{"description":"This is my 12" pizza I ordered.","value":"1"}'; var regex = /"(.*?)"(?=s*([,:])s*"|(}))/g; var result = '{'; var arr = regex.exec(str); while (arr != null) { result += '"' + arr[1].replace(/\?"/g, '\"') + '"'; if (arr[2]) result += arr[2]; if (arr[3]) result += arr[3]; arr = regex.exec(str); } console.log(result);

Categories : Javascript

We would like to register a user if space is available or put on waiting list if space is full. Any ideas how to approach this?
Maybe I'm missing something, but it doesn't seem that complicated to me. This answer only uses the SQL pieces that matter to preserve legibility, since I'm mainly referring to queries and not the VB. First, you do what you were already doing--check to see if they're already signed up/on the waiting list. SELECT Count(*) FROM ( SELECT * FROM tblTrainings UNION SELECT * FROM waitingList ) AS t WHERE Username = XXX AND CourseID = XXX AND LocationID = XXX AND dateID = XXX /* Tells you whether the person is signed up already, whether for the course itself or the waiting list. */ SELECT Count(*) FROM tblTrainings WHERE CourseID = XXX AND LocationID = XXX AND dateID = XXX -- This will give you the number of people in the course. Then, once you have that, you can decide whether to add th

Categories : Asp Net

Adding empty rows or space in fo:table inly if there's enough space for next data
As a workaround, you can add 'padding-bottom' to each row except the last row in the table. You may end up with row 5 of your example being moved to the second page, but you can at least be sure that there's no extra space at the top of the page.

Categories : Xml

Windows batch file to get C: drive total space and free space available
cut 9 digits of the size by bytes to get the size in GB: @echo off & setlocal ENABLEDELAYEDEXPANSION SET "volume=C:" FOR /f "tokens=1*delims=:" %%i IN ('fsutil volume diskfree %volume%') DO ( SET "diskfree=!disktotal!" SET "disktotal=!diskavail!" SET "diskavail=%%j" ) FOR /f "tokens=1,2" %%i IN ("%disktotal% %diskavail%") DO SET "disktotal=%%i"& SET "diskavail=%%j" (ECHO(Information for volume %volume% ECHO(total %disktotal:~0,-9% GB ECHO(avail. %diskavail:~0,-9% GB)>size.txt TYPE size.txt cmd can calculate only with numbers up to 2^31-1   (2,147,483,647 ~ 2.000001 Gigabytes)

Categories : Windows

How to capitalize each word after a space leaving the rest of it as is and preserve the space in the end if it exists
Use re.sub: >>> import re >>> re.sub(r'[a-z]', lambda m: m.group().upper(), 'home swe eeeet home') 'Home Swe Eeeet Home' >>> re.sub(r'[a-z]', lambda m: m.group().upper(), 'heLLo OoO ooo ') 'HeLLo OoO Ooo ' re.sub(pattern, repl, string, count=0, flags=0) Return the string obtained by replacing the leftmost non-overlapping occurrences of pattern in string by the replacement repl. If the pattern isn’t found, string is returned unchanged. repl can be a string or a function. If repl is a function, it is called for every non-overlapping occurrence of pattern. The function takes a single match object argument, and returns the replacement string. [a-z] match any lowercase character([a-z]) after the word boundary (). The lambda function

Categories : Python

Are Java threads created in user space or kernel space?
Java threads are "user" threads, but under the hood, the Java Virtual Machine is using kernel threads and delegating the user threads CPU time on each kernel thread in its kernel thread pool. See this question for a better explanation. It seems that threading is JVM-vendor specific, and my understanding might not hold for all JVM implementations.

Categories : Java

delete img tag and remove double space into single space using preg_replace
I think, you can use strip_tags instead $str = '<img src="xxxxxx"/> Title'; echo strip_tags($str); // Title Also using preg_replace $str = '<img src="xxxxxx"/> Title'; echo preg_replace('#<img.*?(/>|$)#s', '', $str, 1); // Title DEMO.

Categories : PHP

How do I fix the right column space and bottom container space in html
Take a look at what are called Reset Sheets here: http://meyerweb.com/eric/tools/css/reset/ The specific CSS you are looking for is: html, body { margin: 0; padding: 0; }

Categories : Javascript

Splitting a string containing space-delimited "key=value" pairs when the value can also contain space
You can search for the unwanted spaces by using a lookahead that ensures that they don't preced a key: $input =~ s/[ ](?!S+=)/_/g; The lookahead makes sure that there is no = before the next space character. Then you can split on spaces. Alternatively, to match right away, you can use a similar technique: while ($input =~ m/(S+)=((?:S|[ ](?!S+=))+)/g) { # $1 is the key # $2 is the value } For the value we repeat either non-space characters or spaces that do not preced a key. Working demo. If your keys are always upper case, you can replace all S+ in my code with [A-Z]+.

Categories : Regex

Splitting a string on space except for single space
Like this: myString.split("\s{2,}"); or like this, myString.split(" \s+"); // notice the blank at the beginning. It depends on what you really want, which is not clear by reading the question. You can check the quantifier syntax in the Pattern class.

Categories : Java

Why do you use camera space instead of model space for normals?
The main reason is, that usually your light positions will not be given in model space, but world space. However for illumination to work efficiently all calculations must happen in a common space. In your usual transformation chain, model local coordinates are transformed by the modelview matrix directly into view space p_view = MV · p_local Since you normally have only one modelview matrix it would be cumbersome to separate this steap into something like p_world = M · p_local p_view = V · p_world For that you required MV to be separated. Since the projection transformation traditionally happens as a separate step, view space is the natural "common lower ground" on which illumination calculation to base on. It just involves transforming transforming your light positions from wo

Categories : C++

regex to match space but escaped space
For the second case you can use: (?<!\) Edit: I don't usually work with javascript so i don't know of any quick shortcut, so i think you can do this at two steps: Perform a substitution (replace) using this regex: \s, replace with semicolon ; like this: var newCommand = command0.replace(/\s/g, ";"); Then perform split using this regex: s like this: var result = newCommand.split(/s/);

Categories : Javascript

How can i Access service Identities from one ACS name space with another ACS name space
I can't really understand what are you asking! ACS is a passive service! There is no such process like Service Identities to be able to call those Relying Party applications! Service Identity is a way to authenticate Active Clients - these server side processes that do not invoke user interaction. If you want to be able to authenticate in Relying Party X both with [IdP via ACS Namespace A] and Server side code identified by Service Identity in ACS Namespace B, then you just need to establish trust relationship between *Relying Party X and both ACS Namespaces. You cannot use ACS Namespace as an Identity Provider for another ACS Namespace. Which is what I understand you want to achieve.

Categories : Azure

Why does Alt Gr have the same keyCode as Ctrl?
The Problem is that the alert halts execution of the code, so the second onkeyup is not called. By changing the function to function KeyCheck(e) { var KeyID = (window.event) ? event.keyCode : e.keyCode; switch(KeyID) { case 18: document.Form1.KeyName.value = document.Form1.KeyName.value+"Alt"; break; case 17: document.Form1.KeyName.value = document.Form1.KeyName.value+"Ctrl"; break; } } we can see that both Alt and Ctrl get called. Tested with Firefox 22 and IE 9.

Categories : Javascript

Geb - perform Ctrl + P
You can send non-character key presses using WebDriver's Key.chord() method: import org.openqa.selenium.Keys $("input", name: "firstName") << Keys.chord(Keys.CONTROL, "P") See this section of the manual for more information.

Categories : Grails

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