I'm receiving "culture name 'uploads' is not supported" when my asp.net app start. Where I have to view/debug to toggle the error? A full-text for "uploads" returns o entries in my project
everyone:
I have an ASP.NET Application that uses a Repeater control to display a thumbnail gallery. When the user mouses over one of the thumbnails, the main image will present that thumbnail.
It uses a Repeater control in a UserControl like this:
<asp:Image ID="pictureImage" runat="server" Visible="true" Width="200px" />
<asp:Repeater ID="rpProductImages" runat="server" Visible="false">
<ItemTemplate>
<div>
<div style="float: left" id="smallImage" runat="server">
<div class="smallAltImage" onmouseover="showImage();"
style="border: 1px solid #999999; margin: 5px 5px 5px 4px;
width: 45px; height: 45px; background-position: center; background-repeat: no-repeat;
background-image: url('<%#ResolveClientUrl(productImagesPath)%><%# String.Format("{0}", DataBinder.Eval(Container.DataItem, "ImageName")) %>');">
</div>
<asp:Label ID="lblImageName" runat="server" Visible="false"><%# Eval("ImageName")%></asp:Label>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
Then, in a javascript file, this:
function showImage(){
// Get thumbnail path.
var img = (this.style.backgroundImage).substring(4, (this.style.backgroundImage).length - 1);
$('#ctl00_ContentPlaceHolder1_ProductDetails1_pictureImage').attr('src', img);
}
It works fine in IE9, displaying the fully-qualified path for the image. In FireFox8, however, the img src looks like this: ""ProductImages/K42JY_500.jpg"" ... with two-sets of quotes!
I think that the Repeater control is the central cause of the problem but I Googled and Googled again and could not find anyone that has experienced this similar situation!
In fact, I'll PayPal anyone who can help me solve this with $50.00 (can't you tell I'm in the XMAS spirit, here?!)
Any help is appreciated and "Thank You" in advance!
I'm refactoring some client-server code and it uses the terms Response, Result & Reply for the same thing (an answer from the server). And although its not really that important it's become hard to guess which word to use while writing new code, so I'd like to unify the three terms into one and do the appropriate refactoring, but I'm not sure which word is the "best", if there is such a thing.
Any suggestions based on precedence and standards towards naming for this case?
Let's say I have a subroutine/method that a user can call to test some data that (as an example) might look like this:
sub test_output {
my ($self, $test) = @_;
my $output = $self->long_process_to_get_data();
if ($output =~ /\Q$test/) {
$self->assert_something();
}
else {
$self->do_something_else();
}
}
Normally, $test is a string, which we're looking for anywhere in the output. This was an interface put together to make calling it very easy. However, we've found that sometimes, a straight string is problematic - for example, a large, possibly varying number of spaces...a pattern, if you will. Thus, I'd like to let them pass in a regex as an option. I could just do:
$output =~ $test
if I could assume that it's always a regex, but ah, but the backwards compatibility! If they pass in a string, it still needs to test it like a raw string.
So in that case, I'll need to test to see if $test is a regex. Is there any good facility for detecting whether or not a scalar has a compiled regex in it?
I have a Smarty template located in a directory under templates_dir: templates/some/dir/template.tpl . In the same directory, I have a sub-template: templates/some/dir/_component.tpl .
I can't include the sub-component using an unqualified include, since apparently it looks it up under the templates_dir:
{include file='_component.tpl'}
How can I tell Smarty to read the file from the same directory, as opposed to the templates root ? I do not want to specify absolute paths, since it will cause problems when changing directory structures.
The Boost.Test documentation and examples don't really seem to contain any non-trivial examples and so far the two tutorials I've found here and here while helpful are both fairly basic.
I would like to have a master test suite for the entire project, while maintaining per module suites of unit tests and fixtures that can be run independently. I'll also be using a mock server to test various networking edge cases.
I'm on Ubuntu 8.04, but I'll take any example Linux or Windows since I'm writing my own makefiles anyways.
I remember reading a paper a long time ago that talked about object-oriented programming. I believe that this was from the early 1980s or perhaps even before then.
This was at the time when object-oriented programming was still done through pre-processors, and one thing that stuck with me is this: it argued that you could write code in either procedural or object-oriented fashion, and after preprocessing/compiling, you would end up with the exact same machine code.
Does anybody know which paper I'm talking about?
I have been given data which cannot be interpreted by my software unless it has a lowercase letter at the end. The data was delivered with an uppercase letter at the end.
Somehow I need to first recursively loop through all folders and find whether the filename ends with a letter and then change it to lowercase.
I think python could do this, but I don´t know how,. Any help would be great!
yours,
Rob
I want to set up separate ctags databases for various libraries in /usr/include/ for use with OmniCppComplete.
The idea is to be able to pull in only the libraries needed for a particular project in the target language - C or C++.
For example, I'd like to have one database for the standard C libraries, one for system libraries that might be used by either C or C++ programs ( sockets / networking comes to mind ) one for the standard C++ libs / STL / Boost, and then other databases for various third party libraries such as QT or glib. Then I could pull something in simply by typing set tags+= ~/.vim/somelib.tags in vim.
I assume that everything related to the C++ stdlib and STL are in the /usr/include/c++ and that Boost is all in /usr/include/boost. Unfortunately it seems that the standard C libs and system libs are just kind of dumped directly into /usr/include/ with a variety of other stuff.
How can I get a list of which files and directories belong to which libs? I'm on Ubuntu 8.04.
Morning all. Got myself a simple query which returns ten rows in SQL Server Management Studio. I call the stored proc by right clicking it and feeding in the parameters.
The results are returned immediately.
In .NET we have set up a dataset class, added a table adapter whose select is this same procedure. I pass in the very same parameters and the execution times out after the standard 30 seconds. It continues to run immediately when called in sql server management studio.
Any ideas why the execution time is seemingly infinite in the .net dataset class.
The query is very simple.
Looking at this C# code...
byte x = 1;
byte y = 2;
byte z = x + y; // ERROR: Cannot implicitly convert type 'int' to 'byte'
The result of any math performed on byte (or short) types is implicitly cast back to an integer. The solution is to explicitly cast the result back to a byte, so...
byte z = (byte)(x + y); // works
What I am wondering is why? Is it architectural? Philosophical?
We have:
int + int = int
long + long = long
float + float = float
double + double = double
So why not:
byte + byte = byte
short + short = short ?
A bit of background:
I am performing a long list of calculations on "small numbers" (i.e. < 8) and storing the intermediate results in a large array. Using a byte array (instead of an int array) is faster (because of cache hits). But the extensive byte-casts spread through the code make it that much more unreadable.
Hi,
I'm working on a project where we use Hibernate and JBoss 5.1. We need our entity classes to be mapped to Oracle tables that follow a certain naming convention. I'd like to avoid having to specify each table and column name in annotations. Therefore, I'm currently considering implementing a custom implementation of org.hibernate.cfg.NamingStrategy.
The SQL naming conventions require the name of columns to have a suffix that is equivalent to a prefix of the table name. If there is a table "T100_RESOURCE", the ID column would have to be named "RES_ID_T100".
In order to implement this in a NamingStrategy, the implementation would have to maintain state, i.e. the current class name it is creating the mappings for. It would rely on Hibernate
to always call classToTableName() before propertyToColumnName()
and to determine all column names by calling propertyToColumnName() before the next call to classToTableName()
Is it safe to do that or are there situations where Hibernate will mix things up? I am not thinking of problems through multiple threads here (which can be solved by keeping the last class name in a ThreadLocal) but also of Hibernate deliberately calling this out of order in certain circumstances. For example Hibernate asking for mappings of three properties of class A, then one of class B, then again more attributes of class A.
Here's my situation. I have a Microsoft Reporting Services report that as a parameter takes a salesperson's name and shows them their sales across their territories blah blah blah.
But, salesperson A should not be able to choose and view salesperson B's data. So, my thought was to get the currently logged in user from Reporting Services, and then use that to populate the "salesperson" parameter.
Is there a way to get the currently logged in user through some hidden RS interface, or is there some other way of accomplishing my goal that I'm just not seeing? Any help would be GREAT, as the higher ups aren't too happen with my (apparent) lack of security right now.
I have a table in SQL Server listing corporate departments and their sections and subsections (3 levels). I would like to create some web-based listing of this, but similar to a TreeList.
I was thinking to set up nested Ajax Accordions, but it was taking me way too long to put together. I would even settle for a GridView with non-repeating column values.
Is there a way I can implement my idea without it taking me more than an hour or so for a newbie to complete? Any controls in ASP.NET or Ajax I can bind to would be great.
My java J2SE application is reading a lot of (png) images from the web and some of them use features such as a transparency color for true-color images (tRNS section) that Sun's/Oracle's PNGImageReader implementation simply ignores.
Therefore the common solution for loading via ImageIO.read(...); does not work for me as it relies on this incomplete PNGImageReader implementation.
Does anybody know a png reader implementation that can read all forms of PNG images correctly - those with color table or true-color and alpha transparency or transparent color?
As it is for a GPL project it should be a non-commercial one that can be included without licensing problems into the app.
Edit: My be this question was too specific. Therefore let be redesign my question:
Who knows alternative implementations and libraries that are able to load PNG files?
I will then test the implementations for their capabilities to load some test png images.
Edit2: The end result have to be a BufferedImage
I have been reading Real World Haskell and I am nearing the end but a matter of style has been niggling at me to do with the (.) and ($) operators.
When you write a function that is a composition of other functions you write it like:
f = g . h
But when you apply something to the end of those functions I write it like this:
k = a $ b $ c $ value
But the book would write it like this:
k = a . b . c $ value
Now to me they look functionally equivalent, they do the exact same thing in my eyes. However, the more I look, the more I see people writing their functions in the manner that the book does: compose with (.) first and then only at the end use ($) to append a value to evaluate the lot (nobody does it with many dollar compositions). Is there a reason for using the books way that is much better than using all ($) symbols? Or is there some best practice here that I am not getting? Or is it superfluous and I shouldn't be worrying about it at all? Thanks.
I have a int which is my high score:
NSInterger highScore;
I want to store it persistently to disk
Do I have to convert it to a string, then write the string to a file, then parse it back when I want to read it. Or is there a better way to store small amounts of data?
I ran across the error Socket operation on non-socket in some of my networking code when calling connect and spent a lot of time trying to figure out what was causing it. I finally figured out that the following line of code was causing the problem:
if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol) < 0)) {
See the problem? Here's what the line should look like:
if ((sockfd = socket( ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) {
What I don't understand is why the first, incorrect line doesn't produce a warning. To put it another way, shouldn't the general form:
if ( foo = bar() < baz ) do_somthing();
look odd to the compiler, especially running with g++ -Wall -Wextra?
If not, shouldn't it at least show up as "bad style" to cppcheck, which I'm also running as part of my compile?
Dear all,
I have written up my first php script to learn facebook API stuff.It goes like this:
require_once('facebook/client/facebook.php');
$facebook = new Facebook('0fff13540b7ff2ae94be38463cb4fa67','8a029798dd463be6c94cb8d9ca851696');
http://stackoverflow.com/questions/ask
$fb_user = $facebook-require_login();
?
Hello ' useyou='false' possessive='true' /! Welcome to my first application!
I put "facebook.php" in the same directory as my php script.
However,after I deploy the php on a web server and link it with facebook and run it,I got error saying:
"Fatal error: Call to undefined method Facebook::require_login() in /home/a2660104/public_html/facebook-php-sdk-94fcb13/src/default.php on line 16"
Could anyone help me a bit on this?I am a beginner to the facebook app programming.Thanks a lot!
Hi all,
when I try to copy any file with scp on Mac OS X Snow Leopard from another machine I get this error:
scp [email protected]:/home/me/file.zip .
Password:
...
---> Couldn't open /dev/null: Permission denied
this is the output of "ls -l /dev/null":
crw-rw-rw- 1 root wheel 3, 2 May 14 14:10 /dev/null
I am in the group wheel, and even if I do "sudo scp..." it doesn't work. It's driving me crazy, do you have any suggestion?
Thanx!
My company's product is, at its core, a framework for developing metadata-driven UIs. I don't know how to characterize it less succinctly than that, and hope I won't need to for purposes of this question, but we'll see.
I've been trying to come up to speed on WPF, and have been building UI prototypes here and there, and recently I decided to see if I could use Expression Blend to help with the design of these UIs. And I'm pretty mystified at this point.
It appears to me as though Expresssion Blend is designed with the expectation that you already know all of the objects that are going to be present in the UI at design time. But our program generates these object dynamically at runtime.
For instance, a data row might be presented in a horizontal StackPanel containing alternating TextBlocks (for captions) and TextBoxes (for data fields). The number of these objects depends on metadata about the number of columns in the data row. I can, pretty readily, write code that runs through a metadata record and populates a StackPanel dynamically, setting up the binding of all of the controls to properties in either the data or metadata. (A TextBox's Width might be bound to metadata, while its Text is bound to data.)
But I can't even begin to figure out how to do something like this in Expression Blend. I can manually create all these controls, so that I have a set of controls that I can apply styles to and work out the visual design of the app, but it's really a pain to do this.
I can write code that goes through my data model and emits XAML for all these controls, I suppose, and then copy and paste it. But I'm going to feel really stupid if it turns out there a way to do this sort of thing in Expression Blend and I've dropped back and punted because I'm too dim to figure out the right way to think of it.
Is this enough information for someone to try formulating an answer?
we have three types of data (tables):
Book (id,name,author...) ( about 3 million of rows)
Category (id,name) ( about 2000 rows)
Location (id,name) ( about 10000 rows)
A Book must have at least 1 type of Category (up to 3) AND a Book must have only one Location.
I need to correlate this data to get this query faster:
Select Books where Category = 'cat_id' AND Location = 'loc_id'
Select Books where match(name) against ('name of book') AND Location = 'loc_id'
Please I need some help.
Thanks
Assuming a machine (Dual Quad Core Xeon (2.26GHz) with 24GB RAM) running Windows Server 2008 and Hyper-V. How many VMs can I expect to run at the same time with good performance.
Is this overkill? Can you really have too much RAM?
Assuming 2GB per VM thats around 16GB for the VMs with 8GB left over for the Main OS and Hyper-V.
Sound about right?
Edit:
Tried to make the question sound less like bragging. Was never my intention. Its a hard question to write.
I have two datasets I need to pull from, A base that both reports use and then a separate one that only one report pulls from. I get the error
Error 12 The Value expression for the text box ‘Textbox9’ refers to the field ‘Name’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope.
My best guess is I have to associate them with the correct dataset but I have not been able to find any documentation on this.
Can someone please tell me where in the rdlc document I need to code something like name.value, "dataset1" or something similar?
Hey all, I am using http://pastie.org/966473 as a reference as all I need to do is encrypt something using AES256 encrypting. I created a class and put the implementation in the pastie on top of the implementation for my class.
@implementation
//pastie code
@end
@implementation
//my class code
@end
In my class code I create a NSMutableData and try to call the EncryptAES method and I get a warning saying it might not respond to that. What am I doing wrong here? do I need to implement the pastie code elsewhere? Thanks for any help.