instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I've been searching for some answer to this problem but can't figure it out.
I have a structure:
typedef struct {
BYTE hour;
BYTE minute;
BYTE second;
BYTE dom;
BYTE month;
BYTE year;
} t_time_date ;
And a serial port receive function:
g_curr_td.year = g_rx_buffer[3... | stackexchange/codereview |
I have many particles who's vertices change every frame. The vertices are currently being drawn using a vertex array in 'client' memory. What performance characteristics can I expect if I use a vertex buffer object?
Since I have to use a number of glBuffersubData's to update the particle vertices, I am therefore tr... | stackexchange/codereview |
Dream output:
/* DREAM OUTPUT:
INT: 1
TESTINT: 1
TESTINT: 2
TESTINT: 23
TESTINT: 24
TESTINT: 25
TESTINT: 3
TESTINT: 4
TESTINT: 5
TESTINT: 6
INT: 23
INT: 24
INT: 25
INT: 3
INT: 4
INT: 5
INT: 6
Problem
ERROR 1: Not erasing the '2' causes a bizzare effect.
ERROR 2: Erasing the '2' causes memory corrup... | stackexchange/codereview |
In PHP, the settype() function as below should change the type of $myvar to a string however when I run it it displays as boolean. But If i change $myvar to $my_var settype correctly changes type to string. Why is that so?
<?php
$myvar=1995;
echo "The variable is an ".gettype($myvar)."<br>";
$myvar=settype($myvar, "st... | stackexchange/codereview |
When making a call out to the yahoo web service (http://boss.yahooapis.com/ysearch) to return a data set, is it possible to set a timeout and exit the routine once its elapsed?
jQuery.getJSON("http://boss.yahooapis.com/ysearch/...etc",
function (data) {
//result set here
});
| stackexchange/codereview |
I have got this error
Unable to connect to the remote server
when I call the web service from the windows service. But I can visit this web service through IE and I also wrote another console application to call the web service and it works fine, too.
The exception infomation is below:
A socket operation was attemp... | stackexchange/codereview |
Presently I am doing a project on designing and implementing a firewall. Everything is working fine. Here I am filtering all packets going through a TCP port. But I need to send a custom page if a page is being blocked. Like "Your page is blocked by admin". I don't have any idea how to do it. Can I do it using raw sock... | stackexchange/codereview |
How to make a select element for minutes?
$this->formSelect('','',null, $myarray_minutes);
I tried this but gets wrong minutes https://gist.github.com/668284
| stackexchange/codereview |
i have a kentico site that has two culture specific domains (.co.nz and .com.au) and i want to setup multiple cultures so that the site has different versions of the some document in a sites tree.
I have all this working, however my problem is that i want the URL's to be the same on both domains and kentico doesn't all... | stackexchange/codereview |
I need to find the current logged in user in my model.
I defined cattr_accessor current_logged_in in User model.
Now, when a user logs in I set User.current_logged_in = current_user.id.
Later, in other models I access the variable using User.current_logged_in_user. As of now it works.
Is it the right way to implement... | stackexchange/codereview |
<Style TargetType="ListBoxItem" x:Key="ListBoxItemTemplate">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
<Button Content="{TemplateBinding Content}"></Button>
</ControlTemplate>
</Setter.Val... | stackexchange/codereview |
I have a search query form on my home page (/)
<% form_tag(search_path, :method => :get) do %>
<%= text_field_tag 'query' %>
<%= submit_tag "Search", :name => nil%>
<% end %>
When I submit this search form, I want to end up at (/search?query=foo). However, right now I get /search?utf8=%E2%9C%93&query=foo. What's ... | stackexchange/codereview |
i have 2 lists,one list l1 contains n1 elements and another list l2 contains n2 elements.Both lists are not the same length and contain duplicate elements.I want to create another list which has unique elements from both l1 and l2.How can i do this efficiently and what would be the performance of this solution?
P.S : ... | stackexchange/codereview |
Which one of basic auth, digest auth and Oauth should one use for a web application to let users access resources through Restful API calls?
Isn't Oauth the better solution replacing basic and digest auth?
| stackexchange/codereview |
i have a website where one page is a set of static pictures. users want to be able to upload their own pictures and have it shown instead of the static list. i see code like this which explains a good way to have an upload interface for pictures. i am trying to figure out if i should store the pictures on my web ser... | stackexchange/codereview |
I need users to be able to become fans of other users. How should I design/set this up?
I need to be able to view details of user fans.
For example. I have user: Foo. Foo has 3 fans. I'd like to be able to find the names of Foo's fans. As such:
foo = User.first
foo.name (returns 'Foo')
foo.fans.first.user.name (should ... | stackexchange/codereview |
I'm trying to figure out how to remove the iPhone 3G as a supported device for my application in the AppStore. I emailed Apple support asking for them to update it in the reqs section and they responded saying I need to update my UIRequiredDeviceCapabilities keys. Well, it was submitted with :
<key>UIBackgroundMo... | stackexchange/codereview |
I have a problem with include pages in PHP. Picture shows what I want to do. I want to include in my index.php page horizontal and vertical menu. But now I can include only one of them. In global.php there are database name, password, and variable which define what language I'm using now.
I included with all derictives... | stackexchange/codereview |
If I have the following JQuery:
$('#div1, #div2').scroll(function() { my_function($(this)); });
or
$('#div1, #div2').live('mouseover',function(){ my_function($(this)); });
What does $(this) represent?
Is it the DOM object of either DIV1 or DIV2? Or is it the HTML of that DIV?
What does "this" represent in the code ab... | stackexchange/codereview |
In one C# project, I get the following warning:
warning CS1762: A reference was created to embedded interop assembly 'Interop.SomeLibrary.dll' because of an indirect reference to that assembly created by assembly 'ALibraryOfMine.dll'. Consider changing the 'Embed Interop Types' property on either assembly.
However, i... | stackexchange/codereview |
Which is the latest stable prawn (pdf generation) version ?
does it support prawn-format ?
| stackexchange/codereview |
I am completely new to facebook api and working on a very small project. Before getting into details of their api doc, I wanted to ask a quick question.
My application needs login with a facebook userid/password, go to a friends wall / groups wall, crawl through all the wall posts and dump them in database for further ... | stackexchange/codereview |
I am compiling a kernel module in linux related to creating kthreads to achieve parallelism but I am stuck at compiling issues.
Here is my code:
#include <linux/init.h>
#include <linux/errno.h>
#include <asm/byteorder.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/kthread.h>
#include <linux/type... | stackexchange/codereview |
I have an existing regex:
/^http:\/\/twitter\.com\/(\w+)\/status(es)*\/(\d+)$/
that I use for determining if a URL is a twitter status update URL. Eg.
http://twitter.com/allWPthemes/status/2040410213974016
But ever since "new" twitter came out, they have changed the status URL's to look like :
http://twitter.com/#!/... | stackexchange/codereview |
I want to zip the following list of lists:
>>> zip([[1,2], [3,4], [5,6]])
[[1,3,5], [2,4,6]]
This could be achieved with the current zip implementation only if the list is split into individual components:
>>> zip([1,2], [3,4], [5,6])
(1, 3, 5), (2, 4, 6)]
Can't figure out how to split the list and pass the indivi... | stackexchange/codereview |
New to Android here.
Is there an Android 2.2 3D math library in the SDK? I couldn't find one and I was hoping there would be one. I am not able to use javax.* packages for some reason in Eclipse.
The thing I really need is rotation about an arbitrary axis of an arbitrary angle.
I don't really want to use the NDK unle... | stackexchange/codereview |
I have recently been becoming acquainted with perfmon and with xperf. Perfmon uses performance counters and xperf uses ETW (event tracing for windows). Perfmon has objects that provide data, whereas xperf uses groups of "providers". As a newbie into this area I am asking whether anyone could tell me whether the perform... | stackexchange/codereview |
I'm new to these awesome Power shell world. I have a problem with script and really apreciate your help.
I have a script "cmd4.ps1" that needs to run another script "Transfer.ps1" that needs to receive 3 strings params and it needs to be run as other process thead different to "cmd4.ps1".
cmd4.ps1:
$Script="-File """... | stackexchange/codereview |
I've got some code that wobbles UIViews, much like when you edit your iOS home screens.
I have the 2 following methods to achieve this wobble effect:
- (void)wobble {
int amountInRadians = (self.tag % 2) == 0 ? 2.0 : -2.0;
containerView.transform = CGAffineTransformRotate(CGAffineTransformIdentity, RADIANS(-amountInR... | stackexchange/codereview |
there have two model Product & Gift ,here is the relationship
Product belongs to many Gifts
one Gift category has many products
so they have a assocation table named gift_products
how can i write a code achieve this sql
select top 1 from gift_products where product_id=1 and gift_id=2
the meaning is i want check,is a sp... | stackexchange/codereview |
I have tried reading multiple tutorials, the PHP documentation and have no idea what I am doing.
Here is my form
<form action="beta_upload.php" enctype="multipart/form-data" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="20971520" /><!-- 20 Meg -->
<input type="file" name="file[]" />
<input type="file"... | stackexchange/codereview |
I'm building a WCF service I'm concerned about performance and scalability.
In order to test multiple users accessing my WCF Service, what should I do?
create a Thread Pool to run separated threads which in turn access the same WCF method?
use a testing software tool to simulate these fake users?
| stackexchange/codereview |
#ifndef ECORE_H
#include "../database.h"
#define ECORE_H
Database *base_provider; // ecore.h: error: expected initializer before ‘*’ token
template <class S, class T>
class ecore { // error: expected class-name before ‘{’ token
public:
~ecore(void){delete base_provider;... | stackexchange/codereview |
I have a panel with AutoScroll set to true. In it, I am programmatically adding ComboBox controls. If I add enough controls to exceed the viewable size of the panel a scroll bar appears (so far so good). However, if I open one of the combo boxes near the bottom of the viewable area the combo list isn't properly disp... | stackexchange/codereview |
I have a card game (screenshot below) in which I display player avatars.
For the avatars I've written a short proxy.php script, which would take an image URL passed to it as ?img= parameter, download it and save under /var/www/cached_avatars/md5_of_that_url at my CentOS 5 machine. Next time the script is called with th... | stackexchange/codereview |
I'm getting this error from compilator:
1>Linking...
1>main.obj : error LNK2005: "int g_win_flags" (?g_win_flags@@3HA) already defined in init.obj
1>main.obj : error LNK2005: "struct SDL_Surface * g_screen" (?g_screen@@3PAUSDL_Surface@@A) already defined in init.obj
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaul... | stackexchange/codereview |
I have learned today, that it is possible to validate e-mail two ways. One way is by regular expression and the other is by filter_var() function.
If anyone could tell me how strong the validation with filter_var is and if there are any recommendations or suggestions on thoughts about switching from regular expression ... | stackexchange/codereview |
My windows has many ListBoxes that load their items in the Loaded event. After they are all loaded I have to run a method. I found out that the Grid Loaded event happens before its controls Loaded. What method will fire once after that?
| stackexchange/codereview |
I've got a dialog which shows a list of checkBoxes. I'd like to set different boxes checked each time the dialog is showed. But that only works the first time.. I want it work every time the dialog is showed! It would be great if anyone can help...
This is my code:
@Override
protected Dialog onCreateDialog(int id) {
... | stackexchange/codereview |
Any references how to implement mvc in jquery.
thanks
| stackexchange/codereview |
I have created a wpf application ,there are two canvas i would like to store controls of both cancas to one collection so that i can process them without two loop. What is the best method to implement this .
| stackexchange/codereview |
I need to change the scroll bar's size of Internet Explorer 6 in Windows CE application. by referring to http://msdn.microsoft.com/en-us/library/aa452005.aspx , I'm only able to change the scroll bar slider's size(by changing SBSizeV and SBSizeH value) but not the arrow button's size. Is there any way that I could chan... | stackexchange/codereview |
In the process of development of a web-application we have everything in place in module way like we have our action classes which are responsible for intracting with the View Business component as well as Persistence Component and every component is well tested and working fine.
My Question is what is the best way to ... | stackexchange/codereview |
I’m trying to understand how an application can take on some of the coloring responsibilities of an image through code to achieve a more flexible array of coloring options. Let me explain.
Say you design a great looking image in photoshop, maybe an automobile. You make the automobile red. Then, using additional tran... | stackexchange/codereview |
Im using Propel ORM in my development and I have this issue:
$mo = new Category();
$mo->setId(7); // This Id exists
$mo->setDescription('New description!');
$mo->save(); //it should update!
Well, it doesn't updates the values. It throws an exception and says that I cannot insert a duplicate key. Is there a way to go a... | stackexchange/codereview |
I'm running Ubuntu. My Apache2 default file looks like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Optio... | stackexchange/codereview |
I'm trying to run a bash script in Cygwin.
I get Must run as root, i.e. sudo ./scriptname errors.
chmod 777 scriptname does nothing to help.
I've looked for ways to imitate sudo on Cygwin, to add a root user, since calling "su" renders the error su: user root does not exist, anything useful, and have found nothin... | stackexchange/codereview |
Need to obtain following path from the registry:
%userprofile%
| stackexchange/codereview |
Gosh, this is so weird, I don't know what to say. The short version is that I have a simulator app which I spawn from my application when the user asks me to. It recently stopped working, though I can run the simulator fine from the command line or Start menu. This could be due to moving to VS2010 or Windows 7 or so... | stackexchange/codereview |
What I want to do is to do some init coding in the controller before showing the contents of the partial view.
For example, if the partial view is passed an ID of the object, it would be wise to get the object itself and then send it to the view.
You can easily do it with ASP.NET MVC. However in Rails code like
def som... | stackexchange/codereview |
The following example code works in FireFox but IE is causing problems.
This code essentially renders a list of dynamic checkboxes according to a JSON array.
When I try and submit the variblse the value for the checkboxes are stored as "on". I've noticed there is an additional attribute that gets rendered (IE only) cal... | stackexchange/codereview |
Can anyone tell me how to get using WinAPI functions memory allocated memory regions of some process? I want know for each region, start address, size and some other things like, protect type etc.
I can't find any WinAPI function to do it ;-(
Can anyone help me?
| stackexchange/codereview |
I'm working for a small web design firm and we are looking to implement a home brewed CMS to help manage our sites.
Currently we install our CMS in a separate folder under a unique user for each customer, then point their domain at that folder.
The difficult part with this is backporting important changes, for instance... | stackexchange/codereview |
I have a textbox to enter username and a dropdown to select role. When i chick an "Add" button i need to add these values to a table. I will need to add more usernames and their roles to the table whin "Add" is clicked. I need to attain this without postback( ie AJAX). Also I will Save this table to database when "Save... | stackexchange/codereview |
What is the tabindex attribute used for in HTML?
| stackexchange/codereview |
can i use ajaxtoolkit:ValidatorCalloutExtender to validate zero rows of a grid view
| stackexchange/codereview |
The context: I'm working on some Python scripts on an Ubuntu server. I need to use some code written in Python 2.7 but our server has Python 2.5. We installed 2.7 as a second instance of Python so we wouldn't break anything reliant on 2.5. Now I need to install the MySQLdb package. I assume I can't do this the easy way... | stackexchange/codereview |
I have an interface
public interface IProperty
{
string Name { get; }
}
and an explicit implementation of it
public class Parameter : IProperty
{
private readonly string m_name;
public Parameter(string name) { m_name = name; }
string IProperty.Name { get { return m_name; } }
}
I have a DataGrid tha... | stackexchange/codereview |
I'm writing a plugin for a poorly-documented Eclipse RCP application and I need to add a listener to what I believe is a TreeViewer within a view. I have access to the IWorkbenchPart representing the view, but how can I get the TreeViewer it contains? I'd guess I need a method to return the child components (i.e. som... | stackexchange/codereview |
Using the following code, I am trying to overwrite a file if it exists. Currenly it throws IOException. How can I fix this problem?
File.Copy(filePath, newPath);
| stackexchange/codereview |
Can anyone tell me why the the following does not work as an example of a mutex under Linux
#include <pthread.h>
int main (){
pthread_mutex_t start;
if (pthread_mutex_init(&start, NULL) != 0){
printf("err!");
return(1);
}
if (pthread_mutex_lock(&start) != 0){
printf("err!");
return(1);
}
pthrea... | stackexchange/codereview |
In the following example
try {
lineA
lineB
lineC
lineD
}
catch {
lineE
}
finally {
lineF
}
if an exception occurs (let's assume a 100% probability of an exception there) in lineB, then the total execution algorithm looks like
lineA
lineB
lineE
lineF
lines C and D are never reached. Am I 100% right... | stackexchange/codereview |
foreach (UIElement el in GridBoard.Children.ToList())
{
if (el is Ellipse)
{
GridBoard.Children.Remove(el);
}
}
Is there any LINQ equivalent to do the above? If yes, can please provide the code? Thanks
| stackexchange/codereview |
I was just given a project that needs to be localized.
I just ran into meta:resourcekey and how it's used in conjunction with local resource files.
My question is: do I have to do it this way?
Consider this example right off MSDN:
<asp:Button ID="Button1" runat="server" Text="DefaultText"
meta:resourcekey="... | stackexchange/codereview |
is any class that allow to call for example method post (url, params) without creating low-level code like curl_init and other?
| stackexchange/codereview |
I'm wondering if there is any chance to create a custom transition animation between Views, as a "cube":
http://www.pendrivelinux.com/wp-content/uploads/pdl-cubed.jpg
I've took a look for some example, without any success, do you know some, is even possible?
Thanks
| stackexchange/codereview |
I have a pretty simple c# application that uses .net framework 2.0. In my development machine (which is set to 1024x768) the app appears fine. The client runs the application in 1024x600 netbook, and the form seems like it's reduced in height.
http://dl.dropbox.com/u/381953/Screen%20shot%202010-11-01%20at%204.51.01%... | stackexchange/codereview |
In my 'statusline' I have %{&ff}%{'\ '.&fenc}. The '\ ' does not expand to a space, but if I change it to '\ \ ' it does. What's going on?
| stackexchange/codereview |
The situation: PHP 5.2.9 => FreeTDS (a CVS version of July, if I remember well) => SQL 2008 R2. PHP is on a CentOS 5.x and Sql server on Windows 2008. Really funny :)
The problem: trying to pass a VARCHAR(2000) to a stored procedure, all goes well, until the string to be passed contains some strange (ok, not so strange... | stackexchange/codereview |
SVN merge (branch to trunk) has given me a ton of trouble. Now I am not an expert at it and that is part of the problem (then again I shouldn't be an expert at it... as that is the point, it should make my life easier). Anyway, I have a rapidly developing framework and quite a few times folders/files get deleted/rename... | stackexchange/codereview |
Good afternoon,
I'm developing a google-earth web application, where users can use the desktop Google Earth program to perform searches.
One problem I'm running into is that, when the Internal Browser tries to hit a GWT page I have written, with parameters in it, the Internal Browser seems to just drop the second set o... | stackexchange/codereview |
The problem is that i want to interface my mobile phone with my computer using a keypad in between. The interfacing should be done in Python environment as this would help me in my further work.
the things which i need is
inteface my computer with the keypad using python
interface the same keypad with a mobile phone... | stackexchange/codereview |
Why the following code produces the error?
The query operator 'ElementAtOrDefault' is not supported
Dim Im = (From view In Db.Views Where _
view.Pass = txtCode.Text _
Select New With {.Id = view.UniqueID.ToString}_
).Distinct
Response.Redirect("~/test.aspx?x=" & Im(0).Id)
Is there... | stackexchange/codereview |
I am relatively new to C++. Here is a if statement I can not understand.
if ((ObjPtr = NewObjPtr) != NULL)
{
...
}
What is the "!= NULL" checked for?
Thanks.
| stackexchange/codereview |
I have a really annoying problem:
I had a string éàéà which I passed in the serialize function.
It gave me the string %C3%A9%C3%A0%C3%A9%C3%A0.
How can I come back (either in JS or PHP) to éàéà to save the string properly in my MySQL UTF-8 encoded database?
thanks in advance,
| stackexchange/codereview |
I have a table like
cases open/close count
-----------------------------
A open 10
A close 15
B open 6
B close 4
I need to get a result table that is like
cases total open close
---------------------------------
A 25 1... | stackexchange/codereview |
I'm having a little question here. I'm doing a login with a form, sending strings to a php, to return to me the final answer, "Error" or "OK".
But, i need to php returns a little bit more than it, like a name and etc, and i want to display this name in a label. So, for this, i'll need a array, correct?
So, how can i do... | stackexchange/codereview |
I have created simple library AppInfo providing an easy way to show always valid, automatic updated information about a version of running software in Java applications, which is especially useful in conjunction with automatic builds from CI server.
In my library it is necessary to read MANIFEST.MF from JAR (in case of... | stackexchange/codereview |
I'm looking for an integrated assembler/debugger/machine simulator with a fully customizable assembly language for teaching purposes. I'd also settle for some nice looking simulator with source code so I could adapt it to my needs. Can't seem to google anything useful. Thanks!
| stackexchange/codereview |
While trying to benchmark some NFS server using the bonnie benchmark, I noticed that one row of the results are latency values. I was wondering if anyone can explain what does this latency values represent. Thanks!
Sample bonnie results (Latency line emphasized):
mshamma@hs1:/mnt/hs18/bonnie$ sudo bonnie -u root -c 100... | stackexchange/codereview |
I am trying to figure out why I can't specify a target as being in different directory.
I am trying to generate some php classes from json files, but I've changed the line that actually generates the php to a dummy echo statement, so somebody else can just copy paste and test if they feel very generous.
There are two ... | stackexchange/codereview |
I have a transaction log table that is updated each time a record is updated.
autoid ID Date Source
1 1 2010-10-11 abc
2 2 2010-09-10 xyz
3 1 2010-08-03 pqr
4 1 2010-11-01 mno
I can get the most recent update for each ID by the following query (it is efficient, is it?):
select * fro... | stackexchange/codereview |
I have a Delete method on all my business objects that has the PrincipalPermission attribute on it.
Example:
[PrincipalPermission(SecurityAction.Demand, Role = "Vendor Manager")]
public static bool Delete(Vendor myVendor)
{
//do work here
}
The problem is that it appears to be comp... | stackexchange/codereview |
I am creating a new WPF window that I want to be parented to another existing app. I do this with the:
Winforms.Show ( IWin32Window owner )
all the time, but since this app is using a WPF Window, I am looking for a way to achieve the same thing.
Any ideas?
| stackexchange/codereview |
I have shopping cart set up where the user can drag an item from the store shelf and place it in the shopping cart. This all works great. The next step of programming that I cannot resolve is how to remove the item from the cart with a click. There is this in the documentation but there is no example to call it.
... | stackexchange/codereview |
I need to create a simple text file based search engine asap (using PHP)! Basically it has to read files in a directory, remove stop and useless words, index each remaining useful word with how many times it appears in each document.
I guess the pseudo code for this is:
for each file in directory:
read in contents,... | stackexchange/codereview |
I'm trying to implement a multiline textbox on a website. The textbox should offer a kind of autocompletion while the user is typing. The autocompletion should work similar to what is known as 'Intellisense' in ms visual studio (see screenshot below) and display the autocompletion selection (the list containing "bar",... | stackexchange/codereview |
I'm creating functions for use with a game server. This server uses plugins. I have these functions which use an SQLite database, along with apsw to retrieve items stored by another function. I have 3 questions on this.
Question One: I keep getting the error "SQLError: near "?": syntax error" Since my statement feature... | stackexchange/codereview |
I'd like to create a file with the name passenger_wsgi.py on a remote host. I'd like to use the following string to create the file's content:
'''
import sys, os
sys.path.insert(0, "/ruby/%s/www/%s/django-projects")
sys.path.insert(0, "/ruby/%s/www/%s/django-projects/project")
import django.core.handlers.wsgi
os.envi... | stackexchange/codereview |
I'd like to build a form in my MVC app that contains a couple of input fields. Besides that I'd like to have the user asynchronously upload some images by selecting an image on his harddrive, then clicking an upload button. Upon successfull upload, the controller handling the image upload would generate a thumbnail of ... | stackexchange/codereview |
I have seen quite a few ways to get dynamic LINQ to work for the .GroupBy, but every one that I see seems to expect a hard coded entity. I want to reproduce the following as dynamic LINQ:
//need dynamic LINQ for this
var groupedRows = rows.GroupBy(z => new { make = z["make"], model = z["model"] })
... | stackexchange/codereview |
I have a multiple-site Sitecore project. I know how to deal with error pages via the webconfig's ErrorPage, ItemNotFoundUrl, LayoutNotFoundUrl, LinkItemNotFoundUrl for one site.
However, I'm wanting to display a different error pages for each site. How can I accomplish this?
| stackexchange/codereview |
The following Guice Servlet configuration doesn't work when I remove the Maven dependency to the Servlet API:
filter("/*").through(TransactionFilter.class);
The compiler tells me:
cannot access javax.servlet.Filter
class file for javax.servlet.Filter not found
filter("/*").through(TransactionFilter.class);
Any id... | stackexchange/codereview |
In xcode, when I add a new objective-c file, there's a checkbox where it says something like "Add header file". In what condition should I untick that box and what would it do if I did?
| stackexchange/codereview |
This question follows on from the answer given by Michael Pilat in Preventing “Plus” from rearranging things. There he defined a custom + notation using
Format[myPlus[expr__]] := Row[Riffle[{expr}, "+"]]
The problem with this is you can't copy and paste the output (although % or Out[] still works). To get around this... | stackexchange/codereview |
If you run the following program:
import mechanize
br = mechanize.Browser()
br.open("http://hansardindex.ontla.on.ca/hansarde.asp")
for f in br.forms():
print f.name
Only one line of output is printed. However if you visit the page there are many forms with names such as "DateFrom". Why does mechanize not list t... | stackexchange/codereview |
I have a WCF Service that requires a security token issued by a separate WCF STS Service. This all works just dandy. In my application, I use the service like so:
MyServiceClient myService = new MyServiceClient();
myService.Open();
myService.DoStuff();
The STS Service is called to get a token and the token is used to... | stackexchange/codereview |
Hey, so I have some html ok, and inside it there's a couple of images. What I want to do is retrieve the location of the first image from the html. (get the first images url)
How can I do this in PHP?
Thanks
| stackexchange/codereview |
I have simple question. How to create user role in Django without creating it in DB manually ?
EDIT: I need to create specific permission. So only users with this permission can change specific field of model.
I just need make one field 'readonly' for some users. Is it possible in django?
| stackexchange/codereview |
$result = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date<'$lastmsg' AND date BETWEEN $Yday AND $today ORDER by date DESC LIMIT 10");
Im getting 0 rows while there should be 1..
But my other query,
$result = mysql_query("SELECT * FROM users_msgs WHERE uID = '$USER' AND date > $today
AND date<'$la... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.