instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a fairly complicated function that takes several double values that represent two vectors in 3-space of the form (magnitude, latitude, longitude) where latitude and longitude are in radians, and an angle. The purpose of the function is to rotate the first vector around the second by the angle specified and retur... | stackexchange/codereview |
I am developing a online reputation website and i am interested in knowing how pipl searches on linkedin.com without Oauth. Can anybody tell me a way to search for people on Linkedin.com and Facebook.com without oAuth(if not API , any other way?)?
| stackexchange/codereview |
I'm having problems with FileResult returning a file with a specific filename. In the database the filename is just and ID + extension (e.g: 456789.mp3)
This piece of code
FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read);
return File(fs, "application/octet-stream", "myfile.mp3");
Work well in e... | stackexchange/codereview |
I am in a bit of a trouble here... I will start with the requirements first:
Try to send data (msg) to the server
If it fails, store it in a local hard disk file, as a list of CSV entries
Try to send the msg data to the server at some predetermined point.
If a msg is sent successfully, remove it from the file
Continue... | stackexchange/codereview |
I'm having an issue with an iPhone app that crashes on launch for a select few users. MOST users are just fine - the app is live on the app store, Apple didn't find any problems, I never found these problems when testing. However, they exist.
So. Here is what I know. I believe the crash happens with iPod touch users. F... | stackexchange/codereview |
I'm using Flash Builder and created a spark-application Flex project that will stream video from the local camera. If I use mx.controls.VideoDisplay; there is no problem since it has attachCamera(camera) method. But Spark's VideoDisplay component does not have that method. I know I can use mx controls inside a Spark ap... | stackexchange/codereview |
I currently have the following structure used to get OHLC data over an interval
class MarketDataItem{
....
static class DateComparator implements Comparator<MarketDataItem>{
}
static class PriceComparator implements Comparator<MarketDataItem> {
}
}
class MarketDataGroup{
private TreeSet<... | stackexchange/codereview |
I would like for the messagebox.show to say ("Sorry - You Lose, The number is","label1.Text"); but where it says label.text I want it to say the number that was generated.
private void button1_Click(object sender, EventArgs e)
{
RandomNumber(0,99);
button2.Enabled = true ;
button1.Enabled = ... | stackexchange/codereview |
void foo() {
static int x;
}
void bar() {
static int x;
}
int main() {
foo();
bar();
}
| stackexchange/codereview |
How to write HQL queries using NHibernate. What namespaces will I have to included so that everything works fine. Actually I have 2 tables Ticket and Trip and I wanta count of all the records in Trip that do not have a corresponding entry in Ticket. There is a tid field in ticket that refrences Trip id. Can anybody ple... | stackexchange/codereview |
I am creating a survey application where I have a survey which has a collection of pages. Each page will have a collection of questions and each question will have a collection of answer options. My class structure looks like:
public class Survey : Entity {
public IList<Page> Pages { get; set; }
}
public class Pag... | stackexchange/codereview |
I have a custom UserControl. I want to use it in a few different products, so I want something that can be implemented inside of the UserControl itself. I want to know when the user has clicked outside of the bounds of the UserControl so that I can hide it, similar to a ComboBox. How can I do that?
I tried handling the... | stackexchange/codereview |
I am optimizing some code for an Intel x86 Nehalem micro-architecture using SSE intrinsics.
A portion of my program computes 4 dot products and adds each result to the previous values in a contiguous chunk of an array. More specifically,
tmp0 = _mm_dp_ps(A_0m, B_0m, 0xF1);
tmp1 = _mm_dp_ps(A_1m, B_0m, 0xF2);
tmp2 = _mm... | stackexchange/codereview |
I rarely use inheritance, but when I do I sometimes encounter the following problem. Given:
I want to inject an object in the parent class constructor, say a Logger.
Given both the parent and the subclass need to use this field.
Given I don't want to expose the field to the outside world (no getter).
I have seen t... | stackexchange/codereview |
I'm confused about the proper use of google apis libraries. Specifically, is a key required when using Google AJAX Libraries?
This OK?:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>
Or is this required:
<script src="http://www.google.com/jsapi?key={myKey}"></script>
<script s... | stackexchange/codereview |
What I asked originally didn't clearly state my question/problem, so I will explain it better. I have a JButton that sets a JDialog to visible. The JDialog has a WindowListener that sets it to NOT visible on the windowDeactivated() event, which is triggered anytime the user clicks outside of the dialog. The button Ac... | stackexchange/codereview |
I am a new C# student programmer. I want to make a editor like application which will highlight codes (syntax highlighting) and have auto complete feature for functions variables etc... I don't have any idea to do that. Can you please provide me some tutorial links or some tips about that? Can I implement these feature... | stackexchange/codereview |
I would create a login authentication using php, The requirement is : one username account can't login at the same time, if this occur the first login user should logout automatically. Just like yahoo messenger do. How is the concept actually ?, What the best trick to do this with PHP ?
Thank you.
| stackexchange/codereview |
is it possible to check the status of "Sound pool". i want to perform some function when it will start and stop. like ;mediaplayer's function "isplaying() ". is sound pool has this type of functionality...
| stackexchange/codereview |
Alright, using my XML editor to check the validation I'm getting "Validation stopped at line 2, column 8: no declaration found for element 'Staff'. Does anyone know why this is?
Also, every three staff members are of a different type and each type include different elements (Adjunct staff members only have email, name... | stackexchange/codereview |
Full error:
Request for the permission of type 'System.Web.AspNetHostingPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I'm doing maintenance on an old ASP.NET 2.0 "Web Site" project and am having issues with the error message posted in the topic. The reason for the erro... | stackexchange/codereview |
I have am using an mx:advanceddatagrid and I running into a problem with grouped column sorting. A screenshot of what my grid looks like is here: https://i.stack.imgur.com/waAi7.png
I have the following kind of data:
PRODUCT_ID PROD_NAME CATEGORY TYPE SubType SubType_descr
1 p_1 ... | stackexchange/codereview |
If I have a .mp4 file, it will automatically display a video (flash?)
If it's a jpg, it'll just display the image...
Edit: I want this embedded inside a webpage.
| stackexchange/codereview |
root@u1010:/opt/lampp/htdocs/trackstar/protected/tests# phpunit unit/DbTest.php
PHPUnit 3.4.13 by Sebastian Bergmann.
E
Time: 2 seconds, Memory: 5.75Mb
There was 1 error:
1) DbTest::testConnection
CDbException: CDbConnection failed to open the DB connection.
/opt/lampp/htdocs/yii/framework/db/CDbConnection.php:275... | stackexchange/codereview |
I'm using an integrated build environment on Visual Studio and using the post build action to call .NET Reactor cmd.
Everything was working fine until I tried to change the license to another directory. If I use the following option on cmd: "-staticfilename c:\license.license" the application won't find the license fi... | stackexchange/codereview |
Postgres Full Text Search performance seems to depend on the dictionary you use, here's an example
my table contains 60000 entries
default german dictionary (only stopwords, i think)
SELECT title FROM sitesearch s, to_tsquery('german','holz') query WHERE query @@ searchtext LIMIT 10
QUERY PLAN
Limit (cost=247.14..28... | stackexchange/codereview |
I'm using the notifications module to notify users when comments are added. However, I've tested it and the emails aren't being sent out. When I try to process the notification queue, I'm getting the following error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL se... | stackexchange/codereview |
We are trying to build a silverlight application that allows a user to stream video to a IIS smooth streaming server using the Encoder SDK. This application will stream video from a users desk to a TV screen at our front desk that is connected to a computer running another silverlight application.
When I try and add th... | stackexchange/codereview |
I want to record incoming call,any body knows please give some idea about that,other wise give some idea about How to know about incoming call,
Thanks All
| stackexchange/codereview |
Has anyone done some programming with Qt using C++0x? How is it working out? Is it possible to use all the nice features of C++0x? What compiler and version are you using?
Im currently using gcc 4.6 and trying out all the c++0x features but i have not yet done anything with Qt.
| stackexchange/codereview |
I need to track visitors to websites I own using the same script.
I own both example.com and site.com
I want to insert site.com/track.aspxin example.com using an iframe.
track.aspx will insert a flash-cookie into the visitor machine and also save some data into a db.
How to do it? Can I achieve the same result without ... | stackexchange/codereview |
I am still reasonably new to subsonic and finding the simplest things a little tricky.
I have a simple query that joins two tables, Profile and Subscription.
ProfileCollection profiles =
new Select().From<Profile>()
.InnerJoin(Subscription.ProfileIdColumn,Profile.ProfileIDColumn )
... | stackexchange/codereview |
I got an schedule in an plist-file, reading the events (read: times) is not the problem.
The problem is comparing the events with the current time.
I am somewhat new to iPhone-development so it might be an easy answer for this but here it goes:
scheduleTime isEqualToString currentTime - well that does the trick almost.... | stackexchange/codereview |
I just started with NHibernate, created my mappings using fluent NHibernate as follows:
public class CustomerMap : ClassMap<Customer>
{
public CustomerMap()
{
Id(x => x._id, "Id");
Map(x => x._KdNr, "KdNr");
Map(x => x._Name, "Name");
HasMany(x => x._Contact)
.Table("... | stackexchange/codereview |
I am calling some HTTPS web service which the following Client:
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.net... | stackexchange/codereview |
My need is to write a code, which
creates a db
creates four tables
creates primary keys
creates foreign keys
and constraints like type int or boolean or string etc
Yes I know w3c shools has the sql codes, but the problem is I first need to detect if these things exists or not one by one.
And this is for me a great pr... | stackexchange/codereview |
I am retrieving the size of all files in the document directory. I am using the method attributesOfItemAtPath to do so. It is successful. But I am getting the output in the form of bytes and of class NSNumber. It does'nt look good.
So, I need to get the output in KBs or MBs and I have to convert them into NSString in o... | stackexchange/codereview |
I have a simple model:
class MediaLink(models.Model):
title = models.CharField(max_length=200)
subtitle = models.TextField(max_length=2000, unique=False, blank=True)
byline = models.CharField(max_length=200, unique=False, blank=True)
url = models.URLField(unique=False)
source = models.CharField(max_length=3... | stackexchange/codereview |
Wondering what the differences between REST and JSON APIs are, how you interface with them, and how to go about parsing the results. My goal is to build a small application for my android phone to tell me when the next train will get to the subway station by my house, using the developer API provided by the transit age... | stackexchange/codereview |
I'm using xml to draw a spinning progress indicator along with some text. In the bottom of the screen I have a TableLayout with two buttons, which are centered in the page with each text also centered.
<RelativeLayout
android:id="@+id/progresscontainer"
android:layout_width="fill_parent"
andr... | stackexchange/codereview |
I've seen both this:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>
and this:
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'></script>
Does the type attribute matter in any way?
| stackexchange/codereview |
I have for instance 2 interfases IInterface1 and IInterface2,
public interface IInterface1 {...}
public interface IInterface2 {...}
and one implementation of these interfaces ImplClass.
public class ImplClass : IInterface1, IInterface2 {...}
I have to be sure that application has only one instance of ImplClass, whi... | stackexchange/codereview |
I have a table with over 1 million entries.
The problem is with the speed of the SELECT queries. This one is very fast:
SELECT *
FROM tmp_pages_data
WHERE site_id = 14294
Showing rows 0 - 29 (1,273,042 total, Query took 0.0009 sec)
And this one is very slow:
SELECT *
FROM tmp_pages_data
WHERE page_status = ... | stackexchange/codereview |
Can anyone tell me the use and application of select function in socket programming in c?
| stackexchange/codereview |
I have decided that I hate SQL and for that purpose I am trying to make a helper class that I can reuse over and over and never have to mess with it again but it isnt working!
Here is what I have right now:
DBAssistant.java
public class DBAssistant {
SQLiteDatabase db = null;
public DBAssi... | stackexchange/codereview |
I was wondering if someone could provide me with an example of using setStyle in an rjs template?
Thank you
| stackexchange/codereview |
I want an inherited ruby class to 'know' its class name via a class method. This is best illustrated by a contrived example:
class Parent
def self.whoami
??
end
end
class Child < Parent
#No code should be needed.
end
So I should be able to call:
Parent.whomai
and expect a return of "Parent" I should then b... | stackexchange/codereview |
I've built a site using the contempt theme (wordpress) and I'm changing it's CSS to make it wider.
The problem is that I can make it look great on either Internet Explorer or Firefox and chrome but not all 3 at the same time.
If I remove the sidebar tag:
#sidebar {
width:200px;
padding:20px 200px 10px;
}
the page look... | stackexchange/codereview |
I have a viewmodel class which contains a couple of properties. Basically, the current record (which the user is editing) and a list of options (which is used to populate a dropdown list using DropDownListFor).
After the form is submitted, if the modelstate is not valid I return to the view. I understand that the for... | stackexchange/codereview |
I'm having trouble figuring this one out.
The situation is no difficult to imagine so I hope I could post this without a sample code.
I have JPanel with CardLayout. The panel contains several other panels as individual tabs. What I'm trying to achive is to create a JButton that will make the main panel show last opened... | stackexchange/codereview |
Simple Q:How do you I get the textbox to show the value. Code below fail on item.LastName
@model List<Mvc2010_11_12.Models.Employee>
@{
var grid = new WebGrid(source: Model,defaultSort: "FirstName",rowsPerPage: 3);
}
<div id="grid1">
@grid.GetHtml(columns: grid.Columns(
grid.Column("LastName"),
... | stackexchange/codereview |
I have a Flex 4, mx:DataGrid with the following (pertinent) properties set:
width="100%"
horizontalScrollPolicy="off"
I have the minWidth set on all of the DataGridColumns and the width set on one of them. If I simply maximize/minimize the display (in browser or stand-alone flash player) of the application, the column... | stackexchange/codereview |
Most OpenGL ES tutorials for Android I've followed has its onSurfaceChanged() function like this:
public void onSurfaceChanged( GL10 gl, int width, int height ) {
gl.glViewport( 0, 0, width, height );
gl.glMatrixMode( GL10.GL_PROJECTION );
gl.glLoadIdentity();
GLU.gluPerspective( gl, 45.0f, ( ( float )w... | stackexchange/codereview |
I have a situation, I am trying to run almost 100 update statement on a table say 'XX'
In SQL Server database. But it is giving me an error tat goes something like this...
"Could not allocate space for object
'dbo.XX'.'PK_XX_3489AE06' in
database 'MYDATABASE' because the
'PRIMARY' filegroup is full. Create
d... | stackexchange/codereview |
How do I build executables using GCC so that it is not possible to search for a keyword. For example, I wrote my code using a function called "PascalTriangle" and built an executable and distributed. if I grep "PascalTriangle" on the executable then I am able to atleast know that the binary was built using that functio... | stackexchange/codereview |
I want to use OpenCV2.0 and Python2.6 to show resized images. I used and adopted this example but unfortunately, this code is for OpenCV2.1 and does not seem to be working on 2.0. Here my code:
import os, glob
import cv
ulpath = "exampleshq/"
for infile in glob.glob( os.path.join(ulpath, "*.jpg") ):
im = cv.LoadI... | stackexchange/codereview |
I've got a Silverlight class library which contains ResourceDictionary objects with styles that I want to propagate throughout my Silverlight application. Let's call it the Theme Library. I want to use implicit styling in the Theme Library to style every control in the application.
This is simple to do for all the con... | stackexchange/codereview |
For a Facebook iframe app, we load a file browser Java applet. This works fine in all major browsers on PC, and Firefox on the Mac. It also loads fine outside of an iframe in Safari on the Mac.
However, as soon as the page is called from within an iframe in Safari/Mac, the applet will not load. We do get the signed app... | stackexchange/codereview |
In C#, I could do something like this:
EventHandler handler = this.SomeEvent;
...which would allow me to, for example, do:
Delegate[] attachedHandlers = handler.GetInvocationList();
In VB.NET, I can't seem to figure out how to do a similar thing.
This doesn't work:
Dim handler As EventHandler = Me.SomeEvent
...due t... | stackexchange/codereview |
I'm writing an immutable linked list class in C, but one method is mysteriously segfaulting. The code is intended to be roughly equivalent to this:
class PList(object):
def __init__(self, first, rest=None):
self.first = first
self.rest = rest
def cons(self, item):
return PList(item, se... | stackexchange/codereview |
Considering clustered table,
Quassnoi wrote (the last phrase in answer):
If the secondary index is declared UNIQUE, clustered key is appended only to the leaf-level records of the secondary index.
This sounds like clustered key is added to (all) indermediate nodes of non-unique non-clustered index. And by the same... | stackexchange/codereview |
Im calling a url and getting json data back, If there is no data returned then I would like to be able to tell this with jquery. If there is no data to be return then the page that is called is blank.
Currently I have
var urlToGetJsonWith = '_Chapters.aspx?videoid=' + videoid;
jQuery.getJSON(urlToGetChaptersWith, func... | stackexchange/codereview |
I have a table with constraint width and table cell with percentage width. In the cell i've input or textarea with style="width:100%", without any margin, padding nor border but with some longer content without spaces. Why IE7 and IE6 expand the input to match the content length?
Applying table-layout: fixed to the tab... | stackexchange/codereview |
I want to do something like this:
var w = window.open("javascript: makeAnAjaxRequest();");
My question is, would the Ajax request (executed once the new window opens) be considered a cross-site request? Does the same-domain policy apply to the original domain whose page created the window?
In resposne to some of your ... | stackexchange/codereview |
I was joining 2 tables using FULL OUTER JOIN which took 6 minutes to run and give the output.
SELECT *
FROM tab1 FULL OUTER JOIN tab2
ON tab1.id = tab2.id
;
I did the same thing using UNION of LEFT OUTER JOIN and RIGHT OUTER JOIN. This took only 15 seconds
SELECT *
FROM tab1, tab2
WHERE tab1.id (+) = tab2.id
UNION ... | stackexchange/codereview |
When I do someting like
sqlite.cursor.execute("SELECT * FROM foo")
result = sqlite.cursor.fetchone()
I think have to remember the order the columns appear to be able to fetch them out, eg
result[0] is id
result[1] is first_name
is there a way to return a dictionary? so I can instead just use result['id'] or similar?
... | stackexchange/codereview |
I have JDBC connection code similiar to the following from the Java JDBC tutorial:
public static void viewTable(Connection con) throws SQLException {
Statement stmt = null;
String query = "select COF_NAME, SUP_ID, PRICE, SALES, TOTAL from " + dbName + ".COFFEES";
try {
stmt = con.createStatement();
... | stackexchange/codereview |
I am using flexmojos to build my flex projects.
I also have a flash project containing .fla files which needs to compiled into swf
Does anyone have any ideas on how to do that?
One solution I thought was to use a command line script to do it and force maven to call the script. Something like this
Any other ideas?
| stackexchange/codereview |
I have 3 dynamic texts (h1,h2,h3) but I can't seem to do this:
var n:Array=["n1","n2","n3"];
for(var i = 0;i < 3; i++){
n[i].text="hello";
}
This code gives me the error "Cannot create property text on String."
| stackexchange/codereview |
I have a set of sets. I want to create all sets that take at most one element from each original set.
For example, if my original set of sets is ((x,y),(A),(1,2)) then the solutions are:
(x)
(y)
(A)
(1)
(2)
(x,A)
(x,1)
(x,2)
(y,A)
(y,A)
(y,1)
(y,2)
(A,1)
(A,2)
(x,A,1)
(x,A,2)
(y,A,1)
(y,A,2)
I use the following code I... | stackexchange/codereview |
I've 2 controls one on top of another: border over slider. on border user can mark a segment to appear in different color on slider.
Because the border is written after slider in xaml, it appear on top of the slider. and that's ok.
My problem is, the Thumb of slider also appears under the border.
How can I set the Thum... | stackexchange/codereview |
HTML 5 includes the ability to specify how to run the web application offline. As I'm about to start authoring these things, I'm looking for a tool to validate the syntax of the offline cache manifest files. Ideally, I'd run it as part of the build process.
I'm aware HTML 5 is still in draft, but waiting isn't an optio... | stackexchange/codereview |
I'm attempt to commit mostly all new objects to the database, apart from the user. I'm new to entity framework and im not sure how to combat this error.
Error on line _orderDetail.CalenderItems.Add(_newCalendarItem):
The object could not be added or attached because its EntityReference has an EntityKey property value ... | stackexchange/codereview |
I am developing a shopping cart for a client and I got a very strange feedback from my client. I use CakePHP and as in common practice a shopping cart is identified by a PHP session. As far as I know even on the same machine if we open two different browsers then PHP will create two different sessions as the server ses... | stackexchange/codereview |
please provide links or write your own(extra points +1 too :-P )
using :- asp.net c# css vs08
want
a style which makes button appear as tab, like that of stackoverflow.
the buttons like QUESTIONS, TAGS, USER, BADG,UNANS,ASK.
| stackexchange/codereview |
Possible Duplicate:
How can one grab a stack trace in C?
In PHP it's debug_backtrace,is there such a function in c?
| stackexchange/codereview |
hay all..
i hope every thing is good
im a new iphone developer and i did an application and when i finished i test it through allocation test in instrument and shocked from the results..it stole
very very big memory and i don't know what i must do..in the same time i release every variable i was used BUT the real probl... | stackexchange/codereview |
I am trying to add a width to a div, but I seem to be running into a problem because it has no content.
Here is the CSS and HTML I have so far, but it is not working:
CSS
body{
margin:0 auto;
width:1000px
}
ul{
width:800px;
}
ul li{
clear:both;
}
.test1{
width:200px;
float:left;
}
HTML
<body>
<div id="test">
<ul... | stackexchange/codereview |
I expect this to be a n00b problem.
I'm attempting to use heroku with my rails app. Everything works fine in development (local machine), but when I push to heroku I get the following:
==> dyno-1931938.log (crash) <==
/home/slugs/258915_4fd8878_0dbe-1413ed77-735c-469d-924e-619b28cdcbac/mnt/.bundle/gems/ruby/1.8/gems/a... | stackexchange/codereview |
Currently when I need to share a method like processParams(params) between different controllers, I use either inheritance or services.
Both solution has some inconvenients :
With inheritance, you cannot use multiple inheritance which means that you need to have all of your controller utility methods in one place. An... | stackexchange/codereview |
I was looking for a way of finding statically unreachable functions in a (very) big C++ project. I had tried using doxygen and other static analysis tools suggested here but it seemed that the project is too complicated for them to handle. Finally i decided that using GCC tools (g++, gprof, gcov, etc.) is the safest op... | stackexchange/codereview |
hii
I want to insert a countdown timer in my project. right now i am using the following code:
{
DateTime dt = (DateTime)Session["end_t"];
DateTime dt_curr = DateTime.Now;
TimeSpan ts = dt - dt_curr;
lblTimer.Text = ts.Hours.ToString() + ":" + ts.Minutes.ToString() + ":" + ts.Seconds.ToString();
i... | stackexchange/codereview |
I need a free bug tracker for my small project. I need keep track of bug, todo list and test case. Any suggestion?
| stackexchange/codereview |
I am building a Windows service that listens for connections over TCP and, once a connection is established, sends a steady stream of data. It is very simple... once the initial request is made, the communication is one-way (on the application layer, of course).
What is a good way to test this with significant load, s... | stackexchange/codereview |
I'd like to create a feature similar to what stackoverflow does for comments on this site. Essentially allow the person who wants to post a line of text, to write it in, hit submit, and immediately see if posted on the page without having to leave the page.
Must be ajax, but Im curious how I might do this with javascr... | stackexchange/codereview |
I have an ImageView which I want to always be the same size. If the image is smaller than the view, I'd like it to be centred in the view. If the Image is larger than the view then I'd like it scaled down - with aspect ratio preserved.
I've had several attempts at this myself - the latest of which is:
<LinearLayout
... | stackexchange/codereview |
I am trying to learn Extjs and I am immediately coming up with an issue. My Html has ext-base.js and ext-all.js correctly included. I then have the following in my js file:
Ext.BLANK_IMAGE_URL = '<%= Url.Content("~/Content/ext/images/default/s.gif") %>';
Ext.ns('MyNamespace');
Ext.onReady(function() {
alert("onR... | stackexchange/codereview |
I have just started using maven-glassfish-plugin. I got the start-domain goal working. However when I try to execute the deploy goal, the plugin thinks that the domain is not started and tries to restart it - this obviously fails. See log below:
> mvn glassfish:start-domain
[INFO] --- maven-glassfish-plugin:2.1:start-d... | stackexchange/codereview |
I am trying to pass 2 parameters to a javascript function.This code webview.loadUrl("javascript: function_to_call();"); works fine without parameters but i couldn't use it with parameters.
This is javascript junction :
function changeLocation(_lon , _lat){
var zoom=16;
var lonLat = new OpenLayers.LonLat( _lon ,... | stackexchange/codereview |
How can I create in real-time a new URL path in Ruby on Rails?
For example: I want my users to have name.XXX.com or XXX.com/name.
FYi I'm hosting the code on Heroku.
| stackexchange/codereview |
I have a page that binds data from DB to a DetailsView.
I want to use the auto-generated Update command.
Everything went OK, and also updating was successful, but if I remove any field that I don't want to have chance to update, then the Update command doesn't update! the old values retain!
I mean: if all of the fields... | stackexchange/codereview |
I need use images in 2 .NET assemblies. One is WPF app {myApp.exe} and second is *.dll {myDll.dll}. File are located in this file structure:
**AppFolder** consist these files and one subfolder(avatars):
-myApp.exe
-myDll.dll
-avatars {folder} consist:
-manImages.jpg
-womanImages.jpg
... | stackexchange/codereview |
It gives options for the most popular articles over the last 30, 7, or 1 days. What I'm hoping to find is the most popular articles of each day for the last 30 days. So far the only way I know to do this is to find the most recent 1 day's most popular articles 30 days in a row.
| stackexchange/codereview |
I'm having trouble pasting from a csv into the wpf datagrid - I have followed the suggestions here
Link
and the code exectues with no problem - however, it seems that all the new rows are created but only the first row gets populated with data. The data seems to be constantly overwritten so that the last item that is i... | stackexchange/codereview |
I am making a query in django that ends up hitting the database 4 times. I want to be sure that there's no more efficient way of pulling the data than I already am doing.
I have a model:
class Film(models.Model):
studio = models.ForeignKey(Studio)
name = models.CharField(max_length=30)
rating = models.Foreign... | stackexchange/codereview |
i'm trying to update my sencha app from Extjs2.0 to ExtJS 3, but i'm finding a bit difficulty in it.
actually i developed that application in ExtJS2 but now i have to use the grid panel which is present in Extjs3.
so when i include the extjs3 in the current html file my whole app crashes please help....
<!DOCTYPE html... | stackexchange/codereview |
I am using SF 1.3.6. I have some static text files (HTML) that I want to be able to display in a popup window.
I tried this:
<a href="javascript:showPopup('foobar.html', 'all about foobar')">foobar</a><br />
<script type="text/javascript">
function showPopup(url, title) { window.open(url,title,"menubar=no,width=430,h... | stackexchange/codereview |
I have an .EDF (text) file. The file's contents are as follows:
ConfigFile.Sample, Software v0.32, CP Version 0.32
[123_Float][2]
[127_Number][0]
[039_Code][70]
I wnat to read these items and parse them like this:
123_Float - 2
127_Number - 0
039_Code - 70
How can I do this using C#?
| stackexchange/codereview |
I want to point multiple directory using the htaccess.
suppose i have two directory AAA and BBB.
if ( in url "AAA" is present ) point directory AAA;
else Point directory BBB.
Is it possible ??
| stackexchange/codereview |
In C++, I have often made a unit test class a friend of the class I am testing. I do this because I sometimes feel the need to write a unit test for a private method, or maybe I want access to some private member so I can more easily setup the state of the object so I can test it. To me this helps preserve encapsulatio... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.