w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
While Sending Html Mails from my web application Recieved Mails contains Symbols like &ldquo,&rdquo, ‘
Check with another constructor for htmlView: ContentType mimeType = new System.Net.Mime.ContentType("text/html"); var htmlView = AlternateView.CreateAlternateViewFromString(bodyMessage, mimeType);

Categories : Asp Net Mvc

how to wakeup select() within timeout from another thread
I use an event object based on pipe(): IoEvent.h: #pragma once class IoEvent { protected: int m_pipe[2]; bool m_ownsFDs; public: IoEvent(); // Creates a user event IoEvent(int fd); // Create a file event IoEvent(const IoEvent &other); virtual ~IoEvent(); /** * Set the event to signalled state. */ void set(); /** * Reset the event from signalled state. */ void reset(); inline int fd() const { return m_pipe[0]; } }; IoEvent.cpp: #include "IoEvent.h" #include <string.h> #include <unistd.h> #include <errno.h> #include <fcntl.h> #include <poll.h> using namespace std; IoEvent::IoEvent() : m_ownsFDs(true) { if (pipe(m_pipe) < 0) throw

Categories : C++

How can I run my shell script once the device wakeup from suspend mode?
You could try run a watchdog like script, checking if the application is running in a loop and restarting it when needed. In standby the watchdog script will stop and on resume it will restart your application.

Categories : Linux

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

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

why css transition doesn't work
One simple error: -webkit-transition: all, 0.2s, ease-in; -moz-transition: all, 0.2s, ease-in; -o-transition: all, 0.2s, ease-in; transition: all, 0.2s, ease-in; Change to: -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; transition: all 0.2s ease-in; Demo: http://jsfiddle.net/X5UBF/1/ Transition values are not comma separated. They are a single declaration. If you want to declare multiple transitions, THEN you comma separate them. See W3C Docs or/and CSS3.info Value: <single-transition> [ ‘,’ <single-transition> ]* Where <single-transition> is: <single-transition> = <transition-property> <transition-duration> <transition-timing-function> <transition-delay> So, a comma

Categories : CSS

@XmlJavaTypeAdapter doesn't work
I got the root cause, as I added a customized MessageBodyReader, @Provider @Consumes("application/json") public class CustomJsonReader<T> implements MessageBodyReader<T> { @Override public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) { return true; } @Override public T readFrom(Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType, MultivaluedMap<String, String> httpHeaders, InputStream entityStream) throws IOException, WebApplicationException { /* * Copy the input stream to String. Do this however you like. Here I use * Commons IOUtils. */ StringWriter writer = new String

Categories : Java

runOnUiThread doesn't work
In your code you have: public void onClickStart (View view){ Thread timer = new Thread(){ runOnUiThread(new Runnable() { public void run() { ... } }); }; } The problem here is that you have the call runOnUiThread just inside a class - not in a method. In general you seem to be confused with threads, runnable and runOnUi. There's no point starting a new thread if you then want to invoke its run method on UI thread. The only thing you need to do on the UI thread is update the label text. Without going through your logic, one way of fixing the syntax errors would be: public void onClickStart (View view) { Thread timer = new Thread(){ public void run() { ... runOnUiThread(new Runnable() {

Categories : Java

conformsToProtocol doesn't work
Strangely, I recieved My hat respects the protocol My hat doesn't have price What's strange? You get back exactly what you did. Your class conforms to the protocol, but doesn't implement the price method. It is a way to block the compiler to compile your program if a protocol is not respected , not just to receive a warning message? I assume you wanted to ask if there is a way. Well, you can turn on the -Werr compiler switch which makes the compiler bail out if a warning is encountered, then possibly turn off warnings only for unimplemented methods in a protocol (google for the appropriate compiler flag).

Categories : Objective C

doesn't work with
Your <td> closes before the select does. The <select> should be nested inside your <td>. E.g. <td> <select name="portoptions[]" multiple="multiple"> <option value="TCP">TCP</option> <option value="UDP">UDP</option> <option value="protocol">Protocol</option> </select> </td>

Categories : HTML

clearTimeout doesn't work
Don't declare this variable again, just remove var; you are creating a local copy of this variable by using the var keyword. The statement creates the variable locally in that specific function. typingTimer = setTimeout(function(){

Categories : Javascript

SignedJwtAssertionCredentials doesn't work
For starters: 2 legged OAuth != OAuth2 This is not how you are supposed to use the Admin SDK API. Please read this to learn about OAuth2. 2 Legged OAuth auth is deprecated

Categories : Django

Spritebatch doesn't work
Move the part where you draw the pauseImage to the end of the code, so it's drawn last and on top of everything else. Then remove the first SBatch.End() from your code. foreach (EnemyUnit t in _enemyUnits) { t.AnimatedSprite.Draw(SBatch, t.Pos); if (_mouseState.LeftButton == ButtonState.Pressed && t.Area.Limit(_mouseState)) { float temp; temp = t.Pos.Y; t.Pos.Y -= 470; MouseAttack.Draw(SBatch, t.Pos); t.Pos.Y = temp; } } if (_isPaused) { SBatch.Draw(ResumeImage, new Vector2(500, 300), Color.White); SBatch.Draw(QuitImage,new Vector2(600,300),Color.White); } SBatch.End();

Categories : Misc

QT MultiPointTouchArea doesn't work
I tried your code as is on my Android tablet, and it works just fine. First finger controls moves the green rectangle and the second finger moves the yellow rectangle. I'm on Qt 5.4 (the latest as of now) Are you running this example on a tablet or a desktop computer? If you are on desktop using a regular mouse, it is only possible to move your green rectangle while pressing the left mouse button. touch requires a mouse press to work. What exactly are you trying to achieve? It looks like what you really want is a MouseArea with hoverEnabled set to true. Try this: import QtQuick 2.0 Rectangle { width: 400; height: 400 property point point1; property point point2; MouseArea { anchors.fill: parent hoverEnabled: true onPositionChanged: {

Categories : Qt

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 ~/.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

Key binding in Vim - doesn't work
Due to the way that the keyboard input is handled internally, this unfortunately isn't generally possible today, even in GVIM. Some key combinations, like Ctrl + non-alphabetic cannot be mapped, and Ctrl + letter vs. Ctrl + Shift + letter cannot be distinguished. (Unless your terminal sends a distinct termcap code for it, which most don't.) In insert or command-line mode, try typing the key combination. If nothing happens / is inserted, you cannot use that key combination. This is a known pain point, and the subject of various discussions on vim_dev and the #vim IRC channel.

