w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Position Icons on Top Right removing them from flow
EDIT: Tables have default styles applied to them by the browser. To solve this specific problem on your second fiddle (yellow-orange one), you need to set the table's border-spacing: 0;. Perhaps you can turn to CSS resets if these pre-set properties annoy you. ----------------------------- I think you might have overlooked the fact that ul's and ol's have a default styling applied to them, which differs from browser to browser. Some might set padding, others margin (I haven't tested it myself). All you need to do is add this to your CSS: (tested and working in your fiddle) ul { padding: 0; margin: 0; } Your h2 element and table element respond differently to the float of the ul. If you set your h2 CSS to clear:both the margin from the ul will also impact it. The table element f

Categories : CSS

Removing clear and reveal password icons from IE10
Two questions. First, are you sure your CSS is correct as the following CSS works for me: ::-ms-reveal { display: none; } Second question: Are you running IE10 in IE9 mode or below under Developer Tools. If so, this selector doesn't appear to work and IE10 still inserts the password eye. I'm looking for a resolution to that issue now.

Categories : CSS

Removing warning icons from Java file and packages in Eclipse project explorer
Go to Window > Preferences > Validation and disable validation for whatever types of files you want. Edit: Hmm. There's also Window > Appearance > Label Decorations, but that didn't seem to disable the decorations in the explorer view.

Categories : Java

How to get specific currency symbol(rupee symbol in my case) in angular js instead of the default one (dollar $ symbol)
You can use the symbol parameter: Item Price<span style="font-weight:bold;">{{item.price | currency[:symbol]}}</span> Exemple: Item Price<span style="font-weight:bold;">{{item.price | currency:"USD$"}}</span> Please refer to this: http://docs.angularjs.org/api/ng.filter:currency

Categories : Javascript

Hovering on icons with font awesome: how to change the size or edges of the icons?
Check out this jsfiddle: http://jsfiddle.net/fTdRS/ You could try putting the icons into an inner div similar to this example. div.inner { xdisplay: block; width: 280px; height: 80px; display:table-cell; vertical-align:middle; }

Categories : CSS

iOS 7 App Icons, Launch images And Naming Convention While Keeping iOS 6 Icons
Absolutely Asset Catalog is you answer, it removes the need to follow naming conventions when you are adding or updating your app icons. Below are the steps to Migrating an App Icon Set or Launch Image Set From Apple: 1- In the project navigator, select your target. 2- Select the General pane, and scroll to the App Icons section. 3- Specify an image in the App Icon table by clicking the folder icon on the right side of the image row and selecting the image file in the dialog that appears. 4-Migrate the images in the App Icon table to an asset catalog by clicking the Use Asset Catalog button, selecting an asset catalog from the popup menu, and clicking the Migrate button. Alternatively, you can create an empty app icon set by choosing Editor > New App Icon, and add images to the

Categories : IOS

"Android Design Icons" do not match system icons
The icons(and other resources) can be found in android sdk directory on your hard drive. Follow this path: android_sdk_directory / sdk / platforms / android-VERSION / data / res

Categories : Android

How can I send LeftShift and Up Arrow or Down Arrow in c#
You can use SendKeys though I recommend avoiding it if there's any better method. SendKeys.Send("+{DOWN}"); That's 'shifted down arrow'... I don't see a specific left-shift option on the key list, sorry.

Categories : C#

Java Class.forName won't compile. Getting "cannot find symbol symbol : method"
If theResponse() belongs to http.response.PublicRoute then it should have been Class c = Class.forName("http.response.PublicRoute"); return ((PublicRoute) c.newInstance()).theResponse("hi"); But, then there's really no need for Class.forName() as you could use constructor as return new PublicRoute().theResponse("hi");

Categories : Java

Why the symbol defined in the shared library symbol is not used?
Because hello2 is defined in the header, your test program will use that instead of the shared library's version. So if you modify the header, you'll need to recompile the test program. If you want to be able to just recompile the shared library, you'll need to move the definition (i.e. code) of hello2 out of the header and into some other cpp file.

