pid
int64
2.28k
41.1M
label
int64
0
1
text
stringlengths
1
28.3k
15,862,443
0
Populate cells with two numbers only using vba <p>Please help me, what I am trying to do is to populate cells N2:N1041 with numbers 0 and 2. I want total of 100 cells (random cells to be filled in) in column N to be populated with "0" and the remaining 940 cells to have "2". Or in other words, I want the 9.6% of the ra...
21,150,512
0
Best way to retrieve the prototype of a JS object <p>Trying to understand Prototypes in Javascript. For this example:</p> <pre><code>var obj = new Function(); obj.prototype.x = "a"; </code></pre> <p>Why do I get different results from </p> <pre><code>console.log(obj.__proto__); </code></pre> <p>and </p> <pre><code>cons...
9,271,901
0
<p>That's definitely an error with <code>getdisc</code> not being visible to the linker but, if what you say is correct, that shouldn't happen.</p> <p>The <code>gcc</code> command line you have includes <code>graph1.c</code> which you assure use contains the function.</p> <p>Don't worry about the object file name, tha...
37,013,246
0
<p>When I make an zero array with your dtype</p> <pre><code>In [548]: dt=np.dtype([('MSFT','float'),('CSCO','float'),('GOOG','float') ]) In [549]: A = np.zeros(3, dtype=dt) In [550]: A Out[550]: array([(0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0)], dtype=[('MSFT', '&lt;f8'), ('CSCO', '&lt;f8'), ('GOOG', '&lt;f8')...
31,987,320
0
<p>Google recommands to not use WakefulBroadcastReceiver anymore but GCMReceiver and GcmListenerService on Android. Making this change may solve your problem</p> <p><a href="https://developers.google.com/cloud-messaging/android/client" rel="nofollow">source here</a></p>
17,011,677
0
<p>I think you're going to have to handle the quotes after you get the token back because in <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Scanner.html#next%28java.util.regex.Pattern%29" rel="nofollow">the <code>Scanner#next(String)</code> method</a>, the regex is used to <em>test</em> the next token, no...
6,129,787
0
MYSQL Statistics <p>I write a class to check some statistics and I don't know what mean the terms and If they are bad </p> <blockquote> <pre><code>$array = explode(" ", mysql_stat()); foreach ($array as $value){ echo $value . "&lt;br /&gt;"; } </code></pre> </blockquote> <p>and output:</p> <pre><code>Uptime: 4520 Threa...
40,053,035
0
<p>Create a <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms632599.aspx#message_only">message-only window</a>, and handle the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa376890.aspx">WM_QUERYENDSESSION</a> and/or <a href="https://msdn.microsoft.com/en-us/library/windows/desk...
16,880,871
0
<p>I'd recommend not using synchronous ajax request, it would be better to use a callback. You could itterate through every house object like so:</p> <pre><code>function displayJson() { var i,h,ret=[]; var myDiv =document.getElementById("content"); // houseone and housetwo for (h in houses) { // houseone and housetwo ...
32,503,253
0
How to move a node to the position I touch in SpriteKit with Swift? <p>I am creating a game like Doodle Jump (without the accelerometer).</p> <p>I have been trying to figure this out, but I can't seem to make it run as smoothly as I've been hoping. </p> <p>Here is my code for my touches functions:</p> <pre><code>overri...
9,889,226
0
show server time using php and jquery ajax <p>I was trying to show the date and time of server using php and jquery ajax. following are the jquery script to show datetime </p> <pre><code>&lt;script type= "text/javascript" src="jquery-1.4.1.min.js"&gt; &lt;/script&gt; &lt;script type= "text/javascript"&gt; $(document).r...
27,106,380
0
<p>Seems like the <code>webkitbeginfullscreen</code> event is getting fired.</p> <p>So now I probably will use something like this:</p> <pre><code>videoEl.addEventListener('webkitbeginfullscreen', function() { screen.lockOrientation('landscape-primary'); }, false); videoEl.addEventListener('webkitendfullscreen', funct...
32,141,981
0
<p>From the command line you can run specific scenarios from the same feature file using a colon between the line numbers, like this:</p> <pre><code>cucumber tests/features/my.feature:37:52 </code></pre> <p>If scenarios are defined at lines 37 and 52, both would be executed by cucumber.</p> <p>You can likewise run spe...
15,120,243
0
<p>Easiest example I can think of would be a method that sends some content to a JMS server. If you are in the context of a transaction, you want the message to be coupled to the transaction scope. But if there isn't already a transaction running, why bother calling the transaction server also and starting one just to...
20,407,954
0
Javascript obfuscate AJAX code <p>First of all sorry if the name of the topic isn't the most correct.</p> <p>Imagine the following code which connects to a PHP file by AJAX.</p> <pre><code>function get_locales(){ var the_locale = $('#page-add-text').val(); var url = "classes/load_info.php?type=locale&amp;value=" + the_...
37,210,054
0
Show nearby therapist when user gives place input using google maps javascript api <p>I've integrated google maps javascript api in my web app to use some of its features. I am fetching the user's current location and displaying nearby physiotherapist based on their current location. Now I also want to display nearby p...
25,242,974
0
If div wider cut left side of div <p>I couldn't find anything similar that's why I need your help.</p> <p>I'm trying to do something similar to <a href="http://jsbin.com/xeniy/1/edit" rel="nofollow">this</a></p> <p>The idea is the inner div floated to left but when it became wider than the parent it's stick to the righ...
16,129,329
0
<p>This is all you need:</p> <pre><code>... &lt;key&gt;cell&lt;/key&gt; &lt;string&gt;PSButtonCell&lt;/string&gt; &lt;key&gt;action&lt;/key&gt; &lt;string&gt;buttonCellClicked:&lt;/string&gt; ... </code></pre> <p>This will make a button cell and send the <code>buttonCellClicked:</code> message on the preferences view ...
6,346,492
1
how to stop a for loop <p>I am writing a code to determine if every element in my nxn list is the same. i.e. [[0,0],[0,0]] returns true but [[0,1],[0,0]] will return false. I was thinking of writing a code that stops immediately when it finds an element that is not the same as the first element. i.e:</p> <pre><code>n=L...
28,118,476
0
my header-files (.h) are too large to render the 3d model in opengl es 2 <p>Im trying to render different 3D-models in open-gl ES 2. I created some models with Cinema4d and export them as an .obj wavefront file. Then I use the really helpful perl script (<a href="https://github.com/HBehrens/obj2opengl" rel="nofollow">h...
3,814,533
0
<p>sorry for question... are you sure that you check between 2 integer values?... and if yes... in the html that you have, do you have the background color in the TD elements of the table? If you have the color code in the html code, maybe it's a problem of css style definition.</p>
40,691,960
0
Masm 16bit converting Ascii to byte <p>I'm a beginner in assembly language and I have to find a solution fast.<br> The thing is I have to read a number from the person (3 digits), convert it to an integer and compare it to two values.<br> The problem is that after converting the comparisons are off, sometimes the resul...
35,502,612
0
How to grow computational thinking <p>As a beginner java programmer,I found how I think in terms of solving a problem is more important than how much of the language and built in methods/shortcuts I know.My worst enemy in learning the programming language is when I get stuck and don't know how to approach.I was wonderi...
11,395,123
0
how to execute the stored procedure in hibernate 3 <p>I am new in hibernate. I am using hibernate 3 in my application using hibernate annotations , I am developing application in struts 1.3. </p> <p>My question is : I have googled a lot but could not understand how to call a stored procedure in <strong>hibernate using ...
6,872,347
0
Overloading operator== <p>Guys I have some silly struct let's call it X and I also have a fnc (not a member of it) returning a pointer to this struct so it looks like so: </p> <pre><code> struct X { bool operator==(const X* right) { //... } }; X* get(X* another) { //... } </code></pre> <p>I also have line in code which...
37,612,866
0
<p>use the below code:</p> <pre><code>WebElement elem = driver.findElement(By.xpath("//*[contains(text(),'Crème Banana Curd')]")); elem.getText(); </code></pre> <p>hope this will help you.</p>
37,713,932
0
What Language and Graphics Library is CLion made in? <p>I was wondering what language the CLion IDE was written in, and what Library is used to make the graphics for it.</p>
19,757,403
0
<p>You can evaluate <code>data$err[i]</code> in the outer loop.</p> <pre><code>for (i in 1:nrow(data)){ n.tmp &lt;- d.tmp &lt;- 0 datai &lt;- data$err[i] for (j in i:nrow(data)){ wt &lt;- some.step.function(data$X[j] + datai) n.tmp &lt;- n.tmp + data$Y[j] / wt d.tmp &lt;- d.tmp + 1 / wt } n[i] &lt;- n.tmp d[i] &lt;- d...
19,678,530
0
<p>It's somewhat subjective. I personally would prefer the latter, since it does not impose the cost of copying the vector onto the caller (but the caller is still free to make the copy if they so choose).</p>
26,379,546
0
<p>That you have a third action like this</p> <pre><code> public string Index(int id) { return "int"; } </code></pre> <p>would explain this behaviour</p> <p>of course you don't need the parameterless action either, that's just a special case of the message one, where message is empty</p>
34,790,328
0
<p>You don't need to do the roundtrip to DatetimeIndex, as these methods are avaliable for a Series (column) as well through the <code>dt</code> accessor:</p> <pre><code>aht['call_start'] = aht['start'].dt.tz_localize('US/Eastern').dt.tz_convert('US/Central') </code></pre> <p>And the same for <code>end</code>.<br> To ...
26,965,690
0
<p>If you are using windows machine try downloading binaries from here <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" rel="nofollow">download python libraries</a></p> <p>Here you have an option to provide to which version of python you are trying to install. </p>
40,493,624
0
<p>The solution to your question depends highly on the device you are using. If you have a phone with a dedicated PTT button, the manufacturer of the phone almost certainly has made an Intent available for app developers such as yourself to intercept PTT down and up events, but you'll need to contact the manufacturer ...
10,033,657
0
<p>Give <code>TryUpdateModel(model)</code> a try, should fit your needs. </p> <p>This won't throw an exception, <strong>and it will</strong> update the model and then return <code>false</code> if there are validation errors.</p> <p>If you care about the errors, you check the <code>ModelState</code> in the false instan...
27,931,571
1
ARMA.predict for out-of sample forecast does not work with floating points? <p>After i developed my little ARMAX-forecasting model for in-sample analysis i´d like to predict some data out of sample. </p> <p>The time series i use for forecasting calculation starts at 2013-01-01 and ends at 2013-12-31! </p> <p>Here is my...
36,428,238
0
Can I escape a color code in Powershell so I do not need to use -ForeGroundColor? <p>Is it possible to use some color-code escape character so that I do not need to mention -ForeGroundColor parameter?</p> <p>So instead of :</p> <pre><code>write-Host "Hello World!" -ForegroundColor:Blue </code></pre> <p>Can I do somethi...
4,434,625
0
Why are string in .net case sensitive by default? <p>Most times I want to do string comparisons I want them to be case insensitive.</p> <p>So why are string in .net case sensitive by default?</p> <p><strong>EDIT 1:</strong> To be clear I think the below should return true by default. Or at least allow me to have a comp...
25,766,370
0
Gradle and Maven compile my project but I am getting NoClassFoundError <p>I am trying to compile my project which uses Gradle and Maven. The project use another library on my local maven repository. The library is referenced in Gradle and Maven:</p> <p>Gradle:</p> <pre><code>dependencies{ compile 'cf.charly1811.java.ut...
11,409,130
0
<p><a href="https://en.wikipedia.org/wiki/Strassen_algorithm" rel="nofollow">https://en.wikipedia.org/wiki/Strassen_algorithm</a></p> <p>You can even find it in video lectures at MIT Opencourseware Intro to Algorithms course or Stanford's Algorithms course</p>
24,559,490
0
<p>Okay, with the help of Syfors' suggestions i have change the relationship between A and B:</p> <pre><code>class Aa implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String value; } @Entity class A implements Serializable { @Id @GeneratedValue(strategy = Generatio...
6,262,010
0
<p>Okay, this answer is SQL Server specific, but should be adaptable to other RDBMSs, with a little work. So far as I see, we have the following constraints:</p> <ul> <li>An invoice may be associated with 0 or 1 Work Orders</li> <li>A Work Order must be associated with an invoice or an ABC or a DEF</li> </ul> <p>I'd d...
13,092,533
0
ZSH auto_vim (like auto_cd) <p>zsh has a feature (auto_cd) where just typing the directory name will automatically go to (cd) that directory. I'm curious if there would be a way to configure zsh to do something similar with file names, automatically open files with vim if I type only a file name?</p>
24,097,047
0
<p>As Craig said, indexes are only used internally to the database so the index names are not important - but in PostgreSQL they must be unique.</p>
33,939,674
0
<p>I assume that by *ply you mean the <code>apply</code> family (apply, sapply, lapply, tapply, etc.). If not, I am sorry.</p> <p>Still, I think that you can easily achieve what you want with the <code>&lt;&lt;-</code> operator. It will impact your performance, though.</p> <pre><code># Let's assume that your loop outp...
20,433,762
0
<p>This is happening because the redirect_uri your android app is using to create the initial login flow is different from the redirect_uri the server is using when it tries to excange the code for an access_token. The redirect_uri the user returns to and the redirect_uri used in the token exchange must match.</p>
375,895
0
Techniques for building HTML in code <p>An html template is compiled into the application as a resource. A <strong>fragment</strong> of the HTML template looks like:</p> <pre><code>&lt;A href="%PANELLINK%" target="_blank"&gt; &lt;IMG border="0" src="%PANELIMAGE%" style="%IMAGESTYLE%"&gt; &lt;/A&gt;&lt;BR&gt; %CAPTIONTE...
24,122,695
1
Interate through a Pandas dataframe <p>I want to upsample my data. It is hourly data that I want to turn into 5 minute data by resampling and filling in the missing data with a linear interpolation between the hours. </p> <p><a href="https://dl.dropboxusercontent.com/u/100778374/Wind%20Data/Wind_Locations.csv" rel="nof...
14,956,272
0
javascript date varies across timezone <pre><code>var dt_now = '2-22-2013';//mm-dd-yyyy, this is dynamic in actual code dt_now = dt_now.split("-"); dt_now = addZero(dt_now[2])+'-'+addZero(dt_now[0])+'-'+addZero(dt_now[1]); dt_now = new Date(dt_now); </code></pre> <p>I am using the above code to convert a user defined t...
22,904,103
0
<p>You have a shadowing problem. You declare...</p> <pre><code>private JButton findnext; private JButton replace; private JButton delete; private JButton upper; </code></pre> <p>But in your constructor you do...</p> <pre><code>JButton findnext = new JButton("FindNext"); //... JButton replace = new JButton("Replace"); ...
3,318,325
0
<p>See <a href="http://www.w3schools.com/media/media_mimeref.asp" rel="nofollow noreferrer">http://www.w3schools.com/media/media_mimeref.asp</a> .</p> <p>xls is <code>application/vnd.ms-excel</code>, ppt is <code>application/vnd.ms-powerpoint</code>.</p>
38,700,390
0
<p>I assume <code>_renderList</code> is responsible for render your listview component. You can call it in render function.</p> <pre><code>render(){ return ( &lt;View&gt; {this._renderList()} /*......rest of your code....*/ &lt;/View&gt; ); </code></pre>
24,635,052
0
Page goes blank when working with database <p>I am working on a form for a friend. When a user submits the form their IP address is added into a database table. Every time a user then visits the form I run a check to see if their IP address is already in the table. If it is then they have already submitted the form. </...
12,084,126
0
<p>A <code>ggplot2</code> solution:</p> <p>I'm going to use the US population dataset in R:</p> <pre><code>population &lt;- data.frame(Year=seq(1790, 1970, length.out=length(uspop)), Population=uspop, Error=rnorm(length(uspop), 5)) library(ggplot2) ggplot(population, aes(x=Year, y=Population, ymin=Population-Error, ym...
18,563,702
0
Eclipse Plug-in Enable/Disable Menu Items Programatically <p>I am writing an eclipse plug-in that extends <em>AbstractDebugView</em>. </p> <p>My plugin has one context menu item, one pull-down menu item, and one toolbar menu item. The action associated with these menu items is a class I created (<em>CopyAction</em>) wh...
4,794,788
0
<ol> <li>If you don't have binlogs enabled, or cannot be sure at which point your backup snapshot was made trying to get the datadir running in another server is about your only option. (Which for maximum possibility of recovery should be as much like the original as possible in MySQL version and other environmental d...
4,046,286
0
<p>One technique that's common (especially in older editors) is called a split buffer. Basically, you "break" the text into everything before the cursor and everything after the cursor. Everything before goes at the beginning of the buffer. Everything after goes at the end of the buffer.</p> <p>When the user types in ...
19,292,488
0
how use json in javascript with django <p>I am new in django and python I'm trying use a json file in javascript using django</p> <p>The Javascript works fine when I use without django but when I do with django show me this error:</p> <pre><code>"TypeError: node is null" </code></pre> <p>I call the json this way:</p> <...
5,579,157
0
c# 4.0 get class properties with (specified attribute and attribute.data) <p>I would like to get what properties of my class have an exact attribute with a concrete string. I have this implementation (Attribute and Class):</p> <pre><code>[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = fals...
10,738,736
0
<p>User roles then setup the locations in web.config</p> <pre><code>&lt;location path="foo"&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;allow roles="fooUsers"/&gt; &lt;deny users="*"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/location&gt; </code></pre> <p>OR for each folder created add a new web.config ...
5,276,395
0
Is it possbile to Unregister a BroadCast Lister <p>I have a BroadcastReceiver registered in the manifest for 5 different events.</p> <p>For simplicity, let's say events are named A,B,C,D and E.</p> <p>After receiving event B, i want to unregister the receiver to stop listening for event E. Can this be done? </p>
4,145,585
0
Free delphi skinning library? <p>Does anybody of you know a good, free delphi skinning library for my software? I can't find any free libraries except for AlphaControls Free.</p> <p>Thanks in advance.</p>
9,047,551
0
<p>They devided <code>c</code> with <code>m*2</code> and assigned the value to <code>c</code>, then made sure <code>h</code> is not nothing:</p> <pre><code>c/=m*2;h!= </code></pre> <p>In other words: he did everything. The <em>ultimate</em> everything!</p> <hr> <p>Or maybe the cat sat on the keyboard and produced a ra...
10,008,273
0
<p>OnStart (Role) is in another process than your web page (pages, Global.asax ..). At least when using <a href="http://blogs.msdn.com/b/windowsazure/archive/2010/12/02/new-full-iis-capabilities-differences-from-hosted-web-core.aspx" rel="nofollow">Full IIS mode</a>.</p>
34,710,985
0
<p>For autocompletion of dynamically created objects (if its type is not recognized automatically) most IDEs support type-hinting comments.</p> <p>For example:</p> <pre><code>/** @var Car $car */ </code></pre> <p>See <a href="http://www.phpdoc.org/docs/latest/references/phpdoc/tags/var.html" rel="nofollow">http://www....
13,802,299
0
<p>Here's one way using <code>GNU awk</code>. Run like:</p> <pre><code>awk -f script.awk file1 file2 </code></pre> <p>Contents of <code>script.awk</code>:</p> <pre><code>BEGIN { FS="[ =:,]" } FNR==NR { a[$1]=$0 next } $2 in a { split(a[$2],b) for (i=3;i&lt;=NF-1;i+=2) { for (j=2;j&lt;=length(b)-1;j+=2) { if ($(i+1) ==...
11,831,870
0
<p>The fact that it is hidden changes nothing. The problem is probably that the js code is before the button HTML. Either put it after, or put it in a listener like <code>$(document).ready()</code> to make sure it has been processed when your try to access it.</p>
5,114,105
0
<p>If all you want to do is output each question (without any validation!) you don't need the question variable at all. Just do:</p> <pre><code>echo 'Question #' . ($i + 1) . ': ' . $_POST['question'][$i]; </code></pre>
26,666,466
1
I cannot get my "if" command to work properly <p>I am trying to add two numbers, even if they contain "-" or ".", but my if command is wrong somehow, here is the code:</p> <pre><code>def add(): print "\nAddition" print " " print "What is your first number?" preadd1=raw_input(prompt) print "What is your second number?" ...
12,430,710
0
<p>Yes, It is possible but you need a <code>Rooted</code> device with <code>Superuser</code> Access. Try using the following code:</p> <pre><code>try { Process proc = Runtime.getRuntime() .exec(new String[]{ "su", "-c", "reboot -p" }); proc.waitFor(); } catch (Exception ex) { ex.printStackTrace(); } </code></pre> <p>I...
26,469,891
0
<p>Try doing the select after casting the join result to a list. </p> <pre><code>public IEnumerable&lt;MergeObj&gt; QueryJoin() { List&lt;TableObj1&gt; t1 = conn.Table&lt;TableObj1&gt;().ToList(); List&lt;TableObj2&gt; t2 = conn.Table&lt;TableObj2&gt;().ToList(); return t1.Join(t2, outer =&gt; outer.Id, inner =&gt; in...
16,518,011
0
Match with Regex any number except a specific number <p>Using regex I would like to match strings like:</p> <ul> <li>3.2 Title 1</li> <li>3.5 Title 2</li> <li>3.10 Title 3</li> </ul> <p>I did <code>@"^3\.\d+[ ]."</code> But I would like to do not match strings of "3." followed by a single 1 like :</p> <ul> <li>3.1 Titl...
29,059,295
0
<p>Your <code>print_values</code> method is an <em>instance</em> method, though it does not use the instance in it.</p> <p>I believe you meant to use the instance data for your implementation:</p> <pre><code>class LinkedListNode attr_accessor :value, :next_node def initialize(value, next_node = nil) @value = value @ne...
20,588,519
0
<p>There's no workaround. Menu items can't be batched.</p> <p>But you could make a regular sprite behave as a button. Layer detects touch, checks if touch was on "button" sprite, executesutton block or selector.</p>
26,563,776
0
<p>KDevelop, QtCreator, XCode and many other editors offer this feature. And more will come, as nowadays it's rather trivial to implement in some way based on Clang.</p>
16,025,291
0
How do I determine if a box intersects a mongoDB collection of boxes using geospacial method? <p>I have figured out how to make the query for the intersection, but can't figure out how to define the boxes in the database so that it returns me all boxes that intersect with my query parameter.</p> <p>How do I accomplish ...
27,665,257
0
<p>The result being a <code>Hash</code>, you can call <code>values</code> on it: </p> <pre><code>res = ActiveRecord::Base.connection.execute(q_cmd) res.values </code></pre> <p>This will give you just the values in an array!</p> <p>Reference documentation: <a href="http://www.ruby-doc.org/core-2.1.5/Hash.html#method-i-...
11,549,223
0
Actionmailer Rails 3 <p>I have added a contact form to my site and am having a problem, when the message is sent I get my flash message, "successfully sent", however the email never arrives in my inbox. I am in development mode at the moment and my app/config file looks like this</p> <pre><code> class Application &lt; ...
18,251,020
0
<p>I found the answer and solution: </p> <ol> <li>As for access the <code>adb shell</code>, I need to enable "Root access" for ADB in "Developer options" (this apply for stock Android 4.0.4 by Cyanogenmod but the same option could be present somewhere else in your phone)</li> <li>As for File Expert, the "Root Explorer...
11,427,457
0
What is the right syntax of IF statement in MySQL? <p>I have a small and simple MySQL code. But whenever I run it, I get error #1064. Can you tell me what is my mistake here?</p> <pre><code>IF ((SELECT COUNT(id) FROM tbl_states) &gt; 0) THEN BEGIN SELECT * FROM tbl_cities; END END IF </code></pre> <p>I also used some o...
26,289,185
0
Prevent CSS media queries from breaking when doing masked domain forwarding <p>I recently set up a domain I own - jeffreydill.com - to point to a personal site I have hosted on GitHub - jeffdill2.github.io/portfolio. It's a GoDaddy domain and I'm using masked domain forwarding.</p> <p>However, when using the forwarded ...
32,782,201
0
<p>Have you checked that the account running the app pool is in the IIS_IUSRS group in User Manager (lusrmgr.msc)</p> <p>Cheers</p>
27,336,085
0
jar built with jwrapper doesn't work <p>jwrapper manipulates application jars somehow, and is resulting in a non-functioning jar: at runtime it throws a "MyClass cannot be cast to MyClass" type error. I believe this is caused by re-evaluating code that creates a class loader, leading to multiple instances of class MyCl...
14,197,574
0
Align a block outside of a table, with a cell in the table <p>I have a table with the following format:</p> <pre><code>&lt;a id="posMe"&gt;Age&lt;/a&gt; &lt;table&gt; &lt;thead&gt; &lt;th id="name"&gt;name&lt;/th&gt; &lt;th id="age"&gt;age&lt;/th&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td nowrap=""&gt;a&lt;/td&...
12,507,260
0
<p>No big XML-knowledge at my side, but since <code>Properties</code> is a childnode of <code>NewDataSet</code>, my guess is that you first have to get the <code>Properties</code> node and with that you can probably get the nodes you want.</p>
22,500,310
0
Can't read the data from 2nd level nested attribute in ActiveAdmin <p><em>I have 3 classes:</em></p> <p><strong>app/model/order.rb</strong></p> <pre><code>class Order &lt; ActiveRecord::Base has_many :lines, dependent: :destroy accepts_nested_attributes_for :lines, allow_destroy: true end </code></pre> <p><strong>app/m...
31,045,710
0
<p>I've found an example on CodeProject that works really well. </p> <p><a href="http://www.codeproject.com/Articles/31840/Move-controls-on-a-form-at-runtime" rel="nofollow noreferrer">Move controls on a form at runtime</a></p> <p>The only problem I ran into is that I couldn't drag the <code>WebBrowser</code> control ...
33,503,666
0
Background running time with PushKit VoIP notifications <p>I'm writing VoIP application that uses PushKit notification, and I can't found <strong>what amount of background execution time gives me one incoming push?</strong></p> <p>The first thing I've checked is <code>[UIApplication sharedApplication].backgroundTimeRem...
9,646,055
0
CMake, SDL on Mac OS X, "can't find -lSDLmain" <p>Following the instructions <a href="http://content.gpwiki.org/index.php/SDL%3aTutorials%3aSetup#CMake" rel="nofollow">here</a>, I've set up a <code>CMakeLists.txt</code>:</p> <pre><code>Find_Package (SDL REQUIRED) Find_Package (SDL_image REQUIRED) link_libraries ( ${SDL...
14,113,313
0
can i use android aide for learning java <p>Ok so this time I will make it more specific.</p> <p>I want to learn Java only. So I have bought myself a book on Java programming and would like to follow the examples in the book. For doing this on the go (because I don't always have access to my PC) I've downloaded <a href...
630,604
0
<p>If you're using SQL Server 2005 or newer then your best option is to create a <a href="http://msdn.microsoft.com/en-us/library/ms189876.aspx" rel="nofollow noreferrer">user-defined CLR function</a> and use a regular expression to remove all non-numeric characters.</p> <p>If you don't want to use a CLR function then...
9,440,032
0
<p>I have seen this before. What solved the problem for me was to re-export my PNGs. For some reason, some of them get metadata in them (like Fireworks stuff) which causes it to bug out in certain situations. I've seen that happen mostly with Internet Explorer, but have seen it with MKMapView as well. Even more strang...
1,710,248
0
Does anyone have parsing rules for the Notepad++ Function List plugin for Ruby and Rake <p>I'me using Notepad++ for editing rake files and I'd like to be able to use the function list plugin. </p> <p>I've been unable to find any parsing rules on line, and the "Language Parsing Rules" dialog is not very clearly document...
19,504,106
0
<pre><code>void print_customers(customer &amp;head); </code></pre> <p>C++ compiler work in top to bottom approach. So, every type, identifier it sees at the point must be known to it. </p> <p>The problem is that compiler doesn't know the type <code>customer</code> in the above statement. Try forward declaring the type...
40,009,351
0
<p>If they don't provide an argument, set that argument in <code>args</code> to <code>0</code>. Then <code>ls</code> won't receive an empty string as its first argument, it won't get any arguments at all.</p> <pre><code>args[0] = arg1; if (strlen(arg2) == 0) { args[1] = 0; } else { args[1] = arg2; args[2] = 0; } </cod...
16,401,266
0
Basic concept of message loop in directx <p>Well I find weird point of message loop.</p> <p>first, lock this code below</p> <pre><code>MSG msg = {0}; while( WM_QUIT != msg.message ) { if( PeekMessage( &amp;msg, NULL, 0, 0, PM_REMOVE ) ) { TranslateMessage( &amp;msg ); DispatchMessage( &amp;msg ); } else { Render(); // ...
14,020,775
0
<p>You have chose wrong selector, :td is not correct. You need to attach event directly on tr. You may use <code>mouseenter</code> instead of <code>mouseover</code> as mouseover will fire again and again as mouse moves on it, <code>it will cause needless execution of code</code>. You need to change the class only once...
1,753,357
0
Per-file enabling of scope guards <p>Here's a little problem I've been thinking about for a while now that I have not found a solution for yet.</p> <p>So, to start with, I have this function guard that I use for debugging purpose:</p> <pre><code>class FuncGuard { public: FuncGuard(const TCHAR* funcsig, const TCHAR* fun...
20,988,644
0
fontawesome + rails 4.0.1 not working <p>I am using fontawesome 3.2.1 and bootstrap 3.0.0 in my rails 4.0.1 project. All my assets are located in vendor/assets. </p> <p>the problem is that my fontawesome is working in development mode when when i compile my assets(production env) and run the server in production env, i...
15,101,559
0
Terminal: Where is the shell start-up file? <p>I'm following a tutorial called <a href="http://www.jeffknupp.com/blog/2012/10/24/starting-a-django-14-project-the-right-way/">Starting a Django 1.4 Project the Right Way</a>, which gives directions on how to use virtualenv and virtualenvwrapper, among other things.</p> <p...
18,666,043
0
Selecting even rows through it class name <p>Problem selecting even rows through it class name:</p> <pre><code>$(".recDetails table tr").each(function() { if( !($(this).css("display") == "none")){ $(this).addClass("block"); }; }); $(".recDetails table").each(function(i) { $(this).find("tr.block:even").css("background-c...