Categories : Vim

The button doesn't work (GUI)
Your variable a is declared, but never initialized. It therefore has value null. If you then call a.toString(), like you do when setting the text, you get a NullPointerException. You should change the declaration to something like: Account a = new Account(50.0);

Categories : Java

XML namespace doesn't work
I don't see any namespaces in your XML. Anyhow the simplest/shortest way to accomplish what you want is to use XPath. Here's a solution: <?php $xml = <<<XML <?xml version="1.0" encoding="UTF-8"?> <products> <product ID="14"> <name>Productname</name> <price currency="EUR">9.95</price> <URL>http://www.google.com</URL> <images> <image>image.jpg</image> </images> <description><![CDATA[<p>long description</p>]]></description> <categories /> <properties> <property name="brand"> <value>Brandname</value> </property>

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

NSUserDefaults doesn't work
You are saving an empty NSMutableArray to NSUserDefaults. So of course the loaded array will be empty as well. Here is your saving code with comments: // overwrite zoznamFunkcii with empty array self.flipsideView.zoznamFunkcii = [[NSMutableArray alloc]init]; NSUserDefaults*defaults = [NSUserDefaults standardUserDefaults]; // save this empty array to nsuserdefaults [defaults setObject:self.flipsideView.zoznamFunkcii forKey:@"NSMutableArray"]; your saving code should probably look like this: - (void)applicationDidEnterBackground:(UIApplication *)application { NSUserDefaults*defaults = [NSUserDefaults standardUserDefaults]; [defaults setObject:self.flipsideView.zoznamFunkcii forKey:@"NSMutableArray"]; } and because NSUserDefault does not save mutable objects your restorati

Categories : IOS

Delegate doesn't work
I guess you for get to set the delegate inside your WVdALibraryDocumentViewController.m. In your viewDidLoad in WVdALibraryDocumentViewController: wVdADropboxViewController.delegate = self;

Categories : IOS

Why doesn't this.$el.append() work?
If you don't specify a dom element using el attribute, one will be created using tagName,id,className, and attributes from the view. In your case you don't specify an el attribute in your view so you create an element that looks like: <ol id='recent-station'></ol> You then append <li>foo</li> into it, but your view element is still not in the DOM. $('ol#recent-station') returns the dom element included in your html which is different than your view element, but has the same attributes. So, in your example you would need to specify an existing element by supplying an el attribute. var RecentStationView = Backbone.View.extend( { // remove tagName and id el:'#recent-station', /* rest of your code below */ A fiddle with the changes, http://jsfiddle.

Categories : Backbone Js

Why doesn't the following code work?
Your local variables are volatile. When you create an instance, it disappears when the variable goes out of scope. So, you may get the same address in the following iteration. In the seconds instance, you do need to malloc the space for presence and need to copy it using memcpy. Instead of using hashtable[key] = item, you should do memcpy ( hashtable[key], item, sizeof ( item ) );

Categories : C

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

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

C# LIKE query doesn't work
try this public List<Store> DoesStoreExist(string customerNumber, string zipCode) { StringBuilder sb = new StringBuilder(); sb.Append("SELECT id, Company, CustomerNumber, Name, Address, City, State, Zip, Phone, Latitude, Longitude, NumOfReferrals, IsNashville, PredsPromotionParticipant "); sb.Append("FROM dbo.Stores store "); sb.AppendFormat("WHERE store.CustomerNumber ='{0}' ", customerNumber); sb.AppendFormat("AND store.Zip like '{0}%' ", zipCode); sb.AppendFormat("AND store.Locator=1"); }

Categories : SQL

MySQL SHA() doesn't work
It's probably because of your password field type. Is your password field VARCHAR? How long is it? It seems to me that SHA is generating a string longer than it is allowed by the field so it gets cutoff when it is stored and it does match when you regenerate it to check. MySQL documentation says that you need 40 characters to store the output of SHA. Calculates an SHA-1 160-bit checksum for the string, as described in RFC 3174 (Secure Hash Algorithm). The value is returned as a string of 40 hex digits, or NULL if the argument was NULL. One of the possible uses for this function is as a hash key.

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

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

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

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