w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
RESTORE DATABASE doesn't work, and doesn't report any error
I think restore sometimes doesn't happen because the database being replaced is in use at that time. Try adding this before RESTORE DATABASE command: ALTER DATABASE [TestMLS] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;

Categories : Sql Server

main program work good , but when put it into a function doesn't work pyQt
You aren't seeing any windows in the class based version because the function calls finalise and your PyQt objects are being garbage collected. In the simple first case you have, the variables containing your PyQt objects remain in scope for the duration. In this simple case, the easiest way to see this in action is store your PyQt objects in instance variables, ie. self.Frame and self.MainWindow to retain references to the object so that Python doesn't garbage collect them. Generally you would not work with PyQt in this fashion. You subclass the relevant object and do setup in the initialiser.

Categories : Python

Why shellcodes with jmp instruction work, and why doesn't the labels work inside a C wrapper?
The address of mesg can vary depending on how your program is laid out in memory. The following will hard-code a specific address and will not work reliably (or at all): mov ecx, mesg For reference, the first approach hard-codes the following address: mov ecx, 0x804807d The second approach does work because it figures out the address of mesg at runtime, using the return address of a call instruction. Put another way, the first version only works if loaded at a specific address whereas the second is position-independent. It is worth noting that the jmp and the call instructions that appear in the second version use relative addressing, meaning that the opcodes specify the distance to the target rather than the address of the target. This makes these instructions work regard

Categories : Assembly

