w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
git - dual boot ubuntu and windows with separate data partition
I'm guessing there's an issue with line endings. You probably have commited your code with windows line endings and when you checked out the code in ubuntu git converted those to unix style line endings. Take a look at this page Dealing with line endings

Categories : Windows

Duplicate a pop window display on dual monitors
My guess is the only way to do it is to use JavaScript to generate two popups and then use CSS to push the popups to the correct locations. The problem I would think you are going to run into is knowing whether or not you have two displays to manage or not.

Categories : Javascript

Jquery flickering using display
Instead of display you could try opacity. This doesn't remove the img but makes it transparent so it still receives mouse events: $(document).ready(function(){ $("img").mouseover(function(){ $("img").css("opacity",0); }); $("img").mouseout(function(){ $("img").css("opacity",1); }); });

Categories : Jquery

Git Setup on My UBUNTU envrionment
You shouldn't deploy your project with the .git directory to a production setup. But if you use your server for development and testing purposes only, it should be okay to do it this way. At least, I don't see a reason why it's such a bad idea, if the setup works for you. If you want, you can configure the HTTP server to deny access to .git/ so that nobody can access it. However, the preferred way would be to develop the module on your local machine and deploy it to your server using scripts, build automation tools or manually. Usually you would create some kind of artifact which a user can install, e.g. a ZIP file. Your build script or tool should generate such an artifact and this is (automatically) deployed to the server for further integration testing. But since you want to keep your

Categories : GIT

Setup ACL on Ubuntu 12.04 with Chef
Found a way to do it with Augeas: # Install ACL and remount the root volume with ACL enabled case node[:platform] when "debian","ubuntu" %w{acl augeas-tools}.each do |pkg| package pkg end execute "update_fstab" do command <<-EOF echo 'ins opt after /files/etc/fstab/*[file="/"]/opt[last()] set /files/etc/fstab/*[file="/"]/opt[last()] acl save' | augtool mount -o remount / EOF not_if "augtool match '/files/etc/fstab/*[file="/"]/opt' | grep acl" end end I don't really like the solution, but it seems to work. There's got to be a better way though, right?

Categories : Ubuntu

Java Applet flickering when running? (not everybody sees flickering)
This is a result of the Applet not begin buffered in any way. You should employ some kind of double buffering... For example... @Override public void paint(Graphics g) { BufferedImage bi = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB); Graphics2D g2d = bi.createGraphics(); super.paint(g2d); g2d.setColor(Color.LIGHT_GRAY); g2d.fillRoundRect(s.getx(), s.gety(), 10, 30, 10, 10); g2d.setColor(Color.GREEN); g2d.fillRoundRect(s.getx() - 5, s.gety() + 10, 5, 20, 10, 10); g2d.fillRoundRect(s.getx() + 10, s.gety() + 10, 5, 20, 10, 10); g2d.dispose(); g.drawImage(bi, 0, 0, this); } Now, because it's pretty safe to assume the size of the applet won't change a lot, you could create a class instance of the BufferedImage and reuse

Categories : Java

Joomla 3.1 setup on Ubuntu 12.04 running nginx
The permissions when t3 installs are correct, it sounds like the problem is with ownership rather than permissions. I think in ubuntu the system user is www-data so you would need to run the following over ssh chown -hR www-data:www-data /path/to/joomla/root Then upload the plugin through the joomla installer (and change folder permissions back to 755 and files to 644).

Categories : Joomla

How to setup a private dedicated Node.js Ubuntu Server?
what do i need to install to properly run node.js apps on my network on a dedicated ubuntu server? You just need to install nodejs. nodejs can run on any port, so you don't need Apache or anything else. how do i install the latest nodejs,npm,and the init files on ubuntu server Try to follow the steps outlined in this guide: http://howtonode.org/how-to-install-nodejs . Use the instructions for Ubuntu. when i reboot the app starts automatically every time One way to do this is to write a small script that will run on boot. The script would contain the instruction: nodejs /path/to/app/app.js Check out this SO answer on how to run a script on boot: Files and scripts that execute on boot

