w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Image file cannot be located java
The problem is the "1" part of the string literal. That's not a backslash followed by a 1 - that's an octal escape sequence, yielding U+0001. To get the string you were aiming for, you want: Target oneDown = new ImageTarget(new File("arrowRecog.res\1down.jpg")); Or better - more portable: Target oneDown = new ImageTarget(new File("arrowRecog.res/1down.jpg")); Or even better: Target oneDown = new ImageTarget(new File("arrowRecog.res", "1down.jpg")); (In practice, every platform I've used Java on has coped with / as a directory separator, but using the File constructor taking two strings is still a good idea in general.)

Categories : Java

how can i using icon-user & icon-lock bootstrap css framwork in a form that in textfield to show the icon
Try it <div class=" container"> <div class="hero-unit clearfix"> <div class="pull-right"> <form class="well"> <label>Username</label> <div class="input-prepend"> <span class="add-on"><i class="icon-user"></i></span> <input type="text" placeholder="Type your username"> </div> <label>Password</label> <div class="input-prepend"> <span class="add-on"><i class="icon-lock"></i></span> <input type="password" placeholder="Type your password"> </div> <label class="checkbox"> <input type="checkbox">Remember me </label> <button type="submit" class="btn

Categories : HTML

How to present a pretty printed Java source located outside the HTML file?
if your users can accept the requirement of online access while reading your document, you could host your code somewhere like gist (https://gist.github.com/), and embed it in your html dopcument (see example by putting this into your document <script src="https://gist.github.com/sangohan/6494440.js"></script>)

Categories : Java

How do I put a icon on java applications?
The jar is not really an executable from the OS point of view - it is just an archive of compiled classes and resources. But there is a way to accomplish what you wish for. You have to use executable wrapper. Here are few of them: JSmooth: http://jsmooth.sourceforge.net/ Launch4j: http://launch4j.sourceforge.net/ JWrapper: http://www.jwrapper.com/java-to-exe-free.html

Categories : Java

How to add icon into Java (NetBeans) from Mac Os X?
First of all, check the obvious solutions such as: Have you done window.add(panelone); Is the file in the correct spot/url is correct Secondly, if you hate LayoutManagers like me, but still want to use javax.swing, you might try using drawString and drawImage methods in your panel's paintComponent(Graphics g) class. In detail: You'll need to make your own JPanel: public class MyPanel extends JPanel { as well as override the method: @Override public void paintComponent(Graphics g) { within the method, call this so the window can refresh itself and do other housekeeping things: super.paintComponent(g); then, use drawString and drawImage to draw these images in the place you would like them: g.drawString("Fruit No. 1", x, y); logo.paintIcon(this, g, x, y); Whenever you change o

Categories : Java

add badge to tray icon (java)
Okay so i figured it out, first i select the original icon: BufferedImage im = ImageIO.read(Systray.class.getResource("icon.gif")); then i use Graphics2D to draw ontop of the image: Graphics2D g2 = im.createGraphics(); g2.setColor(Color.BLACK); g2.drawString("10", 2, 10); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ImageIO.write(im, "png", baos); byte[] b = baos.toByteArray(); then i create a new image icon from the byte array: ImageIcon imgTmp = new ImageIcon(b); finally i set the tray icon: _icon.setImage(imgTmp.getImage()); (_icon is an instance of TrayIcon) i hope that this helps someone else and if you have a better solution id love to see it

Categories : Java

Java Swing Exit Icon?
As far as I know, you cannot, but if this is something you need to have done, you can use Netbeans to use JavaFX, which allows you to fully customize the window, including the buttons like that. The window doesnt even need to have these buttons.

Categories : Java

Java Swing Change Icon
I am using Windows 8 and My JFrame gives the Icon I defined in the contructor, here is the code and the pic of the result it shows, this.setIconImage(new javax.swing.ImageIcon("images\icon.png").getImage()); This line is placed in constructor of the class which extends JFrame, Maybe it does'nt help you but It's working with me, Remember the URl I gave for the Image is relative. Here is the Image of the result.

Categories : Java

How to change java icon in a JFrame
I have an answer for you. First, make sure that the images are in a folder, not a package. Next, insert this line of code: Image image = Toolkit.getDefaultToolkit().getImage(getClass().getResource("path/to/image.png")); ImageIcon icon = new ImageIcon( ); setIconImage(icon.getImage()); This code gets the image from the class path, and returns it as a image icon, and then it sets it. This should add the image icon to the application. If it doesn't, then tell me. EDIT: After you told me that that didn't work then I decided to take a second crack at it... First, put your images into a completely separate folder. I usually call this /res. Next, put your image in there. Now, for loading I took a completely different route. I decided to use ImageIO instead of default loading. To load the imag

Categories : Java

Change System tray Icon in java
images/Graph.png is not a valid URL for an image located in your jar. Hence, I guess that img is null on your second try. I suggest you this way : //Get the URL with method class.getResource("/path/to/image.png") URL url = System.class.getResource("/images/Graph.png"); //Use it to get the image Image img = Toolkit.getDefaultToolkit().getImage(url); final TrayIcon trayIcon = new TrayIcon(img, "Application Name", popup); You shall also ensure that images/ is in your classpath.

Categories : Java

Changing Desktop Icon for Java Application
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start1. JWS works on Windows, OS X & *nix. JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions.. The 'desktop integration' will use the image identified in the launch file as the desktop or menu item icon.

Categories : Java

java.lang.ClassCastException in android when try to get application icon
public Bitmap getAppIcon(String path) { PackageInfo pi = pm.getPackageArchiveInfo(path, 0); Drawable icon = pi.applicationInfo.loadIcon(pm); Bitmap APKicon = ((NinePatchDrawable) icon).getBitmap(); return APKicon; } You have to cast the icon into NinePatchDrawable (line 4).

Categories : Android

Change Java program icon under eclipse window builder
The image should be placed in a source folder. In netbeans I created a folder in my src directory for non-java resources, mostly images. Then a similar dialog box to the one you show above allows me to choose items from this as icons. This should work for eclipse too. You can also accomplish this just with code where res is a folder inside the src directory. try { ClassLoader cl = this.getClass().getClassLoader(); ImageIcon programIcon = new ImageIcon(cl.getResource("res/test.png")); setIconImage(programIcon.getImage()); } catch (Exception whoJackedMyIcon) { System.out.println("Could not load program icon."); }

Categories : Java

Change application taskbar icon at run time(ignore shortcut icon)
Shortcuts have nothing to do with how the application icon appears on the taskbar, a shortcut only points to the actual executable that has the icon embedded as a resource. Your problem could be the Windows Icon Cache. This is a common scenario where the Icon Cache isn't updated properly. You should rebuild/refresh your icon cache, then you should see the currently loaded application icon appear on the taskbar, and you can then use the Application.Icon.Load... to swap the icons between modes. It could also be just due to your taskbar options. If you have your taskbar set to combine both Icon + Label then the icon does not change. Make sure that the option is set to don't combine or combine only if taskbar is full.

Categories : Delphi

Adding a icon on the first item on listview: scrolling it, the icon moves randomly
OK, we need to see your full code to get an idea of what's wrong here. Can you show us the actual Java / XML files? First of all, what's the default value for the visibility on your list items? Make sure that the plus button is set to View.GONE by default, and that the list items are set to View.VISIBLE. Secondly, are you duplicating the same view for each list item? Does that mean that all imgicons have the same ID? Maybe you should programmatically insert the imgicon into the first list element, and ONLY the first list element.

Categories : Android

jQuery Mobile data-icon=bars displaying as plus icon when using Doctype
This is just a typo. Replace data-icon="Bars" with data-icon="bars" And your'e good to go. You have to follow the exact case when it comes to images. The full set can be found here : http://api.jquerymobile.com/icons/ Here's a demo : http://jsfiddle.net/hungerpain/cpRh2/1/

Categories : Jquery

Combinging "icon" and "apple-touch-icon" link types
This solution is very promising. Unfortunately, it does not work. I have just tried with an iPad Mini, running iOS 7.0.4 and Safari with the following code: <link rel="icon apple-touch-icon" type="image/png" sizes="57x57" href="/apple-touch-icon-57.png"> <link rel="icon apple-touch-icon" type="image/png" sizes="114x114" href="/apple-touch-icon-114.png"> <link rel="icon apple-touch-icon" type="image/png" sizes="72x72" href="/apple-touch-icon-72.png"> <link rel="icon apple-touch-icon" type="image/png" sizes="144x144" href="/apple-touch-icon-144.png"> <link rel="icon apple-touch-icon" type="image/png" sizes="60x60" href="/apple-touch-icon-60.png"> <link rel="icon apple-touch-icon" type="image/png" sizes="120x120" href="/apple-touch-icon-120.png"> <lin

Categories : IOS

'Missing recommended icon file - The bundle does not contain an app icon for iPhone / iPod Touch of exactly '120x120' pixels, in .png format'
After Apple launched iOS 8, iPhone 6 and 6 Plus, the app icon sizes and launch image sizes changed; please visit my post for new sizes: Image resolution for new iPhone 6 and 6+, @3x support added? Yes, you need to add a 120x120 high resolution icon. Now, if you want to target only iOS 7, you just need 76 x 76, 120 x 120 and 152 x 152 icon sizes. If you also want to target iOS 6, you’ll need 57 x 57, 72 x 72, 76 x 76, 114 x 114, 120 x 120, 144 x 144 and 152 x 152 icon sizes. Without counting Spotlight and Settings icon if you don’t want the OS to interpolate them! As per the blog post New Metrics for iOS 7 App Icons. UPDATE: As per Apple Guideline App-icon OR Icon and Image Sizes: Icon dimensions (iOS 7 and later) Icon dimensions (iOS 6.1 and earlier) Create differ

Categories : Iphone

How to make my jlabel with icon look like desktop icon?
This is how you can do it, JLabel l=new JLabel("My Documents"); l.setIcon(new ImageIcon("mydocuments.png")); l.setHorizontalTextPosition(SwingConstants.CENTER); l.setVerticalTextPosition(SwingConstants.BOTTOM); l.addMouseListener(new MouseAdapter(){ public void mouseClicked(MouseEvent me) { if(me.getClickCount()==2) { try { Desktop.getDesktop().open(new File(System.getProperty("user.home")+"\My Documents")); }catch(Exception e){} } } });

Categories : Java

Why when i close my application from the icon tray sometimes the icon is left on even after the application is closed?
You can either set notifyIcon1.Visible = false; or notifyIcon.Icon = null; in the form closing event. (from NotifyIcon remains in Tray even after application closing but disappears on Mouse Hover )

Categories : C#

How to change filter icon color or filter icon when column is filtered
This is supported out-of-the-box. Take a closer look at the demos when you filter change the theme if needed. Or modify the CSS of a particular theme to make it more clearly visible.

Categories : Kendo Ui

How can I specify where ckeditor.js is located?
You must have a directory in your application that serves staticfiles. That is where you should put the ckeditor.js. Normally the folder is in root of project and is called static It has to be the same folder referred to in the settings file as STATIC_ROOT or listed in STATICFILES_DIRS. This way you'll just add {{STATIC_ROOT}}ckeditor.js to the template to have it served in the html

Categories : Django

Where are the gem files located?
From within your rails app, you can list out all of the gems being used, their versions, and the local path: bundle show --paths There's no reason to modify any of these files though. Configuration is typically done through an initializer in /app/initializers, but it depends on the gem being used. If you need to modify something about the gem, you should fork it on Github and then reference the git location in your Gemfile until your pull request makes it back into the gem: gem 'some_gem', '4.1.1', git: 'https://github.com/some_github_repo/some_gem.git'

Categories : Ruby On Rails

What exactly is a key container, where is it located?
The RSA key container is nothing but a container for storing your Private key, public key pair. When you create a key container .Net actually creates a random Public Key for encrypting the data and a private key for decryption the data and is stored in the container.

Categories : C#

Where is tools.jar located?
No,it should be in in Lib folder JDK and JRE File Structure c:jdkx.x.xlib Files used by the development tools. These include tools.jar, which contains non-core classes for support of the tools and utilities in the JDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for an application.

Categories : Java

jQuery if valid show icon else show invalid icon
JS if ($('input').hasClass('woocommerce-invalid')) { $('#someDiv').addClass('red-cross'); } else { $('#someDiv').addClass('green-tick'); } CSS .red-cross{ background-image: url('red-cross.png'); } .green-tick{ background-image: url('green-tick.png'); }

Categories : Jquery

Show loading icon whenever the browser loading icon is active
Buffering Case your PHP scripts are causing a slow load you must put' em in buffer. So, when the load is finished you can free this buffer. This isn't so hard to implement. See the PHP output buffering control documentation for this: PHP Output Buffering Control Finished the loading of the buffer You can make like this: http://jsfiddle.net/S9uR9/ $(window).load(function () { //hideLoading(); }); hideLoading = function() { $('.loading').fadeOut(2000, function() { $(".content").fadeIn(1000); }); }; hideLoading(); In your page, try to remove the commented line in $(window).load() function and comment the last line hideLoading();. Detecting browser’s activity I've noticed that some browsers show a loading icon

Categories : PHP

Why can web.xml welcome-file be located inside WEB-INF
It's because the welcome file is served by a RequestDispatcher#forward() call. As evidence, do you see /WEB-INF/page.jsp appearing in browser's address bar? No? Then it's already most definitely not a direct request. If you attempt to request it directly, you'll see that you get a 404. See also: requestDispatcher Interface Vs sendRedirect Servlets wiki page - contains Hello World examples illustrating real world use cases for forward() Unrelated to the concrete problem, you seem to be basically abusing the <welcome-file> to have a "homepage file". There it is not intented for. It's intented to specify the sole filename of the folder's file you'd like to serve up when any folder is been requested, such as /, /foo/, /foo/bar/, etc. If you specify index.jsp, then the /index.jsp,

Categories : Jsp

How to retrieve the data which is located between ( and )?
Instead of rolling your own search routine, use InStr and InStrRev: Sub extractdateincells() Dim i As Integer, r As Integer, str As String Dim OpenPos As Long, ClosePos As Long For Each c In Range("a1:a10") str = c.Value OpenPos = InStr(str, "(") ClosePos = InStrRev(str, ")") If OpenPos > 0 And ClosePos > 0 Then c.Value = Mid(str, OpenPos + 1, ClosePos - OpenPos - 1) End If Next End Sub

Categories : Excel

Where is DefaultRenderMvcControllerResolver located in Umbraco Api
The namespace is Umbraco.Web.Mvc but only available from v6.1 onwards I think. All the code is open source and available at https://github.com/umbraco/Umbraco-CMS

Categories : C#

How to add HttpHandler located in GAC to IIS7.5
After adding assembly to GAC for applying changes need to restart IIS. So complete solution is: Add assembly with module to GAC by executing gacutil.exe -i path_to_projectinMyHandlerAssembly.dll Restart IIS Add Handler Mapping of type MyHandlerAssembly.MyHandler, MyHandlerAssembly, Version=X.X.X.X, Culture=neutral, PublicKeyToken=XXXXXXXXXXXXXXX(new types from your assembly will be available after IIS restart)

Categories : Iis

Where is elmah.mvc log file located
Look at the bottom of the myapp/elmah page for "This log is provided by the..." to see what type of logging you're using. If it's In-Memory, there is no physical file. Otherwise, the location of the file is specified by logPath in web.config, such as... <elmah> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~App_Data" /> </elmah> EDIT I don't want to just replace the original code snippet because it might have worked for some people; for me it didn't and actually I had to change logPath a bit like that: <elmah> <errorLog type="Elmah.XmlFileErrorLog, Elmah" logPath="~/App_Data" /> </elmah>

Categories : Misc

Nokogiri XML file output is located where?
To generate an xml file you do not need Rails. Ruby (and Nokogiri or some oder builder) will suffice. First, you have to build your xml: builder = Nokogiri::XML::Builder.new(:encoding => 'utf-8') do |xml| xml.root do xml.products do xml.widget do xml.id_ "10" xml.name "Awesome widget" end end end end You can get an xml string from this builder using builder.to_xml: xml_string = builder.to_xml # => "<?xml version="1.0" encoding="utf-8"?> <root> <products> <widget> <id>10</id> <name>Awesome widget</name> </widget> </products> </root> " To save this string into a file, you use File.open and File#write: # open a file instance with path '/path/to/file.x

Categories : Ruby On Rails

How to get path of the php binary on server where it is located
It's usually /usr/bin/php but you could try to capture and parse the output of the command 'whereis php'. Or better yet, use the constant PHP_BINARY. Have a look here.

Categories : PHP

How to install a package not located on CRAN?
I think a package builds differently for linux than to windows so a .gz version can't be converted to .zip This link indicates you should be able to use just the unzipped version... http://decisionstats.com/2013/04/26/using-a-linux-only-package-in-windows-rstats/ The comment in it suggests devtools or Rtools, both of which will allow direct installation from the gz file To unzip and use directly Extract from tar.gz to .tar Extract from .tar Set the working directory to the R subfolder e.g. Setwd( "C:\Users\x\Documents\RGoogleTrends_0.2-1.tar\RGoogleTrends_0.2-1\RGoogleTrends\R") Load all functions for (i in list.files()){source(i)} To use devtools Install devtools library("devtools") Setwd to folder containing .tar.gz file install("RGoogleTrends_0.2-1.tar.gz") To use Rtools D

Categories : R

Where is the default "Welcome Aboard" page located in my app?
Since Rails 4, the "Welcome aboard" page is no longer located in public/index.html. It is - as you've already detected - located inside one of the Rails gems. So you already answered the question yourself; the "Welcome aboard" page is - in your case - located at /Users/7stud/.rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/railties-4.0.0/lib/rails/templates/rails/welcome/index.html.erb To get rid of it, following the instructions on the page. Basically they are: Create a controller Add a root route in config/routes.rb to route to that newly created controller. As for how the request to your application ends up at a controller inside railties, let's dig into the gem: Inside Rails::Application::Finisher we find this: initializer :add_builtin_route do |app| if Rails.env.develop

Categories : Ruby On Rails

How is driver class located in JDBC4
Some information about JDBC4 driver loading taken from : http://www.onjava.com/2006/08/02/jjdbc-4-enhancements-in-java-se-6.html When the method getConnection is called, the DriverManager will attempt to locate a suitable driver from among the JDBC drivers that were loaded at initialization and those loaded explicitly using the same class loader as the current application. The DriverManager methods getConnection and getDrivers have been enhanced to support the Java SE Service Provider mechanism (SPM). According to SPM, a service is defined as a well-known set of interfaces and abstract classes, and a service provider is a specific implementation of a service. It also specifies that the service provider configuration files are stored in the META-INF/services direc

Categories : Java

ASP .NET MVC RedirectoToAction ignores the application where is located
thats correct functionality. MVC will calculate the route as controller/action by default. If you want this to do otherwise you need to add a route into the Global.asax: //this is your new route which needs to be ABOVE the detault routes.MapRoute( // Route name "myapp_Default", // Url with parameters "myapp/{controller}/{action}/{id}", // Parameter defaults new { action = "index", id = UrlParameter.Optional }); //This is the default route that should already be there. routes.MapRoute( // Route name "Default", // Url with parameters "{controller}/{action}/{id}", // Parameter defaults new { action = "index", id = UrlParameter.Optional }); more info on routing in scott gu's blog

Categories : Asp Net Mvc

How to fetch continent of the user located in?
Well this can be done like this For Example I have made a code to get the timezone. NSTimeZone *localTime = [NSTimeZone systemTimeZone]; NSLog(@" - current local timezone is %@",localTime); I am getting an output as follows - current local timezone is Asia/Kolkata (GMT+05:30) offset 19800 So I got the whole timezone. What I do now in this is add this in an NSString. Then use the property of the NSString class componentsSeparatedByString to get the "/" operator. The full code is as follows :- NSTimeZone *localTime = [NSTimeZone systemTimeZone]; NSLog(@" - current local timezone is %@",localTime); NSString *str = [NSString stringWithFormat:@"%@",localTime]; NSArray *arr = [str componentsSeparatedByString:@"/"]; NSString *strHi = [arr objectAtIndex:0]; NS

Categories : Iphone

Using a variable through a Query located in a table
Look at this example. First snippet execute SQL statement without using variable. Second with. create table tbl1 (id int identity(1,1), value varchar(100)); insert into tbl1 (value) values ('abc'), ('def'), ('xyz'); -- first snippet (without using variable) declare @sql varchar(max); set @sql = 'select * from tbl1 where value = ''abc'''; exec(@sql); -- second snippet (with variable) declare @sql nvarchar(max), @param nvarchar(100); set @param = N'@val varchar(100)' set @sql = N'select * from tbl1 where value = @val'; exec sp_executesql @sql, @param, @val = 'abc';

Categories : SQL



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