pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
15,491,442
0
<p>First things first, the CoffeeScript compiler already has a <code>join</code> command: </p> <blockquote> <pre><code>-j, --join [FILE] </code></pre> <p>Before compiling, concatenate all scripts together in the order they were passed, and write them into the specified file. Useful for building large projects.</p> </b...
7,936,970
0
<p>If you can display at most one set of topicdetails at a time, have one div set to position 0,0 with <code>display</code>=<code>none</code>. Whenever you need it to show, set the location appropriately (get it from the mousover/hover DOM element, or whatever you use to trigger the event that displays it), and load/s...
32,507,690
0
OSX codesign for a specific macho binary <p>I have a simple C code that i can gcc on my OS X. (I'm using El Capitan beta.) I know there are many guides for signing apps in Xcode. But I just want to codesign for this specific macho binary.</p> <p>Is there any way to do it? Also, do i have to have an apple developer acco...
28,232,187
0
<p>First, create examples for all these cases, and order them correctly by their intended priority:</p> <pre><code>status date -------------- past_due d1 past_due d2 open d1 open d2 paid d2 paid d1 future ? draft d2 draft d1 </code></pre> <p>Then, assign numbers so that <code>ORDER BY status2, date2</code> would work ...
16,738,910
0
<p>In addition to cellEditor it is necessary to do the cellRenderer to paint the combobox in the cell, look at this:</p> <pre><code> public void example(){ TableColumn tmpColum =table.getColumnModel().getColumn(1); String[] DATA = { "Data 1", "Data 2", "Data 3", "Data 4" }; JComboBox comboBox = new JComboBox(DATA); De...
17,431,610
0
DictionaryEntry to user object <p>I have a custom user object class appuser</p> <pre><code> public class appuser { public Int32 ID { get; set; } public Int32 ipamuserID { get; set; } public Int32 appID { get; set; } public Int32 roleID { get; set; } public Int16 departmenttypeID { get; set; } public generaluse.historyc...
34,672,529
0
Algorithmic complexity of Data.Hashtable <p>I am attempting to write a function that utilizes hashes (for an implementation of A*).</p> <p>After a little bit of research, I have found that the defacto standard is <code>Data.Map</code>.</p> <p>However, when reading the API documentation, I found that: <code>O(log n). Fi...
17,020,545
0
Doctrine 2 Postgresql stock procedure mapping <p>i 'd like to associate to a doctrine entity a postgresql stock procedure (which returns a table as result) instead of a table</p> <p>Ex : the procedure Get_Uuser(sexe, age) search all the users for the selected parameters et returns a collection of user_id (names user_id...
12,379,448
0
<p>Concider using the fitting layout manager that will help you expand the way you want to when you add the components</p> <p><a href="http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html">http://docs.oracle.com/javase/tutorial/uiswing/layout/visual.html</a></p> <p>I think you are looking for the GridLayo...
14,319,708
0
<p>Implementing the control is exactly the same as implementing it in pure ASP.NET - no difference.</p> <p>To include it in Sitefinity, you have to register it in the toolbox. Here is the documentation for this: <a href="http://www.sitefinity.com/documentation/documentationarticles/adding-controls-to-the-toolbox" rel=...
1,571,395
0
htm vs html which one should be preferred? <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/1163738/htm-vs-html">.htm vs .html</a> </p> </blockquote> <p>I have seen many static webpages having two variants of file extensions, which one is preferred and why there are t...
30,683,719
0
Android - Activity uses or overrides a deprecated API <p>I have literally created a brand new Android Project on the latest Android Studio. The first thing I did was to add the `Realm' library to the project by adding the following to the gradle file:</p> <pre><code>compile 'io.realm:realm-android:0.80.3' </code></pre>...
29,559,289
0
<p>I can't simulate this, but after read your code I assume this code will work.. First add marker as your pin property:</p> <pre><code>self.mapPin = function (name, lat, lon, text) { this.name = ko.observable(name); this.lat = ko.observable(lat); this.lon = ko.observable(lon); this.text = ko.observable(text); this.ma...
30,978,896
0
<p>please try closing the classloader before you 'unload' it.</p> <pre><code>public void unloadJarAndClass() throws IOException { dukeClassLoader.close(); /* all object must be collected in order to reload jar */ jarFile = null; dukeClassLoader = null; classToLoad = null; // System.gc(); don't do this unless you're re...
26,158,808
0
<p>This error is caused by a product without ID. Check that all your *.product files specify an ID on the Overview tab of the Product Configuration Editor.</p>
22,905,119
0
create image of application and store to database <p>I have create a application in c#. What my problem was when user try to edit something new to database via this application, it will not save to main table in database directly, but will store on another table, and waiting for another user to approve it.</p> <p>In th...
2,161,403
0
<p>Looking at the documentation for <a href="http://developer.android.com/intl/fr/reference/android/media/MediaRecorder.AudioSource.html" rel="nofollow noreferrer"><code>MediaRecorder.AudioSource</code></a> I would say that this should be possible using the <a href="http://developer.android.com/intl/fr/reference/andro...
23,107,989
0
How to Construct the Email To activity in SharePoint 2013 Workflow <p>I am using SharePoint 2013 SP1 and I am having a problem constructing the Email Activity To attribute. </p> <p>Here's where I am at. I have a created a custom workflow and custom association and initiation form using SharePoint 2013.</p> <p>My Assn. ...
22,568,824
0
<p>You are targeting a class called div instead of the tag. Remove the leading dot and you should be fine.</p>
11,159,314
0
<p>If the response is between 199 and 300 ( >= 200 and &lt; 300 ) or equal to 304 and the responseText can be successfully converted to the dataType that you provide (text by default), it is considered a successful request.</p> <p>For example, if you return JSON and you get a 200 response status but it fails, it is mo...
18,550,614
0
<p>Something along the lines of this, however you will have to do more checks to see if the socket is still alive or not, etc.</p> <pre><code>var net = require('net'); var sockets = {}; var server = net.createServer(function(c) { //'connection' listener var name = generate_name_from_con(c); console.log('server connect...
40,401,338
0
Sequelize: Query an association table <p>I have trouble querying an association table using sequelize. I have 3 tables: User, Roles and UserRoles. A user can have many roles.</p> <p>I am trying to query in UserRoles (which stores userID and roleID ).</p> <pre><code>var User = sequelize.define('User', { // }, { classMet...
10,260,250
0
<p>According to Net::HTTP doc you can do </p> <pre><code>res = Net::HTTP.post_form("example.com/index.html", 'q' =&gt; 'ruby', 'max' =&gt; '50') puts res.body </code></pre> <p>see <a href="http://ruby-doc.org/stdlib-1.9.3/libdoc/net/http/rdoc/Net/HTTP.html#method-c-post_form" rel="nofollow">http://ruby-doc.org/stdlib-...
15,416,342
0
Unknown extern method T System.Nullable`1::get_Value() <p>I've run into a problem with my dot42 C# project:</p> <pre><code>Unknown extern method T System.Nullable`1::get_Value() at System.Void NokiaStyleProfiles.AddDialogue::btnAdd_Click(System.Object,System.EventArgs) (c:\Users\STO\Documents\Visual Studio 2012\Project...
6,214,666
0
<p><a href="https://github.com/harrah/xsbt/tree/0.9" rel="nofollow"><strong>SBT 0.9.x</strong></a>:</p> <pre><code>(sourceDirectories in Test) := Seq(new File("src/test/scala/unit"), new File("src/test/scala/functional")) </code></pre> <p><strong>SBT 0.7.x</strong>:</p> <pre><code>override def testSourceRoots = ("src"...
35,177,226
0
<p>The problem is here:</p> <pre><code>***Variables*** ... ${headers}= Create Dictionary Cache-Control no-cache </code></pre> <p>You cannot call keywords like <code>create dictionary</code> in the variables table. The above code is setting <code>${headers}</code> to be the <em>string</em> <code>"Create Dictionary Cach...
33,513,140
0
<p>In the project window of your IDE click on the options menu(small gear icon) and disable the "Flatten Packages" option. This will make things more straight forward.</p> <p>From there you can simply right click on the ui package and select <code>new -&gt; package</code> to create your <code>actvt2</code> package.</p...
24,573,963
0
Move Constructor - invalid type for defaulted constructor VS 2013 <p>I was reading regarding move constructor and I did this code in VS 2013...</p> <pre><code>class Student { unique_ptr&lt;string&gt; pName_; public: Student(string name) : pName_(new string(name)) { } ~Student() { } Student(Student&amp;&amp;) = default;...
15,213,955
0
What is the intersection of two languages with different alphabets? <p>I did some googling on this and nothing really definitive popped up.</p> <p>Let's say I have two languages A and B.</p> <p>A = { w is a subset of {a,b,c}* such that the second to the last character of w is b }</p> <p>B = { w is a subset of {b,d}* su...
5,912,697
0
<p>A better way to solve this issue, in my opinion, would be to edit your ~/.profile or /etc/bashrc and add the line:</p> <pre><code>export ARCHFLAGS="-arch i386 -arch x86_64" </code></pre> <p>Will save messing around with any future installations (I've just had to do this for installing lots of Perl modules in CPAN)!...
2,600,840
0
<p>A new window is generally prompted by a target attribute on the A tag:</p> <pre><code>&lt;a href="#" target="_blank"&gt;linktext&lt;/a&gt; </code></pre> <p>FF can supress/override this behaviour in it's preferences.</p>
30,041,096
0
c++ pass by reference safely and compile time checking on size <pre><code>SpiDeviceDriver::SPI_Error SpiDeviceDriver::SPI_ReadBytes( quint32 size_, QVector&lt;quint8&gt;&amp; rxData_ ) { //Get data and fill QVector&lt;quint8&gt; with data } </code></pre> <p>I'm trying to call a class function (from another class) and p...
24,877,080
0
<p>you just want a scatter plot of points with x and y coordinates and a colour representing a third variable?</p> <p>this is what scatter is for, just use:</p> <pre><code>import matplotlib.pyplot as plt plt.scatter(x, y, c=z, cmap='jet') </code></pre> <p>you can give it any other colormap, all possibilities are shown...
33,296,848
0
<p>You can try to override:</p> <pre><code>- (void) setSelectedSegmentIndex:(NSInteger)toValue </code></pre>
39,873,396
0
<p>In my opinion, the best way to do this is to simply use the Firebase Realtime Database:</p> <p>1) Add Firebase support to your app</p> <p>2) Select 'Anonymous authentication' so that the user doesn't have to signup or even know what you're doing. This is guaranteed to link to the currently authenticated user accoun...
2,063,352
0
Caliburn and datatemplates in Silverlight 3 <p>Does anyone know if the same functionality for displaying views depending on object/viewmodel is applicable to Silverlight 3?</p> <p>Like this:</p> <pre><code>&lt;Application.Resources&gt; &lt;DataTemplate DataType="{x:Type vm:CustomerViewModel}"&gt; &lt;view:CustomerView ...
7,613,396
0
<p>In Visual Studio 2010, you now can apply a transformation to your web.config depending on the build configuration.</p> <p>When creating a web.config, you can expand the file in the solution explorer, and you will see two files:</p> <ol> <li>Web.Debug.Config </li> <li>Web.Release.Config</li> </ol> <p>They contains t...
38,499,744
0
<p>Solution for this was to install <a href="https://msdn.microsoft.com/en-us/goglobal/bb964665.aspx" rel="nofollow">Microsoft Keyboard Layout Creator</a> Then to modify selected Keyboard layout and switch these characters.</p>
7,411,418
0
<p>If you only needs config file and not necessarily XML, take a look on <a href="http://www.boost.org/doc/libs/1_47_0/doc/html/program_options.html" rel="nofollow">Boost Program Options</a></p> <p>It is simple and easy to use. It use the format of .ini file.</p> <p>Example of .ini file:</p> <pre><code>[info] name=som...
38,225,875
0
<p>My apologies, I am able to set user metadata through <a href="https://github.com/softlayer/softlayer-java" rel="nofollow">SoftLayer API Client for Java</a>, here a java script, try this and let me know if you continue having issues please. Make sure to use master branch from the client.</p> <p>Script:</p> <pre><cod...
10,109,579
0
<p>Already found a solution, 2 classes need to be modified:</p> <p>class Doctrine_Query, change preQuery method:</p> <pre><code>public function preQuery() { $doctrine_manager = Doctrine_Manager::getInstance(); if ($this-&gt;getType() == Doctrine_Query::SELECT) { $this-&gt;_conn = $doctrine_manager-&gt;getConnection('s...
31,969,526
0
<p>To find the solution, I set up a virtual environment with seven Redis servers running simultaneously. They were set with sequential port numbers, with the default Redis port (6379) instance being the master. I configured two instances to be slaves to Instance_6379, and configured two more slaves each for Instance_6...
24,169,795
1
How to pass function parameters with parameter names to an external program in R? <p>For example,</p> <pre><code>passpara = function(pa, pb, pc) { # pa is not passed do1(pa) # pb and pc are passed # passed == "--pb pb_value --pc pc_value" # getpass is something I am trying to figure out passed = getpass(pb, pc) system(...
18,012,404
0
<p>Try to use this example</p> <pre><code>$(function(){ $('#structure').click(function(){ $('#div1').html($('&lt;div&gt;', {'text' : 'structure'})); }); $('#style').click(function(){ $('#div1').html($('&lt;div&gt;', {'text' : 'style'})); }); }); </code></pre> <p>Update</p> <pre><code>$(function(){ // load default div ...
614,407
0
<p>have you tried to clean/rebuild UnitTest++ library projects (if it is build form sources)?</p>
32,590,195
1
Django development server inaccessible from the internet <p>I'm running a Django development server with</p> <pre><code>python manage.py runserver 0.0.0.0:8000 </code></pre> <p>It is perfectly accessible from the local machine, but not from the outer world. Windows 8.1, Python 3.4.3, Django 1.8.4.</p> <p>I've tried a d...
7,649,802
0
<p><code>is_numeric</code> checks more:</p> <blockquote> <p>Finds whether the given variable is numeric. Numeric strings consist of optional sign, any number of digits, optional decimal part and optional exponential part. Thus +0123.45e6 is a valid numeric value. Hexadecimal notation (0xFF) is allowed too but only wit...
9,381,345
0
<p>What you are referring to is called subdomains. Have a look here for more information on them: <a href="http://en.wikipedia.org/wiki/Subdomain" rel="nofollow">http://en.wikipedia.org/wiki/Subdomain</a> </p>
25,928,517
0
<p>You may need to add ng-model also to your directive to bind the selected value to controller scope.</p> <p>This might be what your are looking at:</p> <pre><code> app.directive('locselect', function () { function link(scope, element, attrs) { scope.ngModel = scope.defaultItem; console.log(scope.items); } var select...
30,289,858
0
Is it possible to pull/push my local MYSQL db to the heroku postgresql db? <p>I need to pull the heroku db to my local and also push my db to the heroku remote. Locally I have MYSQL and in heroku it is Postgresql. I found lot ways suggested in internet but none seems to be working and most of them are very old and thin...
20,084,919
0
<pre><code>$return_value = $driver-&gt;wait()-&gt;until($expectedCondition) </code></pre>
26,904,714
0
swt add widgets towards right in formLayout <p>Here is my code:</p> <pre><code>Composite outer = new Composite(parent, SWT.BORDER); outer.setBackground(new Color(null, 207, 255, 206)); // Green FormLayout formLayout = new FormLayout(); formLayout.marginHeight = 5; formLayout.marginWidth = 5; formLayout.spacing = 5; out...
37,147,998
0
PHP mysql returns null, hard coded SQL query works <p>I'm having an issue in which I'm unable to get my database query within a PHP program to work. The query works fine within the program if it is hard coded, but it fails otherwise and passes back no results. I have echo'd the two results and am given a different stri...
35,951,605
0
Swift xcode two errors: load controller is not allowed and autoresize not equal to views window <p>EDIT: If you need me to post more class programs just let me know in the comments.</p> <p>Screenshot of what I'm trying to create: <a href="http://i.stack.imgur.com/dmuFw.png" rel="nofollow">enter image description here</...
30,077,156
0
<p>Try this code</p> <pre><code>var trArray = []; $('#tbPermission tr').each(function () { var tr =$(this).text(); //get current tr's text var tdArray = []; $(this).find('td').each(function () { var td = $(this).text(); //get current td's text var items = {}; //create an empty object items[tr] = td; // add elements to...
37,700,393
0
Using Draft.js with Reagent <p>Does anyone have any luck adapting Draft.js for Reagent? There's pretty heavy editing issues if Draft.js is imported right away via <code>reagent/adapt-react-class</code>. Cursor jumps, disappearing symbols when you're typing, <code>onChange</code> calls with incorrect <code>EditorState</...
4,432,210
0
<p>Appears to function as design.</p>
22,284,644
0
<p>I got it to compile just fine with MinGW using the following script:</p> <pre><code>del *.o winurl.exe windres winurl.rc winurlres.o gcc -c winurl.c gcc -o winurl.exe winurl.o winurlres.o C:\MinGW\lib\libgdi32.a -mwindows strip winurl.exe del *.o </code></pre>
30,128,784
0
<p>You will want to call gapi.auth.init. See the docs here: <a href="https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauthinit" rel="nofollow">https://developers.google.com/api-client-library/javascript/reference/referencedocs#gapiauthinit</a></p> <blockquote> <p>Initializes the ...
40,739,479
0
<p>Okay, @Arnold I'm not sure that I fully understand your question, but in case it helps, you could use the <code>background-size</code> and <code>background-repeat</code> properties, for example:</p> <pre><code>&lt;div style="background-image: url('file.png'); background-size: x% y%; background-repeat: repeat-x;"&gt...
37,391,424
0
<p>Use something similar:</p> <pre><code>if (pass1.value &amp;&amp; pass2.value &amp;&amp; pass1.value == pass2.value) { pass2.style.backgroundColor = goodColor; message.style.color = goodColor; message.innerHTML = "Passwords Match!" $("#submit").prop("disabled", false); } else { pass2.style.backgroundColor = badColor...
6,478,410
0
<p>If I have not wrongly misinterpreted your question, then here is what you want to do - </p> <ul> <li>Extract a .tgz file which may have more .tgz files within it that needs further extraction (and so on..) </li> <li>While extracting, you need to be careful that you are not replacing an already existing directory in...
39,453,810
0
<p>Have you added this to your manifest?</p> <pre><code>&lt;manifest ... &gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; ... &lt;/manifest&gt; </code></pre> <p>Also, to be sure you have enable the location update in your phone setting, you can prompt the user to enable it <a href=...
8,625,308
0
<pre><code>var months = new Array("jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"); var ddSplit = '12/23/2011'.split('/'); //date is mm/dd/yyyy format alert(ddSplit[1]+'-'+months[ddSplit[0]-1] + '-' + ddSplit[2]) </code></pre>
18,072,451
0
How to get id from selecting its value in spinner? <p>I want to get the id of the value selected in the spinner who's value is derived from Sqlite.</p> <p>My table in Sqlite is </p> <p>CITY_ID CITY_NAME <BR></p> <p>8 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BOMBAY <BR> 9 &nbsp;&nbsp;&nbsp;&nbs...
9,145,911
0
<p>You probably want to move your whiteLine subview initialization to <code>initWithStyle:reusedIdentifier:</code> Currently you set up the alpha before it gets instantiated. Also, you're creating a new view every time drawRect: is called, which definitely is a no-no as well.</p> <p>I'm not currently at the compiler, ...
14,363,994
0
Android debuggable=false causing jQuery.ajax POST to fail in Cordova/Phonegap Eclipse project <p>I have an Android app built in Eclipse which uses Cordova 2.0.0. When built and loaded onto the phone using the Eclipse debugger the app works fine, but when I set android:debuggable="false" in the AndroidManifest file the ...
22,050,293
0
<p>You're very close actually:</p> <pre><code>columns.Bound(property =&gt; property.neatProperty).Width(38).EditorTemplateName("neatPropertyDropDownList").Title("NeatProperty") </code></pre> <p>And then in a separate view called "neatPropertyDropDownList.cshtml"</p> <pre><code>@using System.Collections; @(Html.Kendo()...
32,644,740
0
<p>If you want to generate a view with multiple model objects then you need to create a ViewModel comprising properties that are needed from those models. And then reference the view with this ViewModel.</p> <pre><code>public class Model1 { public string prop11 { get; set; } public string prop12 { get; set; } } public...
34,349,524
0
getting error no implicit conversion of sequel <p>how to do below query in ruby sequel </p> <pre><code>table1.column1 = concat('a' + table2.column2 + 'b') </code></pre> <p>without 'a' </p> <pre><code>sequel.qualify(:table1, :column1) = concat(sequel.qualify(:table2, :column2) + 'b') </code></pre> <p>wokring properly.wh...
814,891
0
<p>So one could make a custom control but for my app it isn't really worth the trouble.</p> <p>What I did was to create a DataGrid, made it resemble a ListView but with its own flare. I did this because the DataGrid already has a buttoncontrol built in to its cells.</p> <p>Yes I know, kind of fugly "hack", but it work...
27,519,683
0
<p>The <code>input[type=file]</code> is a native browser object and can't be changed within.</p> <p>What you can try and do is create a custom wrapper.</p>
10,398,362
0
Membership system <p>can anyone suggest a good membership structure?</p> <p>For example, user paid for 1 month membership, starting 1.2.2012 ending 1.3.2012.</p> <p>When and where is the best way to check if user is still a member or not?</p> <p>Users are ranked with numbers in database (1-regular 2-member 3-moderator)...
13,918,646
0
presentRenderbuffer using memory? <p>I have simple drawing code like the following - repeated calls to draw several objects, followed by one call to glBindRenderbufferOES and one call to presentRenderbuffer - </p> <p>Objects draw fine, BUT - the call to presentRenderBuffer allocates a good amount of memory with each ca...
11,895,514
0
<p>you need to add this <code>"$(SDKROOT)/usr/include/libxml2"</code> in your <code>header search paths</code> and it will solve your problem!</p>
15,336,162
0
Shared_Ptr eates the performance of my application <p>I'm on Ubuntu, and I'm working on a computer vision application (optical flow), and I'm doing some profiling on the code using valgrind. After profiling, I found that the shared_ptr is taking 74% of the application. Kindly find the attached code that where the share...
17,220,286
0
<p>It would be pretty easy to have an external system (simple .Net app) that collects the new tickets and "synchronizes" them to CRM with a tool like Scribe/CozyRoc. </p> <p>I'm not sure if this type of "system-to-system" integration would permit standard licensing however. I have heard of Microsoft give very good dea...
36,987,550
0
How to Clear all the list view items of a Static Custom list view in android? <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>package com.donateblood.blooddonation; import android.app.ProgressDialog; import android.cont...
19,990,356
0
how to parse multiple file names and get relevant information in C# asp aspx <p>I've been trying to figure out a way for the program to read all of the files from the path or zip file as input. Than read all of the file names inside of the input folder and split it so I can get information such as what is product id an...
533,370
0
<p><code>Thread.Abort</code> will close the thread, of course, as it will call Win32 <a href="http://msdn.microsoft.com/en-us/library/ms686717(VS.85).aspx" rel="nofollow noreferrer"><code>TerminateThread</code></a>.</p> <p>Outcome of this action will depend on how your <code>API</code> likes to be closed by <code>Term...
34,706,311
0
why does every process(or any address space) has its own page table? <ol> <li><p>Why does every process (or any address space) have its own page table? </p> <ul> <li>I think that if we use a single page table for all processes, then a process can access the address apace of other processes so we need a separate page ta...
6,544,387
0
<p>I think you have to see Density Considerations for Preventing from Scaling.</p> <p>The easiest way to avoid pre-scaling is to <code>put the resource in a resource directory</code> with the nodpi configuration qualifier. For example:</p> <pre><code>res/drawable-nodpi/icon.png </code></pre> <p>When the system uses th...
38,984,063
0
<p>This is common phenomena occurring if the class frequencies are unbalanced, e.g. nearly all samples belong to one class. For examples if 80% of your samples belong to class "No", then classifier will often tend to predict "No" because such a trivial prediction reaches the highest overall accuracy on your train set....
15,005,825
0
<p>How about putting the Direction and Type as members of the enum, something like this:</p> <pre><code>public enum State { ONE_STATE(Direction.LEFT, Type.BIG), SECOND_STATE(Direction.RIGHT, Type.SMALL); THIRD_STATE(Direction.UP, Type.SMALL); private Direction direction; private Type type; private State(Direction dire...
21,228,301
0
<p>Another point is Elasticache is dynamic , you can decrease/increase the memory you use dynamically, or even close the cache(and save $$) if your performance indexes are in the green.</p>
28,649,728
0
Devexpress LookUpEdit - serach second column by value meber <p>I want to know it is posible to filters **LookUpEdit ** dropdown list by the column that corresponds to the ValueMember value. </p> <pre><code> LookUpEdit.DataSource = ds.Tables(0) LookUpEdit.ValueMember = ds.Tables(0).Columns("VALUE").Caption.ToString Look...
3,164,525
0
<p>Also you can create something like:</p> <pre><code>public class JqGridJsonData { public int Total {get;set;} public int Page {get;set;} etc } </code></pre> <p>And serialize this to json with Json.NET <a href="http://james.newtonking.com/pages/json-net.aspx" rel="nofollow noreferrer">http://james.newtonking.com/page...
10,360,986
0
Classes C++. Multiple inheritance <p>I have a question about multiple inheritance. I have class A. Class A has several inheritors, for instance B,C,D.</p> <p>Class X is inheritor of classes B,C,D How can I pass parameters from the constructor of class X to the constructor of class A? </p>
31,862,922
0
<p>The same as option #1 from @zessx, but without overriding CSS. This one also aligns labels to the right to increase space between label-control pairs. Class "media" is there to add top margin without creating a custom class, but in general case it is better to have a custom one.</p> <pre><code>&lt;div class="form-h...
20,753,449
0
<p>To do this, you could e.g. use a <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html" rel="nofollow">bool</a>-query with a <code>should</code> to weigh in a <a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-span-first-query....
22,882,580
0
Put date range to array <p>I have two JQuery datepicker on my page, I want to put all the days between the two dates to an array.</p> <p>How Can I work it out? Here is my snippet:</p> <pre><code>function mennyi() { var dtFrom = document.getElementById('arrival').value; var dtTo = document.getElementById('departure').va...
24,572,646
0
<p>Just a thought(hadn't tried practically)</p> <pre><code>SELECT * FROM TABLE_NAME having max(na) = na GROUP BY nm_mp </code></pre> <p>If it works or doesn't work, do tell me. Its for all category.</p> <p>For just that two category, try this.</p> <pre><code>SELECT * FROM TABLE_NAME WHERE nm_mp IN('matematika', 'bahas...
2,452,414
0
http handlers not working on web server but works on localhost <p>i have a couple of xml files in my asp.net web application that i don't want anyone to access other than my server side code. this is what i tried..</p> <pre><code>&lt;add verb="*" path="*.xml" type="System.Web.HttpForbiddenHandler" /&gt; </code></pre> <...
15,525,673
0
<p>The code sample you provided will not work. You need to return the new size or pass in the reference to the form object.</p> <pre><code> public void SetFormProperties(Form form){ fprm.Size = new Size(20,20); } SetFormPropertoes(form); </code></pre> <p>OR</p> <pre><code> public Size GetFormSize(){ return new Size(20...
18,833,771
0
<p>"android:process" and "android:taskAffinity" allows you to have different processes and affinities within the same package (application). </p> <p>"android:multiprocess" simply means if you want to allow the activity to have a different process-id. This only works within the same app, not when the activity is starte...
1,299,551
0
<p>The other answers here are similar but ...</p> <pre><code>Sub DiplayData(rst) Response.Write rst.Source End Sub DisplayData rs1 </code></pre> <p>Note <code>Sub</code> not <code>Function</code> since no value is returned. Also where you call a procedure as statement rather than as a function whose value you are assi...
19,191,449
0
iOS FBDialog crashes after clicking on Post <p>I am trying to create a share dialog to post on Facebook the user action. To do that I use this code:</p> <pre><code>id&lt;FBGraphObject&gt; fbObject = [FBGraphObject openGraphObjectForPostWithType:@"namespace:action" title:@"Titolo" image:imageURL url:URL description:@"de...
40,170,934
0
jqueryUI datepicker not showing within ng-if directive of angularjs <p>I have a sample <a href="https://jsfiddle.net/mpsbhat/qx9sxo8w/4/" rel="nofollow">here</a> where date picker is defined as </p> <pre><code>&lt;div ng-if="show_d"&gt; &lt;input id="date2" type="text" ng-model="date2"&gt; &lt;/div&gt; </code></pre> <p...
18,166,021
0
<p>If it's just a single input, you can use <a href="https://developer.mozilla.org/en-US/docs/Web/API/window.prompt" rel="nofollow">the built-in prompt()</a> method.</p> <p>Otherwise, you would have to <a href="http://stackoverflow.com/questions/6265574/popup-form-using-html-javascript-css">pop up your own form</a>.</...
12,156,550
0
<p>if i'd understood your correctly, python example:</p> <pre><code>&gt;&gt;&gt; a=[1,2,3,4,5,6,7,8,9,0] &gt;&gt;&gt; &gt;&gt;&gt; &gt;&gt;&gt; len_a = len(a) &gt;&gt;&gt; b = [1] &gt;&gt;&gt; if len(set(a) - set(b)) &lt; len_a: ... print 'this integer exists in set' ... this integer exists in set &gt;&gt;&gt; </code>...