Forum
stringclasses
148 values
Title
stringlengths
8
190
⌀
Body
stringlengths
24
72.4k
⌀
Tags
stringlengths
3
128
CreationDate
stringlengths
23
23
Reputation
int64
1
626k
AcceptedAnswer
int64
0
1
Score
int64
-15
440
ViewCount
int64
1
696k
AnswerCount
int64
0
123
CommentCount
int64
0
64
FavoriteCount
int64
0
227
stackoverflow.com
Can't figure out how to make substr_compare work properly (PHP)
<p>So I have this basic script:</p> <pre><code>/*check if email is valid*/ if (substr_compare ( $email , '@' , 0 )&gt;0) { /*put user to temporary database*/ echo 'registration script'; }else{echo 'wrong mail';}; </code></pre> <p>What I want to do is I want to check if string contains symbol '@' (if mail is ...
<php><html>
2012-03-11T07:12:42.497
702
1
0
311
3
1
0
stackoverflow.com
how to store class name in local storage
<p>is there a way to store a class name in localstorage ?? If there is a way how to do it ??</p> <p>There is a panel which is hidden at the beginning, by clicking on the button panel shows, i would like to store information, after click, whether the panel is hidden or shown </p> <p>my jquery code</p> <pre><code>$("#...
<html><local-storage>
2012-03-15T14:03:52.153
1,787
1
1
685
2
0
0
stackoverflow.com
Why does Z3's `get-value` return an expression instead of concrete value?
<p><code>get-value</code> call returns an expression instead of concrete value <code>#b01</code>:</p> <pre><code> sat (((trans_local true true (_ bv2 2)) (ite #b10 #b01 (ite #b00 (ite #b10 #b11 #b01) (ite #b01 (ite #b10 #b10 #b00) #b01))))) </code></pre> <p><code>simplify</code> results in the same way(and it prob...
<z3>
2012-03-16T19:08:45.510
1,161
1
1
561
1
0
0
stackoverflow.com
How do I to get the Intent from Activity B which started the Activiy A, when Activity A was started before
<p>I have two Activities: Activity A and Activity B:</p> <p>'A' is my Main Activity, and it has a Button to Activity B. And 'B' has a Button to 'A'. And now is my Question how I can find out that the User is coming from Activity B.</p> <p>When I use "getIntent()" it is the Intent from the Main Activity, but I need th...
<android><android-activity><android-intent>
2012-03-18T18:28:22.637
25
1
0
144
2
0
0
stackoverflow.com
force redirect after login form is submitted
<p>I was trying to make the php contact form in this tut <a href="http://www.tutorialstag.com/advanced-jquery-contact-form-with-php-support.html" rel="nofollow">Advanced jQuery contact form with php support</a> to redirect to another page .i.e. thanks-you page or whatever page I want, but so far no luck with that. I th...
<php><forms><redirect><form-submit>
2012-03-18T21:04:45.527
4,343
0
0
489
3
0
1
stackoverflow.com
Get extra and modified file from git repository?
<p>In my home folder I have unpacked a linux kernel tarball (linux-3.0.26.tar.bz2) downloaded from www.kernel.org. In "branch" at git://example.com the same kernel version is found but with a few files modified and some added.</p> <p>Is it possible to download only the added and changed files that is not found in my u...
<git>
2012-03-28T15:03:06.260
1
0
0
58
1
1
0
stackoverflow.com
Web app deployment - git environments
<p>I am creating a small commercial web project running Apache/WSGI/Django/MySQL.<br> I have a development and a production environment and use git and fabric to push/pull modifications.</p> <p>Now I'd like to be able to test new versions with similar conditions to the production server before making them live.</p> <...
<django><deployment><development-environment><production-environment>
2012-03-29T07:44:18.207
43,048
1
1
196
2
0
0
stackoverflow.com
Python LIST functions not returning new lists
<p>I'm having an issue considering the built-in Python List-methods.</p> <p>As I learned Python, I always thought Python mutators, as any value class mutators should do, returned the new variable it created.</p> <p>Take this example:</p> <pre><code>a = range(5) # will give [0, 1, 2, 3, 4] b = a.remove(1) # as I lear...
<python><list>
2012-04-02T20:20:10.593
2,613
1
5
8,437
5
2
2
stackoverflow.com
check if variable is null - incorrect validation
<p>This problem is a bit strange. Why is showed "Is not null", if the value sent is null? Any reason for that?</p> <pre><code>Parametersapplication/x-www-form-urlencoded lists_owned null Source lists_owned=null &lt;?php $lists_owned = $_POST['lists_owned']; var_dump($lists_owned); // string(4) "null" if(!is_null($_...
<php><isnull>
2012-04-04T02:26:21.710
335
1
0
2,401
3
1
0
stackoverflow.com
White space in iPhone
<p>I am optimizing my online portfolio for the iPhone.</p> <p>I am using the following media queries for both portrait and landscape orientations.</p> <p>1)@media screen and (orientation:portrait) {}</p> <p>2)@media screen and (orientation:landscape) {}</p> <p>The issue I have is that when I rotate my iPhone from p...
<iphone>
2012-04-04T12:07:35.720
5,169
0
0
279
0
2
0
stackoverflow.com
Passing value back from a called activity
<p>I am new to android programming and have the following question.</p> <p>I have an Activity (screen) which calls another activity (screen). I can pass values back from Activity2 by creating an intext and using putExtras. Then when I return to my main activity1 then I can (onActivityResult) I can retrive the string...
<android>
2012-04-11T08:41:30.673
71
0
2
394
3
0
0
stackoverflow.com
Add a button to full size in fancybox v2
<p>Currently, the only way to view an image in Fancybox in full size is calling the buttons helper, but this also brings the rest of the buttons (Play, Next, Prev, etc). I would like to add a single button to a corner of the Fancybox container that will toggle full/auto size; preferrably adding changes to the regular j...
<jquery><fancybox>
2012-04-12T19:18:04.570
225
1
1
2,272
2
0
0
stackoverflow.com
Ajax post function reloads page instead of dynamically just sending data
<p>Im having some problem with a bit of JQuery code and I don't know what the issue is, basically im trying to submit a comment on the fly using ajax but for some reason the page keeps reloading. check out the code below...</p> <p><strong>Html form</strong></p> <pre><code>&lt;form method='post' action=''&gt; ...
<jquery><html><ajax><forms>
2012-04-13T21:08:16.343
2,662
1
0
1,263
1
3
0
stackoverflow.com
On iOS, is there a way to refresh more than 60 frames per second?
<p>If animating an image, such as a metal ball, and it is about 20 pixel wide, and the speed is about 200 pixels per second, then if the refresh rate is 60 frames per second, the ball will move about 3 pixels per second, which is 1/6 of the ball's width (16%). (If it is Angry Birds, the blue bird is about the same siz...
<ios><animation><core-animation>
2012-04-20T04:11:27.600
141,372
1
0
360
1
4
1
stackoverflow.com
how to ensure the Window media player is in Play mode?
<p>Hi in my test case i have to click a "link", after that the application will download a ".wav sound file"..After downloading it plays automatically in the Windows media player..I ensured the WMP is in opened state, but my problem is i have to check weather the windows media player is in play mode or not?? </p> <p>...
<java><selenium><automation><windows-media-player>
2012-04-27T11:35:53.037
4,924
0
0
305
1
0
0
stackoverflow.com
Google Maps API V3 - How to Get Optimal Roundtrip Route Through Arbitrary Waypoints
<p>There are many questions regarding Google Maps V3 API waypoints but none that address how to get optimal round trip route from a set of arbitrary waypoints. Basically, the order of weighpoints should be determined by whatever is the most optimum path and is not necessarily dictated by the order fed into the system...
<google-maps><map><google-maps-api-3>
2012-04-27T23:04:55.980
3,441
1
5
4,334
1
0
0
stackoverflow.com
Android MapView: animateTo doesnt work while map is panning
<p>The code below does the following: When checking the "focus" checkbox, the map animates to the single overlay item in the map. There is one problem: When i drag the map so that the map is still moving when I check the checkbox, the checking has no visual effect. Any ideas?</p> <pre><code>List&lt;Overlay&gt; mapOver...
<android>
2012-04-30T11:43:25.723
11
0
1
469
1
1
0
stackoverflow.com
jQuery itunes image slider
<p>I'm working on my final project for my Web Design 2 course and I wanted to dress up my site a bit with jQuery. Have you ever noticed in itunes or on the iOS that when you view your music by albums, it shows the the covers in a image slider that looks really nice. I want to do something similar to this minus the f...
<jquery>
2012-05-05T00:15:15.500
941
1
1
925
1
8
0
stackoverflow.com
"New..." alternative in DropDownListFor
<p>I have a <code>DropDownListFor</code> in a form in which I list all currently available options. Now, I want to provide an "New..." alternative. Selecting this would display a new textbox in which a new alternative can be created. </p> <p>I have added the alternative, bound some javascript to display the additional...
<c#><asp.net-mvc-3>
2012-05-05T11:32:34.497
11,657
1
1
139
1
0
1
stackoverflow.com
reload app from AppDelegate.m with phonegap
<p>I'm developing an app using jquerymobile and phonegap. </p> <p>I was wondering is there a way to reload an app using </p> <ul> <li>(void)applicationWillEnterForeground:(UIWebView*) theWebView { //reload here } or </li> <li>(void)applicationWillEnterForeground:(UIApplication *)application { //reload here } </...
<objective-c><cordova>
2012-05-12T04:58:43.050
43
0
0
332
1
0
0
stackoverflow.com
Sass CSS Gradient Generator
<p>Take a look at this JSFiddle</p> <blockquote> <p><a href="http://jsfiddle.net/JamesKyle/wLkLE/2/" rel="nofollow">http://jsfiddle.net/JamesKyle/wLkLE/2/</a></p> </blockquote> <p>Trying to recreate this look <a href="http://jsfiddle.net/JamesKyle/EyxHE/3/" rel="nofollow">http://jsfiddle.net/JamesKyle/EyxHE/3/</a> ...
<css><sass>
2012-05-22T03:38:18.963
4,088
0
0
1,270
0
5
0
stackoverflow.com
.NET Entity Framework 4.0 - prevent overwrite
<p>I have a ASP.NET 4.0 Web Application Project, it work with edmx model file generate by MSSQL 2008 and named StaffModel.edmx</p> <p>I have my custom logic and apply to StaffModel.Designer.cs ,today i open the edmx ,but not re-generate form database, just have a look, but VS2010 overwrite my *.Designer.cs in accident...
<visual-studio-2010><entity-framework-4.1>
2012-05-28T14:30:12.010
14,952
1
1
124
1
0
0
stackoverflow.com
How do I setup access to the SQL Server Membership and Role Providers from a Class Library?
<p>I have a client that wants to wrap the provider model with a middleware library, thereby keeping all Security.Web namespaces and API calls out of the front end completely.</p> <p>Setting up calls into the API is easy. But configuring an app.config file is not quite as intuitive. I've not been able to find a good ex...
<asp.net><asp.net-mvc-3><asp.net-membership><membership-provider><roleprovider>
2012-05-29T23:09:58.000
2,879
1
0
83
1
0
0
stackoverflow.com
Fast axis-aligned cuboid data type
<p>I am looking for a data structure representing axis aligned cuboids</p> <p>Something like System.Drawing.Rectangle, but in 3d, e.g.</p> <pre><code>struct AACuboid { int posX, posY, posZ; int width, length, height; } </code></pre> <p>with the standard operations like c1.Contains(c2), c1.Intersects(c2), c1....
<c#><performance><data-structures><3d><struct>
2012-06-01T14:48:11.197
12,550
1
0
335
2
0
0
stackoverflow.com
Ccocs2d-Durations in actions withDurations
<p>Let's take the following code:</p> <pre><code> CCTintTo *tint1 = [CCTintTo actionWithDuration:4 red:255 green:0 blue:0]; CCTintTo *tint2 = [CCTintTo actionWithDuration:4 red:0 green:0 blue:255]; CCTintTo *tint3 = [CCTintTo actionWithDuration:4 red:0 green:255 blue:0]; CCSequence *sequence = [CCSequen...
<cocos2d-iphone><action><duration>
2012-06-19T19:54:21.337
11,897
1
0
192
1
0
0
stackoverflow.com
command line returning new line immediately
<p>I'm writing a command line Java applicaton. I have a class that handles terminal input/output. I am wanting to ask a simple yes/no (y/n) question. This is my code:</p> <pre><code>public boolean yn(String prompt) { // ask a yes/no question out(prompt); try { while(true) { char result ...
<java><command-line><user-input>
2012-06-24T13:25:51.520
1,254
0
0
747
1
6
0
stackoverflow.com
how a field marked as 'editable=False' work
<p>When a field is marked as 'editable=False' in the model, it will not appear on the generated form. How is the field initialized and saved into database?</p>
<django><django-forms><django-models>
2012-06-27T01:43:42.673
243
1
1
118
1
0
0
stackoverflow.com
Comparing Time.now with model dates
<p>my Project model has 2 datetime atttributes: start_date and end_date. Now I want all projects where the current time is in between these dates. I tried something like this with the start_date to start with:</p> <pre><code>@projects = Project.where(:start_date &lt;= Time.now) </code></pre> <p>But this returns an er...
<ruby-on-rails><ruby-on-rails-3>
2012-06-28T15:55:02.637
6,244
1
3
4,794
3
0
3
stackoverflow.com
modulus operator to run 1st and then every 3rd item
<p>So i need it to run on the first loop and then every 3rd loop</p> <pre><code>if ($k % 3 || $k==1 ) { echo '&lt;div class="modcontainer"&gt;'; } </code></pre> <p>Seems simple to me, but i don't have the understanding of modulus</p>
<php><modulo><modulus>
2012-06-29T11:46:02.377
25,111
1
5
9,531
1
0
0
stackoverflow.com
find row or column containing maximum value in numpy array
<p>How do I find the row or column which contains the array-wide maximum value in a 2d numpy array?</p>
<python><numpy>
2012-07-04T15:47:18.660
5,467
1
16
37,663
5
0
1
stackoverflow.com
Extract Data from HTML String in android
<p>I have a HTML String as <code>By&lt;!--[10018729]//--&gt; &lt;a href=\"/author/10018729_kurt-ernst\" title=\"show Kurt Ernst's profile page\"&gt;&lt;img src=\"http://images.thecarconnection.com/tny/avatar-image-for-ernst_100345731_0.jpg\" alt=\"Kurt Ernst\" width=\"20\" height=\"20\"/&gt; Kurt Ernst&lt;/a&gt;, Contr...
<android>
2012-07-09T21:10:29.660
3,981
0
-3
653
1
6
0
stackoverflow.com
javascript (prototype) if element does not have attribute
<p>in prototype I have this 'if' statement that works fine:</p> <pre><code>if(parentForm.hasAttribute('action')){ console.log('hello world') } </code></pre> <p>However, how do I turn this into a 'if parentForm DOES NOT have attribute action' statement?</p> <p>Many thanks, Adi.</p>
<javascript><prototypejs>
2012-07-18T08:57:23.457
4,004
0
0
160
1
0
0
stackoverflow.com
How to read element from a vector pointer?
<p>I need to access a vector pointer elements, I have the following code for my animation structures (simplified here, unnecessary variables cut off):</p> <pre><code>struct framestruct { int w,h; }; struct animstruct { vector&lt;framestruct&gt; *frames; }; vector&lt;framestruct&gt; some_animation; // this wil...
<c++><visual-c++><vector><c++03>
2012-07-20T22:02:23.827
3,906
1
2
7,140
2
4
2
stackoverflow.com
Creating a bullet list using mysql table data
<p>I have a table similar to the following:</p> <pre><code>subcategory category ------------------------ apples fruits oranges fruits pears fruits honda cars volvo cars audi cars </code></pre> <p>What would be an easy way to print out something like the example b...
<php><mysql>
2012-07-29T19:48:01.753
11,879
0
0
2,196
2
3
0
stackoverflow.com
Is is possible to read pixel data from base64 images?
<p>So here I have a base64 encoded png image:</p> <pre><code>iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg== </code></pre> <p>and I decoded it using <code>atob()</code>. It turns out to be:</p> <blockquote> <p><code>PNG</code></p> <p><code>I...
<javascript><base64>
2012-08-05T00:57:59.713
89,710
1
7
6,048
3
2
3
stackoverflow.com
SSL proxy for two applications on separate ports on one host name
<p>We are using Nginx for SSL proxy and have one host name with two applications on two different ports. What is the best way to set this up in nginx.conf if possible.</p>
<web-applications><ssl><nginx><port>
2012-08-10T18:00:37.823
9
0
0
132
2
2
0
stackoverflow.com
creating files in tizen
<p>I am trying to create new file in tizen. My code is</p> <pre><code>var dir; var newDir = dir.createDirectory("vij"); </code></pre> <p>But Its getting Error like </p> <pre><code>TypeError: 'undefined' is not an object (evaluating 'dir.createDirectory') </code></pre> <p>I have tried the same example which is given...
<tizen>
2012-08-16T11:28:19.027
309
0
3
3,676
5
0
2
stackoverflow.com
Gridview filtering with jQuery for user control contained within page
<p>I have placed my user control (my.ascx) on the web page (1.aspx). my.ascx contains gridview, search textbox &amp; search button. I need to display rows in gridview on the basis of text I'm typing in search textbox on search button click event. Here's what I have done.</p> <p>In 1.aspx:</p> <pre><code>&lt;script ty...
<jquery><asp.net><.net>
2012-08-17T09:37:52.433
1,230
1
1
1,982
1
0
0
stackoverflow.com
How to authenticate only once with http auth and two domains in nginx?
<p>I have a site that requires 2 domains: one for dynamic and the other for static content.</p> <p>In the staging environment I need it to ask for user and password as I don't want random people or bots having access to that. I have used http_auth for that.</p> <p>The problem is that when you try to access, it asks f...
<nginx><http-authentication>
2012-08-24T06:17:26.620
13,772
0
3
1,475
0
0
0
stackoverflow.com
How to manage files while there are Jade and Stylus to compile?
<p>I usually white pages in Jade, Stylus and CoffeeScript, so I use a shell script to watch them all and compile. And use a shell script with <code>pkill -f</code> to kill them after coding.</p> <p>But there's problems:</p> <ul> <li>if I call this script from another directory, it fails </li> <li>if I forget to run ...
<bash><node.js><coffeescript><pug>
2012-08-29T10:54:53.873
4,450
1
0
209
1
4
0
stackoverflow.com
Testing subdomains in capybara/rspec
<p>I'm currently almost at the end of a long journey into rails testing, but I'm banging my head on how to get request specs working with subdomains.</p> <p>In development, I'm using pow with urls such as: <code>http://teddanson.myapp.dev/account</code> which is all fine and dandy.</p> <p>In testing, I let capybara d...
<ruby-on-rails><rspec><capybara>
2012-08-31T01:06:04.960
3,330
1
5
1,683
2
0
1
stackoverflow.com
Asynctask, dimensions expected after this token
<p>Im following the android docs on asynctask, trying to get an asynctask going that can perform actions on wifi in background, the issue im running into is at Asynctask in the code below, void and boolean or whatever i put there keep showing up as errors with the message "Dimensions expected after token". I dont know ...
<java><android><eclipse><adt>
2012-08-31T07:50:35.800
1,540
1
5
8,171
1
0
1
stackoverflow.com
How to remove default chrome style for select Input?
<p>How do I remove the default yellow box border of Selected input and select fields in chrome or any browser like safari? I want to customize input with custom box shadow css. How do I remove the default browser select border?</p>
<html><css>
2012-09-06T10:04:13.000
4,497
1
56
223,624
10
8
11
stackoverflow.com
Adding a <img> to an div tag
<p>I have the following structure:</p> <pre><code>&lt;div class="eventIcons"&gt;Sample Event&lt;/div&gt; </code></pre> <p>How do I add an tag to the div before the text so that I end up with:</p> <pre><code>&lt;div class"eventIcons"&gt;&lt;img id="printOnlyIcon" src"printOnly.jpg"/&gt;Sample Events&lt;/div&gt; </co...
<jquery><html><image>
2012-09-10T14:05:40.057
1,117
1
2
120
3
0
0
stackoverflow.com
access the stackpanel inside a datatemplate in windows phone
<p>I want to access the StackPanel UIElement inside a ItemTemplate(datatemplate) of listbox:</p> <pre><code>&lt;ListBox x:Name="list"&gt; &lt;ListBox.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel x:Name="stk" &gt; // some other stuffs &lt;/StackPanel&gt; &lt;/DataTemplate&gt; ...
<listbox><datatemplate><windows-phone><itemtemplate>
2012-09-27T05:48:28.233
678
0
0
151
0
2
0
stackoverflow.com
Why out-of-bounds occurs with memchr() on mac os
<p>I encounter a problem of overflow when use memchr() on mac os x.</p> <p>Here is my test code:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; int main(void){ char *content="http\r\nUser"; int content_size = strlen(content); char *contmem = malloc(content_size+1); memset(contmem, ...
<c><macos><overflow>
2012-10-11T08:44:10.917
1,873
1
5
547
2
2
0
stackoverflow.com
Hash tag, query string, and Ajaxified search results
<p>I have a search form that automatically sends POST data my web application whenever something in the form changes. The web application (written in PHP/CodeIgniter) accepts POST or GET and returns the proper results and displays it on the page. Everything works fine.</p> <p>Now, my concern is that the URL does not r...
<javascript><ajax><codeigniter><codeigniter-2>
2012-10-16T15:43:48.413
37,873
0
0
350
1
1
0
stackoverflow.com
how do I invoke a passed Method? This is delegation, right?
<p>Ok, I <em>know</em> this is been asked and answered hundreds of times, and I know I'm probably going to get the "go search for the answer" response, but I'm going to try asking anyway. Very simply, I want to pass a method and use it to do the writing of a string. For example:</p> <pre><code>void writeStuff(Method...
<java><reflection><delegates>
2012-10-25T15:45:23.447
2,733
0
0
57
3
0
0
stackoverflow.com
Box2dWeb revolute joint "stretching"
<p>I am trying to create a car-like thing in 2D using <a href="http://code.google.com/p/box2dweb/" rel="nofollow noreferrer">box2dweb</a>. I have a box for the car body and two circles, connected to it by revolute joints, as the wheels. Everything works fine for a while, but gradually the gaps increase between the cent...
<javascript><box2d>
2012-10-26T12:40:58.783
6,473
1
0
1,429
2
2
1
stackoverflow.com
HTML file open dialog to access server file system
<p>Is is possible to have file open dialog box for displaying files and directories which is in server file system? I have a requirement in my web application where the user should select a file which is available in server.</p> <p>Do we have any plugin for this or can it be possible using &lt; input type="file" > com...
<java><javascript><html><file-upload>
2012-10-27T10:31:44.740
32,170
0
3
456
2
1
0
stackoverflow.com
Masking area where I can draw text?
<p>My game has online highscore, and I present this in a page that contains a top row containing a back button and a title. The rest of the page is used for the top 10 scores.</p> <p>Problem is that in landscape mode the screen only contains 9 of the 10 elements. So I implemented dragging so the user kan drag the list...
<windows-phone-7><xna>
2012-11-09T12:19:16.440
13,032
1
0
63
1
0
0
stackoverflow.com
How are client-side libraries used in node.js?
<p>I am new to node.js and just discovered npm, which has been a pretty handy tool. However, I noticed that a lot of libraries that I have used before in client side JavaScript programming, such as jquery and d3, can be installed using npm. It seems strange to me to install these libraries as node modules as I don't un...
<javascript><jquery><node.js><d3.js>
2012-11-12T10:03:16.563
2,387
1
2
505
1
0
0
stackoverflow.com
reading String out of txt into jsp
<p>i want to write a visitor counter for a website and got this code</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Counter&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;%@ page import="java.io.*" %&gt; &lt;% String datei="pathtotxt/count.txt"; String wert =""; try{ FileReader eingabestrom= new FileReader(new Fi...
<java><html><jsp>
2012-11-13T12:20:46.627
766
0
0
329
1
3
0
stackoverflow.com
Curl No URL set! 3 Error
<p>I am using curl to fetch result from Punchtab when I execute this code I am getting curl exception 3 No URL set! can any one help me with it.</p> <pre><code>$tocken2 = "https://api.punchtab.com/v1/user?access_token=".$rest-&gt;authResponse-&gt;accessToken; $ch1 = curl_init(); $ca = 'c:/path/to/ca-bundle.crt';...
<php><curl><joomla>
2012-11-29T06:50:54.747
319
1
2
9,238
1
1
0
stackoverflow.com
VS2012 WebDeploy Publish Breaking Web.Config
<p>I have a MVC3 Web Application project that I develop and publish from Visual Studio 2012. This was recently a VS2010 project that was migrated.</p> <p>My web.config is setup using a <code>&lt;location inheritInChildApplications="false"&gt;</code> tag so that a child application running in a virtual directory does ...
<web-config><visual-studio-2012><webdeploy>
2012-12-07T04:39:18.560
6,681
1
2
680
1
0
0
stackoverflow.com
Replacing functions with Table Lookups
<p>I've been watching <a href="http://channel9.msdn.com/Shows/Going+Deep/Brian-Beckman-Dont-fear-the-Monads" rel="noreferrer">this MSDN video with Brian Beckman</a> and I'd like to better understand something he says:</p> <blockquote> <p>Every imperitive programmer goes through this phase of learning that function...
<functional-programming><lookup-tables><imperative-programming>
2012-12-07T15:51:52.160
52,033
1
11
2,020
3
1
4
stackoverflow.com
Using logAnalyzer with log4j syslog appender
<p>I am trying to send syslog messages from my web application to RSYSLOG and then view them in logAnalyzer. I manage to see the logs but the following fields are not shown in the main table: Facility, Sevirty, ProcessID. They do appear in the messages, but their columns are empty.</p> <p>In what format should I send ...
<log4j><syslog><rsyslog>
2012-12-10T11:57:16.637
1
0
0
842
1
1
0
stackoverflow.com
SpreadsheetGear Grid: events for deleting or inserting rows or columns?
<p>As the title says, is there an event for those actions like deleting a row or column, inserting a row or column, or changing text in a cell? I'd be very disappointed if there isn't.</p>
<events><grid><spreadsheetgear>
2012-12-11T22:27:53.310
6,632
0
1
1,340
1
0
0
stackoverflow.com
Installed OpenMPI library, but cannot use mpicc command in Linux
<p>I am following openmpi install file.</p> <p>Firstly, I am a normal user in this linux system. I do not have rights to access /usr/local . If I configure with:</p> <pre><code>./configure --prefix=/usr/local </code></pre> <p>make will complain about permission.</p> <p>Therefore, I put the place to install in some ...
<linux><permissions><configure><openmpi>
2012-12-17T06:38:09.413
5,493
1
0
24,146
2
0
0
stackoverflow.com
PullToRefresh Layout with ExpandableList
<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" &gt; &lt;com.handmark.pulltorefresh.library.PullToRefreshScrollView ...
<java><android><android-layout><android-fragments>
2012-12-23T23:23:58.113
734
1
0
711
1
0
0
stackoverflow.com
Mono Runtime - Can it be forced to ONLY run strong named or signed assemblies?
<p>Is there some incantation of Mono Runtime configurations that can be used to force Mono to only run strong named or signed assemblies? </p>
<c#><mono><strongname>
2013-01-09T00:06:51.787
495
1
1
115
1
0
0
stackoverflow.com
How to avoid writing the zero size file to storage card in windows mobile 6.5 device using C#?
<p>I am developing a smart device application in windows mobile 6.5 with .NET CF 3.5 using C#. user will use this application to write xml file to storage card, every day around have 5000 xml files to be written to storage card. but there have a problem I can not find the root reason, that is sometimes write the file i...
<c#><streamwriter><windows-mobile-6.5>
2013-01-17T03:03:06.580
1
0
0
472
2
0
0
stackoverflow.com
Links not clickable when sent through Django email
<p>When the website sends out emails, it using a <code>a</code> tag to create a link. For some reason, gmail (possible other emails as well) does not turn the text the <code>a</code> tag contains into a link.</p> <p>Function for sending emails:</p> <pre><code>def send_main(to, sbj, msg): msg = EmailMultiAlternati...
<django><email><gmail>
2013-01-22T00:18:57.323
10,733
0
0
2,289
2
1
0
stackoverflow.com
How to write a parser in javascript to parse text in editor into JSON with a model?
<p>I don't know if it is the place to ask this. But I will try.</p> <p>What I need is, for example, if user writes some text in Code Mirror editor like:</p> <pre><code>a1=Some Text a11 = Some Child text </code></pre> <p>and the parser should check if the grammer is correct, and parse it to:</p> <pre><code> { ...
<javascript><json><parser-generator>
2013-01-27T00:52:40.990
5,616
1
1
737
2
0
1
stackoverflow.com
PostSharp 1.5, .net 3.5 and Visual Studio 2012
<p>I posted this as an answer in a similar question but got no response so trying my luck here.</p> <p>We have a .net 2.0 assembly with which PostSharp 1.5 is running fine. We have been given the go-ahead to upgrade to using VS2012.</p> <p>The project has been auto-converted by VS2012 and I'm getting an error. I have...
<.net><visual-studio-2012><postsharp>
2013-01-31T13:28:04.437
1,933
1
1
573
1
0
1
stackoverflow.com
How to read excel cell format (both .XLS & .XLSX)
<p>I need to read the formatting information available in a cell in excel. The excel file might contain an cell with text like "Some sample text". Each word would have a different formatting information. Like word "Some" might be bold and have a different font color and size. The next word might have different one.</p>...
<openxml><xls><openxml-sdk><xlsx><npoi>
2013-02-04T20:43:02.303
125
1
2
1,704
2
1
0
stackoverflow.com
ViewScoped after redeploy server
<p>I have strange problem on my simple form in JSF 2.0. In this form, I use two selects, if the first select is chosen, the second should be reload with new options. I use the same mechanism as on Primefaces demo page : <a href="http://www.primefaces.org/showcase/ui/pprSelect.jsf" rel="nofollow">Primefaces demo page</a...
<jsf><jetty><session-scope><view-scope>
2013-02-05T09:21:00.577
1,299
0
0
93
1
0
1
stackoverflow.com
JavaScript: translate long tap events to right click events
<p>How can one automatically translate long tap events to right click events? Since many touch devices like the iPad don't provide a way to do a right click on a website this would be very handy because a website's code doesn't need to be adjusted.</p> <p>For example this code is designed for desktop browser having mo...
<javascript><jquery><events><touch>
2013-02-14T13:50:13.597
2,154
0
4
8,404
3
0
3
stackoverflow.com
Beginning PLC programming
<p>I'm getting interested in PLC programming and my idea is to just try it. Therefore I need to simulate some real system, because it's to soon to look for some hardware. This is how I wish to do it (example):</p> <ol> <li><p>Simulate some real system, ie. water tank with bleed and inlet valves, some water level senso...
<plc>
2013-02-14T17:47:56.747
277
0
3
1,357
1
1
0
stackoverflow.com
ios Symbolication Server side
<p>How to symbolicate the ios crash report after uploading to server in a linux environment where iOS development tools and scripts will not be available. I know Apple uses atos and some other tools to map the hex addresses to symbol along with .dYSM file. </p> <p>I can upload .dYSM file along with crash report to se...
<objective-c>
2013-02-25T15:41:16.870
1,062
1
5
2,288
2
3
5
stackoverflow.com
How do I use a convention to specify the Foreign Key and the Primary Key should be the same column on a Joined Subclass table?
<p>Title pretty much says it all. If I have 2 classes:</p> <pre><code>public class Account { public virtual Guid AccountId { get; set; } public virtual string Name { get; set; } } public class VendorAccount : Account { public virtual string TaxId { get; set; } } </code></pre> <p>How would I use a conven...
<c#><fluent-nhibernate><automapper><fluent-nhibernate-mapping>
2013-02-25T22:42:29.373
21,605
0
0
100
0
10
0
stackoverflow.com
cbind items from multiple lists recursively
<p>Given three (or <code>n</code> lists):</p> <pre><code>one &lt;- list(a=1:2,b="one") two &lt;- list(a=2:3,b="two") three &lt;- list(a=3:4,b="three") </code></pre> <p>What would be a more efficient way of <code>cbind</code>ind each list item across the <code>n</code> lists, to get this result?</p> <pre><code>ma...
<r><list><join><cbind>
2013-03-01T00:40:29.723
87,235
1
5
6,178
3
0
1
stackoverflow.com
Associative array - change position
<p>For ex have this array:</p> <pre><code>[food] =&gt; Array ( [fruits] =&gt; apple [vegetables] =&gt; garlic [nuts] =&gt; cashew [meat] =&gt; beaf ) </code></pre> <p>I need to change the position of a specific key-value combination.</p> <p>Let's say I need to move [fruits] => apple to 3rd position<...
<php>
2013-03-01T21:49:19.727
2,505
1
6
10,635
4
0
0
stackoverflow.com
How to get class and property names and values from undeclared type
<p>If I have these two classes:</p> <pre><code>public class A { public int Id { get; set; } } public class B { public string Name { get; set; } } </code></pre> <p>Can I use a generic method like this:</p> <pre><code>public void InitMethod(object classProperty) </code></pre> <p>To pass in data like this:</p...
<c#><asp.net><typeof><object-type>
2013-03-05T18:59:01.040
2,076
0
1
1,519
2
8
0
stackoverflow.com
Remote User Logging Information on windows server 2008 r2
<p>Currently We have one server with Windows Server 2008 r2 OS. Now there are many people used to this server from remote location. Now I have some knowledge of WMI classes which gives information about user login (Win32_LogonSession) but it not gives what I want. Like I want user login time, logout time, remote locati...
<c#><wmi><windows-server-2008-r2>
2013-03-07T05:56:19.900
319
0
1
374
1
0
0
stackoverflow.com
Make pictureBox follow another (Enemie AI)
<p>So, I want to put a pictureBox (Zombie) to follow another (Player). How to detect the player's axis comparing with the zombie's?!</p>
<c#><.net><winforms>
2013-03-09T18:27:22.593
85
1
0
596
1
4
0
stackoverflow.com
How do i use IntelliTrace to capture Debug information for Windows Service
<p>I am using VS2012 and would like to capture Debug information, so that i can step through the Code in VS2012.</p> <p>I have seen example, for .exe and Web, but how can collect debug information for Windows Service. </p>
<visual-studio-2012><intellitrace>
2013-03-15T22:02:00.853
1,581
0
0
271
1
0
0
stackoverflow.com
cast type error from long to decimal type object
<p>I having the following code and member value is type object and in this process = long and i want to cast it to big decimal ,when i trying the following code i get error:java.lang.Double cannot be cast to [C</p> <pre><code>} else if (typeName.equals("java.math.BigDecimal"))) { return new SwitchInputType&lt...
<java><casting><type-conversion>
2013-03-19T20:40:45.913
1,633
1
0
382
4
1
0
stackoverflow.com
print details from from to word document and then print to printer c#
<p>i am making a holiday booking program my second program. i have a form that client are able to make bookings etc. what i thought of is that i can make like a receipt that would print out all the details on a receipt o designed in photoshop and put it in a word document. so when i click print i am able to print out t...
<c#><printing>
2013-03-20T11:45:26.577
37
1
0
271
2
0
0
stackoverflow.com
Reset primary id for nested/child resource
<p>I have an application I'm building that has albums with images. I want the image's id to start at 1 when they are added to an album. However, with my current setup, they don't reset for each album, but continue their numbering from one album to the next. </p> <p><strong>Models</strong></p> <pre><code>class Albu...
<ruby-on-rails><ruby-on-rails-3><activerecord>
2013-03-24T19:53:59.267
1,367
0
1
91
1
0
0
stackoverflow.com
wix - Install pre-requisite MSI based on feature
<p>I'm using Wix v3.5. I need to install an MSI as part of a particular feature. Is this possible? Or do I have to upgrade to 3.6 and "BURN" it?</p>
<wix><wix3.5>
2013-03-26T08:51:54.493
489
1
1
96
2
0
0
stackoverflow.com
Authentication or Impersonation in SharePoint
<p>I have a mvc web application hosted on iis and SharePoint installed on another machine. The Web application read the directory on SharePoint. How can I authenticate all the request coming from the machine on which mvc web application is deployed on SharePoint? or how can I impersonate all request to a service accoun...
<sharepoint><authentication><impersonation>
2013-03-28T08:50:58.120
453
0
1
232
0
0
0
stackoverflow.com
Return Max(Recent_Date) for each month, Duplicate value and inner join issue - SQL
<p>Basically, I want to achieve , for each months, like in this example, from January until March 2013, what is the Max(Most_Recent_Day) for each users.</p> <p>Example, From January to March, every month in the Database, systems will capture the Most_Recent_Day for each users.</p> <p>Below are the expected results: <...
<sql><date><inner-join><max>
2013-04-02T15:24:16.270
13
0
0
118
1
0
0
stackoverflow.com
unset session php
<p>According to the manual "Do NOT unset the whole $_SESSION with unset($_SESSION) as this will <strong>disable the registering of session variables</strong> through the $_SESSION superglobal."</p> <pre><code>&lt;?php session_start(); $_SESSION['name'] = 'my_name'; unset($_SESSION); echo $_SESSION['test'] = 'ok'; <...
<php>
2013-04-05T14:42:03.797
497
1
1
753
3
2
0
stackoverflow.com
What is proper way to resolve Mass Assignment in belongs_to association
<p>Assume that i have two models : </p> <pre><code>class Article &lt; ActiveRecord::Base belongs_to :category attr_accessible :content validates :content, :category, :presence =&gt; true end </code></pre> <p>and</p> <pre><code>class category &lt; ActiveRecord::Base attr_accessible :name has_many :article...
<ruby-on-rails>
2013-04-13T20:38:22.043
265
1
0
206
1
2
0
stackoverflow.com
Conditionally creating new collections with output parameters
<p>This program is purely for illustrative purposes. I wanted to take an integer as input and if it was greater than zero, create an ArrayList with that integer in the ArrayList. I tried this numerous (incorrect) ways and eventually settled on what you see below. However, I don't really like the looks of it.</p> <p...
<c#><collections>
2013-04-17T22:38:34.733
8,160
1
0
106
4
6
0
stackoverflow.com
How to only add to controller if commit is successful? Ember.js
<p>In the controller</p> <pre><code>this.get('store').createRecord(Emb.Painting, {name: n}); this.get('store').commit(); </code></pre> <p>In the template </p> <pre><code>&lt;ul&gt; {{#each controller}} &lt;li&gt; {{name}} &lt;/li&gt; {{/each}} </code></pre> <p></p>
<ember.js>
2013-04-30T04:18:26.420
1,707
0
0
71
1
0
0
stackoverflow.com
ListBox getSelectedIndex; DropDownPanel selections
<p>I simple got a Dialog with a 3 TextBoxes and a ListBox to switch between different input. Looks like:</p> <pre><code>ListBox dropDownPanel; TextBox name; TextBox msg; Button save, cancel; </code></pre> <p>I call the tuple, Name,msg a profile. so I made changehandler which checks the selected index of the drop down...
<gwt><listbox>
2013-04-30T10:50:50.097
779
1
0
149
1
0
0
stackoverflow.com
custom InfoWidnow shape Google maps v2 android
<p>I am able to change and fill custom controls in Info window contents by using InfoWindow Adapter. But, How can I change Info window shape??? How can I make it to circle or Oval from its default shape??</p>
<android><shapes><google-maps-android-api-2><infowindow>
2013-05-02T09:10:12.413
1,256
0
1
457
0
3
0
stackoverflow.com
Deterministic Finite Automaton vs Deterministic Pushdown Automaton
<p>I was wondering if somebody could give me a simple explanation of the relationship between these two terms, as I am very confused by the terminology.</p>
<language-agnostic><dfa><pushdown-automaton>
2013-05-03T17:42:42.473
5,775
1
3
4,999
1
2
0
stackoverflow.com
Current Session is no longer valid due to structural changes
<p>We have a spreadsheet connected to a cube that is refreshed every two hours like this:</p> <ol> <li>Refresh data in the data warehouse</li> <li>Perform a "Process Full" on one of the many partitions in a duplicate of the target cube</li> <li>Backup the processed cube and restore it to the target cube</li> </ol> <p...
<ssas><pivot-table><olap>
2013-05-03T18:50:39.037
3,231
0
2
1,879
2
0
0
stackoverflow.com
First UIView in Portrait orientation and second in Landscape
<p>I have an app which has 2 view controllers. The first viewcontroller should be in portrait and it's ok, but when I'm loading the second view controller, I could not make the app orientation to be landscape... The problem is with iOS 6.</p> <p>I have tried everything I found on SO.</p> <p>Using <code>[[UIApplicatio...
<iphone><ios><objective-c><screen-orientation><uiinterfaceorientation>
2013-05-06T04:36:22.617
431
1
1
3,034
5
1
0
stackoverflow.com
Some questions on mocking EF 5 and testing repository pattern
<p>I've been reading a bunch of articles on mocking my repository pattern EF 5 and I am confused about a few things:</p> <p>I have a Manager class, with a method say <code>AddCat(string name);</code>. That method ensures the <code>name</code> is valid, and calls <code>AddCat(string name)</code> on my <code>CatReposito...
<c#><entity-framework><unit-testing>
2013-05-06T10:11:22.367
49,453
1
1
575
1
0
0
stackoverflow.com
MySQL query to get the primary key(customer_id) from a table and to compare it with the current session id(customer_id)
<p>i' having this error when i run this code.</p> <p>Parse error: syntax error, unexpected '" "' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\pta\cc11205\booking.php on line 32</p> <pre><code> $querycust = mysql_query(" SELECT * FROM customer WHERE customer_id = ".$_SESSION['customer_id']" "); </code></pre> <p>tq...
<php><sql>
2013-05-11T16:57:30.350
35
1
0
130
3
0
0
stackoverflow.com
Two stack in assembly
<p>I am tring to do a game in assembly(something simple, not to complicated kind of snake) and I need two stacks for that. I will be glad if you could show me how to create and use two stacks. Just for knowledge, I need the stacks to check if the snake cut itself and also to paint the snake's body.</p>
<assembly><graphics><x86><stack>
2013-05-12T14:27:00.777
412
1
2
274
1
3
0
stackoverflow.com
How to draw D3 Map with United States, Canada, Mexico and Puerto Rico
<p>I'm looking to use D3 to draw a map with some points on it. The Albers Projection US works great. I need a map with Canada (by province), Mexico (by state) and Puerto Rico on it as well. Any recommendation for the best projection on this map would be greatly appreciated.</p> <p>Thanks!-Dre </p>
<javascript><map><d3.js>
2013-05-20T21:56:32.103
21
0
2
2,972
1
0
0
stackoverflow.com
Breeze querying local cache with EF and Web API
<p>Problem</p> <p>I have a view with 6 drop downs. Each of which is being populated by a Web API call. I want to use breeze to run the query locally once it has populated from the remote server</p> <p>The code runs fine when the data call is against the server. The issue is when trying to query the local cache. I ne...
<breeze>
2013-05-21T09:04:21.310
101
1
1
1,309
1
0
0
stackoverflow.com
what is difference between Request.QueryString and Request.ServerVariables["QUERY_STRING"]
<p>i just want to get full querystring from url.</p> <pre><code>Request.QueryString </code></pre> <p><code>Request.ServerVariables["QUERY_STRING"]</code></p> <p>Can i use any one of these? which way is preferred?</p> <p>Thanks</p>
<c#><asp.net><.net>
2013-05-23T13:53:24.163
907
1
7
4,591
3
0
2
stackoverflow.com
Select the checkboxes through loop?
<p>How i can i select the check boxes through loop ?</p> <p>For example i have 4 check boxes and if is select the 3rd check-box then 1st and 2nd also selected and if i select 4th check-box then 1st, 2nd, and 3rd also got selected.</p> <p>Any hint about this in jquery , java script or any other language?</p> <p>help ...
<javascript><jquery><html><css>
2013-05-24T07:46:07.147
2,068
1
2
1,912
5
2
2
stackoverflow.com
Simple Java TCP socket protocols
<p>I'm trying to find a reliable way to send control messages that obey a defined protocol in order to tell the server what kind of data he will receive. For example, I want to send a pure text message to invoke a remote method:</p> <pre><code>#METHOD1#CLOSE# </code></pre> <p>or I want to send a serialized object to ...
<java><sockets><serialization><tcp><protocols>
2013-05-27T16:12:55.287
787
1
0
882
1
4
0