w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Centos Apache VirtualHost setup
Have you uncommented NameVirtualHost *:80 in httpd.conf? If this is commented out Virtual Host will not work. Please check if it is commented and get back to me, it is near the end of the https.conf

Categories : Apache

Php 5.3 mcrypt not working on CentOS 6.3 32-bit
This seem to be a issue in the 32bit version of mcrypt when using yum install php-mcrypt to install. Take a look @ Installing php-mcrypt on centos 6.4 (32 bytes) causes problem, the mcrypt.ini file has the wrong entry You need to edit /etc/php.d/mcrypt.ini and change extension=module.so To extension=mcrypt.so Then save and restart apache.

Categories : PHP

X-SendFile not working on centos
In .htacess file you have <Files files.php> XSendFile on </Files> and the files.php is <?php $file = "path_to_your_file"; $finfo = new finfo; $mime = $finfo->file($file, FILEINFO_MIME_TYPE ); if (in_array('mod_xsendfile', apache_get_modules())) { header("X-Sendfile: $file"); header("Content-type: $mime"); //header ('Content-Disposition: attachment; filename="image"'); } ?> dont forget to change cofig AllowOverride All for .htaccess

Categories : PHP

Installing subversion under /apps other than /var/www/ is not working. Centos Linux version
In the httpd.conf file your Document Root Section probally says <Directory "/var/www"> Also you can give apache ownership of that directory but only if such is placed in the document root. (If I understand you this may not work for you) chown -R apache.apache /apps Apache can access items outside the root but that is soemthing I am not familiar with and you can look into the apache Alias EDIT As the comment under your OP says SVNADMIN should be able to create the repo and you should be able to hit it. mkdir /app/svn svnadmin create /app/svn/testrepository chown svn:svn -R /app/svn Subversion also is very nice about keeping space low since it only stores revisions to projects instead or brand new versions each time. EDIT Setup Walkthrough - Posted in comments

Categories : Svn

Multiple row setup not working in IE
You can also use display: table-cell; instead of display: inline-block; but my suggestion is that use display: inline-block; for button not to .ButtonRow for your requirement.

Categories : CSS

The initial setup with DbFit not working
As discussed on this thread in the DbFit forum, your issue can be solved by launching Fitnesse from the unzipped folder: cd <your_dbfit_folder> ./startFitnesse.sh

Categories : Mysql

TFS 2010 Working Folders Setup in a Build
The continuous integration trigger in TFS builds will queue a new build any time an item within that build's workspace is altered. Workspace mappings can only contain folders - you cannot include exclude (aka "cloak") individual files within folders. What you can do is setup your build workspace to use the entire /MyCodeFolder folder. Then, in the build for SolutionFileOne.sln you can cloak ProjectFolderA, ProjectFolderB, and ProjectFolderC. In the build for SolutionFileTwo.sln you can cloak ProjectFolder1, ProjectFolder2, and ProjectFolder3. This is only a partial solution. Both builds will still get kicked off when someone changes either solution file, or when anything in the ProjectFolderCommon folder is changed. Since you can't cloak the solution files themselves there's no way to

Categories : Tfs

htaccess url-rewriting not working with config setup
Since you are using htaccess then you will need to make sure AllowOverride is set to All in your httpd.conf file: AllowOverride All This will allow you to use htaccess files. Having said that, as a general rule you don't want to use htaccess files or enable AllowOverride if you have access to the apache config files simply because it will use more resources to search the directory and find the htaccess files etc. Placing the changes into the httpd.conf file or conf.d/example_host.conf is much better. One other note, mod_rewrite is over used and is really overkill for most purposes. I would advice you use mod_alias (see http://httpd.apache.org/docs/2.2/mod/mod_alias.html) instead. I should point out this can only be use in server configs or virtual hosts, so it will not work in a htacce

Categories : PHP

C# calling form.show() from another thread is not working in setup
You shouldn't be calling "GUI Stuff" on "Non GUI" threads. All your GUI calls should be on the GUI thread. Use InvokeRequired and Invoke to ensure all your GUI code is done on the correct thread. Google will give you plenty of examples.

Categories : C#

Android ViewPager Indicator is not working with my gradle build setup
The problem seems to be that libraries that you use have the same parent folder name ('library' usually). You need to differ between those, so either rename it or put archivesBaseName = 'something' in build.gradle of your libraries. An answer this is based can be found on adt google group

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



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