Categories : Node Js

How to display a repeatedly drawn CoreGraphics bitmap context on the screen without flickering using Core Animation?
The "normal" way is to work the other way around — call CALayer -setNeedsDisplay to indicate when a change in contents is available and respond to -drawInContext: to draw on demand. So you allow layer contents to be pulled from you, you don't push them. I have to admit that I'm very surprised you get tearing while trying to push, but supposing you started from the simplest thing of just layer.contents = image and all the extra complexity you've added with transactions and the screen update lock are attempts to work around tearing, and you're absolutely sure you're not making problems by overcomplicating your code, what you should probably do is queue your updates, create a CVDisplayLink and then push any pending updates only when the relevant display or displays is about to be updated.

Categories : Misc

Win 8.1 DPI - WPF - How to find independent monitor/display's DPI
I suggest you read Developing a Per-Monitor DPI-Aware WPF Application on MSDN. This article covers pretty most of what you'll need to support High-DPI WPF Windows 8.1 apps. Note, though, that the examples given in the article above are mostly written in C++, but that's less of an issue for WinRT apps since C++ and C# can now interop more easily than before.

Categories : C#

Website monitor display issue
Try wrapping a "Relative" #container around all your "absolute" divs. I've adjusted your code below: <body> <div id="container"> <div id="Links"> <a href="About.html"><img src="Slideshow/About.png" width="140em" /></a> <br /><br /> <a href="Contact.html"><img src="Slideshow/Contact.fw.png" width="140em" /></a> <br /><br /> <a href="Services.html"><img src="Slideshow/Services.fw.png" width="140em" /></a> </div> <div id="mainText"> <h1>Contact</h1> <p>If you want to contact me please call at <b>1.800.SUCCESS</b> or use the form below to sned me an email!</p> </div> <form name="contactform" method="post" action="send_form_email.php">

Categories : HTML

Swing application won't display in unity when second monitor is on the left
Okay it's a simple as private static void createAndShowGUI() { //Create and set up the window. JFrame frame = new JFrame("HelloWorldSwing"); frame.setLocation (50, 50); ... setLocation copes just fine with the multiple monitors. It's just that the default location (if setLocation is not called) appears to be off screen when monitor 2 is left. 0,0 is at the top left on the left monitor as expected. However if you use setLocation(0,0) the window's close / minimize / maximize buttons are obscured by the unity top bar. I guess some platform-specific stuff is required to integrate with the unity top bar / side bar.

Categories : Java

Using Performance Monitor to monitor pooled connections
You can run this from a SQL query windows to get a count and the details of current connections and session running on your SQL server. select * FROM sys.dm_exec_sessions AS es INNER JOIN sys.dm_exec_connections AS ec ON es.session_id = ec.session_id I've had trouble with pooled connections. They're hard to control. Explicitly closing them never seemed to work since they're under the control of .NET. The biggest reason we've run out of connections is uncommitted transactions. If a transaction is left uncommitted or rolled back for some reason, the connection, instead of being re-used, get's stuck in limbo, forcing .NET to open yet another connection to continue processing.

Categories : Sql Server

Pharo on Ubuntu 13.04 : error with not finding module "vm-display-X11"
The following two steps solved the problem. sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib32/libGL.so.1 sudo ldconfig Not pretty, but it worked!

Categories : Ubuntu

