w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
It worked in jquery 1.3.0 but it will not work on 1.10.1
You should use $({some selector}) instead of $(""). You are not attaching a click handler to anything by using $(""). As others have said, using $("") on previous versions of jQuery defaulted the selector to document so it was the same as $(document). Either way, it is not a good practice to attach listeners to the document or the document body. Try attaching it to an element closer to the one that is being clicked (not the clicked elements themselves as this would mean you are multiplicating handlers that perform the same action instead of having only one). In this particular case I would add a wrapper to the shirt items and attach a delegated event listener to it, like so: <div id="shirts"> <div class="xsshirt"> <input id="size5" class="product-attr-size" na

Categories : Javascript

Why did this query which worked in MySQL4 not work in MySQL5?
As documented under JOIN Syntax:  Join Processing Changes in MySQL 5.0.12 [ deletia ] The following list provides more detail about several effects of current join processing versus join processing in older versions. The term “previously” means “prior to MySQL 5.0.12.” [ deletia ] Previously, the comma operator (,) and JOIN both had the same precedence, so the join expression t1, t2 JOIN t3 was interpreted as ((t1, t2) JOIN t3). Now JOIN has higher precedence, so the expression is interpreted as (t1, (t2 JOIN t3)). This change affects statements that use an ON clause, because that clause can refer only to columns in the operands of the join, and the change in precedence changes interpretation of what those operands are. Example: CREATE TABLE t1 (i1 INT, j1

Categories : Mysql

PHP code that worked on WAMP localhost but do not work on WebServer
Warning: mysql_real_escape_string(): Access denied for user 'apache'@'localhost' (using password: NO) in /home/httpd/vhosts/jaimevale.com/httpdocs/config/configurations.php on line 461 These are the lines causing your problem: $clientusername = stripslashes(mysqli_real_escape_string($UserName)); $clientpassword = stripslashes(mysqli_real_escape_string($Password)); You are attempting to use mysql_real_escape_string without having established an sql connection. Either establish a connection before making these calls or use an alternative to mysql_real_escape_string. Try calling $this->ConnectToMySQL(); at the beginning of your function. Edit: Changed mysql_real_escape_string to mysqli_real_escape_string

Categories : PHP

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

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

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

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

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

AsyncFileUploadWithAjaxToolKit not worked
You need to mark the ScriptManager with EnablePageMethods="true" attribute for this to work eg: <asp:ScriptManager ID="ScriptManager" runat="server" EnablePageMethods="true"> </asp:ScriptManager>

Categories : Asp Net

Need help modifying a regex that once worked
Okay, so first off the JSON you supplied had a few errors to it. Assuming this was from just creating the question and there's not a larger issue, the final result should look similar to this: [{"bandanaColor":"rgb(0,0,255)","ninja":"Leonardo - $0.99","data":[[1336485655241,0.99],[1336566333236,0.99],[1336679536073,0.99],[1336706394834,0.99],[1336774593068,0.99],[1366284992043,0.99]]},{"bandanaColor":"rgb(128,0,128)","ninja":"Donatello - $0.25","data":[[1361061084420,0.23],[1366102471587,0.25],[1366226367262,0.25],[1366284992043,0.25]]},{"bandanaColor":"rgb(255,0,0)","ninja":"Raphael - $0.15","data":[[1327305600000,0.15],[1365583220422,0.15],[1365669396241,0.15],[1365669396241,0.15],[1365753433493,0.15],[1366284992043,0.15]]},{"bandanaColor":"rgb(255,165,0)","ninja":"Michelangelo - $0.

Categories : C#

jquery ajax not worked on my pc
Ajax is working on your computer, but not with url begining with file:// because ajax needs to request the server to get a file. So, if you want to use ajax, you have to install a wamp server and move your files in.

Categories : Ajax

Why right click event not worked in WPF?
Deleting records on right click is not a good design and it leads users make more confuse the functionality. Still if you want to do something, then you can go for the PreviewMouseRightButtonDown event. Please see the below snippet ListBox1.PreviewMouseRightButtonDown += new MouseButtonEventHandler(ListBox1_MouseRightButtonDown); Change your XAML as follows <ListBox x:Name="listBox1" ItemsSource="{Binding}" Margin="0,131,0,59" ItemTemplateSelector="{StaticResource templateSelector}" SelectionMode="Single"> <ListBox.ItemContainerStyle> <Style TargetType="{x:Type ListBoxItem}"> <EventSetter Event="PreviewMouseRightButtonDown" Handler="ListBox1_PreviewM

Categories : C#

Url rewriting not worked properly
I recommend trying two things. First, try re-ordering the two rules so that the longer URL matches first. Second, make the shorter source URL more specific with the regex metacharacter '$': <rule source="Admission/Undergraduate/Selection-Criteria$" destination="HomePageContents/Selection_Criteria99.aspx" /> The '$' is end-of-line metacharacter. By using this, you instruct the rule engine that anything after /Selection-Criteria is not a match.

Categories : C#

jquery for loop not worked
Regarding this line: for ( var seconds = 10; i > 5; i-- ) { You need to decide whether you want your variable called seconds or i. I suspect what you meant to do was: for ( var seconds = 10; seconds > 5; seconds-- ) { (based on the fact that you're using seconds in the body but not i).

Categories : PHP

IProgressMonitor .worked(int) not Updating Progress Bar
If you call run() in UI Thread, you must set fork to be true. (That is, runnable instance should not be run in UI Thread.) UI thread handles UI event, like updating progress bar, redraw, etc. but if you run a time-consuming task in UI thread, the thread cannot handle the events because it is busy. (and event will be handled after the task completed)

Categories : Java

Strange behavior after fseek() has worked
A string needs to have space for a '' termination - you only allocated 8 bytes for a string with 8 characters (which therefore needs 9 bytes minimum). Depending on what follows in memory, you will get unpredictable results.

Categories : C

Windows mobile SDK 6.0 GPS sample not worked
I am not sure what comm the WM6 SDK sample uses, but there are three different comm possible with GPS: a) MS GPS Intermediate Driver (GPSID). If the device is setup correctly you do not need to change any port. b) Serial communication via a COMx: or similar named port (I saw also GPDx:). This direct communication needs a parsing of the raw NMEA data. Your program also needs to nkow the correct serial port baudrate setting etc Some GPS devices use a binary protocol and you may have to switch the GPS modul to character mode (the switch commend is GPS hardware dependent). c) Stream communication. You need to know the communication port (i.e. COM6: or GPD1:) and then use file streaming to read either RAW binary or character data from the GPS modul. As with b), your app hase to parse the NME

