w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
nose framework command line regex pattern matching doesnt work(-e,-m ,-i)
Nose is likely using Python's re.match, or something equivalent, which requires a match at the beginning of the string. _size doesn't match because the function name test_fn_size_sha doesn't start with the regex _size. Try using a regex that matches from the beginning: nosetests -w cases/ -s -v -m='w+_size'

Categories : Python

Data trigger work with TextBox but doesnt work with TextBlock?
Implicit styles are applied within templates to elements which inherit from System.Windows.Controls.Control and since TextBlock inherits directly from FrameworkElement it will not apply. To make it work you must give your Style x:Key and assign style explicitly to your TextBlock or define your style within TextBlock UPDATE:I should also mention, to cover the topic, that there is a way to apply implicit Style to all TextBlocks. If you put it in Application.Resources it will apply to all TextBlocks across whole application. In this case it would cause some major performance issues and potentially other errors, which is probably why Microsoft decided to protect these basic elements from accidentally using complicated, implicit styles on them. Not everyone realise that basically every piece of

Categories : C#

Google doesnt work on https but it work on http
I get response in both cases : <?php ini_set('display_errors', true); error_reporting(-1); function o($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization:key=123']); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, [1,2,3]); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); curl_close($ch); return $output; } var_dump( o("http://android.googleapis.com/gcm/send") ); var_dump( o("https://android.googleapis.com/gcm/send") ); So you probably have error somewhere.

Categories : PHP

Why getting the following doesnt work in php?
Dots and spaces in variable names are converted to underscores. For example <input name="a.b" /> becomes $_REQUEST["a_b"]. – http://php.net/variables.external

Categories : PHP

stream_set_timeout() doesnt work in PHP?
It doesn't work because you're not checking the return value of fgets() nor do you check the socket meta data. The socket is not flagged as EOF when a timeout occurs. The following code should work better for you: $i = 0; while (!feof($fp)) { if (($reply = fgets($fp)) === false) { $info = stream_get_meta_data($fp); if ($info['timed_out']) { // timed out } else { // some other error } } ++$i; }

Categories : PHP

why doesnt this jquery work?
'#monsters[0]' can't be parsed by jQuery as meaning the element has an id "monsters[0]". It's parsed as a query for an element having as id monsters and an attribute 0. You may do $(document.getElementById('monsters[0]')).animate( { left: "+=25" },500); If you use it more than once you can build yourself a small utility : function $$(id) { return $(document.getElementById(id)) } so that you only have to do $$('monsters[0]').animate( { left: "+=25" },500); But you should probably avoid those id, they would for example bring you the same problem in CSS. Here it looks like a class or a data attribute would make more sense. Comment : There's of course the other solution of dynamically escaping the [ and ] characters (and later on the other ones that could arise). Don't do it : t

Categories : Javascript

$(this) doesnt work within a function?
You need to pass the context of "this" to the function: onclick="delete_video(this)" then.... function delete_video(something) { $this = something; ... }

Categories : Jquery

RequestMapping doesnt work
To use spring-mvc with annotations you will need to tell spring in your configuration. <mvc:annotation-driven /> What does <mvc:annotation-driven /> do? Also make sure your file paths are correct. One thing that would make searching for errors easier is to log debug information. The logs will tell you exactly what happened and how.

Categories : Spring

google map doesnt not work on IE
To use anything that is Canvas based (almost all Google objects are). You'll want to include excanvas. Simply add the following in your head tag in your HTML. <script language="javascript" type="text/javascript" src="Path/to/excanvas.min.js"></script> For it to only load in IE do the following: <![if !IE]> <script language="javascript" type="text/javascript" src="Path/to/excanvas.min.js"></script> <![endif]>

Categories : Javascript

$_POST doesnt work
Valid values for enctype in tag are: application/x-www-form-urlencoded multipart/form-data you have text/plain and thats why it's not working.

Categories : PHP

php - file_put_contents doesnt work
your textarea name is editor1 btw. you dont need loop, as you are looping $_POST, the $value will be overwritten by last $_POST. $editor1 = $_POST[ 'editor1' ]; CKEditor doc

Categories : PHP

XHTML and   doesnt work?
Some XHTML configurations don't seem to have the full list of entity names. Use the numerical character reference, &#160; Edit: "Some XHTML configurations" means XHTML documents without a full XHML DOCTYPE declaration. If you omit the DOCTYPE altogether, or use a shorthand one, like <!DOCTYPE html>, the browser will only recognise the five XML entity names. So either provide a full DOCTYPE, like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> or use numerical character references as above.

Categories : HTML

Facets doesnt work on FOSElasticaBundle
Here is more code: $boolQuery = new ElasticaQueryBool(); $fieldText = new ElasticaQueryText(); $fieldText->setFieldQuery('name', $keyword); $fieldText->setFieldParam('name', 'analyzer', 'my_analyzer'); $boolQuery->addMust($fieldText); $fieldText = new ElasticaQueryText(); $fieldText->setFieldQuery('description', $keyword); $fieldText->setFieldParam('description', 'analyzer', 'my_analyzer'); $boolQuery->addShould($fieldText); $fieldTerms = new ElasticaQueryTerms(); $fieldTerms->setTerms('country_id', $countryArray); $boolQuery->addMust($fieldTerms); $fieldTerms = new ElasticaQueryTerms(); $fieldTerms->setTerms('taxon_ids', $themeArray); $boolQuery->addMust($fieldTerms); $query->setSort(array("

Categories : Symfony2

MoinMoin acl on a page doesnt work
The rights defined in acl_rights_before cannot be overwritten, thus whoever has rights defined in acl_rights_before will have it regardless of what is defined later. If you want to be able to overwrite the rights for some group or user in the #acl-directive of the page, the right has to be defined in acl_rights_default. Moving the rights to acl_rights_default in wikiconfig.py acl_rights_default = u"Adminuser:read,write,delete,revert,admin ReaderGroup:read EditorGroup:read,write,delete,revert All:" and on the page remove all rights for the ReaderGroup and keep the rest "Default": #acl ReaderGroup: Default if you have other groups it seems easier to me to just define the rights for the EditorGroup explicitly on the page (all others, except acl_rights_before will be overwritten) #acl

Categories : Misc

php mail function doesnt work
Your order of arguments to mail() is wrong. It should be: mail($to, $subject, $msg, $headers); There is no argument for a "title". From the Manual: bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] ) Side note: strip_tags() is not sufficient to prevent header injections. I suggest using a hard coded email of your own for the From address, instead of user input because otherwise you can get inconsistent spam filter results and you obviously have to implement some validation to prevent the injection vulnerability.

Categories : PHP

comparison array doesnt work
$row = mysqli_fetch_array($current_password); foreach($row as $pass) { $password = $pass[0]; } $row is already an unidimensional array with strings. When you foreach over $row then $pass will be a string. So when you then assign $pass[0] to $password, you assign the first character of the string in $pass to $password. So just write: $row = mysqli_fetch_array($current_password); $password = $row[0]; And here the necessary warning: Use proper escaping with mysqli_prepare or mysqli_real_escape_string for user input!

Categories : PHP

COALESCE doesnt work with CodeIgniter
You're getting empty strings. That means the links.name field in the record isn't NULL, it's an empty string. coalesce() only triggers if you're actually using a full-blowin SQL NULL value. Empty strings aren't null, they're just strings that happen to be empty. Probably this'd work SELECT IF(links.name='', 'noname', links.name) AS owner

Categories : PHP

Passing value from one form to another doesnt work
Try to change your code like this: public MainMenu() { InitializeComponent(); LoginForm nova = new LoginForm(); this.MenuLabelLoggedPerson.Text = nova.TheName; } The InitializeComponent is visual studio generated code when you drag and drop in Windows Forms. EDIT Your problem is you create the new LoginForm, but you don't set TheName property.

Categories : C#

Page Redirection doesnt work
The problem is your script is recursively redirecting to itself. The problem is when you first try to access the page, the script determines you as not logged in : if ( $logged == false ) and it redirects you to the login.php with params, which are further redirecting it to the same page, hence your script keeps on looping. When your web server (apache) loops it for a certain amount of time it flags the request to be unable to service, hence the error.

Categories : PHP

YiiMongodbSuite count doesnt work
When setting criteria field as property it uses simple comparision (field == value). You should set this criteria by calling field, like that: $criteria->expiresAt('>', new MongoDate(time())); NOTE: Passing criteria to findAllByAttributes in wrong, it is not intended to work with EMongoCriteria, but with simple array. If you want to use criteria object pass it to findAll method.

Categories : PHP

Rendering doesnt work for a4j:outputPanel
The problem is, that the validation fails. This causes JSF to interrupt its lifecycle and jump from validation directly to rendering without changing anything in between. I don't know exactly when you set DataBean.kabalSectionBean.sendTypeIntEnabled but you can check that this value will not be set to true and thus your panel will not be changed. You have different options here. Either you can use the immediate="true" attribute to skip validation, or you can use execute="list of components you want to execute". Execute means, that the data will be sent to the backing bean, will be validated and the setXXX(...) methods will be called for this input. Here you would NOT list the required field and thus its validation won't be a problem. If you use execute="@none" it has the same effect lik

Categories : JSF

Cursor in PL/SQL, my procedure doesnt work
This single statement should work for your purpose UPDATE Empleado E SET E.Sueldo=E.Sueldo + E.Sueldo*0.05 WHERE MONTHS_BETWEEN(sysdate,E.fecha_contrato)>=5*12 AND E.id_Bodega IN (SELECT B.id_Bodega FROM Bodega B) Avoid using loops where they are not absolutely required.

Categories : Oracle

formidable doesnt work with express
The problem is caused by the parse function . To solve this you need to not use the bodyParser . So let's assume that i have a route /files which only recives a post request then you need to disable the bodyParser just for that route like so : app.use(function(req,res,next){ // important .. this will skip body parser to avoide issues with formidable if((req.path == '/file' ||req.path == '/file/') &&req.method === 'POST'){ // GET , PUT , DELETE ,etc... will have bodyParser ^^^^^^^^^^^^^^^^^^^^^ return next(); } express.bodyParser(req,res,next); next(); });

Categories : Node Js

Trying to switch 0 for 1 in the end of the function but it doesnt work
use like this var notClicked=1; function MediaDropDown() { var hello="hello"; var stopClicking="Stop Clicking Me"; if(notClicked < 1) { alert(notClicked); } if(notClicked > 0) { alert(notClicked); } ChangePolarity(); } function ChangePolarity() { if(notClicked<1) { notClicked=1; } if(notClicked>0) { notClicked=0; } }

Categories : Javascript

Very simple JavaScript that doesnt work
The access token is the key used to authenticates you when you are trying to use specific sevice, so it's completely reqired and you cannot use whatever you want. Read the documentation of service, there you will find all the information you need about the way it works.

Categories : PHP

My project doesnt' work in mikroC
Had to deal with this on a project of mine where the if statement would not branch correctly when using if without braces. The solution was using curly braces after if/else statements even if there was only one statement after it. It is a bug on the compiler. if(y<=0.8 && y>0.65) temp_value = temp_value+10; else if(y<=0.65 && y>0.6) temp_value = temp_value+17.5; becomes if(y<=0.8 && y>0.65){ temp_value = temp_value+10; } else if(y<=0.65 && y>0.6){ temp_value = temp_value+17.5; } If the program simply crashes, check the generated HEX/ASM.

Categories : Misc

DeflateStream doesnt work on MemoryStream?
Put your control WriteLine outside of the using. The buffers haven't been flushed yet. using (DeflateStream compressionStream = new DeflateStream(resultStream, CompressionLevel.Optimal)) { assignedUsersStream.CopyTo(compressionStream); //Console.WriteLine("Compressed from {0} to {1} bytes.", // assignedUsersStream.Length.ToString(), resultStream.Length.ToString()); } Console.WriteLine("Compressed from {0} to {1} bytes.", assignedUsersStream.Length, resultStream.ToArray().Length); And aside, you don't need all those ToString()s in a writeline. PS: All a BinaryFormatter does with a string is write the bytes with length prefix. If you don't need the prefix (my guess) it could become: string users = "";//Really long string goes here byte[] result; using (Mem

Categories : C#

Lua setfenv on threads doesnt seem to work
Each function has its own fenv. f1's fenv is _G, so when called (no matter which thread it is called in), it sets the global variable in _G. One option is to explicitly reference the thread environment from f1 e.g. function f1() local env = getfenv(0) env.my_var = 100 print('var set') end Another is to give each thread a private copy of f1. A third option is to create a proxy fenv (the same one for all threads & functions) with __index and __newindex metamethods that delegate to the current thread environment (i.e. getfenv(0).): -- Step 1: Create the shared proxy object that delegates to the -- current thread environment. local tlproxy = {} -- Always empty local tlproxy_mt = {} function tlproxy_mt:__index(k) return getfenv(0)[k] end function tlproxy_mt:__newindex(k, v)

Categories : C

JS doesnt work, even after using window.load
Your fiddle loads MooTools but your page doesn't. Change: var minutes = Number.floor( time / 60 ); to var minutes = Math.floor( time / 60 ); and use plain JS. jsFiddle example

Categories : Javascript

very simple preg_replace doesnt work
You should assign the result of preg_replace back to $value, like this: $value = preg_replace($patternHelperId, "mynewreplacement", $value); And, as a sidenote, d{1,} can be replaced with d+.

Categories : PHP

jquery accordion doesnt work
All jQuery UI plugins maintain state, such as the current option values, whether the plugin is enabled or disabled, which plugins have been initialized on the element, etc. This state persists from the time the plugin is instantiated on the element until it is destroyed, either explicitly by the user calling .pluginName('destroy') or by removing the element (or one of its ancestors) via .remove(). Because of this state management, you cannot instantiate the same plugin on an element multiple times, unless you destroy the plugin instance first. Please check following link for more inormation help link

Categories : PHP

Photoswipe doesnt work as expected
It seems that the scripts responsible for handling the carrousel aren't available or are interrupted in a different line of code somewere that has an error: if you would strip out jquery and the photoswipe js file reference from the header, the gallery would still have the same functionality as it has now due to css and markup. Maybe good to rule out the obvious: Did you check your links to the .js scripts? I see that you use some with a http reference and others locally, if one of them aren't found the script will not work. I'm quite new to java, my way of going at it would try to minimize the extra scripts around it and build it up from there.

Categories : Javascript

placeholder in IE doesnt work for passwordfor
I've seen the same behavior. Extremely frustrating stuff. I tried overriding the default template by adding a ~/Views/Shared/EditorTemplates/Password.cshtml template that looked like this: @Html.Password("", ViewData.TemplateInfo.FormattedModelValue, new { @class = "text-box single-line password", placeholder = ViewData.ModelMetadata.Watermark}) The above worked when I did it for a String type (~/Views/Shared/EditorTemplates/Password.cshtml) but not for password. So I downloaded the source for MVC4 and took a look. The only thing I could see that would make the password field behave in a manner different from the input (TextBoxFor) field is that the format data is passed as a null into the underlying HTML generation code (see System.Web.Mvc.Html.InputExtensions, line 233, Pas

Categories : Asp Net Mvc

clearInterval after 10sec doesnt work
clearInterval doesn't take second argument. And setTimeout is easier to wrap head around... A simple approach is to count how many enemies you've created so far and not run setTimeout when the limit is reached: var initEnemies = function () { var numEnemiesCreated = 0; function createAnotherEnemy() { var randomX = Math.floor(Math.random() * 190); var randomY = Math.floor(Math.random() * 50); enemy.push(new Enemy(randomX, randomY).create()); numEnemiesCreated += 1; if (numEnemiesCreated < 10) setTimeout(createAnotherEnemy, 1000); } createAnotherEnemy(); } And a version with for loop, it schedules function calls 0s, 1s, 2s, ... , 9s from now: var initEnemies = function () { function createEnemy() {

Categories : Misc

Loggin page doesnt work
You are using action as start.html page for your <form>. Because of that it is redirecting to start.html rather than start.php. Change this echo '<form action="start.html" method="post">'; to echo '<form action="start.php" method="post">'; OR quote by Prisoner echo '<form action="" method="post">';

Categories : PHP

querydef doesnt work in exportxml
Set qd = CurrentDb.QueryDefs("getReports") is expecting to find a saved query called getReports, which may not exist. You would need something like: sql = "SELECT * FROM Reports WHERE Reports.Ref_Q ='" & txtRef & "';" Set qd = CurrentDb.CreateQueryDef("getReports", sql) DB.QueryDefs.Refresh Application.ExportXML acExportQuery, getReports, strPath Or: sql = "SELECT * FROM Reports WHERE Reports.Ref_Q = [prm];" Set qd = CurrentDb.CreateQueryDef("getReports", sql) qd.Parameters("[prm]") = txtRef.Value DB.QueryDefs.Refresh Application.ExportXML acExportQuery, getReports, strPath DB.QueryDefs.Refresh is usually necessary, as without it, Access won't find your newly created query. Using parameters is preferable when you need to reuse the query lots of times with different paramete

Categories : SQL

mallet doesnt work even for help command
It seems that you are missing bsh.jar. Usually the MALLET package have a full set of jar files and bsh.jar should be one of them in the .mallet-2.0.7lib directory. If you cannot find it there, you can either download the package from the MALLET site again or google it. But the version of the jar file is important, make sure you are using the right version.

Categories : Misc

Datatable doesnt work in chrome
This is not a direct answer, but it might give you an idea how to start debugging. As JackPoint says, you obviously need to install Chrome, open the page there with Developer Tools running so that you can check the console log. I had the same symptoms in Chrome and was able to track down my bug so now Datatables are working. I think Chrome is very sensitive to errors and if there is a serious error embedded in your code, the whole fragile structure gets broken. In my case, I had to dig quite deep to find what was tripping Chrome up. I make an Ajax call to get the data for the datatable, then I populate a Knockout observableArray with that data. There is an HTML table on the page bound to this observableArray so it is automatically populated by Knockout after the Ajax returns the data. I ca

Categories : Jquery

why doesnt my post container work?
You haven't cleared #postcontainer - which is needed because it has floated descendants (which are taken out of the normal flow) - one remedy is to add overflow: hidden; so that it creates a new block formatting context for its floated descendants and height: auto; will then work like you'd expect. Remember that a floated element is not acknowledged by other block-level elements in the normal flow (read the above link if you don't understand), unless you clear it or provide a new block-formatting context for its parent. http://jsfiddle.net/ANhUn/1/

Categories : HTML

Passing string from one WinForm to another doesnt work
I am assuming that your LoginForm is your startup form, you are creating your MainMenu in your LoginForm then in your MainMenu's constructor you are creating another LoginForm it is a totally separate instance and your login information is not available. Try adding a method to your MainMenu and set it from your LoginForm instead. MainMenu public MainMenu() { InitializeComponent(); } public void SetLogin(string loginInfo) { MenuLbLoggedPerson.Text = loginInfo; } LoginForm MainMenu forma = new MainMenu(); forma.SetLogin(LoggedPerson.Name + " " + LoggedPerson.Surname); forma.Show(); this.Hide();

Categories : String



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