w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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

QT getting the screen resolution without the extended monitor
You pretty much had it, just give the screen ID of your main monitor to the geometry() call. QDesktopWidget widget; QRect mainScreenSize = widget.availableGeometry(widget.primaryScreen()); // or screenGeometry(), depending on your needs

Categories : Qt

Event for exiting the screen monitor (with WPF)
You could handle the Window's MouseMove event and check the mouse's position. private void Window_MouseMove(object sender, MouseEventArgs e) { //PrimaryScreenWidth - 1 to account for the cursor itself if (e.GetPosition(this).X >= SystemParameters.PrimaryScreenWidth - 1 || e.GetPosition(this).X <= 1) MessageBox.Show("Edge hit"); } If you're running multiple monitors, you could also handle the MouseLeave event to handle the case where the mouse has moved to the second monitor. private void Window_MouseLeave(object sender, MouseEventArgs e) { MessageBox.Show("Edge hit"); }

Categories : C#

Rotate the Windows on screen keyboard
In WPF with RenderTransform can rotate controls approximately in this way: <Label Width="50" Height="20"> <Label.RenderTransform> <RotateTransform Angle="90" /> </Label.RenderTransform> </Label> In this case the Label is rotated by 90 degrees. But objects of the Window can not be rotated because the Window chrome is still rendered by GDI right now. In your case, I can advise to find / create / etc keyboard control for WPF that matched your requirements. For example, I found such a control by link: To add to the rotation of the control, I added two buttons: RotateOn180 and RotateOn360 in VirtualKeyboard.xaml. The keyboard itself is in the dock panel, so I wrote this: <DockPanel Width="500" Height="200" RenderTransformOrigin="0.5,0.5"

Categories : C#

Android: rotate canvas around the center of the screen
It's not always necessary for the Canvas and the Display to have the same size. Display.getWidth() is deprecated and it is suggested to use Display.getSize() instead. From the documentation: Gets the size of the display, in pixels. Note that this value should not be used for computing layouts, since a device will typically have screen decoration (such as a status bar) along the edges of the display that reduce the amount of application space available from the size returned here. Layouts should instead use the window size. So, in case of canvas matrix transformation, always use the canvas as reference rather than the Display or Window, because the canvas would give the accurate value. So to rotate the canvas around the center, you need the center of the canvas. The cen

Categories : Java

progressDialog stops to update when I rotate screen
Try to put this code in manifest, where you've indicated your activity android:configChanges="orientation|screenSize"

Categories : Android

Activity screen not rotating when I rotate mobile
you may check out this android:screenOrientation="sensor" or android:screenOrientation="user" add one of them to your manifest <activity............../>. and don't forget to add this to your application in manifest as well to avoid recreating your activity android:configChanges="keyboardHidden|orientation|screenSize"

Categories : Android

Android screen flip 180 degrees before rotate to correct orientation
Take a look at the "frameworks/base/services/surfaceflinger/LayerScreenshot.cpp" and its method: "LayerScreenshot::initTexture". modify these parameters: mTexCoords[0] = 0; mTexCoords[1] = v; mTexCoords[2] = 0; mTexCoords[3] = 0; mTexCoords[4] = u; mTexCoords[5] = 0; mTexCoords[6] = u; mTexCoords[7] = v; as: mTexCoords[0] = u; mTexCoords[1] = 0; mTexCoords[2] = u; mTexCoords[3] = v; mTexCoords[4] = 0; mTexCoords[5] = v; mTexCoords[6] = 0; mTexCoords[7] = 0; or others that can fix your situation. hope that can help you

Categories : Android

Best Storyboard-Practice for App w/ Initial Setup Screen
go with option B, you just need to make sure in your app delegate to perform a check on which controller to show. You can set in your Settings.plist a BOOL variable that show if the setup has already done or not. fetch that result from your settings plist and use it to call one or another view controller. ( if the BOOL hasSetup is TRUE ( you already have setted all up ) you won't even create the instance of the setup controller ).

Categories : IOS

PHPMyAdmin/setup show blank screen, while PMA itself works
Most likely this is same issue as bug #1175142 , which has been fixed 4:4.0.1-2. The problem is that in Debian packaged phpMyAdmin, the config script includes one helper function, what prevented in config file being loaded multiple times.

Categories : PHP

XMonad classic alt tab
I am using GroupNavigation for similar thing Following example does cycle through windows on all workspaces: import XMonad.Actions.GroupNavigation ... ((modm , xK_Tab), nextMatch Backward (return True)) ...

Categories : Misc

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

Screen orientation forced to portrait, but still, the activities will rotate to landscape when tilted!! How to force portrait mode?
May be this will help In your manifest file after your main activity write below line android:screenOrientation="portrait" Or in your coding after setContentView() add this line.. setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

Categories : Android

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#

Chrome cannot apply filter:hue-rotate() and transform:rotate() at the same time in an animation
I took a stab in the dark and created two key-frame animations and then declared both for the element, which is working in Chrome 28: http://jsfiddle.net/3QGWY/1/ #subject { ... -webkit-animation:5s multi_rotate1 linear infinite,5s multi_rotate2 linear infinite; } @-webkit-keyframes multi_rotate1 { 0% { -webkit-filter:hue-rotate(0deg); } 100% { -webkit-filter:hue-rotate(360deg); } } @-webkit-keyframes multi_rotate2 { 0% { -webkit-transform:rotate(0deg); } 100% { -webkit-transform:rotate(360deg); } }

Categories : CSS

KinectJS: Rotate an image about an absolute rotate point per drag and drop
You can move an image around a fixed rotation point using some trigonometry Calculate the angle of the mouse position relative to the rotation point using Math.atan2: var dx=mouseX-rotationPointX; var dy=mouseY-rotationPointY; var radianAngle=Math.atan2(dy,dx); Move the image around the rotationPoint using Math.cos and Math.sin: var x=rotationPointX+radius*Math.cos(radianAngle)-imgWidth/2; var y=rotationPointY+radius*Math.sin(radianAngle)-imgHeight/2; image.setPosition(x,y); Here's working example code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Prototype</title> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script src="http://d3lp1msu

Categories : Javascript

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

css transform:rotate, rotate forwards not backwards
I have choose to do that using a class for the rotation and another for the transition. And to make it easier in the script, using 2 divs nested so that you have only one class in each. The HTMl <div id="pie" class="rotate"> <div id="pos" class="rot0"> <div class="rot0" onclick="myFunction(0)">1</div> <div class="rot6" onclick="myFunction(1)">2</div> <div class="rot5" onclick="myFunction(2)">3</div> <div class="rot4" onclick="myFunction(3)">4</div> <div class="rot3" onclick="myFunction(4)">5</div> <div class="rot2" onclick="myFunction(5)">6</div> <div class="rot1" onclick="myFunction(6)">7</div> The CSS #pie { width: 200px; height: 200px; left: 35px; top: 35px; position: absolute; backgrou

Categories : CSS

android animated-rotate won't rotate ccw
I think the point is if you use <animated-rotate> it is a non public API. I can't find any official documentation about it. and it is actually ignoring whatever values you put in fromDegrees and toDegrees. You can remove both attributes and it will still spin. You said you don't want to use rotate, but that is the only other simple XML answer I can find: <rotate xmlns:android="http://schemas.android.com/apk/res/android" android:drawable="@android:drawable/ic_lock_power_off" android:pivotX="50%" android:pivotY="50%" android:fromDegrees="0" android:toDegrees="-360" /> What is the reason for wanting <animated-rotate> and not <rotate> ? If you want to set a slower or faster frame count, you should check this answer here: http://stackoverflow.com/a/1499

Categories : Android

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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