Categories : C#

Git Push worked, but files are not on server
The files are there, you just don't see them because they are embedded into the Git database. This is the difference between initializing a repository with --bare or without (see git-init man page and this page). On the server side you only see the content of your usual .git folder where you should see your project. Try to clone again the same repository in another directory, if you can retrieve your modifications then your setup is just working fine.

Categories : GIT

Struts2 not worked with annotated action
Remove @ResultPath(value = "/") and set the absolute path for location attribute. Also in the result annotation name = "success" is used by default, writing it isn't necessary. To use annotation configuration required to add struts2-convention plugin to the module dependencies. To execute action you need to enter url http://localhost:8080/client-list if your module is deployed to the root context, or add context path before the action name.

Categories : Java

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

Bundle items fail after having previously worked
First try this: Delete this file: ~/Library/Caches/com.macromates.TextMate/BundlesIndex.plist Then relaunch TextMate. This is a problem with the cache not properly updating when bundles are changed on disk (as they would have been recently, as a lot of bundles got updated) — so far though I only know it happens, not why it happens…' Source: Textmate Email List Then, if that doesn't work, try this: Textmate -> Preferences -> Bundles and uninstall and reinstall "Bundle Support" then quit and relaunch Textmate.

Categories : Misc

SQL query to calculate days worked per Month
You can use recursive CTE to extract all days from start to end for each JobID and then just group by month (and year I guess). ;WITH CTE_TotalDays AS ( SELECT [Start] AS DT, JobID FROM dbo.Jobs UNION ALL SELECT DATEADD(DD,1,c.DT), c.JobID FROM CTE_TotalDays c WHERE c.DT < (SELECT [End] FROM Jobs j2 WHERE j2.JobId = c.JobID) ) SELECT MONTH(DT) AS [Month] ,YEAR(DT) AS [Year] ,COUNT(*) AS [Days] FROM CTE_TotalDays GROUP BY MONTH(DT),YEAR(DT) OPTION (MAXRECURSION 0) SQLFiddle DEMO PS: There are 58 days in Jan in your example and not 57 ;)

Categories : SQL

functions in one by one order worked simultaneously in javascript
This is due to the way that setInterval works. Both functions set an interval that is to be called every millisecond (although it's highly likely it will actually be called less frequently). In your example, both functions schedule their update functions to be run using setInterval. The functions defined in the onload attribute of the body tag are called sequentially; however, the chunking of the animations into small pieces makes it look like they are run in parallel which is never the case due to JavaScript's inherent single-threaded nature. As a very broad rule of thumb, you can compare the way this works to a single-threaded process scheduler which alternates between several processes very quickly. Only one process runs at any given moment, but the frequent changing of the active pro

Categories : Javascript

How can I determine which employees worked per week in 2012?
I think this is (at least close to) what you are looking for. SELECT COUNT(DISTINCT e.employeeid) FROM employees e LEFT JOIN projectname p ON e.projectid = p.projectid WHERE p.name = 'Alaska' AND e.startdate <= '2012-01-01' AND e.enddate >= '2012-12-31' GROUP BY DATEPART(week, startdate)

Categories : Sql Server

cannot open connection in an r script that worked previously
You have to use an escape character for the whitespace in your filepath. I would try to write the whole thing like this: C:/Users/John Broussard/Dropbox/evtHandbookProject/figuresTables/figure3Data.csv EDIT: Since this was apparently not the source of the problem, maybe the file is opened in another process? What if you copy the file and try to open the copy?

Categories : R

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

Css translate doesn't work
In this selector .bulle_abo, .combulle you have two display properties: .bulle_abo, .combulle { ... display: block; ... display: none; … } Remove: display: none (you can't transition from none to block) Working Fiddle

Categories : CSS

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

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

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

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

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

PDO query doesn't work
Depending on the type of query you will want to fetch data after executing it. Take a look at fetch() and fetchAll() methods. $sth = $db->prepare($this->query); $sth->execute(); $result = $sth->fetchAll(); var_dump($result); or use a loop and fetch row by row while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { var_dump($row); } after your edit: Try to replace: $conn = new PDO("pgsql:host=$this->host port=$this->port dbname=$this->dbname", "$this->username", "$this->password"); with $this->db = new PDO("pgsql:host=$this->host port=$this->port dbname=$this->dbname", "$this->username", "$this->password"); and then call prepare method on it: $sth = $this->db->prepare($this->query); instead of $sth = $db->prepare($this->

Categories : PHP

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

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



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