pid int64 2.28k 41.1M | label int64 0 1 | text stringlengths 1 28.3k |
|---|---|---|
5,531,989 | 0 | <p>From your cakephp app you can check if a user exist in the phpbb forums table and you can use the phpbb session to check if a user is logged in.</p> |
10,938,897 | 0 | <p>There are three alternatives for unsolvable hash collisions on open addressing hash tables:</p> <ol> <li>Re-hash the entire table with a different hash function, and hope that no new unsolvable hash collisions occur.</li> <li>Resize the table (with all operations that this might incur), to guarantee some more possi... |
39,355,129 | 0 | <p>Since you have 4 columns including the primary key column, you have to provide data for all four columns. Hence the first one is <strong>IDENTITY</strong> column, you can provide any value for that column as this column value will not be used but ommitted.</p> <p>In your case if you provide data like it will work:<... |
25,103,303 | 0 | The Python curses module provides an interface to the curses library, the de-facto standard for portable advanced terminal handling. |
26,114,957 | 0 | <p>this error may happen when you add hammer js in a script tag in your html, if this your case remove it and just depend on requirejs for loading it</p> |
29,889,112 | 0 | where the behavior of private and static method is different from only private method <p>As for my understanding:</p> <p>When a method is static it is </p> <ol> <li>early bind </li> <li>can call with the name of class even before no object is created </li> <li>can call only static member inside it.</li> </ol> <p>I neve... |
1,478,465 | 0 | <p>Here is a complete, working example.</p> <h2>Code</h2> <pre><code>USE master GO IF EXISTS (SELECT * FROM sys.databases WHERE name = N'A') DROP DATABASE A GO IF EXISTS (SELECT * FROM sys.databases WHERE name = N'B') DROP DATABASE B GO CREATE DATABASE A GO CREATE DATABASE B GO USE A GO CREATE TABLE X (Col1 varchar(10... |
22,722,188 | 0 | <p><a href="http://www.bootply.com/125688" rel="nofollow">http://www.bootply.com/125688</a></p> <pre><code>.form-control[disabled] { background-color:white; } </code></pre> |
40,900,686 | 1 | Make anaconda jupyter notebook auto save .py script <p>I would like to simply be able to launch the jupyter notebook from Anaconda and have it automatically save a .py script when I save the .ipynb. I tried modifying the <code>jupyter-notebook-script.py</code> in the Anaconda3/envs/env_name/Scripts/ but that wasn't the... |
5,689,570 | 0 | <p>This behaviour of Joda Time Contrib is fixed in my project Usertype for Joda Time and JSR310. See <a href="http://usertype.sourceforge.net/" rel="nofollow">http://usertype.sourceforge.net/</a> which is practically otherwise a drop in replacement for JodaTime Hibernate.</p> <p>I have written about this issue: <a hre... |
32,001,570 | 0 | Issue with experimental gradle: The android plugin must be applied to the project <p>I'm trying to run some native code with the NDK in Android Studio. I have followed the steps shown <a href="http://tools.android.com/tech-docs/new-build-system/gradle-experimental" rel="nofollow">HERE</a> to use the experimental Gradle... |
28,000,225 | 0 | How to return a value from a range if cell contains that value <p>I have a list of Names (First and Surname) in A:A. I also have a range called 'Surnames'. How can I apply a formula so that B:B returns the surname only of A:A if that name is found in the range 'Surnames'.</p> <p>I other words, I want to check a cell in... |
32,306,132 | 0 | <p><code>self</code> when used as first method argument, is a shorthand for <code>self: Self</code> – there are also <code>&self</code> which equals <code>self: &Self</code> and <code>&mut self</code> which equals <code>self: &mut Self</code>.</p> <p><code>Self</code> in method arguments is syntactic s... |
7,448,853 | 0 | <p>I have an internationalized product. No translation has been done, but the strings are all externalized, so if we had a desire to ship the product localized for a specific country we could get the files translated, have the product tested, and ship it for use natively in that country.</p> <p>For now the fully inter... |
34,190,402 | 0 | <p>You would have to use javascript and/or jquery to dynamically add the css class that has the animation to the desired element after the page has been loaded. We can do this with the $document.ready event in jquery.</p> <pre><code>$(document).ready(function(){ $('css selector').addClass('class-that-has-animation-bin... |
35,852,133 | 0 | gantt expanding the timeline date <p>So, looking at this page... <a href="http://docs.dhtmlx.com/gantt/samples/01_initialization/01_basic_init.html" rel="nofollow">http://docs.dhtmlx.com/gantt/samples/01_initialization/01_basic_init.html</a></p> <p>Say I want to expand all the way to December 2017 by clicking on a task... |
22,576,321 | 0 | <p>First advice? Take a breath. You can't code effectively if you're pissed off all the time. You are going to make lots of mistakes, so you don't want to be pissed off. Accept that fact and make the code better.</p> <p>I would try passing the parent frame that created the dialog, not the dialog itself. </p> |
8,277,814 | 0 | How to compile *.lua files as resource library? <p>In original, I collect *.lua files in a folder , then load them in *.c files </p> <p>Now I want to hide them(*.lua) and let them in a xx.so or xx.dll </p> <p>if this can be done ?</p> <p>if can , then how to load them in c files ?</p> |
34,128,285 | 0 | <p>One way would be to:</p> <p>a) Copy your JSON to Clipboard (CTRL+C)</p> <p>b) On a Visual Studio class, click on EDIT-> Paste Special -> Paste JSON as classes. This will create the classes equivalent of your JSON for you. Your main object would be named as "Rootobject" and you can change this to whatever name you w... |
27,157,856 | 0 | Where do i write if item is not found, and display an appropriate message? <pre><code>public static void modifyBall(String[] hookPotentialArray, String[] nameBallArray, int[] ballWeightArray, int count) { Scanner keyboard = new Scanner(System.in); System.out.println("Please enter the name of the ball you would like to ... |
30,337,197 | 0 | <p>The next element after a <code>td</code> cannot be a <code>checkbox:checked</code>, because it is by definition a <code>td</code> element. The syntax of your <code>if</code> statement is also off.</p> <p>You probably meant:</p> <pre><code>if ($(this).closest('td').next().find('input[type=checkbox]:checked').length)... |
34,125,439 | 0 | OSX sound output split across two USB devices <p>If two headsets are both connected to USB ports in OS X, the Preferences => Sound => Output pane only allows the user to select one of them at a time.</p> <p>I thought at first that there might be a way to "split" the output so that both USB devices receive it, as one ca... |
25,687,389 | 0 | _gaq.push won't send data <p>somehow my <code>_gaq.push</code> function is not working. If I set <code>debug = true</code> I can see the logs, and I know it gets to the else (when I have <code>debug=false</code>) because I tried adding a log in it. Here's my code</p> <pre><code>var _gaq = _gaq || []; _gaq.push(['_setAc... |
17,963,361 | 0 | Hide the text on a button in android? <p>Please tell me how to hide the text on a button in android.</p> <p>When I try this code, the button is hidden but I just want to hide the text on the button.</p> <pre><code>Button b= (Button)findViewById(R.id.follow); b.setVisibility(View.GONE); </code></pre> <p>Please tell me h... |
22,863,487 | 0 | <p>The request which leads to this method being called need to pass through the Spring Security filter chain, otherwise there will be no security context available when the permissions are checked.</p> <p>Without seeing the rest of the stacktrace, I can't say 100%, but it looks like that's what's happening here, given... |
15,129,833 | 0 | Suppress Page header when there is no data in Details sections <p>I am using a datatable to load the data for the crystal report. Based on the data filtered by the user in the DataGridview and clicking on Print will display the filtered data in Report.</p> <p>All is fine.I have done this.When there is no data in the De... |
29,988,115 | 0 | <p>You are not using <code>postdata</code> while sending request:</p> <pre><code>var postdata = "{ \"version\": \"1.0.1\", \"observations\": [ { \"sensor\": \"TISensorTag_temp_01\", \"record\": [ { \"starttime\": \"" + formatDate(new Date()) + "\", \"output\": [ { \"name\": \"ObjTemp\", \"value\": \"" + objtemp + "\" ... |
40,593,383 | 0 | <p>I am getting correct number with the following config:- </p> <pre><code> <http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/> <flow name="Flow1" > <http:listener config-ref="HTTP_Listener_Configuration" path="/test" doc:name="HTT... |
27,828,258 | 0 | <p>You shouldn't be mocking at that level. Basically the idea is that you have interfaces that acts as a facade on database and ORM operations.</p> <pre><code>interface IFetchUsers { UserList GetAll(); User GetById(int id); } interface ICalculateDebt { float GetDebt(int accountId); } interface IPersistOrder { void Sav... |
6,063,744 | 0 | Ajax client for a CXF service <p>I'm new to CXF, and I was trying to implement a CFX client in Ajax. I had already implemented a client in Java but now I need to implement a client-side application to access CXF. I'm not even sure that it's possible to do that (Accessing CXF directly from client-side). If it's possible... |
30,225,516 | 0 | <p>This functionality is not implemented in Rails 3. Look at specification of this method <a href="http://apidock.com/rails/v3.2.13/ActionView/Helpers/UrlHelper/button_to" rel="nofollow">here</a>. It was implemented in Rails 4.</p> |
761,352 | 0 | Django QuerySet order <p>I am new to both django and python but I am beginning to get a grasp on things. I think.</p> <p>I have this problem and I can not seem to find an answer to it. (Though I assume it is really simple and the limiting factors are my google skills and lack of python/django knowledge)</p> <p>The scen... |
17,492,192 | 0 | <p>With validation efficiency is not usually the concern. There are two types of validation that you should be concerned with:</p> <ol> <li>Input validation, e.g. will what the user is sending to the server malicious and intended to break/break into my application</li> <li>Business validation, which should happen in y... |
11,149,365 | 0 | trouble using lambda expressions and auto keyword in c++ <p>I'm trying to learn how to use lambda expressions in C++.</p> <p>I tried this simple bit of code but I get compile errors:</p> <pre><code>int main() { vector<int> vec; for(int i = 1; i<10; i++) { vec.push_back(i); } for_each(vec.begin(),vec.end(),[](i... |
36,843,106 | 0 | <p>You can use <code>position: absolute</code> and <code>transform: translate()</code></p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>nav { position: relative; background: #2196F3; height: 50px; } .mdl-layout-ti... |
36,206,566 | 0 | <p>The answer I found is that Haml doesn't play well with javascript. If you are going to have a js file it should be an Erb file. So rather that your_file.js.haml it should be your_file.js.erb.</p> |
28,104,867 | 0 | <p>I use a ClientRowTemplate to achieve something similar to the above.</p> <p>Look at this documentation: <a href="http://demos.telerik.com/aspnet-mvc/grid/rowtemplate" rel="nofollow noreferrer">http://demos.telerik.com/aspnet-mvc/grid/rowtemplate</a></p> <p>Basically I define my Row template in a partial view then I... |
3,240,026 | 0 | PrincipalPermission vs. web.config for page access controls <p>I currently have my access permissions in <code>web.config</code>:</p> <pre><code> <location path="Account"> <system.web> <authorization> <allow users="?"/> </authorization> </system.web> </location> ... </code></pr... |
34,609,362 | 0 | <p>As mentioned in the comments, the problem is your response redirects to another url, your <code>HttpUrlConnection</code> must handle redirects. See <a href="http://www.mkyong.com/java/java-httpurlconnection-follow-redirect-example/" rel="nofollow">this</a> on how to do it. </p> |
26,487,619 | 0 | <p>You can skip it with <code>case ... when ... else</code> like you figured out by yourself:</p> <pre><code>... ||case when A.NEXTQUESTIONID is not null then 'NextQuestionID = '||A.NEXTQUESTIONID||',' else '' end || ... </code></pre> <p>You can also use the <code>nvl2</code> function for a shorter solution:</p> <pre>... |
30,643,331 | 0 | How can I wait for an application launched by another application launched by my application Qt/C++ <p>I'm creating a Windows Add/Remove Programs application in Qt 5.4 and I'm becaming crazy to solve a little "puzzle":</p> <p>My application (APP_0) runs another application (APP_1) and waits for this APP_1 until it term... |
21,487,685 | 0 | How can I read multiple cookies with Perl's CGI.pm? <p>I am using CGI.pm to write out cookies. Now during the course of the user using my site, other cookies are added to the "test.com" cookie set, (as shown in the broswer history)</p> <p>But now I want to log the user out, and "clean" the PC. Since I don't know what s... |
36,362,270 | 0 | <p>You don't need an SqlDataAdapter and all the infrastructure required to work with if you just have a single value returned by your Stored Procedure. Just use ExecuteScalar</p> <pre><code>int count = 0; using (var con = new SqlConnection(connectionString)) using (var cmd = new SqlCommand("RunAStoredProc", con)) { cm... |
39,171,971 | 0 | <p>Try to delete or rename .suo file (including extension). This file is at the same location where your solution file is. It worked for me.</p> |
37,601,024 | 0 | ActiveResource with nested relation fails with routing error <p>I am newbie to the rails world and in my project we have following model on server side </p> <pre><code> class Server < ActiveRecord::Base has_many :disks, :dependent => :destroy accepts_nested_attributes_for :disks, :reject_if => lambda { |a| a[:... |
598,110 | 0 | <p>Until there's a reason given why it can't work, just use the facilities provided to you by the platform (the DLL and so forth).</p> |
15,361,648 | 0 | <p>There are likely to be several "problems", or ways to make it faster. I wouldn't call them "bottlenecks" because often they are not localized. Typically they are perfectly good code - it was just never supposed that they would be on the "critical path".</p> <p>Suppose the problems, when fixed, would save these perc... |
3,140,611 | 0 | <p>Assuming it's a business site:</p> <p>What's your target market? How long do you expect until you release a working version of your website? If current trends continue, what will be IE6's market share by then? How much profit/value will those users bring? How much will it cost to support those additional users? Unl... |
16,184,902 | 0 | <p>Once a program goes out of memory it can be hard for it to recover. You need to think carefully about how to try and clean up when that happens. For example, in your saveImageToExternalStorage, it doesn't clean up the fOut if an exception occurs inside your try/catch. So you should do things like put </p> <pre><cod... |
28,229,830 | 0 | <p>You can implement a wrapper for fb.App and override Session method to return IFbSession instead of Facebook.Session.</p> <pre><code>package main import fb "github.com/huandu/facebook" type IFbApp interface { ExchangeToken(string) (string, int, error) Session(string) IFbSession } type MockFbApp struct { IFbApp } fun... |
15,760,778 | 0 | <p>here is wat u want <a href="https://github.com/studhadoop/xmlparsing-hadoop/blob/master/XmlParser11.java" rel="nofollow">https://github.com/studhadoop/xmlparsing-hadoop/blob/master/XmlParser11.java</a></p> <pre><code>line 170 :if (currentElement.equalsIgnoreCase("name")) line 173 :else if (currentElement.equalsIgno... |
1,762,373 | 0 | <p>The preferred way to interact with a db when using an ORM is not to use queries but to use objects that correspond to the tables you are manipulating, typically in conjunction with the session object. SELECT queries become get() or find() calls in some ORMs, query() calls in others. INSERT becomes creating a new ob... |
24,619,003 | 0 | <blockquote> <p>I don't want to create B class object </p> </blockquote> <p>Add a constructor or factory method which doesn't require a B.</p> <pre><code>public A(B b){ this(b.getList()); } /* package local */ A(List<String> list){ this.list = list; } </code></pre> <p>By making the constructor package local it c... |
13,163,450 | 0 | Stored Procedures using LINQ with VB.Net <p>Newby here and I cant understand why the data isnt staying in the table.</p> <p>The Stored Procedure:</p> <pre><code>ALTER PROCEDURE dbo.AccountAdd @AccountName nvarchar(50) ,@Address1 nvarchar(50) ,@Address2 nvarchar(50) ,@Address3 nvarchar(50) ,@Town nvarchar(50) ,@County n... |
15,905,056 | 0 | <p>If your static lib is another project in the same solution as the project that links to the lib, then you need to set a dependency between the two projects so that the build process will build the lib first and the other project second.</p> <p>To do this, right-click on the Solution abd choose "Project dependencies... |
39,259,681 | 0 | <p>It works for me:</p> <pre><code> {ok, F} = file:read_file("warning.gif"), httpc:request(post,{Url, [],"multipart/form-data", F},[],[]). </code></pre> <p>I recieved on cowboy web server with function <code>cowboy_req:body(Req)</code>:</p> <pre><code>{ok,<<71,73,70,56,57,97,11,0,11,0,230,64,0............>>... |
40,267,118 | 0 | <p>You can create a class <code>no-gutter</code> for your <code>row</code> and remove the margin/padding that's added by bootstrap, like suggested in <a href="http://stackoverflow.com/questions/16489307/how-to-remove-gutter-space-for-a-specific-div-only-bootstrap/21282059#21282059">this post</a>:</p> <p><div class="sn... |
20,835,797 | 0 | <p>using inline-jquery</p> <pre><code>onkeyup="if($(this).val()==''){ $(this).css({'text-align':'right'})} else{ $(this).css({'text-align':'left'})}" </code></pre> <p><a href="http://jsfiddle.net/Cq5ep/" rel="nofollow">Demo</a></p> |
10,412,443 | 0 | <p>The Java final keyword is used in the Java programming language under different conditions and has different implications. For example:</p> <ol> <li>To declare a constant variable,</li> <li><p>To declare a constant method parameter.</p> <ol> <li><p>A variable declared as final must have an initialization prior to i... |
28,336,001 | 0 | <p>At each terminal node (leaf) you are printing <code>)</code>s for all parents; you should only do so for <em>consecutive right-side</em> parents.</p> <p>I suggest renaming <code>parents</code> to <code>depth</code> and adding a <code>right_depth</code> parameter.</p> <p><strong>Edit:</strong> after playing around w... |
28,113,856 | 0 | 'while' statement cannot complete without throwing an exception - Android <p>With this method I'm updating <code>TextView</code> every second. </p> <pre><code> private void UpdatingTime(final String endTime, final long diffInDays) { new Thread(new Runnable() { @Override public void run() { while (true) { try { Thread.s... |
13,205,504 | 0 | <p>An <code>IntentService</code> runs in the background on a <code>seperate Thread</code> so anything done in the service will not effect the UI. BUT once the service finishes doing what it is suppose to, the service terminates itself. </p> <p>A <code>service</code> also does stuff in the background BUT on the <code>U... |
26,539,171 | 0 | Difference between interface-abstract (not duplicate) <p>I want to know the difference between the two codes. I have a interface: lets say : </p> <pre><code>public interface iaminterface { void m1(); void m2(); void m3(); } </code></pre> <p>First Code : </p> <pre><code>public abstract class iamabstract implements iamin... |
18,949,721 | 0 | <p>Use redirect_to with status 303</p> <pre><code>def destroy @task = Task.find(params[:id]) @task.destroy redirect_to :action => :index, status: 303 end </code></pre> <p>redirect_to documentation says:</p> <p><a href="http://api.rubyonrails.org/classes/ActionController/Redirecting.html">http://api.rubyonrails.org/... |
29,035,815 | 1 | combining python lists in savetxt <p>I have 2 python lists that I want to save side by side using np.savetxt().</p> <p>I have tried:</p> <pre><code>np.savetxt('./filename.txt',np.hstack([list1,list2]),fmt=['%f','%f']) </code></pre> <p>but I get the error message</p> <pre><code>raise AttributeError('fmt has wrong shape.... |
5,779,073 | 0 | <pre><code>result = [] z = ActiveSupport::JSON.decode( '{ "0X1W6": "{\"type\":\"Hourly\",\"hr\":\"12\",\"min\":\"30\",\"every_hr\":\"5\"}", "Tk18f": "{\"type\":\"Daily\",\"hr\":\"12\",\"min\":\"30\",\"days_checked\":[1,4]}" }') z.each_value do|i| x = {} ActiveSupport::JSON.decode(i).each{|k,v| x[k.to_sym] = (v.class =... |
21,197,777 | 0 | linux shell search for number that does not ocur between numbers <p>I want to search for a number in string that does not occur between numbers.</p> <p>For example: string="10003096,10007051,10003098,10007053,10000952,10002696,10003619,900004608"</p> <p>If i search for 10003096, then it exists. But if i search for 1000... |
17,262,932 | 0 | <p>You need to invoke session_start at beginning of each file where session data is accessed.</p> |
8,978,409 | 0 | <p>The spacing is intentional and cannot be changed (without custom drawing the entire thing, which is <a href="http://christian-helle.blogspot.com/2009/10/listview-custom-drawing-in-netcf.html" rel="nofollow">not so easy in managed code</a>), as WinMo 6.5 and later supposedly moved toward more "finger friendly" UIs. ... |
39,816,968 | 0 | <p>The line</p> <pre><code>while ((nextLine = br.readNext()) != null) { </code></pre> <p>takes advantage of the fact that an "assignment" is also an "expression" that has a value - the assigned value.</p> <p>So the line, reading from inside the parentheses out, does the following:</p> <ol> <li>Calls <code>readNext()</... |
13,347,920 | 0 | Google Analytics iOS SDK - Multiple accounts <p>I am trying to make my view controllers be tracked by two different accounts on my iPhone app. I am currently using the version 1.5.1 of the SDK, which doesn't support this functionality. On the documentation of the version 2, it says that it supports multiple trackers, b... |
41,064,717 | 0 | Java thread pool executor implementation with job execution that don't exceed a defined duration <p>I want to find a way to have an thread pool executor implementation where if a thread job execution exceed a defined duration, the thread is killed (then the executor will create a new thread for a future job).</p> <p>Do... |
37,653,196 | 0 | Why isn't the divide() function working in Java BigInteger? <p>I'm attempting to divide the variable 'c' by 2(stored in 'd'). For some reason that doesn't happen. I'm passing 10 and 2 for input right now. </p> <pre><code>import java.util.*; import java.lang.*; import java.io.*; import java.math.BigInteger; class Ideone... |
23,863,338 | 0 | <p>This is a very interesting scenario. While in general, we can change any method which is returning void to return anything else without much impact, main method is a special case.</p> <p>In earlier programming languages, the return from main method was supposed to return exit values to the OS or calling environment... |
429,859 | 0 | <p>If time isn't an issue implementing OAuth security may be useful. OAuth uses a public key, and also a secret. The mess is hashed (in most cases) and the server will use the public key + it's copy of the secret to do the same hashing and make sure its result matches the requests. </p> <p>The benefit is you wouldn't ... |
22,708,037 | 0 | <p>If you want get all items in result table, you can get <code>ctx.CurrentGroup.ResultRows</code>.</p> |
26,292,279 | 0 | <p>Yes, you have a <code>return</code> on the previous line. The method is done.</p> <pre><code>return monthlyPayment; // <-- the method is finished. boolean isValid; // <-- no, you can't do this (the method finished on the // previous line). </code></pre> |
33,848,992 | 0 | <p>Store the questions and a counter to store which question has been asked in <code>$_SESSION['questions']</code>. Use the counter (also stored in the <code>$_SESSION</code>) to figure out what the next question is and increment it after each submit.</p> <p>To do this check after <code>session_start();</code> if <cod... |
9,046,428 | 0 | <p>You can't do that. You need to setup a delegate protocol. See <a href="http://www.raywenderlich.com/5191/beginning-storyboards-in-ios-5-part-2" rel="nofollow">This tutorial</a> and search down for the words "new delegate" and it will explain how that is done. That is the design pattern you need to use. There are se... |
29,683,014 | 0 | <p>You can get rid of that kernel loop to calculate <code>D</code> with this <a href="http://in.mathworks.com/help/matlab/ref/bsxfun.html" rel="nofollow"><code>bsxfun</code></a> based <a href="http://in.mathworks.com/help/matlab/matlab_prog/vectorization.html" rel="nofollow"><code>vectorized</code></a> approach -</p> ... |
11,524,076 | 0 | <p>Store the image names in an NSMutableArray and shuffle the array, e.g. via methods like <a href="http://stackoverflow.com/questions/56648/whats-the-best-way-to-shuffle-an-nsmutablearray">this SO answer</a></p> <p>Then loop over the array. </p> |
3,072,842 | 0 | <p>In addition to JQuery, Google CDN also hosts JQueryUI and all the default Themeroller CSS UI themes (including images!). If you're planning to build a UI from JQuery this is pretty clutch.</p> <p><a href="http://encosia.com/2009/10/11/do-you-know-about-this-undocumented-google-cdn-feature/" rel="nofollow noreferrer... |
21,522,600 | 0 | <p><code>160000</code> is not a timestamp in any way that PHP (or other common systems) define a timestamp. What you have is merely a time of day expressed in "military time" stored as an integer. So first of all, any <code>gm</code> function is likely not what you want to use, since you are missing timezone informati... |
16,610,057 | 0 | Spring JPA 2.0 Repository / Factory not working <p>I'm trying to implement a custom java Spring JPA repository, as described in the <a href="http://static.springsource.org/spring-data/data-jpa/docs/current/reference/html/repositories.html#repositories.custom-implementations" rel="nofollow">Spring documentation</a>. It ... |
5,450,555 | 0 | <p>I assume that you meant to return the <code>list</code> local variable that you declare in the <code>returnLists</code> function. What you'll be getting back is actually the class variable, also called <code>list</code>. This is because the local <code>list</code> variable has gone out of context by the time the co... |
10,374,930 | 1 | Matplotlib: Annotating a 3D scatter plot <p>I'm trying to generate a 3D scatter plot using Matplotlib. I would like to annotate individual points like the 2D case here: <a href="http://stackoverflow.com/questions/5147112/matplotlib-how-to-put-individual-tags-for-a-scatter-plot">Matplotlib: How to put individual tags fo... |
30,477,134 | 0 | <p>You can use the functions in xmppStreamManagement for sending the request and get received id:</p> <pre><code>[xmppStreamManagement requestAck]; </code></pre> <p>and</p> <pre><code>- (void)xmppStreamManagement:(XMPPStreamManagement *)sender wasEnabled:(NSXMLElement *)enabled - (void)xmppStreamManagement:(XMPPStream... |
37,519,872 | 0 | How to implement PTZ camera joystick and controller in AngularJS <p>I am working in a Video management application where I need to desing and implement PTZ camera controllers and joystick. </p> <p>My concern is:</p> <ol> <li><p>Is it possible to make a stick in html where user can press click and move to change the ang... |
5,179,602 | 0 | <p>you should expose a DateTime dependency property on the control, done like so:</p> <pre><code> public DateTime Day { get { return (DateTime)GetValue(DayProperty); } set { SetValue(DayProperty, value); } } // Using a DependencyProperty as the backing store for Day. This enables animation, styling, binding, etc... pu... |
30,123,349 | 0 | How do I remove empty nav tag in wordpress website? <p>Hello I would like to know how do i remove empty nav tag in the navigation bar. <a href="http://abraham-accountants.co.uk/" rel="nofollow">http://abraham-accountants.co.uk/</a></p> |
10,198,630 | 0 | <p>You may want to look at example 17-2 on the following site since it looks to cover what you are trying to do <a href="http://www.datypic.com/books/defxmlschema/chapter17.html" rel="nofollow">http://www.datypic.com/books/defxmlschema/chapter17.html</a>.</p> <p>EDIT: The feedback is that the key does need to be uniqu... |
24,039,059 | 0 | <p>In the highstock you cannot use categories, only datetime type, so you should parse your data to timestamp and use it in the data.</p> |
17,151,984 | 0 | <p>In the calendar setter area you getting the instance with actual date, then changing it's value, but not with add or substracting some piece of time. It's value is totally differs from the expected, because you setting absolute values not relatives.</p> <p>I've just extracted the calendar changes from your code and... |
8,916,704 | 0 | <p>You can do it with Generalized Algebraic Data Types. We can create a generic (GADT) type with data constructors that have type constraints. Then we can define specialized types (type aliases) that specifies the full type and thus limiting which constructors are allowed.</p> <pre><code>{-# LANGUAGE GADTs #-} data Ze... |
23,598,839 | 0 | angular.js nested directive scope scope attribute <p>I would like to to a "map" tag witch should contains "marker" tags.</p> <p>my problem is that I would like to set the "marker" attributes using variables from the "map" parent scope.</p> <p>if I do this:</p> <pre><code> <map center="{{userPosition}}"> <marke... |
38,958,511 | 0 | java on osx - xmx ignored? <p>i've got two computers running on Mac OS X El Capitan and Ubuntu 16.04 LTS. On both is Java SDK 1.8.0_101 installed.</p> <p>When I try to start an game server on Ubuntu with more memory than available, I get the following output:</p> <pre><code>$ java -Xms200G -Xmx200G -jar craftbukkit.jar... |
4,927,396 | 0 | <pre><code>var lis = $('ul > li'); function switchClass(i) { lis.eq(i).removeClass('current'); lis.eq(i = ++i % lis.length).addClass('current'); setTimeout(function() { switchClass(i); }, 2000); } switchClass(-1); </code></pre> <p><a href="http://jsfiddle.net/7ec63/" rel="nofollow">http://jsfiddle.net/7ec63/</a></p... |
31,526,846 | 0 | <p>This could be accomplished with a one-line PowerShell command:</p> <p><code>powershell "Get-ChildItem C:\...\Archives\*.* | Where-Object {$_.Name -notlike '"*_XYZ.*'"} | Foreach-object {Rename-Item -Path $_.FullName -NewName ($_.name -replace '\.', '_XYZ.')}"</code></p> |
7,830,596 | 0 | <p>Call <a href="http://developer.android.com/reference/android/app/Dialog.html#setCancelable%28boolean%29" rel="nofollow">setCancelable</a> using the false argument. Like this:</p> <pre><code> progressDialog.setCancelable(false); </code></pre> |
2,473,282 | 0 | <p>Simply put you can't. There are a couple of approaches to work around this problem though.</p> <p>The most common is to use an interface. Say <code>IMyType</code></p> <pre><code>interface IMyType { void foo(); } class A : IMyType ... class B : IMyType ... void bar<T>(T t) where T : IMyType { t.Foo(); } </code... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.