pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
37,448,066 | 0 | <p>1) <strong>I recommend that you check to see if this file is being written to already</strong> before you attempt to write to it.</p> <pre><code>void SaveTimer() { try { using (Stream stream = new FileStream(filename, FileMode.Open)) { yourTimer.Stop(); Save(); yourTimer.Start(); } } catch { Thread.Sleep(3000); } }... |
13,117,913 | 0 | <p>Try using <code>ICollectionViews</code> in combination with <code>IsSynchronizedWithCurrentItem</code> property when handling lists / ObservableCollection in Xaml. The ICollectionView in the viewmodel can handle all the things needed, e.g. sorting, filtering, keeping track of selections and states.</p> <p>Xaml:</p>... |
16,231,375 | 0 | WPF get parent of menuItem <p>I don't know how to get the parent of a menuItem? I searched all arround but can't get a good answer...</p> <p>My XAML is:</p> <pre><code><DockPanel> <Menu DockPanel.Dock="Right" SnapsToDevicePixels="True" Margin="2,0,0,0"> <MenuItem Header="Devices"> <local:MenuItemWi... |
10,541,712 | 0 | Web app on android browser WIDTH issue <p>So I've only experienced this issue on the Android browser so far. Basically my site works fine almost all the time (and I've not seen the problem yet on Dolphin, Opera or Skyfire) but occasionally when I reopen the Android browser from a bookmark on one of my phone's homescree... |
38,781,502 | 0 | <blockquote> <p>Unfortunately the Symbol isn´t displayed correctly after the relocation, instead the String for the Symbol is displayed</p> </blockquote> <p>This is because the ampersand is escaped</p> <ol> <li>Right click the RESW file and select "Open With..."</li> <li>Choose "<strong>XML (Text) Editor</strong>" <a ... |
27,406,825 | 0 | <p>It's not necessary or even mandatory. But is it smart? Yes it is. Android Studio with Gradle and Maven are soooo powerful, that you are losing so much time using Eclipse. </p> <p>Of course, you will have to pass all these painful steps, like we all did. What is Gradle? What is Maven? How do I import library? Where ... |
36,065,747 | 0 | RTMP Streaming does not work from Docker container <p>I have an application that streams data via RTMP with a command roughly like this:</p> <pre><code>ffmpeg -y -loglevel warning -f dshow -i - -vf crop=690:388:136:0 -r 30 -s 962x388 -threads 2 -vcodec libx264 -vpre baseline -vpre my_ffpreset -f flv rtmp://some.url.com... |
25,276,718 | 0 | How do i create a dbo schema in the h2 sqlserver emulator? <p>I'm getting a </p> <pre><code>JdbcSQLException: Schema "dbo" not found; SQL statement: create table "dbo"."TableName" </code></pre> <p>when running some boilerplate sql against the h2 sqlserver emulator (ie, with config settings:</p> <pre><code>db.default.sl... |
24,967,768 | 0 | <p>You need to edit your sendrederct to : </p> <blockquote> <p>response.sendRedirect("/ProjectName/userhelp.html");</p> </blockquote> <p>You have response.sendRedirect("/userhelp.html"); arguement to your sendRedirect starts with a forward slash.Which means that 'realative to root of container'.So container builds URL... |
4,564,924 | 0 | <p>Not with pure CSS. The closest equivalent is this:</p> <pre><code>.class1, .class2 { some stuff } .class2 { some more stuff } </code></pre> |
35,525,496 | 0 | How does one add a partial index checking for NULL to a JSON column on Postgres? <p>I've got a <code>json</code> column called <code>data</code> on Postgres, and I'd like to add a partial index that applies only to rows where this column is <code>null</code> - I basically need to find all the rows where <code>data</cod... |
4,446,388 | 0 | Wordpress Shortcodes and Conditional Statements <p>I am using custom shortcodes for my post editor and i now have multiple shortcodes i would like to make a shortode be stylized differently if another shortcode is enabled. Is there a filter or conditional function like is_shortcode('slideshow') if not has anyone writte... |
18,492,859 | 0 | System.IO.Directory.GetFiles VS My.Computer.FileSystem.GetFiles <p>I wanted to get the names of all the files in a specific directory which includes over 25,000 files. I tried using these methods:</p> <p><code>System.IO.Directory.GetFiles</code> and <code>My.Computer.FileSystem.GetFiles</code></p> <p>I've found out tha... |
29,386,608 | 0 | Google maps Places API not working <pre><code>package com.example.googlemapstestproject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import java.net.MalformedURLEx... |
27,647,983 | 0 | <p>I got the error in ermenkoff's solution.</p> <p><strong>Error</strong>: AbsoluteAssetPathError</p> <p>It was fixed by <strong>removing</strong> "/assets/" from the url.</p> <pre><code>:default_url => ":style/missing_avatar.jpg" </code></pre> <p>Images are stored in:</p> <pre><code>app/assets/images/medium/missin... |
29,062,441 | 0 | <p>Do you need to use JQuery? Why not use CSS?</p> <pre><code><span style="color:green;">//I need to color this line</span> </code></pre> |
40,456,580 | 0 | <p>You can get browser dimensions with javascript using <code>window.innerHeight</code>.</p> <pre><code>var h=window.innerHeight; </code></pre> <p>You can use the <code>innerWidth</code> for width too. There is a table with browser compatibility at <a href="http://www.w3schools.com/jsref/prop_win_innerheight.asp" rel=... |
39,905,583 | 0 | Mapquest routes using custom icons <p>I'm using Mapquest's Javascript API for leaflet.</p> <p>My code looks like this: </p> <pre><code>dir = MQ.routing.directions() .on('success', function (data) { console.log(data); var legs = data.route.legs; var maneuvers; if (legs && legs.length) { maneuvers = $.map(legs[0]... |
27,946,528 | 0 | Template friend function and return type deduction <p>Note: This question is really close to <a href="http://stackoverflow.com/questions/18931993/return-type-deduction-for-in-class-friend-functions">Return type deduction for in-class friend functions</a>, but I did not find the answer to my problem there.</p> <p>Tested... |
30,673,331 | 0 | Using `onRetainCustomNonConfigurationInstance` to retain data across configuration changes <p>I've been programming for Android for some time, and I'm still looking for solutions to retain data over configuration changes. Aside from saving <code>Parcelable</code>s to Activity's <code>Bundle</code> in <code>onSaveInstan... |
33,354,772 | 0 | PHP Open SSL Decrypt Failing Inconsistently <p>I'm having some weird behaviour with the <code>openssl_decrypt</code> method in PHP. It's failing, giving me an error: <code>Unknown cipher algorithm</code>, but only <em>sometimes</em> (about 6:10 times) i.e. If I run the command enough times, it will eventually work... M... |
11,532,902 | 0 | <p>Growing buttons in Excel is a fairly common issue, with several theories about why this happens, including the use of multiple monitors or using proportional fonts. I have yet to see a definitive answer about this, but there are several workarounds that may work for you.</p> <ol> <li>Delete and re-create the button... |
125,273 | 0 | <p>Depending on the admins, automation is helpful. I've had windows admins that want a Word doc with step by step instructions and other admins that wanted a script.</p> <p>However, some helpful things to include, probably as sections</p> <ul> <li>Database changes <ul> <li>Scripts to run</li> <li>Verification that the... |
30,364,861 | 0 | <p>Finaly, I have found out what was the problem. composer.json file in the project I was trying to load - <a href="https://github.com/KoulSlou/UPS" rel="nofollow">UPS library</a> -was invalid. I was able to download files when I ran:</p> <pre><code>composer.phar install </code></pre> <p>but it looks like composer.jso... |
38,698,044 | 0 | <p>You need to skip " on --query param</p> <pre> sqoopcom="sqoop import --direct --connect abcd --username abc --P --query \"queryname\" --target-dir /pwd/dir --m 1 --fetch-size 1000 --verbose --fields-terminated-by , --escaped-by \\ --enclosed-by '\"'/dir/part-m-00000" </pre> |
13,452,637 | 0 | Unable to Launch Chrome Browser in Selenium <p>I am launching chrome browser using</p> <pre><code>selenium = new DefaultSelenium("localhost", 4444, "*googlechrome", "https://example.com/"); </code></pre> <p>But i get a popup with following message and it freezes: </p> <blockquote> <p><em>An administrator has installed ... |
34,215,065 | 0 | read XML in SQL, no data being pulled <p>I am trying to retrieve data from an XML file. Below is how the XML doc looks and below that is my SQL code. It will run the code and show column headers - but will not populate with any data. What am I missing?</p> <pre><code><profile xmlns="http://feed.elasticstats.com/sche... |
6,755,350 | 0 | <p>One can retrieve $config from Entity manager like this:</p> <pre><code>$config = $em->getConfiguration(); </code></pre> <p>To dynamically update entities paths try this (i've not tried it myself):</p> <pre><code>$driverImpl = new Doctrine\ORM\Mapping\Driver\AnnotationDriver(array( APP_PATH . DIRECTORY_SEPARATOR ... |
36,138,531 | 0 | AngularJS - $$ChildScope Vs $$childHead && $$childTail <p><code>angular.element($0).scope()</code> gives <code>$$ChildScope</code>, <code>$$childHead</code> and <code>$$childTail</code> as members.</p> <p>On debugging, <code>$$childHead</code> and <code>$$childTail</code> shows the immediate child scopes.</p> <p><a hre... |
17,422,450 | 0 | <p>The bracket notation returns DOM elements, which do not have a <code>slideToggle</code> method. What you want is <a href="http://api.jquery.com/eq/" rel="nofollow"><code>.eq</code></a>, which filters in the same manner but returns jQuery objects instead:</p> <pre><code>Div.eq(0).slideToggle(...) ; </code></pre> |
13,374,893 | 0 | <p>In WCF Ria Services you must put the <code>RoundTripOriginalAttribute</code> on your class members, not on the class itself. It's meant to let you round trip properties mainly for concurrency checks server-side.</p> |
33,229,030 | 0 | <p>Have you tried doing a <a href="http://www.smarty.net/docsv2/en/language.function.foreach.tpl" rel="nofollow">foreach</a> loop in Smarty?</p> <pre><code><ul> {foreach from=$myArray item=foo} <li>{$foo}</li> {/foreach} </ul> </code></pre> |
32,417,606 | 0 | clear empty spaces array <p>I have this array, and I want go get rid of those indexes that have no value in them, so for example in the index[0] I want to get rid of the [0] and [4] so I would have a 3 value array and so on...</p> <pre><code>Array ( [0] => Array ( [0] => [1] => [2] => 7 [3] => [4] => ... |
17,068,150 | 0 | <p>Solution was to remove all changes and generate the scaffold correctly using:</p> <pre><code>rails g scaffold Category name:string description:text </code></pre> |
37,744,206 | 0 | <p>Add a <code>flush</code> before <code>close</code> of the <code>OutputStream</code>. </p> <pre><code> response.getOutputStream().flush(); </code></pre> <p>Or If you are using Spring MVC 4.2 you can make use of <code>StreamingResponseBody</code></p> <pre><code>public StreamingResponseBody stream(HttpServletRequest r... |
12,405,164 | 0 | <p>you can use the jquery <code>toogle</code> api</p> <p>html</p> <pre><code><div id="clickhere "> Click here </div> <img id="image" src="demo.png" alt="" width="120" height="120" /> </code></pre> <p>jquery</p> <pre><code>$('#clickhere ').click(function() { $('#image').toggle('slow', function() { // ... |
34,551,176 | 0 | <p>A pattern I use for such a thing looks like this…</p> <p>Factory code…</p> <pre><code>angular.module('myApp').factory('MyFactory', function () { var myVar; function MyFactory(param) { myVar = param; this.hello = hello; } function hello() { console.log('Hello ' + myVar); } return MyFactory; }); </code></pre> <p>Then... |
9,042,497 | 0 | <p>You may be looking for</p> <pre><code>Document doc = DTE.ActiveDocument; TextDocument txt = doc.Object() as TextDocument; </code></pre> <p>You should then be able to edit work with the TextDocument as needed.</p> |
32,592,333 | 0 | <p>I had a similar issue and digged quite deep into the polymer code - it seems like there is no way for doing this. I found a quite dirty workaround, using an invisible item, but maybe it helps for you :</p> <pre><code> <paper-dropdown-menu label="List's Color Tag" id="colorTag"> <paper-menu class="dropdown-... |
23,661,436 | 0 | how to find result of matched query in php <p>i am having one probelm cant cant figure it out how i can proceed. I have string like </p> <pre><code> "Coolman United States Member Since January 2013 Loans 114.01 Active 66.00 Repaid Credentials 2 followers eBay windchester 42 Friends 2" </code></pre> <p>now with php i ne... |
4,343,289 | 0 | <p>I see a few pitfalls in your code, there are a few places where things can go wrong:</p> <p>First, use of regular statements. Use <a href="http://download.oracle.com/javase/tutorial/jdbc/basics/prepared.html">prepared statements</a> so you won't have problems with <a href="http://en.wikipedia.org/wiki/Sql_injection... |
29,536,075 | 0 | <p><a href="https://github.com/python-visualization/folium" rel="nofollow">Folium</a> builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js library. Manipulate your data in Python, then visualize it in on a Leaflet map via Folium.</p> <p><a href="http://folium.readt... |
32,467,246 | 0 | How to start something on a new line in Java SWING? <p>I am trying to set my JTextArea to take up the max horz length of the screen, so that the next thing, in this case a button, will start on a new line, but I have no clue how to do it. I have messed around by setting the size of the JTextArea to change from, say, 20... |
3,669,159 | 0 | <p>I think a lot of the problem deals with the fact that search engines give something a high rank if a lot of people are linking to a specific page. Unless you can get all the people linking to your old documentation, to link to your new documentation, then you are going to have a problem with the older documents bei... |
29,120,225 | 0 | VoltDB - decimal values have too many zeroes <p>when I try to add a decimal value to a column in voltdb, it always adds extra zeroes to the decimal. The column type is DECIMAL, which equates to Java's BigDecimal type. Even if I format the BigDecimal value in java to a two decimal place BigDecimal before doing the inser... |
32,828,720 | 0 | <p>Consider <a href="http://blog.pasker.net/2010/10/21/use-jdbc-jms-without-jta/" rel="nofollow">1.5 phase commit</a>. Basically:</p> <ul> <li>step 1: You commit the DB transaction</li> <li>step 2: You commit the JMS transaction.</li> </ul> <p>Possible error scenarios: </p> <ol> <li>DB transaction fails.</li> <li>DB t... |
5,087,386 | 0 | <p>You should be able to handle that by conditionally adding a <a href="http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#redirect" rel="nofollow">#redirect</a> attribute to the form.</p> |
6,711,281 | 0 | <p>An application using Surface controls needs to use SurfaceWindow as it's root visual in order to do all of the custom touch handling. I suspect that since you're trying to convert this you are probably still using a standard Window which is giving you this error.</p> |
23,477,022 | 0 | Test & Target - Return HTML Content <p>I am not at all a Test & Target expert. I am an Application Architect. I had a discussion yesterday with my colleague, who has huge experience in Test & Target. Today in my website the test & target content is rendered with the below mentioned steps.</p> <p>1) Page loa... |
2,996,094 | 0 | <p># mysql < create_mysql.sql</p> |
7,953,315 | 0 | <p>Fetch the root and use </p> <pre><code>qry.ViewAttributes = "Scope='RecursiveAll'"; </code></pre> <p>See also: <a href="http://stackoverflow.com/questions/4192873/query-to-get-all-items-in-a-list-including-items-in-the-sub-folders-in-sharepoin">Query to get all items in a list including items in the sub folders in ... |
5,011,052 | 0 | <p>The Python std lib includes a diff module, difflib. Here is a stab at your problem:</p> <pre><code>>>> import difflib >>> f1 = "111xxx222" >>> f2 = "111yyy222" >>> sm = difflib.SequenceMatcher(a=f1, b=f2) >>> diff_re = '' >>> for a,b,n in sm.get_matching_blocks(... |
812,502 | 0 | <p>You might have some luck using <a href="http://en.wikipedia.org/wiki/IKVM" rel="nofollow noreferrer">IKVM.NET</a>. I'm not sure on its exact status, but it's worth a try if you're insistent on running Java code on the .NET Framework. It includes a .NET implementation of the Java base class library, so it seems reas... |
26,030,379 | 0 | <p>In Chrome 37 on my machine, window.localStorage does sync between tabs. I'm not sure about other browsers though and it wouldn't be reactive automatically if you used that method.</p> <p>You are probably best off using a collection with documents assigned by user ID, then you can rely on Meteor's reactivity.</p> |
29,800,405 | 0 | <p>Here the script version!</p> <pre><code> using UnityEngine; using System.Collections; using UnityEngine.UI; public class SetTransparancy : MonoBehaviour { public Button myButton; // Use this for initialization void Start () { myButton.image.color = new Color(255f,0f,0f,.5f); } // Update is called once per frame voi... |
24,837,015 | 0 | <p>According to the discussion <a href="https://code.google.com/p/topic-modeling-tool/issues/detail?id=3" rel="nofollow">here</a>, people have been using it for French and Russian</p> |
38,196,355 | 0 | <p>The issue mostly has to do with stale cached data (I experienced the same). The following should solve your problem.</p> <ol> <li>Go to: 'Preferences > Available Software Sites'</li> <li>Mark all, and 'Export' to file.</li> <li>Delete everything (all the links)</li> <li>Close and Start STS</li> <li>Go to: 'Preferen... |
38,428,949 | 0 | <p>Either call <code>dialog.show()</code>; after all the initialization and interface registration, Or to separate the dialog from your activity for making your code modular, you can do to following:</p> <ol> <li>Create a <code>class</code> extending <code>Dialog</code>.</li> <li>Create a <code>method</code> in your d... |
1,301,365 | 0 | PHP/Amazon S3: Query string authentication <p>I have been using the <code>Zend_Service_Amazon_S3</code> library to access Amazon S3, but have been unable to find anything that correctly deals with generating the secure access URLs.</p> <p>My issue is that I have multiple objects stored in my bucket with an ACL permissi... |
33,788,003 | 0 | JFileChooser GUI opens file XML correctly but then doesn't read it correclty <p>I am trying to do the following exercise:</p> <p>Write a graphics program that allows a user to load an XML file from the disk using a file chooser GUI component. Once the file is open, its content is displayed in a java text area GUI compo... |
38,700,795 | 0 | <p>A correct solution FWIW:</p> <pre><code>$ awk 'NR==1{n=split($0,d)} {for (i=1;i<=n;i++) printf "%s%s", (i>NF ? d[i] : $i), (i<n ? OFS : ORS)}' file a 12 17 bac 30 42 a 15 18 bac 30 42 a 18 22 bac 30 42 </code></pre> |
19,971,085 | 0 | <p>Just replace your code With this one 100% tested </p> <pre><code><?php $xd = 'Sria.plan|Fnzas|139|Lopez%20Portillo%20Alcantara%20Jorge%20Ernesto|29|2013-05-01|0000188B|T|Titular|1984-03-19|2011-07-16|H|341.45|6305|276|153|673.4|7407.4|1185.18|8592.58|8674.75,Sria.plan.fnzas|Tesoreria|1538|Rodriguez%20Guzman%20No... |
2,234,101 | 0 | <p>If you're willing to shell out a little money, there's slickedit <a href="http://www.slickedit.com/" rel="nofollow noreferrer">http://www.slickedit.com/</a></p> <p>I used version 9 on Linux for development of a mixed C/C++ app. The completion is quite good, very similar to Visual Studio. It's worth a look anyway, t... |
11,269,893 | 0 | <p>Unfortunately no one has made a plugin for it yet. It's possible, it would just involve you figuring out how to do it. Might be worth a try. I'm sure a lot of people would use it/find it helpful since there is no plugin that does the job at the moment. </p> |
26,009,744 | 0 | Matlab Substring as function call? <p>I am trying to figure out this substring feature and whether there exists a function call for it or not. As far as I can find, <a href="http://stackoverflow.com/questions/16126847/how-do-i-get-substring-to-work-in-matlab">here</a> and <a href="http://stackoverflow.com/questions/203... |
4,408,398 | 0 | <p>How about iterating over all the static dependency properties (using <code>Reflection</code>) of that control's type and resetting bindings on them?</p> |
22,271,821 | 0 | <p>If Scala / Java interoperability is not too much of an issue for you, and if you're willing to use an internal DSL with a couple of syntax quirks compared to the syntax you have suggested, then <a href="http://www.jooq.org" rel="nofollow">jOOQ</a> is growing to be a popular alternative to <a href="http://slick.type... |
28,291,534 | 0 | <pre><code>if(!empty($_SESSION['c_id']) || !empty($_SESSION['c_id'])) { //Login here } else { //Please Login } </code></pre> |
6,080,405 | 0 | <p>This is SQL Server backup database file. You can restore it by following these steps: <a href="http://msdn.microsoft.com/en-us/library/ms177429.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms177429.aspx</a></p> |
36,824,585 | 0 | Does RTCPeerConnection work in Microsoft Edge? <p>I am currently working on VoIP using WebRTC. It's going to be a UWP application written in JavaScript.</p> <p>Now, I am trying to check whether it works or not by testing samples from <a href="https://webrtc.github.io/samples" rel="nofollow">https://webrtc.github.io/sam... |
39,696,189 | 0 | How to use tabs in angular2 <p>I have an application that uses angular2 with routes.ts properly set. In the app, I have navbar set according to the routes defined in routes.ts.</p> <p>In one of the route, I want to use a tab that does not refer to routes.ts but instead I want it to refer to the tab-content class.</p> <... |
24,924,051 | 0 | How to route to static page with out change url path in asp.net mvc3 <p>Basically,I'm trying to route to a static page like this:</p> <p><code>http://127.0.0.1/mypage</code></p> <p>=route to=></p> <p>A static page in my website folder maybe <code>http://127.0.0.1/static/mypage.html</code></p> <p>I have tried:</p> <p>Ad... |
12,446,175 | 0 | How to order list according to the value of variable? (php) <p>First question to the people who know wordpress well: resource/system load wise is it better to query mysql directly and order result there? or use wordpress hooks WP_query fetch all posts and order them according to comments variable?</p> <p>I've this code... |
16,171,467 | 0 | Instantiate a class in a case-insensitive way <p>I'm faced with a bit of an issue. I have my class name in a variable and I need to instantiate it, but I have no way of knowing that my variable has the exact same case than the class.</p> <p>Example:</p> <pre><code>//The class I'm fetching is named "App_Utils_MyClass" $... |
4,595,294 | 0 | <p>You can created a clustered index to keep these in the order you want.</p> <p><a href="http://msdn.microsoft.com/en-us/library/aa174523(v=sql.80).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa174523(v=sql.80).aspx</a></p> |
34,851,795 | 0 | How to get static image from google maps in iOS <p>I use google maps api for iOS. I want to get static image of special city and paste it in UIImageView. How can I make it?</p> |
26,867,796 | 0 | Generic mobile tests with appium <p>I'm new to mobile testing , and currently I research for an automation framework for mobile testing. I've started to look into Appium, and created some tests for the demo app I've made (one for IOS and the other for Android). I've managed to write a test for each of the platforms , b... |
34,251,834 | 0 | <p>SSAS only accepts Windows auth. But you can close all Excel windows then start Excel from a command line like this:</p> <pre><code>runas /netonly /user:REALDOMAIN\YOURDOMAINUSERNAME "c:\path\to\excel.exe" </code></pre> <p>Then when it connects to Windows auth resources remotely it will connect as the user you menti... |
24,805,490 | 0 | Explain why storing the value of printf in a variable and then printing it gives an extra value? <p><code>int d; d=printf("\n%d%d%d%d",1,2,3,4); printf("%d",d); </code></p> <p>The code gives the output as 1,2,3,4,5. I don't understand why an integer greater than the last one is being printed.</p> |
39,955,915 | 0 | <p>As an alternative to the guard statement, you could also use the similar <code>if let</code> construct:</p> <pre><code>if let item = item["display-name"] as? String { print(item) } else { print("No display name") } </code></pre> |
36,685,394 | 1 | subprocess.CalledProcessError: returned non-zero exit status 0 <p>What is the meaning of this paradoxical error?</p> <blockquote> <p>subprocess.CalledProcessError: Command '/home/travis/build/fritzo/pomagma/build/debug/src/cartographer/cartographer' returned non-zero exit status 0</p> </blockquote> <p>It happens when I... |
36,256,635 | 0 | mongoose right usage of multiple databases? <p>I have multiple <code>mongodb</code> connections in my project:</p> <pre><code>// db.coffee conn1 = mongoose.createConnection "mongodb://192.168.1.193/test" conn2 = mongoose.createConnection "mongodb://92.168.1.81/position" </code></pre> <p>I have a model named <code>Posit... |
40,524,081 | 0 | <p>In the html code, replace:</p> <pre><code><a href="whatsapp://send?text=Hello"> </code></pre> <p>with:</p> <pre><code><a href="intent://send?text=Hello#Intent;scheme=whatsapp;package=com.whatsapp;end"> </code></pre> <p>See Chrome's docs about this here: <a href="https://developer.chrome.com/multidevice/... |
30,379,123 | 0 | <p>Java interfaces cannot have instance variables. If having them seems really appropriate to you, perhaps you should consider using <a href="https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html" rel="nofollow">an abstract class</a> instead (or in addition) to an interface.</p> |
21,805,767 | 0 | <p>The problems are caused by this:</p> <pre><code> { (char) c = (int) c - 32 + key + 127; System.out.println(c); } </code></pre> <p>The <code>(char) c = ...;</code> is completely invalid syntax. </p> <p>An assignment is supposed to look like this <code>c = ...;</code>. </p> <p>If you want / need to do a type cast bef... |
30,178,182 | 0 | Collect RoutingError messages thrown <p>I've just put a rails 4 app into production, and I've noticed what look like a number of scripted attacks, mostly on urls that end with .php. They look like this:</p> <pre><code>I, [2015-05-11T22:03:01.715687 #18632] INFO -- : Started GET "/MyAdmin/scripts/setup.php" for 211.172.... |
35,692,662 | 0 | Laravel - Multiple models for one table <p>In my project(laravel 4.2) I am using package for every module. I want every package independent to other, So is this recommend - Multiple models for one table?</p> |
30,462,696 | 1 | How add rows to list view in odoo? <p>I have a result data comming from wsdl file and I want to put this data in the treeview of my odoo module: </p> <p>This is my module architecture : init.py (where I import module.py) openerp.py (dependencies: Base) _module.py (where I've got the main code and everything works fine)... |
27,177,474 | 0 | <p>Assuming you have an image called <code>image.jpg</code>, paste this into a file called <code>go</code>, then type</p> <pre><code>php -f go </code></pre> <p>and you will see what your C++ should generate:</p> <pre><code><?php header("Content-type: image/jpeg"); readfile('image.jpg'); ?> </code></pre> |
20,194,605 | 0 | <p>Only <code>functions</code> (and <code>subs</code>) can be referenced by <code>Set functionReference = GetRef("myFunction")</code> but not objects.</p> <p>When you want to have a string reference, you have to create one with each object you would want to refer to. You can use a dictionary for that:</p> <pre><code>D... |
6,476,780 | 0 | <p>There was a post from @niktrs that provided the right answer, but it's been deleted! </p> <p>So, here's the query I was looking for, with @niktrs help. If his post comes back, I'll accept it.</p> <pre><code>SELECT new_wage FROM hr_wages WHERE effective_date IN (SELECT effective_date,new_wage FROM hr_wages WHERE emp... |
17,419,374 | 0 | <p>Thanks to Sunil D.</p> <p>Finally I create extended <code>ItemRenderer</code> like below</p> <pre><code>public class LSLabelCircleItemRenderer extends CircleItemRenderer { private var _label:Label; public function LSLabelCircleItemRenderer():void { super(); _label = new Label(); } override protected function update... |
10,153,577 | 0 | <p>You can add .rc file to your project and include "wx/msw/wx.rc" in it. Then themes should be applied to your GUI (take a look at default samples bundled with wxWidgets - <a href="http://screencast.com/t/QTaQqCxO692w" rel="nofollow">http://screencast.com/t/QTaQqCxO692w</a>).</p> |
2,220,730 | 0 | <p>Just zero out the appropriate matrix elements. In a 4x4 3D-transform matrix, these are stored as the three first elements in either in the rightmost column or bottom row, depending on whether you use pre- or post-multiplication.</p> <p>If your Matrix class has a method to get the translation, it probably also has a... |
29,541,993 | 0 | <p>Its acctualy possible ;-)</p> <pre><code># not pep8 compatible^ sam = ['Sam',] try: print('hello',sam) if sam[0] != 'harry' else rais except: pass </code></pre> <p>You can do very ugly stuff in python like:</p> <pre><code>def o(s):return''.join([chr(ord(n)+(13if'Z'<n<'n'or'N'>n else-13))if n.isalpha()else ... |
5,102,533 | 0 | <p>You´ll want to use NSWindowLevel, in specific kCGDesktopWindowLevel. A short overview on NSWindowLevel can be found <a href="http://cocoadev.com/index.pl?NSWindowLevel" rel="nofollow">here</a>, and a <a href="http://stackoverflow.com/questions/4982584/how-do-i-draw-the-desktop-on-mac-os-x/4987525#4987525">more elab... |
36,079,592 | 0 | Passing realmobject with parcel to activity has return null <p>can anyone help me with my problem with passing realmobject with parcel to another activity and in second activity my object is null? </p> <p>In Activity i get instatne of class Category from tag. </p> <pre><code> Intent intent = new Intent(context, Categor... |
10,186,225 | 0 | <p>It is possible to use a custom request handler that enables django's i18n trans tag with google app engine. But much better is use jinja2 like is said here, then the solution is official. You should import jinja2 from webapp2_extras and then your i18n will work and the translation tag for jinja2 will look like <cod... |
1,634,359 | 0 | Is there a reverse function for strstr <p>I am trying to find a similar function to <code>strstr</code> that searches a substring starting from the end towards the beginning of the string.</p> |
30,357,837 | 0 | <p>You will need to combine it with AJAX or jQuery codes. It is not only php!</p> <p>Check this out: - <a href="http://stackoverflow.com/questions/10805187/jquery-login-form-in-div-without-refreshing-whole-page">jquery login form in div without refreshing whole page</a></p> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.