w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to create tabs with icons in JavaFX
Tabs, like many other elements in JavaFX, have a method called setGraphic(Node value), in which you can put any JavaFX node. Example: import javafx.application.Application; import javafx.geometry.Pos; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Label; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.scene.layout.BorderPane; import javafx.scene.layout.HBox; import javafx.scene.paint.Color; import javafx.scene.shape.Circle; import javafx.stage.Stage; public class TabPaneTest extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Tabs"); Group root = new Group(); Scene scene = new Scene(r

Categories : Java

How to create a 'fresh' session when the page is re-opened
You can use Session.Abandon() when you're done. Once the Abandon method is called, the current session is no longer valid and a new session can be started. Abandon causes the End event to be raised. A new Start event will be raised on the next request.

Categories : C#

AVAudioRecorder does not create .m4a files that can be opened and played
The answer to question 1 is that you have to set the audio session correctly, otherwise the m4a file does not get formatted correctly. The audio session code that I now set, just before I start recording is: AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryRecord error:nil]; [session setActive:YES error:nil]; I set the session back for playback after recording is finished so that audio files can be played back. Question 2 is a problem in VLC which was displaying the incorrect number of channels. The audio file, in the MacOS Finder's Get Info window, shows up as single channel. Question 3 is unanswered.

Categories : IOS

How to create a selection box with icons in HTML javascript?
I guess you can just put a bunch of links in a container, and put an img inside it. <div class="iconSelector"> <a href="selecticon.php?icon=1" title="Select 'computer icon'" ><img src="computer.png" alt="computer icon"/></a> <a href="selecticon.php?icon=2" title="Select 'other icon'" ><img src="computer.png" alt="other icon"/></a> <a href="selecticon.php?icon=3" title="Select 'computer icon'" ><img src="computer.png" alt="computer icon"/></a> ... </div> Then, with a tiny bit of CSS you're there: .iconSelector { display: inline-block; padding: 8px; } .iconSelector a img { width: 32px; height: 32px; } Demo fiddle If you like/need to, you can add some Javascript as well

Categories : Javascript

Multiple Shortcut Icons?
The page's <title> start with the Unicode emoji symbol for Briefcase, U+1F4BC:

Categories : HTML

Setting multiple map point icons in JQM
try this code var customIcons = { "Capgemini": { icon: 'path_to_your_marker_pictures/capico.png', }, "Accenture": { icon: 'path_to_your_marker_pictures/accico.png', } }; var icon = customIcons[marker.company] || {}; var marker = new google.maps.Marker({ position: point, icon: icon.icon, }); Best, Darko

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

Simile Timeline displays when opened directly but not when opened by servlet
/timeline.xml refers to your webapplication context root location. are you placing the xml file in the root location. For example , if you have your webapp called myapp deployed in webapps/myapp , then '/' refers to myapp directory. So /timeline.xml refers to myapp/timeline.xml

Categories : Java

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

How to optimize scrollable / zoomable map with multiple icons?
I'm not sure if I explained my problem properly, but now I found the following solution: Now I have all the icons in the same container as the map image itself. When you zoom in to zoomlevel 0.3, scale(0.3) gets applied on the container. To leave the icons at the size they were before, I neutralize the scale by applying scale( 1 / zoomlevel ) to the icons. This way the style of the icons only needs to be recalculated when zooming and the map feels much more responsive on slower devices, especially when scrolling.

Categories : Javascript

Font-awesome class with multiple different icons
Yes you create a custom font awesome class, with multiple characters in content like this .class:after { content: "f005f005f005"; /* 3 Stars */ font-family: FontAwesome; } Demo Note that the values like f005 etc can be found in FontAwesome stylesheet so copy the unicode of the type of font you like and use it in the content property with the font family of Font Awesome.

Categories : CSS

Links when opened in a new tab or window opened a blank page
if you add link as LiteralControl - is HTML Tag <a href="http://google.com" target="_blank">fly to google</a> if you add link as asp control HyperLink link = new HyperLink(); link.NavigateUrl = "http://google.com"; link.Text = "fly to google"; link.Attributes.Add("target", "_blank"); this.Controls.Add(link);

Categories : C#