Monitor.Enter vs Monitor.Wait
According to MSDN: Monitor.Wait Method(Object) SynchronizationLockException: The calling thread does not own the lock for the specified object. In other words: You can only call Monitor.Wait(Object), when you already own the lock, whereas you call Monitor.Enter(Object) in order to acquire the lock. As for why Monitor.Wait is needed: If your thread realizes, that it is lacking information to continue execution (e.g. it's waiting for a signal), you might want to let other threads enter the critical section, because not all threads have the same prerequisites. For the waiting thread to continue execution, you will need to call Monitor.Pulse(Object) or Monitor.PulseAll(Object) before releasing the lock (otherwise, you're going to get the same kind of exception as with Monitor.Wait(Ob

Categories : C#

How to display fragment *over* tabulation setup as Play Store Settings does?
Create a second Activity, where you can show your other fragments. You can put a flag in the Intent, which you need for the startActivity() method, so you can check which fragment should be shown in your OtherActivity. For the up navigation you need to edit your manifest like this, to set activity hirarchy: <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/MyTheme" > <activity android:name="com.test.ActivityMain" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter&

Categories : Android

Complicated Database Setup: Trying to display two field values that correspond to three other specific fields
if you want them all returned in one select, you might try an "in" clause. $seq = "'60','70','80'"; $sql = "SELECT Question, Answer FROM configs WHERE Config_Name='Company' and Config_Type = '_Hosting' and Seq_Nbr in ( " . $seq . " ) ";

Categories : PHP

Error "Task can be only monitored with a single monitor" when setting my monitor to a task in dll
OnMessage function creates implicit monitor which receives the task message and calls your anonymous function. Same goes for OnTerminated. If you wish to use MonitorWith, you should implement message processing and termination handling as a monitor events, not with OnMessage/OnTerminated functions.

Categories : Delphi

How to add option that User to select a location to install in .Net Setup Project while installing setup?
Case of Winforms deplyment: Right click on the deployment project in the Solution window and select View, File System. Click on the Application Folder. Notice in the Properties window, change the Default location to whatever you want Case of Web: You can implement this by overriding the “Install” method, check this for an example Allow user to set physical directory path during Web Project deployment

Categories : Asp Net

How to close setup window after installation by Inno Setup?
You need to add the nowait flag to that [Run] section entry. So modify your script like this: [Run] Filename: {app}myexe.exe; Description: Launch my app; Flags: postinstall skipifsilent nowait

Categories : Windows

How to setup a HTTP Source for testing Flume setup?
Hopefully this helps you get started. I'm having some problems testing this on my machine and don't have time to fully troubleshoot it right now, but I'll get to that... Assuming you have Flume up and running right now, this should be what your flume.conf file needs to look like to use an HTTP POST source and local file sink (note: this goes to a local file, not HDFS) ########## NEW AGENT ########## # flume-ng agent -f /etc/flume/conf/flume.httptest.conf -n httpagent # # slagent = SysLogAgent ############################### httpagent.sources = http-source httpagent.sinks = local-file-sink httpagent.channels = ch3 # Define / Configure Source (multiport seems to support newer "stuff") ############################### httpagent.sources.http-source.type = org.apache.flume.source.http.HTTP

Categories : Java

Is it possible to setup environment variables within noses setup.cfg
No nose does not have any current ability to set environment variables from a config file: def _configTuples(self, cfg, filename): config = [] if self._config_section in cfg.sections(): for name, value in cfg.items(self._config_section): config.append((name, value, filename)) return config def _readFromFilenames(self, filenames): config = [] for filename in filenames: cfg = ConfigParser.RawConfigParser() try: cfg.read(filename) except ConfigParser.Error, exc: raise ConfigError("Error reading config file %r: %s" % (filename, str(exc))) config.extend(self._configTuples(cfg, filename)) return config Any configuration options specified from a configuration file

Categories : Python

Function dual to std::move?
If you can manipulate T you could template the constructor. #include <iostream> using namespace std; class B { int x; public: B (int i) : x(i) { } B (B && b) : x(b.x) { cout << "B moved (" << x << ")" << endl; } B (B const & b) : x(b.x) { cout << "B copied (" << x << ")" << endl; } }; class A { B b; public: template<typename TB> A (TB && init_b) : b(std::forward<TB &&>(init_b)) { } }; B foo (void) { B x(3); return x; } int main (void) { A a1(foo()); B b1(4); A a2(b1); return 0; } Prints B moved (3) B copied (4) As far as I understand reference collapsing you should come out with a constructor A(B&) forwarding to the copy constructor of B and a A(B&&a

Categories : C++

column pk dual varchars or int?
If you add a surrogate autoincrement integer column, you still need a unique index on the JobID, SubJobID columns. This is the natural primary key. It may not add much value except using more disk and memory to store the extra column. Saying that, if the composite (JobID, SubJobID) index is used in child tables as a foreign key, it can make more sense to use one. 10000 rows here could have 10 million child rows: then the varchar overhead matters. However, there is no truth in anything you read that says Thou shalt always have an identity/autoincrement primary key It is an implementation decision for performance depending on the design.

Categories : SQL

Dual authentication mode
It is possible technically. The classic Mode doesn't requires much effort and can be implemented more or less easily. However when in integrated mode , some careful work is required to achieve the same. Check one post here which may be of help to you for getting started.

Categories : Asp Net

three.js dual viewports only one displays
Needed the following statement (in the javascript init function) to prevent renderer clearing its buffer after rendering the first viewport:- renderer.autoClear = false

Categories : Javascript

Dual divs on the same place
When I click on About me the "slide down div" will slide down and show the about me section. And when I click on contact the contact section will be showed...) How can I make this, and I'm a beginner when it comes to coding and hopefully this can be solved with a simple line of code... Actually, this can be done with a simple line of code! Change your "About me" link to this: <a href="#AboutMe">About Me</a> And, create a div like this: <div id="AboutMe">This is about me!</div> When you click the link, your browser will scroll to the AboutMe div. JsFiddle: http://jsfiddle.net/NmrbP/11/

Categories : Javascript

Highcharts - Dual yAxis not displaying
You've got two problems I can see right off the top: 1.) You haven't assigned any series to plot against the 2nd y axis. yAxis: 1 2.) You have a right margin of -4, which is suppressing the drawing of the right y axis. marginRight: -4, // where's the axis going to draw if it doesn't have space? Updated fiddle.

