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

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

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#

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

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#

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

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

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

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++

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 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

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

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

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

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

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

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

How to properly represent inheritance in dual hierarchy?
This is a classic generic case: EDITED One more time - still the same concept, but the inheritance chain is fully there. You have to have hiding properties (new) in order to do what you need, but since you're implementing the ICar interface, you still get the base property for when you have a mixed collection. I think this is the best you're going to be able to do. public interface ICar { IEngine Engine { get; set; } } public abstract class BaseCar<T> : ICar where T : IEngine { public T Engine { get; set; } IEngine ICar.Engine { get { return Engine; } set { Engine = (T)value; } } } public class Car : BaseCar<Engine>, ICar { } public class SportsCar : Car, ICar { IEngine ICar.Engine { get { return Engine; } set { Engine = (TurboEn

Categories : C#

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

How to find out which SIM is making the outgoing call (Dual SIM)
You can create BroadcastReceiver, which will accept all outgoing calls. Then: String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER); int slot=intent.getIntExtra("com.android.phone.extra.slot",-1); //0 or 1 are valid in my case number is dialed number slot is through which slot you make that call You will need to register that receiver, and give proper permissions. This works for dialed USSD codes also. It is tested on Privileg GSM S7589 2 SIM cards, Android 4.2.1

Categories : Android

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

Dual-parent nested resources or is polymorphism right for me?
I would use polymorphic: routes.rb resources :students do resources :evaluations end resources :goals do resources :evaluations end models/evaluation.rb class Evaluation < ActiveRecord::Base attr_accessible :some_attribute belongs_to :evaluable, polymorphic: true end models/student.rb class Student < ActiveRecord::Base attr_accessible :some_attribute has_many :evaluations, as: :evaluable end models/goal.rb class Goal < ActiveRecord::Base attr_accessible :some_attribute has_many :evaluations, as: :evaluable end your relation between goal and student will look like: id evaluable_id evaluable_type other_field 1 4 'Goal' 'other goal content 1' 2 1 'Student' 'other student content 1' 3

Categories : Ruby On Rails

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

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

how to evaulate 2 queries output data into one with dual
When you union two result sets the column names in the combined set are taken from the first branch of the union. You've effectively got: select statusA from test union select statusB as statusA from test1 So there is no statusB to work with in the result set. You maybe want to do something like: select case when (select nvl(max(statusA), 'N') from test) = 'N' and (select nvl(max(statusB), 'N') from test1) = 'N' then 'N' else 'Y' end from dual Though I'm not quite sure if you expect a single value from each table, and quite what you're trying to do. OK then, with an ID value linking the two tables, and with a given ID being in one or both of the tables, you can use a full outer join: select coalesce(t.id, t1.id) as id, t.statusa, t1.statusb, case when nvl(statusa, 'N') = 'N

Categories : SQL

Why java monothread is capped at 25% on a dual core (i5)
Your processor uses hyper-threading, so the 2 physical cores become 4 logical cores. Now as you've only got a single thread, that can only use one of those logical cores - i.e. 25% of your available logical cores, hence the capping. If you change your application to use multiple threads (assuming that's feasible in your particular task) then you'll see more cores being used. You may find that you can turn off hyper-threading in your BIOS, at which point I'd expect Windows to report 2 cores instead of 4. You may then find that your application runs faster than it did before - but there'll be a lot of different factors in that calculation. (Modern processors are rather smart, and do all kinds of things automatically - such as turning off unused cores and boosting the clock speed of the sti

Categories : Java

FreeRADIUS Google Dual Factor Authenticator
After so much internet surfing and forum hunting I manage to fix this problem. If anyone else having this issue this might help them :) Thu Sep 26 16:38:19 2013 : Debug: pam_pass: using pamauth string <radiusd> for pam.conf lookup Thu Sep 26 16:38:19 2013 : Debug: pam_pass: function pam_authenticate FAILED for <test>. Reason: Cannot make/remove an entry for the specified session The above line actually means a auth fail, even though it doesn't sound like it, also it could mean that .google_authenticator file in the user's home directory isn't accessible. FreeRadius log file not help you much with this issue, but have a look through /var/log/secure on CentOS and /var/log/auth.log in Ubuntu. This will explain which is the issue. Issue with my system was my time was out and

Categories : Misc

Can a C function have dual use depending on a parameter being volatile or not?
In C++, you could certainly do this using templates: template <class T> void circbufu8_reset(T &cb) { // code here } Of course, this function template would be callable with any type (but likely fail instantiation), so you might want to limit its use like this: class Helper { friend void circbufu8_reset(circbuf_u8_st &); friend void circbufu8_reset(volatile circbuf_u8_st &); private: template <class T> static void reset(T &cb) { // use cb here, guaranteed to be circbuf_u8_st & or volatile circbuf_u8_st & } }; inline void circbufu8_reset(circbuf_u8_st &cb) { Helper::reset(cb); } inline void circbufu8_reset(volatile circbuf_u8_st &cb) { Helper::reset(cb); } EDIT An even more C++ way would be this: struct circbuf_u8_s

Categories : Misc

Issues with dual-pane preference screens
The key idea behind the code below came from the Commonsware blog entry linked in the question, so it feels relevant. I specifically had to extend the concept to deal with an orientation change issue that sounds very similar to the one in the question, so here's hoping it gives you a start. The Settings class should not have any bearing on the orientation issue, but including it anyway to be clear. Per my code comment, see if the checkNeedsResource call in onCreate will help at all: public class SettingsActivity extends PreferenceActivity { @SuppressWarnings("deprecation") @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Show settings without headers for single pane or pre-Honeycomb. Make sure to check the // single

Categories : Java

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

Dual hover-effects for nested list items in CSS
You want to declare the :hover on the li and then select the img or the title after that. Also, your markup could be a bit better. For example: <li class="item"> <a href="#"> <img src="http://placekitten.com/g/200/300" /> <br /> <span class="p_title">Entry 6</span> </a> </li> li.item:hover img { opacity: 1; } li.item:hover { background-color: #fb8008; }

Categories : HTML

android application is not able to access GPRS in dual sim phon
Is there any lines of code related to Network connectivity type in your pgm? Following if a simple method to detect connectivity. public boolean isConnectingToInternet(){ ConnectivityManager connectivity = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null) { NetworkInfo[] info = connectivity.getAllNetworkInfo(); if (info != null) for (int i = 0; i < info.length; i++) { Log.d("Connectivity", "info:"+info[i]);//Here you can check network info if available if (info[i].getState() == NetworkInfo.State.CONNECTED) { return true; } } } return false; }

Categories : Android

Dreamweaver change file in dual screen view
What I see from you screen grab is you are using Code Inspector - it displays your HTML in a floating window so you see your working pages in their full glory rather than have them cut in half as in Split View. Have you tried Dreamweaver's Code Split View, please read link

Categories : Javascript

How to differentiate data / voice usage for dual sim in Android
There is no support for dual slim as for today. Thats mean - there is no any official public API available. Issue 14799: Dual SIM cards supporting

Categories : Android

Choose SIM card when sending SMS on a dual SIM Android device
Please refer to this Dual Sim Android article. If you follow this direction, I think you can make it, even if current android api doesn't support it.

Categories : Android

Dual debugger Java + (Perl/Python) script
Yes, alter the host program (the java program ) so that it runs the perl program in a debugger You might well run into problems with the way that debuggers "attach" in different programming language environments. perl -d assumes a tty is there for interactive commands whereas java does something completely different

Categories : Java



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