"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 do I restrict my chrome app from being opened multiple times (so just one instance)?
Create the window with an id and as a singleton. See the chrome.app.window documentation. E.G. modify the hello world sample to create the window with chrome.app.window.create('index.html', { id: "", // Even an empty string is sufficient. singleton: true,

Categories : Google Chrome

Add multiple different complex icons AND info boxes to google maps api V3
You could create a json object of json objects where you keep your custom images. Something like this customImgObj = { 'family' : {'image' : YOUR_IMAGE_GOES_HERE, 'shadow' : YOUR_SHADOW_GOES_HERE}, 'couples' : {'image' : YOUR_IMAGE_GOES_HERE, 'shadow' : YOUR_SHADOW_GOES_HERE}, 'other' : {'image' : YOUR_IMAGE_GOES_HERE, 'shadow' : YOUR_SHADOW_GOES_HERE} }; Then you have your locations array where you keep one extra element, which is the type of marker. var locations = [ ['Lodges', 52.316, 0.901, 'family'], ['Other', 52, 1, 'couples'] ]; And you access it like this for (var i = 0; i < locations.length; i++) { var lodge = locations[i]; var myLatLng = new google.maps.LatLng(lodge[1], lodge[2]); var marker = new google.maps.Marker({ position:

Categories : Javascript

Select all subscribers who haven't opened an email using MySQL and multiple tables
-- Select all email_list_subscribers SELECT es.* FROM email_list_subscribers AS es -- have an entry in email_list_subscriber_events that is LEFT JOIN email_list_subscriber_events AS ee ON ( ee.subscriberid = es.subscriberid -- an eventtype equal to "Opened an Email Campaign" AND ee.eventtype = 'Opened an Email Campaign' -- within the last year AND ee.eventdate > CURENT_DATE() - INTERVAL 1 YEAR ) -- who belong to an email_list with an ownerid of 2 WHERE es.listid = 2 -- and who don't have an entry in email_list_subscriber_events ... AND email_list_subscriber_events.subscriberid IS NULL;

Categories : Mysql

Yii create application error on ubuntu 13.04
You don't have PHP in your user path, that's the reason it doesn't know the command. You can just run it like: /opt/lampp/php yiic.php command name change the /opt/lampp/php path to match yours.

Categories : PHP

Fatal execution error when a file is opened, closed and disposed multiple times in C#
Random crashes and FatalExecutionEngineError exceptions are normally associated with stack or heap corruption which can remain hidden until further down in your code. Ensure that you have marshalled all your C++ functions correctly using the right calling convention, parameter types and return types. Microsoft specifies the probable cause of the message is: The CLR has been fatally corrupted. This is most often caused by data corruption, which can be caused by a number of problems, such as calls to malformed platform invoke functions and passing invalid data to the CLR. Judging from the code you've supplied, your declaration looks correct so it could be another function that you've marshalled that is causing an issue. Ensure that your C++ code is stable and not the cause of

Categories : C#

Allow Maven to automatically create directories in Ubuntu
No, you don't need to create the folder by hand or with an ant script. If the target folder doesn't exist when you run mvn, it will create it So my guess is that you have a permissions issue The user running maven can't create folders in /home/andrew/flume-sources just as a test, run mvn as root sudo mvn package if that works then it is what I said and you will need to 1) chown the folder so that the user running maven can create folders in it (rw) or 2) run mvn from the same user that owns the folder (which i'm guessing is andrew)

Categories : Maven

Unable to create user on Ubuntu on Amazon EC2
You are probably thinking of adduser which has interactive prompts for most of the fields. See this question. useradd and userdel are for creating accounts in scripts where you don't want to be prompted. By default they will only create the user and requires additional command line options to create the home directory etc. You will find it did create the account (look in /etc/passwd) and the complaint about "already exists" confirms this. How do you remember the difference? No idea. Seems to be one of those historical things you just need to know.

Categories : Amazon

Tomcat 404 for a folder in webapps
You cannot just create a folder in $CATALINA_HOME/webapps like this and access it from web browser. webapps folder is supposed to be home for all web applications with proper J2EE web app like directory structure e.g. WEB-INF/web.xml, WEB-INF/classes, WEB-INF/lib, META-INF etc. Read more about Web Application Directory Stricture

Categories : Java

Google WebApps & Menus
You can have a script that deploys a menu as well as work as a web app. You deploy the menu in your onOpen function of the spreadsheet. And you have a doGet function to write your web app code (typically the UI). The web app is accessed through the service URL and not the spreadsheet. EDIT: To display the web app UI within the spreadsheet, you can generate the same UI in a different function and call that function from your custom menu. You might want to change the dimensions of your UI to suit that of your web app function onOpen(){ var menu = [{name: 'Show UI', functionName: 'showUI'}]; ss.addMenu('Show Custom UI', menu); } /* If you are using HtmlService to build a web app UI */ function showUI() { var ss = SpreadsheetApp.getActiveSpreadsheet(); var html = HtmlService.c

Categories : Google Apps Script

Wrap the application to create sh file in Ubuntu Linux
If you're using maven to build your application there is a plugin called appassembler-maven-plugin that can create a .sh file for your application. The groupId is org.codehaus.mojo.

Categories : Java

Get list of deployed webapps in tomcat?
This is the solution that worked for us: Set<ObjectName> names = mbeanServer.queryNames(new ObjectName("Catalina:type=Host,*"), null); Set<String> hostNames = new HashSet<String>(); for (ObjectName on : names) { hostNames.add(on.getKeyProperty("host")); } for (String str : hostNames) { ObjectName[] webapps = (ObjectName[]) mbeanServer.getAttribute(new ObjectName("Catalina:type=Host,host=" + str), "children"); for (ObjectName ob : webapps) { String[] appSpl = ob.getKeyProperty("name").split("//localhost"); webappNames.add(appSpl[1]); } }

Categories : Java

tomcat deploy wars outside webapps
WAR files located outside the Host's appBase are not unpacked into the appBase. See https://issues.apache.org/bugzilla/show_bug.cgi?id=51294 for further details. The feature will probably be added to Tomcat 7 in a couple of releases time.

Categories : Tomcat

ant target to deploy war to tomcat7/webapps
Well, the issue is fixed : STEP 1 : update tomcat manager url for AT7 tomcat.url=http://localhost:8080/manager/text STEP 2 : add extra role to user <role rolename="manager-script"/> <user username="tomcat" password="tomcat" roles="tomcat,manager-gui,manager-script"/> Thanks to Ant Tomcat 7 Reload FileNotFoundException

Categories : Java

How to copy my war file in tomcat7 webapps in linux
The easiest way to deploy your .war file to your Tomcat7 application server would be to use SCP to securely transfer the file to the Amazon server you have on AWS EC2. You can find more info on SCP over at Using scp to copy a file to Amazon EC2 instance?

Categories : Linux

How to configure properly JNDI for tomcat 6 and its deployed webapps?
Each separate application within a single Tomcat application server is considered a separate instance of Derby. So two different applications in the same Tomcat app server cannot access the same copy of Derby, unless you use the Client-Server configuration of Derby and configure a Derby Network Server.

Categories : Spring

jsp cannot write file out of permission denial on webapps but /tmp directory?
String filePath = application.getRealPath("/WEB-INF/bbs/" + filename); Just a guess, fact that you're trying to write /WEB-INF implies WEB-INF is at the root of your drive.

Categories : Jsp

Two webapps with different Spring versions in one container feasible and practical?
I guess the answer is both YES/NO: of course you can run two different war in the same container regardless of the libraries they use you must be aware of the two webapps holding two different contexts (beans, authentication, ...)

Categories : Spring

How to move the Liferay hooks into a directory inside webapps?
I suppose you're speaking about Tomcat's (or whatever appserver you're using) webapp folder. You cannot merge different apps into one folder: it has to keep the structure on deploy. So what you can do is to aggregate those hooks on source level (i.e., create only one hook project in Eclipse with the Liferay IDE so you can put everything there). So you could put them into the same plugin. Btw I would discourage using several hooks, because they might occasionally overwrite each other's behaviour. Imagine you have some sort of property defined in a-hook and b-hook in a properties file. You cannot tell which one will be used after the deployment.

Categories : Java

Hot to deploy tomcat/webapps folder form IntellijIDEA
Ok. Let's try. 1) Create IntellijIdea project via WebApplication template. Idea should be Ultimate version, not Community edition 2) Go to Run-Edit configutaion and set up Tomcat location folder, so Idea will know about your tomcat server 3) Go to Deployment tab and select Artifact. Apply 4) In src folder put your servlet (you can try my example for testing purpose) 5) Go to web.xml file and link your's servlet like this 6) In web folder put your's .jsp files (for example hey.jsp) 7) Now you can start you app via IntellijIdea. Run(Shift+F10) and enjoy your app in browser: - to jsp files: http://localhost:8080/hey.jsp (or index.jsp by default) - to servlets via virtual link you set in web.xml : http://localhost:8080/st

Categories : Tomcat

Is it possible for ceating multiple maps using GIS on the same database on ubuntu ?
I can answer this with a simple "Yes". However providing more help than that will require some more inofrmation about exactly what you mean by multiple maps and GIS. Is this a web app or on a thick client. What operating system ect ect

Categories : Misc

apache: configuring routes on similar urls to different tomcat webapps
It should be possible using mod_proxy with a reverse proxy, e.g. (not tested): ProxyPass /api/dog http://localhost:8080/webappA/api/dog ProxyPassReverse /api/dog http://localhost:8080/webappA/api/dog ProxyPass /api/cat http://localhost:8080/webappB/api/cat ProxyPassReverse /api/cat http://localhost:8080/webappB/api/cat Make sure that the proxy and proxy_http modules of Apache are enabled.

Categories : Apache

Relative path for getting file in Tomcats webapps directory from a deployed web application
I would recommend accessing this file as a resource from the classpath as opposed to directly through the file system. Add the file to a directory on the class path such as a package within a source folder. Then use the following code to access the file: File file = null; try { file = new File(this.getClass().getResource("modxml.xml").toURI()); } catch (URISyntaxException e) { // TODO Auto-generated catch block e.printStackTrace(); } Although I would not recommend this approach you can get the location of your application from an HttpServletRequest using request.getServletContext().getRealPath("/"). You can store this value in a string, then suffix the path to file and use it within the constructor for File.

Categories : Java

Unable to start Tomcat server with two SpringMVC webapps that are created from same maven archetype
Venkat, You need to specify a different root key for each app. If you're using XML-configuration, then use Karthikenyan's approach, specifying a different value in each web.xml: <context-param> <param-name>webAppRootKey</param-name> <param-value>thisisdistinctforeachwebapp</param-value> </context-param> If you're using an XML-free configuration (implementing WebApplicationInitializer), it's as easy as one line: servletContext.setInitParameter("webAppRootKey", "thisisdistinctforeachwebapp"); HTH

Categories : Hibernate

Cocoa File Opened Event - Detect if a file was opened
It's possible with DTrace so it should be possible (with likely a great deal of work) from the high level of your Cocoa app (but your question is too broad to answer without writing such an app for you). Unfortunately no convenient API exists to do what you request.

Categories : Osx

vim tab header not visible? I am not able to see tab header in vim when opened multiple files using vim -p *.
The 'showtabline' option is what dictates the presence or absence of the tabline. See :help 'showtabline'. Also, may I suggest you to stop using Vim's tabs as proxies for buffers? Tabs are "viewports" or "workspaces": they are not designed at all to work like the tabs you are used to in other programs.

Categories : Vim

Setting up local ip over wireless network to create a local server on Ubuntu
Just add this to your normal runserver command: python manage.py runserver Then others on your local network can access it through:

Categories : Django

Nginx sites-enabled, sites-available: Cannot create soft-link between config files in Ubuntu 12.04
You need to start by understanding that the target of a symlink is a pathname. And it can be absolute or relative to the directory which contains the symlink Assuming you have foo.conf in sites-available Try cd sites-enabled sudo ln -s ../sites-available/foo.conf . ls -l Now you will have a symlink in sites-enabled called foo.conf which has a target ../sites-available/foo.conf Just to be clear, the normal configuration for Apache is that the config files for potential sites live in sites-available and the symlinks for the enabled sites live in sites-enabled, pointing at targets in sites-available. That doesn't quite seem to be the case the way you describe your setup, but that is not your primary problem. If you want a symlink to ALWAYS point at the same file, regardless of the wher

Categories : Ubuntu

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