pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
39,808,850 | 0 | <p>Could be your result is already JSON parsed the </p> <pre><code> function getLocation(){ var name = $("#username").val(); console.log('getLocation()'); if(name != ''){ $.ajax({ type: 'GET', url: '../../' + name, async: true, success:function(data){ var marker = new L.marker(data.location); marker.addTo(map); $("#us... |
28,428,035 | 0 | Populate subdocuments in mongoose <p>I have this document:</p> <pre><code>[ { _id: "54d278b2b6d57eee9f2c6d02", title: "Piping", mainCategories: [ { title: "Shut valves", subCategories: [ { title: "Ball valve", userCodeSyntax: "AV2", typeComponents: [ "54d278b2b6d57eee9f2c6d00", "54d278b2b6d57eee9f2c6d01" ] } ] } ] } ] ... |
16,627,831 | 0 | <p>As in the comment: it is not <em>UTF8</em>, it is <em>WINDOWS-1256</em> encoding, so you can repair it on Linux using <code>iconv</code> command for file <code>test</code>: </p> <pre><code>jh@jh-aspire:4804~$ iconv -fwindows-1256 -tutf8 test هاـالحجرنالرفاعيمني </code></pre> <p>(I have no idea what it means as I do... |
26,701,215 | 0 | Download from gitHub <p>How I can download this file from GitHub?</p> <p><a href="https://github.com/TorgeirH90/Programming/tree/master/C%23/Paratroopers%20Mono/Paratroopers%20Mono" rel="nofollow">https://github.com/TorgeirH90/Programming/tree/master/C%23/Paratroopers%20Mono/Paratroopers%20Mono</a></p> |
24,412,431 | 0 | Side-effect of Perl's print function <p>I'm wondering why/how <code>print</code> in Perl can have a side-effect.</p> <pre><code>use Scalar::Util qw/looks_like_number/; my @A = (5, '2', 'aaa', 1, 'aab'); my @a = map { looks_like_number($_) } @A; print "1) @a\n"; # prints "4352 1 0 4352 0" print "A print with a side-effe... |
41,003,579 | 0 | <p>The most probable reason I can think of is that since <code>__dirname</code> never ends with a trailing slash your path will become something like <code>/path/to/projectpublic</code> instead of <code>/path/to/project/public</code>. To make sure your path is correctly formatted use <a href="https://nodejs.org/api/pa... |
28,464,823 | 0 | <p>This is a little hacky, but it works: Give the right container a margin-top of the height of the left container minus the height of the right container (in this case, 50px). Then give the left container a negative margin-bottom of the same amount (-50px). Here is it working: <a href="http://jsfiddle.net/zdL60bLu/9/... |
12,253,476 | 0 | <p>WebDAV connection is your way to go if you just want to use Dreamweaver and fill in the Host, username and password. However WebDav works perfectly fine on a Linux apache environment, But installing it on IIS is a bit harder.</p> <p><img src="https://i.stack.imgur.com/Fyjus.png" alt="WebDAV"></p> <p><em>Take a look... |
37,436,113 | 0 | <p>It may be because there might be one more button with same property , so try to find element uniquely then try. Ex: Two button having same attributes at that time webdriver will fail so user in case of multiple element having same property try to find element uniquely with relative xpath</p> |
32,568,347 | 0 | <p>I think this package is broken... i don't see an <a href="http://docs.meteor.com/#/full/pack_export" rel="nofollow">api.export</a> of the Soap object for you to use in <a href="https://github.com/zardak/meteor-soap/blob/master/package.js" rel="nofollow">package.js</a>. Maybe you could submit a fix to the git repo a... |
36,629,637 | 0 | how to fetch records equal to pageSize while using queryForCursor in SolrTemplate <p>I want to fetch records from solr using cursors as I have large resultset size. I m using SolrTemplate.queryForCursor() method by passing query object to this. But the resultCursor which is of type Cursor has all data in it. I want to ... |
19,026,042 | 0 | <ol> <li>There is no need that an application defines a window handle when using OpenClipboard. So you have to be aware that there are enough chances that you will never get a result.</li> <li>If it is a child window that owns the clipboard you may walk back the stack of windows always using GetParent until there is n... |
10,796,149 | 0 | <p>You need a reference to your instance of GUI1 in GUI2. So maybe add a private variable <code>private GUI1 firstGUI</code> in your GUI2 class. Then write a setter method <code>public void setGUI1(GUI1 myFirstGUI){ this.firstGUI = myFirstGUI; }</code>.</p> <p>Then you should set the GUI1 variable from the outside wit... |
31,429,463 | 0 | <p>Got help from our friends at TI E2E forums on this topic.</p> <p>The reason I was unable to see the Configure and Associate menu options was due to the selected perspective. Code Composer 5 uses TI's default CCS Edit perspective which hides the expected menu options. If you change to the default Eclipse C/C++ persp... |
19,323,654 | 0 | Why does my alert dialog not appear? <p>Can sombody please help me? When I click on the button nothing happens. I'm very new to android-programming so please answer as i can understand.</p> <p>(Don't wonder about my variables)</p> <p>Thank you</p> <pre><code>@Override public void onClick(View v) { Button preis = (Butto... |
357,351 | 0 | <p>A try/catch block like this...</p> <pre><code>BEGIN TRY -- Your Code Goes Here -- END TRY BEGIN CATCH SELECT ERROR_NUMBER() AS ErrorNumber, ERROR_SEVERITY() AS ErrorSeverity, ERROR_STATE() AS ErrorState, ERROR_PROCEDURE() AS ErrorProcedure, ERROR_LINE() AS ErrorLine, ERROR_MESSAGE() AS ErrorMessage END CATCH </code... |
40,210,616 | 0 | <p>Ok how about this. It's a mashup between reshape and base R.</p> <p>I used your dataset once you posted it. Thanks for providing it.</p> <pre><code>data <- structure(list(Water.Year = structure(1:6, .Label = c("1953-1954", "1954-1955", "1955-1956", "1956-1957", "1957-1958", "1958-1959", "1959-1960", "1960-1961",... |
1,425,492 | 0 | Help with setting up a Database <p>My site is going to have many products available, but they'll be categorised into completely different sites (domains).</p> <p>My question is, am I better off lumping all products into one database and using an ID to distinguish between the sites, or should I set up a table and /or DB... |
31,417,031 | 0 | <p>As shown by others awk,sed or paste are the best ways of doing this, but.. Lets do some more!</p> <p>bash loop:</p> <pre><code>cat file | while read line ; do echo "$line;$line"; done </code></pre> <p>perl:</p> <pre><code>perl -pe 's/(.*)/$1;$1/' file </code></pre> <p>ruby:</p> <pre><code>ruby -ne 'puts $_.chomp + ... |
5,740,983 | 0 | <p>What about setuping a private branch, working on it, hijacking there files and then merging your private branch on the main branch?</p> |
9,853,197 | 0 | JDBC batch query for high performance <p>I want to do batch query DB for high performance, example sql to query based on different customer_id:</p> <pre><code>select order_id, cost from customer c join order o using(id) where c.id = ... order by </code></pre> <p>I'm not sure how to do it using JDBC statement. I know I ... |
10,797,974 | 0 | <p>the image you want to draw is from a different domain than yours, so a security error is thrown. </p> <p>Please see the following topic for further explainations <a href="http://stackoverflow.com/questions/2390232/why-does-canvas-todataurl-throw-a-security-exception">Why does canvas.toDataURL() throw a security exc... |
19,044,216 | 0 | How to add data to the Expandable listview with child having multiple views <p>I referred this tutorial for expandable listview</p> <p><a href="http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/" rel="nofollow">http://www.androidhive.info/2013/07/android-expandable-list-view-tutorial/</a></p> <p... |
21,541,069 | 0 | <p>What you are trying to do here is to group a shared DataSource and have it only affect one widget. Furthermore, Kendo UI will return a grouped object when you group it. The Pie chart is not interested in these objects, but rather the count of the items that each of these group objects contains. We just need to get ... |
32,373,240 | 0 | <p>I tried to unsubscribe endpoint from topic by following python code (use boto):</p> <pre><code>def _unsubscribe_from_topic(topic_arn, endpoint): conn = connect_to_region('your_region_name','AWS_ACCESS_KEY', 'AWS_SECRET_KEY') r = conn.get_all_subscriptions_by_topic(topic_arn) for i in r.get('ListSubscriptionsByTopic... |
35,038,315 | 0 | <p>If you want to still break from <code>if</code>, you can use while(true)</p> <p>Ex.</p> <pre><code>$count = 0; if($a==$b){ while(true){ if($b==$c){ $count = $count + 3; break; // By this break you will be going out of while loop and execute remaining code of $count++. } $count = $count + 5; // break; } $count++; } ... |
38,715,869 | 0 | <p><code>getServicelocator()</code> makes error. So it needs alternative way. And extends <code>AbstractTableGateway</code> or <code>ServiceLocatorAwareInterface</code> have errors.</p> <p>Factory implementation will help Controller to get objects.</p> <p>*User sample code will be similar to album.</p> <p>1) factory c... |
3,120,734 | 0 | <p>To the extent that there is a limit on the size of an SQL statement, then <strong>Yes</strong>: you cannot create an SQL statement that joins so many columns that the joining condition does not fit inside the limit on an SQL statement.</p> <p>Otherwise - and in practice - <strong>No</strong>. You will run out of th... |
8,049,706 | 0 | <p>yes, it's suppose to be:</p> <pre><code>public IDictionary<string, string> loopThroughNotificationCountQueries() { } </code></pre> <p>You can only itterate through objects of <code>IEnumerable<T></code></p> <p>so if for some reason you cannot change <code>loopThroughNotificationCountQueries</code>, cast... |
7,045,593 | 0 | <p>Try:</p> <pre><code>$(".blah").find($("input:text")).each(function(){ alert("Value inside "+$(this).attr("name")+" is #### " + this.value); }); </code></pre> |
29,682,187 | 0 | Ruby on Rails find records through last association records <p>User <code>has_many</code> operations. How I can find <code>Users</code> and what is the best way to find where: <code>User.operations.last.exp_date</code> > <code>CurrentDate</code>?</p> |
25,356,528 | 0 | <p>You Should check the .Net Framework version in the Property of the Project.</p> |
34,674,321 | 0 | How can I use ProjectLocker instead of Git in laravel? <p>Is there any setting available in Laravel to use <a href="http://projectlocker.com/" rel="nofollow">ProjectLocker</a> or other repository ?</p> |
491,951 | 0 | <p>Host a Web service that logs the IP address of the requestor. Call the Web service in your application at startup. Location is tied to IP address and you could probably figure it out from there. :)</p> |
2,425,626 | 0 | <p>One possiblitiy is to construct your colours from <a href="http://stackoverflow.com/questions/2942/hsl-in-net">HSL or HSV</a>, keeping the SL/SV part fixed you can divide the entire hue range into the number of pie slices you have, this should ensure they are reasonably visually seperated. different SL/SV values wi... |
31,874,331 | 0 | Multiple java versions installed and java was started but returned exit code=13 <p>I am not able to start eclipse on Windows 7. It was working fine yesterday. Here is the screenshot of error when I start eclipse:</p> <p><a href="https://i.stack.imgur.com/kj8hw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.im... |
2,349,930 | 0 | <p>You don't need to use <code>awk</code> if all you want to do is this. :) <strong>Also, writing to a file as you're reading from it, in the way that you did, will lead to data loss or corruption</strong>, try not to do it.</p> <pre><code>for file in *.php ; do # or, to do this to all php files recursively: # find . ... |
23,161,405 | 0 | <p>You forgot the curly braces for the else-statement of your "recursive case" ...</p> <p>This does work:</p> <pre><code>private static void combos(String counter) { if (counter.length() == userinput) //base case System.out.println(counter); else { combos(counter + "A"); combos(counter + "B"); combos(counter + "C"); }... |
7,702,596 | 0 | <p>You can try the default favicon location - i.e. place <code>favicon.ico</code> on the root of server (which is normally the ROOT application). In production you will almost always be running as ROOT. But I don't know if browsers will recognize that - if they don't, it means you can't do it. PDFs are read in the bro... |
8,774,120 | 0 | How to center the core plot graph on the view controller? <p>I am working on core-plot. I want to make the graph which drawn in the screen need to be centered. when the application get loaded its showing from the bottom the graph. I want to make the entire view visible from center has shown in below figure.</p> <p>@Tha... |
38,809,904 | 0 | Web scraping - selection of a table <p>I'm trying to extract <a href="http://finance.yahoo.com/quote/%5EFTSE/history?period1=946684800&period2=1470441600&interval=1mo&filter=history&frequency=1mo" rel="nofollow">the table of historical data</a> from Yahoo Finance website. </p> <p>First, by inspecting th... |
8,417,094 | 0 | <pre><code>from product in context.Products where product.ProductCategory_Id == productcatid group product by product.Attribute_1 into g select g; </code></pre> |
3,337,441 | 0 | MySQL - Searching in a multiple value field <p>In my database table I have the following fields:</p> <p>Table Supplier:</p> <ul> <li>id</li> <li>name</li> <li>vehicles</li> </ul> <p>A supplier can have multiple vehicles. The field 'vehicles' will store multiple values. At the moment I am delimiting the values on a 'pip... |
13,455,410 | 0 | <p>In simple terms </p> <p><em><strong>executeAsyncScript</em></strong> -> This method doesn't block the execution of next line of code...till execution of this method is completed. This method will execute as well as next line of code will be executed...asynchronously. (without blocking each other)</p> <p><em><strong... |
35,804,366 | 0 | <p>No. Generally, MRFs can represent arbitrary Gibbs distributions (see the <a href="https://en.wikipedia.org/wiki/Hammersley%E2%80%93Clifford_theorem" rel="nofollow">Hammersley-Clifford theorem</a>). This is broad class but doesn't encompass everything.</p> <p>The <em>pairwise</em> constraint is further limiting. So ... |
10,702,766 | 0 | <p>This is, at it has been stated, not the optimal way to load resources, but if you absolutely must have a <code>java.io.File</code> reference, then try following:</p> <pre><code> URL url = null; try { URL baseUrl = YourClass.class.getResource("."); if (baseUrl != null) { url = new URL(baseUrl, "yourfilename.ext"); }... |
29,743,366 | 0 | <p>You should try following</p> <pre><code>var backbone_historySpy=spyOn(Backbone,'history.navigate'); describe('testing function action:',function(){ it('expect Backbone.history.navigate() to be called',function(){ module.action(); expect(backbone_historySpy).toHaveBeenCalled(); }); }); </code></pre> <p>It should wor... |
24,892,194 | 0 | <p>Using the <code>foo[]</code> naming hack in PHP causes <code>foo</code> to be an array in $_POST. Since you're just directly copying that array to a variable:</p> <pre><code>$foo = $_POST['foo']; </code></pre> <p>and then embedding that var in your email, you'll just get</p> <pre><code>Se entero: Array </code></pre... |
11,098,489 | 0 | <p>Something that you could do is to send 2 parameters to the url : </p> <ul> <li>fileName = the filename</li> <li>fileContent = content of file encoded in base64</li> </ul> <p>In your asp file, just get the 2 parameters content, make a base 64 decode, and write it in a file named as the filename parameter ...</p> |
15,699,836 | 1 | makedirs error: can GAE Python create new directories (folders) or not? <p>I have seen a number of questions relating to writing files & creating new directories using Python and GAE, but a number of them conclude (not only on SO) by saying that Python <strong>cannot</strong> write files or create new directories. ... |
26,798,175 | 0 | Ball inside the pocket hole. WPF <p>My Code is giving me a NaN value when I tried to test its return value. the code is here C#:</p> <pre><code>var hx1 = Canvas.GetLeft(top); var hy1 = Canvas.GetTop(top); Rect h1 = new Rect(hx1, hy1, top.ActualWidth, top.ActualHeight); Console.WriteLine(h1); </code></pre> <p>XAML</p> <... |
33,726,965 | 0 | <p>The context of a process (psw, state of registers,pc...) is saved in the PCB of the process, in the kernel space of memory, not in the stack. Yes, there is one stack for each user process and more, one stack for each thread in the user space memory. In the kernel, the data structures are shared by the multiples cod... |
11,675,476 | 0 | <p>You can solve this problem easily by removing a couple of texts.</p> <p>Because there are a wrong annotation in "js/jquery.wt-rotator.js".</p> <p>From :</p> <pre><code>//Line: 1842 //set delay //this._delay = this._$items[i].data("delay"); </code></pre> <p>To : </p> <pre><code>//set delay this._delay = this._$items... |
34,606,665 | 0 | A Java servlet for uploading file via http PUT <p>We have to upload file via http PUT due to some limitation on the client-side(No POST method).</p> <p>There has a thread talking about this on stackoverflow as below</p> <p><a href="http://stackoverflow.com/questions/18728100/file-upload-via-http-put-request">File Uploa... |
33,824,501 | 0 | <p>Test cases are starts with the method name -(void)testLogin, those methods are mentioned in diamond , we can run that test individully or overall test cases can be run by choosing the target as test. This can be achieved by long press on the play button, which will provide you with 3 option, in that choose test. Th... |
36,078,935 | 0 | how to extends a module in typescript <p>I'm still new to typescript, so any direction would be appreciated. Thanks!</p> <p>file A:</p> <pre><code> module SoundManager { export class SoundManager { } export function init($s: string):void { } } </code></pre> <p>file B:</p> <pre><code>module SoundM { class SoundM extends... |
37,144,616 | 0 | <p>You need to define in your AppContext for the unit tests, your testing bean:</p> <pre><code>IMonitoringWidgetAggregator aggregator = (IMonitoringWidgetAggregator)AppContext.getBean( ISO + AGGREGATOR_HEALTH_PREFIX ); </code></pre> <p>You do have access to the aggregator, which mean that for example if you use a CDI/... |
5,950,564 | 0 | Problem with IEnumerable in Reflection <blockquote> <p><strong>Possible Duplicates:</strong><br> <a href="http://stackoverflow.com/questions/5949688/how-to-iterate-the-list-in-reflection">How to iterate the List in Reflection</a><br> <a href="http://stackoverflow.com/questions/5950222/problem-with-ienumerable-in-reflec... |
5,595,919 | 0 | <p>I'm not 100% certain about objective C, but in other languages, it's two boolean operators next to each other. It's typically used to ensure that falsy or trusy statements are converted to proper booleans (e.g. true or false). Since objective C is derived from C, there's a good chance that this is also what it's us... |
3,744,405 | 0 | <p>Well, for starters, you should not be writing anything to a folder in the Program Files directory. This is bad and will fail on Vista, Windows 7, or Windows Server 2008 and above.</p> <p>Secondly, your code isn't actually specifying what you think it is. The service's "current directory" is not it's program files d... |
31,272,891 | 0 | <p>Based on the error message you print, I'm guessing your problem is that you want to give the user a chance to try again to enter a number, but after one failure, it continuously fails no matter what you enter. If that's the case, replace your <code>break</code> with <code>cin.clear()</code>. That will tell the stre... |
35,521,991 | 0 | <p>I finally found the solution using the <code>ScriptRunner</code> class you can find on this link: <strong><a href="https://github.com/BenoitDuffez/ScriptRunner" rel="nofollow">https://github.com/BenoitDuffez/ScriptRunner</a></strong>.</p> <p>You can use it as follows: </p> <pre><code>Connection connection = DriverM... |
30,750,580 | 0 | <p>I just came across this question looking to check if a specific Rails route was already present:</p> <pre><code>route = "mount Blorgh::Engine" File.open('config/routes.rb').each_line.any? {|line| line[/#{route}/] } </code></pre> |
7,664,927 | 0 | <p>I use tooltipsy, this is an EXCELLENT tooltip program. You can set it to do pretty much anything you want. If you want custom CSS, okay, if you want to set your own show and hide events, okay, you can change what the tooltip aligns to, the delay until it shows, you can do whatever you want. Tootipsy is the best one... |
33,077,123 | 0 | Floating Action Button diasappears under SECOND Snackbar <p>I'm using a CoordinatorLayout to keep my Floating Action Button above the Snackbar, which works great. ...But only for the first Snackbar. When a second one is created, while the first one is still there, the FAB slides under it.</p> <p>I'm using this in a Rec... |
29,006,359 | 0 | NHibernate hql tuple result <pre><code>hql = "select f, b from Foo f, Bar b" var resultList = session.CreateQuery(hql).List<object[]>(); </code></pre> <p>result list item is an array where [0] is of type Foo and [1] id of Type Bar</p> <p>Is there a way to use Tuple<Foo,Bar> (or other generic class ) as gene... |
9,559,534 | 0 | Is there a hash function for binary data which produces closer hashes when the data is more similar? <p>I'm looking for something like a hash function but for which it's output is closer the closer two different inputs are?</p> <p>Something like:</p> <pre><code>f(1010101) = 0 #original hash f(1010111) = 1 #very close t... |
18,117,059 | 0 | <p>You are doing integer division! Since <code>totaloccupied</code> is smaller than <code>totaldrive</code>, the division of both gives the answer <code>0</code>. You should convert to double first:</p> <pre><code>double percentageUsed = 100.0 * totalOccupied / totalDrive; </code></pre> <p>Note that adding the decimal... |
40,510,085 | 0 | <p>You could use a sparse block matrix A which stores the (5, 2) entries of T_Arm on its diagonal, and solve AX = b where b is the vector composed of stacked entries of <code>Erg</code>. Then solve the system with scipy.sparse.linalg.lsqr(A, b).</p> <p>To construct A and b I use n=3 for visualisation purposes:</p> <pr... |
1,435,792 | 0 | <p>[Edit: I was mistaken. The only way this will work is by using Selection. The following code will work: </p> <pre><code>Sheet1.Shapes("Group 1").GroupItems("Spinner 1").Select Selection.Max = 20 </code></pre> <p>Obviously this is not ideal. Any further assistance would be grand.]</p> <p>After a fair bit of cajoling... |
28,060,954 | 0 | <p>you could try something like </p> <pre><code>B.x.where(B.x.str.contains(A.x), B.index, axis=index) #this would give you the ones that don't match B.x.where(B.x.str.match(A.x, as_indexer=True), B.index, axis=index) #this would also give you the one's that don't match. You could see if you can use the "^" operator us... |
14,029,580 | 0 | <p>You are using static method for custom sorting, so you can set some static properties in this class before <code>usort</code></p> <pre><code>class Catalogs_model{ public static $usort_criteria = array(); public static function multi_compare($a,$b){ foreach(self::$usort_criteria as $what => $order){ if($a[$what] ... |
18,462,920 | 0 | <pre><code>exec 3>&1 1>>${LOG_FILE} 2>&1 </code></pre> <p>would send stdout and stderr output into the log file, but would also leave you with fd 3 connected to the console, so you can do</p> <pre><code>echo "Some console message" 1>&3 </code></pre> <p>to write a message just to the console,... |
24,979,288 | 0 | Colliders in unity behaving the way they, as I think, shouldn't <p>I am learning to work with unity now and I noticed one error. I am working with 2D and have two box colliders. </p> <p>One of them is: </p> <pre><code>Size : X = 8, Y = 0.3 Center: X = 0, Y = 4.9 </code></pre> <p>The Other one is </p> <pre><code>Size : ... |
39,420,327 | 0 | Passing parameters data to controller with Angular ui router state <p>I was using $httpBackend and the way I followed code examples I ended up feeling very trapped and cornered ... I had no idea how to make additional ajax calls from my controller as it httpBackend shut down further request.</p> <p>Anyways. I'm using t... |
27,035,179 | 0 | Lock and unlock resources with single command <p>I am working with threads and that's the reason I use mutexes for locking shared resources. The base usage of locking is to put resources within Lock/unlock block.</p> <pre><code>procedure RefreshData; begin DataLock; GetData; GetSettings; CheckValues; ... DataUnlock; en... |
7,490,293 | 0 | <p>The code seems to be an attempt to implement a connect middleware to serve static files. Did you try to use standard connect middleware for this purpose? Here is an example:</p> <pre><code>var connect = require('connect') var server = connect.createServer( connect.logger() , connect.static(__dirname + '/public') ) ... |
24,202,717 | 0 | Optimize mysql multiple left joins <p>I have a query like this: </p> <pre class="lang-sql prettyprint-override"><code>SELECT SUM(c.cantitate) AS num, p.id AS pid, p.titlu AS titlu, p.alias AS alias, p.gramaj AS gramaj, p.prettotal AS prettotal, p.pretunitar AS pretunitar, p.pretredus AS pretredus, p.stoc AS stoc, p.can... |
23,193,621 | 0 | <pre><code> $(".button").click(function(e) { $('#container').prepend("<img src='http://24.media.tumblr.com/tumblr_ma4oz49mAq1r2cisro1_1280.png' id='test'>"); $('#test').load(function(){ alert('Finished Loading!'); }); e.preventDefault(); }); </code></pre> |
39,794,735 | 0 | How create table use j2html? <p>I get acquainted with j2html and I try a make table, but have some problems:</p> <pre><code> main().with( table( tr( td().with( img().withSrc(imagePath+photo) ) td().with( span(name) ), td().with( span(String.valueOf(quantity)) ) </code></pre> <p>after img().withSrc(imagePath+photo) I se... |
12,695,424 | 0 | Window.location takes me to new page even when current form is not submitted completely. <p>I am trying to redirect to different page after current form has been submitted but as it turns out, using <code>window.location</code> am diverted to new page very quickly and seems like my current form is not at all submitted.... |
1,228,098 | 0 | Toggling link text when navigating between pages based on selected stylesheet <p>I have installed a script on my website that allows for a low contrast setting and a high contrast setting, as my site will be used by sight impaired persons. The script works perfectly. The only problem is when a visitor visits multiple p... |
2,430,201 | 0 | <p>There aren't any length limits on <code>stdin</code>. If you can't receive large amounts of data it's your code that creates the problems.</p> |
28,995,302 | 0 | <p>I don't understand what exactly you need, </p> <p>But it seems that you mixed types INT and DATE.</p> <p>So if your <code>in_date</code> field has type <strong>DATE</strong></p> <pre><code>select cust_no, cust_name, sum(bvtotal) as Amount from sales_history_header where cust_no is not null and number is not null an... |
1,334,529 | 0 | What could cause "PROCEDURE schema.identity does not exist" using MySQL and Hibernate? <p>Using Java, Hibernate, and MySQL I persist instances of a class like this using the Hibernate support from Spring.</p> <pre><code>@Entity public class MyEntity implements Serializable { private Long id; @Id @GeneratedValue(strateg... |
21,993,202 | 0 | <p>Have a try and add this header:</p> <pre><code>Disposition-Notification-To: "User" <user@user.com> </code></pre> <p>The reader may need to confirm that you get a reply. Also adding html content served by your server can be an option to recognize that the mail is read.</p> <p>You should be able to do this with... |
22,427,926 | 0 | How to use maven3 with java7 on OSX Mavericks? <p>I installed maven3 on Mavericks by Macports. It's working well but using java 1.6. How could I change to use java 7 instead?</p> <h3>Maven3 is installed but using java 1.6:</h3> <pre><code>$ mvn -version Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 201... |
38,511,808 | 0 | Found Malicious PHP code on server - can anyone advise on what this code was doing? <p>I run a website for a nonprofit - we piggy back on a PHPbb3 system hosted on Godaddy. Started having rolling connection issues. Found several "odd" files in root directory that I know were not put there by myself. Can anyone take a l... |
20,183,602 | 0 | Codeigniter on Ubuntu no welcome message <p>I am trying to run CodeIgniter (2.14) on Ubuntu 13.10. I have put the files in "var/www/CodeIgniter" but when I enter the directory from the browser it does not show any welcome message as it did previously when working with CodeIgniter on Microsoft Windows 7. I have verified... |
16,445,753 | 0 | How to deploy an asp.net mvc 4 application with database? <p>I'm new to <code>asp.net</code> and want to do the following:</p> <p>I have an <code>asp.net mvc 4</code> website that uses a local database (mdf). I want to install that website on a windows 2012 server (amazon ec2).</p> <p>My Questions:</p> <ul> <li>How do ... |
11,698,767 | 0 | <p>The correct way to do this is to access</p> <pre><code>$request->request->get('name_of_the_textarea') </code></pre> <p>in the controller. You might also consider using the <a href="http://symfony.com/doc/current/book/forms.html" rel="nofollow">Form Component</a> for that purpose.</p> |
36,238,444 | 0 | <p>From more exchange it turns out that some detail of the redundant specifications caused a mismatch.</p> <p>Tray the following replacement. It will work:</p> <pre><code>preg_match('#MonetaryCode">USD.*MonetaryBuy">([0-9,.]*)<.*MonetarySell">([0-9,.]*)<#Uis', $content, $USDmatch); preg_match('#Monetary... |
9,716,551 | 0 | <p>You can use "M-x replace-string", It means that you need press <kbd>Alt</kbd> + <kbd>x</kbd>, then input "replace-string" then <kbd>Enter</kbd>. Now, you can type in what to search. After an other <kbd>Enter</kbd>, you can type in what it should be replaced. Or you can set a hotkey in your dotemacs file. like:</p> ... |
10,590,488 | 0 | <p>Use <a href="http://www.ruby-doc.org/core-1.9.3/Array.html#method-i-map" rel="nofollow"><code>Array#map</code></a>:</p> <pre><code>nas.location.walledgardens.map(&:url).join ',' </code></pre> |
18,630,753 | 0 | <p>you should assume charset type.</p> |
12,228,701 | 0 | <p>Okay, I figured this out myself.</p> <p>The name of the file that was right-clicked on is sent as an argument, and the working directory is set to the user's home.</p> <p>My problem was caused by my program trying to work on two different targets simultaneously: the file name sent to it by the file manager, and my ... |
8,413,616 | 0 | <p>Here's an excellent introduction to URL rewriting that I've used in the past:</p> <p><a href="http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/" rel="nofollow">http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/</a> </p> <p>To truly get the most from <code>.htaccess</code> URL re... |
25,337,332 | 0 | <pre><code>public enum PairOddEnum { Evens, Odds, Both } public void BindControl(PairOddEnum type) { if (this.textBox1.Text != "") { List<string> numbersText = this.textBox1.Text.Split(',').ToList<string>(); var evens = numbersText.Where(t => int.Parse(t) % 2 == 0).Distinct(); var odds = numbersText.Whe... |
651,002 | 0 | <p>If you don't mind a little Win32, you can use <a href="http://msdn.microsoft.com/en-us/library/bb762204.aspx" rel="nofollow noreferrer"><code>SHGetSpecialFolderPath</code></a>.</p> <pre><code>[DllImport("shell32.dll")] static extern bool SHGetSpecialFolderPath(IntPtr hwndOwner, StringBuilder lpszPath, CSIDL nFolder... |
7,644,970 | 0 | <p>You want to update a copy of the data (userAs session) without refering to the master set of data. This is just not going to work.</p> <p>With it's shared nothing architecture, this is going to be hard to implement in PHP.</p> <p>The only sensible way to achieve this in anything approaching realtime is to maintain ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.