instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I'm going to validate simple math expressions such these:
a = 1 + 2
b = 2.2
a = b + 5.5
a = b - -5.5
a = -1 + 2
a = -2.4
a = 3.5 / 0.2 + 1
a = 3 * -2.1
NOTE: Operator precedence is not important!
I try following expressions but i got nothing!!!
for digits: ^([-]|[.]|[-.]|[0-9])[0-9]*[.]*[0-9]+$
for operators: [-]|[+]|... | stackexchange/codereview |
this should be fairly simple but for some reason, it doesn't work.
I want to get the "alt" attribute from an image that resides inside an tag
<div id="album-artwork">
<ul>
<li><a href="link to large image"><img src="thumbnail" alt="description of the image" /></a></li>
...
</ul>
</div>
$("#album-artwork a").c... | stackexchange/codereview |
I'm using the Galleria plug-in. It works perfectly in Firefox and IE 7/8 but just completely fails in Chrome/Safari. The JavaScript doesn't even kick in, you can tell by the fact that it's not surrounded the #gallery div with the extra #galleria-container divs like it normally does. Literally nothing happens, I've chec... | stackexchange/codereview |
ActionScript 3, just learning AS3 but know a handful of other languages.
What would cause an event that the listen call executes without throwing an error and was successfully dispatched, to not be listened to?
dispatch call (this runs ):
private function HandleMouseClick( e:Event ):void{
if ( m_MouseState == MOUSE_ST... | stackexchange/codereview |
I need to write a menu in Site.Master where certain menu items have to be visible or not depending on current user role. How can I check that from the page?
Usually would just write the logic in a controller, but the Site.Master doesn't have one (in my project at least!). I'd appreciate any pointers.
| stackexchange/codereview |
I need a common rule for warnings in x64 mode. Which way is better?
Consider the following lines of some code
const int N = std::max_element(cont.begin(), cont.end()) - cont.begin();
or
const int ARR_SIZE = 1024;
char arr[ARR_SIZE];
//...
const int N = std::max_element(arr, arr + ARR_SIZE) - arr;
It is my usual code... | stackexchange/codereview |
I created a regular Phone 7 template.
Drug the Bing map control to the main grid.
And for some reason the ManipulationStarted event is not fired when i click/interact with the bing map control in the emulator.
Why this is happening ?
(I am using latest Phone 7 Tools RTM).
| stackexchange/codereview |
Our development servers are on Amazons EC2.
We would ideally like the following:
PHP 5.3.x
Oracle Drivers
mHash
mCrypt
Apache
Does anyone have a recommendation on a good place to get a stack that would meet most of those needs with a minimum of additional configuration?
| stackexchange/codereview |
so I have a button with this event:
onmousedown="hideElements('\x22cartview\x22,\x22other\x22')"
and then this function hideElements:
function hideElements(what)
{
var whichElements=[what];
alert(whichElements[0]);
}
I want it to alert "cartview" but it alerts
"cartview","other"
I am aware of the argume... | stackexchange/codereview |
Possible Duplicate:
Receive and send emails in python
I've been looking into sending mail with python and found a few different options (setting up my own mailserver, using gmail's smtp, etc) but was wondering if there was some simple way to do it. I am running the python script via wsgi on apache2 on an ubuntu box.... | stackexchange/codereview |
Is there a precedence to combinators like
a > b ~ c d
(Note the space between c and d is the descendant combinator)
Or is it just read left-to-right, like
((a > b) ~ c) d
?
| stackexchange/codereview |
Does anyone know how to maintain postback while calling WebForm_DoCallback? it always set the vertical scrollbar of the page to the very top.
thanks
| stackexchange/codereview |
I'm trying to make an iPhone app that is controlled by touch. I also want a powerup to be activated when the user double-taps. Here's what I have so far:
UITapGestureRecognizer *powerRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(usePower)];
powerRecognizer.delaysTouchesEnded = NO;
po... | stackexchange/codereview |
I've got a Perl/DBI program that needs to connect to a Lotus Notes database. With NotesSQL installed, the program works, but keeps prompting me for a Notes password. Is there any way to pass the Notes ID and password programmatically? I'm using ActiveState Perl 5.8.8, Notes 8.5, and NotesSQL 8.0.
| stackexchange/codereview |
I use Linq to Sql and have trouble of how to update a many to many relation.
My scenario:
A product is specified by one or more items. When I create a Product, i just select the needed items and they are added by:
product.ProductItemRel.Add(itemRel);
But what is the best practice when I need to update?
I could make my... | stackexchange/codereview |
I have this WPF 4 code:
<Button Content="{Binding Path=Header}" Command="{Binding Path=Command}" CommandParameter="{Binding Path=CommandParameter}" Focusable="False">
<Button.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="White" Offset="0"/>
... | stackexchange/codereview |
I want to run a VBA macro AFTER the workbook has finished opening. I tried to use workbook_open but this runs before the workbook has finished opening. This doesn't work for me as I need to loop through each sheet like so...
Private Sub Workbook_Open()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
'do ... | stackexchange/codereview |
I am currently working on my datagridview which is being populated by a stored procedure's query from the database. My question is how can I select the whole row even though I only click one cell?
Example, there are four columns returned by the stored procedure. So basically the datagridview will present to me data in ... | stackexchange/codereview |
What is wrong with the following program to fetch time from time server.
public class SocketTest
{
public static void main(String[] args)
{
Socket s = new Socket(“time-A.timefreq.bldrdoc.gov”, 13);
BufferedReader in = new BufferedReader(
new InputStreamReader(s.getInputSt... | stackexchange/codereview |
I found this code here while trying to understand what an actionstack does and why they're supposed to be so bad. I thought that an actionstack is just one type of action helper (just like flashmessenger or redirector or ViewRenderer).
But anyway, does anyone understand what this code does and how to do the same thing... | stackexchange/codereview |
I am using a ProcessStartInfo to patch a file with a text file like this (through cmd.exe):
app.exe temp.txt patch.ips
I wrote this code:
ProcessStartInfo P = new ProcessStartInfo("app.exe");
P.Arguments = "temp.txt " + _patchpath;
P.CreateNoWindow = true;
P.UseShellExecute = false;
P.RedirectStandardOutput = t... | stackexchange/codereview |
I'm creating a JasperReports's report using some database connection using iReport. I have added a new field to the report. That field does not exist in the database column. I have put that column in the report and assigning the value to this field using the expression.
It compiles fine but when I fill the report using... | stackexchange/codereview |
I am about a develop a simple web application (5-6 static pages). Is there a framework I could use for this? I can just write these HTML pages without a framework but I would like a framework as it will better handle header, footer, and CSS throughout the website.
I have a Perl script that will be modifying these HTML ... | stackexchange/codereview |
I have a Perl script to analyze many megabytes of data line-by-line.
As an example, I will use the close of the Dow Jones Average by day for several lines.
The data is read and the layout of the data in the file is straightforward. In this example, it is:
Date Open High Low Close Volume Adj-Close
As I read the data, m... | stackexchange/codereview |
i need a quick hint regarding the following exercise question:
Write a program that generates all Pythagorean triples whose small sides are no larger than n. Try it with n <= 200.
what is "no longer than n" all about ??
exercise source: Java by Dissection (Ira Pohl and Charlie McDowell)
note: i found what looks to b... | stackexchange/codereview |
I'm implementing some stuff in my Struts-based application using interceptors, and I'm getting confused about how their lifecycle works. According to the Struts docs ("Interceptors", "Writing interceptors" and "Big picture"), it should work something like this:
FirstInterceptor
NextInterceptor
LastInterceptor
... | stackexchange/codereview |
I want to avoid serialisation ( in JMS / AMF ) but still persist the field with JPA/Hibernate.
Is the transient modifier my friend ? Are @Transient annotation and the transient modifier related or not a all ?
The java specification precise that a transient field will not be saved to a persistent storage by a system ser... | stackexchange/codereview |
I have a heap dump and I'm using Eclipse MAT, though I suppose this should work through visualvm or whatever OQL client.
We can select fields of all instances of a class by doing something like
select s.field1, s.field2 from org.me.MyClass
... but this is restricted to member variables, and to types with instances.
Ho... | stackexchange/codereview |
I have a C# web service on IIS acting like a proxy. My problem is that when the IP address of one of the backend servers change, the windows DNS cache is correctly updated (checked with nslookup) but the service continues to do some requests on the old IP for about 40 minutes.
I noticed that the failover works if I sto... | stackexchange/codereview |
I know how to list the remote branches
$ git branch -a
And I know how to find the head commit hash of my current branch
$ git rev-parse HEAD
But I'm not sure how to list all the head commit hashes for all the remote branches. This is close to what I want but what order are they in?
$ git rev-parse --remotes
4b9f7128... | stackexchange/codereview |
I want to make a dll with an exposed C function accessible to applications on the system.
Is there a better way to make it available than modifying %PATH%?
Because people don't like adding it to %PATH% here.
| stackexchange/codereview |
I'm creating a small crypto app for the desktop using java.
I'm using JFrames (import javax.swing.JFrame) with Oracle
JDeveloper 11g under Linux.
I want to have a "welcome" form/frame where users can choose
their encryption method, and then on choosing the method,
I want to dynamically create the appropriate form for t... | stackexchange/codereview |
I want to trigger some code when page action or browser action popup gets closed. I tried listening to onunload and onbeforeunload events on <body> or window but they never fire.
| stackexchange/codereview |
I have a ongoing issue with my website, where it appears the W3wp.exe crashes and in turn anyone attempting to connect to the site will receive a SQL server timeout error.
The error is this...
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the ser... | stackexchange/codereview |
I just wrote this method and I'm wondering if something similar already exists in the framework? It just seems like one of those methods...
If not, is there a better way to do it?
/// <summary>
/// Return the whitespace at the start of a line.
/// </summary>
/// <param name="trimToLowerTab">Round the number of spaces d... | stackexchange/codereview |
6 months ago , i was asked to make a database access for our project that has around 30 tables ,( using the Data transfer object pattern ) . we were using Microsoft's sql server back then. so i had to write a script that automatically generates the DAO's and DTO's.( automatically build classes, name them appropriately... | stackexchange/codereview |
Just to use it as an example, StackOverflow users already associated tags to questions for a lot of questions.
Is there a .NET machine learning library that could use this historic data to 'learn' how to associate tags to newly created questions and suggest them to the user?
| stackexchange/codereview |
I have this piece of code:
SELDR_WH := FindControl(FindWindow(nil,'PhoneDB Filtering')) as TForm;
if seldr_wh <> nil then
begin
SELDR_WH.ClientHeight := SELDR_WH.ClientHeight + 20;
gif := TGIFImage.Create;
with gif do begin
Parent := SELDR_WH;
Top := SELDR_WH.ClientHeight - 20;
Left := ... | stackexchange/codereview |
I am writing a module for Lua. On closing the lua interpreter it must run clean up routines even if user forgets to call shutdown routine implicitly.
The module is mostly written in C.
What callback in Lua C Api should I use to detect end of program execution? The only idea I have come with is using __gc metamethod on... | stackexchange/codereview |
When preparing a library (let's call it libfoo), I find myself presented with the following dilemma: do I write it as a C++ library with a C wrapper:
namespace Foo {
class Bar {
...
};
}
/* Separate C header. #ifdef __cplusplus omitted for brevity. */
extern "C" {
typedef void *FooBar;
FooBar* foo_bar_new(... | stackexchange/codereview |
In my application I'm performing somewhat heavy lookup operations. These operations must be done within a single thread (persistence framework limitation).
I want to cache the results. Thus, I have a class UMRCache, with an inner class Worker:
public class UMRCache {
private Worker worker;
private List<String> requ... | stackexchange/codereview |
I have a full inverted index in form of nested python dictionary. Its structure is :
{word : { doc_name : [location_list] } }
For example let the dictionary be called index, then for a word " spam ", entry would look like :
{ spam : { doc1.txt : [102,300,399], doc5.txt : [200,587] } }
I used this structure as python ... | stackexchange/codereview |
I spend a lot of time offline, and while normally I'm in the middle of some book or magazine for work, I've recently been reading through the MSDN Library documentation of Visual Studio 2010 Application Lifecycle Management (aka TFS 2010).
Unfortunately, this documentation doesn't seem to be included on either the Vs2... | stackexchange/codereview |
I've written a rails site in the latest version of rails, based on knowledge of rails from a couple of years ago, and I've hit a horrible snag.
I foolishly decided to ignore the new RESTful routing system and hope for the best.
So all of my views are plain .erb, NOT html.erb
my routes file looks like this
map.connect '... | stackexchange/codereview |
I'm working on some complex design and have a silly question once again :)
Well, let's say I have a div and some content inside, like:
<div style="background-color: #fff; width: 1000px; margin: 0 auto;">
<img src="img.png" />
<p>Blablabla :)</p>
</div>
<div style="background-color: #000; width: 1000px; margin... | stackexchange/codereview |
I'm looking for some (more than intro-level) database optimizations, not just for Rails but for SQL in general.
In Rails, how/when do you start using these?
cache_counter
caching ids in a table (user has_many roles, so the user table gets a role_ids serialized column, since every request requires fetching the roles).
... | stackexchange/codereview |
I'm working in a group right now, writing an app that needs to be able to reference a file which is not written at runtime. Essentially, the file stores data which the app (a game) uses at certain points.
I don't have any trouble saving files at runtime and then referencing those files, but for some reason, I'm having ... | stackexchange/codereview |
I'm currently developing a solution and have designed it in a way such that it strongly implements the strategy/provider pattern. As such the solution exposes a number of interfaces and contains default implementations of these interfaces which can be replaced via a DI type methodology.
Where the host application uses... | stackexchange/codereview |
This is the code
First time its work fine for me.That is it open the modal box.But the second time It wont open the Modal box when I add the anchor tag using Jquery append.Why?What I need to change its going to be work?Thanks.
Update:
I am using Thickbox
<input type="text" name="maxprocedure" id="maxprocedure" value... | stackexchange/codereview |
I have read about Spring ACL but it does not seem to be very competent. For example:
No way to list all objects of type X with permission Y
No way to automatically create the schemas for new deployments
What are you using for ACL? Is it clever to have the ACL so decoupled from the domain model?
| stackexchange/codereview |
using the API I am trying to create a contact, using the API 2.x and not the old one. Here http://developer.android.com/guide/topics/providers/content-providers.html it only explains the old API. I haven't found any proper tutorial, example, etc. showing how to create a contact. As far as I have figured out I have to c... | stackexchange/codereview |
During Zend_Controller_Action::init(), is there a way to cancel the action (so it won't be called)?
<?php
class JsonApiController extends Zend_Controller_Action {
function init()
{
// try JSON decoding the raw request body
if ($jsonDecodingFailed) {
echo '{"error":"invalid JSON"}';
... | stackexchange/codereview |
The sql statement is:
SELECT 'customer_address'._id, 'address'.Descriptor AS Name
FROM 'customer_address'
INNER JOIN 'address' ON 'customer_address'.AddressID='address'._id
WHERE 'customer_address'.CustomerID=4 ORDER BY Name
When I examine the db using the adb sqlite shell, it reports that the schema for the address... | stackexchange/codereview |
Trying to implement a timer for my game that I'm making. I have a backend class Game that has an int timeElapsed() method. This gives me elapsed time since the start in milliseconds. I also have a front end view that needs an update of this elapsed time. What is the best way to synchronize these two values? I could set... | stackexchange/codereview |
I am trying to write generic code for detaching a linq class. What I have currently is:
public void Detach()
{
this.PropertyChanged = null;
this.PropertyChanging = null;
this.Categories = default(EntitySet<Categories>);
this.Jobs = default(EntitySet<Jobs>);
this.Tasks= default(EntitySet<Tasks>);
}
... | stackexchange/codereview |
Is there any any way to add a TextView to application settings in Iphone. According to Apple's documentation, I can only find TextField, but not TextView. I have tried several key values like PSTextViewSpecifier, but no luck. Any help is greatly appreciated.
| stackexchange/codereview |
I need to take a screen shot and convert that screen shot to a 16 bit color depth.
I am using C# and .net cf 3.5.
I think I could adapt this solution to do it, but I want to know if that is overkill. Is there a way to do this just using .NET CF (ie, no/less p-invokes.)
If it can be done just using .NET CF then it wo... | stackexchange/codereview |
I'm currently reformatting some HTML pages with BeautifulSoup, and I ran into bit of a problem.
My problem is that the original HTML has things like this:
<li><p>stff</p></li>
and
<li><div><p>Stuff</p></div></li>
as well as
<li><div><p><strong>stff</strong></p></div><li>
With BeautifulSoup I hope to eliminate the ... | stackexchange/codereview |
Assume a polymorphic association, say 'business' and 'staff', both of which are 'hourable' (meaning they have hours assigned to them). What's the recommended approach to have the 'hour' model performs the same methods on the hours of either a business object or a staff object?
For a simple example, the 'hour' model mig... | stackexchange/codereview |
I have one GridView in a .aspx page, and am showing dynamic data in this grid, setting AutoGenerateColumns="True".
Depending upon which of the options the user selects in a combo box, I am binding different DataTables to the GridView. For example, if the user selects Persons then I am fetching the Persons DataTable, an... | stackexchange/codereview |
I have a pretty standard iPhone app that creates a series of around 7 unique Activities initialised by Intents.
However if the app crashes on the 7th Activity, the app restarts on the users phone around the 5th activity. The problem then is the info gathered from activities 1-4 is null, meaning the app is useless and t... | stackexchange/codereview |
As title says, I've been trying to find a portable library with C/++ bindings for doing basic COM-port communication for an application I'm servicing. Windows/Linux support is a minimum.
As I'm not the original author of the software, and I'm not allowed to alter the details of the contract, the library has to be licen... | stackexchange/codereview |
Compiling the file main.c with:
gcc main1.c -o final
gives me:
/tmp/cc1cwhAP.o: In function `main':
main1.c:(.text+0xb): undefined reference to `hi'
main1.c:(.text+0x15): undefined reference to `hi'
collect2: ld returned 1 exit status
main1.c:
#include <stdio.h>
#include "incl.h"
int main(void)
{
hi = 1;
printf("h... | stackexchange/codereview |
I set out to generate a array containing a 12-month calendar starting on this (now) month. This is for a particular application, and requires special code, so I cannot use calendar libraries.
Here's the code I have:
header('Content-type: text/plain');
$Cal1 = array();
$now = new fTimestamp('now');
$now = $now->modify... | stackexchange/codereview |
I have one class to read data (data.h & data.cpp), one class to analysis data (analysis.h & analysis.cpp) and another one to do calculation based on two previous classes (calculation.h & calculation.cpp).
I wonder how can I pass the results from data class to analysis class and later on from both of them to calculation... | stackexchange/codereview |
I'm finding it difficult to phrase this question correctly, let me try to explain our problem...
We have an intranet running on Ubunutu box with Apache2/PHP 5.2.4. We have a bit of PHP code that reads a file from a directory that is not publically accessible and output it to the screen (code below):
$file_path = '/hom... | stackexchange/codereview |
Wondering what would be a good method to get the first iteration on a foreach loop.
I want to do something different on the first iteration.
Is a conditional our best option on these cases?
| stackexchange/codereview |
i just want to apply font color to the text of a silverlight datgrid cell for a particular column while binding the itemsource
how can that be accomplished?
| stackexchange/codereview |
I am implementing a my custom class which needs to be derived from Panel.
After inheriting from Panel, the overridden method "MeasureOverride" gets the default size.
In my xaml page, I am using ListBox for which no width and height is specified and this custom panel is called from ItemsPanel Template.
When the class is... | stackexchange/codereview |
I am in the process of upgrading my application to Rails 3. I started using Rspec 2 with Rails 3. I need to turn off transactional fixtures for some of my rspec tests. Prior I used the following code in my model specs
before(:all) do
ActiveSupport::TestCase.use_transactional_fixtures = false
end
after(:all... | stackexchange/codereview |
Error I am getting:
*[NSURLError object]: unrecognized selector sent to instance 0x5f510e0 *
2010-10-11 11:41:33.718 CBH[15454:207] ** Terminating app due to uncaught exception *'NSInvalidArgumentException', reason: '-[NSURLError object]: unrecognized selector sent to instance 0x5f510e0' *
here is the code:
NSArray ... | stackexchange/codereview |
Does anybody know if there is an implementation of the Wikipedia API in Objective-C,
which can be used to access and display the information a bit nicer then with the plain website?
I'm thinking of something like the wikipanion app but not so sophisticated.
| stackexchange/codereview |
I have a page index.html that extends base.html (django) and each of them has a $(document).ready defined. Now, I was expecting the one in base.html to go of first, but I was wrong, the one in index is first and the one in base.html starts after. I guess this is because index finishes loading before base, and not some ... | stackexchange/codereview |
According to Django documentation, "if SESSION_EXPIRE_AT_BROWSER_CLOSE is set to True, Django will use browser-length cookies -- cookies that expire as soon as the user closes his or her browser. Use this if you want people to have to log in every time they open a browser."
And that is what I did by adding the followin... | stackexchange/codereview |
I have an ASP.NET MVC 2 Web Application (.NET 4, C#), where user's can search for locations.
The page is implemented with an auto-complete box, similar to many websites. (Google, YouTube, etc)
Now, the AJAX call to the server results in a Stored Procedure call to the database. (whilst efficient, could result in a lot o... | stackexchange/codereview |
I have a table which has the information of a category, say a product. I have listed them in a dropdown menu. Now, what I need to do is, list the sub category of the selected category in a next dropdown menu. I hope, javascript is required, but I am not that familiar with javascript yet.
Would be much thankful for the ... | stackexchange/codereview |
The hashCode() method of class Boolean is implemented like this:
public int hashCode() {
return value ? 1231 : 1237;
}
Why does it use 1231 and 1237? Why not something else?
| stackexchange/codereview |
in the header section of my web page, the design is something like the logo and navigation div should overlap a repeat-x image(i.e bg-header).
this is the html i have used
<div id="header">
<div id="header-bar">
<p>kljslakdjlaskjdkljasdlkjasdlkjaskldjasjd</p>
</div>
</div>
and this is the css
#header {... | stackexchange/codereview |
I am using Hibernate3 and i have an entity with the following collection:
@ManyToMany
@JoinTable(name = "buys_publishers", joinColumns=@JoinColumn(name="buy_id", referencedColumnName = "buy_id"), inverseJoinColumns=@JoinColumn(name = "publisher_id", referencedColumnName = "publisher_id"))
@OrderBy("name")
priva... | stackexchange/codereview |
Just getting back into using C++ and trying to convert a simple Java program I wrote recently.
What's the preferred equivalent to the Java ArrayList in C++?
| stackexchange/codereview |
I created a Joomla template by creating the following files:index.php" , "templateDetails.xml","images" and "css". I installed it correctly but the images are not displayed when i am selecting the template.
Anyone knows how to resolve this problem? I triple checked the paths and different settings of Joomla but i did n... | stackexchange/codereview |
I have a site using cakephp1.2.8 running on a ubuntu9.04 server. It works fine with 16M memory_limit. Now I moved the site to a new CentOS5.5 VPS. Then the server starts to show errors like this:
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 342095888 bytes) in Unknown on line 0
It d... | stackexchange/codereview |
what is the best module for creating a paid listing in joomla? Im kinda newbie in joomla and trying to create a paid listing in my website.And i want the when the user subscribed to the paid listing his/her or her post will be pending before and reviewed by the admin before posting it to the website.
thanks!
| stackexchange/codereview |
I'd like to have both the includes for OS X as well as linux in my opengl program (C++) how can I set my program to use one if the other is not available? Here's what i'm currently doing:
if(!FileExists(OpenGL/gl.h))
#include <GL/glut.h> //linux lib
else {
#include <OpenGL/gl.h> //OS x libs
#include <OpenG... | stackexchange/codereview |
I have installed Apache Ant and set the correctly the Path, CLASS_PATH and ANT_PATH variables. When I run a jar task in a command line within my project folder where the build.xml file is, I get the following error:
BUILD FAILED
C:\Documents and Settings\TonyS\My Documents\My Workspace\code\build.xml: 32:
The followi... | stackexchange/codereview |
I get the following Error below from my query, and was wondering how can I fix this problem?
Duplicate column name 'user_id'
Here is My MySQL query.
"SELECT COUNT(users_friends.user_id) FROM ((SELECT *
FROM users_friends
INNER JOIN users ON users_friends.user_id = users.user_id
WHERE users_friends.user_id = '" . $user... | stackexchange/codereview |
Am I supposed to adjust FRAMEWORK_SEARCH_PATHS or HEADER_SEARCH_PATHS when I add custom frameworks to the project?
I have MainProject.xcodeproject that links SomeFramework.framework that's simply dragged from "Products" in SomeFramework.xcodeproject to "Link with Binary Libraries" build phase in main project.
Framework... | stackexchange/codereview |
I'm using latest bundler with a lot of :git => ... in my Gemfile. Bundler does not seem to remove old/ unused git repositories it downloaded. Also I couldn't find a simple "bundle clean", just like "gem clean". Of course this would only work properly when using a separatestorage per project, but this is how I do it. So... | stackexchange/codereview |
I want to create a ribbon button that will work with all kinds of lists. I mean, the same custom action should work against lists, document libraries, Announcement lists, etc..
Also. It should work regardless of the content types contained in the list.
What should be the custom action definition for this?
| stackexchange/codereview |
I have an issue with releasing a view too many times. Although simple in theory because im moving uiview to uiview, which is a subclass of uiview and being animated and so on its not something that I can easily fix. It only crashes 10% and only under certain conditions and only 30% of the time even under these conditi... | stackexchange/codereview |
SELECT e.firstName,t.setDate, w.wageAmount
FROM TimeSheet t
INNER JOIN Employee e
ON e.employeeID = t.employeeID
INNER JOIN Salary s
ON s.salaryID = t.salaryID
INNER JOIN Wage w
ON w.wageID = s.wageID
INNER JOIN EmpHiringInfo ehf
ON ehf.E... | stackexchange/codereview |
I tried to compile this snippet of C++ code:
void FuncTest() {
int* a = new int;
int* b = new int[2];
}
Using:
clang test.cpp -S -emit-llvm -o - > test.llvm
And obtained this:
define void @_Z8FuncTestv() {
entry:
%a = alloca i32*, align 4
%b = alloca i32*, align 4
%call = call noalias i8* @_Znwj(i32 4)
... | stackexchange/codereview |
A struct timeval is 64 bit long. I need, for a project, to convert this long (struct timeval) into two 32 bit chunks, and put each chunk into a different variable. How do I do this?
Thanx in advance.
| stackexchange/codereview |
Does Notepad++ support non-greedy regular expressions?
For example for text:
abcxadc
I want to get parts using pattern:
a.+c
And now I get whole string instead of 2 parts. I tried to use the '?' operator but without success.
| stackexchange/codereview |
my app has been rejected during the appstore approval process due to the use of private API (I'm so stupid... moreover, theunique use was almost useless).
How long does it take to have my app reviewed this second time? I'm affraid I'll have to wait 7 more days... And, since yesterday noon it is freezed at "upload rece... | stackexchange/codereview |
I have a form that allows users to insert "items" in a database. A field asks how many items they want to insert. Identical data (apart from their ID) is inserted in the database the number of times they chose. I've found different ways to insert multiple items but not when this is dynamically done. I'm using .net 3.5 ... | stackexchange/codereview |
I have an application which generates logs in append mode, but the logs are not timestamped.
Is it possible to use tail -f with some option, or a perl script to monitor writes to this file and prefix them with a timestamp?
Given that I am running Windows without Cygwin, could I avoid using bash or any other Unix shell?... | stackexchange/codereview |
Currently we read from HTTPS using cURL. Everything works fine.
We set up certficates in curl as follows:
curl_easy_setopt(curl,CURLOPT_SSLCERTTYPE,"PEM");
curl_easy_setopt(curl,CURLOPT_SSLCERT,"/etc/ssl/certs/abc.cert.pem");
curl_easy_setopt(curl,CURLOPT_SSLKEYTYPE,"PEM");
curl_easy_setopt(curl,CURLOPT_SSLKEY,"/etc/... | stackexchange/codereview |
I am trying to use ftps to upload file to our FTP server. Login is trivial and works:
from M2Crypto import ftpslib
ftp = ftpslib.FTP_TLS()
ftp.connect(host)
ftp.login(username, password)
as well as descending into directory
for dir in directory:
ftp.cwd(dir)
However, when trying to retrieve directory content:
if ... | stackexchange/codereview |
I'd like to create a nested class which is based on the type provided to the outer class. I need the inner class to extend T by some members:
TOuterClass<T:class> = class
type
TNestedClass = class(T)
MoreData:Integer;
end;
end;
The compiler says "No" or more specifically [DCC Error] MyUnit.pas(20): E20... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.