instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
UPDATE: The Timer is a System.Threading.Timer.
We have a UI control that is updated on Timer Tick. On dispose of our control we call timer.Dispose(). We are running into occasional ObjectDisposedOExceptions when the timer fires after the UI control has been invoked.
I see this in the msdn docs:
"Callbacks can occur aft... | stackexchange/codereview |
Say I have this code that uses some input (e.g. a URL path) to determine which method to run, via reflection:
// init
map.put("/users/*", "viewUser");
map.put("/users", "userIndex");
// later
String methodName = map.get(path);
Method m = Handler.class.getMethod(methodName, ...);
m.invoke(handler, ...);
This uses refl... | stackexchange/codereview |
I'm implementing a custom container with an STL-like interface for a 3D grid control for my scientific software. This is my second question regarding the iterator class for this container. Thanks for helping me with the first!
My question is just like "How do you avoid code duplication when implementing const and non-c... | stackexchange/codereview |
I have a php array like :
myarr[1] = "1",
myarr[2] = "1.233",
myarr[3] = "0",
myarr[4] = "2.5"
the values are actually strings but i want this array to be sorted numerically, also considering float values and maintaining index association.
Please help me out.
Thanks
| stackexchange/codereview |
How get file names and sizes with the help of HTML5?
| stackexchange/codereview |
I think it might be related to the fact that a not editable iframe is not clickable and therefor cannot get the focus.
Can anyone confirm this?
Is there a workaround of any sort for this?
| stackexchange/codereview |
I am try to get the android environment setup for phone gap and I keep getting this
error when I try and create the phonegap project.
ruby bin/droidgap create MyTestApp
c:/phonegap-android/lid/create.rb:24:in ``:
no such file or dirctory - androidsdk-path.bat android.bat
(Errno::ENOENT)
from c:/phonegap-androi... | stackexchange/codereview |
My game has 3 background songs. I would like the game to set the background music to off when there is ipod music playing, else it will play the last played piece of music. When the muser changes the music with the ipod music on, the ipod music should go away and the background music plays. The problem is, the second t... | stackexchange/codereview |
I'm declaring an array of primitives on one of my objects, and cannot seem to access it from the outside. I'm fairly new at ObjectiveC, is there some obvious mistake I'm making?
header file:
@interface MyObject : NSObject {
//@public <-- this shouldn't be necessary, right? I have accessors!
float *d;
}
@pro... | stackexchange/codereview |
Just more a general question I can't seem to find a definite answer on.
But what is a good SQL wrapper for C++ that allows me to call queries?
I'm used to Oracle, but i've used MYSQL before aswell.
And how would you call something such as an insert statement (for example) in one?
| stackexchange/codereview |
I am developing an android application where i need to connect to a server socket from my application. The application works fine when i am at home and my android phone and the server using the same Wi-Fi. However, when I am at the university my application can not connect to the server socket. It always shows "The Ope... | stackexchange/codereview |
I was wondering if it's possible to run the following code but without the unboxing line:-
t.Value = (T)x;
Or maybe if there is another way to do this kind of operation?
Here is the full code:-
public class ValueWrapper<T>
{
public T Value { get; set; }
public bool HasValue { get; set; }
public ValueWrapp... | stackexchange/codereview |
Im using networkx for visualization. I see when I use the function
draw_networkx_edge_labels
I can retrieve the labels for edges.
I want to print the attribute on node ( instead of the label).. try everything almost . still stuck. If i have 5 attributes per node, is there anyway I can print a specific attribute on ea... | stackexchange/codereview |
If I have a class Apple that extends Fruit, how do I write a JPQL query to return all objects that are strictly Fruits and not Apples?
| stackexchange/codereview |
I'm trying to understand what these offsets are in an iphone stack trace:
11 FOO 0x0005684a +[TTURLRequest requestWithURL:delegate:] + 42
12 FOO 0x00056840 +[TTURLRequest requestWithURL:delegate:] + 32
What are the hex numbers 0x0005684a and 0x00056840? What are the n... | stackexchange/codereview |
My regex expression for isapi rewrite here isn't passing variables in the URL
Trying to pass a variables like: www.domain.com/z34232/ProductName.html?ref=magic
But the code is ignoring the "ref=magic" string
RewriteRule .*z([[:digit:]]*)\/.*.html\??(.*) /product.asp\?pnum=$1(?2&$2&:) [I,O,L]
Any suggestions would... | stackexchange/codereview |
I have been experimenting with the box2D sample project within cocos2D for the iPhone and am wondering if box2D is the appropriate engine to use to make a moving object "stick" to a stationary object when the moving object is finished moving in a certain direction.
Here is a simplification of what I am trying to achie... | stackexchange/codereview |
I have a dropdown that is bound to a column in an excel spreadsheet. I select a customer in the dropdown and then populate some address fields with related data also from the excel spreadsheet.
Code:
Private Sub cboCompany_Change()
Dim customerName As String
customerName = cboCompany.Value
... | stackexchange/codereview |
I'm runnining on Windows, with the windows p4 client, and git installed via Cygwin. The p4 client advertises how its syntax is regular across platforms and all that, so that should be hunky-dory.
So when I go to git-p4 clone --verbose //depot/path/to/source, it lists out all the files in the repository as though they w... | stackexchange/codereview |
Quick & dirty Q: Can I safely assume that a byte of a UTF-8, UTF-16 or UTF-32 codepoint (character) will not be an ASCII whitespace character (unless the codepoint is representing one)?
I'll explain:
Say that I have a UTF-8 encoded string. This string contains some characters that take more than one byte to store. I ... | stackexchange/codereview |
so i was wondering this: for example: when you subscribe to Facebook you have the option to invite your friends from gmail(if you have a gmail account), so you would enter your gmail login and password and facebook would grab all your contacts from gmail, so i was wondering how this is done? is there an API from Gmail ... | stackexchange/codereview |
I'm working with .net Reflector to view some .net Compact Framework .dlls and I'm getting an "Object reference not set to an instance of an object" error for one of them. I downloaded the trial version of 9Rays.Spices.Net and it loaded the .dll just fine. The only problem is that I'm getting only every other method.
... | stackexchange/codereview |
I'm looking for a simple Python framework/library for creating a website run using PyPy.
So far, I'm using web.py, so that's the feature set (a bit a templating, sessions, input processing, that's it) I need for this project. Very minimalist, if possible.
web.py is not unfortunately not compatible with Python 2.5 (at l... | stackexchange/codereview |
I am using the standard Flex 3 BubbleChart component and I would like to customize a couple of the grid lines separately from the rest.
I would like to highlight a gridline in the X-direction as well as in the Y-direction to show a quadrant.
Is there any way to customize the look and feel of a subset of gridlines withi... | stackexchange/codereview |
By default, I can see "Delete the selected user" action from django user admin page, now I want to add more actions? Who has any idea?
I've looked at "http://docs.djangoproject.com/en/dev/ref/contrib/admin/actions/#writing-actions", but I don't know how to add the action to it. Need your help, thanks.
| stackexchange/codereview |
I'm seeing on this site: http://www.modernizr.com/docs/ how they have a decimal list item that actually shows the decimals. I've used firebug and can't seem to determine exactly how it's done. It's gotta be done somehow via CSS... I turned off JS and it still shows up.
Perhaps someone else could have better luck...
| stackexchange/codereview |
I have an iPhone game and I use a LASSO web page to add scores to a MySQL database.
It now works fine, but I am getting one 'user' that submitted hundreds of impossibly good scores in succession. I know this could not have done the 'legal' way.
I am now updating the app and want to avoid such nonsense.
My initial thoug... | stackexchange/codereview |
This is using phpMyAdmin.
I need to find the contact information for Subscribers who have pending Orders on November 15th. Their contact information is stored in a table called Subscribers, and the primary key is UID (User ID). The Subscriptions Table has a primary key called SID (Subscriptions ID). The Subscriptio... | stackexchange/codereview |
I need to run this php script http://db2express/imacs/radek/3.1/rationalTest.php?mode=create
The processing time is about 10mins or so and it streams out to the browser output of what it does. It's creating and setting up and a database, creating indexes etc.
How can I measure how long it takes to process which means f... | stackexchange/codereview |
I'm using the Silverlight DatePicker and TimePicker from the toolkit together to allow a user to select a date and time. They are bound to the same DateTime value on a business object behind the scences. This mostly works okay, except when the date component is changed the time component is wiped. This is kinda logical... | stackexchange/codereview |
As there is no helper for File Input, how can we safely handle a file input?
If it better just to have a button
<input type="button" value="Upload File" />
and handle this in a new pop-up page/window?
shall I have the
<input type="file" value="Upload File" />
but how would I handle this in the code?
#region General... | stackexchange/codereview |
I don't know if this is a bug or whatever, but how can I call the event in the code-behind after enabling the linkbutton?
This is my linkbutton:
<asp:LinkButton ID="btnStartImportNow" runat="server" OnClick="btnStartImportNow_Click" Enabled="false">
<div class="css_action_item_enabled" style="float: right;">
<d... | stackexchange/codereview |
Beginners question. I have started my iPython shell and I am running scripts with the run-command and everything works great. However running a script file and then editing a imported script file and then trying to run it again causes the old imported file to run. So I am guessing python saves some kind of cache for sp... | stackexchange/codereview |
How to move sound from left to right of earphones in iPhone?
| stackexchange/codereview |
can i block commit operation possibility to selected branch
| stackexchange/codereview |
I have got a tech problem of implementing the reflection effect for TextView, in order to create a Clock/Timer. I have read many articles about this, but they are all about adding reflection effect for Images.
Would anyone please point me to the right direction to do so or simply show me some demo which are already the... | stackexchange/codereview |
I see on some website (like StackOverflow, yahoo, the US Homeland Security department, ...) a word associated to a link that, when clicked, not only loads a page, but also, displays that page at the exact location where the contain related to the word starts.
How can I obtain that with ASP.NET MVC? (by the way, do I n... | stackexchange/codereview |
On just one phone I am testing on (HTC Incredible, Android 2.2, Software 3.21.605.1), I am experiencing the following behavior.
The onEditorAction event handler is being called twice (immediately) when the Enter key on the Sense UI keyboard is pressed.
The KeyEvent.getEventTime() is the same for both times the event is... | stackexchange/codereview |
I'm trying to create a thread and let it run until my main signals it to start, which I think is done with SetEvent. But the code in the thread is never executed. Below is the bare code I have stripped down of (I think) unrelated functions. Is the algorithm correct ?
Here is what I thought it did :
When in the main, t... | stackexchange/codereview |
I'm making an inventory screen for a game I'm working on, and I'd like to be able to draw a series of panels representing each item in the inventory. I want to be able to fit those panels on a circular path.
Here's a mock up I made of what I mean
http://fc02.deviantart.net/fs70/f/2010/280/7/2/khmp_magic_menu_concept_b... | stackexchange/codereview |
* -[__NSArrayM count]: message sent to deallocated instance 0x5edd5e0
I am Getting this type of exception and its crashing my app. The code is:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if(section == 0){
return ([billDetials count]+ 1);
}
int rows = ([billers coun... | stackexchange/codereview |
What's the easiest way to plot location track based on series of reading of accelerometer/gyro/compass sensors taken over time? Let's say I have following data taken every second:
ElapsedTime(s) xMag(uT) yMag(uT) zMag(uT) xAccel(g) yAccel(g) zAccel(g) xRate(rad/sec) yRate(rad/sec) zRate(rad/sec) roll(rad) pitch(rad) ya... | stackexchange/codereview |
Opera 10.0 has some bugs related to SVG background images. These are fixed in 10.5.
I’d like to use SVG background images for gradients in Opera, but hide the code from those poor souls still on Opera 10.0.
Does anyone know any CSS hacks or similar to hide CSS from Opera 10.0 and earlier?
| stackexchange/codereview |
I have a url which will take the following form:
/AuditReview/Review/15d49a66-5c11-492c-921f-9e1700bd2618
I cannot get this to route, my routes look like this:
MvcRoute.MappUrl("{controller}.mvc.aspx/{action}/{auditEventUid}")
.WithDefaults(new {controller = "AuditReview", action = "Review"})
.With... | stackexchange/codereview |
I have a search page that allows the users to filter other users by various categories (age, gender, country, region, ethnicity, etc). The first time the search function is called it gets all the possible values for each category from the database. Just wondering though...
Is it better to POST this data back each time ... | stackexchange/codereview |
How can I make a Winforms window stretch from the top of the screen to the bottom but not over the Taskbar?
I'm looking for an end result similar to the snap feature in Win 7, but would like it in XP and Vista too.
| stackexchange/codereview |
I'm using FreeTextBox HTML editor in some webforms in my asp.net project . if I do not set ValidateRequest property to false I get this error :
A potentially dangerous Request.Form value was detected from the client
It's OK in admin folder though , Because only authorized users have access to work with it . But how a... | stackexchange/codereview |
I have a table without identity field. the structure about:
Date date,
SomeFK int,
Key float,
Value float
I need to be able to select not using cursor something like
select Key, PrevKey, Value from ... where Key > @a and Key <= @b
where the PrevKey has to be a Key from previous record, given that the recordset ordere... | stackexchange/codereview |
<Connections>
<Connection ID = "1" Source="1:0" Sink="4:0"/>
<Connection ID = "2" Source="2:0" Sink="4:1"/>
<Connection ID = "3" Source="2:0" Sink="5:0"/>
<Connection ID = "4" Source="3:0" Sink="5:1"/>
<Connection ID = "5" Source="4:0" Sink="6:0"/>
<Connection ID = "6" Source="5:0" Sink=... | stackexchange/codereview |
I have a function which is passed two structures by reference. These structures are composed of dynamically allocated arrays. Now when I try to implement OpenMP I'm getting a slowdown not a speedup. I'm thinking this can be attributed to possible sharing issues. Here's some of the code for your perusal (C):
void ... | stackexchange/codereview |
Bit of background for those who don't know DirectX. A vertex is not just an XYZ position, it can have other data in it as well. DirectX uses a system known as Flexible Vertex Format, FVF, to let you define what format you want your vertexs to be in. You define these by passing a number to DirectX that use bitwise or to... | stackexchange/codereview |
Which hashmap collision handling scheme is better when the load factor is close to 1 to ensure minimum memory wastage?
I personally think the answer is open addressing with linear probing, because it doesn't need any additional storage space in case of collisions. Is this correct?
| stackexchange/codereview |
I've been working with WordPress built-in functions for a couple of days now and got everything working this far. However, I am trying to find a solution to only fetch posts that have thumbnails into an array/object.
I have already checked out the Wordpress function references, but have yet not found any solution. How ... | stackexchange/codereview |
I need the sourcecode for these libraries:
commons-codec-1.3
commons-httpclient-3.0.1
commons-logging-1.1
log4j-1.2.14
jaxb-ri-2.1
I need the code to recompile it in eclipse in android app and use it with javax.xml packages as you know javax.xml can not be used in eclipse in an android project.
All of this is to use... | stackexchange/codereview |
Today I read a book and the author wrote that in a well-designed class the only way to access attributes is through one of that class methods. Is it a widely accepted thought? Why is it so important to encapsulate the attributes? What could be the consequences of not doing it? I read somewhere earlier that this improve... | stackexchange/codereview |
I have a mysql question :
using php with mysql I actually have a schema that looks like this :
3 tables :
module
module_has_theme (pivot table)
theme
The idea behind this is to display the modules of my application using themes if they have,
and if they don't, then display them in an extra category (other).
So let's ... | stackexchange/codereview |
I am building an enterprise application using HTML5 for Blackberry OS 6.0. I am planning on using PhoneGap for developing the application. I found out that Blackberry also has something similar called WebWorks.
What are the differences between WebWorks and PhoneGap?
| stackexchange/codereview |
I have recently started working with jQuery and today noticed a strange issue with how it's behaving for me. As I understand it, JavaScript is single threaded. So all of it's operations should run in a FIFO basis. However, this did not appear to be the case for me. Please consider the following.
SETUP is as follows
... | stackexchange/codereview |
I want to make a toolbar button in eclipse that when pressed, removes all newlines from my selection.
How can I do this?
| stackexchange/codereview |
Here's the workflow that I'm trying to build
compile my proto files using a script, putting the generated src in a specified directory
link to the generated classes in Eclipse
compile my project
I am easily able to do this for C++ using Eclipse CDT: In my project I choose File->New->Other and choose File under Genera... | stackexchange/codereview |
In my Rails application, I would like to use simultaneously 2 backends, the first one storing translations in a DB, and the second one being the default YML based backend. I woud like that this second backend serves as a fallback backend, ie if a translation is not found in the first, Rails looks up the translation in ... | stackexchange/codereview |
I'd like to build some native libraries for android using the NDK (native development kit), but i'd like to use Visual Studio 2010 to do it. I've googled quite a bit but haven't found any information on it. Does anyone have any experience with this and know the steps necessary to make this happen? I have CYGWin install... | stackexchange/codereview |
The ReadProcessMemory function of kernel32.dll appears to be returning Unicode.
kernel32 = ctypes.windll.kernel32
PROCESS_QUERY_INFORMATION = 0x0400
PROCESS_VM_READ = 0x0010
pid = int(raw_input("Enter PID: "))
hproc = kernel32.OpenProcess(PROCESS_QUERY_INFORMATION |PROCESS_VM_READ, False, pid)
lpbaseaddr = 16799644
re... | stackexchange/codereview |
I want to read the bundle version info from Info.plist into my code, preferably as a string. How can I do this?
| stackexchange/codereview |
I have an xml file, something like this:
<root>
<groups>
<group />
<group />
</groups>
</root>
Now, I want to make a class something like this:
[XmlRoot]
public class Root
{
[XmlElement("groups")]
public Groups Groups { get; set; }
}
The problem is that the XmlElement attribute will make all t... | stackexchange/codereview |
I have a C++ class library that uses omp for parallelization. I noticed my problem when it always used up all cores on my processor no mather what omp_set_num_threads(threadCount) had as input.
So when investegating I realized that the only way to get num_threads to work was to not use the omp_set_num_threads() method... | stackexchange/codereview |
I see Switch statement in:
switch() {
case 'string': ...;
}
but would hope if I could do this?
switch() {
case 'string??' ...;
}
where ?? is like accept 2 random characters.
| stackexchange/codereview |
I have my java application and try to connect with mysql database.But i can't able to get the output,i am getting the Exception error.I think i am not able to connect with the driver.My OS is Linux(Ubuntu).
nikki@nikki-laptop:~$ java -version
java version "1.6.0_20"
OpenJDK Runtime Environment (IcedTea6 1.9) (6b20-1.9... | stackexchange/codereview |
Im working with jQuery. I have an app that makes ajax requests to server that responds with JSON.
in some cases the response from the server will indicate the name of a JS function to be called
{"responseType":"callback", "callback":"STUFF.TestCallback","callbackData":"this is in the callback"}
If the responseType is... | stackexchange/codereview |
I've read about how a hard job in programming is writing code "at the right level of abstraction". Although abstraction is generally hiding details behind a layer, is writing something at the right level of abstraction basically getting the methodss to implement decision correct? For example, if I am going to write a c... | stackexchange/codereview |
could some one please tell me if there is a way to load kml file into the google map in android.
thanks
| stackexchange/codereview |
I have been curious about better ways to cross browser test than those screenshot services or maintaining my own array of VMs to VNC into. Then today I found crossbrowsertesting.com (which seems to allow you to connect from your browser via VNC to one of their machines running virtually any browser). This is really sim... | stackexchange/codereview |
I have a client who has set-up a testing environment in some AI language. It basically runs some predefined test cases and stores the results in as log files (comma separated txt files). My job is to identify and suggest a reporting system and I have these options in mind. either
1. Importing the logs into MSSQL and u... | stackexchange/codereview |
I can't understand why an embedded OpenEJB container fails at the beginning with very un-informative message (sorry for a long log):
Running com.XXX.MyTest
Apache OpenEJB 3.1.3 build: 20101015-05:42
http://openejb.apache.org/
INFO - openejb.home = [skipped...]
INFO - openejb.base = [skipped...]
INFO - Configuri... | stackexchange/codereview |
I have a django model as follows:
class ExportFile(BaseExportFile):
created_timestamp = models.DateTimeField(auto_now=True, editable=False)
data = models.FileField(upload_to='exports')
and a view function that renders a template to create a csv file:
def create_csv(request):
context = Context({'data'... | stackexchange/codereview |
I have a custom control that contains 6 panel controls that act like containers for other controls that are dropped in during design time. This was done by creating a custom designer inheriting from ParentControlDesign. In the designer, I use EnableDesignMode to enable design time functionality for each panel control... | stackexchange/codereview |
I have a page, and a Google Maps map is inside a hidden div at first. I then show the div after I click a link, but only the top left of the map shows up.
I tried having this code run after the click:
map0.onResize();
Or:
google.maps.event.trigger(map0, 'resize')
How can I do it?
Here is an image of what I see after... | stackexchange/codereview |
I want to structure my database in such a way that certain tables (that don't have any relationships with other tables, so no joins required) have to be put on seperate mysql databases.
I know each model has a establish_connection property.
What I want to do:
I will fetch 10 rows from a particular model, based on a cl... | stackexchange/codereview |
Dear all. We have 2 arrays(currentCarriers and companyList with strings inside. A final solution have to be array, which exclude same string from first array.
Bellow is a my solutions, but probably two for loops is not like cocoa style. Maybe somebody can suggest something better?
for (NSString *carrier in currentCarri... | stackexchange/codereview |
I have a class library project that references another class library. The project fails to build and I get the error 'The type or namespace name 'ReportLibrary' does not exist in the namespace 'MSF' (are you missing an assembly reference?)'
The weird part is that I have other projects referencing the same class librar... | stackexchange/codereview |
I have a simple shopping cart web site that uses a MySQL database to store the products. There are THOUSANDS of products, and as a result these items can be managed from both a web based interface as WELL as by generating a TSV file, downloading, editing and re-uploading which then parses the now changed CSV file, maki... | stackexchange/codereview |
I'm developing a system composed of many independent subsystems. Two of such subsystems are the Window and the GraphicsAdapter subsystem.
The GraphicsAdapter requires a low-level window handle (HWND or X11 Window Handle, depending of the operating system), and the Window subsystem is a way to abstract those OS specific... | stackexchange/codereview |
Does anyone know if there is a way I can get a database's max RowVersion value? The database I am using is SQL Server 2008.
Thanks.
| stackexchange/codereview |
We need a datagridview with more than 2000 columns.
The problem that we have is that only around 700 columns are showing correctly, and the remaining are not showing.
We need to do this because each column represents a day for example: 2009/01/01/ - 2009/01/02
Does this control have a limit of columns that can show cor... | stackexchange/codereview |
I have an application that uses NSDocument to open files. I have an NSView in my NIB, and I'd like to set it's size according to the image opened:
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError {
NSLog("FOO");
// Load image
// ...
// Change size
[mainView setFrameS... | stackexchange/codereview |
If the president changes, I would have to change the value of presidentName three times below in the application-context.xml:
<beans:property name="presidentName" value="Barack Obama" />
Is there a way to set variable once in application-context.xml to represent the string Barack Obama.
<?xml version="1.0" encoding="U... | stackexchange/codereview |
I am trying to create a 2d matrix so that each cell contains a list of strings.
Matrix dimensions are known before the creation and I need to have access to any element from the beginning (not populating a matrix dynamically). I think some kind of pre-allocation of space is needed.
For example, I would like to have a 2... | stackexchange/codereview |
I'm using the FontFitTextView that was posted in this other thread, but it isn't working exactly right for me. The measureText() call is returning a number that is obviously too small to display the string. When it runs through to find a font size that will allow the text to fit, the font size it settles on is still to... | stackexchange/codereview |
I am currently using Visual Studio 2010 post-build event to minify my JavaScript files. The problem is every time I add a new JavaScript file I have to update the post build event. What I want to do is make the script a bit more flexible.
Directory structure:
\Scripts\
Script1.debug.jsScript2.debug.jsScript3.debug... | stackexchange/codereview |
I'm using the Silverlight Toolkit DataGrid. Grouping is working fine, thanks to the PagedCollectionView class.
My question is, is there an easy way to customize the text of the group header? When I group by "CurrentBook.SubTitle" (just testing it out - grouping by a book's subtitle doesn't actually make sense) it dis... | stackexchange/codereview |
Can I set up a route that will get mapped from a root-level URL like this?
http://localhost:49658/
I'm using the VS2010 built-in web server.
Attempting to set up a route with a blank or a single-slash URL string doesn't work:
routes.MapRoute(
"Default",
"/",
new { controller = "Home", action = "Index", id =... | stackexchange/codereview |
This probably might be a silly question, but what I am trying to do is to make an if statement to do the following:
<?php if ($_SESSION['login'] == true) { ?>
Display this HTML code (without converting it to PHP echos
<?php } else { ?>
Display this instead
<?php } ?>
Or will I need to echo, and in turn escape all the ... | stackexchange/codereview |
Possible Duplicate:
Is there a shortcut to move between header and source file in VC++?
Hi.
Quick and easy question I haven't been able to discover myself:
Which is the keyboard shortcut for switching to the corresponding header file of a .cpp file in MS VS2010.
Thanks.
| stackexchange/codereview |
When reading tutorials and code written in C++, I often stumble over the const keyword.
I see that it is used like the following:
const int x = 5;
I know that this means that x is a constant variable and probably stored in read-only memory.
But what are
void myfunc( const char x );
and
int myfunc( ) const;
?
| stackexchange/codereview |
i have table contains more than 4 million record which make the select query take long time to execute so i decided to add non-clustered column to reduce the time, and that work fine which reduce it from 2 minutes to less than 1 second.
but i discovered later that this change make some problem when executing other pro... | stackexchange/codereview |
I'm trying to make a call for a c++ / python file with proc_open (bi-directional support needed).
After doing some on-line research I found created this code: (I first tried it with c++, after failure I tried python as well)
PHP:
<?php
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
... | stackexchange/codereview |
I'm adding Nodes to TreeView dynamically. I'm just creating labels and add them to nodes. My treeView looks like that:
TreeView 1
-Node 1
- Node 1.1
-Node 1.1.1
-Node 1.1.1.A
-Node 1.1.1.B
-Node 1.1.2
-Node 1.1.2.A
After click nodes, i want only do something if clicke... | stackexchange/codereview |
Basically, I have a colon delimited variable being passed into my template that I would like to loop through to display each individual element.
I would like to be able to extract each of these names and then perform logic on them within my template.
If I could use python, I would do something like (note: file_type is... | stackexchange/codereview |
I'm Trying to access results div in the results page of google.co.uk.
Using firebug one can see that the id of the div is "res" but for some reason getElementById('res') fails. to make things even weirder - if i refresh the page (F5 or ctrl+F5), the function succeeds.
Also, if i look in the source code of the results p... | stackexchange/codereview |
Table 1 2 columns: ID, Name
Table 2 2 columns: ID, Name
What is a query to show names from Table 1 that are not in table 2? So filtering out all the names in table 1 that are in table 2 gives the result query. Filtering is on ID not name.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.