Categories : C++

How to secure resources from being extracted?
With java, as far as I know, your options are fairly limited. I might suggest obfuscating your code, somehow. For a bit more info, try this answer, here. It may not be extraction-proof, but it's about as good (to some degree), as anyone can open just about any file in a text editor, but it's all gobldygook, which is essentially the same thing you get from obfuscation, only to a lesser degree. Nonetheless, it's arguably your best bet with java code.

Categories : Java

C++, value extracted from the set doesnt appear in set while erasing it from set
Your set is sorted by pointer value, which is probably pretty useless; in any case it will go by object identity instead of object value. If that is not what you want, you will have to supply your own ordering to std::set (it's a template argument) which sorts by actual value.

Categories : C++

treeview.resources: can they be extracted?
You can add the DataTemplate your App.xaml or any other ReasourceDictionary Example:(App.xaml) <Application x:Class="WpfApplication8.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml" xmlns:src="namespace for src"> <Application.Resources> <DataTemplate DataType="{x:Type src:ParameterDefinition}"> // all the stuff </DataTemplate> </Application.Resources> </Application>

Categories : Wpf

Scrapy: Why extracted strings are in this format?
The html page may very well contains these whitespaces characters. What you retrieve a list of unicode strings, which is why you can't simply call strip on it. If you want to strip these whitespaces characters from each string in this list, you can run the following: >>> [s.strip() for s in [u' A mano libera ']] [u'A mano libera'] If only the first element matters to you, than simply do: >>> [u' A mano libera '][0].strip() u'A mano libera'

Categories : Python

JMeter extracted value disappeared after the next sample
This is due to scoping, where do you put your extractor ? see: http://jmeter.apache.org/usermanual/test_plan.html paragraph 4.10 Scoping Rules Put it as a child of sampler not after or before it.

Categories : Regex

How can audio be extracted from a video in HTML5?
The Web Audio API is exactly what you want. In particular, you want to feed a MediaElementAudioSourceNode into an AnalyserNode. Unfortunately, the Web Audio API is only implemented in Chrome (somewhat implemented in FF), and even Chrome doesn't have full support for MediaElementAudioSourceNode yet. var context = new webkitAudioContext(); // feed video into a MediaElementSourceNode, and feed that into AnalyserNode // due to a bug in Chrome, this must run after onload var videoElement = document.querySelector('myVideo'); var mediaSourceNode = context.createMediaElementSource(videoElement); var analyserNode = context.createAnalyser(); mediaSourceNode.connect(analyserNode); analyserNode.connect(context.destination); videoElement.play(); // run this part on loop to sample the current audio

Categories : Javascript

Extracting zip files in ios - making sure everything was extracted
Don't ignore return values from I/O functions or from the zip framework. This is usually enough. You can always check if the file exist after unarchiving and you can check its size. You can check CRC of the extracted data. Most zip frameworks do the 2 & 3 checks internally and they report the error transparently using a return value or NSError return param. Just never ignore return values.

Categories : IOS

How to overwrite extracted zip file in C#, WinForms?
You cannot overwrite directly the database while you are actively using it. By actively I mean you have an OleDbConnection open on that database. From your code above it is not possible to understand if you are in this situation, so the first thing to do is to search for all occurences of an OleDbConnection and check if they are closed correctly. If you have a global OleDbConnection that it is kept open for the lifetime of your application (a very bad practice), then you need to close it before trying to overwrite the accdb file public void RestoreDatabase(string restoreFile) { string dbFileName = "dbCPS.accdb"; string extractedFile = Path.GetTempFileName(); string CurrentDatabasePath = Path.Combine(Environment.CurrentDirectory, dbFileName); using (ZipFile zip = ZipFile

Categories : C#

str_replace not replacing a url extracted from a database
Why do you have curly braces around $_SERVER['DOCUMENT_ROOT'] ? Try replacing that with: str_replace($_SERVER['DOCUMENT_ROOT'], '', $file_system_path);

Categories : PHP

Android multiple shortcuts
You can have as many shortcuts for an App, as many public intents are declared in its manifest. The Activity in example is returning only one Intent and finishing on the spot. You can have your Shortcut Activity show a list of all available intents of your app and return that intent in its result.

Categories : Java

Getting path from a ExecutableFile.exe shortcuts
This code will help you. :) namespace Shortcut { using System; using System.Diagnostics; using System.IO; using Shell32; class Program { public static string GetShortcutTargetFile(string shortcutFilename) { string pathOnly = System.IO.Path.GetDirectoryName(shortcutFilename); string filenameOnly = System.IO.Path.GetFileName(shortcutFilename); Shell shell = new Shell(); Folder folder = shell.NameSpace(pathOnly); FolderItem folderItem = folder.ParseName(filenameOnly); if (folderItem != null) { Shell32.ShellLinkObject link = (Shell32.ShellLinkObject)folderItem.GetLink; return link.Path; } return string.Empty;

Categories : C#

Which class should take care of shortcuts?
Your setup sounds a lot like many of the applications I've built. I generally handle shortcuts via the QAction::setShortcut() method, so it's really more about where does it make sense to store the QAction objects. This usually ends up being my MainWindow class as a lot of the actions are all used in the MainWindw's menus. When these actions are triggered, the result is usually that the TabWidget is notified which in turn notifies all the necessary tabs and can handle things like a "Close All" action triggering only one save prompt. However, if it doesn't make sense to store those QActions on the MainWindow object, then I don't, as in the case of the context menu I usually have available on my individual tabs. Hope that helps.

Categories : C++

Java code to run .exe shortcuts
The shortcut you see in your desktop is actually a file with the extension .lnk. It's real full path is, then: C:UsersDesktop otepad.exe.lnk Trying to run it through exec() will yield a "CreateProcess error ... is not a valid Win32 application" error. Fortunately, you can run those as well through the ProcessBuilder utility class. public static void main(String[] args) throws Exception { ProcessBuilder pb = new ProcessBuilder("cmd", "/c", "C:\Users\robert\Desktop\notepad.lnk"); Process p = pb.start(); p.waitFor(); } If you must use Runtime.getRuntime().exec(), you can open the lnk file through rundll32: Process p = Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + "C:\Users\ro

Categories : Java

Keyboard combination shortcuts
I don't know keymaster, but you can easily accomplish that with a timer (setTimeout) from within a keypress event handler. Instead of acting immediately on a key press, add the key to a buffer, and wait for a second key until the timeout expires. In code, that would be something like this: var keyBuffer = [], timer; document.addEventListener('keypress', function(e) { // Add current key to buffer keyBuffer.push(e.which); // Cancel previous timer clearTimeout(timer); // Set new timer timer = setTimeout(function() { // Pass a *copy* of the buffer into another function reactOnKey(keyBuffer.slice(0)); // Clear buffer keyBuffer.length = 0; }, 1000) }, false); function reactOnKey(buffer) { console.log(buffer); } http

Categories : Javascript

View All Eclipse shortcuts
yes, you can go Window - Preferencee - General - Keys and see all available shortcuts. Also you can reorder keys here. Also you can read more about eclipse shortcuts here

Categories : Eclipse

Display extracted element via Jsoup to JTable
import java.awt.BorderLayout; import java.awt.Dimension; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; public class SimpleTable { public SimpleTable(){ JFrame f = new JFrame(); Object[][] tableInputs = { { "Customer1","0000001", "100.00", }, { "Customer2", "0000002", "200.00" }, { "Customer3", "0000003", "550.00" }}; String[] header = { "NAME", "ACCOUNT", "BALANCE" }; JTable table = new JTable(tableInputs, header); table.setPreferredScrollableViewportSize(new Dimension(500, 100)); JScrollPane scrollPane = new JScrollPane(table); f.add(scro

Categories : Java

Upload apk using carrierwave and store both apk and extracted icon
This gets a lot easier if you use two different uploaders, and set the icon data from the model layer. Model code could look something like this: mount_uploader :apk, ApkUploader mount_uploader :icon, IconUploader before_save :assign_icon def assign_icon if apk_changed? icon_data = Android::Apk.new(apk.path).icons.values.first self.icon = StringIO.new(icon_data) end end Note that before_save has to come after mount_uploader :apk, because mount_uploader creates its own callbacks on the before_save event, and you want to fire after them.

Categories : Ruby On Rails

returning an element extracted from a monad; redundant?
In short, yes. To prove it: You've written: xss >>= (xs -> xs >>= x -> return x) xss >>= (xs -> xs >>= return) -- eta in the first and xss >>= (xs -> xs) xss >>= id according to the monad laws, return is a right identity so that m >>= return === m so we can do xss >>= ( xs -> xs >>= return ) xss >>= ( xs -> xs ) xss >>= id

Categories : Haskell

How to store extracted element via jsoup in database
When inserting XML into a database you need to consider what operations you'd like to perform on the data that the XML is representing. You could, for example, consider the XML to be the input data and then create a schema that holds the data in an easily queryable manner. If that's what you'd like to do then use JAXB as the unmarshaller because you can easily generate suitably annotated pojos/entities from the XSD via the xjc tool. A bit of additional JPA annotating and you'll have a quick solution that maps the XML to a complete schema that allows a variety of mix and match queries and alternative views. Of course, JAXB annotations can be used to generate a wide variety of output formats (XML, JSON, YAML etc) so you're not limited to XML when you want to output this data. Next, you cou

Categories : Java

Different SURF Features Extracted Between MATLAB and OpenCV?
Under the hood, MATLAB uses OpenCV for some of its computer vision functions, including detecting SURF features. If you look inside the $matlabroot/bin/$arch folder, you'll find OpenCV shared libraries in addition to a gateway library ocv.dll). In fact, the same reference paper is mentioned in the documentation of both, which suggests that the algorithm parameters have the same meaning in both frameworks. MATLAB Herbert Bay, Andreas Ess, Tinne Tuytelaars, Luc Van Gool "SURF: Speeded Up Robust Features", Computer Vision and Image Understanding (CVIU), Vol. 110, No. 3, pp. 346--359, 2008 OpenCV Bay, H. and Tuytelaars, T. and Van Gool, L. "SURF: Speeded Up Robust Features", 9th > European Conference on Computer Vision, 2006 First thing, make sure you are using the same pa

Categories : Matlab

How to import string extracted from a file in python?
If you want to get the lines in a file use lines = list() with open("yourfiile.txt") as f: for line in f: lines.append(line) lines.pop(0) #remove the first line (which ends with "{4:") #do what you want with list of lines

Categories : Python

How did $data extracted from dataprovider when using clistview widget?
The above code first creates a data provider for the Post ActiveRecord class. It then uses CListView to display every data item as returned by the data provider. The display is done via the partial view named '_post'. This partial view will be rendered once for every data item. In the view, one can access the current data item via variable $data. By using the itemView property of CListView which is used for rendering each data item. This property value will be passed as the first parameter to CController property renderpartial to render each data item. public string renderPartial(string $view, array $data=NULL, boolean $return=false, boolean $processOutput=false) public function renderPartial($view,$data=null,$return=false,$processOutput=false) { if(($viewFile=$this->getViewFile

Categories : PHP

Rails Cocoon: Removing a child without removing the parent (Deeply Nested Forms)
I was able to fix this problem in my project by using the wrapper-class option in link_to_remove_association. I used a div in the child partial as the wrapper. So see if changing _property_template_options to <div class="myclass" > <li style='padding-left:35px;'><%= f.input :value, :label => 'Field Option' %></li> <li style='float:right;'><%= link_to_remove_association "Remove Option", f, { wrapper_class: "myclass" } %></li> <%= f.hidden_field :position %> </div> or something similar resolves the problem.

Categories : Ruby On Rails

Shortcuts changing the relative path?
I am not in a position to propose a direct solution for your specific problem. On the other hand, I have had some paths/relative-reference problems in the past when working with different Windows installer packages which I solved by running a program passing all the required information to the installer. Example of what I mean: A small program is executed right before starting the installation. It retrieves all the required information (e.g., desktop's path) and writes it to a temporary location (e.g., Windows Registry). The main installation package is started, reads/deletes the information from the temporary location and brings it into account while performing the installation (e.g., path for the shortcuts). Depending upon the available setup options, you might perform the aforement

Categories : C#

Windows ContextMenu C++ with Shortcuts in Selection
Are we talking about IContextMenu interface here? If so, you should do it like that (mistakes possible, I'm writing without compiler): Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID){ FORMATETC fetc = { CF_HDROP, null, DVASPECT_CONTENT, -1, TYMED_HGLOBAL }; STGMEDIUM stgm; pdtobj->GetData(&fetc, &stgm); UINT count = DragQueryFile(stgm.hGlobal, 0xFFFFFFFF, null, 0); char filename[255]; for (int i=0; i<count; i++){ DragQueryFile(stgm.hGlobal, i, filename, 255); // Here do something with i-th filename } } I omitted error checking for simplicity.

Categories : C++

making directory shortcuts like $HOME
HOME is a really bad choice, since many programs will use the value of HOME to find the home directory. However, you certainly can do #WARNING: this is a bad idea. It would be better to choose a #name other than "HOME" HOME="cd /p/a/t/h" $HOME Using a function would be more reliable and flexible, but it's certainly possible to put a command in a variable like this.

Categories : Osx

Visual Studio custom shortcuts
For VS2010 at least the solution is to use a macro. Once your macro is created see here for information on how to bind it to a shortcut key. I don't have VS2012 available to confirm but according to this question, the macro recording facility has been removed. There are some solutions posted in that question which might help.

Categories : Visual Studio 2010

Qt: How to Program custom Keyboard Shortcuts
Since CTRL-Q may have a menu item or toolbar entry, too, I think you're looking for QAction. See this: http://doc.qt.digia.com/4.6/qaction.html#shortcut-prop LE: Example of QAction at work: QAction *foo = new QAction(this); foo->setShortcut(Qt::Key_Q | Qt::CTRL); connect(foo, SIGNAL(triggered()), this, SLOT(close())); this->addAction(foo); Just create a new Qt GUI project (I used QtCreator) and add that code to the main window's constructor and it should work as expected. Please note that there is no need of freeing the memory since the Qt framework will take care of that when the app closes.

Categories : Qt

OpenFileDialog xml Filter allowing .htm shortcuts
You're doing it correctly. Using the Filter property allows you to limit the files displayed in the open dialog to only the specified type(s). In this case, the only files the user will see in the dialog are those with the .xml extension. But, if they know what they're doing, it's trivial for the user to bypass the filter and select other types of files. For example, they can just type in the complete name (and path, if necessary), or they can type in a new filter (e.g. *.*) and force the dialog to show them all such files. Therefore, you still need logic to check and make sure that the selected file meets your requirements. Use the System.IO.Path.GetExtension method to get the extension from the selected file path, and do an ordinal case-insensitive comparison to the expected path. Exa

Categories : C#

Can i add css property shortcuts to sublime text?
These are called snippets. For this particular example, Open the Tools menu and select New Snippet..., then paste in the following: <snippet> <content><![CDATA[margin: 0 auto;]]></content> <tabTrigger>m-a</tabTrigger> <scope>source.css</scope> </snippet> Save this file as Packages/User/CSS/margin auto.sublime-snippet and you should be good to go. Open a CSS file, type m-a, hit Tab, and you're all set. Snippets are pretty powerful, and also allow for tab stops to enter customized data. For example, you could set up some boilerplate code that only requires that the colors be customized like so: <snippet> <content><![CDATA[body { max-width: 500px; _width: 500px; padding: 30px 20px 50px; bo

Categories : HTML



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