Categories : Javascript

Formatting column name in dual table
Try this SELECT 'HELLO WORLD' as HELLOWORLD FROM dual; or SELECT 'HELLO WORLD' as "HELLO WORLD" FROM dual; See SQL Fiddle

Categories : SQL

Best Practice for Dual Layouts in Rails 3
It seems to me an admin might be doing different things with a user than an end user would be doing so different controllers may not be completely unDRY. However, if they are completely the same and you just want to have a different layout, then you can just set your layout based on the current user. Something like this would work: layout :determine_layout def determine_layout return 'admin' if current_user && current_user.admin? 'application' end

Categories : Ruby On Rails

Dual play frameworks on the same system
There is answer for similar problem dedicated for mac/unix. In Win you can create symlinks pointing to the proper version of Play directly in the instance folder

Categories : Java

Has anyone had success with ADT on a (dual-booted) Chromebook?
Are you sure you installed the driver correctly? If so, try switching Nexus 7's usb mode from storage mode to pics transfer??/view?? mode(forgot the exact name here). Hopefully it does help.

Categories : Android

Dual use of composite foreign keys
Here's what you started with. CREATE TABLE medication ( "id" INTEGER NOT NULL, -- You don't need this. "therapy_id" INTEGER NOT NULL, "day" INTEGER NOT NULL, "revision" INTEGER NOT NULL, "substance" VARCHAR(100), "dosage" VARCHAR(50), PRIMARY KEY (id), -- Drop this. FOREIGN KEY(therapy_id, day, revision) REFERENCES day (therapy_id, day, revision), -- Ok, but should be PK. FOREIGN KEY(therapy_id) REFERENCES therapy (id) -- You don't need this. ); The column "id" serves no useful purpose, and has instead convinced you that you don't need a unique constraint on the real key: {therapy_id, day, revision}. Replace the useless primary key constraint on "id" with a primary key constraint on {therapy_id, day, revision

Categories : SQL

Get selected values in a dual listbox PHP
This is the weird code: function listbox_selectall(listID,isSelect) { var listbox=document.getElementById(listID); for(var count=0;count<listbox.options.length;count++) { istbox.options[count].selected=isSelect;//<-- ? } } Maybe, you wanted to say: listbox.options[count].selected=isSelect; You said, that only 1 value from "destination" is submitted to PHP. To allow multiple values to be submitted, add [] to the names of the <select>-s: <SELECT id="s" size="10" name="source[]" multiple> <SELECT id="d" size="10" name="destination[]" multiple> Also, there is no need to use name attribute for options. You don't use it anywhere.

Categories : PHP

OpenGL Shadow Mapping dual shader
There are a few things that strike me odd in your code. First off, why are you using glTexGen if there are shaders? Everything glTexGen could be used for, is far easier done using a fragment shader. Then your shadow map generating, and the resulting shadow map are not what you want for a shadow map. First and foremost you don't set "colours" in a shadow map. In fact when rendering the shadow map there's no need to sample a texture or write into a "colour" component in the first place. What you actually place in a shadow map is the distance from the light, i.e. the distance from the origin (point light) or an arbitrary plane (direction light). The resulting picture is a depth map, that has gradients on almost all geometry (except faces parallel to the projection plane). In your "shadow ma

Categories : Java

Using dual polymorphism through a join table in Rails 4
if you still want to do so without STI, you can checkout( even though it is not recommended) joins on polymorphic table

Categories : Ruby On Rails

MySQL INSERT INTO with dual condition for IF NOT EXIST
Replace WHERE NOT EXIST( With WHERE email_addr NOT IN( EDIT Replace SELECT email_addr FROM list_email WHERE NOT IN ( SELECT email_addr FROM email_addr WHERE email_addr = $post_addr ) WHERE NOT IN ( SELECT email_addr FROM list_no_email WHERE email_addr = $post_addr )LIMIT 1 with SELECT email_addr FROM list_email WHERE NOT IN ( SELECT email_addr FROM email_addr WHERE email_addr = $post_addr UNION ALL SELECT email_addr FROM list_no_email WHERE email_addr = $post_addr ) LIMIT 1

Categories : Mysql

qt dual-stack ipv4 & ipv6 application
Definitely create a local IPv6 network environment. A lot of things work the same in IPv6 as in IPv4, but a lot of other things are different. When developing applications that use IPv6 you should have some hands-on experience. You wouldn't expect someone who has never used IP to develop an application that uses IPv4, would you? Some key differences: IPv6 addresses are written in hexadecimal IPv6 hosts will probably have multiple addresses An IPv6 address that starts with fe80:This is the link-local address. Every IPv6 hosts has one for every interface it has. Link-local addresses exist on every link (ethernet segment, LAN) and they use the same address range on each LAN. It is therefore impossible to route them, but they are very useful when communicating only within the LAN. One or m

Categories : Qt

Dual GridView simultaneous and syncronised scrolling
So I ended up biting the bullet and going back to one grid view and battling through the complicated code since no matter what I tried with the scrolling there was always a lag before the other grid caught up and I just couldn't find a way to smoothly scroll both grid views at the same time.

Categories : Android

How can I create a dual has_many relationship in Laravel?
Employee migration use IlluminateDatabaseSchemaBlueprint; use IlluminateDatabaseMigrationsMigration; class CreateEmpoyeeTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('employee', function(Blueprint $table) { $table->engine = 'InnoDB'; $table->increments('id'); $table->string('name'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('employee'); } } Customer migration use IlluminateDatabaseSchemaBlueprint; use IlluminateDatabaseMigrationsMigration; class CreateCustomerTable extends Migration { /** * Run the migrations.

Categories : Database



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