Why doesn't a DOM2"click" event work, when it does work for "mouseover"?
As far as i can tell the link <a id="workID" href="#">WORK</a> is not bound to a click event handler. In the screenshot you can see that you have set several events, but on click is not set. In your main.js you are calling the function showWorkPane() but in this function you define no event handler for onClick: function showWorkPane() { var workID = document.getElementById("workID"); workID.addEventListener("mouseover", showWorkPaneHandler, false); // add an event handler for click } To address your question: Why doesn't a DOM2“click” event work, when it does work for “mouseover”? Well you have to bind both events (click and mouseover). And currently i am looking into your code and it looks like that the eventhandler onmouseout which fires hideWorkP

Categories : Javascript

.htaccess redirect doesn't work on first load, but does work on refresh
Your rule is fine. It redirects for me in every browser. What's probably happening is that when you click on the link, your browser brings up a cached copy of the PDF. But when you explicitly reload the page, it sends the request to the server instead of pulling up a cached copy of the page and you see the redirect. If you want to test it again, clear your chrome cache and hit the link again.

Categories : Htaccess

Same url, work like reference to style, but doesn't work like AJAX call
The simplest answer will be to use a local web server like WAMP(or IIS) if you are not already. the second answer is Chrome and Safari has a restriction on using ajax with local resources. That's why it's throwing an error like Origin null is not allowed by Access-Control-Allow-Origin. Solution: Use firefox or upload your data to a temporary server. If you still want to use Chrome, start it with the below option; --allow-file-access-from-files More info how to add the above parameter to your Chrome: Right click the Chrome icon on your task bar, right click the Google Chrome on the pop-up window and click properties and add the above parameter inside the Target textbox under Shortcut tab. It will like as below; C:UsersXXX_USERAppDataLocalGoogleChromeApplicationchrome.exe --al

Categories : CSS

Why does "except" work in filtering out IDs/rows, but "not in" doesn't work?
Would this be what you are trying to accomplish Select pm.patient_id from PatientMedication pm Where (pm.medicine_id = 11 or pm.medicine_id = 29) AND pm.start_date >= '2009-03-17'

Categories : Sql Server

Why doesn't CGContextShowGlyphsAtPositions() work, when CGContextShowGlyphsAtPoint() does work?
One possibility is this, from the CGContextShowGlyphsAtPositions document: The position of each glyph is specified in text space, and, as a consequence, is transformed through the text matrix to user space. The text matrix is a separate property of the context, distinct from the graphics state's current transformation matrix. It doesn't say that about CGContextShowGlyphsAtPoint: This function displays an array of glyphs at the specified position in the user space. (Emphasis added to both quotes.) So, your text matrix is not actually used when you show glyphs from a single point. But then, when you show glyphs at an array of positions, it is used, and you see the symptom of a wrong matrix. Specifically, your matrix to try to flip the text back the other way is wrong: it flips

Categories : Osx

Why doesn't my map work in IE8?
ArcGIS API for Javascript run at IE 8 and dojo run at IE 8 but there is a javascript code not run directly in IE 8 as Chrome and firefox you must write javascript code correctly to run at IE 8 and IE 8 can`t run this code : dojo.byId('details').innerHTML = content; this link help you to write correct code to run at IE 8 http://msdn.microsoft.com/en-us/library/ie/ms533897(v=vs.85).aspx

Categories : Javascript

Why doesn't ng-if work?
I confirmed the comment on angular's documentation about using the unstable branch by creating this fiddle: <!DOCTYPE html> <html class="no-js" ng-app> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0rc1/angular.min.js"></script> </head> <body> <p ng-if="1 == 0">True</p> {{1==0}} </html> here's the fiddle Running this fiddle results in the output you were expecting. Your code, but with the unstable build.

Categories : Angularjs

LESS really doesn't work
You can try the following workaround - start your .less file with valid CSS code, for example h1 {} and below put your LESS code: @color: #25d14d; h1 { color: @color; } I've faced the same problem and that helped me unexpectedly.

Categories : Visual Studio 2012

Why changes to /etc/limits doesn't work
Thanks everone for the help you did to me,The way I solved this problem is to set following defaults in /etc/systemd/system.conf DefaultLimitCORE=infinity DumpCore=yes This file was already there in my filesystem and it generates core dump for process started from login Shell as well as process started from systemd . Below given thread is quite useful and is source of reference for me. http://lists.freedesktop.org/archives/systemd-devel/2013-February/009174.html

Categories : Linux

session_start(); doesn't work?
This line in me.php... echo (headers_sent())?'sent':'not sent'; is breaking your session_start call. By outputing text you are forcing headers to be sent. replace with if (headers_sent()) die ("Headers have already been sent"); That way you are not sending the headers while testing to see if the headers are sent :)

Categories : PHP

Why doesn´t indexOf work?
Just because you have two Ticket objects that contain the exact same values, does not mean these two objects are equal. This is why the indexOf returns -1 every time -- because the ticketCollection observable array does NOT contain the exact item you are checking for. This SO question has a good explanation of JavaScript object equality: How do you determine equality for two JavaScript objects? Instead of using the indexOf on the array, you should instead check to see if any item in your ticketCollection matches BOTH the ticketName and the cost of the new, incoming Ticket. I'll add an example of what I mean: for(var i=0, len=self.ticketCollection().length; i < len; i++){ if ((t.ticketname() === ticketCollection()[i].ticketname()) && (t.cost() === ticketCollection()[i].cost()

Categories : Knockout Js

Using app name in angular js div doesn't work
When you assign a name to the ng-app directive, you essentially create a module with that name. In this module, you will then have to define your directives, services, filters and configurations. In your case, when you assigned the name "demo", you created a module named "demo". Function DemoController now is no longer part of this module. To use this function AND assign a module to your application, you need to use the following way of defining a controller: var app = angular.module("demo", []); app.controller('DemoController', [function () { //The body of demo controller }]); This way, the application knows which module's controller needs to be associated for the scope of the corresponding view. EDIT: The ng-app directive reference

Categories : Javascript

Why my BroadcastReceiver doesn't work?
Check out this tutorial about broadcast receivers. Update: I'm not sure you're using this tutorial, because there are lots of useful stuff in this tutorial, like this: @Override public void onResume() { super.onResume(); // Register mMessageReceiver to receive messages. LocalBroadcastManager.getInstance(this).registerReceiver(mMessageReceiver, new IntentFilter("my-event")); } // handler for received Intents for the "my-event" event private BroadcastReceiver mMessageReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { // Extract data included in the Intent String message = intent.getStringExtra("message"); Log.d("receiver", "Got message: " + message); } }; @Ove

Categories : Android

Why doesn't the die() function work?
That's because die() only terminates/ends the PHP script. From an AJAX point of view the request was successful. You should echo the info in the PHP page and then output the content of the response in your AJAX. You could also set the response header in your PHP Script to something other than 200/OK, such as 401/Unauthorized or 400/Bad Request. Basically all 400 and 500 status codes indicate error.

Categories : PHP

Mediaplayer sometimes doesn't work
It's difficult to know exactly what the problem is. A couple of things to try: Make sure you are calling .release() in onPause(). This just ensures resources are released appropriately. You will need to reset things in onResume(), etc. http://developer.android.com/reference/android/media/MediaPlayer.html#release() Unless you really need to manipulate the surface, consider using a VideoView. It's not as fully featured as the MediaPlayer object but takes away some of the hassle of dealing with a SurfaceView, and manages the state for you. http://developer.android.com/reference/android/widget/VideoView.html

Categories : Android

CloseOptionsMenu doesn't work?
If I got your question right.Each of your fragment should have enabled setHasOptionsMenu(true), if you want to have unique or action items at all per each.

Categories : Android

Why this qsort() doesn't work?
If this is all the code you have related to the qsort, it looks like you declared the comparePtr function pointer, but it's still not initialized; it's not pointing to your compare function (which is what I assume you wanted it to point to). After that, a few more things: 1) comparePtr has the correct types, but compare does not. It needs to take in two const void*, but you have two const void**. 2) Once you fix the types, you could just pass compare to qsort, instead of making a function pointer and passing that. 3) I'm not convinced the first argument to qsort is correct. You want to be passing in the pointer to the first element in the array, which ought to just be fileList (I'm assuming it points to the first string in your array). 4) The third argument isn't correct either. fileLis

Categories : C

To do list example doesn't work for me
first check whether myEditText.setOnKeyListener is getting fired when you pressing Enter. If yes then add these properties in your edittext xml ndroid:singleLine="true" android:lines="1" Hope it will work.

Categories : Java

Sometimes my PHP function doesn't work well
Why don't you just open the file and write it to the disk like so: file_put_contents($filename, fopen($url, 'r')); This will even do buffering for you so you shouldn't run into memory problems (since you are storing the whole image in memory before writing it to a file)

Categories : PHP

Why applyBindings doesn't work sometimes?
Ensure that you are applying your binding either in a script that is at the end of your DOM or when your DOM has been loaded. In jQuery, this can be done with the following: $(document).ready(function() { // apply bindings here }); Otherwise, script that is inline might be invoked before the HTML has been fully loaded into memory or even downloaded.

Categories : Javascript

why update doesn't work
The signature you should be using is update(query, update, callback) but you're passing a string for query, which doesn't mean anything to Mongo. You may want to look at the docs for an overview, but for this specific instance, it looks like you're trying to find the document where nombre is equal to the string at cliente1.nombre. The query for this is a dictionary { nombre: cliente1.nombre }, so that line should be db.clientes.update({nombre: cliente1.nombre}, {$set: {estado: "desconectado", nuevo: "no"}}, function(err) {

Categories : Node Js

Crontab doesn't work
You need to supply the absolute path to the file in your script. Change the line: $test_file = "../xml_crontab.txt"; to supply the absolute path to xml_crontab.txt. Remember that cron isn't running in the same environment as you are and the script wouldn't be able to locate the file with relative pathname.

Categories : PHP

Why doesn't MouseListener work?
Solutions: Don't use MouseListeners with JMenuItems! They're supposed to use ActionListeners. Read the tutorials when using a new tool. The Swing menu tutorial would already tell you all of this and how to properly use menus. Also, it is better to not have your GUI classes implement your listener interface as you're forcing one class to play too many rolls breaking the Cohesion OOP rule.

Categories : Java

Javascript doesn't work in IE8, but in IE9 and FF does
Try this, I thinks its issue with innerHTML function replace_html(el, html) { if( el ) { var oldEl = (typeof el === "string" ? document.getElementById(el) : el); var newEl = document.createElement(oldEl.nodeName); // Preserve any properties we care about (id and class in this example) newEl.id = oldEl.id; newEl.className = oldEl.className; //set the new HTML and insert back into the DOM newEl.innerHTML = html; if(oldEl.parentNode) oldEl.parentNode.replaceChild(newEl, oldEl); else oldEl.innerHTML = html; //return a reference to the new element in case we need it return newEl; } }; Reference: http://www.jonefox.com/blog/2009/05/21/internet-explorer-and-the-innerhtml-prope

Categories : Javascript

wx SplashScreen doesn't work
Note SplashScreen is not in wx.adv in wxpython 2.8.12 (and I am using it) This works (with my own image) import wx app = wx.App() aBitmap = wx.Image(name = "zimages/gato.jpg").ConvertToBitmap() splashStyle = wx.SPLASH_CENTRE_ON_SCREEN | wx.SPLASH_TIMEOUT splashDuration = 1000 splash = wx.SplashScreen(aBitmap, splashStyle, splashDuration, None) splash.Show() app.MainLoop() The only difference is the use of wx.Yield vs app.MainLoop. I am not sure about the purpose of Yield in wxpython 2.9 but note anyway that wx.Yield() has been deprecated

Categories : Python

Why the deserialization doesn't work?
http://social.msdn.microsoft.com/Forums/en-US/f5a5ff54-3743-400c-b14d-92dae95f3605/there-is-an-error-in-xml-document-0-0-error-while-xml-deserialization follow this link which has the exact reason and solution. "After you have written to the stream it is positioned at the end, after the XML you have written. If you then try to read from that same stream there is no root element to be found. So you need to reposition the stream (stream.Position = 0) if the stream supports that or you need to close the stream once you have written to it and open a new one for reading."

Categories : C#

JQuery doesn't work?
Hi opening the site above with Google Chrome, got this errors: Uncaught TypeError: Object [object Object] has no method 'inFieldLabels' scripts.min.js:200 and also this font Failed to load resource the server responded with a status of 404 (Not Found) http://alanbrandt.com/wp-content/themes/alanbrandt/fonts/bryantpro-medium-webfont.woff there are more conglicts between this plugin and other frameworks, for example: In-field labels plugin not working and also maybe relevant Using Google JSAPI breaks my infieldlabel javascript, why and how do I fix it? in the last its suggested the use of $j = jQuery.noConflict(); check what frameworks you have installed and any conflicts with this plugin hope it helps

Categories : Jquery

Why ~/.bash_profile doesn't work?
Use .bashrc instead of .bash_profile Here is some explanation: http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html

Categories : Bash

UIAlertView doesn't work
First, you should use elseif in your second condition, because you only want to fire the second if the first isn't true. Second, it seems to be the URL you're using in @"Mapes"... I tested this and that URL seems to be the culprit. When I changed that URL to another test URL, it worked.

Categories : Iphone

Why doesn't "history | vim" work?
By piping into vim, you are changing the standard input stream. Because vim is an interactive program, it requires the standard input to be the console. If you want to view in vim, you should tell it you are reading the file from stdin (by supplying the argument -): history | vim - Alternatively, you could just use more or less: history | more history | less These latter two are preferable. If you pipe into vim, it will see your "file" as having modifications, and so you can't quit with a straight :q command. Instead you have to force quit by :q!, which is a bit clunky. On the other hand, you can exit more or less just by typing q. Have a look at the man-page for these two programs. You'll use them a lot. As recommended by Russell Silva in the comments, you can open vim in

Categories : Linux

Why this code doesn't work?
arr is an array of 2 arrays of 2 ints. When it's used in an expression without being the subject of either the unary & or sizeof operators, it evaluates to a pointer to its first element. This is a "pointer to an array of 2 int", which is the type int (*)[2]. It is not a pointer to a pointer to int, which is the type int **. Furthermore, these types are not compatible, and you can't pass the former to a function expecting the latter. An int ** must be pointing at something that itself is a pointer. The pointer you are passing to display is pointing at an array, not a pointer.

Categories : C

fread doesn't work how it should
You are seeking to the start of the file, since you're setting the offset to 0. That doesn't sound like what you want to be doing, but on the other hand seeking to the end and then trying to read would also fail. I'm confused. :/ Could it be that you meant fwrite(), rather than `fread()? Not likely since the rest of the code prints the results after the I/O, which is logical for reading but not for writing. It would be helpful with more information, like your file is opened and what it does contain when you run the program.

Categories : C

removeExpiredCookie() doesn't work
CookieManager#.removeExpiredCookie() does the actual deletion on a separate thread. If you wait for a bit, or do a CookieSyncManager.sync() (which is also asynchronous), it might work. Another workaround suggests calling CookieManager.setCookie on all the cookies you want to remove, but that's only useful if you know the cookies and urls beforehand.

Categories : Android

isEqualToString doesn't work
I figured out the answer. Who knew it would take forever (like all day). So I guess XCode recognizes the points of ellipsis (...) and assigns them a value different than three periods. I removed the three periods and it works:

Categories : IOS

"height=100%" doesn't work in IE9
Remove the float property in .d. And use a table-cell for .d within the display:table-row that .c stands for. Works in IE9: http://jsfiddle.net/ZDY4P/45/ .d { background: orange; /* added a marker color */ display: table-cell; width: 100%; /* or 50% or auto for multiple columns... */ height: 100%; } If you are in need to have multiple columns of 100% height inside .c, add multiple D's as shown in the jsfiddle. To IE9's honour: I don't have a list, which kind of display nestings are allowed, but nesting display:block; float: left inside a display:table-row is maybe somewhat invalid, speaking old-HTML: <table> <tr> <div> <!-- expected: a <td> --> ..

Categories : CSS

Why doesn't my session work?
I don't see session_start() anywhere. Start new or resume existing session Be sure to add it before any output to the page (includes whitespace).

Categories : PHP

CSS doesn't work when I add slash (/) at the end of my url
Try this add code to your html head: <link rel="stylesheet" href="<?php echo site_url('css/style.css');?>" type="text/css"/> or <link rel="stylesheet" href="<?php echo base_url();?>css/style.css" type="text/css"/>

Categories : PHP



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